public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Gordon Steemson <gsteemso-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Idea: Support for centred block-level elements, without necessarily needing to revise pandoc
Date: Sat, 31 Jan 2015 18:25:33 -0800 (PST)	[thread overview]
Message-ID: <2a08b6a8-d381-45bc-9361-3bf402544fb0@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3198 bytes --]

When I began switching over to Pandoc a couple of months ago, I searched 
extensively for some way to specify centred text in Markdown, and found a 
syntax extension that numerous end-users advocate, but no tool I know of 
supports:

>
> Basically, the Markdown text (potentially contained
> within some larger construct) is bracketed with little
> ASCII-art arrows, like so:
>
> -> This paragraph
> is centred. <-
>
> ### -> This level-3 heading is centred. <- ###
>
> -> This level-1 heading is centred. <-
> ======================================
>

As I said, numerous people online claim this works, but I have yet to 
encounter any software that actually supports it.

It seems simple enough in principle for us end-using peons to support, at 
least when using a custom writer. It appears that any kind of text that 
might qualify for this treatment will be passed to one of Para() or 
Header(), which can then special-case based on finding or not finding 
literal ASCII-art arrows at the beginning and end of the given string 
argument. I conjecture that it might also turn up in Plain(), but I haven’t 
yet figured out just what circumstance causes that function to get called.

There are two obvious questions here that Mr. MacFarlane or someone equally 
“dialled in” to the Pandoc project can save a lot of trial and error by 
answering:

1) If someone, just to be difficult, needs to have literal ASCII arrows at 
the start and/or end of their actual output text block, can it be 
accommodated in a simple way by backslash-escaping? At what stage does that 
get stripped out — before the custom writer functions get called or after?

2) What would be involved in modifying the Pandoc markdown parser to 
recognize the obvious extension to this syntax, demonstrated below?

-> This text should
-> be right-aligned
-> in output formats
-> that support that,
-> without being
-> mistaken for a
-> block quote.

While I’m on the subject…

-> Right-alignment
->   and centering
->    should also…

->   …work with
     irregular
    margins, for
  obvious reasons. <-

If it simplifies anything, I find it difficult to envision a circumstance 
where someone might need a centred or right-aligned block quotation (the 
closest I can come is where someone’s abusing HTML blockquotes to get a 
narrower canvas for part of the document), so the two notations can easily 
be defined as mutually exclusive — a good thing, as it would likely look 
terrible in the original formatting, thus violating a key design goal of 
Markdown.

-- 
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/2a08b6a8-d381-45bc-9361-3bf402544fb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 7282 bytes --]

             reply	other threads:[~2015-02-01  2:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-01  2:25 Gordon Steemson [this message]
     [not found] ` <2a08b6a8-d381-45bc-9361-3bf402544fb0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-01  6:45   ` John MacFarlane
     [not found]     ` <20150201064534.GB12964-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-02-01  8:14       ` Gordon Steemson
     [not found]         ` <15411876-5ead-405f-b72f-4db72406b9d4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-01 18:41           ` John MacFarlane
     [not found]             ` <20150201184124.GE13226-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-02-02 11:07               ` Gordon Steemson

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=2a08b6a8-d381-45bc-9361-3bf402544fb0@googlegroups.com \
    --to=gsteemso-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).