16

Can we use \enumerate with \standalone class? Isn't enumerate basic LaTeX? The minimal example, which does not compile with standalone but it does with article, is:

 \documentclass{standalone}
 \usepackage{tikz}
     \begin{document}
         \begin{enumerate}
             \item test 
          \end{enumerate}
      \end{document}

2 Answers 2

22

Apparently the [varwidth] option is the key.

 \documentclass[varwidth]{standalone}
     \begin{document}
         \begin{enumerate}
             \item test 
          \end{enumerate}
      \end{document}

enter image description here

2
  • I used this solution in answering the original version of tex.stackexchange.com/q/438554. However, if the solution is applied to the code in the current version of the question, the resulting proof is incorrectly cropped. Do you by any chance know why this might be the case?
    – cfr
    Jul 2, 2018 at 23:27
  • 1
    @cfr I am clueless as to the behavior. I note in article class that it seems laterally offset as well. Jul 3, 2018 at 1:59
1

Pandoc uses \item[$\square$] and \item[$\boxtimes$] which just requires amssymb package:

\documentclass[varwidth, crop]{standalone}
\usepackage{amssymb}  % \square
\begin{document}

\begin{itemize}
\item[$\square$] TODO
\item[$\boxtimes$] DONE
\end{itemize}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .