From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31775 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rick Stanley Newsgroups: gmane.text.pandoc Subject: Re: man page indent Date: Sun, 20 Nov 2022 09:24:48 -0800 (PST) Message-ID: <329d7440-178e-40c1-b4fa-2dadaea66295n@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1452_573525953.1668965088621" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8978"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCH5HJXPPEIODRPJTMDBUBBZAIKGU-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Nov 20 18:24:54 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f190.google.com ([209.85.167.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1owo3p-00028O-2o for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 20 Nov 2022 18:24:53 +0100 Original-Received: by mail-oi1-f190.google.com with SMTP id bj30-20020a056808199e00b0035a0734664bsf3405382oib.8 for ; Sun, 20 Nov 2022 09:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=THl0EbxZNNifOwzgdCHU1T+vTgJumIrPW+bxJruYUq4=; b=Nd7nEOiby/FTGTuIisVnEI0HGQXbPhAxw6inNIT3xcfHEngr9OLa6n4pvhgZqhn8Qi IGokniKAyCjmpQdncTceruJToEWbGDIikkGDFoEqqkjNMQAU6T0qNwoKhtJbguHITkMG nwdjNczRuxQnsuywF3G0qFqpNifMJwtp7lUEO9R6ijAltimY9ZVqmLm9wZMm4mnWph7q lTpBQrfdEoj2gjKQ/fctKjNGHOaE/j9KiXXrGDy/phkqTwSZ/Jq6csepUDMrW0K13kg2 1hqj4VclB0oH15vBDG6OnfJrue8AnU30wqx7AAw+3NWGcN+OxhXEzZdG3pNviCH8xmxX A/qg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=THl0EbxZNNifOwzgdCHU1T+vTgJumIrPW+bxJruYUq4=; b=YfHRHNhIl5Ovu2aAjlE81FkSVTuqLQlK+n1C4/xSnD58/OuPJQI7QBsbq22fRNkqdx ak/YKK7sAvLNxdoz0vARKm1HZhMVse3xCmxhypKvoWuWWLQ5x+zsBmrnw1BWo/IsqG0N QG530K9OngyuQkhQ7ur26a6vJ88VFTWiSkycAi7gcFZfh/kLIPW2O0eTWDBdZxI8TU+n N7cGZg4Shvpp2JI+AvVGee7eF/oEYwdqg9TVjbJ/cjOP/TvgRri77yhrqKovKKSDQTnR RlCkAi0ubzA8QvCI0tChTNCe03MfnfAzk9lV7+jnm3qcCv7mD+z0Gx8UhndcF/qZEHGs 6jfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=THl0EbxZNNifOwzgdCHU1T+vTgJumIrPW+bxJruYUq4=; b=sh1YiJfkqT3Rno6rjpm1fwUko5neSbYrCW5i9TuV/i0m/ggjMO/GxJKkTT/VjdEe10 ZjRhDOiugRM2JdEkwj6Wr5P8qGR5xsT3qKk65mq3go5ASyMmdrNPBeK6dz7V15Ug6+rH 2dy9nXFrfSq+a+8eICmky0q5vFsW4qeRADHe9et2gWFtO7phofQWmAZaVoV6CDVFDcka x4uhCf6lMCQXtx53jik74Whlx2wVJ41dtCD47NasBX6mWjcjgRjHyiqeBsIQYBgSAlxp 7XOVrQgwGRikgMOo9dlU1ceRhPpZVyFhmLryt6lXw1TGUm0TX403t66VT2CXUlX+fbX2 ykBA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkSshYLfQZgWn5lYUwzBEC+DER6FJPMqZSKCkKF6tfn7jUiHMQv WLBpaIy9VJKa1fLf4dTvlMk= X-Google-Smtp-Source: AA0mqf6FwlkuNynDwYLuM1yEmH0rnRY2wY22XaHm3Dmguw0kkxGGmrxZMd66XLOm0S0ro+4wewBogQ== X-Received: by 2002:a05:6870:bc07:b0:142:82a0:36e6 with SMTP id oa7-20020a056870bc0700b0014282a036e6mr6803898oab.142.1668965091946; Sun, 20 Nov 2022 09:24:51 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:220b:b0:354:6639:a1f with SMTP id bd11-20020a056808220b00b0035466390a1fls2867044oib.0.-pod-prod-gmail; Sun, 20 Nov 2022 09:24:49 -0800 (PST) X-Received: by 2002:a05:6808:1d8:b0:35a:3e6f:3635 with SMTP id x24-20020a05680801d800b0035a3e6f3635mr7692745oic.63.1668965089414; Sun, 20 Nov 2022 09:24:49 -0800 (PST) In-Reply-To: X-Original-Sender: Rick.Stanley.Inc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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.io gmane.text.pandoc:31775 Archived-At: ------=_Part_1452_573525953.1668965088621 Content-Type: multipart/alternative; boundary="----=_Part_1453_290036547.1668965088621" ------=_Part_1453_290036547.1668965088621 Content-Type: text/plain; charset="UTF-8" In any Standard Library man page, that displays example code, the line "Program Source" is indented by 4 spaces, and the source code is indented by 8. In creating my own man page, using pandoc, the "Program Source" line is indented by 8, and my source is indented by 16 spaces. I would prefer the same indentation for all my man pages. I don't have lua installed and would prefer not to use if if at all possible. I am writing pure C. Thank you! On Sunday, November 20, 2022 at 11:57:59 AM UTC-5 fiddlosopher wrote: > Are you saying you want code blocks to be indented to the same level as > the man page's body text? > > You could achieve that with a lua filter that resets paragraph indentation > before each code block. Save this as unindent_code.lua: > > ``` > function CodeBlock(el) > return { pandoc.RawBlock("man", '.IP "" 0'), el } > end > ``` > > Then use --lua-filter unindent_code.lua on the command line when you > convert to man. > > > > > On Nov 20, 2022, at 6:12 AM, Rick Stanley wrote: > > > > When using __Program Source__ in creating a man page, it indents 8 > spaces not 4. How to manage the indent level when using pandoc? > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/cbe22587-8440-4e39-861f-e2ccdcb4dd7an%40googlegroups.com > . > > -- 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/329d7440-178e-40c1-b4fa-2dadaea66295n%40googlegroups.com. ------=_Part_1453_290036547.1668965088621 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In any Standard Library man page, that displays example code, the line= "Program Source" is indented by 4 spaces, and the source code is indented = by 8.
In creating my own man page, using pandoc, the "Program Sou= rce" line is indented by 8, and my source is indented by 16 spaces.  I= would prefer the same indentation for all my man pages.

=
I don't have lua installed and would prefer not to use if if at = all possible.  I am writing pure C.

Thank you= !

On Sunday, November 20, 2022 at 11:57:59 AM UTC-5 fiddlosopher wrote:=
Are you sayi= ng you want code blocks to be indented to the same level as the man page= 9;s body text?

You could achieve that with a lua filter that resets paragraph indentat= ion before each code block. Save this as unindent_code.lua:

```
function CodeBlock(el)
return { pandoc.RawBlock("man", '.IP "" 0'= ;), el }
end
```

Then use --lua-filter unindent_code.lua on the command line when you co= nvert to man.



> On Nov 20, 2022, at 6:12 AM, Rick Stanley <rick.sta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> When using __Program Source__ in creating a man page, it indents 8= spaces not 4. How to manage the indent level when using pandoc?
>=20
> --=20
> 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-discus..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cbe22587-8= 440-4e39-861f-e2ccdcb4dd7an%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/329d7440-178e-40c1-b4fa-2dadaea66295n%40googlegroups.= com.
------=_Part_1453_290036547.1668965088621-- ------=_Part_1452_573525953.1668965088621--