4

I've noticed that the content of the minipage environments is not correctly aligned in the following MWE:

\documentclass{article}
\usepackage{doclicense}

\begin{document}
    \begin{minipage}[t]{.5\linewidth}
        \begin{enumerate}
            \item foo;
        \end{enumerate}
    \end{minipage}
    \begin{minipage}[t]{.5\linewidth}
        \begin{enumerate}
            \item[] bar
        \end{enumerate}
    \end{minipage}
\end{document}

I would expect to get:

Expected result

But instead it is:

enter image description here

Either commenting \usepackage{doclicense} or using \item bar (without the square brackets) gets it fixed. Is this a bug or am I doing something wrong? I could do without the doclicense package but would like to know what is causing this anyways.

  • 2
    The same issue can be reproduced by loading \usepackage{hyperref} instead of doclicense (doclicense loads hyperref automatically). – moewe Mar 11 at 5:52
  • 2
  • @Ulrike Fischer I guess my question can be considered a duplicate then. – Paulie Mar 11 at 20:13
1

It seems loading enumitem and specifying an emptylabel solves the problem:

\documentclass{article}
\usepackage{enumitem}
\usepackage{doclicense}

\begin{document}

    \begin{minipage}[t]{.5\linewidth}
        \begin{enumerate}
            \item foo;
        \end{enumerate}
    \end{minipage}
    \begin{minipage}[t]{.5\linewidth}

        \begin{enumerate}[label ={}]
            \item bar
        \end{enumerate}
    \end{minipage}

\end{document} 

enter image description here

  • I see. But it looks that my MWE was too minimal: I need to have have more \item elements with labels in the same enumerate environment. – Paulie Mar 11 at 20:05
  • 1
    You can close the enumerate and reopen another after the first, with specific parameters. This is very easy with enumitem. – Bernard Mar 11 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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