Text upside-down, characters rotated along baseline?
Thanks for all the answers! After doing some research myself and digging up some packages I never had used before, I also belive the input needs to be scanned charcter by character, as suggested by @egreg.
So here is a way of doing it in LaTeX
:
\documentclass{minimal}
\usepackage{graphicx}
\usepackage{xstring}
\usepackage{forloop}
\begin{document}
\newcounter{idx}
\newcounter{posx}
\newcommand{\rotraise}[1]{%
\StrLen{#1}[\slen]
\forloop[-1]{idx}{\slen}{\value{idx}>0}{%
\StrChar{#1}{\value{idx}}[\crtLetter]%
\IfSubStr{tlQWERTZUIOPLKJHGFDSAYXCVBNM}{\crtLetter}
{\raisebox{\depth}{\rotatebox{180}{\crtLetter}}}
{\raisebox{1ex}{\rotatebox{180}{\crtLetter}}}}%
}
This is what I want to get.
\rotraise{This is what I want to get.}
\end{document}
Below you can admire the result. :)
Here are a couple of possibilities, using the facilities of the graphicx
package:
\documentclass{article}
\usepackage{graphicx}
\parindent0pt
\begin{document}
Upside down\\
\rotatebox{180}{Upside down} Upside down \\
\rotatebox{180}{\reflectbox{Upside down}} Upside down and mirrored \\
\raisebox{\depth}{\rotatebox{180}{Upside down}} Upside down and raised to fit in line
\end{document}
Or you could possibly vary the {\depth}
with a number.. say 0.5em
to align the text with other non-rotated texts
Facebook doesn't actually turn the letters around, it just (ab)uses various characters Unicode provides (e.g. IPA characters). With XeLaTeX or LuaLaTeX and a suitable font, you can do the same:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{FreeSans}
\begin{document}
uʍop əpısdՈ
\end{document}
(Compile with xelatex
or lualatex
.)
The actual characters used here are:
u latin small letter u
ʍ latin small letter turned w
o latin small letter o
p latin small letter p
space
ə latin small letter schwa
ı latin small letter dotless i
s latin small letter s
d latin small letter d
Ո armenian capital letter vo
The quality of the output is of course disputable.