🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.tex
Article #140

Re: Drehen von Textausschnitten?

#140
From: Guido Hogen
Date: Wed, 22 Jul 1992 06:53
62 lines
2914 bytes
Es gibt einen rotate.sty (folgt unten), der in PostScript das
drehen, spiegeln und auf den Kopf stellen von Boxen uebernimmt.

Beispiel:

(...)
\newbox\meinebox
\setbox\meinebox=\hbox{Kopf}
\newbox\deinebox
\setbox\deinebox=\hbox{umgekehrt}
Auf dem \rotu\meinebox ~und
 \rotf\deinebox.
(...)

Gruesse, Guido
(ghogen@zeus.informatik.rwth-aachen.de)

---------rotate.sty----------schnippel hier--------------------

%
%   These macros allow you to rotate or flip a \TeX\ box.  Very useful for
%   sideways tables or upsidedown answers.
%
%   To use, create a box containing the information you want to rotate.
%   (An hbox or vbox will do.)  Now call \rotr\boxnum to rotate the
%   material and create a new box with the appropriate (flipped) dimensions.
%   \rotr rotates right, \rotl rotates left, \rotu turns upside down, and
%   \rotf flips.  These boxes may contain other rotated boxes.
%
\newdimen\rotdimen
\def\vspec#1{\special{ps:#1}}%  passes #1 verbatim to the output
\def\rotstart#1{\vspec{gsave currentpoint currentpoint translate
   #1 neg exch neg exch translate}}% #1 can be any origin-fixing transformation
\def\rotfinish{\vspec{currentpoint grestore moveto}}% gets back in synch
%
%   First, the rotation right. The reference point of the rotated box
%   is the lower right corner of the original box.
%
\def\rotr#1{\rotdimen=\ht#1\advance\rotdimen by\dp#1%
   \hbox to\rotdimen{\hskip\ht#1\vbox to\wd#1{\rotstart{90 rotate}%
   \box#1\vss}\hss}\rotfinish}
%
%   Next, the rotation left. The reference point of the rotated box
%   is the upper left corner of the original box.
%
\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by\dp#1%
   \hbox to\rotdimen{\vbox to\wd#1{\vskip\wd#1\rotstart{270 rotate}%
   \box#1\vss}\hss}\rotfinish}%
%
%   Upside down is simple. The reference point of the rotated box
%   is the upper right corner of the original box. (The box's height
%   should be the current font's xheight, \fontdimen5\font,
%   if you want that xheight to be at the baseline after rotation.)
%
\def\rotu#1{\rotdimen=\ht#1\advance\rotdimen by\dp#1%
   \hbox to\wd#1{\hskip\wd#1\vbox to\rotdimen{\vskip\rotdimen
   \rotstart{-1 dup scale}\box#1\vss}\hss}\rotfinish}%
%
%   And flipped end for end is pretty ysae too. We retain the baseline.
%
\def\rotf#1{\hbox to\wd#1{\hskip\wd#1\rotstart{-1 1 scale}%
   \box#1\hss}\rotfinish}%
Technical Details
Message-ID: <ghogen.711788007@kreon>
Path: arc1-ca.pugleaf.net!sparky!uunet!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!kreon!ghogen
References: <A6505@HB.maus.de> <A1745@KI.maus.de>

Show Full Headers
Complete Article Headers
Newsgroups: de.comp.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!kreon!ghogen
From: ghogen@kreon.informatik.rwth-aachen.de (Guido Hogen)
Subject: Re: Drehen von Textausschnitten?
Message-ID: <ghogen.711788007@kreon>
Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
Nntp-Posting-Host: kreon
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
References: <A6505@HB.maus.de> <A1745@KI.maus.de>
Date: 22 Jul 92 06:53:27 GMT
Lines: 63