Luatex paper size

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am looking into plain luatex (no latex). The following definitions change the size of the paper, but don't change the physical paper size. What am I missing



newdimenpagewidth
newdimenpageheight
pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
defsetpagehsizepagewidthvsizepageheight
setpage

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end









share|improve this question





















  • You want to reduce the vsize by maxdepth, so descenders in the last line will appear. Also the baselineskip should be adjusted in order to fit an exact number of lines: vsize=dimexprpageheight-maxdepthrelax and baselineskip=dimexpr(vsize-topskip)/21relax will fit 22 lines on a baselineskip of 12.06661pt.
    – egreg
    7 mins ago











  • @egreg yes setting sensible margins was second level comment, but I decided to just stick to page size..
    – David Carlisle
    5 mins ago














up vote
1
down vote

favorite












I am looking into plain luatex (no latex). The following definitions change the size of the paper, but don't change the physical paper size. What am I missing



newdimenpagewidth
newdimenpageheight
pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
defsetpagehsizepagewidthvsizepageheight
setpage

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end









share|improve this question





















  • You want to reduce the vsize by maxdepth, so descenders in the last line will appear. Also the baselineskip should be adjusted in order to fit an exact number of lines: vsize=dimexprpageheight-maxdepthrelax and baselineskip=dimexpr(vsize-topskip)/21relax will fit 22 lines on a baselineskip of 12.06661pt.
    – egreg
    7 mins ago











  • @egreg yes setting sensible margins was second level comment, but I decided to just stick to page size..
    – David Carlisle
    5 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am looking into plain luatex (no latex). The following definitions change the size of the paper, but don't change the physical paper size. What am I missing



newdimenpagewidth
newdimenpageheight
pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
defsetpagehsizepagewidthvsizepageheight
setpage

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end









share|improve this question













I am looking into plain luatex (no latex). The following definitions change the size of the paper, but don't change the physical paper size. What am I missing



newdimenpagewidth
newdimenpageheight
pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
defsetpagehsizepagewidthvsizepageheight
setpage

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end






luatex plain-tex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









wirrbel

232125




232125











  • You want to reduce the vsize by maxdepth, so descenders in the last line will appear. Also the baselineskip should be adjusted in order to fit an exact number of lines: vsize=dimexprpageheight-maxdepthrelax and baselineskip=dimexpr(vsize-topskip)/21relax will fit 22 lines on a baselineskip of 12.06661pt.
    – egreg
    7 mins ago











  • @egreg yes setting sensible margins was second level comment, but I decided to just stick to page size..
    – David Carlisle
    5 mins ago
















  • You want to reduce the vsize by maxdepth, so descenders in the last line will appear. Also the baselineskip should be adjusted in order to fit an exact number of lines: vsize=dimexprpageheight-maxdepthrelax and baselineskip=dimexpr(vsize-topskip)/21relax will fit 22 lines on a baselineskip of 12.06661pt.
    – egreg
    7 mins ago











  • @egreg yes setting sensible margins was second level comment, but I decided to just stick to page size..
    – David Carlisle
    5 mins ago















You want to reduce the vsize by maxdepth, so descenders in the last line will appear. Also the baselineskip should be adjusted in order to fit an exact number of lines: vsize=dimexprpageheight-maxdepthrelax and baselineskip=dimexpr(vsize-topskip)/21relax will fit 22 lines on a baselineskip of 12.06661pt.
– egreg
7 mins ago





You want to reduce the vsize by maxdepth, so descenders in the last line will appear. Also the baselineskip should be adjusted in order to fit an exact number of lines: vsize=dimexprpageheight-maxdepthrelax and baselineskip=dimexpr(vsize-topskip)/21relax will fit 22 lines on a baselineskip of 12.06661pt.
– egreg
7 mins ago













@egreg yes setting sensible margins was second level comment, but I decided to just stick to page size..
– David Carlisle
5 mins ago




@egreg yes setting sensible margins was second level comment, but I decided to just stick to page size..
– David Carlisle
5 mins ago










2 Answers
2






active

oldest

votes

















up vote
3
down vote













you need to remove



newdimenpagewidth
newdimenpageheight


as they mask the primitives which if set will affect the size of the media box in the pdf. Also take account of the default 1in origin (currently you have hsize equal to pagewidth but offset by 1in.)



pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
hoffset=-1in
voffset=-1in
defsetpagehsizepagewidthvsizepageheight
setpage


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject


enter image description here






share|improve this answer






















  • Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
    – egreg
    18 mins ago










  • @egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
    – David Carlisle
    13 mins ago










  • No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
    – egreg
    10 mins ago










  • @egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
    – David Carlisle
    8 mins ago

















up vote
2
down vote













Short answer: remove your top two lines that declare pagewidth and pageheight, because those are actually the LuaTeX dimensions that you want to control.




In more detail:



  • hsize and vsize are (roughly speaking) the dimensions within which TeX tries to typeset the content. In plain (Knuth) TeX, which produces only DVI, there is no further notion of physical paper size. But by default when printed the contents will appear at an offset of (1 inch + hoffset) from the left edge of the paper, and (1 inch + voffset) from the top edge.


  • In pdfTeX (and XeTeX), pdfpagewidth and pdfpageheight are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simply pagewidth and pageheight.


When you use newdimenpagewidth you're clobbering the primitive so that it's no longer usable. So simply remove the top two lines in your question. Also, to account for the 1-inch margins, you should either make hoffset and voffset negative, or make the paper size bigger.



output



pagewidth=5.5in % the width of each page
pageheight=5.7in % the height of each page
hsize=dimexpr (pagewidth - 2in) relax
vsize=dimexpr (pageheight - 2in) relax

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end


(Also: using eject without vfill causes underfull vbox warnings.)






share|improve this answer




















  • Oops, didn't notice answer was already posted while I was typing this.
    – ShreevatsaR
    30 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456283%2fluatex-paper-size%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













you need to remove



newdimenpagewidth
newdimenpageheight


as they mask the primitives which if set will affect the size of the media box in the pdf. Also take account of the default 1in origin (currently you have hsize equal to pagewidth but offset by 1in.)



pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
hoffset=-1in
voffset=-1in
defsetpagehsizepagewidthvsizepageheight
setpage


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject


enter image description here






share|improve this answer






















  • Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
    – egreg
    18 mins ago










  • @egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
    – David Carlisle
    13 mins ago










  • No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
    – egreg
    10 mins ago










  • @egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
    – David Carlisle
    8 mins ago














up vote
3
down vote













you need to remove



newdimenpagewidth
newdimenpageheight


as they mask the primitives which if set will affect the size of the media box in the pdf. Also take account of the default 1in origin (currently you have hsize equal to pagewidth but offset by 1in.)



pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
hoffset=-1in
voffset=-1in
defsetpagehsizepagewidthvsizepageheight
setpage


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject


enter image description here






share|improve this answer






















  • Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
    – egreg
    18 mins ago










  • @egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
    – David Carlisle
    13 mins ago










  • No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
    – egreg
    10 mins ago










  • @egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
    – David Carlisle
    8 mins ago












up vote
3
down vote










up vote
3
down vote









you need to remove



newdimenpagewidth
newdimenpageheight


as they mask the primitives which if set will affect the size of the media box in the pdf. Also take account of the default 1in origin (currently you have hsize equal to pagewidth but offset by 1in.)



pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
hoffset=-1in
voffset=-1in
defsetpagehsizepagewidthvsizepageheight
setpage


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject


enter image description here






share|improve this answer














you need to remove



newdimenpagewidth
newdimenpageheight


as they mask the primitives which if set will affect the size of the media box in the pdf. Also take account of the default 1in origin (currently you have hsize equal to pagewidth but offset by 1in.)



pagewidth=3.5in % the width of each page
pageheight=3.7in % the height of each page
hoffset=-1in
voffset=-1in
defsetpagehsizepagewidthvsizepageheight
setpage


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 29 mins ago

























answered 35 mins ago









David Carlisle

473k3811011829




473k3811011829











  • Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
    – egreg
    18 mins ago










  • @egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
    – David Carlisle
    13 mins ago










  • No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
    – egreg
    10 mins ago










  • @egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
    – David Carlisle
    8 mins ago
















  • Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
    – egreg
    18 mins ago










  • @egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
    – David Carlisle
    13 mins ago










  • No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
    – egreg
    10 mins ago










  • @egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
    – David Carlisle
    8 mins ago















Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
– egreg
18 mins ago




Or pdfvariable horigin=0pt and pdfvariable vorigin=0pt
– egreg
18 mins ago












@egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
– David Carlisle
13 mins ago




@egreg yes but unless you have existing page layout macros using hoffset setting hoffset=-10in or horigin=0pt comes to the same thing, I think.
– David Carlisle
13 mins ago












No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
– egreg
10 mins ago




No. One can then use hoffset and voffset for independent corrections if the printer driver has personal ideas.
– egreg
10 mins ago












@egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
– David Carlisle
8 mins ago




@egreg shrug, if you are using plain and no other macros are in use, you could use horigin for independent corrections if your main code is using hoffset or vice versa, the resulting pdf is the same whichever you set isn't it?
– David Carlisle
8 mins ago










up vote
2
down vote













Short answer: remove your top two lines that declare pagewidth and pageheight, because those are actually the LuaTeX dimensions that you want to control.




In more detail:



  • hsize and vsize are (roughly speaking) the dimensions within which TeX tries to typeset the content. In plain (Knuth) TeX, which produces only DVI, there is no further notion of physical paper size. But by default when printed the contents will appear at an offset of (1 inch + hoffset) from the left edge of the paper, and (1 inch + voffset) from the top edge.


  • In pdfTeX (and XeTeX), pdfpagewidth and pdfpageheight are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simply pagewidth and pageheight.


When you use newdimenpagewidth you're clobbering the primitive so that it's no longer usable. So simply remove the top two lines in your question. Also, to account for the 1-inch margins, you should either make hoffset and voffset negative, or make the paper size bigger.



output



pagewidth=5.5in % the width of each page
pageheight=5.7in % the height of each page
hsize=dimexpr (pagewidth - 2in) relax
vsize=dimexpr (pageheight - 2in) relax

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end


(Also: using eject without vfill causes underfull vbox warnings.)






share|improve this answer




















  • Oops, didn't notice answer was already posted while I was typing this.
    – ShreevatsaR
    30 mins ago














up vote
2
down vote













Short answer: remove your top two lines that declare pagewidth and pageheight, because those are actually the LuaTeX dimensions that you want to control.




In more detail:



  • hsize and vsize are (roughly speaking) the dimensions within which TeX tries to typeset the content. In plain (Knuth) TeX, which produces only DVI, there is no further notion of physical paper size. But by default when printed the contents will appear at an offset of (1 inch + hoffset) from the left edge of the paper, and (1 inch + voffset) from the top edge.


  • In pdfTeX (and XeTeX), pdfpagewidth and pdfpageheight are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simply pagewidth and pageheight.


When you use newdimenpagewidth you're clobbering the primitive so that it's no longer usable. So simply remove the top two lines in your question. Also, to account for the 1-inch margins, you should either make hoffset and voffset negative, or make the paper size bigger.



output



pagewidth=5.5in % the width of each page
pageheight=5.7in % the height of each page
hsize=dimexpr (pagewidth - 2in) relax
vsize=dimexpr (pageheight - 2in) relax

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end


(Also: using eject without vfill causes underfull vbox warnings.)






share|improve this answer




















  • Oops, didn't notice answer was already posted while I was typing this.
    – ShreevatsaR
    30 mins ago












up vote
2
down vote










up vote
2
down vote









Short answer: remove your top two lines that declare pagewidth and pageheight, because those are actually the LuaTeX dimensions that you want to control.




In more detail:



  • hsize and vsize are (roughly speaking) the dimensions within which TeX tries to typeset the content. In plain (Knuth) TeX, which produces only DVI, there is no further notion of physical paper size. But by default when printed the contents will appear at an offset of (1 inch + hoffset) from the left edge of the paper, and (1 inch + voffset) from the top edge.


  • In pdfTeX (and XeTeX), pdfpagewidth and pdfpageheight are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simply pagewidth and pageheight.


When you use newdimenpagewidth you're clobbering the primitive so that it's no longer usable. So simply remove the top two lines in your question. Also, to account for the 1-inch margins, you should either make hoffset and voffset negative, or make the paper size bigger.



output



pagewidth=5.5in % the width of each page
pageheight=5.7in % the height of each page
hsize=dimexpr (pagewidth - 2in) relax
vsize=dimexpr (pageheight - 2in) relax

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end


(Also: using eject without vfill causes underfull vbox warnings.)






share|improve this answer












Short answer: remove your top two lines that declare pagewidth and pageheight, because those are actually the LuaTeX dimensions that you want to control.




In more detail:



  • hsize and vsize are (roughly speaking) the dimensions within which TeX tries to typeset the content. In plain (Knuth) TeX, which produces only DVI, there is no further notion of physical paper size. But by default when printed the contents will appear at an offset of (1 inch + hoffset) from the left edge of the paper, and (1 inch + voffset) from the top edge.


  • In pdfTeX (and XeTeX), pdfpagewidth and pdfpageheight are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simply pagewidth and pageheight.


When you use newdimenpagewidth you're clobbering the primitive so that it's no longer usable. So simply remove the top two lines in your question. Also, to account for the 1-inch margins, you should either make hoffset and voffset negative, or make the paper size bigger.



output



pagewidth=5.5in % the width of each page
pageheight=5.7in % the height of each page
hsize=dimexpr (pagewidth - 2in) relax
vsize=dimexpr (pageheight - 2in) relax

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject




Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
eject
end


(Also: using eject without vfill causes underfull vbox warnings.)







share|improve this answer












share|improve this answer



share|improve this answer










answered 30 mins ago









ShreevatsaR

26.6k87195




26.6k87195











  • Oops, didn't notice answer was already posted while I was typing this.
    – ShreevatsaR
    30 mins ago
















  • Oops, didn't notice answer was already posted while I was typing this.
    – ShreevatsaR
    30 mins ago















Oops, didn't notice answer was already posted while I was typing this.
– ShreevatsaR
30 mins ago




Oops, didn't notice answer was already posted while I was typing this.
– ShreevatsaR
30 mins ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456283%2fluatex-paper-size%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

Confectionery