From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11897 Path: news.gmane.org!not-for-mail From: Gordon Steemson Newsgroups: gmane.text.pandoc Subject: Re: Idea: Support for centred block-level elements, without necessarily needing to revise pandoc Date: Sun, 1 Feb 2015 00:14:06 -0800 (PST) Message-ID: <15411876-5ead-405f-b72f-4db72406b9d4@googlegroups.com> References: <2a08b6a8-d381-45bc-9361-3bf402544fb0@googlegroups.com> <20150201064534.GB12964@localhost.hsd1.ca.comcast.net> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1814_1017826733.1422778446528" X-Trace: ger.gmane.org 1422778449 25224 80.91.229.3 (1 Feb 2015 08:14:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2015 08:14:09 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCU3VGUM3AGRBT6AW6TAKGQESVKZZLA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Feb 01 09:14:09 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ie0-f190.google.com ([209.85.223.190]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YHpfU-0006TL-RW for gtp-pandoc-discuss@m.gmane.org; Sun, 01 Feb 2015 09:14:09 +0100 Original-Received: by mail-ie0-f190.google.com with SMTP id tr6sf27172760ieb.7 for ; Sun, 01 Feb 2015 00:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=xI8EDdGBpM4czId6hwELVSIXYMmT8qd5PK2Aa3D+/K0=; b=WRl6xYCFhbYmCjsey504vWInwQ5LqJV/TimZyCV5iHTzxFXeYeSLuY4Lpqa2xiiBK4 /qchbboXen8CmwC3bTrc1JGTknJZPCR5GqcWohtPPT1XOaG+xgu+qCoiOvL7yKU/dcij rjIqNZoGTGPTN6sf/HoFvPfRKrrhtiVweH6IXTdAa+MFSQbMMFGengECDhK9yxR4GBUa PtRl8U3zimt6Le/d9NKElX3r/wXYQogbdYWlqoRdqEdmKjZDaPbEjCytNSroCtM9mvZE 0slmlF7IzfCrCjc+mu/d/a78iJS+o6F2Fdrgww13+CVDvltmvw5pJgGytcWHCu1DMQmI dGDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=xI8EDdGBpM4czId6hwELVSIXYMmT8qd5PK2Aa3D+/K0=; b=UHGEatQqBhwhUG21+DT1f87OElWELUPTNR7H/hqpQjRWjiMTRBcTYLkv2aubcTxR2T q8Y2qu155LKtEhUtXIyBdOoNkcH5krXfYNC6J6Q78VTj1RLthXGpi+VvT3Tx+h052OSN mWAgr5ndJlzK2IcMtWaVYm3Caz2WjA1A6g5EcueR+/NLng8blltYjQTXV57aPindp6L4 t9lyI7ibdlgZSQ3HLrIQbLAQbsjRktYHKp4WmxUe2zUwUhvIqR37Bpj8+vgKHwpd7JXE 861jq+v+rOV4s0E8zbRFxl1vhGKeSa83txqpyjaa+prS6M0CU21f+nrx+YCgol5K3Jgl 1Jtw== X-Received: by 10.50.51.67 with SMTP id i3mr62943igo.15.1422778448051; Sun, 01 Feb 2015 00:14:08 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.3.67 with SMTP id 64ls167876iod.84.gmail; Sun, 01 Feb 2015 00:14:07 -0800 (PST) X-Received: by 10.50.66.227 with SMTP id i3mr63225igt.14.1422778447580; Sun, 01 Feb 2015 00:14:07 -0800 (PST) In-Reply-To: <20150201064534.GB12964-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org> X-Original-Sender: gsteemso-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.org gmane.text.pandoc:11897 Archived-At: ------=_Part_1814_1017826733.1422778446528 Content-Type: multipart/alternative; boundary="----=_Part_1815_1906653176.1422778446528" ------=_Part_1815_1906653176.1422778446528 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Well, it still seems straightforward enough. These days Unicode is=20 available. If someone wants a literal arrow in those positions they can use= =20 a dash other than an ASCII hyphen-minus, or use an angle bracket other than= =20 an ASCII less-than / greater-than, or just break down and use a Unicode=20 arrow character directly (several exist to choose from). I agree with you that centred or right alignment are presentational things= =20 (unless you=E2=80=99re trying to write Arabic or Hebrew, in which case left= =20 alignment is), but I strongly believe that being able to centre something= =20 on the page is nevertheless important to conveying meaning in certain=20 narrow use cases, in the same way as a hard line break is within a postal= =20 address. I am attempting to use Pandoc to publish my mediocre attempts at= =20 fiction to various online repositories, and in examining the results of my= =20 past (pre-Pandoc) efforts, I have come to the conclusion that there is a=20 marked difference in effect when some important bit of information is=20 placed in the middle of the page, versus as just an unusually short=20 paragraph clustered at the left edge with all the others. I approve in principle of your proposed solution (=E2=80=9Cjust use a =E2= =80=B9div=E2=80=BA element=20 and style it with CSS=E2=80=9D); unfortunately, several of the submission f= ormats I=20 am forced to conform to are extremely crippled, and do not support either= =20 of those features of HTML. Rephrasing them as some other feature is far=20 from simple from within the Lua custom writer. Short of outputting to a native Haskell representation file, piping that to= =20 a filter program, and piping that result back through a second invocation= =20 of Pandoc, is there any way of invoking a transformational filter on the=20 native AST as it is being processed? I keep seeing various language=20 bindings (Perl, Python, PHP, etc.) that appear to be for doing just that,= =20 but I can=E2=80=99t find any mention of how you actually invoke a filter wr= itten to=20 use one of them when you start the Pandoc tool. On Saturday, 31 January 2015 22:45:48 UTC-8, John MacFarlane wrote: > > +++ Gordon Steemson [Jan 31 15 18:25 ]:=20 > >1) If someone, just to be difficult, needs to have literal ASCII arrows= =20 > at=20 > >the start and/or end of their actual output text block, can it be=20 > >accommodated in a simple way by backslash-escaping? At what stage does= =20 > that=20 > >get stripped out =E2=80=94 before the custom writer functions get called= or=20 > after?=20 > > Before. The escaping is resolved in the parser. =20 > =20 >2) What would be involved in modifying the Pandoc markdown parser to=20 > >recognize the obvious extension to this syntax, demonstrated below?=20 > > Well, it would be quite involved. We'd need to modify the Pandoc=20 > document model to add these alignment containers (though I suppose=20 > we could use Div elements with special classes), then modify the=20 > Markdown parser and all the writers.=20 > > Centering has come up before on this list (you can search for earlier=20 > discussions). My general feeling is that pandoc should focus on=20 > structural elements of documents, and things like centering and=20 > right-aligning are too presentational.=20 > > Note you can always put things in divs with classes, and format them=20 > with CSS in HTML or with a simple filter in other formats.=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 e= mail 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/15411876-5ead-405f-b72f-4db72406b9d4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_1815_1906653176.1422778446528 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Well, it still seems straightforward enough. These days Un= icode is available. If someone wants a literal arrow in those positions the= y can use a dash other than an ASCII hyphen-minus, or use an angle bracket = other than an ASCII less-than / greater-than, or just break down and use a = Unicode arrow character directly (several exist to choose from).

I agree with you that centred or right alignment are presentationa= l things (unless you=E2=80=99re trying to write Arabic or Hebrew, in which = case left alignment is), but I strongly believe that being able to centre s= omething on the page is nevertheless important to conveying meaning in cert= ain narrow use cases, in the same way as a hard line break is within a post= al address. I am attempting to use Pandoc to publish my mediocre attempts a= t fiction to various online repositories, and in examining the results of m= y past (pre-Pandoc) efforts, I have come to the conclusion that there is a = marked difference in effect when some important bit of information is place= d in the middle of the page, versus as just an unusually short paragraph cl= ustered at the left edge with all the others.

I ap= prove in principle of your proposed solution (=E2=80=9Cjust use a =E2=80=B9= div=E2=80=BA element and style it with CSS=E2=80=9D); unfortunately, severa= l of the submission formats I am forced to conform to are extremely cripple= d, and do not support either of those features of HTML. Rephrasing them as = some other feature is far from simple from within the Lua custom writer.

Short of outputting to a native Haskell representati= on file, piping that to a filter program, and piping that result back throu= gh a second invocation of Pandoc, is there any way of invoking a transforma= tional filter on the native AST as it is being processed? I keep seeing var= ious language bindings (Perl, Python, PHP, etc.) that appear to be for doin= g just that, but I can=E2=80=99t find any mention of how you actually invok= e a filter written to use one of them when you start the Pandoc tool.
On Saturday, 31 January 2015 22:45:48 UTC-8, John MacFarlane wrote:+++ Gordon Steemson [Jan 31 15 18:2= 5 ]:
>1) If someone, just to be difficult, needs to have literal ASCII ar= rows 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 d= oes that
>get stripped out =E2=80=94 before the custom writer functions get c= alled or after?

Before.  The escaping is resolved in the parser.  
 
>2) What would be involved in modifying the Pand= oc markdown parser to
>recognize the obvious extension to this syntax, demonstrated below?

Well, it would be quite involved.  We'd need to modify the Pandoc
document model to add these alignment containers (though I suppose
we could use Div elements with special classes), then modify the
Markdown parser and all the writers.

Centering has come up before on this list (you can search for earlier
discussions).  My general feeling is that pandoc should focus on
structural elements of documents, and things like centering and
right-aligning are too presentational.

Note you can always put things in divs with classes, and format them
with CSS in HTML or with a simple filter in other formats.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/15411876-5ead-405f-b72f-4db72406b9d4%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_1815_1906653176.1422778446528-- ------=_Part_1814_1017826733.1422778446528--