[XeTeX] XeTeX, XeTeXpicfile, and counter-intuitive behaviour

Philip TAYLOR P.Taylor at Rhul.Ac.Uk
Thu Dec 1 19:27:07 CET 2011



Heiko Oberdiek wrote:

> Make a minimal example that shows the problem.

All cropmarks removed (which makes it less easy
to see that the positioning is otherwise correct).

In the absence of the \XeTeXpdffile, the text is
correctly positioned on both pages; in the presence
of the \XeTeXpdffile, the text of page one is
shifted to the right; with the \XeTeXpdffile
protected by braces, no change; with the \XeTeXpdffile
protected by \centerline {}, all is well.

TAR-2.pdf accessible from the web at :

	http://tex-consultants.org.uk/Resources/Graphics/TAR-2.pdf

Minimal source follows.

Philip Taylor
--------
% !TeX Program=XeTeX

\def \onehalf {0.5}
\def \twothirds {0.666666}

\newdimen \innermargin
\newdimen \outermargin
\newdimen \uppermargin
\newdimen \lowermargin
\newdimen \cropwidth
\newdimen \cropheight
\newdimen \Knuthoffset

\pdfpagewidth = 210 mm
\pdfpageheight = 297mm

\cropwidth = \twothirds \pdfpagewidth
\cropheight = \pdfpageheight

\innermargin = 2 pc
\outermargin = 2 pc
\uppermargin = 4 pc
\lowermargin = 3 pc
\Knuthoffset = 1 in

\hoffset = \pdfpagewidth
\advance \hoffset by -\cropwidth
\hoffset = \onehalf \hoffset
\advance \hoffset by \innermargin
\advance \hoffset by -\Knuthoffset

\voffset = \pdfpageheight
\advance \voffset by -\cropheight
\voffset = \onehalf \voffset
\advance \voffset by \uppermargin
\advance \voffset by -\Knuthoffset

\hsize = \cropwidth
\advance \hsize by -\innermargin
\advance \hsize by -\outermargin

\vsize = \cropheight
\advance \vsize by -\uppermargin
\advance \vsize by -\lowermargin

\parindent = 0 pc
\parskip = 2 ex

\XeTeXpdffile Resources/Images/TAR-2.pdf width \hsize \relax

	Thai and Anh Nguyễn welcome customers old and new to their recent\-ly-opened restaurant in London's famous Chapel Market.
	In addition to the old lunch-time favourites as served in their takeaway next door, Thai, Anh and their newly-appointed
	{Chef de cuisine} have created a vastly enhanced menu that includes  examples of the very best cuisines
	of Vietnam, China, Thailand, and Malaysia — indeed, from the whole of South-East Asia.  Dishes marked with an asterisk
	(“*”) are old favourites from their takeaway lunchtime service, those marked with a “V” are suitable for vegetarians,
	and the “signature” dishes are the particular specialities of the proprietors and the Chef.  If there is any dish that you
	would like which is not on the menu, or if you would like a particular dish to be hotter or milder than normally served,
	please ask your waiter and if it is possible with\-in the time available, we will be very happy to prepare it for you.

	Alcohol : at the moment, we do not hold a licence for the consumption of alco\-holic liquor on or off the premises.
	Until a licence is obtained, customers are welcome to bring their own alcoholic beverages, for
	which we are happy to provide glasses : no corkage is charged.  Please drink responsibly\nobreak !

	Service charge, VAT, etc : Please note that we do not add any service charge to your bill, regardless
	of the size of the party, and that it is entirely at your discretion whether or not you choose to leave a tip.
	If you do, please be assured that all tips go to the staff and are not “creamed off” by the proprietors as
	in so many establishments.  VAT (currently 20\%) is included  in the prices shown in the menu,
	so the “price you see is the price you pay”.

\vfill \eject

	Thai and Anh Nguyễn welcome customers old and new to their recent\-ly-opened restaurant in London's famous Chapel Market.
	In addition to the old lunch-time favourites as served in their takeaway next door, Thai, Anh and their newly-appointed
	{Chef de cuisine} have created a vastly enhanced menu that includes  examples of the very best cuisines
	of Vietnam, China, Thailand, and Malaysia — indeed, from the whole of South-East Asia.  Dishes marked with an asterisk
	(“*”) are old favourites from their takeaway lunchtime service, those marked with a “V” are suitable for vegetarians,
	and the “signature” dishes are the particular specialities of the proprietors and the Chef.  If there is any dish that you
	would like which is not on the menu, or if you would like a particular dish to be hotter or milder than normally served,
	please ask your waiter and if it is possible with\-in the time available, we will be very happy to prepare it for you.

	Alcohol : at the moment, we do not hold a licence for the consumption of alco\-holic liquor on or off the premises.
	Until a licence is obtained, customers are welcome to bring their own alcoholic beverages, for
	which we are happy to provide glasses : no corkage is charged.  Please drink responsibly\nobreak !

	Service charge, VAT, etc : Please note that we do not add any service charge to your bill, regardless
	of the size of the party, and that it is entirely at your discretion whether or not you choose to leave a tip.
	If you do, please be assured that all tips go to the staff and are not “creamed off” by the proprietors as
	in so many establishments.  VAT (currently 20\%) is included  in the prices shown in the menu,
	so the “price you see is the price you pay”.

\end


More information about the XeTeX mailing list