From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30527 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Antonio Piccolboni Newsgroups: gmane.text.pandoc Subject: Re: Additional level 1 heading, only in epub Date: Sat, 7 May 2022 22:52:54 -0700 (PDT) Message-ID: <786272d7-7467-4136-84f1-9708e1e3194fn@googlegroups.com> References: <55088d13-2a2f-4cd7-b865-2d5e32c44911n@googlegroups.com> <4c62d794-40d8-44c2-b444-42c701654c50n@googlegroups.com> <23782580-07fb-451c-8b1c-0accbeb09a07n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4390_1261252024.1651989174718" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8412"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC4KDA7JYIPRBN5V3WJQMGQEBSSI6CQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun May 08 07:52:59 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f64.google.com ([209.85.161.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nnZqk-0001zl-Up for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 08 May 2022 07:52:59 +0200 Original-Received: by mail-oo1-f64.google.com with SMTP id b8-20020a056820134800b0035f6e70c82csf1124393oow.2 for ; Sat, 07 May 2022 22:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=uH3nCxtVmUEEIfNRTZQJWM+wz9pSx+ISMnnAKTI+Las=; b=MGiKSlpw8NFjz9b25JRqDYvNeiEJ6MXKRcCl29O2qVKT2pBq83EUi1vBcxjDbgFTmJ HdOhv6wl1Q/3Ywhnn2w3CLAlUIlLSiQy0QJGiYJdqHHctu+ILcpbdWrzYjBXBLfftF9y UbMZway4CCDcj3ncvDQunh5OcoRO7Fv/AIuxc+etmdbEViqjRvy8MsUxIFwDztmdYPUI gufRpCHzX8hUodJTgkOz0GdBMndRfpI6ER0bUK+nbPAyITafwEj11+uX5ftJvqjmFtof IGvXhe/XiMn4410XkKo4Cc/AqsEqc4yY/Se6W5STCHBVvHqnvWvsUp0F7WpdGNWR97I8 zKYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=uH3nCxtVmUEEIfNRTZQJWM+wz9pSx+ISMnnAKTI+Las=; b=fzWaLizQLWOktFZQ05CnQhsI1I24LqyIMlT0Ctw8x+Hez7gIWjaO1VQbWDC97VgwdT rPDXAWj8BHVQrksQ026DT77FyuzC/hSvog+WrRbjWfF5Kr3/UARSNBVSeLQH+JSV8EQk zcOPZO8lqYFLk/4yhWYzgIGtfC8fykjH4E2j7a+DlhyLkS8t38ZaLjqulqZdGuvbuWEC XvuvUeTjCHsAFcTsJaqkOyKityvz1dD7nrqok9ybT1wuV/6L8vi5cqW8HrX9BYQK/UT5 8xlfrQy+A2v1iHDCG10uVi0X7oKtcofeV4dESnmYNXx5iRp9cpalpkRgH8H+pBkOwEJL tqrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=uH3nCxtVmUEEIfNRTZQJWM+wz9pSx+ISMnnAKTI+Las=; b=5HhUjGKmA5bUglhpupCt5wK37/RtvVg2d3zfrZfIeTZ5Hb6G88nJ7okHSXOouvD3XA LX32xTzs3V3wdP8EsjCO30VqhbeansrMOIFuUfrMuiPC1LslHQOW3VVqGKom9uBenzO3 NnK9SgJl7f7MmPAaPMN24XDui4lDfjFXCJp2rxDnaboxOJXKwMrwWfqPxwt2BzDThjKh UgGgqO3vpAUy3I53heQ47+FFBTr4V+6hoOCzsAa6s+d3nkxOsjReANCOiaBi+fxfvBM3 nWwPXi2Shi84aIO2/soIRYtOeylhwoke67D3W2q8WXLI6mj62VNpbFiq42EiPdUneAHA gg6Q== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5306MZw/r4y+yEn7WhEecsc/ttEvWSg5PN+CtidU15fmW0xv7jw4 JytK4xWjTRa8pdDCuU61kkA= X-Google-Smtp-Source: ABdhPJzj98dXuniMA/8UI+BWNMnxkzijDBMcX0JqSgCZYZap2Q9U5tUszdLOhXVVpphzHGTPfi/rUw== X-Received: by 2002:a05:6808:249:b0:326:5ccd:1688 with SMTP id m9-20020a056808024900b003265ccd1688mr8303155oie.9.1651989177875; Sat, 07 May 2022 22:52:57 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:23d2:b0:326:98c2:25a8 with SMTP id bq18-20020a05680823d200b0032698c225a8ls1810545oib.11.gmail; Sat, 07 May 2022 22:52:55 -0700 (PDT) X-Received: by 2002:a05:6808:170b:b0:2fa:729a:a42e with SMTP id bc11-20020a056808170b00b002fa729aa42emr8567578oib.0.1651989175265; Sat, 07 May 2022 22:52:55 -0700 (PDT) In-Reply-To: X-Original-Sender: piccolbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:30527 Archived-At: ------=_Part_4390_1261252024.1651989174718 Content-Type: multipart/alternative; boundary="----=_Part_4391_1871339342.1651989174718" ------=_Part_4391_1871339342.1651989174718 Content-Type: text/plain; charset="UTF-8" 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 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 >> >> >> >> >> >> >> >> >> $pagetitle$ >> >> $for(css)$ >> >> $endfor$ >> $for(header-includes)$ >> $header-includes$ >> $endfor$ >> >> > epub:type="$body-type$"$endif$> >> $if(titlepage)$ >>
>> $for(title)$ >> $if(title.type)$ >>

$title.text$

>> $else$ >>

$title$

>> $endif$ >> $endfor$ >> $if(subtitle)$ >>

$subtitle$

>> $endif$ >> $for(author)$ >>

$author$

>> $endfor$ >> $for(creator)$ >>

$creator.text$

>> $endfor$ >> $if(publisher)$ >>

$publisher$

>> $endif$ >> $if(date)$ >>

$date$

>> $endif$ >> $if(rights)$ >>
$rights$
>> $endif$ >> $if(abstract)$ >>
>>
$abstract-title$
>> $abstract$ >>
>> $endif$ >>
>> $else$ >> $if(coverpage)$ >>
>> > viewBox="0 0 $cover-image-width$ $cover-image-height$" >> preserveAspectRatio="xMidYMid"> >> > xlink:href="../media/$cover-image$" /> >> >>
>> $else$ >> $for(include-before)$ >> $include-before$ >> $endfor$ >> $body$ >> $for(include-after)$ >> $include-after$ >> $endfor$ >> $endif$ >> $endif$ >> >> >> >> >> 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 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 >>>>> 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 >>>>>> >>>>>> . >>>>>> >>>>> -- >>>> 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 >>>> >>>> . >>>> >>> -- >> 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 >> >> . >> > -- 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. ------=_Part_4391_1871339342.1651989174718 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 d= oing, which is beyond my knowledge.

A shot from the hip: what happens if you define `pagetitle` rather th= an `title` in your metadata? It wouldn't surprise me if you get an erro= r 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 yo= u 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.=C2=A0 H= ere is default.epub3 that I am using. Thanks


<= div><?xml version=3D"1.0" encoding=3D"UTF-8"?><!DOCTYPE html>
<html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:epub=3D"= ;http://www.idpf.org/2007/ops"$if(lang)$ xml:lang=3D"$lang$"$endif$>
<head>=
=C2=A0 <meta charset=3D"utf-8" />
=C2=A0 <meta na= me=3D"generator" content=3D"pandoc" />
=C2=A0 <= ;title>$pagetitle$</title>
=C2=A0 <style>
=C2=A0 =C2= =A0 $styles.html()$
$if(highlighting-css)$
=C2=A0 =C2=A0 $highlightin= g-css$
$endif$
=C2=A0 </style>
$for(css)$
=C2=A0 <link= rel=3D"stylesheet" type=3D"text/css" href=3D"$css= $" />
$endfor$
$for(header-includes)$
=C2=A0 $header-inclu= des$
$endfor$
</head>
<body$if(coverpage)$ id=3D"cov= er"$endif$$if(body-type)$ epub:type=3D"$body-type$"$endif$&g= t;
$if(titlepage)$
<section epub:type=3D"titlepage" clas= s=3D"titlepage">
$for(title)$
$if(title.type)$
=C2=A0= <h1 class=3D"$title.type$">$title.text$</h1>
$els= e$
=C2=A0 <h1 class=3D"title">$title$</h1>
$end= if$
$endfor$
$if(subtitle)$
=C2=A0 <p class=3D"subtitle&qu= ot;>$subtitle$</p>
$endif$
$for(author)$
=C2=A0 <p cla= ss=3D"author">$author$</p>
$endfor$
$for(creator)$=
=C2=A0 <p class=3D"$creator.role$">$creator.text$</p= >
$endfor$
$if(publisher)$
=C2=A0 <p class=3D"publisher= ">$publisher$</p>
$endif$
$if(date)$
=C2=A0 <p cl= ass=3D"date">$date$</p>
$endif$
$if(rights)$
= =C2=A0 <div class=3D"rights">$rights$</div>
$endif= $
$if(abstract)$
<div class=3D"abstract">
<div = class=3D"abstract-title">$abstract-title$</div>
$abst= ract$
</div>
$endif$
</section>
$else$
$if(cover= page)$
<div id=3D"cover-image">
<svg xmlns=3D"= ;
http://www.w3.org/2000/svg&qu= ot; xmlns:xlink=3D"http://= www.w3.org/1999/xlink" version=3D"1.1" width=3D"100= %" height=3D"100%" viewBox=3D"0 0 $cover-image-width$ $= cover-image-height$" preserveAspectRatio=3D"xMidYMid"><image width=3D"$cover-image-width$" height=3D"$cover-im= age-height$" xlink:href=3D"../media/$cover-image$" />
= </svg>
</div>
$else$
$for(include-before)$
$include= -before$
$endfor$
$body$
$for(include-after)$
$include-after$$endfor$
$endif$
$endif$
</body>
</html>

<= div>
On Tuesday, May 3, 2022 at 7:31:14 AM UTC-7 BP wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1p= x solid rgb(204,204,204);padding-left:1ex">
Searching for = `$title$` elsewhere in the template and adjusting as needed should do the t= rick.

=
Den tis 3 maj 2022 01:09Antonio Picco= lboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Tha= nks, I gave it a try, removing the nested for and if starting at the line y= ou highlighted, but it doesn't elicit the desired result. Opening up th= e epub, the aforementioned template lines affect something in the title_pag= e.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 Saturd= ay, April 30, 2022 at 12:30:10 AM UTC-7 BP wrote:
The "problem" is th= at the title from the metadata is inserted as a level 1 heading. I believe = this is done by the template.


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

De= n tors 28 apr. 2022 04:50Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Hi,
if I start a markdo= wn file with a level 2 heading (## Introduction), then, only in the epub ou= tput, 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 creat= ion of this spurious heading? Thanks


Antonio

cmd:=C2=A0pandoc -s=C2=A0 minimal= .md -o=C2=A0 minimal.pdf (or epub, or html)

minimal example:

---
title:= "Minimal"
---


## Introduction


bla bla b= la

# Chapter Uno

Bla bla bla

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus.= ..@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.c= om.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus...@googlegr= oups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus= ...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_4391_1871339342.1651989174718-- ------=_Part_4390_1261252024.1651989174718--