newgeometry is not remembered when writing a new page
I'm using the package geometry
to customize my document. I specify the geometry I want using newgeometry
after a title that I will make later.
If I do that using the code below, the first page is ok, but after executing newpage
the document seems to forget the geometry I want to use for the whole document, and then this new page is not centered with respect to the first page anymore.
Is there a way to use my defined geometry with newgeometry
in the page right after newpage
?
documentclass{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[a4paper]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
newgeometry{
a4paper,
centering,
layoutwidth=20cm,
layouthoffset = -1cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm
}
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
a
end{document}
header-footer margins geometry
add a comment |
I'm using the package geometry
to customize my document. I specify the geometry I want using newgeometry
after a title that I will make later.
If I do that using the code below, the first page is ok, but after executing newpage
the document seems to forget the geometry I want to use for the whole document, and then this new page is not centered with respect to the first page anymore.
Is there a way to use my defined geometry with newgeometry
in the page right after newpage
?
documentclass{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[a4paper]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
newgeometry{
a4paper,
centering,
layoutwidth=20cm,
layouthoffset = -1cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm
}
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
a
end{document}
header-footer margins geometry
Do you want to usedocumentclass[oneside]{book}
? Book documentclass is twoside by default and may be this is what you suppose is the problem. But if you imagine the book printed then the left pages has to leave a space for notes (etc) on their left ant the right pages on their right. Is this the part you didn't realized?
– koleygr
Jan 19 at 19:49
@koleygr Well, that did the trick! I will use a oneside book. But maybe is a way to fix that for the two-sided book, because in the left page there is almost no margin.
– Martín
Jan 19 at 20:37
add a comment |
I'm using the package geometry
to customize my document. I specify the geometry I want using newgeometry
after a title that I will make later.
If I do that using the code below, the first page is ok, but after executing newpage
the document seems to forget the geometry I want to use for the whole document, and then this new page is not centered with respect to the first page anymore.
Is there a way to use my defined geometry with newgeometry
in the page right after newpage
?
documentclass{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[a4paper]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
newgeometry{
a4paper,
centering,
layoutwidth=20cm,
layouthoffset = -1cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm
}
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
a
end{document}
header-footer margins geometry
I'm using the package geometry
to customize my document. I specify the geometry I want using newgeometry
after a title that I will make later.
If I do that using the code below, the first page is ok, but after executing newpage
the document seems to forget the geometry I want to use for the whole document, and then this new page is not centered with respect to the first page anymore.
Is there a way to use my defined geometry with newgeometry
in the page right after newpage
?
documentclass{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[a4paper]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
newgeometry{
a4paper,
centering,
layoutwidth=20cm,
layouthoffset = -1cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm
}
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
a
end{document}
header-footer margins geometry
header-footer margins geometry
edited Jan 19 at 19:31
Martín
asked Jan 19 at 19:09
MartínMartín
665
665
Do you want to usedocumentclass[oneside]{book}
? Book documentclass is twoside by default and may be this is what you suppose is the problem. But if you imagine the book printed then the left pages has to leave a space for notes (etc) on their left ant the right pages on their right. Is this the part you didn't realized?
– koleygr
Jan 19 at 19:49
@koleygr Well, that did the trick! I will use a oneside book. But maybe is a way to fix that for the two-sided book, because in the left page there is almost no margin.
– Martín
Jan 19 at 20:37
add a comment |
Do you want to usedocumentclass[oneside]{book}
? Book documentclass is twoside by default and may be this is what you suppose is the problem. But if you imagine the book printed then the left pages has to leave a space for notes (etc) on their left ant the right pages on their right. Is this the part you didn't realized?
– koleygr
Jan 19 at 19:49
@koleygr Well, that did the trick! I will use a oneside book. But maybe is a way to fix that for the two-sided book, because in the left page there is almost no margin.
– Martín
Jan 19 at 20:37
Do you want to use
documentclass[oneside]{book}
? Book documentclass is twoside by default and may be this is what you suppose is the problem. But if you imagine the book printed then the left pages has to leave a space for notes (etc) on their left ant the right pages on their right. Is this the part you didn't realized?– koleygr
Jan 19 at 19:49
Do you want to use
documentclass[oneside]{book}
? Book documentclass is twoside by default and may be this is what you suppose is the problem. But if you imagine the book printed then the left pages has to leave a space for notes (etc) on their left ant the right pages on their right. Is this the part you didn't realized?– koleygr
Jan 19 at 19:49
@koleygr Well, that did the trick! I will use a oneside book. But maybe is a way to fix that for the two-sided book, because in the left page there is almost no margin.
– Martín
Jan 19 at 20:37
@koleygr Well, that did the trick! I will use a oneside book. But maybe is a way to fix that for the two-sided book, because in the left page there is almost no margin.
– Martín
Jan 19 at 20:37
add a comment |
1 Answer
1
active
oldest
votes
If you are going to use the same geometry for the whole document, you don't need to call newgeometry
command in the biggining of the document but call usepackage
command of geometry
with the options you wish to have.
Also, as mentioned in the comment, you need oneside
documentclass.
So, Something like this could work for you (adjust the numbers to fit your needs):
documentclass[a4paper,oneside]{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[centering,
layoutwidth=20cm,
layouthoffset = -0.5cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
noindent a
end{document}
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%2f470917%2fnewgeometry-is-not-remembered-when-writing-a-new-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you are going to use the same geometry for the whole document, you don't need to call newgeometry
command in the biggining of the document but call usepackage
command of geometry
with the options you wish to have.
Also, as mentioned in the comment, you need oneside
documentclass.
So, Something like this could work for you (adjust the numbers to fit your needs):
documentclass[a4paper,oneside]{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[centering,
layoutwidth=20cm,
layouthoffset = -0.5cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
noindent a
end{document}
add a comment |
If you are going to use the same geometry for the whole document, you don't need to call newgeometry
command in the biggining of the document but call usepackage
command of geometry
with the options you wish to have.
Also, as mentioned in the comment, you need oneside
documentclass.
So, Something like this could work for you (adjust the numbers to fit your needs):
documentclass[a4paper,oneside]{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[centering,
layoutwidth=20cm,
layouthoffset = -0.5cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
noindent a
end{document}
add a comment |
If you are going to use the same geometry for the whole document, you don't need to call newgeometry
command in the biggining of the document but call usepackage
command of geometry
with the options you wish to have.
Also, as mentioned in the comment, you need oneside
documentclass.
So, Something like this could work for you (adjust the numbers to fit your needs):
documentclass[a4paper,oneside]{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[centering,
layoutwidth=20cm,
layouthoffset = -0.5cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
noindent a
end{document}
If you are going to use the same geometry for the whole document, you don't need to call newgeometry
command in the biggining of the document but call usepackage
command of geometry
with the options you wish to have.
Also, as mentioned in the comment, you need oneside
documentclass.
So, Something like this could work for you (adjust the numbers to fit your needs):
documentclass[a4paper,oneside]{book}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[centering,
layoutwidth=20cm,
layouthoffset = -0.5cm,
layoutheight = 34cm,
layoutvoffset = -2.5cm]{geometry}
usepackage{sidenotes} % Notes in the margin
usepackage{comment}
begin{comment}
begin{marginfigure}
includegraphics[width=marginparwidth]{example-image-a}%
caption{This is in the margin.}%
end{marginfigure}
end{comment}
usepackage{graphicx}
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{headrulewidth}{0.4pt}
renewcommand{footrulewidth}{0.4pt}
begin{document}
% Future title here
setcounter{chapter}{-1}
chapter{Basic concepts}
thispagestyle{fancy}
section{Multiply two numbers}
When we have to numbers $ a $ and $ b $ and we want to multiply them we have
[
acdot b = c
]
where $ c $ is the result of multiplying $ a $ and $ b $
newpage
noindent a
end{document}
answered Jan 19 at 22:49
koleygrkoleygr
11.2k11038
11.2k11038
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%2f470917%2fnewgeometry-is-not-remembered-when-writing-a-new-page%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
Do you want to use
documentclass[oneside]{book}
? Book documentclass is twoside by default and may be this is what you suppose is the problem. But if you imagine the book printed then the left pages has to leave a space for notes (etc) on their left ant the right pages on their right. Is this the part you didn't realized?– koleygr
Jan 19 at 19:49
@koleygr Well, that did the trick! I will use a oneside book. But maybe is a way to fix that for the two-sided book, because in the left page there is almost no margin.
– Martín
Jan 19 at 20:37