a4paper, where should I declare it? In document class or geometry?
I currently have an article
document class and I previously changed it to include printing on A4 paper:
documentclass[12pt, a4paper]{article}
However, I had to change my margins to meet my university requirements and the answer I received used A4 in the geometry
package too.
geometry{a4paper,margin=15mm,bindingoffset=25mm,heightrounded,}
Partially practical and partially theoretical, is there any difference to using either declaration and/or is there an effect by using both?
best-practices paper-size geometry package-options
add a comment |
I currently have an article
document class and I previously changed it to include printing on A4 paper:
documentclass[12pt, a4paper]{article}
However, I had to change my margins to meet my university requirements and the answer I received used A4 in the geometry
package too.
geometry{a4paper,margin=15mm,bindingoffset=25mm,heightrounded,}
Partially practical and partially theoretical, is there any difference to using either declaration and/or is there an effect by using both?
best-practices paper-size geometry package-options
3
It's irrelevant: options to the class are automatically passed to all loaded packages.
– egreg
Jul 5 '12 at 15:51
@egreg: If you specify the paper size viadocumentclass
and don't usegeometry
, the paper will be of the correct size, so something changes. The question is, could these changes interfere withgeometry
in any way? (It doesn't seem like it.)
– doncherry
Jul 5 '12 at 16:30
@doncherry The class understandsa4paper
and sets the text block dimensions accordingly. If you also loadgeometry
the dimensions are changed again according togeometry
default for A4 paper, unless you use thepass
option.
– egreg
Jul 5 '12 at 16:36
add a comment |
I currently have an article
document class and I previously changed it to include printing on A4 paper:
documentclass[12pt, a4paper]{article}
However, I had to change my margins to meet my university requirements and the answer I received used A4 in the geometry
package too.
geometry{a4paper,margin=15mm,bindingoffset=25mm,heightrounded,}
Partially practical and partially theoretical, is there any difference to using either declaration and/or is there an effect by using both?
best-practices paper-size geometry package-options
I currently have an article
document class and I previously changed it to include printing on A4 paper:
documentclass[12pt, a4paper]{article}
However, I had to change my margins to meet my university requirements and the answer I received used A4 in the geometry
package too.
geometry{a4paper,margin=15mm,bindingoffset=25mm,heightrounded,}
Partially practical and partially theoretical, is there any difference to using either declaration and/or is there an effect by using both?
best-practices paper-size geometry package-options
best-practices paper-size geometry package-options
edited Jul 5 '12 at 16:31
doncherry
35.2k23136208
35.2k23136208
asked Jul 5 '12 at 15:41
Mike StumpfMike Stumpf
70931431
70931431
3
It's irrelevant: options to the class are automatically passed to all loaded packages.
– egreg
Jul 5 '12 at 15:51
@egreg: If you specify the paper size viadocumentclass
and don't usegeometry
, the paper will be of the correct size, so something changes. The question is, could these changes interfere withgeometry
in any way? (It doesn't seem like it.)
– doncherry
Jul 5 '12 at 16:30
@doncherry The class understandsa4paper
and sets the text block dimensions accordingly. If you also loadgeometry
the dimensions are changed again according togeometry
default for A4 paper, unless you use thepass
option.
– egreg
Jul 5 '12 at 16:36
add a comment |
3
It's irrelevant: options to the class are automatically passed to all loaded packages.
– egreg
Jul 5 '12 at 15:51
@egreg: If you specify the paper size viadocumentclass
and don't usegeometry
, the paper will be of the correct size, so something changes. The question is, could these changes interfere withgeometry
in any way? (It doesn't seem like it.)
– doncherry
Jul 5 '12 at 16:30
@doncherry The class understandsa4paper
and sets the text block dimensions accordingly. If you also loadgeometry
the dimensions are changed again according togeometry
default for A4 paper, unless you use thepass
option.
– egreg
Jul 5 '12 at 16:36
3
3
It's irrelevant: options to the class are automatically passed to all loaded packages.
– egreg
Jul 5 '12 at 15:51
It's irrelevant: options to the class are automatically passed to all loaded packages.
– egreg
Jul 5 '12 at 15:51
@egreg: If you specify the paper size via
documentclass
and don't use geometry
, the paper will be of the correct size, so something changes. The question is, could these changes interfere with geometry
in any way? (It doesn't seem like it.)– doncherry
Jul 5 '12 at 16:30
@egreg: If you specify the paper size via
documentclass
and don't use geometry
, the paper will be of the correct size, so something changes. The question is, could these changes interfere with geometry
in any way? (It doesn't seem like it.)– doncherry
Jul 5 '12 at 16:30
@doncherry The class understands
a4paper
and sets the text block dimensions accordingly. If you also load geometry
the dimensions are changed again according to geometry
default for A4 paper, unless you use the pass
option.– egreg
Jul 5 '12 at 16:36
@doncherry The class understands
a4paper
and sets the text block dimensions accordingly. If you also load geometry
the dimensions are changed again according to geometry
default for A4 paper, unless you use the pass
option.– egreg
Jul 5 '12 at 16:36
add a comment |
3 Answers
3
active
oldest
votes
a4paper
specified in document class will be passed to geometry
. So there is no difference in your case if you specify the option in documentclass{article}
or usepackage{geometry}
.
However if other packages need to know document format, you need to specify a4paper
in the document class.
Looking at the source for the article class, how is the paper size being passed to geometry? I only see thatpaperheight
andpaperwidth
are being directly set.
– Tyler Crompton
Oct 8 '15 at 3:18
@kissmyarmpit! LaTeX Error: File
a4paper.sty' not found.`
– alhelal
Jan 10 '18 at 3:32
1
Passing the option todocumentclass
gives any package a chance to react to the option; on the other hand, passing it tousepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...
– frougon
Dec 22 '18 at 10:22
add a comment |
I'm not sure about the changes, but I think the standard way is the following:
documentclass[12pt]{article}
usepackage[a4paper]{geometry}
...
You can specify the margins further. The simplest way is writing
usepackage[a4paper, margin=2cm]{geometry}
no, adda4paper
to theclass options
, it only passed on togeometry
then any later package that might also react toa4paper
would never see it.
– daleif
Jul 5 '12 at 16:08
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
2
typedocumentclass[12pt,a4paper]{...}
not justusepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
|
show 3 more comments
There might be a difference if you load some other packages that could use ...paper
options. It is naturally global option of your manuscript so I think it is better declared global, similarly to the language options discussed here: https://tex.stackexchange.com/a/60298/11002
So I think that ...paper
should be put as a global option of documentclass
.
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f62311%2fa4paper-where-should-i-declare-it-in-document-class-or-geometry%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
a4paper
specified in document class will be passed to geometry
. So there is no difference in your case if you specify the option in documentclass{article}
or usepackage{geometry}
.
However if other packages need to know document format, you need to specify a4paper
in the document class.
Looking at the source for the article class, how is the paper size being passed to geometry? I only see thatpaperheight
andpaperwidth
are being directly set.
– Tyler Crompton
Oct 8 '15 at 3:18
@kissmyarmpit! LaTeX Error: File
a4paper.sty' not found.`
– alhelal
Jan 10 '18 at 3:32
1
Passing the option todocumentclass
gives any package a chance to react to the option; on the other hand, passing it tousepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...
– frougon
Dec 22 '18 at 10:22
add a comment |
a4paper
specified in document class will be passed to geometry
. So there is no difference in your case if you specify the option in documentclass{article}
or usepackage{geometry}
.
However if other packages need to know document format, you need to specify a4paper
in the document class.
Looking at the source for the article class, how is the paper size being passed to geometry? I only see thatpaperheight
andpaperwidth
are being directly set.
– Tyler Crompton
Oct 8 '15 at 3:18
@kissmyarmpit! LaTeX Error: File
a4paper.sty' not found.`
– alhelal
Jan 10 '18 at 3:32
1
Passing the option todocumentclass
gives any package a chance to react to the option; on the other hand, passing it tousepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...
– frougon
Dec 22 '18 at 10:22
add a comment |
a4paper
specified in document class will be passed to geometry
. So there is no difference in your case if you specify the option in documentclass{article}
or usepackage{geometry}
.
However if other packages need to know document format, you need to specify a4paper
in the document class.
a4paper
specified in document class will be passed to geometry
. So there is no difference in your case if you specify the option in documentclass{article}
or usepackage{geometry}
.
However if other packages need to know document format, you need to specify a4paper
in the document class.
edited Mar 13 at 20:50
Paradox
1056
1056
answered Jul 5 '12 at 15:50
kiss my armpitkiss my armpit
13.2k20174407
13.2k20174407
Looking at the source for the article class, how is the paper size being passed to geometry? I only see thatpaperheight
andpaperwidth
are being directly set.
– Tyler Crompton
Oct 8 '15 at 3:18
@kissmyarmpit! LaTeX Error: File
a4paper.sty' not found.`
– alhelal
Jan 10 '18 at 3:32
1
Passing the option todocumentclass
gives any package a chance to react to the option; on the other hand, passing it tousepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...
– frougon
Dec 22 '18 at 10:22
add a comment |
Looking at the source for the article class, how is the paper size being passed to geometry? I only see thatpaperheight
andpaperwidth
are being directly set.
– Tyler Crompton
Oct 8 '15 at 3:18
@kissmyarmpit! LaTeX Error: File
a4paper.sty' not found.`
– alhelal
Jan 10 '18 at 3:32
1
Passing the option todocumentclass
gives any package a chance to react to the option; on the other hand, passing it tousepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...
– frougon
Dec 22 '18 at 10:22
Looking at the source for the article class, how is the paper size being passed to geometry? I only see that
paperheight
and paperwidth
are being directly set.– Tyler Crompton
Oct 8 '15 at 3:18
Looking at the source for the article class, how is the paper size being passed to geometry? I only see that
paperheight
and paperwidth
are being directly set.– Tyler Crompton
Oct 8 '15 at 3:18
@kissmyarmpit
! LaTeX Error: File
a4paper.sty' not found.`– alhelal
Jan 10 '18 at 3:32
@kissmyarmpit
! LaTeX Error: File
a4paper.sty' not found.`– alhelal
Jan 10 '18 at 3:32
1
1
Passing the option to
documentclass
gives any package a chance to react to the option; on the other hand, passing it to usepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...– frougon
Dec 22 '18 at 10:22
Passing the option to
documentclass
gives any package a chance to react to the option; on the other hand, passing it to usepackage{geometry}
doesn't, thus I wouldn't say there is no difference. It depends on what other packages do with the paper size. Nothing in most cases, but who knows...– frougon
Dec 22 '18 at 10:22
add a comment |
I'm not sure about the changes, but I think the standard way is the following:
documentclass[12pt]{article}
usepackage[a4paper]{geometry}
...
You can specify the margins further. The simplest way is writing
usepackage[a4paper, margin=2cm]{geometry}
no, adda4paper
to theclass options
, it only passed on togeometry
then any later package that might also react toa4paper
would never see it.
– daleif
Jul 5 '12 at 16:08
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
2
typedocumentclass[12pt,a4paper]{...}
not justusepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
|
show 3 more comments
I'm not sure about the changes, but I think the standard way is the following:
documentclass[12pt]{article}
usepackage[a4paper]{geometry}
...
You can specify the margins further. The simplest way is writing
usepackage[a4paper, margin=2cm]{geometry}
no, adda4paper
to theclass options
, it only passed on togeometry
then any later package that might also react toa4paper
would never see it.
– daleif
Jul 5 '12 at 16:08
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
2
typedocumentclass[12pt,a4paper]{...}
not justusepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
|
show 3 more comments
I'm not sure about the changes, but I think the standard way is the following:
documentclass[12pt]{article}
usepackage[a4paper]{geometry}
...
You can specify the margins further. The simplest way is writing
usepackage[a4paper, margin=2cm]{geometry}
I'm not sure about the changes, but I think the standard way is the following:
documentclass[12pt]{article}
usepackage[a4paper]{geometry}
...
You can specify the margins further. The simplest way is writing
usepackage[a4paper, margin=2cm]{geometry}
answered Jul 5 '12 at 15:49
AlenannoAlenanno
28.7k557111
28.7k557111
no, adda4paper
to theclass options
, it only passed on togeometry
then any later package that might also react toa4paper
would never see it.
– daleif
Jul 5 '12 at 16:08
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
2
typedocumentclass[12pt,a4paper]{...}
not justusepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
|
show 3 more comments
no, adda4paper
to theclass options
, it only passed on togeometry
then any later package that might also react toa4paper
would never see it.
– daleif
Jul 5 '12 at 16:08
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
2
typedocumentclass[12pt,a4paper]{...}
not justusepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
no, add
a4paper
to the class options
, it only passed on to geometry
then any later package that might also react to a4paper
would never see it.– daleif
Jul 5 '12 at 16:08
no, add
a4paper
to the class options
, it only passed on to geometry
then any later package that might also react to a4paper
would never see it.– daleif
Jul 5 '12 at 16:08
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
@daleif I don't understand your comment sorry...
– Alenanno
Jul 5 '12 at 21:42
2
2
type
documentclass[12pt,a4paper]{...}
not just usepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
type
documentclass[12pt,a4paper]{...}
not just usepackage[a4paper]{geometry}
– daleif
Jul 7 '12 at 10:02
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif I just realized but if that's true, how is this different from the accepted answer?
– Alenanno
Apr 23 '15 at 15:48
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
@daleif No answer? :P
– Alenanno
May 4 '17 at 10:18
|
show 3 more comments
There might be a difference if you load some other packages that could use ...paper
options. It is naturally global option of your manuscript so I think it is better declared global, similarly to the language options discussed here: https://tex.stackexchange.com/a/60298/11002
So I think that ...paper
should be put as a global option of documentclass
.
add a comment |
There might be a difference if you load some other packages that could use ...paper
options. It is naturally global option of your manuscript so I think it is better declared global, similarly to the language options discussed here: https://tex.stackexchange.com/a/60298/11002
So I think that ...paper
should be put as a global option of documentclass
.
add a comment |
There might be a difference if you load some other packages that could use ...paper
options. It is naturally global option of your manuscript so I think it is better declared global, similarly to the language options discussed here: https://tex.stackexchange.com/a/60298/11002
So I think that ...paper
should be put as a global option of documentclass
.
There might be a difference if you load some other packages that could use ...paper
options. It is naturally global option of your manuscript so I think it is better declared global, similarly to the language options discussed here: https://tex.stackexchange.com/a/60298/11002
So I think that ...paper
should be put as a global option of documentclass
.
edited Apr 13 '17 at 12:35
Community♦
1
1
answered Jul 5 '12 at 16:30
yo'yo'
39.7k8124233
39.7k8124233
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f62311%2fa4paper-where-should-i-declare-it-in-document-class-or-geometry%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
It's irrelevant: options to the class are automatically passed to all loaded packages.
– egreg
Jul 5 '12 at 15:51
@egreg: If you specify the paper size via
documentclass
and don't usegeometry
, the paper will be of the correct size, so something changes. The question is, could these changes interfere withgeometry
in any way? (It doesn't seem like it.)– doncherry
Jul 5 '12 at 16:30
@doncherry The class understands
a4paper
and sets the text block dimensions accordingly. If you also loadgeometry
the dimensions are changed again according togeometry
default for A4 paper, unless you use thepass
option.– egreg
Jul 5 '12 at 16:36