[texhax] tabular and page breaks

George Georgalis george at galis.org
Wed Nov 22 17:03:16 CET 2006


Hello Mr Kotucha,


On Wed, Nov 22, 2006 at 12:47:59AM +0100, Reinhard Kotucha wrote:
>
>Chapter 3:   Basic Formatting Tools
>Section 3.3: List Structures
>Example 3-3-27
>
>I must admit that I modified it a bit.  The original name of the
>environment was "altDescription" instead of "mylist" (too lazy to use
>such long names), I used \addtowidth instead of the calc package
>because only one addition was needed, I replaced \textsf by \textbf
>because it is more noticeable, and I set \lablesep to 1em because I
>thought that's what you wanted.
>


\providecommand{\mylabel}[1]{\makebox[\labelwidth][l]{#1\hfil\relax}}
\begin{flushleft}
\begin{list}
 {}
 {      \renewcommand{\makelabel}{\mylabel}%%% <-- use new label                                                           
        \setlength{\leftmargin}{1.0in}
        \setlength{\labelwidth}{1.0in}
        \setlength{\itemindent}{0in}
        \setlength{\listparindent}{0in}
        \setlength{\labelsep}{1em}
 }

\item[word one] abc abcd abcde abc abcd abcde abc abcd abcde abc abcd
abcde abc abcd abcde abc abcd abcde abc abcd abcde
\item[word two] abcd abcde abc abcd abcde abc abcd abcde abc abcd abcde abc
abcd abcde abc abcd abcde abc abcd abcde abc
\item[word three] abcde abc abcd abcde abc abcd abcde abc abcd abcde abc
abcd abcde abc abcd abcde abc abcd abcde abc abcd

\end{list}
\end{flushleft}


That works perfect with the plus of being inline.

This method seems more robust, and requires a preamble...


\documentclass{article}

\newenvironment{mylist}[1]{\begin{list}{}{%
      \setlength\labelsep{1em}%
      \renewcommand\makelabel[1]{\textbf{##1:}\hfil}%
      \settowidth\labelwidth{\makelabel{#1}}%
      \setlength\leftmargin{\labelwidth}%
      \addtolength\leftmargin{\labelsep}}}%
  {\end{list}}

\begin{document}

\begin{mylist}{word three}
  \item[word one] abc abcd abcde abc abcd abcde abc abcd abcde abc
     abcd abcde abc abcd abcde abc abcd abcde abc abcd abcde
  \item[word two] abcd abcde abc abcd abcde abc abcd abcde abc
     abcd abcde abc abcd abcde abc abcd abcde abc abcd abcde abc
  \item[word three] abcde abc abcd abcde abc abcd abcde abc abcd
     abcde abc abcd abcde abc abcd abcde abc abcd abcde abc abcd
\end{mylist}

\end{document}


The enumitem package is another way (easier?).

I used a "myList.sty" example from here,
http://www.bio.net/bionet/mm/bioforum/1991-September/003053.html
which is the first method I was able to implement.

longtable and supertabular are packages which may help making
multi-page tables.  A task I still need to workout.

Thanks all for your help! Happy Thanksgiving!

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><


More information about the texhax mailing list