## LaTeX forum ⇒ Text Formatting ⇒ How do I uniformly typeset tabbing in enumerate? Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Stefan Kottwitz
Posts: 9521
Joined: Mon Mar 10, 2008 9:44 pm

### Re: How do I uniformly typeset tabbing in enumerate?

Well, the line break goes away when I insert an \mbox{} before.

Stefan

Tags:

Posts: 16
Joined: Thu Dec 10, 2015 5:55 am
Thanks for support. The code works well.

How do I make the table fill the width of the surrounding enumerate item? Is there a way to obtain the width of the surrounding enumerate item?

Johannes_B
Site Moderator
Posts: 4102
Joined: Thu Nov 01, 2012 4:08 pm
\documentclass[oneside,12pt]{article}\usepackage[showframe]{geometry}\usepackage{microtype}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{lmodern}\usepackage{enumitem}\setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,labelsep=1.5em}\setlist[enumerate,2]{label= (\arabic*),leftmargin=*,align=right}\usepackage{tabularx}\newcounter{tab}\renewcommand*{\thetab}{(\arabic{tab})}\begin{document}\begin{enumerate}	\item No philosopher is illogical. Jones keeps making argumentative blunders.		No logical person keeps making argumentative blunders. All existentialists are		philosophers. So, Jones is not an existentialist. 		\setcounter{tab}{0}		\begin{tabularx}{\linewidth}{@{}>{\refstepcounter{tab}\thetab}rX@{\quad\quad}l@{}}			\label{first}& No philosopher is illogical. &(premiss) \\			\label{second}& Jones keeps making argumentative blunders. &(premiss) \\			& No logical person keeps making argumentative blunders.			& (premiss) \\			& All existentialists are philosophers. & (premiss) \\			& Jones is illogical & (from~(2) and~(3))\\			& Jones is not a philosopher. from~\ref{first} and~\ref{second}\\			& So, Jones is not an existentialist.		\end{tabularx}\end{enumerate}\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 16
Joined: Thu Dec 10, 2015 5:55 am
What is \thetab? Ah, it's defined in preamble.
Why do you insert @{} in preamble of tabularx? It doesn't seem to make a difference.

Johannes_B
Site Moderator
Posts: 4102
Joined: Thu Nov 01, 2012 4:08 pm
[latex]\thetab[\latex] defines the graphical representation of the tab counter.
In this case, this is an opening parenthesis, the value of the counter in arabic numerals (possible would be also roman, Roman, alph and Alph numerals) and a closing paren.

The other question is dealt with in the followup: Why do people insert @{} in table preamble?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 16
Joined: Thu Dec 10, 2015 5:55 am
Great.

Johannes_B
Site Moderator
Posts: 4102
Joined: Thu Nov 01, 2012 4:08 pm
@Stefan, neither hbox nor label enter horizontal mode. But the reerence point is moved, see texdoc grfguide, page 6, footnote dor reference.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.