Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] PDF export and paper size

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] PDF export and paper size


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: Jan Lellmann <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] PDF export and paper size
  • Date: Tue, 12 Sep 2006 18:24:45 +0200

Hi Jan,

Thanks for the checks. I fixed this for the next version.
Hopefully the fix won't raise any other problems...

Best wishes, Joris

--------------------------------------------------------------
On Sun, Aug 27, 2006 at 03:17:45PM +0200, Jan Lellmann wrote:
> I just checked this. Actually I found that even with Latex, using
> "dvips file.dvi; ps2pdf file.ps" also results in incorrect paper size,
> while "dvips -t a4 file.dvi; ps2pdf file.ps" works.
>
> It tracks down to one difference: The correct file cintains a section
>
> ----
> %%BeginSetup
> %%Feature: *Resolution 600dpi
> TeXDict begin
> %%BeginPaperSize: a4
> a4
> %%EndPaperSize
> end
> %%EndSetup
> ----
>
> while in the incorrectly processed file this is shortened down to
>
> ----
> %%BeginSetup
> %%Feature: *Resolution 600dpi
> TeXDict begin
> %%PaperSize: A4
> end
> %%EndSetup
> ----
>
> The corresponding section in Texmacs is
>
> ----
> %%BeginSetup
> %%Feature: *Resolution 1200dpi
> TeXDict begin
> %%PaperSize: a4
> %%EndSetup
> ---
>
> So, it also uses the one-line version of PaperSize. Changing this to the
> three-line version
>
> %%BeginPaperSize: a4
> a4
> %%EndPaperSize
>
> makes ps2pdf correctly process the file. So maybe someone could change
> the behavior in Texmacs. (Also, while I know basically nothing about
> Postscript, it seems there is an "end" missing or misplaced)
>
> There is also a second difference between Latex und Texmacs in the
> header comments:
>
> Latex: %%BoundingBox: 0 0 595 842
> Texmacs: %%BoundingBox: 0 0 596 842
>
> I don't know if this makes a difference, but I thought I'd report it anyway.
>
> Greetings,
> Jan
>
> address@hidden wrote:
> >Quoting address@hidden:
> >>just another small issue (Cygtexmacs): I have a document with A4 paper
> >>size exported as document.ps, which shows and prints correctly using
> >>ghostview.
> >>But "ps2pdf document.ps" produces a document with pages of the nonsense
> >>size 21,587x27,937cm and without the upper border. When I export the
> >>document directly to PDF, I get exactly the same problem.
> >
> >This is annoying indeed.
> >
> >>This can be corrected by hardcoding the "-sPAPERSIZE=a4" option into
> >>the ps2pdf script, but that's obviously not a nice solution.
> >>
> >>I guess that ghostscript somehow incorrectly guesses the paper size,
> >>but I have no idea why. Ghostview detects it correctly. For Latex
> >>generated PS files, ps2pdf also works flawlessly.
> >>
> >>So maybe TeXmacs could manually add the PAPERSIZE option to the ps2pdf
> >>command line?
> >
> >Two things:
> >
> >1. There are two programs which convert from postscript into pdf:
> > ps2pdf and pstopdf. I am not sure which one is the best (and available
> > on most platforms). Maybe someone on the list can make a detailed
> >comparison.
> >
> >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
> >
> >


  • Re: [TeXmacs] PDF export and paper size, Joris van der Hoeven, 09/12/2006

Archive powered by MHonArc 2.6.19.

Top of Page