Remove space before chapter title - with KOMA script (scrbook)
I am using the KOMA script document class scrbook
. Is there any way to make the chapter headings appear exactly at the top of the page body just by using KOMA (without using titlesec
, fancyhdr
, fncychap
, ... for they would mess up other things in my documents)? Is there any way to change the space between section heading and the following text?
sectioning vertical-alignment chapters koma-script
add a comment |
I am using the KOMA script document class scrbook
. Is there any way to make the chapter headings appear exactly at the top of the page body just by using KOMA (without using titlesec
, fancyhdr
, fncychap
, ... for they would mess up other things in my documents)? Is there any way to change the space between section heading and the following text?
sectioning vertical-alignment chapters koma-script
I'm not quite sure what you mean. Are we talking about the chapter titles in the document and that KOMA, like the standard class, adds a vertical space before the chapter or do you refer to the header where KOMa can print the current section/chapter one reads in. In case you mean the position of chapters, search forchapterheadstartvskip
– Martin H
Feb 1 '12 at 16:38
add a comment |
I am using the KOMA script document class scrbook
. Is there any way to make the chapter headings appear exactly at the top of the page body just by using KOMA (without using titlesec
, fancyhdr
, fncychap
, ... for they would mess up other things in my documents)? Is there any way to change the space between section heading and the following text?
sectioning vertical-alignment chapters koma-script
I am using the KOMA script document class scrbook
. Is there any way to make the chapter headings appear exactly at the top of the page body just by using KOMA (without using titlesec
, fancyhdr
, fncychap
, ... for they would mess up other things in my documents)? Is there any way to change the space between section heading and the following text?
sectioning vertical-alignment chapters koma-script
sectioning vertical-alignment chapters koma-script
edited Feb 1 '12 at 16:38
Werner
448k719931699
448k719931699
asked Feb 1 '12 at 16:33
MokedMoked
780719
780719
I'm not quite sure what you mean. Are we talking about the chapter titles in the document and that KOMA, like the standard class, adds a vertical space before the chapter or do you refer to the header where KOMa can print the current section/chapter one reads in. In case you mean the position of chapters, search forchapterheadstartvskip
– Martin H
Feb 1 '12 at 16:38
add a comment |
I'm not quite sure what you mean. Are we talking about the chapter titles in the document and that KOMA, like the standard class, adds a vertical space before the chapter or do you refer to the header where KOMa can print the current section/chapter one reads in. In case you mean the position of chapters, search forchapterheadstartvskip
– Martin H
Feb 1 '12 at 16:38
I'm not quite sure what you mean. Are we talking about the chapter titles in the document and that KOMA, like the standard class, adds a vertical space before the chapter or do you refer to the header where KOMa can print the current section/chapter one reads in. In case you mean the position of chapters, search for
chapterheadstartvskip
– Martin H
Feb 1 '12 at 16:38
I'm not quite sure what you mean. Are we talking about the chapter titles in the document and that KOMA, like the standard class, adds a vertical space before the chapter or do you refer to the header where KOMa can print the current section/chapter one reads in. In case you mean the position of chapters, search for
chapterheadstartvskip
– Martin H
Feb 1 '12 at 16:38
add a comment |
2 Answers
2
active
oldest
votes
The following is probably what you're after:
documentclass{scrreprt}
usepackage{blindtext,showframe}
renewcommand{chapterheadstartvskip}{}
begin{document}
chapter{foo} blindtext blindtext
end{document}
Setting chapterheadstartvskip
to a no-op removes any vertical skip to set the chapter title on the first line.
showframe
was loaded just to highlight the text block, while blindtext
provided dummy text.
2
There was a change in KOMA-Script version 3.15: now you have to userenewcommand{chapterheadstartvskip}{}
.
– esdd
Mar 8 '15 at 0:30
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
1
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something likerenewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.
– Werner
Jun 7 '18 at 19:39
add a comment |
Update
Since KOMA-Script version 3.26 you can option afterindent=false
to avoid the paragraph indentation of the first text line after the chapter title.
documentclass{scrbook}
usepackage{blindtext}
usepackage{showframe}
RedeclareSectionCommand[
beforeskip=0pt,
afterindent=false% <- added
]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
The result is the same as in the original answer below.
With afterindent=false
or afterindent=true
a negative value of beforeskip
results in a negative skip above the chapter title (needs version 3.26 or newer).
Note: With KOMA-Script versions 3.22 - 3.25 you have to set beforeskip
to a negative value to avoid the paragraph indentation in the first text line following the chapter title: beforeskip=-1sp
. For more information see the documentation or Adjusting spacing around section/subsection titles with koma-script
Original answer
With KOMA-Script Version 3.15 or newer you can use RedeclareSectionCommand
or RedeclareSectionCommands
to change the space above or below the chapter title.
RedeclareSectionCommand[beforeskip=0pt]{chapter}
Code:
documentclass{scrbook}
usepackage{blindtext}% dummy text
usepackage{showframe}% to show the page layout
RedeclareSectionCommand[beforeskip=0pt]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
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%2f43087%2fremove-space-before-chapter-title-with-koma-script-scrbook%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The following is probably what you're after:
documentclass{scrreprt}
usepackage{blindtext,showframe}
renewcommand{chapterheadstartvskip}{}
begin{document}
chapter{foo} blindtext blindtext
end{document}
Setting chapterheadstartvskip
to a no-op removes any vertical skip to set the chapter title on the first line.
showframe
was loaded just to highlight the text block, while blindtext
provided dummy text.
2
There was a change in KOMA-Script version 3.15: now you have to userenewcommand{chapterheadstartvskip}{}
.
– esdd
Mar 8 '15 at 0:30
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
1
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something likerenewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.
– Werner
Jun 7 '18 at 19:39
add a comment |
The following is probably what you're after:
documentclass{scrreprt}
usepackage{blindtext,showframe}
renewcommand{chapterheadstartvskip}{}
begin{document}
chapter{foo} blindtext blindtext
end{document}
Setting chapterheadstartvskip
to a no-op removes any vertical skip to set the chapter title on the first line.
showframe
was loaded just to highlight the text block, while blindtext
provided dummy text.
2
There was a change in KOMA-Script version 3.15: now you have to userenewcommand{chapterheadstartvskip}{}
.
– esdd
Mar 8 '15 at 0:30
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
1
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something likerenewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.
– Werner
Jun 7 '18 at 19:39
add a comment |
The following is probably what you're after:
documentclass{scrreprt}
usepackage{blindtext,showframe}
renewcommand{chapterheadstartvskip}{}
begin{document}
chapter{foo} blindtext blindtext
end{document}
Setting chapterheadstartvskip
to a no-op removes any vertical skip to set the chapter title on the first line.
showframe
was loaded just to highlight the text block, while blindtext
provided dummy text.
The following is probably what you're after:
documentclass{scrreprt}
usepackage{blindtext,showframe}
renewcommand{chapterheadstartvskip}{}
begin{document}
chapter{foo} blindtext blindtext
end{document}
Setting chapterheadstartvskip
to a no-op removes any vertical skip to set the chapter title on the first line.
showframe
was loaded just to highlight the text block, while blindtext
provided dummy text.
edited Mar 8 '15 at 1:23
answered Feb 1 '12 at 16:54
WernerWerner
448k719931699
448k719931699
2
There was a change in KOMA-Script version 3.15: now you have to userenewcommand{chapterheadstartvskip}{}
.
– esdd
Mar 8 '15 at 0:30
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
1
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something likerenewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.
– Werner
Jun 7 '18 at 19:39
add a comment |
2
There was a change in KOMA-Script version 3.15: now you have to userenewcommand{chapterheadstartvskip}{}
.
– esdd
Mar 8 '15 at 0:30
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
1
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something likerenewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.
– Werner
Jun 7 '18 at 19:39
2
2
There was a change in KOMA-Script version 3.15: now you have to use
renewcommand{chapterheadstartvskip}{}
.– esdd
Mar 8 '15 at 0:30
There was a change in KOMA-Script version 3.15: now you have to use
renewcommand{chapterheadstartvskip}{}
.– esdd
Mar 8 '15 at 0:30
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
@Werner, why is there still a little bit of space above the chapter heading, and how would you eliminate it completely?
– AML
Jun 7 '18 at 18:54
1
1
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something like
renewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.– Werner
Jun 7 '18 at 19:39
@AML: It's most likely as a result of the baseline skip, which leaves room at the top of text so they don't protrude into the descenders of a row of text above it. The easiest would be to try using a small but negative value for the vertical skip; something like
renewcommand{chapterheadstartvskip}{vspace{-.2baselineskip}}
.– Werner
Jun 7 '18 at 19:39
add a comment |
Update
Since KOMA-Script version 3.26 you can option afterindent=false
to avoid the paragraph indentation of the first text line after the chapter title.
documentclass{scrbook}
usepackage{blindtext}
usepackage{showframe}
RedeclareSectionCommand[
beforeskip=0pt,
afterindent=false% <- added
]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
The result is the same as in the original answer below.
With afterindent=false
or afterindent=true
a negative value of beforeskip
results in a negative skip above the chapter title (needs version 3.26 or newer).
Note: With KOMA-Script versions 3.22 - 3.25 you have to set beforeskip
to a negative value to avoid the paragraph indentation in the first text line following the chapter title: beforeskip=-1sp
. For more information see the documentation or Adjusting spacing around section/subsection titles with koma-script
Original answer
With KOMA-Script Version 3.15 or newer you can use RedeclareSectionCommand
or RedeclareSectionCommands
to change the space above or below the chapter title.
RedeclareSectionCommand[beforeskip=0pt]{chapter}
Code:
documentclass{scrbook}
usepackage{blindtext}% dummy text
usepackage{showframe}% to show the page layout
RedeclareSectionCommand[beforeskip=0pt]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
add a comment |
Update
Since KOMA-Script version 3.26 you can option afterindent=false
to avoid the paragraph indentation of the first text line after the chapter title.
documentclass{scrbook}
usepackage{blindtext}
usepackage{showframe}
RedeclareSectionCommand[
beforeskip=0pt,
afterindent=false% <- added
]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
The result is the same as in the original answer below.
With afterindent=false
or afterindent=true
a negative value of beforeskip
results in a negative skip above the chapter title (needs version 3.26 or newer).
Note: With KOMA-Script versions 3.22 - 3.25 you have to set beforeskip
to a negative value to avoid the paragraph indentation in the first text line following the chapter title: beforeskip=-1sp
. For more information see the documentation or Adjusting spacing around section/subsection titles with koma-script
Original answer
With KOMA-Script Version 3.15 or newer you can use RedeclareSectionCommand
or RedeclareSectionCommands
to change the space above or below the chapter title.
RedeclareSectionCommand[beforeskip=0pt]{chapter}
Code:
documentclass{scrbook}
usepackage{blindtext}% dummy text
usepackage{showframe}% to show the page layout
RedeclareSectionCommand[beforeskip=0pt]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
add a comment |
Update
Since KOMA-Script version 3.26 you can option afterindent=false
to avoid the paragraph indentation of the first text line after the chapter title.
documentclass{scrbook}
usepackage{blindtext}
usepackage{showframe}
RedeclareSectionCommand[
beforeskip=0pt,
afterindent=false% <- added
]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
The result is the same as in the original answer below.
With afterindent=false
or afterindent=true
a negative value of beforeskip
results in a negative skip above the chapter title (needs version 3.26 or newer).
Note: With KOMA-Script versions 3.22 - 3.25 you have to set beforeskip
to a negative value to avoid the paragraph indentation in the first text line following the chapter title: beforeskip=-1sp
. For more information see the documentation or Adjusting spacing around section/subsection titles with koma-script
Original answer
With KOMA-Script Version 3.15 or newer you can use RedeclareSectionCommand
or RedeclareSectionCommands
to change the space above or below the chapter title.
RedeclareSectionCommand[beforeskip=0pt]{chapter}
Code:
documentclass{scrbook}
usepackage{blindtext}% dummy text
usepackage{showframe}% to show the page layout
RedeclareSectionCommand[beforeskip=0pt]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
Update
Since KOMA-Script version 3.26 you can option afterindent=false
to avoid the paragraph indentation of the first text line after the chapter title.
documentclass{scrbook}
usepackage{blindtext}
usepackage{showframe}
RedeclareSectionCommand[
beforeskip=0pt,
afterindent=false% <- added
]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
The result is the same as in the original answer below.
With afterindent=false
or afterindent=true
a negative value of beforeskip
results in a negative skip above the chapter title (needs version 3.26 or newer).
Note: With KOMA-Script versions 3.22 - 3.25 you have to set beforeskip
to a negative value to avoid the paragraph indentation in the first text line following the chapter title: beforeskip=-1sp
. For more information see the documentation or Adjusting spacing around section/subsection titles with koma-script
Original answer
With KOMA-Script Version 3.15 or newer you can use RedeclareSectionCommand
or RedeclareSectionCommands
to change the space above or below the chapter title.
RedeclareSectionCommand[beforeskip=0pt]{chapter}
Code:
documentclass{scrbook}
usepackage{blindtext}% dummy text
usepackage{showframe}% to show the page layout
RedeclareSectionCommand[beforeskip=0pt]{chapter}
begin{document}
chapter{foo}
blindtext
end{document}
edited Mar 16 at 14:52
answered Mar 8 '15 at 0:25
esddesdd
59.8k34692
59.8k34692
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
add a comment |
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
This was the easiest way ever.
– Joseph
Sep 29 '15 at 20:37
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%2f43087%2fremove-space-before-chapter-title-with-koma-script-scrbook%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
I'm not quite sure what you mean. Are we talking about the chapter titles in the document and that KOMA, like the standard class, adds a vertical space before the chapter or do you refer to the header where KOMa can print the current section/chapter one reads in. In case you mean the position of chapters, search for
chapterheadstartvskip
– Martin H
Feb 1 '12 at 16:38