Skip to content

More flexible parsing of command-line paper sizes #979

Open
@jgranduel

Description

@jgranduel

Hi,

I am giving tectonic a new try on Windows (tectonic-0.12). Usually using pandoc with --pdf-engine=xelatex, I wanted to change the paper-size like I do with pandoc.

Where can I find all available options for allowed paper-size (or any option)?

 -Z paper-size=<spec>        Change the default paper size [default: letter]

I tried a first guess option

> tectonic -Zpaper-size=A4 .\myfirstdoc.tex
error: Unrecognized paper format: A4

I found issue #216 and #182.
The format is a4 for some reason, maybe TeX history?

The ISO 276 standard uses capital letters (and so are we used to). Could they be included as alternative?

Nonetheless the output PDF file is not in A4 format:

> tectonic.exe myfirstdoc.tex
Writing `myfirstdoc.pdf` (21.60 KiB)

> pdfinfo.exe myfirstdoc.pdf 
Page size:       612 x 792 pts (letter)

> rm myfirstdoc.pdf

> tectonic.exe -Zpaper-size=a4 myfirstdoc.tex
Writing `myfirstdoc.pdf` (21.60 KiB)

> pdfinfo.exe myfirstdoc.pdf 
Page size:       612 x 792 pts (letter)

with pandoc

> pandoc -s -V papersize:a4 myfirstdoc.tex -o my.pdf

> pdfinfo.exe my.pdf
Page size:       595.276 x 841.89 pts (A4)

I am just realizing ironically that pandoc also uses a4 and that A4 is not the default!

Modifying the TeX source works well (\documentclass[a4paper]{article}) works well:

> tectonic.exe .\myfirstdoc.tex
Writing `.\myfirstdoc.pdf` (21.59 KiB)

> pdfinfo.exe .\myfirstdoc.pdf | rg.exe 'Page size'
Page size:       595.28 x 841.89 pts (A4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelevant to tectonic's command-line interfacegood first issueA good issue for new contributors to try tackling!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions