From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31777 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:10:53 -0800 (PST) Message-ID: <71b3adff-5bd5-44b7-8448-97f4d7a910ban@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_2318_226597989.1668978653930" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33275"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCH5HJXPPEIOBL7KTMDBUBBCUE5A6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Nov 20 22:11:00 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f184.google.com ([209.85.167.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1owrad-0008TJ-NV for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 20 Nov 2022 22:10:59 +0100 Original-Received: by mail-oi1-f184.google.com with SMTP id m8-20020a056808024800b0035b120cb412sf3577375oie.3 for ; Sun, 20 Nov 2022 13:10:59 -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=usF5VQnJTvm8DBBMA8esG6Yn5OGlFoM4MiJlzmPrdrg=; b=RriNmsTWutyWfhIhKztrLDw6VoZAeESivM5WPDnXYnwpIIq3DFwQNzjZBUchWYWTAB k3/jY0d35Ct+lpiTNFl+5Szh//Ype6PVJCKsW+v8NwxdQ7lWd9uIuLrdCqBRoDON78MO BOFIQzTyDk4MkT5visX9NzMekD/AZGbSe0qxioLQAbvyQVQEujmR96AePFpbLfx26cFI bP0teqQ7VQyGTi1CjN8f6vgaayV9BHmFrmDlNfeTbpCqJk5kANOIsMM1j62n5w3eqSdm +HI2mOGRIfZlZx/UgBfxkN/AH99HClmYvQ8FbIpCkVH0GkMNjHrVBWBAtI8nZuF4nAif sd4w== 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=usF5VQnJTvm8DBBMA8esG6Yn5OGlFoM4MiJlzmPrdrg=; b=jGqJqlsTZ8qEOvhUz2KGlOcnL2PY0yS84SkEli5vj+5yr9Bv1QRZxhi4vY7WaxZLru R/ECfJxYcTe4OyEld/O0Ok/GiR187xCIMidqpCqmNqSv+cJ/S9t0lo8Y2OUDLvr5zFsm aMyMmxr8EGDPjNZuaj3C9+LjGBrri2jXIZS1WV6tGzOqO0KtkBAFtCzyn9Fv47gXdGx5 g8v37fqF9Gde8LVmU/iWekMhAMJbjy+jIF4WKHR/0k92++JeGp/b27Br9vpoMVvioYHK fXMwynbCCb0Dqz8pKwp2+Lpu+VDKVPUW5xNR/yyxpSBsJWwhk//97dBGN6OzHaJTEob8 Mvfw== 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=usF5VQnJTvm8DBBMA8esG6Yn5OGlFoM4MiJlzmPrdrg=; b=466owK5onvwWQ0LTTwUNXBjdVKhWarpjnbMsGPGH7Dq0PPI4D4zm1qGRZRrVVqcNJy MdOgsUbos/9MKaOkYir/bakTEUrqjEyCHRudQFxzTbC8bJQlZu8eL/ogWqJ/NfMOzlpi Si5320UGiHHjupSiYP6vIhVgAd3PZARSVHbTPeCG8pjRbscHX/ykEfBHakBBhcweCIXX ToiSrQ1tPoNk/5AwU5li300HUkv6TqZUNji4PHzNhim/VY2qUfkMzYKsXZUVAhtLnjiE bILM7AUe5OyIBI39UD4MxnwJrfgoA7qgONGfmXO0EgG6TQVMl+L0fu7+XlEl84sEWz4W wWRA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pnS6/BKkhJXWcxsU24l5Mz3yis6iWlxw4LPHHRRLRmNwvYI7uVf UeTG8WJn7R2DmFSqtlo6UDQ= X-Google-Smtp-Source: AA0mqf5lHsNbBLNlF8u/NqmFAHIUtkyC64KMwPLgGZjyLYrJsoYLdbchz/i3tLjeQxMsq6ypJ2Bbjg== X-Received: by 2002:a05:6870:788d:b0:137:3d65:f5ec with SMTP id hc13-20020a056870788d00b001373d65f5ecmr11624031oab.257.1668978658640; Sun, 20 Nov 2022 13:10:58 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:1a81:b0:142:db0f:4803 with SMTP id ef1-20020a0568701a8100b00142db0f4803ls431734oab.2.-pod-prod-gmail; Sun, 20 Nov 2022 13:10:56 -0800 (PST) X-Received: by 2002:a05:6870:6120:b0:142:95fd:ad0f with SMTP id s32-20020a056870612000b0014295fdad0fmr355690oae.2.1668978655899; Sun, 20 Nov 2022 13:10:55 -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:31777 Archived-At: ------=_Part_2318_226597989.1668978653930 Content-Type: multipart/alternative; boundary="----=_Part_2319_2079942418.1668978653930" ------=_Part_2319_2079942418.1668978653930 Content-Type: text/plain; charset="UTF-8" Command: pandoc sample.3.md -o sample.3 -f markdown -s -t man --- title: XXX section: 3 header: XXX footer: XXX 1.2.3.4 date: YYYY-MM-DD --- # NAME sample # SYNOPSIS   # DESCRIPTION Sample # EXAMPLES __Program Source__ ~~~~ #include #include int main(void) { printf("Test of markdown.\n"); return EXIT_SUCCESS; } ~~~~ 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/71b3adff-5bd5-44b7-8448-97f4d7a910ban%40googlegroups.com. ------=_Part_2319_2079942418.1668978653930 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Command: pandoc sample.3.md -o sample.3 -f markdown -s -t = man
---
title: XXX
section: 3
header= : XXX
footer: XXX 1.2.3.4
date: YYYY-MM-DD
---

# NAME
sa= mple

# SYNOPSIS
&nbsp;

# DESCRIPTION
Sample

= # EXAMPLES

__Program Source__


~~~~

#include <st= dio.h>
#include <stdlib.h>

int main(void)
{

&n= bsp; printf("Test of markdown.\n");

  return EXIT_SUCCESS;
}=
~~~~


On Sunday, November 20, 2022 at 3:36:44 PM UTC-5 fiddlosopher wr= ote:
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 <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/71b3adff-5bd5-44b7-8448-97f4d7a910ban%40googlegroups.= com.
------=_Part_2319_2079942418.1668978653930-- ------=_Part_2318_226597989.1668978653930--