Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] pdf page margins

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] pdf page margins


Chronological Thread 
  • From: address@hidden
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] pdf page margins
  • Date: Wed, 06 Sep 2006 23:19:14 +0200

Hello Bob,

actually it's my reply to the article: http://lists.texmacs.org/wws/arc/texmacs-users/2006-08/msg00138.html.

The problem is, Texmacs calls ps2pdf, and this detects an incorrect page size. The fix is to add "-sPAPERSIZE=a4" (or whatever paper size you need) to the ps2pdfwr script (which gets called by ps2pdf).

So the steps are:

1. Find "ps2pdfwr" on your system
2. Find the line 'OPTIONS="-dSAFER"'
3. Replace it with 'OPTIONS="-dSAFER -sPAPERSIZE=a4"' (watch the capitalization)

This will choose A4 as document size for all PDFs created with ps2pdf (and thus Texmacs). The fix is somewhat ugly, as I don't know (didn't test) if you can override it if you need some other paper size. So on CygTexmacs it's probably ok, on real Linux distributions it might break some other things.

According to
http://www.ghostscript.com/doc/AFPL/8.50/Use.htm#Change_default_size
there is another solution: In "gs_init.ps" it says

% Optionally choose a default paper size other than U.S. letter.
% (a4) /PAPERSIZE where { pop pop } { /PAPERSIZE exch def } ifelse

Uncommenting the last line should default the paper size to A4, but I haven't tried if it actually fixes the ps2pdf problem.

Best regards,
Jan


Bob Lounsbury wrote:
On Wed, 2006-09-06 at 22:09 +0200, Patrick Moule wrote:
Hello Bob,

When I export to pdf the page margins are not accurate. If I export to
ps then the margins are correct.
this should solve your problem:
http://lists.texmacs.org/wws/arc/texmacs-users/2006-08/msg00141.html

Best,
Patrick

Patrick/TeXmacs users,

I went to the posting above, but do not see a solution.


2. The ps2pdf script is not part of TeXmacs. The best solution to
the problem
would be to compare the postscript output of LaTeX with the TeXmacs
output
on a simple "Hello world" text and investigate whether there are additional
hints that we might put in the Postscript file (this is easy to implement).
Maybe you can have a look.

Best wishes, Joris

Saying that,
"the best solution ... would be to compare the postscript output of
LaTeX with the TeXmacs output ... and investigate ... hints that we
might put in the Postscript file"
does not give a solution to the problem. Maybe the problem is that, I'm
just an average computer user and most of the people on this group are
advanced but I have no idea how to modify a Postscript file.
I just want to be able to go to File>Export>Pdf and have the pdf output
be a correct representation of my document format.

I'm not trying to be testy here. It's just that I'm not a computer
programmer, I'm an end user and I need a little more information than
modifying the postscript file to answer my question.

I would greatly appreciate any additional information.

Bob






Archive powered by MHonArc 2.6.19.

Top of Page