I have environments Question (described in To clearly separate block inside a chapter) and Answer blocks.
I want the Answer block be the same as as Question block but the text upside down in it.
Minimal example
\documentclass{article}
\usepackage{rotating}
\usepackage[framemethod=tikz]{mdframed}
\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
\newtheorem{answer}{Answer}
\mdfdefinestyle{ans}{
linecolor=cyan,
backgroundcolor=yellow!20
% , rotatebox
}
\surroundwithmdframed[style=ans]{answer}
\begin{document}
\begin{question}
\textbf{E.coli.}
Escherichia coli ...
\end{question}
\begin{answer}
Lorem
\end{answer}
\end{document}
I get
How can you have upside down text in the Answer environment?
I want that the text is difficult to read so the readers try to answer the question themselves before looking for the answer.
Any other way to include answers is also accepted, since I am not sure which is the best way to do it.
I however want personally that those answer are visible in the draw code just after the question.
Best Answer
See the last edit for automatic toggling
You can define a new environment
Answer
based on youranswer
environment:Full code:
Making it to difficult to read?. Here we go:
With
one gets
but beware of those who bring mirrors ;)
In fact, with
\scalebox
alone, the former orientations can be achieved without using\rotatebox
.Last edit:
If you want to automatically show/hide answers here is a way. See the commented code lines
Full code:
With
we get:
With
we get:
With optional argument