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}
Sergio Parreiras
  • 1,786
  • 1
  • 15
  • 32

2 Answers2

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

  • I used this solution in answering the original version of https://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 02 '18 at 23:27
  • 1
    @cfr I am clueless as to the behavior. I note in article class that it seems laterally offset as well. – Steven B. Segletes Jul 03 '18 at 01: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

Tinmarino
  • 111