On Oct 27 12:12:21, w...@roquesor.com wrote:
> In article <20171026193138.ga41...@www.stare.cz> Jan Stary <h...@stare.cz> 
> wrote:
> > > > > In the ps file generated by mandoc you should have this line:
> > > > > 
> > > > >   %%DocumentMedia: Default 595 841 0 () ()
> > > > > 
> > > > > Where 595 841 correspond to A4.  If you set output paper to "letter"
> > > > > that line will say:
> > > > > 
> > > > >   %%DocumentMedia: Default 612 790 0 () ()
> > 
> > Yes. It seems that these are just _comments_ to the PS interpreter
> > and the "Default" is just an arbitrary given name, right?
> > (Sorry, I don't know the language.) So GV just shows that,
> > but it does not _determine_ the actual media size, right?
> > Looking at term_ps.c, mandoc writes "Default ... " for every paper size.
> > 
> 
> First of all, I'm just a user like you trying to figure out how things
> work.  So, don't expect from me some deep analysis, for that Ingo is the
> right person.
> 
> I answered you - based in what I intuitively observed - that mandoc
> honors the paper size, and explained you why I think so.
> 
> I know about postcript language as much as you, as well as what gv takes
> in care to print the document on the screen, so first I grep in the
> ps file for 'a4|letter' strings and got nothing, then searching on the
> Internet I found the dots equivalence and repeated the search this time
> using '595 841|612 790'.  I did the same with documents generated by GNU
> roff.  I found the "comment" I mentioned in the other message, so
> I opened the ps file with vi(1), changed those numbers, and then
> I opened the modified file with gv.  That's how I found out gv takes in
> care that "comment" to figure out physical page dimensions.

Apparently, it does not: the dimensions are given explicitly in e.g.
"%%DocumentMedia: Default 595 841 0 () ()", and the "Default"
could just as well be "Foobar", as Ingo explained.

> Finally, "default" means "default". :-)  Perhaps (guessing again), since
> page size use is related to region settings, who designed postscript
> (hence gv) thought convenient to honor some wide system setting (based
> on locale?).

With output paper set to A3, A4, A5 in man.conf, "man -Tps rm > rm.ps"
will produce a PostScript file with the correct dimensions,
calling all the formats "Default". A printer (such us my Minolta)
will print them all on A4, although it does have A3 and A5 paper too.
Changing the "%%DocumentMedia: Default ..." line manualy to "A3" or "A5"
does not change that.

I am not saying mandoc should write A3 or A4 or A5 instead of Default
(it's the actual dimensions that matter), but perhaps such a DSC comment
might help some appications. Apparently not GV, which just repeats the name,
and not my Minolta, which prints on A4 anyway.

        Jan

Reply via email to