groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mom and custom page sizes


From: Oliver Corff
Subject: Re: mom and custom page sizes
Date: Fri, 14 Oct 2022 22:15:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0

Hi Marcus,

without having tried your example, it comes to my mind that the text if
formatted the way you want it to have, but the media box of the pdf is
set to A4 or letter (depending on the default configuration of your system).

After that thought, I gave it a try, et voilĂ , this is the media box of
the pdf file:

/MediaBox [0 0 612 792 ]

No wonder you look at an A4 or letter sheet of paper.

The answer to your problem is on page 5, bottom, of
/usr/share/doc/groff/pdf/mom-pdf.pdf, "Producing PDFs with groff and mom".

Best regards,

Oliver.


On 14/10/2022 18:12, Marcus Brownlow wrote:
Hi all,

I'm new to groff and am having some trouble understanding how custom page
sizes work. I'm using the mom macro and pdfmom 1.22.4 on the linux command
line.

My simple document (below) works fine with default settings (US letter, 1"
margins); with .PAPER A4 (A4 paper as expected); but has the following
problems when .PAGE is used:

1. Paper size defaults to US Letter
2. Line length seems to obey the custom paper width
3. Page specifications are ignored in the vertical dimension in favor of US
Letter height

I do not understand this behavior at all. I've been a LaTeX user for many
years and wonder if I'm just approaching groff/mom with the wrong headspace
and set of assumptions about how it should work.

Thanks for your help.

--
In this example, I am expecting a custom page size of 15cm x 15cm with 1cm
margins, but the PDF shows US Letter paper, correct line length but US
Letter page height instead of 15cm.

.TITLE "This is a title"
.AUTHOR "I am the author"
.DOCTYPE DEFAULT
.COPYSTYLE  FINAL
.PRINTSTYLE TYPESET
.PT_SIZE 14
.PAGE 15c 15c 1c 1c 1c 1c
.START
Adduser addgroup agetty alias anacron apropos apt apt-get, wc grep head
hostname comm bc chown, tee clear mv rmdir xargs lsusb. Chown date bzip ln
shutdown ifconfig grep uname rdiff-backup history, gzip  atq vim arch
dmidecode groups iostat adduser, nmap mkdir df ionice youtube-dl cat kill
locate. Find locate bzip hwinfo sudo cp wall who hwclock, nproc adduser
nice bc yes rm scp whereis, killall ls whatis addgroup xargs df
hostnamectl. Iostat apropos dmidecode nano top touch lshw vi more pidof
killall ln, history adduser grep wall hostname gunzip apt-get shutdown head
ifconfig man, vim dir free df atq echo wc zip su alias. Man shutdown zip
killall su yes hwinfo agetty groups cal, mv ls ping mkdir which gzip sleep
youtube-dl tr hostname, iostat nmap w factor reboot top ifconfig cat. Mv
free man cp rename tr bzip zdiff gunzip rm, nano watch sleep clear w users
du ln, groups sort eject top rdiff-backup anacron env uptime. Cat factor
grep anacron head tree cal pstree, nc time env clear hostnamectl ps exit,
agetty login adduser dd bzip shutdown.

$ pdfmom example.mom > example-custom-15x15.pdf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]