8

I'm trying to "hide" and answer by rotating it 180 degrees.

Using \rotatebox works fine if I have a short answer:

\rotatebox{180}{The answer is $\pi$}

However, if I want to put a \begin{equation}...\end{equation} or maybe rotate a whole paragraph I get errors:

\rotatebox{180}{
\begin{equation}
\sin^2+\cos^2 = 1 
\end{equation}

} gives: ERROR: Missing $ inserted.

while

\rotatebox{180}{a

b

c
}

gives: ERROR: Paragraph ended before \Grot@box@std was complete.

Is there a better command to be using? or a way to make \rotatebox work for these cases?

PS. I tried using the turn environment of rotating, but while it compiled, it didn't give the desired outcome.

PPS. I tried using the packages listed in this question....to no avail.

Yossi Farjoun
  • 13,274
  • 10
  • 74
  • 96

2 Answers2

8

You could use a \vbox (or a \parbox or a minipage) to box the equation:

\documentclass{article}
\usepackage{graphicx,amsmath}
\begin{document}

\noindent\rotatebox{180}{\vbox{%
\begin{equation}
\sin^2+\cos^2 = 1
\end{equation}}%
}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128
6

You can use the adjustbox package for this:

\begin{adjustbox}{minibox=\textwidth,angle=180}
  % ...
\end{adjustbox}

It also support verbatim or other complex content.

Martin Scharrer
  • 262,582