TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Current code is:

\begin{enumerate}[label=LEVEL \arabic{*},leftmargin=*]
    \item Description of Level 1 \quad L1 \\ \emph{more text}
    \item Description of Level 2 \quad L2 \\ \emph{more text} 
\end{enumerate}

but the \quad does not align L1 and L2 uniformly vertically. I want to replace \quad with a tab but the tabbing environment does not allow mixing with an enumerate!

share|improve this question
2  
It might be easier to do this with a tabular environment instead of a list. – Alan Munn Apr 12 '11 at 16:07
up vote 9 down vote accepted

You can use the package tabto

\documentclass{article}
\usepackage{tabto}

\begin{document}
  \TabPositions{4cm}
  \begin{enumerate}[label=LEVEL \arabic{*},leftmargin=*]
    \item Description of Level 1 \tab L1 \\ \emph{more text}
    \item Description of Level 2 \tab L2 \\ \emph{more text} 
  \end{enumerate}
\end{document}

enter image description here

One can also use more tabs

\documentclass{article}
\usepackage{tabto}

\begin{document}

\NumTabs{3}

\begin{itemize}
\item some text           \tab i want this              \tab same here
\item another text        \tab and this to be at the    \tab same here
\item not the same length \tab same level after let say \tab seconde level here
\end{itemize}

\end{document}

enter image description here

share|improve this answer

You can use a boxes with equal widths to make a "tab". It is not the real thing but works quite well

\documentclass{article}
\newlength{\tablen}
\newcommand\tabbox[2][\tablen]{\makebox[#1][l]{#2}}
\begin{document}
\begin{enumerate}
    \settowidth\tablen{Description of Level 1 \quad}
    \item \tabbox{Description of Level 1} L1 \\ \emph{more text}
    \item \tabbox{Description of xxx}     L2 \\ \emph{more text}
\end{enumerate}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.