[XeTeX] centering layout with geometry package

Zdenek Wagner zdenek.wagner at gmail.com
Sat Nov 26 11:23:42 CET 2011


2011/11/26 Daniel Greenhoe <dgreenhoe at gmail.com>:
> I'm afraid I'm confused with regards to the zwpagelayout package. In
> the geometry package, there are two basic areas:
>   1. The physical page (e.g. a4 size paper)
>   2. The layout area (e.g. a5 size paper) that fits somewhere on the
> physical page
>
> By default, the two areas are identical, but they can be set
> differently. And all the basic parameters such as spacing for margins,
> header, footers, text area height and text area width ... they all
> refer to what is *inside* (not outside) the layout area.
>
> Is this same concept available in the zwpagelayout package? Or do the
> margin parameters refer to distance from the outside borders of the
> layout area to the borders of the physical page?
>
No, the concept is different. If you send the document to the
phototypesetter, you pay the amount of te film used. In order to
reduce the cost the physical size have to be as small as possible.
>From technological point of view the crop marks must have certain size
and a bleed area of certain size is required. As default these sizes
are set to 5mm because this is required by most print houses in the
Czech Republic. What you have to define are dimensions after trimming.
If the cropmarks option is set, the physical size of the media is set
so that it includes the bleed area (cropgap) and the area with the
crop marks (croplength). The boxes are set properly in PDF in xelatex
with xdvipdfmx, in pdflatex, and in latex+dvips. TrimBox is the box
containing the page after trimming. ArtBox is set to the same values,
BleedBox is set so that it includes the bleed area. MediaBox and
CropBox are not set by the package because they are set automatically
by the drivers using information on the paper size stored in
\paperwidth and \paperheight (these values are sent to the drivers).

It sometimes happen that I have A5 or B5 size document with crop marks
and I wish to print it centered on A4 using my laser printer. This can
be easily achieved by Acrobat Reader, it is just a matter of selecting
an option in the print dialogue. This is the reason why I do not set
the media size explicitely.

> Dan
>
> 2011/11/26 Zdenek Wagner <zdenek.wagner at gmail.com>:
>> 2011/11/25 Daniel Greenhoe <dgreenhoe at gmail.com>:
>>> Hello Zdenek,
>>>
>>> 2011/11/25 Zdenek Wagner <zdenek.wagner at gmail.com>:
>>>> You can try zwpagelayout. ...
>>>> Versions 1.3 has just been released on CTAN, ...
>>>
>>> I am very interested in trying this. When I looked on ctan, it said
>>> that what was currently there was version 1.2. However the readme says
>>> version 1.3 with a date of 2011 November 22 and the pdf documentation
>>> also has a date of 2011 November 22 (but no version number). So I
>>> would guess that what is currently there is version 1.3, as you
>>> indicated.
>>>
>> It has been released just recently, maybe the catalogue is not yet
>> updated. The CTAN managers update the catalogue manually, thus it may
>> take some time.
>>
>>> Thank you!
>>> Dan
>>>
>>> 2011/11/25 Zdenek Wagner <zdenek.wagner at gmail.com>:
>>>> 2011/11/25 Susan Dittmar <Susan.Dittmar at gmx.de>:
>>>>> Hello Daniel,
>>>>>
>>>>> I had a glance at the current geometry documentation. Unfortunately, to me it
>>>>> looks like what you want is not implemented.
>>>>>
>>>>>> > Quoting Daniel Greenhoe (dgreenhoe at gmail.com):
>>>>>> >> Using the geometry package, is there any way to automatically (without
>>>>>> >> using layouthoffset and layoutvoffset) to center a layout area on a
>>>>>> >> physical page? The default seems for the layout to be pushed into the
>>>>>> >> upper left corner of the physical page. Here is an example:
>>>>>> >>
>>>>>> >> \documentclass{book}
>>>>>> >> \setlength{\parskip}{0mm}%
>>>>>> >> \setlength{\parindent}{0mm}%
>>>>>> >> \usepackage{geometry}
>>>>>> >> \geometry{
>>>>>> >>   xetex,truedimen,paper=a4paper,
>>>>>> >>   centering,twoside=false,
>>>>>> >>   ignoreall,
>>>>>> >>   layoutheight=200mm,layoutwidth=100mm,
>>>>>> >>   margin=10mm,
>>>>>> >>   nomarginpar,noheadfoot,
>>>>>> >>   showframe,showcrop
>>>>>> >>   }
>>>>>> >> \begin{document}%
>>>>>> >> abc
>>>>>> >> \end{document}%
>>>>>
>>>>> There seems to be no way of asking for a centered layout area on the
>>>>> physical page. Looks like you do have to set layouthoffset and
>>>>> layoutvoffset manually.
>>>>>
>>>>> Still my remark concerning having both "centering" and "margin=10mm" in the
>>>>> options list holds true. They affect the same internal values, one
>>>>> overwriting the other.
>>>>>
>>>> You can try zwpagelayout. I wrote it because geometry can do the
>>>> things that I do not need and cannot (or could not) do what I need
>>>> every day. Versions 1.3 has just been released on CTAN, it will soon
>>>> appear in TeX Live. The previous versions had problems with the
>>>> ifxetex package, thus it was necessary to load fontspec after
>>>> awpagelayout. The problem is fixed in 1.3.
>>>>
>>>>> Hope that helps, at least a bit,
>>>>>
>>>>>        Susan
>>>>>
>>>>>
>>>>> --------------------------------------------------
>>>>> Subscriptions, Archive, and List information, etc.:
>>>>>  http://tug.org/mailman/listinfo/xetex
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Zdeněk Wagner
>>>> http://hroch486.icpf.cas.cz/wagner/
>>>> http://icebearsoft.euweb.cz
>>>>
>>>>
>>>>
>>>> --------------------------------------------------
>>>> Subscriptions, Archive, and List information, etc.:
>>>>  http://tug.org/mailman/listinfo/xetex
>>>>
>>>
>>>
>>>
>>> --------------------------------------------------
>>> Subscriptions, Archive, and List information, etc.:
>>>  http://tug.org/mailman/listinfo/xetex
>>>
>>
>>
>>
>> --
>> Zdeněk Wagner
>> http://hroch486.icpf.cas.cz/wagner/
>> http://icebearsoft.euweb.cz
>>
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>>  http://tug.org/mailman/listinfo/xetex
>>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the XeTeX mailing list