[texhax] tabular and page breaks

Reinhard Kotucha reinhard.kotucha at web.de
Tue Nov 21 01:27:12 CET 2006


>>>>> "George" == George Georgalis <george at galis.org> writes:

  > the problem is the label's are being right justified when they
  > should be left. labelwidth seems up against the left margin, but I
  > see no way to make label "raggedright" eg attach the label to the
  > left margin (and I spent far too much time searching doc, source,
  > books, and websites to get this far) cf page 113 Latex A Doc Prep
  > System, Lamport, 1994.

There is an example ine TLC2, page 149.

The mylist environment takes the text of the widest label as an
argument in order to determine \labelwidth.

__________________________________________________________________
\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}
__________________________________________________________________

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------




More information about the texhax mailing list