From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: man page indent
Date: Sun, 20 Nov 2022 12:36:39 -0800 [thread overview]
Message-ID: <B263931A-0B66-4575-B91A-DC32A61BEE0F@gmail.com> (raw)
In-Reply-To: <329d7440-178e-40c1-b4fa-2dadaea66295n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
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.stanley.inc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <rick.sta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.
next prev parent reply other threads:[~2022-11-20 20:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-20 14:12 Rick Stanley
[not found] ` <cbe22587-8440-4e39-861f-e2ccdcb4dd7an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-20 16:57 ` John MacFarlane
[not found] ` <EDFA0264-8B4A-4319-8477-265C3AD6ADC7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-20 17:24 ` Rick Stanley
[not found] ` <329d7440-178e-40c1-b4fa-2dadaea66295n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-20 20:36 ` John MacFarlane [this message]
[not found] ` <B263931A-0B66-4575-B91A-DC32A61BEE0F-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-20 21:10 ` Rick Stanley
[not found] ` <71b3adff-5bd5-44b7-8448-97f4d7a910ban-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-21 4:57 ` John MacFarlane
[not found] ` <293E7EEC-B348-44C3-9533-1004F7F53B0E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-21 14:30 ` Rick Stanley
2022-11-20 21:22 ` Rick Stanley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B263931A-0B66-4575-B91A-DC32A61BEE0F@gmail.com \
--to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).