I want to create a presentation using XeTeX but I am having trouble with the page layout. The expected result show be a pdf with a 4:3 aspect ratio, centered content and margin of 1/8th of the total width/height (just eyeballed that).
Here is the code I tried to write:
\pdfpagewidth=12 true cm
\hsize=\pdfpagewidth
\multiply\hsize by 7
\divide\hsize by 8
\advance\hoffset by -1 true in
\hoffset=\pdfpagewidth
\advance\hoffset by -\hsize
\divide\hoffset by 2
\pdfpageheight=\pdfpagewidth
\multiply\pdfpageheight by 3
\divide\pdfpageheight by 4
\vsize=\pdfpageheight
\multiply\vsize by 7
\divide\vsize by 8
\advance\voffset by -1 true in
\voffset=\pdfpageheight
\advance\voffset by -\vsize
\divide\voffset by 2
\headline={}
It is very verbose, but I am not aware of a simpler way to do that.
\input macros
\noindent TL\hfil TR
\vfill
\noindent BL\hfil BR
\bye
but the output is not centered in the page.