[texhax] In the name of the Lord---

Tom Schneider toms at ncifcrf.gov
Sat Nov 17 22:31:45 CET 2007


Diego:

> It worked!!

Great!  (I thought your email was spam aat first because of the
subject! :-)

> Tom, I cannot thank you enough for your help. It wasn't easy, especially 
> because I'm a novice at the terminal, but thanks to your logical 
> instructions, I could follow the idea and adapt them to my particular 
> problem.

That's exactly how we all learn the command line.

> The key was in finding all the instances of "90 rotate" and similar in 
> the PostScript code. That wasn't so straightforward because
> 
> grep '-90 rotate' paper.ps
> 
> (and similar) gave a syntax error. It didn't like the minus sign.

Right.  It turns out that a number of unix commands have this effect
of having trouble with a dash because that's used as a flag indicator.
So people added a feature to get around it.  Try this:

grep -- '-90 rotate' paper.ps

The '--' tells grep to ignore the '-' later on.

Also you could have used

grep '90 rotate' paper.ps

and that would show all cases.

> Well, after lots of trials replacing strings and sets of strings and 
> getting nothing or all sorts ugly rotations, it dawned on me that, if 
> computers are strictly logical (and they are!) and you were right (and 
> you were!), I must be missing other instances of 90-degree rotations. In 
> the end, the three replacements I needed to make were for
> 
> 90 rotate
> -90 neg rotate
> -90 mul rotate.
> 
> With that,
> 
> cat paper.ps |\
> sed "s/90 rotate/44 rotate 46 rotate/" |\
> sed "s/-90 neg rotate/-44 neg rotate -46 neg rotate/" |\
> sed "s/-90 mul rotate/-44 mul rotate -46 mul rotate/" |\
> cat > fixed.ps
> ps2pdf fixed.ps
> 
> worked like a charm.

Bingo!

> Thanks a million!

You're welcome.

> Best wishes,
> 
> Diego
> 
> P.S. If people don't want their landscape pages to be displayed rotated 
> because they destroy the harmony of the on-screen document (or is it 
> just us?), why does Adobe even bother to act so "smart"? Is this another 
> instance of Garrett Hardin's* (sarcastic) Dogma of the Technological 
> Imperative? It says, "When we invent something, we are required to use 
> it." But are we?
> 
> *Exploring New Ethics for Survival, p. 141.

Apparently it's controllable in ps2pdf - note the other people pointed
out this flag:

> -dAutoRotatePages=/None (# in stead of = on
> Windows systems) as option to ps2pdf?

But I agree - one should not have to turn this silly "smart" feature
off, it should be off by default.

Regards,

Tom

  Dr. Thomas D. Schneider
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research Nanobiology Program
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  toms at ncifcrf.gov
  permanent email: toms at alum.mit.edu
  http://www.ccrnp.ncifcrf.gov/~toms/


More information about the texhax mailing list