From: Martin Post <martinpostberlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: chunkedhtml - metadata variable for template reset after first chunk
Date: Mon, 13 Feb 2023 03:32:49 -0800 (PST) [thread overview]
Message-ID: <b8b475d4-9741-41b0-add8-8b057e6e867fn@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1476 bytes --]
I’m running Pandoc from a shell script, with multiple passes. The HTML
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 navigation in a conditional (simplified
here):
$-- $if(document-type-chunked)$
<nav class="sitenav">
<a href="$next.url$">$next.title$</a>$ <a
href="$previous.url$">$previous.title$</a>
</nav>
$-- $endif$
In the shell script, I set this meta variable (document-type-chunked):
pandoc --standalone $(basename $file) --to=chunkedhtml --metadata
document-type-chunked=true --output=${outputname%.*}
The metadata variable 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 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 "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/b8b475d4-9741-41b0-add8-8b057e6e867fn%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1867 bytes --]
next reply other threads:[~2023-02-13 11:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 11:32 Martin Post [this message]
[not found] ` <b8b475d4-9741-41b0-add8-8b057e6e867fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-13 11:53 ` 'William Lupton' via pandoc-discuss
[not found] ` <CAEe_xxhfNevy=fxs1yvLN3zxVm=Z8exGVyXL3s3yNMYm3cCT_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-02-13 12:01 ` Martin Post
[not found] ` <b065b793-9825-41a8-89f0-a315f6d70e26n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-13 13:44 ` Martin Post
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8b475d4-9741-41b0-add8-8b057e6e867fn@googlegroups.com \
--to=martinpostberlin-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).