Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Designing to-be-filled tables

8 views
Skip to first unread message

* Tong *

unread,
Apr 12, 2010, 9:36:21 AM4/12/10
to

Hi,

By default, latex creates tables with minimum spaces. However, I want it
to reserve enough space for filling in. How can I do that?

\begin{tabular}{
|c|c|c|c|c|c|c| } \hline
Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat \\
\hline
& & & & & & \\ \hline
\end{tabular}

Q1: I haven't use latex for a while, why '~' stops working as a space?

Q2: I tried to use '@{\extracolsep{3pt}}', but the table title is not
properly centered.

Please help.

Thanks


--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/

Lars Madsen

unread,
Apr 12, 2010, 9:49:52 AM4/12/10
to
* Tong * wrote:
>
> Hi,
>
> By default, latex creates tables with minimum spaces. However, I want it
> to reserve enough space for filling in. How can I do that?
>
> \begin{tabular}{
> |c|c|c|c|c|c|c| } \hline
> Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat \\
> \hline
> & & & & & & \\ \hline
> \end{tabular}
>
> Q1: I haven't use latex for a while, why '~' stops working as a space?
>
> Q2: I tried to use '@{\extracolsep{3pt}}', but the table title is not
> properly centered.
>
> Please help.
>
> Thanks
>
>

\usepackage{array}

{ | >{\centering}p{3cm} | ... | >{\centering\arraybackslash}p{4cm} | }

or something similar


--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

* Tong *

unread,
Apr 12, 2010, 12:57:43 PM4/12/10
to
Thanks to Lars Madsen's suggestion, now the table title is
properly centred. But Q1 still holds.

On Mon, 12 Apr 2010 13:36:21 +0000, * Tong * wrote:

> By default, latex creates tables with minimum spaces. However, I want it
> to reserve enough space for filling in. How can I do that?
>
> \begin{tabular}{

> ...column controls and table header def... \\


> \hline
> & & & & & & \\ \hline
> \end{tabular}
>
> Q1: I haven't use latex for a while, why '~' stops working as a space?

Now the problem is that the 2nd line is not tall enough. How can I make
it tall enough for hand-writing letters? If '~' still works as a space,
at least I can try:

{\LARGE ~}

Martin Heller

unread,
Apr 12, 2010, 1:17:41 PM4/12/10
to
* Tong * wrote:

>> Q1: I haven't use latex for a while, why '~' stops working as a space?

It's still a non-breaking space.

> Now the problem is that the 2nd line is not tall enough. How can I make
> it tall enough for hand-writing letters?

\usepackage{array}

...

\setlength{\extrarowheight}{<length>}
\begin{tabular}{...

Merciadri Luca

unread,
Apr 12, 2010, 1:23:52 PM4/12/10
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Hi,
>
> By default, latex creates tables with minimum spaces. However, I want it
> to reserve enough space for filling in. How can I do that?
>
> \begin{tabular}{
> |c|c|c|c|c|c|c| } \hline
> Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat \\
> \hline
> & & & & & & \\ \hline
> \end{tabular}
>
> Q1: I haven't use latex for a while, why '~' stops working as a space?
>
> Q2: I tried to use '@{\extracolsep{3pt}}', but the table title is not
> properly centered.

It might be off-topic, but if you know by advance the words that will
be handwritten, you can simply use \phantom{}, assuming the
handwriters do not write big letters.

- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --

You find out who your real friends are when you're involved in a
scandal. (Elizabeth Taylor)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkvDVygACgkQM0LLzLt8Mhxj+QCeM32w8yvd921Z61VM6rc4j/so
a/UAn16wqM6HlKv2VGv+yGqZFVKaJ/Po
=Yo0t
-----END PGP SIGNATURE-----

GL

unread,
Apr 12, 2010, 1:40:34 PM4/12/10
to
Le 12/04/2010 15:36, * Tong * a écrit :

For your special purpose, there exist the makecell package, you may find
just what you need using \eline and \Xrows macros pp14 to 15 of the pdf
documentation.

Regards.

>
>
> Hi,
>
> By default, latex creates tables with minimum spaces. However, I want it
> to reserve enough space for filling in. How can I do that?
>
> \begin{tabular}{
> |c|c|c|c|c|c|c| } \hline

> Sun ~& ~ Mon ~& ~ Tue ~& ~ Wed ~& ~ Thu ~& ~ Fri ~& ~ Sat \\

* Tong *

unread,
Apr 12, 2010, 6:01:54 PM4/12/10
to
On Mon, 12 Apr 2010 19:40:34 +0200, GL wrote:

> For your special purpose, there exist the makecell package, you may find
> just what you need using \eline and \Xrows macros pp14 to 15 of the pdf
> documentation.

Thanks for the point.

I was having difficulties trying to set different vertical spacing
settings between column heads and normal cells. Anybody can help?

%% Sets the parameters to get necessary vertical spacing around cells
\setcellgapes{4mm}

\makegapedcells %% switches on vertical spacing settings

%% \theadset Spacing settings for column heads.
%\renewcommand\theadset{\renewcommand\arraytretch{1}%
% \setlength\extrarowheight{0pt}}

%\renewcommand\theadgape{}
\renewcommand\theadgape{\Gape[-3mm]}

\begin{tabular}{|*{4}{c|}}

\hline
\thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\

\hline
\erows{4}{8}
\end{tabular}

* Tong *

unread,
Apr 12, 2010, 6:26:05 PM4/12/10
to
On Mon, 12 Apr 2010 19:17:41 +0200, Martin Heller wrote:

>>> Q1: I haven't use latex for a while, why '~' stops working as a space?
>
> It's still a non-breaking space.

That's strange. I can see the actual '~' in the output for the following
code:

\begin{tabular}{
|c|c|c|c|c|c|c| } \hline
Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat \\
\hline

~ & ~ & ~ & & & & \\ \hline
\end{tabular}

What's wrong?

>> Now the problem is that the 2nd line is not tall enough. How can I make
>> it tall enough for hand-writing letters?
>
> \usepackage{array}
>
> ...
>
> \setlength{\extrarowheight}{<length>}
> \begin{tabular}{...

Sorry to be dense -- I haven't use latex for a while -- is it possible to
control only the body of the table cell height, not the table header?
I've refer to the array.pdf file myself but couldn't figure it out myself.

Please help.
Thanks a lot!

Ulrike Fischer

unread,
Apr 13, 2010, 7:56:37 AM4/13/10
to
Am Mon, 12 Apr 2010 22:26:05 GMT schrieb * Tong *:


> That's strange. I can see the actual '~' in the output for the following
> code:
>
> \begin{tabular}{
> |c|c|c|c|c|c|c| } \hline
> Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat \\
> \hline
> ~ & ~ & ~ & & & & \\ \hline
> \end{tabular}
>
> What's wrong?

Well I can't see it if I copy the code in a minimal document:

\documentclass{article}
\begin{document}


\begin{tabular}{
|c|c|c|c|c|c|c| } \hline
Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat
\\
\hline
~ & ~ & ~ & & & & \\ \hline
\end{tabular}

\end{document}

So something else in your document is responsable. Stop to send code
snippets. Make complete, small documents, so that we know what you
are doing instead of having to guess.


--
Ulrike Fischer

* Tong *

unread,
Apr 13, 2010, 9:18:28 AM4/13/10
to
On Tue, 13 Apr 2010 13:56:37 +0200, Ulrike Fischer wrote:

>> That's strange. I can see the actual '~' in the output for the

>> following code. . .

>>
>> What's wrong?
>
> Well I can't see it if I copy the code in a minimal document:
>
> \documentclass{article}
> \begin{document}
> \begin{tabular}{
> |c|c|c|c|c|c|c| } \hline
> Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat
> \\
> \hline
> ~ & ~ & ~ & & & & \\ \hline
> \end{tabular}
> \end{document}
>
> So something else in your document is responsable. Stop to send code
> snippets. Make complete, small documents, so that we know what you are
> doing instead of having to guess.

I can still see the actual '~' in the output with your minimal document.

$ cat test-space.tex


\documentclass{article}
\begin{document}
\begin{tabular}{
|c|c|c|c|c|c|c| } \hline
Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat
\\
\hline
~ & ~ & ~ & & & & \\ \hline
\end{tabular}
\end{document}

The result is here:
http://imagebin.ca/view/HZOqdXG.html
Please help me identify the reason.

This is how I compile and view it.

texi2dvi -q -o test-space.dvi test-space.tex
xdvi test-space.dvi &

These are my latex packges (under Debian testing):

tex-common_2.07
texinfo_4.13a.dfsg.1-5
texlive-base_2009-8
texlive-base-bin_2007.dfsg.2-8
texlive-binaries_2009-5
texlive-common_2009-8
texlive-doc-base_2009-2
texlive-font-utils_2009-7
texlive-fonts-extra_2009-7
texlive-fonts-recommended_2009-8
texlive-generic-recommended_2009-8
texlive-latex-base_2009-8
texlive-latex-extra_2009-7
texlive-latex-recommended_2009-8
texlive-pictures_2009-8
texlive-pstricks_2009-7

Thanks

Ulrike Fischer

unread,
Apr 13, 2010, 11:13:40 AM4/13/10
to
Am Tue, 13 Apr 2010 13:18:28 GMT schrieb * Tong *:


> I can still see the actual '~' in the output with your minimal document.
>
> $ cat test-space.tex
> \documentclass{article}
> \begin{document}
> \begin{tabular}{
> |c|c|c|c|c|c|c| } \hline
> Sun ~ & ~ Mon ~ & ~ Tue ~ & ~ Wed ~ & ~ Thu ~ & ~ Fri ~ & ~ Sat
> \\
> \hline
> ~ & ~ & ~ & & & & \\ \hline
> \end{tabular}
> \end{document}
>
> The result is here:
> http://imagebin.ca/view/HZOqdXG.html
> Please help me identify the reason.

Your previewer is obviously at fault. Make a pdf or a ps and then
check in a pdf-reader or in ghostscript.

--
Ulrike Fischer

Lars Madsen

unread,
Apr 13, 2010, 12:01:37 PM4/13/10
to

maybe it is texi2dvi

have you tried latex instead?

* Tong *

unread,
Apr 13, 2010, 11:24:10 PM4/13/10
to
On Tue, 13 Apr 2010 18:01:37 +0200, Lars Madsen wrote:

>> I can still see the actual '~' in the output with your minimal
>> document.
>>

> maybe it is texi2dvi
>
> have you tried latex instead?

Duh! I can't believe it but it is true.

Donald Arseneau

unread,
Apr 14, 2010, 4:17:06 PM4/14/10
to
On Apr 13, 6:18 am, * Tong * <sun_tong_...@users.sourceforge.net>
wrote:

> This is how I compile and view it.
>
> texi2dvi -q -o test-space.dvi test-space.tex

texi means texinfo, for processing "info" format (think man pages or
online help)
into (ugly) printout with TeX. texi is NOT for latex input.

Robin Fairbairns

unread,
Apr 15, 2010, 7:36:25 AM4/15/10
to

quite so. but if texi2dvi doesn't deal with latex, wouldn't there
have been more fundamental complaints? (i really don't know, but i
have a brain itch that says it's touted as an alternative make-alike).
--
Robin Fairbairns, Cambridge

Donald Arseneau

unread,
Apr 16, 2010, 3:46:41 AM4/16/10
to
On Apr 15, 4:36 am, Robin Fairbairns <r...@warp.cl.cam.ac.uk> wrote:

> On 2010-04-14, Donald Arseneau <a...@triumf.ca> wrote:
>
> > On Apr 13, 6:18 am, * Tong * <sun_tong_...@users.sourceforge.net>
> > wrote:
>
> >> This is how I compile and view it.
>
> >> texi2dvi -q -o test-space.dvi test-space.tex
>
> > texi means texinfo, for processing "info" format (think man pages or
> > online help)
> > into (ugly) printout with TeX.  texi is NOT for latex input.
>
> quite so.  but if texi2dvi doesn't deal with latex, wouldn't there
> have been more fundamental complaints?

I never thought that texi2dvi would do latex, but apparently it
is supposed to auto-detect both info and LaTeX format (not
deeply, just by file extension), and if that fails there is an option
argument to specify the language.

0 new messages