4

I'm creating a Q&A exercise set where the answers are in upside-down (rotated 180) text. I have the following code, where I have an enumerate (with an item for every Q&A answer) inside a rotate. I followed the examples from here.

\usepackage{rotating}

.....

\begin{rotate}{180}
\begin{enumerate}
\item It will produce 500, one for each of the original features.
\item The answer is False.
\end{enumerate}
\end{rotate}

However, this code won't even compile with pdflatex:

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.980 \item I
             t will produce 500, one for each of the original features.

I tried both rotate and rotatebox as described in this question.

Thanks for any help.

1 Answer 1

5

You have to define a paragraph like environment for enumerate to work. Just wrap it in a minipage or \parbox.

This is my MWE:

\documentclass{article}
\usepackage{rotating}

\begin{document}
\begin{rotate}{180}
  \parbox{0.4\linewidth}{
    \begin{enumerate}
    \item It will produce 500, one for each of the original features.
    \item The answer is False.
    \end{enumerate}}
\end{rotate}
\end{document}

And the result:

enter image description here

EDIT

I suggest you should use \rotatebox from the graphicx-package. It enables to define the origin of rotation.

Therefore the MWE looks like this:

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\rotatebox{180}{
  \parbox[t]{0.6\linewidth}{
    \begin{enumerate}
    \item It will produce 500, one for each of the original features.
    \item The answer is False.
    \end{enumerate}}}
\end{document}

And the result, especially for wider boxes is:

enter image description here

EDIT 2

As requested, the solution with minipage:

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\rotatebox{180}{
  \begin{minipage}[t]{0.6\linewidth}
    \begin{enumerate}
    \item It will produce 500, one for each of the original features.
    \item The answer is False.
    \end{enumerate}
  \end{minipage}}
\end{document}

The result is identical to the one before, so no extra image here.

2
  • Thank you very much. Could you please also show how I could use minipage instead of parbox? Commented Feb 9, 2017 at 6:36
  • @stackoverflowuser2010 I am glad, I could help. Here you are, as requested, an example with minipage.
    – Jan
    Commented Feb 9, 2017 at 7:04

You must log in to answer this question.

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