public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "R (Chandra) Chandrasekhar" <chyavana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Is there a YAML metadata option for `--shift-heading-level-by` on the command line?
Date: Tue, 7 Jun 2022 13:31:02 +0530	[thread overview]
Message-ID: <884ca060-dab6-8730-fe09-a46d66238883@gmail.com> (raw)
In-Reply-To: <c8075c7b-cddd-10ba-f2da-32089bfd62ae-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

So far, I have succeeded in getting the desired numbering by:

1. Adding

shift-heading-level-by: -1

after the line specifying the reader in my defaults file.

2. Adding

numbersections: true

in the YAML metadata block that specifies the title, etc., in my source 
file.

Thus, I get 1 for the first level-2 heading in my source file. Moreover, 
I can turn the numbering on or off per individual source file from its 
YAML metadata block, rather than having to generate a separate default 
file just for turning section numbering on or off with 1 for level-2 
headings.

However, if I move the line

shift-heading-level-by: -1

from the defaults file to the YAML metadata block in my source file, the 
numbering starts at 0.1 rather than 1 for the first level-2 heading.

Finally, I have found that there are three ways to turn numbering on or off:

(a) to turn section numbering on in the

command line, I need to use

`--number-sections`

(b) to turn it on in the defaults file I need to specify

`number-sections: true`

(c) but to turn it on in the YAML metadata block, I need to specify

`numbersections: true` without an intervening hyphen.

Is this deliberate or an artefact of history?

Chandra
2022-06-07

On 06/06/2022 23:28, R (Chandra) Chandrasekhar wrote:
> All my section headings start at level 2, and I wish to number them 
> starting at that level, with no numeric prefix.
> 
> I am also hoping that I would be able to enshrine my choice in a default 
> file.
> 
> Is there a YAML metadata option for `--shift-heading-level-by` on the 
> command line that could either be used in a defaults file, or in the 
> YAML metadata block of the source file??
> 
> Thanks.
> 
> Chandra


  parent reply	other threads:[~2022-06-07  8:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 17:58 R (Chandra) Chandrasekhar
     [not found] ` <c8075c7b-cddd-10ba-f2da-32089bfd62ae-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-06-07  8:01   ` R (Chandra) Chandrasekhar [this message]
     [not found]     ` <884ca060-dab6-8730-fe09-a46d66238883-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-06-07 13:58       ` 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=884ca060-dab6-8730-fe09-a46d66238883@gmail.com \
    --to=chyavana-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).