Thursday, November 20, 2008

LaTex: Vertical Text

Scientific publications in computer science are often created using LaTeX. Here is a little tip for making text appear vertically in Latex.
First, you need to include the following library:
\usepackage{rotating}

Next, you can use the sideways environment, as follows:
\begin{sideways}YOURTEXT\end{sideways}

Finally here is an example used within a table:
\begin{tabular}{|r|r|c|}\hline
\begin{sideways}Letter\end{sideways} & \begin{sideways}Frequency\end{sideways} & Words \\
\hline
A & 0.05 & Apple, Algebra, Altruistic, Angel \\
B & 0.45 & Basketball, Ballroom, Bear, Bountiful \\
\hline
\end{tabular}

Which produces:

2 comments:

Anonymous said...

Thanks!

I'm finishing off my PhD and this was like a gift from haven!

Greetzzz F

Anonymous said...

Very good! thank you.