[tex-live] Geometry package v5.0 (preliminary source)

Hideo Umeki latexgeometry at gmail.com
Sun Jan 24 23:34:43 CET 2010


I've been working on the fixed and new version of geometry package lately.
The source is done, but the doc and packaging are not yet.
While doing them, I'd appreciate it if anybody could check whether the attached
geometry.sty (v5.0 pre) works well in XeTeX and any other systems.
If there're any problems and suggestions, I'll try to reflect to the
CTAN release of v5.0
I'm going to make it soon, anyway.

New features in v5.0 are outlined below:

* fixed driver auto-detection.
   - add `xetex' driver option
   - ignore \pdf{h,v}origin if undefined.

* added \newgeometry{...} and \restoregeometry commands
  to change and restore geometry on any pages in the middle of the document
   - \newgeometry has the same options as geometry package, but changing
     papersize and \mag are not allowed.
   - \restoregeometry restores the page layout specified in the preamble.
   - both call \clearpage internally.

* added `layout' option. you can specify papersize for layout
different from printing.
  This would be useful when you don't have right-sized paper to print.
  For example, with "a4paper, layout=a5paper", the package goes to `a5' layout
  to calculate margins but paper size is still 'a4' paper.

* improved `showframe' output: now shown on every page.

* improved paper size presets.

* improved "geometry.cfg" loading order.

* fixed other bugs...

Hope it helps

Hideo Umeki



2009/12/4 Heiko Oberdiek <oberdiek at uni-freiburg.de>:
> On Thu, Dec 03, 2009 at 11:52:46PM +0000, Karl Berry wrote:
>
>>     just fresh taken from a user report
>>     (http://bugzilla.novell.com/show_bug.cgi?id=559257)
>>
>> Here is Jonathan's reply, if someone would like to experiment.
>>
>> Date: Thu, 3 Dec 2009 22:52:29 +0000
>> From: Jonathan Kew <jfkthame at googlemail.com>
>>
>> The best way to set page size in xetex is indeed by using
>> \pdfpage{height,width}, so the geometry.cfg file deliberately uses the
>> pdftex setup. However, it seems this won't work with non-default
>> magnification, because the driver then wants to use the \pdf*origin
>> commands as well, and those aren't supported.
>>
>> (I wasn't aware of this, obviously, but I'm surprised it hasn't come up
>> previously - unless geometry.sty has recently changed. The xetex config
>> has been this way for a long time.)
>>
>> I'm just about to leave for a week in California, and won't have a
>> chance to really think about this right away, sorry. Maybe it'd be best
>> to change geometry.cfg to use the dvipdfm driver. I'm not sure what
>> other interactions that may have, though.
>
> I had tried this, but the result is wrong:
>
> \documentclass{article}
> \usepackage[mag=1500,dvipdfm]{geometry}
> \begin{document}
> Hi
> \end{document}
>
> | This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009)
> | ...
> | *geometry detected driver: dvipdfm*
> | ...
>
> pdfinfo test.pdf:
>
> | Page size:      1376.99 x 1781.99 pts
>
> Correct (using pdflatex) is:
>
> | Page size:      918 x 1188 pts
>
>> At least there's a simple workaround, apparently.
>
> geometry should be fixed by detecting XeTeX directly.
> At least it doesn't touch \pdf(h,v)origin if they aren't defined.
> But
>  *geometry detected driver: pdftex*
> will remain confusing when running xelatex.
>
> Otherwise driver pdftex is still the best choice, but
> geometry must then be fooled about \pdfhorigin.
>
> My propos
al for geometry.cfg until geometry is fixed
> (then use \@ifpackagelater):
>
> % geometry.cfg with detection for XeLaTeX
> % 2009-12-04 v1.1 Heiko Oberdiek
> % 2006-06-07 Jonathan Kew
> % Public domain

> Yours sincerely
>  Heiko <oberdiek at uni-freiburg.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geometry.sty.zip
Type: application/zip
Size: 7965 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20100125/810495bf/attachment.zip>


More information about the tex-live mailing list