From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32172 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Post Newsgroups: gmane.text.pandoc Subject: Re: chunkedhtml - metadata variable for template reset after first chunk Date: Mon, 13 Feb 2023 04:01:25 -0800 (PST) Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1862_108524253.1676289685218" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14987"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCHYFZ6CWYNBBFWNVCPQMGQE6OXSJNY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Feb 13 13:01:30 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f192.google.com ([209.85.160.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pRXWU-0003le-CP for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 13 Feb 2023 13:01:30 +0100 Original-Received: by mail-qt1-f192.google.com with SMTP id bz17-20020a05622a1e9100b003b9c1013018sf7255573qtb.18 for ; Mon, 13 Feb 2023 04:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=S74FEcAMFnEZyJcKC4YbokOcflVyuzn+/6hwqgKk3n8=; b=fNxue6fdU/BNd+uYh4El9ijbJEVFVJdF/e+o5oyJr6AxAnKW32uQza0h/6nimsb9Gt 1DVUHg7bf5HHOmxU/pSyYqAvxdFdYw4YTbMv5DMGLOE4nK/sulWh0rc0J5fpxum+PQPX 0lsEI6oXdxVgCkz92kdYg01NkXbNDpsmcmzaVHurXeTa4YtUr4VktE71++8CdTzusyvQ bUfEhBZUFNqVxWqfCDNVihNuLxZZACNSg0vSFB66en6LrATB7rO8PPpkJ8HVMz976doo b8B2uXvJzmfMc6euXojzPJDfhNl/pz8HJbOPhpEM5TiY57ZGxlRGdTxNHIbLRAKR2Qnn YSRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=S74FEcAMFnEZyJcKC4YbokOcflVyuzn+/6hwqgKk3n8=; b=AtzPpaEiYWxYBeXZmC5fmBFJ1BktDB6K1CF6az2Wsqzy3NFeU0zwmz+pdi6zvxKV0S 9NNgVO8XddxhGgr7wGSTC4y7AYSrvgm+1m72Q5LSsZe32jq9JnK/W8D7syU25zQvZf1C wcn5EthoqKU4FXuJJ5q74MBrFq+c5vytdk11f9W98hKYX5XTbXtrKqQLKjNk7bo65NQe 8vSE/oUSbeKUlVUc86Aw0id8zOVHCjrBPyq+bfK9hbmmusbwEKC4XCr9Qurl18WescFW PaJhkF1G4dQjYD01QHbJymlrvJaiYNppIrk6fYInMOcukr7tkbFFH3OgWIfeCH2aYiZM ZYFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=S74FEcAMFnEZyJcKC4YbokOcflVyuzn+/6hwqgKk3n8=; b=5vRonn4k+BgAJvCcCuI/V41uMUA0kAlhWz9PmEpRbxU5DbwXWWBrn8mvCglkuymcZb mXdxVhrO3kfgE4nu6531fGpQ7A6coNlpL/D6FEkXEO+VDgHbbUse+t/LFK7PgK2ktiyJ Mw3yDsXlmmlNB5GX4Ph6j/HKwWYCcsrP0eMH/oSDTzsxbFo4fiueGf5JShxiXWyOSFd3 vVdKTca2EfEoTRYTP1yMLandfPt5zzNOR/gjoDHB5ozMqLuAcnPuPlzbea3ldT6SEG9p 2TUs3ekt/rmUQS/XCKXzuL1NzDIcxN7prZYjRE57ewDGeGVChrpQF4/ErV2zO27Y9zEo 6B+w== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUcz840kFHj+VPujV5s6gxt/SR/shHKE0udBPCuoxYl+6eFLw7+ 3kod/FIy50xTVVR2cGJNEKY= X-Google-Smtp-Source: AK7set+8CHRnQl8XmTJONYoKBPS7QwpM5fFx3ZXeL1mZeGHO7uyg9I8WiPKnjFykZO5NvGgaGqEmVA== X-Received: by 2002:a37:b205:0:b0:73b:5223:e9a3 with SMTP id b5-20020a37b205000000b0073b5223e9a3mr25609qkf.148.1676289689203; Mon, 13 Feb 2023 04:01:29 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:68b:0:b0:3b8:130d:4473 with SMTP id f11-20020ac8068b000000b003b8130d4473ls13160853qth.10.-pod-prod-gmail; Mon, 13 Feb 2023 04:01:26 -0800 (PST) X-Received: by 2002:a05:622a:1814:b0:3b6:45a8:6b13 with SMTP id t20-20020a05622a181400b003b645a86b13mr2920491qtc.137.1676289685777; Mon, 13 Feb 2023 04:01:25 -0800 (PST) In-Reply-To: X-Original-Sender: MartinPostBerlin-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:32172 Archived-At: ------=_Part_1862_108524253.1676289685218 Content-Type: multipart/alternative; boundary="----=_Part_1863_2103167997.1676289685218" ------=_Part_1863_2103167997.1676289685218 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable No, the toc is different from the chunkedhtml nav links (top, next.url,=20 previous.url). And these are available. It=E2=80=99s just that the metadata= =20 variable that I use to conditionally place the navigation section is lost= =20 with --to=3Dchunkedhtml. William Lupton schrieb am Montag, 13. Februar 2023 um 12:53:40 UTC+1: > I haven't used chunked html, but did notice this in the manual. Not sure= =20 > whether this affects you here... > > > *The navigation links can be customized by adjusting the template. By=20 > default, a table of contents is included only on the top page. To include= =20 > it on every page, set the toc variable manually.* > > https://pandoc.org/MANUAL.html#chunked-html > > On Mon, 13 Feb 2023 at 11:32, Martin Post wrote: > >> I=E2=80=99m running Pandoc from a shell script, with multiple passes. Th= e HTML=20 >> template I am using here is fairly complex and should be used both for h= tml=20 >> and chunkedhtml output. >> >> In the template, I have placed a navigation in a conditional (simplified= =20 >> here): >> >> $-- $if(document-type-chunked)$ >> >> $-- $endif$ >> >> In the shell script, I set this meta variable (document-type-chunked): >> >> pandoc --standalone $(basename $file) --to=3Dchunkedhtml --metadata=20 >> document-type-chunked=3Dtrue --output=3D${outputname%.*} >> >> The metadata variable is still true for the first page of the chunked=20 >> output (index.html), but not for the remaining chunks, so they get no=20 >> navigation. >> >> Am I making a mistake? >> >> I realize I could also put conditionals around each single navigation=20 >> item ($if(next.url)$), but it would be easier to build complex templates= if=20 >> I could pass a variable to the template. >> >> Could this be resolved differently? >> >> Thank you. >> >> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/b8b475d4-9741-41b0-add8= -8b057e6e867fn%40googlegroups.com=20 >> >> . >> > --=20 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 e= mail 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/b065b793-9825-41a8-89f0-a315f6d70e26n%40googlegroups.com. ------=_Part_1863_2103167997.1676289685218 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable No, the toc is different from the chunkedhtml nav links (top, next.url, pre= vious.url). And these are available. It=E2=80=99s just that the metadata va= riable that I use to conditionally place the=C2=A0navigation=C2=A0section i= s lost with --to=3Dchunkedhtml.

William Lupton schrieb am Montag, 13. Feb= ruar 2023 um 12:53:40 UTC+1:
I haven't used chunked html, but did n= otice this in the manual. Not sure whether this affects you here...
The navigation links can be customized by adjusting the temp= late. By default, a table of contents is included only on the top page. To = include it on every page, set the toc variable manually.
=

On Mon, 13 Feb 2023 at 11:32, Martin Post <martinpo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
<= /div>
I=E2=80=99m running Pandoc from a shell script, with multiple = passes. The HTML template I am using here is fairly complex and should be u= sed both for html and chunkedhtml output.

In the template, I have pl= aced a navigation in a conditional (simplified here):

$-- $if(docume= nt-type-chunked)$
<nav class=3D"sitenav">
<a href= =3D"$next.url$">$next.title$</a>$ <a href=3D"$pr= evious.url$">$previous.title$</a>
</nav>
$-- $end= if$

In the shell script, I set this meta variable (document-type-chu= nked):

pandoc --standalone $(basename $file) --to=3Dchunkedhtml --me= tadata document-type-chunked=3Dtrue --output=3D${outputname%.*}

The = metadata variable is still true for the first page of the chunked output (i= ndex.html), but not for the remaining chunks, so they get no navigation.
Am I making a mistake?

I realize I could also put conditionals = around each single navigation item ($if(next.url)$), but it would be easier= to build complex templates if I could pass a variable to the template.
=
Could this be resolved differently?

Thank you.

--
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...@googleg= roups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b8b475d4-9= 741-41b0-add8-8b057e6e867fn%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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/b065b793-9825-41a8-89f0-a315f6d70e26n%40googlegroups.= com.
------=_Part_1863_2103167997.1676289685218-- ------=_Part_1862_108524253.1676289685218--