A solution that uses simple rules:
\documentclass{article}
\usepackage{amsmath}
\newcommand*{\crosssymbol}{%
% \mathbin{%
\text{%
\raise 1ex\hbox{%
\rlap{\vrule height.2pt depth.2pt width .75ex}%
\hbox to .75ex{\hss\vrule height .5ex depth 1ex\hss}%
}%
}%
% }%
}
\newcommand*{\crossupsidedown}{%
% \mathbin{%
\text{%
\raise .5ex\hbox{%
\rlap{\vrule height.2pt depth.2pt width .75ex}%
\hbox to .75ex{\hss\vrule height 1ex depth .5ex\hss}%
}%
}%
% }%
}
\begin{document}
$\dag\,\crosssymbol\crossupsidedown\,\mathsf{t}$
\end{document}
The same file translated into "pure LaTeX":
\documentclass{article}
\usepackage{amsmath}
\newcommand*{\crosssymbol}{%
% \mathbin{%
\text{%
\raisebox{1ex}{%
\makebox[0pt][l]{%
\rule[-.2pt]{.75ex}{.4pt}%
}%
\makebox[.75ex]{%
\rule[-1ex]{.4pt}{1.5ex}%
}%
}%
}%
% }%
}
\newcommand*{\crossupsidedown}{%
% \mathbin{%
\text{%
\raisebox{.5ex}{%
\makebox[0pt][l]{%
\rule[-.2pt]{.75ex}{.4pt}%
}%
\makebox[.75ex]{%
\rule[-.5ex]{.4pt}{1.5ex}%
}%
}%
}%
% }%
}
\begin{document}
\(\dag\,\crosssymbol\crossupsidedown\,\mathsf{t}\)
\end{document}
Remarks:
- I do not know the purpose of the symbols, therefore you might want to add
\mathbin
or \mathrel
to get the horizontal spacing right.
See the last edit for automatic toggling
You can define a new environment Answer
based on your answer
environment:
\usepackage{environ}
\NewEnviron{Answer}
{%
\noindent
\rotatebox[origin=c]{180}{%
\noindent
\begin{minipage}[t]{\linewidth}
\begin{answer}
\BODY
\end{answer}%
\end{minipage}%
}%
}%
Full code:
\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}
\usepackage{environ}
\NewEnviron{Answer}
{%
\noindent
\rotatebox[origin=c]{180}{%
\noindent
\begin{minipage}[t]{\linewidth}
\begin{answer}
\BODY
\end{answer}%
\end{minipage}%
}%
}%
\begin{document}
\begin{question}
\textbf{E.coli.}
Escherichia coli ...
\end{question}
\begin{Answer}
Lorem ipsum is not an answer to this question but this text will provide some dummy answer for two lines all together.
\end{Answer}
\end{document}
Making it to difficult to read?. Here we go:
\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}
\usepackage{environ}
\NewEnviron{Answer}
{%
\noindent
\reflectbox{\rotatebox[origin=c]{180}{%
\noindent
\begin{minipage}[t]{\linewidth}
\begin{answer}
\BODY
\end{answer}%
\end{minipage}%
}%
}}%
\begin{document}
\begin{question}
\textbf{E.coli.}
Escherichia coli ...
\end{question}
\begin{Answer}
Lorem ipsum is not an answer to this question but this text will provide some dummy answer for two lines all together.
\end{Answer}
\end{document}
With
\NewEnviron{Answer}
{%
\noindent
\scalebox{1}[-1]{\rotatebox[origin=c]{180}{%
\noindent
\begin{minipage}[t]{\linewidth}
\begin{answer}
\BODY
\end{answer}%
\end{minipage}%
}%
}}%
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
%\setboolean{answers}{true} %%% uncomment to show answers properly
\setboolean{answers}{false} %%% comment to show answers properly
Full code:
\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}
\usepackage{environ}
\usepackage{ifthen}
\newboolean{answers}
%\setboolean{answers}{true} %%% uncomment to show answers properly
\setboolean{answers}{false} %%% comment to show answers properly
\ifthenelse{\boolean{answers}}%
{%
\NewEnviron{Answer}
{%
\noindent
\begin{minipage}[t]{\linewidth}
\begin{answer}
\BODY
\end{answer}%
\end{minipage}% here put what the command has to do when outside
}%
}%
{\NewEnviron{Answer}
{%
\noindent
\scalebox{1}[-1]{%
\noindent
\begin{minipage}[t]{\linewidth}
\begin{answer}
\BODY
\end{answer}%
\end{minipage}%
}%
}%
}%
\begin{document}
\begin{question}
\textbf{E.coli.}
Escherichia coli ...
\end{question}
\begin{Answer}
Lorem ipsum is not an answer to this question but this text will provide some dummy answer for two lines all together.
\end{Answer}
\end{document}
With
\setboolean{answers}{false}
we get:
With
\setboolean{answers}{true}
we get:
With optional argument
\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}
\usepackage{environ}
\def\invert{-1}
\NewEnviron{Answer}[1][1]%
{%
\noindent
\scalebox{1}[#1]{%
\noindent
\begin{minipage}[t]{\linewidth}%
\begin{answer}
\BODY
\end{answer}%
\end{minipage}%
}%
}%
\begin{document}
\begin{question}
\textbf{E.coli.}
Escherichia coli ...
\end{question}
\begin{Answer}
Lorem ipsum is not an answer to this question but this text will provide some dummy answer for two lines all together.
\end{Answer}
\begin{question}
\textbf{E.coli.}
Escherichia coli ...
\end{question}
\begin{Answer}[\invert]
Lorem ipsum is not an answer to this question but this text will provide some dummy answer for two lines all together.
\end{Answer}
\end{document}
Best Answer
You have two options to fix this behaviour.
ps2pdf
automatically rotates landscape-like pages during processing. Since that is the case with yoursidewaystable
page, this page is rotated in the display, and subsequently in print as well. Supplying the option distiller option-dAutoRotatePages=/None
to Ghostscript should leave the landscape pages in their original portrait orientation.Use
pdflatex
directly. This circumvents the above requirement all together.