Discussion:
[pdftex] Plain TeX question / proTeXt 2011
gastewart
2012-07-13 14:07:53 UTC
Permalink
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
Heiko Oberdiek
2012-07-13 15:21:19 UTC
Permalink
Using plain tex [...]
I would like to set the word ''level'' with the ''v'' rotated x (e.g., x=90) degrees.
\input miniltx.tex
\input graphicx.sty
\resetatcatcode

level

le\rotatebox{90}{v}el

le\rotatebox[origin=c]{180}{v}el

le\rotatebox[origin=c]{270}{v}el

\bye
Please reply to gastewart at earthlink.net
If you ask on a list, then you should read the list for answers.

Yours sincerely
Heiko Oberdiek
--
Bob Howlett
2012-07-13 18:20:11 UTC
Permalink
Post by gastewart
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
Heiko Oberdiek
2012-07-13 20:57:17 UTC
Permalink
Post by Bob Howlett
The "bare hands" method is to use \pdfliteral,
He is using pdfTeX in DVI mode and driver dvips.
Then the driver can be specified the following way:

\input miniltx.tex
\def\Gin at driver{dvips.def}
\input graphicx.sty
\resetatcatcode

The code of the text remains unchanged. That's the advantage
of using a package that supports different drivers.

Yours sincerely
Heiko Oberdiek
--

Loading...