Pandoc - how to get pagebreak between title block and the table of contents?
Simple markdown file, with YAML block:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
When I create the PDF output, the title and ToC are on the same page. How can I get the title block on one page and the ToC on the next? I've searched high and low and cannot find a solution.
pandoc
add a comment |
Simple markdown file, with YAML block:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
When I create the PDF output, the title and ToC are on the same page. How can I get the title block on one page and the ToC on the next? I've searched high and low and cannot find a solution.
pandoc
add a comment |
Simple markdown file, with YAML block:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
When I create the PDF output, the title and ToC are on the same page. How can I get the title block on one page and the ToC on the next? I've searched high and low and cannot find a solution.
pandoc
Simple markdown file, with YAML block:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
When I create the PDF output, the title and ToC are on the same page. How can I get the title block on one page and the ToC on the next? I've searched high and low and cannot find a solution.
pandoc
pandoc
edited Dec 17 at 21:53
Kurt Pfeifle
9,18713555
9,18713555
asked Aug 15 at 5:18
Rob
112
112
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Pandoc allows to insert LaTeX between title and the actual document via the include-before
metadata field. Adding the following to your YAML header should be sufficient:
include-before:
- '`newpage{}`{=latex}'
add a comment |
While @tarleb's method of course is correct and more 'YAMLish' (but less intuitive), you can also write the following into your source Markdown file:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
newpage{}
# First Headline
Here comes my markdown text ....
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove thetoc
entry from YAML and insert thenewpage{} toc
directly into the document.
– tarleb
Dec 17 at 19:50
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fsuperuser.com%2fquestions%2f1349187%2fpandoc-how-to-get-pagebreak-between-title-block-and-the-table-of-contents%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
Pandoc allows to insert LaTeX between title and the actual document via the include-before
metadata field. Adding the following to your YAML header should be sufficient:
include-before:
- '`newpage{}`{=latex}'
add a comment |
Pandoc allows to insert LaTeX between title and the actual document via the include-before
metadata field. Adding the following to your YAML header should be sufficient:
include-before:
- '`newpage{}`{=latex}'
add a comment |
Pandoc allows to insert LaTeX between title and the actual document via the include-before
metadata field. Adding the following to your YAML header should be sufficient:
include-before:
- '`newpage{}`{=latex}'
Pandoc allows to insert LaTeX between title and the actual document via the include-before
metadata field. Adding the following to your YAML header should be sufficient:
include-before:
- '`newpage{}`{=latex}'
answered Aug 15 at 21:25
tarleb
1414
1414
add a comment |
add a comment |
While @tarleb's method of course is correct and more 'YAMLish' (but less intuitive), you can also write the following into your source Markdown file:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
newpage{}
# First Headline
Here comes my markdown text ....
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove thetoc
entry from YAML and insert thenewpage{} toc
directly into the document.
– tarleb
Dec 17 at 19:50
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
add a comment |
While @tarleb's method of course is correct and more 'YAMLish' (but less intuitive), you can also write the following into your source Markdown file:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
newpage{}
# First Headline
Here comes my markdown text ....
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove thetoc
entry from YAML and insert thenewpage{} toc
directly into the document.
– tarleb
Dec 17 at 19:50
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
add a comment |
While @tarleb's method of course is correct and more 'YAMLish' (but less intuitive), you can also write the following into your source Markdown file:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
newpage{}
# First Headline
Here comes my markdown text ....
While @tarleb's method of course is correct and more 'YAMLish' (but less intuitive), you can also write the following into your source Markdown file:
---
title: Report
author: Tom Brown 12345678
date: August 2018
toc: true
numbersections: true
geometry: margin=2.5cm
urlcolor: blue
header-includes: |
usepackage{fancyhdr}
pagestyle{fancy}
lfoot{Draft Prepared: 15 August 2018}
rfoot{Page thepage}
---
newpage{}
# First Headline
Here comes my markdown text ....
answered Dec 15 at 0:35
Kurt Pfeifle
9,18713555
9,18713555
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove thetoc
entry from YAML and insert thenewpage{} toc
directly into the document.
– tarleb
Dec 17 at 19:50
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
add a comment |
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove thetoc
entry from YAML and insert thenewpage{} toc
directly into the document.
– tarleb
Dec 17 at 19:50
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove the
toc
entry from YAML and insert the newpage{} toc
directly into the document.– tarleb
Dec 17 at 19:50
The above code only inserts a page-break between toc and content, not between title-block and toc. However, I agree that an alternative, non-YAML solution would be helpful: one could remove the
toc
entry from YAML and insert the newpage{} toc
directly into the document.– tarleb
Dec 17 at 19:50
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
Thx, @tarleb, you are right. You are a sharp observer, and I overlooked something.
– Kurt Pfeifle
Dec 17 at 21:52
add a comment |
Thanks for contributing an answer to Super User!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2fsuperuser.com%2fquestions%2f1349187%2fpandoc-how-to-get-pagebreak-between-title-block-and-the-table-of-contents%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