From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30511 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: Tue, 3 May 2022 08:34:46 -0700 (PDT) Message-ID: <23782580-07fb-451c-8b1c-0accbeb09a07n@googlegroups.com> References: <55088d13-2a2f-4cd7-b865-2d5e32c44911n@googlegroups.com> <4c62d794-40d8-44c2-b444-42c701654c50n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3995_1177739667.1651592086392" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24510"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC4KDA7JYIPRBF4XYWJQMGQECHBTV4A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 03 17:34:51 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f61.google.com ([209.85.160.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nluY6-00067V-LE for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 03 May 2022 17:34:50 +0200 Original-Received: by mail-oa1-f61.google.com with SMTP id 586e51a60fabf-ec4e7a087esf2731978fac.15 for ; Tue, 03 May 2022 08:34:50 -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=oPkPV2BH584HFUGiSsFRmZ/Vo36J1p29NeLS87DkGSI=; b=KUJPQGKvVZV4L1/19ymM3P5Nvx31Vtgx+Xn6RBqfdb68ePG+ije4IzD7BSs3T8wExm kpg89SZriqnasGDgJHR3MzlJ3iJi5Bd53+aNp0viwhuHAV0t4ELm800fk4z4QKt7t7r2 teFYrM5BDARRruph+B7i2Ys84Q8YqPSCI4L/CYUPC480E3NLcvCwk0GBXhc5Ev7K7JG9 QBbPAV+C/Yw8fLRRHwjrRdA0leiUWAh0FdY3bl62WRXlSGEXpmwlmsjC2xVXb5o8oQqp 76OhPL04SAhnrZwtbOiRnfeNMmNyoNjSDFgPWfTKNZ8M8y2vJm8vEyJW3bfIkFlWf3W+ DLHA== 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=oPkPV2BH584HFUGiSsFRmZ/Vo36J1p29NeLS87DkGSI=; b=GGO9b8TBPxL7LpDpSk3W3Z54Vlhdiksm0UaKdXtuYxIRI02erF1SNJQzLOALTESg66 mzMLSgxsmZSLG1ASH4X7nJXixVOfRlcN+K8Bu4zaCNUnBcKbo6RNUiwE4MqF3su2UJ9q XbW5l7kj13uskQpK/VAi812rWA+nugsM+nHwy7odke7idjaeUl14FHBT4Q8VXb1VuOQQ e40kTTZnEcMfT4XRC0Xtn0AwD6xeQXijY3tf35JXHx3hGzoeslFpHrmGjjysYz+/6uSX ixGBSO8LEB5QNgW1yCWPRAPqdjMdV04JMC5T7gN3Rp+KXc70WqSIttXu+gkfNnF8By6x yRWA== 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=oPkPV2BH584HFUGiSsFRmZ/Vo36J1p29NeLS87DkGSI=; b=jin0ZhW6LAS5NiEPCUJXj51kwrhbG6Nz7J57cCt5PUW+p5Rf1CnSJlRRJvVARwo15g GgcnzYMd1eqAqhtsogvjJzDqXo9gh4hKCulDay5Kw9DY/jWZLKOQw7ib7uh/JwKuvnvA 5mihchpp5Js4NufO/7STB+IwJu+aLChfQ0A4GfzXukjK+rdy82eRfH8weMwR94JTSDgd zn10MhTnJ4uetuFImFaitwUxBrdppph9VTdefgHoNVfAyOdbkNiPk8PBsQc8fZMi48PV RImTYb0fF3Af6my5uTax1cxYE31mJSt4DrGO6Uav6pCeBjWALVNhp3Th1DPeWROBxvdh wKMQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533PKLMiyAZqPYVfihAqZNUIeDk0zzLyE5osH8gveAkEhohcxTJ7 VC0xoYw+fsGrVhPsmlkZJaU= X-Google-Smtp-Source: ABdhPJzT1E1Bw1sCbnslsWOQJbk8Xhx4vZXnysiPO7CPrV2usGiHxfXgroZPbyPTjbQPf32ThPuhvw== X-Received: by 2002:a05:6808:55d:b0:325:8d2b:7c19 with SMTP id i29-20020a056808055d00b003258d2b7c19mr2051726oig.36.1651592089477; Tue, 03 May 2022 08:34:49 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:d683:b0:e5:d244:bf9f with SMTP id z3-20020a056870d68300b000e5d244bf9fls5488512oap.5.gmail; Tue, 03 May 2022 08:34:47 -0700 (PDT) X-Received: by 2002:a05:6870:41ca:b0:e9:c84:987a with SMTP id z10-20020a05687041ca00b000e90c84987amr1847714oac.149.1651592087027; Tue, 03 May 2022 08:34:47 -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:30511 Archived-At: ------=_Part_3995_1177739667.1651592086392 Content-Type: multipart/alternative; boundary="----=_Part_3996_1139312652.1651592086392" ------=_Part_3996_1139312652.1651592086392 Content-Type: text/plain; charset="UTF-8" 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$ $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)$
$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-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. ------=_Part_3996_1139312652.1651592086392 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The only occurrence is at the line you linked to and I tried replacing $tit= le$ with a random string to see where it pops up and it is in the title pag= e. I don't see any other.  Here is default.epub3 that I am using. Than= ks


<?xml version=3D"1.0" encoding=3D"U= TF-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>
  <meta charset=3D"utf-8"= />
  <meta name=3D"generator" content=3D"pandoc" />
&n= bsp; <title>$pagetitle$</title>
  <style>
&nbs= p;   $styles.html()$
$if(highlighting-css)$
    $highl= ighting-css$
$endif$
  </style>
$for(css)$
  &l= t;link rel=3D"stylesheet" type=3D"text/css" href=3D"$css$" />
$endfor= $
$for(header-includes)$
  $header-includes$
$endfor$
<= /head>
<body$if(coverpage)$ id=3D"cover"$endif$$if(body-type)$ epu= b:type=3D"$body-type$"$endif$>
$if(titlepage)$
<section epub:ty= pe=3D"titlepage" class=3D"titlepage">
$for(title)$
$if(title.type)= $
  <h1 class=3D"$title.type$">$title.text$</h1>
$el= se$
  <h1 class=3D"title">$title$</h1>
$endif$
$e= ndfor$
$if(subtitle)$
  <p class=3D"subtitle">$subtitle$&l= t;/p>
$endif$
$for(author)$
  <p class=3D"author">$a= uthor$</p>
$endfor$
$for(creator)$
  <p class=3D"$cr= eator.role$">$creator.text$</p>
$endfor$
$if(publisher)$
=   <p class=3D"publisher">$publisher$</p>
$endif$
$if= (date)$
  <p class=3D"date">$date$</p>
$endif$
$i= f(rights)$
  <div class=3D"rights">$rights$</div>
$e= ndif$
$if(abstract)$
<div class=3D"abstract">
<div class= =3D"abstract-title">$abstract-title$</div>
$abstract$
</d= iv>
$endif$
</section>
$else$
$if(coverpage)$
<d= iv id=3D"cover-image">
<svg xmlns=3D"http://www.w3.org/2000/svg" x= mlns: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$" pr= eserveAspectRatio=3D"xMidYMid">
<image width=3D"$cover-image-width= $" height=3D"$cover-image-height$" xlink:href=3D"../media/$cover-image$" /&= gt;
</svg>
</div>
$else$
$for(include-before)$
$= include-before$
$endfor$
$body$
$for(include-after)$
$include-a= fter$
$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 0= 1:09Antonio Piccolboni <picc.= ..@gmail.com> 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 affe= ct something in the title_page.xhtml file, but the additional h1 level titl= e 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 wro= te:
= The "problem" is that 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, re= move 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 m= arkdown file with a level 2 heading (## Introduction), then, only in the ep= ub 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:=C2=A0pandoc -s=C2=A0 mi= nimal.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...@googlegr= oups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pando= c-discuss/55088d13-2a2f-4cd7-b865-2d5e32c44911n%40googlegroups.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/23782580-07fb-451c-8b1c-0accbeb09a07n%40googlegroups.= com.
------=_Part_3996_1139312652.1651592086392-- ------=_Part_3995_1177739667.1651592086392--