discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Page Margins?
@ 2010-06-29 21:19 Kristaps Dzonsons
  2010-06-29 23:49 ` Joerg Sonnenberger
  0 siblings, 1 reply; 10+ messages in thread
From: Kristaps Dzonsons @ 2010-06-29 21:19 UTC (permalink / raw)
  To: discuss

Hi,

Does anybody know of a formula for calculating page margins?  Or lacking 
that, a table of margins for the common formats?

I'd like mandoc -Tps to accept ISO-216 pages for -Opaper, letter, legal, 
a few others, and custom widths.  And to calculate margins on-the-fly, 
if not provided.  But I can't find any references on-line for margins.

Another option, -Otwopage, is fairly easy and useful for those printing 
manuals into books.

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-06-29 21:19 Page Margins? Kristaps Dzonsons
@ 2010-06-29 23:49 ` Joerg Sonnenberger
  2010-07-01 12:45   ` Kristaps Dzonsons
  0 siblings, 1 reply; 10+ messages in thread
From: Joerg Sonnenberger @ 2010-06-29 23:49 UTC (permalink / raw)
  To: discuss

On Tue, Jun 29, 2010 at 11:19:23PM +0200, Kristaps Dzonsons wrote:
> Does anybody know of a formula for calculating page margins?  Or
> lacking that, a table of margins for the common formats?

I think the only sane rule of hand is the approach by some LaTeX pages:
take the page width and divide that by the width of 65m. Distribute the
margins evenly and/or 1:2 (one-page fs two-page), but ensure they have
some sane lower limit (e.g. 1cm or 2cm for DIN A4).

Joerg
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-06-29 23:49 ` Joerg Sonnenberger
@ 2010-07-01 12:45   ` Kristaps Dzonsons
  2010-07-01 14:06     ` Dieter Baron
  2010-07-01 14:18     ` Joerg Sonnenberger
  0 siblings, 2 replies; 10+ messages in thread
From: Kristaps Dzonsons @ 2010-07-01 12:45 UTC (permalink / raw)
  To: discuss

>> Does anybody know of a formula for calculating page margins?  Or
>> lacking that, a table of margins for the common formats?
> 
> I think the only sane rule of hand is the approach by some LaTeX pages:
> take the page width and divide that by the width of 65m. Distribute the
> margins evenly and/or 1:2 (one-page fs two-page), but ensure they have
> some sane lower limit (e.g. 1cm or 2cm for DIN A4).

Joerg, this doesn't make any sense to me.  Can you clarify?

Either way, I'd like at least one reference for this.

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-01 12:45   ` Kristaps Dzonsons
@ 2010-07-01 14:06     ` Dieter Baron
  2010-07-04 20:22       ` Kristaps Dzonsons
  2010-07-01 14:18     ` Joerg Sonnenberger
  1 sibling, 1 reply; 10+ messages in thread
From: Dieter Baron @ 2010-07-01 14:06 UTC (permalink / raw)
  To: Kristaps Dzonsons; +Cc: discuss

hi,

>>> Does anybody know of a formula for calculating page margins?  Or
>>> lacking that, a table of margins for the common formats?
>> 
>> I think the only sane rule of hand is the approach by some LaTeX pages:
>> take the page width and divide that by the width of 65m. Distribute the
>> margins evenly and/or 1:2 (one-page fs two-page), but ensure they have
>> some sane lower limit (e.g. 1cm or 2cm for DIN A4).
> 
> Joerg, this doesn't make any sense to me.  Can you clarify?
> 
> Either way, I'd like at least one reference for this.

Jan Tschichold recommends – for double sided printing – dividing height and width by 9 and using one part as top and outer margins and two parts as bottom and inner margins (Willkürfreie Maßverhältnisse der Buchseite und des Satzspiegels).  For single sided printing, I can't find a reference, but would try taking one part for left and right margins.

yours,
dillo--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-01 12:45   ` Kristaps Dzonsons
  2010-07-01 14:06     ` Dieter Baron
@ 2010-07-01 14:18     ` Joerg Sonnenberger
  1 sibling, 0 replies; 10+ messages in thread
From: Joerg Sonnenberger @ 2010-07-01 14:18 UTC (permalink / raw)
  To: discuss

On Thu, Jul 01, 2010 at 02:45:03PM +0200, Kristaps Dzonsons wrote:
> >> Does anybody know of a formula for calculating page margins?  Or
> >> lacking that, a table of margins for the common formats?
> > 
> > I think the only sane rule of hand is the approach by some LaTeX pages:
> > take the page width and divide that by the width of 65m. Distribute the
> > margins evenly and/or 1:2 (one-page fs two-page), but ensure they have
> > some sane lower limit (e.g. 1cm or 2cm for DIN A4).
> 
> Joerg, this doesn't make any sense to me.  Can you clarify?
> 
> Either way, I'd like at least one reference for this.

<- left margin -><- text width -><- right margin ->
<-                  page width                   ->

Article like margin mode (one side):
divider = 2

Book-like margin mode (two side):
divider = 3

char_per_line = 65
text width = min(page width - divider * min_margin,
		 char_per_line * width('m'))

margin base = (page width - text width) / divider

Article-like margin mode (one side):
left margin = right margin = margin base

Book-like margin mode (two side):
Left page:
left margin = margin base * 2
right margin = margin base

Right page:
left margin = margin_base
right margin = margin base * 2

The German Wikipedia artikel for "Satzspiegel" has some basic ideas for
this. One important aspect to keep in mind is that char_per_line can be
varied to remain inside a asthetic page layout. There are different
concepts for doing this though.

Joerg
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-01 14:06     ` Dieter Baron
@ 2010-07-04 20:22       ` Kristaps Dzonsons
  2010-07-05  8:00         ` Dieter Baron
  2010-07-06  8:49         ` Ulrich Spörlein
  0 siblings, 2 replies; 10+ messages in thread
From: Kristaps Dzonsons @ 2010-07-04 20:22 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]

>>>> Does anybody know of a formula for calculating page margins?
>>>> Or lacking that, a table of margins for the common formats?
>>> I think the only sane rule of hand is the approach by some LaTeX
>>> pages: take the page width and divide that by the width of 65m.
>>> Distribute the margins evenly and/or 1:2 (one-page fs two-page),
>>> but ensure they have some sane lower limit (e.g. 1cm or 2cm for
>>> DIN A4).
>> Joerg, this doesn't make any sense to me.  Can you clarify?
>> 
>> Either way, I'd like at least one reference for this.
> 
> Jan Tschichold recommends – for double sided printing – dividing
> height and width by 9 and using one part as top and outer margins and
> two parts as bottom and inner margins (Willkürfreie Maßverhältnisse
> der Buchseite und des Satzspiegels).  For single sided printing, I
> can't find a reference, but would try taking one part for left and
> right margins.

Dillo and Joerg,

I ended up running with the above formula as it scales nicely both down 
and up.  Better: it generates consistent results.  Enclosed are examples.

General question to all: how do these look?  Bikesheddy things like 
font, scale, and margins are trivial to change, but let's do it now, if 
necessary, and be done with it.

Please let me know if you'd like anything else in -Tps.  Unless 
something breaks or another feature is requested, I think this is it, 
and I'm ready to see if PDF is easy enough to implement without bloat.

Thanks,

Kristaps

[-- Attachment #2: mandoc.1.ps --]
[-- Type: application/postscript, Size: 50263 bytes --]

[-- Attachment #3: mdoc.7.ps --]
[-- Type: application/postscript, Size: 258886 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-04 20:22       ` Kristaps Dzonsons
@ 2010-07-05  8:00         ` Dieter Baron
  2010-07-05 12:50           ` Kristaps Dzonsons
  2010-07-06  8:49         ` Ulrich Spörlein
  1 sibling, 1 reply; 10+ messages in thread
From: Dieter Baron @ 2010-07-05  8:00 UTC (permalink / raw)
  To: discuss


On Jul 4, 2010, at 22:22, Kristaps Dzonsons wrote:
> I ended up running with the above formula as it scales nicely both down and up.  Better: it generates consistent results.  Enclosed are examples.
> 
> General question to all: how do these look?  Bikesheddy things like font, scale, and margins are trivial to change, but let's do it now, if necessary, and be done with it.

Okay, so let's start nitpicking:

%%Page: 1 is duplicated (the first instance just with a setfont)

Kerning information doesn't seem to be used.

Flush right margins would be nice.

The footer lines should be moved up (same distance from the body text as the headers).

Otherwise, it looks good.  Great work!

> Please let me know if you'd like anything else in -Tps.  Unless something breaks or another feature is requested, I think this is it, and I'm ready to see if PDF is easy enough to implement without bloat.

PDF would be very nice.

yours,
dillo--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-05  8:00         ` Dieter Baron
@ 2010-07-05 12:50           ` Kristaps Dzonsons
  0 siblings, 0 replies; 10+ messages in thread
From: Kristaps Dzonsons @ 2010-07-05 12:50 UTC (permalink / raw)
  To: discuss

> The footer lines should be moved up (same distance from the body text
> as the headers).

Dillo,

I don't understand this.  I thought footer lines should be aligned to
the page-bottom, as the last line of text vary by the line-height in the
event of a trailing newline, and thus would stagger the footer.

The current alignment for header and footer line are dual: the baseline
of the header is page height - (margin / 2) - (lineheight / 2).  The
baseline of the footer is (margin - 2) - (lineheight - 2).

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-04 20:22       ` Kristaps Dzonsons
  2010-07-05  8:00         ` Dieter Baron
@ 2010-07-06  8:49         ` Ulrich Spörlein
  2010-07-06  9:40           ` Kristaps Dzonsons
  1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Spörlein @ 2010-07-06  8:49 UTC (permalink / raw)
  To: discuss

On Sun, 04.07.2010 at 22:22:06 +0200, Kristaps Džonsons wrote:
> >>>> Does anybody know of a formula for calculating page margins?
> >>>> Or lacking that, a table of margins for the common formats?
> >>> I think the only sane rule of hand is the approach by some LaTeX
> >>> pages: take the page width and divide that by the width of 65m.
> >>> Distribute the margins evenly and/or 1:2 (one-page fs two-page),
> >>> but ensure they have some sane lower limit (e.g. 1cm or 2cm for
> >>> DIN A4).
> >> Joerg, this doesn't make any sense to me.  Can you clarify?
> >> 
> >> Either way, I'd like at least one reference for this.
> > 
> > Jan Tschichold recommends – for double sided printing – dividing
> > height and width by 9 and using one part as top and outer margins and
> > two parts as bottom and inner margins (Willkürfreie Maßverhältnisse
> > der Buchseite und des Satzspiegels).  For single sided printing, I
> > can't find a reference, but would try taking one part for left and
> > right margins.
> 
> Dillo and Joerg,
> 
> I ended up running with the above formula as it scales nicely both down 
> and up.  Better: it generates consistent results.  Enclosed are examples.
> 
> General question to all: how do these look?  Bikesheddy things like 
> font, scale, and margins are trivial to change, but let's do it now, if 
> necessary, and be done with it.
> 
> Please let me know if you'd like anything else in -Tps.  Unless 
> something breaks or another feature is requested, I think this is it, 
> and I'm ready to see if PDF is easy enough to implement without bloat.

The four column tables in mdoc.7.ps "wobble", ie. the columns are not
aligned 100%, you can see that on page 11 for example. A sample
mdoc.7.ps that you provided some days earlier didn't have that problem

Uli
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Page Margins?
  2010-07-06  8:49         ` Ulrich Spörlein
@ 2010-07-06  9:40           ` Kristaps Dzonsons
  0 siblings, 0 replies; 10+ messages in thread
From: Kristaps Dzonsons @ 2010-07-06  9:40 UTC (permalink / raw)
  To: discuss

> The four column tables in mdoc.7.ps "wobble", ie. the columns are not
> aligned 100%, you can see that on page 11 for example. A sample
> mdoc.7.ps that you provided some days earlier didn't have that problem

Ulrich,

I think mdoc.7 is approaching novella-length. ;-)

Yes, this is an italic-mode kerning issue.  It wobbled before, too, but 
it was harder to see as I was using a 10-point font.  Now the font's 
nicer and bigger, so the wobble is a bit more visible.

This fix won't come soon, as it both falls into the "optional" GSoC part 
and also because it's a bit devilish.  As you may see on tech@, the 
immediate focus right now is finishing `Bk' and pushing out this release 
that has nice -Tps (and block-breaking, and `Bk'-ing, and SYNOPSIS 
prettying, and so much more).

Note that I'm always looking for PS gurus to make sure my PostScript 
isn't going to make any printers barf!  So if you know any in FreeBSD, 
please send them my way.  Thusfar gv, gs, and ps2pdf don't complain, nor 
do the printers I spam in my office.

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-06  9:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-29 21:19 Page Margins? Kristaps Dzonsons
2010-06-29 23:49 ` Joerg Sonnenberger
2010-07-01 12:45   ` Kristaps Dzonsons
2010-07-01 14:06     ` Dieter Baron
2010-07-04 20:22       ` Kristaps Dzonsons
2010-07-05  8:00         ` Dieter Baron
2010-07-05 12:50           ` Kristaps Dzonsons
2010-07-06  8:49         ` Ulrich Spörlein
2010-07-06  9:40           ` Kristaps Dzonsons
2010-07-01 14:18     ` Joerg Sonnenberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).