public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Additional level 1 heading, only in epub
@ 2022-04-28  2:49 Antonio Piccolboni
       [not found] ` <55088d13-2a2f-4cd7-b865-2d5e32c44911n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Antonio Piccolboni @ 2022-04-28  2:49 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,
if I start a markdown file with a level 2 heading (## Introduction), then, 
only in the epub output, there is a level 1 heading with the same title as 
the book. html and pdf start with the level 2 heading, no problem. How can 
I prevent the creation of this spurious heading? Thanks


Antonio

cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)

minimal example:

---
title: "Minimal"
---


## Introduction


bla bla bla

# Chapter Uno

Bla bla bla


-- 
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/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com.

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

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

* Re: Additional level 1 heading, only in epub
       [not found] ` <55088d13-2a2f-4cd7-b865-2d5e32c44911n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-04-30  7:29   ` BPJ
       [not found]     ` <CADAJKhAj0-S3QgMSLOddvp2=QvKXgqbSvkb=U1T_k-NCS4CFzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BPJ @ 2022-04-30  7:29 UTC (permalink / raw)
  To: pandoc-discuss

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

The "problem" is that the title from the metadata is inserted as a level 1
heading. I believe this is done by the template.

https://github.com/jgm/pandoc/blob/c1105e6b06d7436f43236191e32156a863de0e13/data/templates/default.epub3#L24

You can make a copy of the default template, remove that part and use that
as your custom template.

Den tors 28 apr. 2022 04:50Antonio Piccolboni <piccolbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Hi,
> if I start a markdown file with a level 2 heading (## Introduction), then,
> only in the epub output, there is a level 1 heading with the same title as
> the book. html and pdf start with the level 2 heading, no problem. How can
> I prevent the creation of this spurious heading? Thanks
>
>
> Antonio
>
> cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)
>
> minimal example:
>
> ---
> title: "Minimal"
> ---
>
>
> ## Introduction
>
>
> bla bla bla
>
> # Chapter Uno
>
> Bla bla bla
>
>
> --
> 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/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%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/CADAJKhAj0-S3QgMSLOddvp2%3DQvKXgqbSvkb%3DU1T_k-NCS4CFzg%40mail.gmail.com.

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

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

* Re: Additional level 1 heading, only in epub
       [not found]     ` <CADAJKhAj0-S3QgMSLOddvp2=QvKXgqbSvkb=U1T_k-NCS4CFzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-05-02 23:08       ` Antonio Piccolboni
       [not found]         ` <4c62d794-40d8-44c2-b444-42c701654c50n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Antonio Piccolboni @ 2022-05-02 23:08 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks, I gave it a try, removing the nested for and if starting at the 
line you highlighted, but it doesn't elicit the desired result. Opening up 
the epub, the aforementioned template lines affect something in the 
title_page.xhtml file, but the additional h1 level title remains in the 
ch001.xhtml file. There is no other explicit h1 heading in the template.

On Saturday, April 30, 2022 at 12:30:10 AM UTC-7 BP wrote:

> The "problem" is that the title from the metadata is inserted as a level 1 
> heading. I believe this is done by the template.
>
>
> https://github.com/jgm/pandoc/blob/c1105e6b06d7436f43236191e32156a863de0e13/data/templates/default.epub3#L24
>
> You can make a copy of the default template, remove that part and use that 
> as your custom template.
>
> Den tors 28 apr. 2022 04:50Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> Hi,
>> if I start a markdown file with a level 2 heading (## Introduction), 
>> then, only in the epub output, there is a level 1 heading with the same 
>> title as the book. html and pdf start with the level 2 heading, no problem. 
>> How can I prevent the creation of this spurious heading? Thanks
>>
>>
>> Antonio
>>
>> cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)
>>
>> minimal example:
>>
>> ---
>> title: "Minimal"
>> ---
>>
>>
>> ## Introduction
>>
>>
>> bla bla bla
>>
>> # Chapter Uno
>>
>> Bla bla bla
>>
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%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/4c62d794-40d8-44c2-b444-42c701654c50n%40googlegroups.com.

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

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

* Re: Additional level 1 heading, only in epub
       [not found]         ` <4c62d794-40d8-44c2-b444-42c701654c50n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-05-03 14:31           ` BPJ
       [not found]             ` <CADAJKhDUjs13moUqepKrysjLk66gOTH9yrj3-c-necyy-1z5Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BPJ @ 2022-05-03 14:31 UTC (permalink / raw)
  To: pandoc-discuss

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

Searching for `$title$` elsewhere in the template and adjusting as needed
should do the trick.

Den tis 3 maj 2022 01:09Antonio Piccolboni <piccolbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Thanks, I gave it a try, removing the nested for and if starting at the
> line you highlighted, but it doesn't elicit the desired result. Opening up
> the epub, the aforementioned template lines affect something in the
> title_page.xhtml file, but the additional h1 level title remains in the
> ch001.xhtml file. There is no other explicit h1 heading in the template.
>
> On Saturday, April 30, 2022 at 12:30:10 AM UTC-7 BP wrote:
>
>> The "problem" is that the title from the metadata is inserted as a level
>> 1 heading. I believe this is done by the template.
>>
>>
>> https://github.com/jgm/pandoc/blob/c1105e6b06d7436f43236191e32156a863de0e13/data/templates/default.epub3#L24
>>
>> You can make a copy of the default template, remove that part and use
>> that as your custom template.
>>
>> Den tors 28 apr. 2022 04:50Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> Hi,
>>> if I start a markdown file with a level 2 heading (## Introduction),
>>> then, only in the epub output, there is a level 1 heading with the same
>>> title as the book. html and pdf start with the level 2 heading, no problem.
>>> How can I prevent the creation of this spurious heading? Thanks
>>>
>>>
>>> Antonio
>>>
>>> cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)
>>>
>>> minimal example:
>>>
>>> ---
>>> title: "Minimal"
>>> ---
>>>
>>>
>>> ## Introduction
>>>
>>>
>>> bla bla bla
>>>
>>> # Chapter Uno
>>>
>>> Bla bla bla
>>>
>>>
>>> --
>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%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/4c62d794-40d8-44c2-b444-42c701654c50n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%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/CADAJKhDUjs13moUqepKrysjLk66gOTH9yrj3-c-necyy-1z5Ug%40mail.gmail.com.

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

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

* Re: Additional level 1 heading, only in epub
       [not found]             ` <CADAJKhDUjs13moUqepKrysjLk66gOTH9yrj3-c-necyy-1z5Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-05-03 15:34               ` Antonio Piccolboni
       [not found]                 ` <23782580-07fb-451c-8b1c-0accbeb09a07n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Antonio Piccolboni @ 2022-05-03 15:34 UTC (permalink / raw)
  To: pandoc-discuss


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

The only occurrence is at the line you linked to and I tried replacing 
$title$ with a random string to see where it pops up and it is in the title 
page. I don't see any other.  Here is default.epub3 that I am using. Thanks


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ 
xml:lang="$lang$"$endif$>
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <title>$pagetitle$</title>
  <style>
    $styles.html()$
$if(highlighting-css)$
    $highlighting-css$
$endif$
  </style>
$for(css)$
  <link rel="stylesheet" type="text/css" href="$css$" />
$endfor$
$for(header-includes)$
  $header-includes$
$endfor$
</head>
<body$if(coverpage)$ id="cover"$endif$$if(body-type)$ 
epub:type="$body-type$"$endif$>
$if(titlepage)$
<section epub:type="titlepage" class="titlepage">
$for(title)$
$if(title.type)$
  <h1 class="$title.type$">$title.text$</h1>
$else$
  <h1 class="title">$title$</h1>
$endif$
$endfor$
$if(subtitle)$
  <p class="subtitle">$subtitle$</p>
$endif$
$for(author)$
  <p class="author">$author$</p>
$endfor$
$for(creator)$
  <p class="$creator.role$">$creator.text$</p>
$endfor$
$if(publisher)$
  <p class="publisher">$publisher$</p>
$endif$
$if(date)$
  <p class="date">$date$</p>
$endif$
$if(rights)$
  <div class="rights">$rights$</div>
$endif$
$if(abstract)$
<div class="abstract">
<div class="abstract-title">$abstract-title$</div>
$abstract$
</div>
$endif$
</section>
$else$
$if(coverpage)$
<div id="cover-image">
<svg xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" 
height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" 
preserveAspectRatio="xMidYMid">
<image width="$cover-image-width$" height="$cover-image-height$" 
xlink:href="../media/$cover-image$" />
</svg>
</div>
$else$
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
$endif$
$endif$
</body>
</html>


On Tuesday, May 3, 2022 at 7:31:14 AM UTC-7 BP wrote:

> Searching for `$title$` elsewhere in the template and adjusting as needed 
> should do the trick.
>
> Den tis 3 maj 2022 01:09Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> Thanks, I gave it a try, removing the nested for and if starting at the 
>> line you highlighted, but it doesn't elicit the desired result. Opening up 
>> the epub, the aforementioned template lines affect something in the 
>> title_page.xhtml file, but the additional h1 level title remains in the 
>> ch001.xhtml file. There is no other explicit h1 heading in the template.
>>
>> On Saturday, April 30, 2022 at 12:30:10 AM UTC-7 BP wrote:
>>
>>> The "problem" is that the title from the metadata is inserted as a level 
>>> 1 heading. I believe this is done by the template.
>>>
>>>
>>> https://github.com/jgm/pandoc/blob/c1105e6b06d7436f43236191e32156a863de0e13/data/templates/default.epub3#L24
>>>
>>> You can make a copy of the default template, remove that part and use 
>>> that as your custom template.
>>>
>>> Den tors 28 apr. 2022 04:50Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>>
>>>> Hi,
>>>> if I start a markdown file with a level 2 heading (## Introduction), 
>>>> then, only in the epub output, there is a level 1 heading with the same 
>>>> title as the book. html and pdf start with the level 2 heading, no problem. 
>>>> How can I prevent the creation of this spurious heading? Thanks
>>>>
>>>>
>>>> Antonio
>>>>
>>>> cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)
>>>>
>>>> minimal example:
>>>>
>>>> ---
>>>> title: "Minimal"
>>>> ---
>>>>
>>>>
>>>> ## Introduction
>>>>
>>>>
>>>> bla bla bla
>>>>
>>>> # Chapter Uno
>>>>
>>>> Bla bla bla
>>>>
>>>>
>>>> -- 
>>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%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/23782580-07fb-451c-8b1c-0accbeb09a07n%40googlegroups.com.

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

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

* Re: Additional level 1 heading, only in epub
       [not found]                 ` <23782580-07fb-451c-8b1c-0accbeb09a07n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-05-03 17:28                   ` BPJ
       [not found]                     ` <CADAJKhAJ0wqtoC_N495hqn+Pimj=1O1NTWo_Aj5cEFkX1283zg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BPJ @ 2022-05-03 17:28 UTC (permalink / raw)
  To: pandoc-discuss

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

Then it must be something the writer is doing, which is beyond my knowledge.

A shot from the hip: what happens if you define `pagetitle` rather than
`title` in your metadata? It wouldn't surprise me if you get an error but
it may be worth a try.

Den tis 3 maj 2022 17:35Antonio Piccolboni <piccolbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> The only occurrence is at the line you linked to and I tried replacing
> $title$ with a random string to see where it pops up and it is in the title
> page. I don't see any other.  Here is default.epub3 that I am using. Thanks
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="
> http://www.idpf.org/2007/ops"$if(lang)$ xml:lang="$lang$"$endif$>
> <head>
>   <meta charset="utf-8" />
>   <meta name="generator" content="pandoc" />
>   <title>$pagetitle$</title>
>   <style>
>     $styles.html()$
> $if(highlighting-css)$
>     $highlighting-css$
> $endif$
>   </style>
> $for(css)$
>   <link rel="stylesheet" type="text/css" href="$css$" />
> $endfor$
> $for(header-includes)$
>   $header-includes$
> $endfor$
> </head>
> <body$if(coverpage)$ id="cover"$endif$$if(body-type)$
> epub:type="$body-type$"$endif$>
> $if(titlepage)$
> <section epub:type="titlepage" class="titlepage">
> $for(title)$
> $if(title.type)$
>   <h1 class="$title.type$">$title.text$</h1>
> $else$
>   <h1 class="title">$title$</h1>
> $endif$
> $endfor$
> $if(subtitle)$
>   <p class="subtitle">$subtitle$</p>
> $endif$
> $for(author)$
>   <p class="author">$author$</p>
> $endfor$
> $for(creator)$
>   <p class="$creator.role$">$creator.text$</p>
> $endfor$
> $if(publisher)$
>   <p class="publisher">$publisher$</p>
> $endif$
> $if(date)$
>   <p class="date">$date$</p>
> $endif$
> $if(rights)$
>   <div class="rights">$rights$</div>
> $endif$
> $if(abstract)$
> <div class="abstract">
> <div class="abstract-title">$abstract-title$</div>
> $abstract$
> </div>
> $endif$
> </section>
> $else$
> $if(coverpage)$
> <div id="cover-image">
> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="
> http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%"
> viewBox="0 0 $cover-image-width$ $cover-image-height$"
> preserveAspectRatio="xMidYMid">
> <image width="$cover-image-width$" height="$cover-image-height$"
> xlink:href="../media/$cover-image$" />
> </svg>
> </div>
> $else$
> $for(include-before)$
> $include-before$
> $endfor$
> $body$
> $for(include-after)$
> $include-after$
> $endfor$
> $endif$
> $endif$
> </body>
> </html>
>
>
> On Tuesday, May 3, 2022 at 7:31:14 AM UTC-7 BP wrote:
>
>> Searching for `$title$` elsewhere in the template and adjusting as needed
>> should do the trick.
>>
>> Den tis 3 maj 2022 01:09Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> Thanks, I gave it a try, removing the nested for and if starting at the
>>> line you highlighted, but it doesn't elicit the desired result. Opening up
>>> the epub, the aforementioned template lines affect something in the
>>> title_page.xhtml file, but the additional h1 level title remains in the
>>> ch001.xhtml file. There is no other explicit h1 heading in the template.
>>>
>>> On Saturday, April 30, 2022 at 12:30:10 AM UTC-7 BP wrote:
>>>
>>>> The "problem" is that the title from the metadata is inserted as a
>>>> level 1 heading. I believe this is done by the template.
>>>>
>>>>
>>>> https://github.com/jgm/pandoc/blob/c1105e6b06d7436f43236191e32156a863de0e13/data/templates/default.epub3#L24
>>>>
>>>> You can make a copy of the default template, remove that part and use
>>>> that as your custom template.
>>>>
>>>> Den tors 28 apr. 2022 04:50Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> skrev:
>>>>
>>>>> Hi,
>>>>> if I start a markdown file with a level 2 heading (## Introduction),
>>>>> then, only in the epub output, there is a level 1 heading with the same
>>>>> title as the book. html and pdf start with the level 2 heading, no problem.
>>>>> How can I prevent the creation of this spurious heading? Thanks
>>>>>
>>>>>
>>>>> Antonio
>>>>>
>>>>> cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)
>>>>>
>>>>> minimal example:
>>>>>
>>>>> ---
>>>>> title: "Minimal"
>>>>> ---
>>>>>
>>>>>
>>>>> ## Introduction
>>>>>
>>>>>
>>>>> bla bla bla
>>>>>
>>>>> # Chapter Uno
>>>>>
>>>>> Bla bla bla
>>>>>
>>>>>
>>>>> --
>>>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%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/23782580-07fb-451c-8b1c-0accbeb09a07n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/23782580-07fb-451c-8b1c-0accbeb09a07n%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/CADAJKhAJ0wqtoC_N495hqn%2BPimj%3D1O1NTWo_Aj5cEFkX1283zg%40mail.gmail.com.

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

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

* Re: Additional level 1 heading, only in epub
       [not found]                     ` <CADAJKhAJ0wqtoC_N495hqn+Pimj=1O1NTWo_Aj5cEFkX1283zg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-05-08  5:52                       ` Antonio Piccolboni
  0 siblings, 0 replies; 7+ messages in thread
From: Antonio Piccolboni @ 2022-05-08  5:52 UTC (permalink / raw)
  To: pandoc-discuss


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

Epub generation fails. Title is mandatory. Thanks

On Tuesday, May 3, 2022 at 10:28:33 AM UTC-7 BPJ wrote:

> Then it must be something the writer is doing, which is beyond my 
> knowledge.
>
> A shot from the hip: what happens if you define `pagetitle` rather than 
> `title` in your metadata? It wouldn't surprise me if you get an error but 
> it may be worth a try.
>
> Den tis 3 maj 2022 17:35Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> The only occurrence is at the line you linked to and I tried replacing 
>> $title$ with a random string to see where it pops up and it is in the title 
>> page. I don't see any other.  Here is default.epub3 that I am using. Thanks
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE html>
>> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="
>> http://www.idpf.org/2007/ops"$if(lang)$ xml:lang="$lang$"$endif$>
>> <head>
>>   <meta charset="utf-8" />
>>   <meta name="generator" content="pandoc" />
>>   <title>$pagetitle$</title>
>>   <style>
>>     $styles.html()$
>> $if(highlighting-css)$
>>     $highlighting-css$
>> $endif$
>>   </style>
>> $for(css)$
>>   <link rel="stylesheet" type="text/css" href="$css$" />
>> $endfor$
>> $for(header-includes)$
>>   $header-includes$
>> $endfor$
>> </head>
>> <body$if(coverpage)$ id="cover"$endif$$if(body-type)$ 
>> epub:type="$body-type$"$endif$>
>> $if(titlepage)$
>> <section epub:type="titlepage" class="titlepage">
>> $for(title)$
>> $if(title.type)$
>>   <h1 class="$title.type$">$title.text$</h1>
>> $else$
>>   <h1 class="title">$title$</h1>
>> $endif$
>> $endfor$
>> $if(subtitle)$
>>   <p class="subtitle">$subtitle$</p>
>> $endif$
>> $for(author)$
>>   <p class="author">$author$</p>
>> $endfor$
>> $for(creator)$
>>   <p class="$creator.role$">$creator.text$</p>
>> $endfor$
>> $if(publisher)$
>>   <p class="publisher">$publisher$</p>
>> $endif$
>> $if(date)$
>>   <p class="date">$date$</p>
>> $endif$
>> $if(rights)$
>>   <div class="rights">$rights$</div>
>> $endif$
>> $if(abstract)$
>> <div class="abstract">
>> <div class="abstract-title">$abstract-title$</div>
>> $abstract$
>> </div>
>> $endif$
>> </section>
>> $else$
>> $if(coverpage)$
>> <div id="cover-image">
>> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="
>> http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" 
>> viewBox="0 0 $cover-image-width$ $cover-image-height$" 
>> preserveAspectRatio="xMidYMid">
>> <image width="$cover-image-width$" height="$cover-image-height$" 
>> xlink:href="../media/$cover-image$" />
>> </svg>
>> </div>
>> $else$
>> $for(include-before)$
>> $include-before$
>> $endfor$
>> $body$
>> $for(include-after)$
>> $include-after$
>> $endfor$
>> $endif$
>> $endif$
>> </body>
>> </html>
>>
>>
>> On Tuesday, May 3, 2022 at 7:31:14 AM UTC-7 BP wrote:
>>
>>> Searching for `$title$` elsewhere in the template and adjusting as 
>>> needed should do the trick.
>>>
>>> Den tis 3 maj 2022 01:09Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>>
>>>> Thanks, I gave it a try, removing the nested for and if starting at the 
>>>> line you highlighted, but it doesn't elicit the desired result. Opening up 
>>>> the epub, the aforementioned template lines affect something in the 
>>>> title_page.xhtml file, but the additional h1 level title remains in the 
>>>> ch001.xhtml file. There is no other explicit h1 heading in the template.
>>>>
>>>> On Saturday, April 30, 2022 at 12:30:10 AM UTC-7 BP wrote:
>>>>
>>>>> The "problem" is that the title from the metadata is inserted as a 
>>>>> level 1 heading. I believe this is done by the template.
>>>>>
>>>>>
>>>>> https://github.com/jgm/pandoc/blob/c1105e6b06d7436f43236191e32156a863de0e13/data/templates/default.epub3#L24
>>>>>
>>>>> You can make a copy of the default template, remove that part and use 
>>>>> that as your custom template.
>>>>>
>>>>> Den tors 28 apr. 2022 04:50Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>>>> skrev:
>>>>>
>>>>>> Hi,
>>>>>> if I start a markdown file with a level 2 heading (## Introduction), 
>>>>>> then, only in the epub output, there is a level 1 heading with the same 
>>>>>> title as the book. html and pdf start with the level 2 heading, no problem. 
>>>>>> How can I prevent the creation of this spurious heading? Thanks
>>>>>>
>>>>>>
>>>>>> Antonio
>>>>>>
>>>>>> cmd: *pandoc* -s  minimal.md -o  minimal.pdf (or epub, or html)
>>>>>>
>>>>>> minimal example:
>>>>>>
>>>>>> ---
>>>>>> title: "Minimal"
>>>>>> ---
>>>>>>
>>>>>>
>>>>>> ## Introduction
>>>>>>
>>>>>>
>>>>>> bla bla bla
>>>>>>
>>>>>> # Chapter Uno
>>>>>>
>>>>>> Bla bla bla
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.com 
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/4c62d794-40d8-44c2-b444-42c701654c50n%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/23782580-07fb-451c-8b1c-0accbeb09a07n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/23782580-07fb-451c-8b1c-0accbeb09a07n%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/786272d7-7467-4136-84f1-9708e1e3194fn%40googlegroups.com.

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

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

end of thread, other threads:[~2022-05-08  5:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28  2:49 Additional level 1 heading, only in epub Antonio Piccolboni
     [not found] ` <55088d13-2a2f-4cd7-b865-2d5e32c44911n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-04-30  7:29   ` BPJ
     [not found]     ` <CADAJKhAj0-S3QgMSLOddvp2=QvKXgqbSvkb=U1T_k-NCS4CFzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-02 23:08       ` Antonio Piccolboni
     [not found]         ` <4c62d794-40d8-44c2-b444-42c701654c50n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-03 14:31           ` BPJ
     [not found]             ` <CADAJKhDUjs13moUqepKrysjLk66gOTH9yrj3-c-necyy-1z5Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-03 15:34               ` Antonio Piccolboni
     [not found]                 ` <23782580-07fb-451c-8b1c-0accbeb09a07n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-03 17:28                   ` BPJ
     [not found]                     ` <CADAJKhAJ0wqtoC_N495hqn+Pimj=1O1NTWo_Aj5cEFkX1283zg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-08  5:52                       ` Antonio Piccolboni

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