# How can I include upside-down Unicode text?

It seems like there is simply no way to have Latex include any generic Unicode characters you'd like in a PDF, and the solutions to this question are too complicated.

Is there any simple way to include upside-down Unicode text such as ˙ʎɐpoʇ ʎddɐɥ ɯɐ I ?

EDIT Compiling with XeLatex seems to work fine for that particular example, but later in the document I am hit with

! Package inputenc Error: Unicode char \u8:ñosd not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
...

and ...


I don't know how I was able to put that ñ there without issues before...

EDIT Turns out CJKutf8 was the culprit package that introduced inputenc

• or.. just turn your head upside down – user68908 Dec 12 '14 at 17:59
• You can't use inputenc with LuaLaTeX or XeLaTeX. – musarithmia Dec 12 '14 at 20:04

You can input any Unicode characters directly and compile them to PDF simply by using LuaLaTeX or XeLaTeX to compile (e.g., lualatex file in the terminal). You can also rotate text using the rotating package. With the turn environment you can rotate text to any desired degree (see texdoc rotating).

The source must be encoded UTF-8, you must compile with LuaLaTeX or XeLaTeX, and you must use fontspec or an appropriate package to select a font that includes the Unicode characters you need.

% compile with LuaLaTeX or XeLaTeX
\documentclass{article}
\usepackage{libertine}
\usepackage{rotating}

\newcommand{\unicodetext}{Greek μετανοεῖτε, accents \emph{esdrújulos}, pictograms ☹}

\begin{document}

This is UTF-8 encoded text with Unicode characters input directly:

\unicodetext

\begin{turn}{180}
\unicodetext
\end{turn}

\bigskip
This is text input upside-down:
˙ʎɐpoʇ ʎddɐɥ ɯɐ I ?

\end{document}


• Hm thanks, that text in particular works fine, but then later in the document I am hit with Package inputenc Error: Unicode char \u8:ñosd not set up for use with LaTeX. when I try to put l.173 ...d on reading \emph{Cien años de soledad} and.... Any ideas? – wrongusername Dec 12 '14 at 19:32
• If it matters any, I am using TeXworks on Windows – wrongusername Dec 12 '14 at 19:36
• @wrongusername If you compile with the LuaLaTeX or XeLaTeX engines, you should not get this error. I don't know Windows or TeXworks, but you should be able to adjust which engine you use to compile in the application's settings. It may be instructive to compile it from the command line lualatex file to make sure there is no error with your installation. – musarithmia Dec 12 '14 at 20:03
• Ah thanks, turns out I was using a package that automatically includes it! – wrongusername Dec 13 '14 at 3:36

If you use a unicode based tex such as xelatex or luatex it works naturally:

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
˙ʎɐpoʇ ʎddɐɥ ɯɐ I ?
\end{document}

• david -- you are evil. – barbara beeton Dec 12 '14 at 13:32
• @barbarabeeton hey It was the OP's text! – David Carlisle Dec 12 '14 at 13:37
• but you cheated and used "p" instead of "d", and vice versa. "o" is symmetrical. and "I" gave you away -- it should have an ascender, not a descender. – barbara beeton Dec 12 '14 at 13:43
• @barbarabeeton I didn't do anything: I cut and pasted the text from the question – David Carlisle Dec 12 '14 at 13:44
• Can somebody be so kind and explain, how the OP fabricated this line: ˙ʎɐpoʇ ʎddɐɥ ɯɐ I I notice, there is a trick, because the "I" has a descender. But what is the trick? It works without backticks as well: ˙ʎɐpoʇ ʎddɐɥ ɯɐ I – Keks Dose Dec 12 '14 at 20:53