Luatex paper size
Clash 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
luatex plain-tex
add a comment |Â
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
luatex plain-tex
You want to reduce thevsize
bymaxdepth
, so descenders in the last line will appear. Also thebaselineskip
should be adjusted in order to fit an exact number of lines:vsize=dimexprpageheight-maxdepthrelax
andbaselineskip=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
add a comment |Â
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
luatex plain-tex
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
luatex plain-tex
asked 2 hours ago
wirrbel
232125
232125
You want to reduce thevsize
bymaxdepth
, so descenders in the last line will appear. Also thebaselineskip
should be adjusted in order to fit an exact number of lines:vsize=dimexprpageheight-maxdepthrelax
andbaselineskip=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
add a comment |Â
You want to reduce thevsize
bymaxdepth
, so descenders in the last line will appear. Also thebaselineskip
should be adjusted in order to fit an exact number of lines:vsize=dimexprpageheight-maxdepthrelax
andbaselineskip=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
add a comment |Â
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
Orpdfvariable horigin=0pt
andpdfvariable vorigin=0pt
â egreg
18 mins ago
@egreg yes but unless you have existing page layout macros usinghoffset
settinghoffset=-10in
orhorigin=0pt
comes to the same thing, I think.
â David Carlisle
13 mins ago
No. One can then usehoffset
andvoffset
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 usehorigin
for independent corrections if your main code is usinghoffset
or vice versa, the resulting pdf is the same whichever you set isn't it?
â David Carlisle
8 mins ago
add a comment |Â
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
andvsize
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
andpdfpageheight
are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simplypagewidth
andpageheight
.
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.
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.)
Oops, didn't notice answer was already posted while I was typing this.
â ShreevatsaR
30 mins ago
add a comment |Â
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
Orpdfvariable horigin=0pt
andpdfvariable vorigin=0pt
â egreg
18 mins ago
@egreg yes but unless you have existing page layout macros usinghoffset
settinghoffset=-10in
orhorigin=0pt
comes to the same thing, I think.
â David Carlisle
13 mins ago
No. One can then usehoffset
andvoffset
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 usehorigin
for independent corrections if your main code is usinghoffset
or vice versa, the resulting pdf is the same whichever you set isn't it?
â David Carlisle
8 mins ago
add a comment |Â
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
Orpdfvariable horigin=0pt
andpdfvariable vorigin=0pt
â egreg
18 mins ago
@egreg yes but unless you have existing page layout macros usinghoffset
settinghoffset=-10in
orhorigin=0pt
comes to the same thing, I think.
â David Carlisle
13 mins ago
No. One can then usehoffset
andvoffset
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 usehorigin
for independent corrections if your main code is usinghoffset
or vice versa, the resulting pdf is the same whichever you set isn't it?
â David Carlisle
8 mins ago
add a comment |Â
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
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
edited 29 mins ago
answered 35 mins ago
David Carlisle
473k3811011829
473k3811011829
Orpdfvariable horigin=0pt
andpdfvariable vorigin=0pt
â egreg
18 mins ago
@egreg yes but unless you have existing page layout macros usinghoffset
settinghoffset=-10in
orhorigin=0pt
comes to the same thing, I think.
â David Carlisle
13 mins ago
No. One can then usehoffset
andvoffset
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 usehorigin
for independent corrections if your main code is usinghoffset
or vice versa, the resulting pdf is the same whichever you set isn't it?
â David Carlisle
8 mins ago
add a comment |Â
Orpdfvariable horigin=0pt
andpdfvariable vorigin=0pt
â egreg
18 mins ago
@egreg yes but unless you have existing page layout macros usinghoffset
settinghoffset=-10in
orhorigin=0pt
comes to the same thing, I think.
â David Carlisle
13 mins ago
No. One can then usehoffset
andvoffset
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 usehorigin
for independent corrections if your main code is usinghoffset
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
add a comment |Â
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
andvsize
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
andpdfpageheight
are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simplypagewidth
andpageheight
.
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.
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.)
Oops, didn't notice answer was already posted while I was typing this.
â ShreevatsaR
30 mins ago
add a comment |Â
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
andvsize
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
andpdfpageheight
are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simplypagewidth
andpageheight
.
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.
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.)
Oops, didn't notice answer was already posted while I was typing this.
â ShreevatsaR
30 mins ago
add a comment |Â
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
andvsize
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
andpdfpageheight
are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simplypagewidth
andpageheight
.
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.
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.)
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
andvsize
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
andpdfpageheight
are the primitives that control the dimensions of the actual page in PDF. In LuaTeX, they are called simplypagewidth
andpageheight
.
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.
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.)
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You want to reduce the
vsize
bymaxdepth
, so descenders in the last line will appear. Also thebaselineskip
should be adjusted in order to fit an exact number of lines:vsize=dimexprpageheight-maxdepthrelax
andbaselineskip=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