home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.postscript
- Path: sparky!uunet!gatech!udel!intercon!psinntp!nntp1.radiomail.net!fernwood!trilithon!henry
- From: henry@trilithon.mpk.ca.us (Henry McGilton)
- Subject: Re: Text formatters turn PostScript upside down -- why?
- Message-ID: <1992Nov15.171106.29063@trilithon.mpk.ca.us>
- Sender: henry@trilithon.mpk.ca.us
- Organization: Trilithon Software
- References: <1992Nov14.222532.8727@cs.brown.edu>
- Date: Sun, 15 Nov 1992 17:11:06 GMT
- Lines: 39
-
- In article <1992Nov14.222532.8727@cs.brown.edu> jgm@cs.brown.edu (Jonathan
- Monsarrat) writes:
-
- * Why do text formatters/converters like dvips (for TeX) and
- * grops (for Troff) define everything upside down in PostScript?
- * Just to be mean?
- Speaking only from my knowledge of troff here. First of all,
- remember that both troff and TeX (even TeX 82) predate PostScript,
- but that's probably irrelevant to the issue anyway.
-
- The main reason stems from the nature of printed pages. Pages of
- text, whether Western or Asian, read from top to bottom. Therefore
- there's some sense in defining a coordinate system with (0, 0) at
- the top left (for Western style text). In troff, the first line
- of the page is at the top of the page, loosely speaking, and the
- y coordinate increases as you move down the page towards the bottom.
- The \v escape sequence moves down for positive arguments and up
- for negative arguments. The .sp request moves down for positive
- arguments and up for negative arguments, and so on.
-
- This is opposite from PostScript's coordinate system which places
- (0, 0) at the lower left corner of the page, like the regular first
- quadrant of a Cartesian coordinate system we all learned about in
- school.
-
- To switch between the troff (and I assume TeX) coordinate system
- and the PostScript coordinate system is simple -- translate up by
- the height of the page and do a 1 -1 scale operation so the CTM is
- ``upside down'' from the standard PostScript coordinate system.
- If you just stop there, of course, all your text will come out
- upside down as well, so every time you make a font, you have to
- use a [ S 0 0 -S 0 0 ] makefont to get the text coming out the
- right way up.
-
- ........ Henry
-
- Do not meddle in the affairs of troff,
- for she is subtle and quick to anger.
- ----- Bill Joy, circa 1980.
-