From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11801 Path: news.gmane.org!not-for-mail From: Matthew Pickering Newsgroups: gmane.text.pandoc Subject: Re: Limit Heading Numbering Depth (Feature Wish) Date: Mon, 19 Jan 2015 23:37:37 +0000 Message-ID: References: <757e3675-1a0a-4081-9126-298b501dff4c@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1421710660 1481 80.91.229.3 (19 Jan 2015 23:37:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Jan 2015 23:37:40 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCO2LGEC4AIBBQVK62SQKGQERVNSQWA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jan 20 00:37:39 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-wi0-f191.google.com ([209.85.212.191]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YDLt5-0004Yk-FG for gtp-pandoc-discuss@m.gmane.org; Tue, 20 Jan 2015 00:37:39 +0100 Original-Received: by mail-wi0-f191.google.com with SMTP id n3sf1502913wiv.8 for ; Mon, 19 Jan 2015 15:37:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe; bh=3XQPLK7cV9X9rgXXm/Hrx2FMbPptFH+p5Ab4nx6qxSw=; b=zTV9grjRYqiqNaxmtrqVo6MAqGVW9LTywZx+G+bGcUWkhJHI+cZkrJcP5DBZfJ3inG voFi5X8lM3syg6MG/kn73VHusCNSqG7oFezgLpm9yBw82TbhIL1ZUGvRTihRoiTItjHQ 1BOdbGW6PgrlzYaaCtTPe+GL/ZSnCTo8N/WXk9Kw6VRyjgayAy69yte22sfrdkag4OmM okjPj76VO7Uy9BvhvgYHJOS4vVo0t8v+8k3tGnqU0Bd9OIjWGTC35Puc9ZD5kUeEUozZ pnkuK5M/mwJWAd+Qv+JvH993bBKme6sV9JJ42GWAIBfTkXvUYYdbcRO2m3fXrJMQs+sM UA4g== X-Received: by 10.152.5.226 with SMTP id v2mr608576lav.4.1421710659149; Mon, 19 Jan 2015 15:37:39 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.152.1.101 with SMTP id 5ls648938lal.72.gmail; Mon, 19 Jan 2015 15:37:38 -0800 (PST) X-Received: by 10.112.137.70 with SMTP id qg6mr1477lbb.14.1421710658099; Mon, 19 Jan 2015 15:37:38 -0800 (PST) Original-Received: from mail-la0-x232.google.com (mail-la0-x232.google.com. [2a00:1450:4010:c03::232]) by gmr-mx.google.com with ESMTPS id m9si1174748lbp.0.2015.01.19.15.37.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Jan 2015 15:37:38 -0800 (PST) Received-SPF: pass (google.com: domain of matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c03::232 as permitted sender) client-ip=2a00:1450:4010:c03::232; Original-Received: by mail-la0-x232.google.com with SMTP id pn19so31357822lab.9 for ; Mon, 19 Jan 2015 15:37:38 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr35254692lbc.91.1421710658012; Mon, 19 Jan 2015 15:37:38 -0800 (PST) Original-Received: by 10.114.91.136 with HTTP; Mon, 19 Jan 2015 15:37:37 -0800 (PST) In-Reply-To: <757e3675-1a0a-4081-9126-298b501dff4c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c03::232 as permitted sender) smtp.mail=matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com 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.org gmane.text.pandoc:11801 Archived-At: 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 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.