[OS X TeX] memoir class, Table questions, position of floats, line numbering

Will Robertson will at mecheng.adelaide.edu.au
Fri Jun 11 04:57:28 CEST 2004


On 11 Jun 2004, at 11:39 AM, Denis Chabot wrote:

>
> One first question that comes to my mind is: why does the sample 
> document use the memoir class, which is not described on most LaTeX 
> guides? I found a 300 p document on memoir, but before digging into it 
> (it is not light reading...), I'd like to know if there are 
> significant advantages over the article class which would make this a 
> good time investment.
>

The memoir class is like an amalgamation of the book class and the 
article class and a bunch of often-used packages. The reason I 
recommend it is *because* of the 300 page manual --- note that the 
first half is typesetting fundamentals, and not specific to typesetting 
in LaTeX.

It provides an *integrated* way of customising your document. Rather 
than with the article class, if you want to change the section heading, 
you go and find a package that does this, read its manual work out how 
to use it. Repeat ad nauseum if you want to edit the headers/footers, 
page margins, table of contents formatting, etc etc.

Your mileage may vary. If you just want a lightweight class that 
provides the basics, but all means start off with the article class. 
It's certainly more simple.


> I had to make a few tables. I noticed that if you choose the Table 
> macros in TeXShop, you get the elements of a Table pasted into your 
> document, and the first line is:
>
> \begin{table}[htdp]
>
> What does the d do? I only found the description for h, t, b and p, 
> not d.
>
> To continue with Tables, is there a way to merge two cells vertically?

I didn't know TeXShop came with a table template! Anyway, that d is a 
typo. You are correct, the only ones you can choose are h t b & p. You 
can use ! to tell LaTeX to try really hard to do what you want, at a 
slight expense to good looks.

Unfortunately, there's no way to merge cells vertically.

>
> I had to trim the column headings quite a bit to get a table to fit 
> within the width of the text. Maybe I could have reduced the font size 
> (maybe this will be ugly, but I'd like to try). Is there a way to 
> reduce font size for a whole table? Maybe the same technique would 
> allow me to make headings of a table bold, but the rest plain, when 
> journals want this style?

To make everything smaller, you can use a \small command at the same 
place as the \centering command. As for styled headers, I'd make a new 
command in the preamble like \newcommand{\head}[1]{\textbf{#1}} and use 
that for all of your table headings --- if you ever need to change them 
all, just edit the command definition to however you like.

>
> I found how to center headings that happened to be multicolumn, but 
> how do you center a column heading when you want the remainder of the 
> column to be right aligned?
>
> Anyway, my tables worked quite well for a first attempt, but I must 
> say it is slower to make a table this way versus a graphical 
> interface.

There is probably a more elegant solution, but this came to mind 
immediately: (it also shows the bold header thing)

\documentclass{article}
\newcommand{\head}[1]{\hfill\textbf{#1}\hfill}
\usepackage{booktabs}
\begin{document}
\begin{table}[htbp]
    \small
    \centering
    \begin{tabular}{@{} llr @{}} % Column formatting, @{} suppresses 
leading/trailing space
       \toprule
       \multicolumn{2}{c}{Item} \\
       \cmidrule(r){1-2}
       \head{Animal}    &  Description & Price (\$)\\
       \midrule
       Gnat      & per gram & 13.65 \\
                 & each     &  0.01 \\
       Gnu       & stuffed  & 92.50 \\
       Emu       & stuffed  & 33.33 \\
       Armadillo & frozen   &  8.99 \\
       \bottomrule
    \end{tabular}
    \caption{An example of a table generated with the \textsf{booktabs} 
package:}
    \label{tab:booktabs}
\end{table}
\end{document}


> I love not having to worry about where my figures end up (one of my 
> main beef with Word). But many ended up alone on a page, when I 
> thought there was enough space for a few lines of text on the same 
> page. I have a very small sample size, remember, but it looks to me 
> that text will be placed with my floats only if whole paragraphs can 
> fit. Is there a way to have parts of paragraph accompany floats on a 
> page, or if this a behavior that insures better looking document and I 
> should not mess with it?

To quote epslatex.pdf:

<<
1. Don’t handcuff LATEX. The more float placement options are given to 
LATEX, the better it handles float placement. In particular, the [htbp] 
and [tbp] work well. See Section 16.2.

2. Many people find the default float parameters are too restrictive. 
The following commands
   \renewcommand{\textfraction}{0.15}
   \renewcommand{\topfraction}{0.85}
   \renewcommand{\bottomfraction}{0.65}
   \renewcommand{\floatpagefraction}{0.60}
set the float parameters to more-permissive values. See Section 17.2.
 >>

>
> Finally, although I don't need this right now, in biology we often 
> have to submit documents that have lots of space between the lines 
> within paragraphs (double interligne in French). It is not pretty, but 
> journals want the manuscripts that way. How would you do this? And if 
> the journal also wants line numbers to appear in the left margin, can 
> this be done with LaTeX?

For the first, look at

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=linespace

That something I think I forgot in my sample document. The TeX FAQ 
*will* have answers to almost anything you have questions about. Find 
it at the link about.

For the second:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=linenos

Hope that helps!

Will
-----------------------------------------------------
Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the macostex-archives mailing list