From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31778 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 13:22:19 -0800 (PST) Message-ID: <77ecc0cb-707f-4f48-a703-353f20523775n@googlegroups.com> References: <329d7440-178e-40c1-b4fa-2dadaea66295n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1560_1827671704.1668979339684" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6143"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCH5HJXPPEIIZNPKTMDBUBDFAMR3M-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Nov 20 22:22:24 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f64.google.com ([209.85.160.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1owrlf-0001LN-VJ for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 20 Nov 2022 22:22:23 +0100 Original-Received: by mail-oa1-f64.google.com with SMTP id 586e51a60fabf-14289aba38asf3328079fac.18 for ; Sun, 20 Nov 2022 13:22:23 -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=xKHl+CogcDKc6IfdW76BVjRPSsQBqLEQkjA6Jei9s+w=; b=LRwYsAzLjnPm+ViVuk+tkHdbXfHeRAKkubRMlP9XVpe6uGAtOYlDhtLkCZm6wiWaMk rSFzk0LawXZvgz95kfBJtqH5mvMM5IP8KpsFYAAUNyL01a7UPsEcrTGILmksLDtq8BuR dVxbp6LwMvT3KrQ5sevk4jFLRvF/VDIoRYqruMhR4MwEXrGRekZ+iIZFSSPD6woDCTok 1P000UlzKYRFXnM0gF7AA+HP47nWt6PIKvP980VdJF1MQriWNVJ8jJoS/tCpI3m0C008 TlOaPmYoBoDurHeFRo87dtjUhfsfI/8D0qen3eLeitn60t8AIW9wC2JKt8tj2vENipSX ljuA== 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=xKHl+CogcDKc6IfdW76BVjRPSsQBqLEQkjA6Jei9s+w=; b=kLgJR4NyViCtIDDRQ8Kfp/ywzRP6CQ6HmN3lfI67hWmuq6QzCNJhfEzZk8k6GAR1zq Xr2M2uJV0Xj3X34Twn1MJG7qmrH+vBchD8G60NYlhm/pXfdgH6XSmXwygYeE+v92qa4O x69wUfYKnoPHutuGBZkOQqShCKgENuElCyPG/AkBOV0RZos953vAb/pc+CAas1trGXG0 8/pCm/iMmp2RehU23N2AF5lBFeGZO/MNz+d/0+/SbcIwl0GoO7LGChHk4MP26xV55ih3 jI8MkWgDsSNj36L4XVxjnQ/tABI9fnakGsF9l9L1gPI3w7eBY7nElp8Da3o7UGytktyd rb+w== 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=xKHl+CogcDKc6IfdW76BVjRPSsQBqLEQkjA6Jei9s+w=; b=CrtW/1P0jqgNNwqTqwoLxXoBWN5ZTcjuEGammNnOe2hBwW8UloEPRKY+guYWC3yYx4 XgBT1KN+WyHClsIwmCHLjSIixqCI1EGEyQWU25xY4U818DiapDKmH8PeO36WgnihCKZq S00UHBJAq3W/AC3cG+zLvFsxU95AYEYfrdhyc7hXqRLEkjvX4knbfZrd7YOHdsgB5b2Z CVdLoHxsHzGPdSsBgkXucwKPHC5v4zTNCFkMf6TP/xuAc8qdhHxGpQxyNCv1VPGd4f+L MndSp/g2ZPCSlUdAfw93D71fN3nSP9514H/8KgitiOl18/O9eV2QliUNMO1oelLYkdxG JlRg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkfHWB6VeiCRfjKcmIgM89v5EbqoXiAbSTg60AjyRO/vCGzy6rZ fahfJyejG7yiGVGjDcPUmDI= X-Google-Smtp-Source: AA0mqf4ZYlWRIT6MkNboII0sXKwTMWPz223iiJuuEtMQLptxx9TZ9hsP8wob1qL0v886xzmLdzvk6g== X-Received: by 2002:a05:6808:200b:b0:354:72d9:2e02 with SMTP id q11-20020a056808200b00b0035472d92e02mr7346380oiw.191.1668979342845; Sun, 20 Nov 2022 13:22:22 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:150f:b0:66d:e033:27e5 with SMTP id k15-20020a056830150f00b0066de03327e5ls604421otp.1.-pod-prod-gmail; Sun, 20 Nov 2022 13:22:20 -0800 (PST) X-Received: by 2002:a9d:6841:0:b0:66d:670c:aae8 with SMTP id c1-20020a9d6841000000b0066d670caae8mr8417764oto.244.1668979340447; Sun, 20 Nov 2022 13:22:20 -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:31778 Archived-At: ------=_Part_1560_1827671704.1668979339684 Content-Type: multipart/alternative; boundary="----=_Part_1561_1373325400.1668979339684" ------=_Part_1561_1373325400.1668979339684 Content-Type: text/plain; charset="UTF-8" Debian testing pandoc 2.17.1.1 On Sunday, November 20, 2022 at 3:36:44 PM UTC-5 fiddlosopher wrote: > Sorry, I am not sure I follow. Please give a small example of the input > you're using (markdown?). > > I don't see any difference between the indentation of the man page for > pandoc and, say, emacs on my system. > > > On Nov 20, 2022, at 9:24 AM, Rick Stanley wrote: > > > > 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-discus...-/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 > . > > -- 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/77ecc0cb-707f-4f48-a703-353f20523775n%40googlegroups.com. ------=_Part_1561_1373325400.1668979339684 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Debian testing
pandoc 2.17.1.1
=

On Sunday, November 20, 2022 at 3:36:44 PM UTC-5 fiddlosopher wrote:
<= /div>
Sorry, I am not su= re I follow. Please give a small example of the input you're using (mar= kdown?).

I don't see any difference between the indentation of the man page = for pandoc and, say, emacs on my system.

> On Nov 20, 2022, at 9:24 AM, Rick Stanley <rick.sta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> In any Standard Library man page, that displays example code, the = line "Program Source" is indented by 4 spaces, and the source cod= e is indented by 8.
> In creating my own man page, using pandoc, the "Program Sourc= e" line is indented by 8, and my source is indented by 16 spaces. I w= ould prefer the same indentation for all my man pages.
>=20
> I don't have lua installed and would prefer not to use if if a= t all possible. I am writing pure C.
>=20
> Thank you!
>=20
> On Sunday, November 20, 2022 at 11:57:59 AM UTC-5 fiddlosopher wro= te:
> Are you saying you want code blocks to be indented to the same lev= el as the man page's body text?=20
>=20
> You could achieve that with a lua filter that resets paragraph ind= entation before each code block. Save this as unindent_code.lua:=20
>=20
> ```=20
> function CodeBlock(el)=20
> return { pandoc.RawBlock("man", '.IP "" 0&= #39;), el }=20
> end=20
> ```=20
>=20
> Then use --lua-filter unindent_code.lua on the command line when y= ou convert to man.=20
>=20
>=20
>=20
> > On Nov 20, 2022, at 6:12 AM, Rick Stanley <rick.sta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:=20
> >=20
> > When using __Program Source__ in creating a man page, it inde= nts 8 spaces not 4. How to manage the indent level when using pandoc?=20
> >=20
> > --=20
> > You received this message because you are subscribed to the G= oogle Groups "pandoc-discuss" group.=20
> > To unsubscribe from this group and stop receiving emails from= it, send an email to pandoc-dis= cus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=20
> > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cbe2258= 7-8440-4e39-861f-e2ccdcb4dd7an%40googlegroups.com.=20
>=20
>=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/329d7440-1= 78e-40c1-b4fa-2dadaea66295n%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/77ecc0cb-707f-4f48-a703-353f20523775n%40googlegroups.= com.
------=_Part_1561_1373325400.1668979339684-- ------=_Part_1560_1827671704.1668979339684--