X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1621" "Thu" "1" "October" "92" "17:57:26" "+0100" "Paul Taylor" "pt@DOC.IC.AC.UK" nil "44" "Re: rotation of boxes using \\specials" "^Date:" nil nil "10"]) Return-Path: Received: from sc.ZIB-Berlin.DE (serv01) by dagobert.ZIB-Berlin.DE (4.1/SMI-4.0/1.9.92 ) id AA06511; Thu, 1 Oct 92 18:13:44 +0100 Received: from vm.urz.Uni-Heidelberg.de (vm.hd-net.uni-heidelberg.de) by sc.ZIB-Berlin.DE (4.0/SMI-4.0-sc/19.6.92) id AA23632; Thu, 1 Oct 92 18:13:15 +0100 Message-Id: <9210011713.AA23632@sc.zib-berlin.dbp.de> Received: from DHDURZ1 by vm.urz.Uni-Heidelberg.de (IBM VM SMTP V2R2) with BSMTP id 2475; Thu, 01 Oct 92 18:13:56 CET Received: from DHDURZ1 by DHDURZ1 (Mailer R2.08 R208004) with BSMTP id 2466; Thu, 01 Oct 92 18:13:52 CET Received: from DHDURZ1 by DHDURZ1 (Mailer R2.08 R208004) with BSMTP id 2462; Thu, 01 Oct 92 18:13:48 CET Reply-To: Mailing list for the LaTeX3 project Date: Thu, 1 Oct 92 17:57:26 +0100 From: Paul Taylor Sender: Mailing list for the LaTeX3 project To: Multiple recipients of Subject: Re: rotation of boxes using \specials Status: R X-Status: X-Keywords: X-UID: 810 > The DVI driver standards committee has > proposed a rotation special which has been "on the books" for > several years now. The syntax is \special{rotate N} where N is > the angle in 1/65536 degrees. Why on earth do you have to measure rotation in degrees? That means that if you want to draw a diagonal line between two (essentially cartesian) given points you have first to calculate the inverse tangent (in TeX). Arithmetic in TeX is bl**dy awful, and arctan is probably the most difficult trig function to calculate. Suggest instead (as I've used in my commutative diagrams package) a ratio, as used by LaTeX but, of course, without the restrictions. Let the PostScript interpreter calculate the arctan. I do (using Rokicki's \specials): \special{ps: x y bturn} \hbox{} \special{ps:eturn} where /bturn {% % x y axisht on PS stack gsave % save graphics state currentpoint % push position currentpoint translate % move origin there 4 2 roll neg exch atan rotate % rotate baseline % dvips doesn't know we've changed the coordinate system, so neg exch neg exch translate % move origin back } def /eturn {currentpoint grestore moveto} def I also do my arithmetic using continued fractions. Paul Taylor Dept of Computing Imperial College London SW7 2BZ, UK +44 71 589 5111 x 5057 pt@doc.ic.ac.uk PS commutative diagrams package available by anonymous ftp from theory.doc.ic.ac.uk 146.169.2.37 /tex/contrib/Taylor/tex/diagrams-V4*