From: Piero Grandesso <piero.tasso-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: table-of-contents vs toc behavior
Date: Fri, 3 Nov 2017 04:01:39 -0700 (PDT) [thread overview]
Message-ID: <afe3b9e2-d7b7-45e7-87d6-422b9dd5a378@googlegroups.com> (raw)
In-Reply-To: <20171102192715.GD18456@protagoras>
[-- Attachment #1.1: Type: text/plain, Size: 2960 bytes --]
Thanks for you answer, it is clearer to me now.
While I prefer the possibility to set every option through YAML, I see
there is the possibility to set --toc on the command line and then disable
for a single file with `toc: false`, which is fine to me.
(I am currently working on a workflow for scholarly journals where editors
should be able to set this kind of options at paper level, in YAML
metadata; I will publish documentation and code as soon as I am ready)
Meanwhile I found a probably known discrepancy with --number-sections:
with `numbersections: false` in YAML I can override the flag set on command
line, but it has effect only in PDF/LaTeX, not in HTML.
Having no option in HTML template I suppose this is something not so
straightforward.
Il giorno giovedì 2 novembre 2017 20:26:59 UTC+1, John MacFarlane ha
scritto:
>
> It's not enough to set 'toc', you also need to set
> 'table-of-contents', since this is only set by the
> writer if you specify --toc on the command line.
>
> I suppose we could change things so that table-of-contents
> is populated if the 'toc' metadata field is set.
>
> +++ Piero Grandesso [Nov 02 17 15:38 ]:
> > Hi all,
> > I have some problems understanding the correct behavior of the
> > variables --toc and --table-of-contents.
> > As per this commit[1] I would expect that I could enable the
> generation
> > of the table of contents by simply inserting `toc: true` in my YAML
> > metadata block; the table of contents should then appear in my
> template
> > when invoked by `$table-of-contents$`. Is it correct or did I
> > misunderstood something?
> > If that is the desired behavior, than I think there could be a bug:
> > with `toc: true` specified in my [1]example.md, the following command
> > will produce an HTML file with an empty <nav> block:
> > pandoc [2]example.md -s -o example.html
> > to obtain a working table of contents I have to specify --toc:
> > pandoc [3]example.md --toc -s -o example.html
> > I am working with pandoc on linux, pandoc -v:
> > pandoc 2.0.1
> > Compiled with pandoc-types 1.17.2, texmath 0.9.4.4, skylighting 0.4.2
> > Thanks,
> > Piero
> > [1]:
> > [4]
> https://github.com/jgm/pandoc/commit/75f4e41d7d292e011a83d06efebc356
> > 060ea812b
> >
> >
>
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/afe3b9e2-d7b7-45e7-87d6-422b9dd5a378%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 5441 bytes --]
next prev parent reply other threads:[~2017-11-03 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 14:38 Piero Grandesso
[not found] ` <CAFMWPddryEf+8MoV6fCS84se871We6nx1q+cp=9L2gn3eMT=Dw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-02 19:27 ` John MACFARLANE
2017-11-03 11:01 ` Piero Grandesso [this message]
[not found] ` <afe3b9e2-d7b7-45e7-87d6-422b9dd5a378-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-03 16:40 ` John MACFARLANE
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=afe3b9e2-d7b7-45e7-87d6-422b9dd5a378@googlegroups.com \
--to=piero.tasso-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).