public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Sage Mad <sagemad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Number all paragraphs (for cross references)
Date: Wed, 11 Jul 2018 19:32:47 -0700	[thread overview]
Message-ID: <m2muuxtc8g.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <a59bff9e-c9b0-4fea-943e-2ed61dd469c2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


There's no native pandoc construction that renders in
uniformly as a margin note.

To get the result you want, you'd need to use filters
or a custom writer, and this would require some
hand-coding for each format you want to support.

One filter might put each paragraph in a Div with
an identifier giving the unique number (in order).

For HTML output, you might then just need to add some
CSS (and possibly JS) that displays the identifier in
the margin as needed.

For LaTeX, you'd need another filter (or it could be
part of the same one) that adds a bit of custom LaTeX
to do this, for each appropriately marked Div.

This isn't super-hard to do, but it's not "out of the box."

Sage Mad <sagemad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Thanks for this same kind of answer, but although I haven't the programing 
> skills, it seems to me that if pandoc's markdown format allow to put 
> footnotes, which are recognized in all the output formats, it should be 
> possible also with "margin notes" (understand numbered paragraphs). I saw 
> that there was a proposition to include sidenotes in this form : [>1]. The 
> proposition was actually about footnotes in the margins, but the same could 
> be done for "my" margin notes. The [>"number"] next to each paragraph would 
> be ordered like the footnotes at the conversion moment and it would also 
> allow me to cross reference them (assuming a solution is found for my cross 
> reference-footnotes 
> <https://groups.google.com/forum/#!topic/pandoc-discuss/qwN6zBWo-Xw> issue, 
> which would basically be the same).  
>
> Am Mittwoch, 11. Juli 2018 16:33:40 UTC+2 schrieb CR:
>>
>> By using CSS, when you generate HTML from your Pandoc Markdown, you could 
>> number paragraphs in the resulting HTML. But each output document format is 
>> different in how it will handle the paragraph numbering. 
>>
>> So it appears Pandoc does not support what you want.
>>
>>
>
> -- 
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a59bff9e-c9b0-4fea-943e-2ed61dd469c2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


  parent reply	other threads:[~2018-07-12  2:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10  9:30 Sage Mad
     [not found] ` <e0c3a23c-19a5-49cd-bb70-de04d4b4f336-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-10  9:34   ` Robert Zenz
2018-07-10  9:44   ` Sage Mad
     [not found]     ` <791d9add-c53b-4adc-b802-084fd6b5230f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-10  9:53       ` Robert Zenz
     [not found]         ` <5B448221.2060807-q1xk7osDwJUWQnjQ7V0W7w@public.gmane.org>
2018-07-10 10:12           ` Sage Mad
     [not found]             ` <977fb517-6c66-4a8d-8915-0b0bed9d5495-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-10 10:15               ` Robert Zenz
     [not found]                 ` <5B448743.5060209-q1xk7osDwJUWQnjQ7V0W7w@public.gmane.org>
2018-07-10 10:22                   ` Sage Mad
2018-07-11 12:09   ` CR
2018-07-11 12:11   ` CR
2018-07-11 12:21   ` CR
2018-07-11 12:30   ` CR
     [not found]     ` <c264f411-1587-40e5-84e6-131f394c1d95-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-11 12:48       ` Sage Mad
     [not found]         ` <0b4556f0-f29a-48ce-a276-bb32333223e8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-11 13:12           ` Joost Kremers
     [not found]             ` <87wou1kjad.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2018-07-11 14:21               ` Sage Mad
     [not found]                 ` <9253f18b-9bb8-4a3b-8977-21bb2f867742-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-11 14:33                   ` CR
     [not found]                     ` <c241eba7-d964-47ab-8cb1-db30ce3cecbf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-11 14:55                       ` Sage Mad
     [not found]                         ` <a59bff9e-c9b0-4fea-943e-2ed61dd469c2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-12  2:32                           ` John MacFarlane [this message]
     [not found]                             ` <m2muuxtc8g.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-07-12 10:12                               ` Sage Mad
     [not found]                                 ` <c099bc20-ce0c-41fd-954c-15a956338003-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-12 11:46                                   ` CR
     [not found]                                     ` <d32a87ed-8c33-4a30-a37b-9d1341e38956-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-12 16:06                                       ` Sage Mad
2018-07-11 14:35                   ` CR
     [not found]                     ` <0b1087c8-b99a-4ebd-a832-2c3114083945-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-11 15:05                       ` Sage Mad
     [not found]                         ` <82554a2f-0529-4435-ae1f-e23c2413a154-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-12 16:45                           ` John Muccigrosso
     [not found]                             ` <b89b0bc1-cef0-450c-8aa7-f7bfc1cc443e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-13  9:38                               ` Sage Mad
2018-07-11 12:58       ` Sage Mad
2019-03-15 20:42   ` Sage Mad
     [not found]     ` <e9519591-a2cf-46ba-ba36-56a82c11a530-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-19 17:22       ` Клуб Ингрия

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=m2muuxtc8g.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=sagemad-Re5JQEeQqe8AvxtiuMwx3w@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).