LaTeX / Metafont
From: | Peter Clark <peter-clark@...> |
Date: | Saturday, November 16, 2002, 20:36 |
On Saturday 16 November 2002 10:49 am, Peter Clark wrote:
> I don't know, I've never tried bi-di support before. What I think would
> happen, however, is that the text would run from bottom to top, left to
> write...unless it was flipped the other way, (\begin{turn{90}) and then
> written bi-di! That just might work!
Replying to myself here--Qapla'! Copy/paste the following to see two
different options for vertical text:
---
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\makeatletter
\def\reverse#1{\Reverse#1\end}
\def\Reverse#1#2\end{\def\tmp{#2}\ifx\tmp\empty\else\Reverse#2\end\fi#1}
\usepackage{rotating}
\usepackage{babel}
\makeatother
\begin{document}
First, two different ways of reversing text:
The first way (does not display in DVI format):
\reflectbox{some text}
The second way (requires protected spaces, but displays in DVI format):
\reverse{some\ text}
Excellent. Now, let's make them vertical, shall we? Unforuntately,
neither of these will display correctly in DVI format.
\begin{tabular}{cc}
The first way:&
The second way:\\
\reflectbox{\begin{turn}{-90}\begin{minipage}{5cm}Some text that keeps going
long enough to wrap around the minipage environment.\end{minipage}
\end{turn}}&
\begin{turn}{-90} \begin{minipage}{5cm}\reverse{Some\ text\ that\ keeps\
going\long\ enough\ to\ wrap\ around\ the\ minipage\
environment.}\end{minipage} \end{turn}\\
\end{tabular}
\\
Oops. The second way reads bottom-top. I haven't been able to figure
out a way to make it read top-bottom yet, but it's a good start. The
advantage to the first is that it is doesn't require protected spaces;
however, it requires that the font be mirror-reversed when creating
it. The second requires protected spaces (annoying if you have long
text) and as of yet does not work top-bottom.
\end{document}
---
:Peter