2

It seems that \hphantom{} is ignored at the beginning of an item. The MWE below yields:

enter image description here

How to get "First" and "Second" aligned?.

I know that you have to use \hspace*{} instead of \hspace{} at the beginning of a line, but it does not seem as if \hphantom*{} or \phantom*{} exist.

Code:

\documentclass{article}
\usepackage{enumitem}

\begin{document} \begin{enumerate} \item {}\hphantom{x }First Item. \item x Second Item. \end{enumerate} \end{document}

Peter Grill
  • 223,288
  • 1
    after \item TeX is in vertical mode. – touhami Feb 02 '18 at 08:48
  • 1
    \leavevmode\hphantom{x } – egreg Feb 02 '18 at 09:18
  • @egreg: I personally don't think that this is a duplicate of the linked question. Lists are quite different than tabular. I am not sure if had I seen that other question, if I would have realized it was the same problem. touhami's comment explains the problem and you provided the\leavevmode\hphantom{x } solution . So, as long as your comment does not get deleted, this is fine. – Peter Grill Feb 02 '18 at 19:57

0 Answers0