public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Matthew Pickering <matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Limit Heading Numbering Depth (Feature Wish)
Date: Mon, 19 Jan 2015 23:37:37 +0000	[thread overview]
Message-ID: <CALuQ0m_R9e5Vfb569eaUHzdwvy-mU-SX66MO+VBWYreiR5c7KA@mail.gmail.com> (raw)
In-Reply-To: <757e3675-1a0a-4081-9126-298b501dff4c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

This is very easy to achieve with a filter.

https://gist.github.com/mpickering/ffa67748a9ca7a2ac7c8

usage

pandoc -f markdown -t .... --filter=scrub.hs



On Mon, Jan 19, 2015 at 10:25 PM, Tim Hill <drtimhill-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I would love to see a command line switch "--numbering-depth" in Pandoc that
> works in a similar manner to "--toc-depth" but for section numbering.
>
> Rationale: We create documents with four levels of heading (H1 to H4 in HTML
> parlance), but only with H1 and H2 to be numbered (H3 is used for API names
> and H4 for paragraph headings). At present, we can do this by marking the
> H3/H4 headings as unnumbered, something like:
>
> ### Some Heading {-}
>
> It works well, BUT I have a couple of issues with this. First, I can't tell
> you how often our documentation guys forget to add that "{-}" tag. Second, I
> don't like the idea of decorating a markdown file with something that really
> feels more to me like output policy.
>
> So my wish is that I can use something like "--number-sections
> --numbering-depth 2" to limit section numbering to H1/H2 only.
>
> I *suspect* there might be a way to do this already, but I've poked at style
> sheets and various options and haven't found anything except the "{-}" tags.
>
> Good/bad idea?
> --Tim
>
> --
> 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/757e3675-1a0a-4081-9126-298b501dff4c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


  parent reply	other threads:[~2015-01-19 23:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 22:25 Tim Hill
     [not found] ` <757e3675-1a0a-4081-9126-298b501dff4c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-19 22:49   ` John MacFarlane
2015-01-19 23:37   ` Matthew Pickering [this message]
     [not found]     ` <CALuQ0m_R9e5Vfb569eaUHzdwvy-mU-SX66MO+VBWYreiR5c7KA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-19 23:46       ` 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=CALuQ0m_R9e5Vfb569eaUHzdwvy-mU-SX66MO+VBWYreiR5c7KA@mail.gmail.com \
    --to=matthewtpickering-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).