From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32170 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Post Newsgroups: gmane.text.pandoc Subject: chunkedhtml - metadata variable for template reset after first chunk Date: Mon, 13 Feb 2023 03:32:49 -0800 (PST) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6850_1206562965.1676287969617" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33012"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCHYFZ6CWYNBBY57VCPQMGQE5V6I3XI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Feb 13 12:32:54 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qk1-f190.google.com ([209.85.222.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pRX4o-0008Sd-8f for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 13 Feb 2023 12:32:54 +0100 Original-Received: by mail-qk1-f190.google.com with SMTP id z40-20020a05620a262800b0073b344eb74dsf1637945qko.10 for ; Mon, 13 Feb 2023 03:32:54 -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:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=N9hd9gwlwi5nUiZpUZaiT2bZBXhiDAEI/eW+qy+58hU=; b=QeEfak+UusrzdKjMVE2Y6Y5VAh84juaSECeIuKpjH0idXps6HPsp28Fpn/sXwJy5Lw kfShYNKe5gsx0aMb/W5MIHaaawO5TOZPqQ3Kjz2+4eELsnsPHsnbhfbyelOrGV3jGPTL AWkLA3IsfSLCoEAXBnM5BNUkB7no9gdBKXB2f5G4QpmxdOfNLEvTAv7UkjcVo0c5hLfO 8yTOWezDfZ9huCNNoQ4/EsoO4lRXGi2OAhg9SSmUVl9/3tj1MPXrz68mGR8kjMYJCw+y QzMpOUZhiW0zvPRfxzQAObZFElOyn3Xt6iw1W3Mh80OW2d++h/YtlfdRlb59jEpZ1aSb xYmw== 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:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=N9hd9gwlwi5nUiZpUZaiT2bZBXhiDAEI/eW+qy+58hU=; b=RkYGNoJboAaNZoX1SnCWF9dJ5gRH7Ebk7kPijkTyF3SKEWcNwxWGuTnWmXpWBEikW2 J0986hzxn61hBPExqU0LEG02QWIyLiXZbeJJfSFqJKHH1yIbvLTZeCb4IzeDeycCMXgl ev7fO9vGLA/zrqr9DB8yhRfPMSOcFNA0588/U10IbpzdQOnVBewJtM7DJTD1fVZZtko1 FHtXOOzc1bo630LwXpfdv6/YIEccxUCOdvlQa0WZ1Br/IwY4YWL58q6cLm/ksCf5ATLO zwAo5qS0S9p/8Fx/NNtMS+GUZ3p+xoRJGOQyYdkxF5WkNBTTQGTGWLSbEKzn+f32YRDy JM0g== 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:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=N9hd9gwlwi5nUiZpUZaiT2bZBXhiDAEI/eW+qy+58hU=; b=zOK/xMbqHw8jkxEi6f3q0XB041LyKRnk5W/l74CZEM3Og8fACpbQ3RQQiBQcitfagI OgB3Pl/UOcWz9eI/iJPr1VzfAf5uopuGjBeKHon+JjrPff+7OwVF1nwfaoNKUq/cUp/O Wwpyn4aKZwtpoTaXXcOCSL+iUyvB6YZw4R8ZKdEkPsXWZDCuuGdBEDVdNXAUru+A6rp0 zcAf3s8gaybtS2NB5jDhrv0ktWIr95OzeErMrb1he4EuwnhKs6BMXQodTYqUkNAC4B0y AW0h2xZwvLyEaavf/84H+0X9Qq9Dmf26yjHeD9ZghHYOAPpQfwioXbtVJkgovXgI1Uk/ eeow== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUqtJxwlJdwm5Wrw2+9BHoRhnOKBK730a0is8ByBr3xlsCL2KyY LNLh/7oRCtLCZY6CcH775ik= X-Google-Smtp-Source: AK7set+9AgL5aRFzzjYHMc4R3bacLOjrZkj56dd/cHDX+7/dZMxFnk3MJ3WILp+p7cSQXKA9BR9Kuw== X-Received: by 2002:a0c:b40e:0:b0:56b:f04a:d29b with SMTP id u14-20020a0cb40e000000b0056bf04ad29bmr1951276qve.6.1676287973229; Mon, 13 Feb 2023 03:32:53 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:4e06:0:b0:3b0:98a4:96b8 with SMTP id c6-20020ac84e06000000b003b098a496b8ls13126987qtw.8.-pod-prod-gmail; Mon, 13 Feb 2023 03:32:50 -0800 (PST) X-Received: by 2002:a05:622a:244:b0:3b8:6b71:5d51 with SMTP id c4-20020a05622a024400b003b86b715d51mr3664074qtx.174.1676287970240; Mon, 13 Feb 2023 03:32:50 -0800 (PST) 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:32170 Archived-At: ------=_Part_6850_1206562965.1676287969617 Content-Type: multipart/alternative; boundary="----=_Part_6851_1903908522.1676287969617" ------=_Part_6851_1903908522.1676287969617 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I=E2=80=99m running Pandoc from a shell script, with multiple passes. The H= TML=20 template I am using here is fairly complex and should be used both for html= =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 item= =20 ($if(next.url)$), but it would be easier to build complex templates if I=20 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 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/b8b475d4-9741-41b0-add8-8b057e6e867fn%40googlegroups.com. ------=_Part_6851_1903908522.1676287969617 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I=E2=80=99m running Pandoc from a shell script, with multiple passes. The H= TML template I am using here is fairly complex and should be used both for = html and chunkedhtml output.

In the template, I have placed a na= vigation in a conditional (simplified here):

$-- $if(document-ty= pe-chunked)$
<nav class=3D"sitenav">
<a href=3D"$next.ur= l$">$next.title$</a>$ <a href=3D"$previous.url$">$previous.t= itle$</a>
</nav>
$-- $endif$

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

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

The metadata variabl= e is still true for the first page of the chunked output (index.html), but = not for the remaining chunks, so they get no navigation.

Am I ma= king a mistake?

I realize I could also put conditionals around e= ach single navigation item ($if(next.url)$), but it would be easier to buil= d 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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/b8b475d4-9741-41b0-add8-8b057e6e867fn%40googlegroups.= com.
------=_Part_6851_1903908522.1676287969617-- ------=_Part_6850_1206562965.1676287969617--