public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc to PDF -- How to add cover before title and toc
@ 2020-12-28 19:20 LRP
       [not found] ` <7d9c7d1b-4198-44f0-85b1-2f79b77e3dc6o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: LRP @ 2020-12-28 19:20 UTC (permalink / raw)
  To: pandoc-discuss


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

I'm developing a series of operations manuals. I'd like to place cover 
markdown content before title page and toc. I've tried:

Directory

1-WGCover.md
2-Writersglen.md

YAML:

---
title: |
       | ![](WGLogo.png){ width=2.5in }
       | _____________
       |
       | Business Plan
       | Development
       | Deployment
       | Marketing
       | Operations
       | _____________

author: Lloyd R. Prentice
date: May 7, 2019

...

Pandoc call:

pandoc \
    -s \
    1-WGCover.md \
    2-Writersglen.md \
    --top-level-division=chapter \
    --toc \
    -o \
    Writersglen.pdf

...and

pandoc \
    -s \
    *.md \
    --top-level-division=chapter \
    --toc \
    -o \
    Writersglen.pdf

But in both cases the cover content comes after the toc.

Can anyone suggest a solution?

Thanks,

LRP



-- 
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/7d9c7d1b-4198-44f0-85b1-2f79b77e3dc6o%40googlegroups.com.

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

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

* Re: Pandoc to PDF -- How to add cover before title and toc
       [not found] ` <7d9c7d1b-4198-44f0-85b1-2f79b77e3dc6o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-12-29 19:18   ` Pranesh Prakash
       [not found]     ` <b4b21bca-bc6d-454d-940a-6dc254b50c37n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Pranesh Prakash @ 2020-12-29 19:18 UTC (permalink / raw)
  To: pandoc-discuss


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

You can modify the default LaTeX template.  Look specifically for the bit 
starting with "$if(title)$".  You'd want your content to come before the 
\titlepage content, so before the $if(title)$.

(Disclaimer: Not an expert.)
On Tuesday, 29 December, 2020 at 12:50:04 am UTC+5:30 LRP wrote:

> I'm developing a series of operations manuals. I'd like to place cover 
> markdown content before title page and toc. I've tried:
>
> Directory
>
> 1-WGCover.md
> 2-Writersglen.md
>
> YAML:
>
> ---
> title: |
>        | ![](WGLogo.png){ width=2.5in }
>        | _____________
>        |
>        | Business Plan
>        | Development
>        | Deployment
>        | Marketing
>        | Operations
>        | _____________
>
> author: Lloyd R. Prentice
> date: May 7, 2019
>
> ...
>
> Pandoc call:
>
> pandoc \
>     -s \
>     1-WGCover.md \
>     2-Writersglen.md \
>     --top-level-division=chapter \
>     --toc \
>     -o \
>     Writersglen.pdf
>
> ...and
>
> pandoc \
>     -s \
>     *.md \
>     --top-level-division=chapter \
>     --toc \
>     -o \
>     Writersglen.pdf
>
> But in both cases the cover content comes after the toc.
>
> Can anyone suggest a solution?
>
> Thanks,
>
> LRP
>
>
>
>

-- 
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/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com.

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

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

* Re: Pandoc to PDF -- How to add cover before title and toc
       [not found]     ` <b4b21bca-bc6d-454d-940a-6dc254b50c37n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-12-30 19:46       ` Lloyd R. prentice
       [not found]         ` <476c4e27-6c1a-4275-be42-a6cc6febff78-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Lloyd R. prentice @ 2020-12-30 19:46 UTC (permalink / raw)
  To: 'Karl Weber' via pandoc-discuss

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

Thanks Pranash,

I presume I should copy the default template before I modify. So, how can I download it?

Thanks again,

LRP

On Tue, Dec 29, 2020, at 2:18 PM, Pranesh Prakash wrote:
> You can modify the default LaTeX template.  Look specifically for the bit starting with "$if(title)$".  You'd want your content to come before the \titlepage content, so before the $if(title)$.
> 
> (Disclaimer: Not an expert.)
> On Tuesday, 29 December, 2020 at 12:50:04 am UTC+5:30 LRP wrote:
>> I'm developing a series of operations manuals. I'd like to place cover markdown content before title page and toc. I've tried:
>> 
>> Directory
>> 
>> 1-WGCover.md
>> 2-Writersglen.md
>> 
>> YAML:
>> 
>> ---
>> title: |
>>        | ![](WGLogo.png){ width=2.5in }
>>        | _____________
>>        |
>>        | Business Plan
>>        | Development
>>        | Deployment
>>        | Marketing
>>        | Operations
>>        | _____________
>> 
>> author: Lloyd R. Prentice
>> date: May 7, 2019
>> 
>> ...
>> 
>> Pandoc call:
>> 
>> pandoc \
>>     -s \
>>     1-WGCover.md \
>>     2-Writersglen.md \
>>     --top-level-division=chapter \
>>     --toc \
>>     -o \
>>     Writersglen.pdf
>> 
>> ...and
>> 
>> pandoc \
>>     -s \
>>     *.md \
>>     --top-level-division=chapter \
>>     --toc \
>>     -o \
>>     Writersglen.pdf
>> 
>> But in both cases the cover content comes after the toc.
>> 
>> Can anyone suggest a solution?
>> 
>> Thanks,
>> 
>> LRP
>> 
>> 
>> 
> 

> -- 
> 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/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com <https://groups.google.com/d/msgid/pandoc-discuss/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/476c4e27-6c1a-4275-be42-a6cc6febff78%40www.fastmail.com.

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

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

* Re: Pandoc to PDF -- How to add cover before title and toc
       [not found]         ` <476c4e27-6c1a-4275-be42-a6cc6febff78-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
@ 2020-12-30 20:19           ` T. Kurt Bond
       [not found]             ` <CAN1EhV9cEVoaznUXXY9CGAxpY3DnVD4cw4WKFB3BgxTb2eUGnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: T. Kurt Bond @ 2020-12-30 20:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Run "pandoc -D latex >~/.pandoc/templates/my.latex", I think, with the
normal changes if you are on Windows.

On Wed, Dec 30, 2020 at 2:47 PM Lloyd R. prentice <lloyd-l7gIAb2iU4jcM+WK4BI3xw@public.gmane.org>
wrote:

> Thanks Pranash,
>
> I presume I should copy the default template before I modify. So, how can
> I download it?
>
> Thanks again,
>
> LRP
>
> On Tue, Dec 29, 2020, at 2:18 PM, Pranesh Prakash wrote:
>
> You can modify the default LaTeX template.  Look specifically for the bit
> starting with "$if(title)$".  You'd want your content to come before the
> \titlepage content, so before the $if(title)$.
>
> (Disclaimer: Not an expert.)
> On Tuesday, 29 December, 2020 at 12:50:04 am UTC+5:30 LRP wrote:
>
> I'm developing a series of operations manuals. I'd like to place cover
> markdown content before title page and toc. I've tried:
>
> Directory
>
> 1-WGCover.md
> 2-Writersglen.md
>
> YAML:
>
> ---
> title: |
>        | ![](WGLogo.png){ width=2.5in }
>        | _____________
>        |
>        | Business Plan
>        | Development
>        | Deployment
>        | Marketing
>        | Operations
>        | _____________
>
> author: Lloyd R. Prentice
> date: May 7, 2019
>
> ...
>
> Pandoc call:
>
> pandoc \
>     -s \
>     1-WGCover.md \
>     2-Writersglen.md \
>     --top-level-division=chapter \
>     --toc \
>     -o \
>     Writersglen.pdf
>
> ...and
>
> pandoc \
>     -s \
>     *.md \
>     --top-level-division=chapter \
>     --toc \
>     -o \
>     Writersglen.pdf
>
> But in both cases the cover content comes after the toc.
>
> Can anyone suggest a solution?
>
> Thanks,
>
> LRP
>
>
>
>
> --
> 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/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> 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/476c4e27-6c1a-4275-be42-a6cc6febff78%40www.fastmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/476c4e27-6c1a-4275-be42-a6cc6febff78%40www.fastmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

-- 
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/CAN1EhV9cEVoaznUXXY9CGAxpY3DnVD4cw4WKFB3BgxTb2eUGnw%40mail.gmail.com.

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

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

* Re: Pandoc to PDF -- How to add cover before title and toc
       [not found]             ` <CAN1EhV9cEVoaznUXXY9CGAxpY3DnVD4cw4WKFB3BgxTb2eUGnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-01-04 22:38               ` Lloyd R. prentice
  0 siblings, 0 replies; 5+ messages in thread
From: Lloyd R. prentice @ 2021-01-04 22:38 UTC (permalink / raw)
  To: 'Karl Weber' via pandoc-discuss

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

Hi,

I found a fairly simple solution to the cover problem. This solution assumes that your OS is Linux. No doubt something similar can be done in Windows:

1. Create a plain *.tex file for the cover. Can include text and images; e.g., cover.tex

2. Compile it to PDF; e.g., ...$ pdflatex cover.tex

3. Use Pandoc to compile your interior PDF.  

4. Concatenate both files with  pdfunite;  e.g., ....$ pdfunite Cover.pdf Writersglen.pdf WG.pdf

https://stackoverflow.com/questions/2507766/merge-convert-multiple-pdf-files-into-one-pdf

I did all three steps in one bash file:

#! /bin/bash

pdflatex Cover.tex

pandoc \
    -s \
    2-Writersglen.md \
    --top-level-division=chapter \
    --toc \
    -o \
    Writersglen.pdf

pdfunite Cover.pdf Writersglen.pdf WG.pdf

Don't forget to make the bash file executable.

Many thanks to all for your generous help.

LRP


On Wed, Dec 30, 2020, at 3:19 PM, T. Kurt Bond wrote:
> Run "pandoc -D latex >~/.pandoc/templates/my.latex", I think, with the normal changes if you are on Windows.
> 
> On Wed, Dec 30, 2020 at 2:47 PM Lloyd R. prentice <lloyd-l7gIAb2iU4jcM+WK4BI3xw@public.gmane.org> wrote:
>> __
>> Thanks Pranash,
>> 
>> I presume I should copy the default template before I modify. So, how can I download it?
>> 
>> Thanks again,
>> 
>> LRP
>> 
>> On Tue, Dec 29, 2020, at 2:18 PM, Pranesh Prakash wrote:
>>> You can modify the default LaTeX template.  Look specifically for the bit starting with "$if(title)$".  You'd want your content to come before the \titlepage content, so before the $if(title)$.
>>> 
>>> (Disclaimer: Not an expert.)
>>> On Tuesday, 29 December, 2020 at 12:50:04 am UTC+5:30 LRP wrote:
>>>> I'm developing a series of operations manuals. I'd like to place cover markdown content before title page and toc. I've tried:
>>>> 
>>>> Directory
>>>> 
>>>> 1-WGCover.md
>>>> 2-Writersglen.md
>>>> 
>>>> YAML:
>>>> 
>>>> ---
>>>> title: |
>>>>        | ![](WGLogo.png){ width=2.5in }
>>>>        | _____________
>>>>        |
>>>>        | Business Plan
>>>>        | Development
>>>>        | Deployment
>>>>        | Marketing
>>>>        | Operations
>>>>        | _____________
>>>> 
>>>> author: Lloyd R. Prentice
>>>> date: May 7, 2019
>>>> 
>>>> ...
>>>> 
>>>> Pandoc call:
>>>> 
>>>> pandoc \
>>>>     -s \
>>>>     1-WGCover.md \
>>>>     2-Writersglen.md \
>>>>     --top-level-division=chapter \
>>>>     --toc \
>>>>     -o \
>>>>     Writersglen.pdf
>>>> 
>>>> ...and
>>>> 
>>>> pandoc \
>>>>     -s \
>>>>     *.md \
>>>>     --top-level-division=chapter \
>>>>     --toc \
>>>>     -o \
>>>>     Writersglen.pdf
>>>> 
>>>> But in both cases the cover content comes after the toc.
>>>> 
>>>> Can anyone suggest a solution?
>>>> 
>>>> Thanks,
>>>> 
>>>> LRP
>>>> 
>>>> 
>>>> 
>>> 

>>> -- 
>>> 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/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com <https://groups.google.com/d/msgid/pandoc-discuss/b4b21bca-bc6d-454d-940a-6dc254b50c37n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> 
>> 

>> -- 
>> 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/476c4e27-6c1a-4275-be42-a6cc6febff78%40www.fastmail.com <https://groups.google.com/d/msgid/pandoc-discuss/476c4e27-6c1a-4275-be42-a6cc6febff78%40www.fastmail.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
> 

> -- 
> 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/CAN1EhV9cEVoaznUXXY9CGAxpY3DnVD4cw4WKFB3BgxTb2eUGnw%40mail.gmail.com <https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV9cEVoaznUXXY9CGAxpY3DnVD4cw4WKFB3BgxTb2eUGnw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/8f74d62a-59bd-44a0-b6ae-3faa129434d3%40www.fastmail.com.

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

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

end of thread, other threads:[~2021-01-04 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 19:20 Pandoc to PDF -- How to add cover before title and toc LRP
     [not found] ` <7d9c7d1b-4198-44f0-85b1-2f79b77e3dc6o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-29 19:18   ` Pranesh Prakash
     [not found]     ` <b4b21bca-bc6d-454d-940a-6dc254b50c37n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-30 19:46       ` Lloyd R. prentice
     [not found]         ` <476c4e27-6c1a-4275-be42-a6cc6febff78-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2020-12-30 20:19           ` T. Kurt Bond
     [not found]             ` <CAN1EhV9cEVoaznUXXY9CGAxpY3DnVD4cw4WKFB3BgxTb2eUGnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-04 22:38               ` Lloyd R. prentice

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).