From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31779 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: man page indent Date: Sun, 20 Nov 2022 20:57:26 -0800 Message-ID: <293E7EEC-B348-44C3-9533-1004F7F53B0E@gmail.com> References: <329d7440-178e-40c1-b4fa-2dadaea66295n@googlegroups.com> <71b3adff-5bd5-44b7-8448-97f4d7a910ban@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17776"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBOUK5SNQMGQEI6NNANA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 21 05:57:34 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f187.google.com ([209.85.167.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1owys9-0004S9-NI for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 21 Nov 2022 05:57:33 +0100 Original-Received: by mail-oi1-f187.google.com with SMTP id m8-20020a056808024800b0035b120cb412sf3786834oie.3 for ; Sun, 20 Nov 2022 20:57:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669006652; cv=pass; d=google.com; s=arc-20160816; b=mY8rghopotRDU46KsGG4JUQcquYQiQkOl0xYDhyCjE+3K//1L37ftbsx+Aq/1hbeAU ldDncfq6oXyLbwy8HjfyBgkRWQ3YB9ExlUX9UAPVDnxezUGC5IL/b3u+yB5eUDfrvxA+ k+4GqjmOVq6tnofy+1I6J7HuBHZvNoG9K2HM/l+2wzJLtqAfzT58tTt0pV6qnVdNeKbC vvr+U333ZTO7AzeU7VzTaQ2IIZDJnQySiamgRuYU98MmAKcHgyqGcjo8mJWEUP60vg3y GZh+pSlJiePi9WXNVN5p4qqhTuxSO7b0uZHT1FP/IE/U/g3tjqguVHyemeszpzDIaRW9 3f+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=10t6RC6eEw9CeXLTlygmSQ9XeMXRvtNoeSTAx03wUKs=; b=eR50pGk2QHSbGodCXQYwXkHI/goq2+fWVn+yWB63At4WitSmIRU/R10zp0I/NwN3x3 MeObZVfaEqB7VKdzQkz4FIEcA8EyEfkY+WTgGJ9C3ibLp1/RdDpbT+HckTYsVOfOIiRE Av+02dqblgYzo6CNKBRQV0QLz0zT7lQhyZk7RKeNW8FXh3SsakYkogl3iM+Or8HVCfeq SSwQXFCcuX9FvnFQak3o3hhYrW0EngKnUN40k8SWClNTboP8IpT1pUINoxSZELNwPRem AvybWrfLXcyvqhtpbC2NPYUZLI35omUiq4K+SQAuM0qxcUdfYRB8Z8Zv+EUS++KuEsG+ +aWQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="nQcu/8Fy"; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=10t6RC6eEw9CeXLTlygmSQ9XeMXRvtNoeSTAx03wUKs=; b=PwFPKUZQgkRFvLH9SbYVMtCMcx4HQ7I8kasLmVApqQfkWbfh+h1bqmH1eAo6dL2zJP 9Er7CAo66gmSzL8obMVvpQ9L3JhpK7DpPoU/Wt2Q7yfBhQq3ypXASjMWF00PE6cDvdO6 dssnXISHTHWWzAKRmtRYbN6nlyqHFuUwWfb/qivRCcSWpP3jaNezaUI4E/qpC8yzIOSa elMryPUEd3W65zRvb48YyDv77/H/WNMiR/6QDxZz/Hgc6Ax2KwEivw3d8x4e6vKPC+0Z TMehFW4fwi0m/ToTTZ+Nx//p2jnU7hKdgSR5YBMidaIc0CN6vFgOOZEvtUoRf8qQ2 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-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=10t6RC6eEw9CeXLTlygmSQ9XeMXRvtNoeSTAx03wUKs=; b=CMZcp9t1vFiHUKjcMD4ceFakF+ift4KJkR+5XMWPPZdptNDq72l4F7uAz8JhoTttL1 zxWzxx9IdDUwfJKEVC4qVVfVI0XESfPTVB2B44psRc7A0oty+KFW6U62pFUGwCovBpO3 zBA6J1TFjiAHR0xKce06t4B+TDsEx2GE0l5+IJprhtuS1oiy0oBL01QLw8p5N03ZVgW+ izFcGUSGc8dtKVBxBJ1uJO1dnyjs2yC6rm/yg30wdy9SLWH+ZxKusJA4Tig7Roo+Gk1c yb8s82/h+M16wIGhXSsJd8rdmZcJ0OiA9bOkpXNbtwfJ7Xv7uf75KnKpOvJZG7LHVYX2 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-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=10t6RC6eEw9CeXLTlygmSQ9XeMXRvtNoeSTAx03wUKs=; b=NaAE5VMmQF0Up0G63/CTfSAwVDZSRRbcYgK5ytHQ3X+n3wtkkSBvr4+JevoWPlJA75 ff0XsBoN5nWbrRiXtTPf1kS/08jZN2UPGeBNygeQaLF/be4EH52JjimI9fSNrOhL/3Cy KKDE0TPHl8DYpKW3VyRtLhT/JYDhhxNK6Vy1f7Ezl8HWAxf4xKoYa6PKTb3ssK/ZuDIY 46VEs5wxOn98el1/21S0W9UB+ib0DQvWitLgY4BgHR00emszQj8Kqzsc2HED1T6H0V5M P8yHZg9LTQ02guDkxsfF Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkygpCsd8Sqfwe3KyQghMVOeYU+VKjM0TYmFY5GOO0w9sA6/MOv tUA4lvhv7uw5fX/jrOhbVAQ= X-Google-Smtp-Source: AA0mqf6J0a1FUmGzQEByz7ZfrqdFDkFIvbqcC5xK4g5E10HcvCqlWFXuUCmXKMChhRaFpnl1e/03Iw== X-Received: by 2002:a05:6870:ac97:b0:13d:3935:d06e with SMTP id ns23-20020a056870ac9700b0013d3935d06emr1078581oab.197.1669006652476; Sun, 20 Nov 2022 20:57:32 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:6487:b0:66c:7df0:d6be with SMTP id ck7-20020a056830648700b0066c7df0d6bels2076245otb.8.-pod-prod-gmail; Sun, 20 Nov 2022 20:57:29 -0800 (PST) X-Received: by 2002:a9d:750b:0:b0:66c:4584:dd91 with SMTP id r11-20020a9d750b000000b0066c4584dd91mr622850otk.86.1669006649807; Sun, 20 Nov 2022 20:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669006649; cv=none; d=google.com; s=arc-20160816; b=hrJO4kX5nYjNm4yo86J+lOJ5QAVkrdbpWf/OrDWON8tRbW/h6DrXI6pxRK2rbZYPBH s39NBLt9x4a7qmKdeh6fNnNz1WyK6VxaWJfe03ToqmVM/uUiKVcDVoVu2S59u0GpfLSJ gzwDjbUiJf0aNcpGJ0n47ZyT5uDw/QdyUsvW9qhb5UnC/RZOOKrdK8brzL7CZXf1Euid GLWs5AC1UHdmF1Bu7A+OpmvhsV1qOwOEZ+yaMBgyhrcfcFKLVHTPS/rmA4kJ83zKgev0 mzCkgNDfR3QfIeTpSUv09LE7N1ICDlwSJ4KutS8S+/xZ7v0l+Wi4FMqo6WuswlWT+WCG nr5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=ddAo5dAkqhpimiOXg7D2kqdfuVYEECdJEfFxgacBX1A=; b=KMNNOY9WXf1uIedy3qeSGWfK6QIlHEBW+gyb2BBVpiTlyMjSrnmo5zKJ1eJuJnrXqm 9LYQFolksul/NN5MTwFX5CZYRkwV3onlhgwsGm8lRc3s2Fxa/iTuiAtAU6avuDf8xwZi 0sHFHg9RFJlFg5DIvgkV7l166hL7wc4yKuIBN69OdPQtTUkbOx98v1fdvXOPaNTffuaF X/74UMk7euv+PrpNXT9PHPrdN2L21J9M3unT2ncCSWf3V8a1KX6sEstE9GUsX2+71Rz/ RthjqTf+BC1dBT7GJU1qZpNMUBam6eDYJkWaTT1+7gH+Ouqj2f8wncBOfNVyPalS2NP3 QU7A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="nQcu/8Fy"; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com. [2607:f8b0:4864:20::1031]) by gmr-mx.google.com with ESMTPS id g46-20020a9d12b1000000b0066c2e89a82bsi561847otg.1.2022.11.20.20.57.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 20:57:29 -0800 (PST) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) client-ip=2607:f8b0:4864:20::1031; Original-Received: by mail-pj1-x1031.google.com with SMTP id mv18so1762553pjb.0 for ; Sun, 20 Nov 2022 20:57:29 -0800 (PST) X-Received: by 2002:a17:90a:b38b:b0:214:1328:ac8f with SMTP id e11-20020a17090ab38b00b002141328ac8fmr18611082pjr.198.1669006648935; Sun, 20 Nov 2022 20:57:28 -0800 (PST) Original-Received: from smtpclient.apple ([2601:644:400:7c40:21c2:c22c:2b70:b7b5]) by smtp.gmail.com with ESMTPSA id 8-20020a631048000000b0043c732e1536sm6610179pgq.45.2022.11.20.20.57.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Nov 2022 20:57:28 -0800 (PST) In-Reply-To: <71b3adff-5bd5-44b7-8448-97f4d7a910ban-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="nQcu/8Fy"; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE 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.io gmane.text.pandoc:31779 Archived-At: Pandoc needs to do something to format code blocks differently from ordinar= y paragraphs, since terminal pagers will use the same font for both. So wh= at it does is to put code blocks in indented paragraphs. I'm open to recon= sidering this, but we need SOME way to indicate that something is a code bl= ock. Just looking around a bit: the perl man pages indent code blocks too, but = only 1 space from the main content. man 3 strcmp indents examples 4 spaces relative to the main content, but th= e "Program Source" section is indented 0. man 3 gethostbyaddr also indents code examples 4 spaces. I'm not sure, based on my survey, whether there is in fact any standard for= this. > On Nov 20, 2022, at 1:10 PM, Rick Stanley wr= ote: >=20 > 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 > --- >=20 > # NAME > sample >=20 > # SYNOPSIS >   >=20 > # DESCRIPTION > Sample >=20 > # EXAMPLES >=20 > __Program Source__ >=20 >=20 > ~~~~ >=20 > #include > #include >=20 > int main(void) > { >=20 > printf("Test of markdown.\n"); >=20 > return EXIT_SUCCESS; > } > ~~~~ >=20 >=20 > 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 y= ou're using (markdown?).=20 >=20 > I don't see any difference between the indentation of the man page for pa= ndoc and, say, emacs on my system.=20 >=20 > > On Nov 20, 2022, at 9:24 AM, Rick Stanley wrote= :=20 > >=20 > > 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 b= y 8.=20 > > 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.=20 > >=20 > > I don't have lua installed and would prefer not to use if if at all pos= sible. I am writing pure C.=20 > >=20 > > Thank you!=20 > >=20 > > On Sunday, November 20, 2022 at 11:57:59 AM UTC-5 fiddlosopher wrote:= =20 > > Are you saying you want code blocks to be indented to the same level as= the man page's body text?=20 > >=20 > > You could achieve that with a lua filter that resets paragraph indentat= ion before each code block. Save this as unindent_code.lua:=20 > >=20 > > ```=20 > > function CodeBlock(el)=20 > > return { pandoc.RawBlock("man", '.IP "" 0'), el }=20 > > end=20 > > ```=20 > >=20 > > Then use --lua-filter unindent_code.lua on the command line when you co= nvert to man.=20 > >=20 > >=20 > >=20 > > > On Nov 20, 2022, at 6:12 AM, Rick Stanley wro= te:=20 > > >=20 > > > When using __Program Source__ in creating a man page, it indents 8 sp= aces not 4. How to manage the indent level when using pandoc?=20 > > >=20 > > > --=20 > > > You received this message because you are subscribed to the Google Gr= oups "pandoc-discuss" group.=20 > > > To unsubscribe from this group and stop receiving emails from it, sen= d an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > > To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/cbe22587-8440-4e39-861f-e2ccdcb4dd7an%40googlegroups.c= om.=20 > >=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google Grou= ps "pandoc-discuss" group.=20 > > To unsubscribe from this group and stop receiving emails from it, send = an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > To view this discussion on the web visit https://groups.google.com/d/ms= gid/pandoc-discuss/329d7440-178e-40c1-b4fa-2dadaea66295n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/71b3adff-5bd5-44b7-8448-97f4d7a910ban%40googlegroups.com. --=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 e= mail 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/293E7EEC-B348-44C3-9533-1004F7F53B0E%40gmail.com.