public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* --epub-chapter-level option for PDF?
@ 2019-10-03  4:18 Gabriel Volpe
       [not found] ` <996131ba-41a3-4aca-b181-72ebe3c9bb4b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Volpe @ 2019-10-03  4:18 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 616 bytes --]

Is there anything like --epub-chapter-level but for PDF outputs? 

I really like how I can set up the level in which to split the different 
pages and I would love if I could do the same for PDF.

Thanks! 

-- 
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/996131ba-41a3-4aca-b181-72ebe3c9bb4b%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1153 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: --epub-chapter-level option for PDF?
       [not found] ` <996131ba-41a3-4aca-b181-72ebe3c9bb4b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-04 17:47   ` John MacFarlane
       [not found]     ` <yh480k1rvsz9ki.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2019-10-04 17:47 UTC (permalink / raw)
  To: Gabriel Volpe, pandoc-discuss


One approach is outlined here:
https://tex.stackexchange.com/questions/153444/insert-newpage-before-section-but-prevent-pagebreak-after-part

Create a file sectionbreaks.tex containing the following:

%%%%
\usepackage{etoolbox}
\newtoggle{afterpart}
\pretocmd{\section}
  {\iftoggle{afterpart}
    {\global\togglefalse{afterpart}}% we're after a part
    {\clearpage}% we're not immediately after a part
  }{}{}
\pretocmd{\part}
  {\clearpage % do a page break
   \global\toggletrue{afterpart}% tell \section we're just after a part
  }
  {}{}\usepackage{etoolbox}
%%%%

Then call pandoc with -H sectionsbreaks.tex -o whatever.pdf


Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Is there anything like --epub-chapter-level but for PDF outputs? 
>
> I really like how I can set up the level in which to split the different 
> pages and I would love if I could do the same for PDF.
>
> Thanks! 
>
> -- 
> 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/996131ba-41a3-4aca-b181-72ebe3c9bb4b%40googlegroups.com.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: --epub-chapter-level option for PDF?
       [not found]     ` <yh480k1rvsz9ki.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-10-05  0:31       ` Gabriel Volpe
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Volpe @ 2019-10-05  0:31 UTC (permalink / raw)
  To: John MacFarlane; +Cc: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

Thank you very much, John, that works perfectly!

On Fri, 4 Oct 2019 at 12:48, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

>
> One approach is outlined here:
>
> https://tex.stackexchange.com/questions/153444/insert-newpage-before-section-but-prevent-pagebreak-after-part
>
> Create a file sectionbreaks.tex containing the following:
>
> %%%%
> \usepackage{etoolbox}
> \newtoggle{afterpart}
> \pretocmd{\section}
>   {\iftoggle{afterpart}
>     {\global\togglefalse{afterpart}}% we're after a part
>     {\clearpage}% we're not immediately after a part
>   }{}{}
> \pretocmd{\part}
>   {\clearpage % do a page break
>    \global\toggletrue{afterpart}% tell \section we're just after a part
>   }
>   {}{}\usepackage{etoolbox}
> %%%%
>
> Then call pandoc with -H sectionsbreaks.tex -o whatever.pdf
>
>
> Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Is there anything like --epub-chapter-level but for PDF outputs?
> >
> > I really like how I can set up the level in which to split the different
> > pages and I would love if I could do the same for PDF.
> >
> > Thanks!
> >
> > --
> > 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/996131ba-41a3-4aca-b181-72ebe3c9bb4b%40googlegroups.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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJReL35Vptkx%3DzQd-tb_4wGXPLXPSR2%3D7gDdBEZGT7qNxPkENA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3280 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-05  0:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03  4:18 --epub-chapter-level option for PDF? Gabriel Volpe
     [not found] ` <996131ba-41a3-4aca-b181-72ebe3c9bb4b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-04 17:47   ` John MacFarlane
     [not found]     ` <yh480k1rvsz9ki.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-10-05  0:31       ` Gabriel Volpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).