[pdftex] Plain TeX question / proTeXt 2011

Bob Howlett Robert.Howlett at sydney.edu.au
Fri Jul 13 20:20:11 CEST 2012


On 14/07/2012 12:07 AM, gastewart at earthlink.net wrote:
> Using plain tex under proTeXt distributed with the TeX Collection 2011:
>
> I would like to set the word ''level'' with the ''v'' rotated x (e.g., x=90) degrees.
>
> Please reply to gastewart at earthlink.net
>

The "bare hands" method is to use \pdfliteral, the main difficulty being to
get the rotated letter where you want it. You can attempt to calculate this
by using the height and width of the letter v, but you may as well just
experiment by raising or lowering things and inserting \kern's

e.g.:

\setbox0=\hbox{v}
\ht0=0 pt
\wd0=0 pt
\setbox0=\hbox{\pdfliteral{q 0 -1 1 0 0 0 cm}\box0\pdfliteral{Q}}

le{\kern0.5 pt\raise5 pt\box0\kern5.2 pt}el

To rotate by a different amount, use a different rotation matrix
(the first four numbers inside the \pdfliteral -- the first
two are the first row of the matrix, the next two the second row).

e.g.:

\setbox0=\hbox{v}
\ht0=0 pt
\wd0=0 pt
\setbox0=\hbox{\pdfliteral{q 0.6 -0.8 0.8 0.6 0 0 cm}\box0\pdfliteral{Q}}

le{\kern-1 pt\raise2.5 pt\box0\kern6.5 pt}el

Cheers,
Bob Howlett




More information about the pdftex mailing list