Discussion:
Having each section on its own page without "Chapter N" at the top
J. Pablo Fernández
2016-08-02 07:22:15 UTC
Permalink
Hello,

I want to have each top level section of my document start on a brand new
page in the PDF, what's the best method? I found the --chapters and/or the
documentclass variable that I can set to book, but when I do that, it puts,
before the title of the section "Chapter N" as well as in the header. Is
there a way to have each top level section start on a new page without
having these "Chapter N" strings there?
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/096504da-433c-47b0-9eaf-d82ac4622a45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rich Traube
2016-08-02 11:45:59 UTC
Permalink
Hello Pablo,

You could use a sed filter to place LaTeX's `\newpage` directive before each section. I would use `\raggedbottom` in the LaTeX preamble as well. The `\fancyhdr` package would let you customize the headers and footers.

This will probably result in unnecessary blank pages between chapter title pages and sections.

Try searching ctan.org for a "headers" or "headings" package that will enable "styling" of a book's logical elements.

Rich
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ea908c61-c77e-4196-998e-5b5071e265fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
J. Pablo Fernández
2016-08-02 21:36:16 UTC
Permalink
I ended up using my own Latex template and adding this to it:

% Header and footer
\usepackage{titleps}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{\leftmark}
\fancyhead[LO,RE]{}
\fancyfoot[CO,CE]{J. Pablo Fernández's Portfolio - https://pupeno.com}
\fancyfoot[LE,RO]{\thepage}
% Get rid of "Chapter N" in the header:
http://tex.stackexchange.com/questions/228362/get-sectionmark-in-fancyhdr-without-chapter-number
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\arabic{section}.\ #1}}

% Get rid of "Chapter N" in the titles:
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\interlinepenalty\@M
\Large \bfseries #1\par\nobreak
\vskip 40\p@
}}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Large \bfseries #1\par\nobreak
\vskip 40\p@
}}
\makeatother
Post by Rich Traube
Hello Pablo,
You could use a sed filter to place LaTeX's `\newpage` directive before
each section. I would use `\raggedbottom` in the LaTeX preamble as well.
The `\fancyhdr` package would let you customize the headers and footers.
This will probably result in unnecessary blank pages between chapter title
pages and sections.
Try searching ctan.org for a "headers" or "headings" package that will
enable "styling" of a book's logical elements.
Rich
--
You received this message because you are subscribed to a topic in the
Google Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/pandoc-discuss/ncypD10rV9k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
https://groups.google.com/d/msgid/pandoc-discuss/ea908c61-c77e-4196-998e-5b5071e265fd%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
J. Pablo Fernández <***@pupeno.com> (http://pupeno.com)
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAM%2BENKFEJCNPBFvq1GoGGB1YS5GtM9T3OjMgVtz7omwvBUsM6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
John MacFarlane
2016-08-06 20:01:55 UTC
Permalink
You can probably just redefine the latex \section macro
so it inserts a page break. You can ask on a LaTeX forum
how to do this, if you can't figure it out.
Post by J. Pablo Fernández
Hello,
I want to have each top level section of my document start on a brand
new page in the PDF, what's the best method? I found the --chapters
and/or the documentclass variable that I can set to book, but when I do
that, it puts, before the title of the section "Chapter N" as well as
in the header. Is there a way to have each top level section start on a
new page without having these "Chapter N" strings there?
--
You received this message because you are subscribed to the Google
Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
To post to this group, send email to
To view this discussion on the web visit
[3]https://groups.google.com/d/msgid/pandoc-discuss/096504da-433c-47b0-
9eaf-d82ac4622a45%40googlegroups.com.
For more options, visit [4]https://groups.google.com/d/optout.
References
4. https://groups.google.com/d/optout
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20160806200154.GE43412%40pc92.home.
For more options, visit https://groups.google.com/d/optout.
BP Jonsson
2016-08-09 11:38:11 UTC
Permalink
This is relatively easily doable with the titlesec package. However the
redefinition of \paragraph and \subparagraph in pandoc's default template
chokes titlesec and must be removed or replaced with a titlesec-based
redefinition. There is a section in the titlesec manual showing how the
title styles of the standard packages can be defined with titlesec. copy
the definitions for \paragraph and \subparagraph from there but replace the
\titleformat shape [runin] with [hang]

The trick to get a pagebreak before each section is then to define the
\sectionbreak command as

```
\newcommand{\sectionbreak}{\clearpage}
```

or with \newpage instead of \clearpage.

As it happens I have made a template which allows loading and using
titlesec with the help of metadata variables. ATM half of Europe is between
me and my desktop computer where it resides, but I will put a cleaned-up
version and a howto online after I get back this weekend.

\bpj

lördag 6 augusti 2016 skrev John MacFarlane <***@berkeley.edu>:
You can probably just redefine the latex \section macro
so it inserts a page break. You can ask on a LaTeX forum
how to do this, if you can't figure it out.

+++ J. Pablo Fernández [Aug 02 16 00:22 ]:
Hello,
I want to have each top level section of my document start on a brand
new page in the PDF, what's the best method? I found the --chapters
and/or the documentclass variable that I can set to book, but when I do
that, it puts, before the title of the section "Chapter N" as well as
in the header. Is there a way to have each top level section start on a
new page without having these "Chapter N" strings there?

--
You received this message because you are subscribed to the Google
Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [1]pandoc-discuss+***@googlegroups.com.
To post to this group, send email to
[2]pandoc-***@googlegroups.com.
To view this discussion on the web visit
[3]https://groups.google.com/d/msgid/pandoc-discuss/096504da-433c-47b0-
9eaf-d82ac4622a45%40googlegroups.com.
For more options, visit [4]https://groups.google.com/d/optout.

References

1. mailto:pandoc-discuss+***@googlegroups.com
2. mailto:pandoc-***@googlegroups.com
3.
https://groups.google.com/d/msgid/pandoc-discuss/096504da-433c-47b0-9eaf-***@googlegroups.com?utm_medium=email&utm_source=footer
4. https://groups.google.com/d/optout
--
You received this message because you are subscribed to the Google Groups
"pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pandoc-discuss/20160806200154.GE43412%40pc92.home
.
For more options, visit https://groups.google.com/d/optout.
--
------------------------------
SavedURI :Show URLShow URLSavedURI :
SavedURI :Hide URLHide URLSavedURI :
https://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.sv.G3GZFwvcniQ.O/m=m_i,t,it/am=fUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=h/d=1/rs=AItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvwhttps://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.sv.G3GZFwvcniQ.O/m=m_i,t,it/am=fUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=h/d=1/rs=AItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvw
<https://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.sv.G3GZFwvcniQ.O/m=m_i,t,it/am=fUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=h/d=1/rs=AItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvw>
<https://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.sv.G3GZFwvcniQ.O/m=m_i,t,it/am=fUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=h/d=1/rs=AItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvw>
------------------------------
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuQ8oVgXccgY7X7rHVzGE%2BznuHb1pLdFQwEA2M%2BkmFwq1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...