From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16774 Path: news.gmane.org!.POSTED!not-for-mail From: Mirko Lelansky Newsgroups: gmane.text.pandoc Subject: Pandoc RawInline conversion Date: Sun, 22 Jan 2017 14:12:21 -0800 (PST) Message-ID: <246eb85b-905d-488c-9302-0513926cc55f@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_911_803636819.1485123141138" X-Trace: blaine.gmane.org 1485123146 2789 195.159.176.226 (22 Jan 2017 22:12:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2017 22:12:26 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCPZ33VE64LBBRO4STCAKGQE5AIU4GQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jan 22 23:12:21 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pg0-f56.google.com ([74.125.83.56]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVQMz-0008LL-9g for gtp-pandoc-discuss@m.gmane.org; Sun, 22 Jan 2017 23:12:17 +0100 Original-Received: by mail-pg0-f56.google.com with SMTP id 194sf56106164pgd.0 for ; Sun, 22 Jan 2017 14:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=RKDtFtb7SLuD+tJ0zzseVcwzqRkssOGsEhohTUnx5cA=; b=KIaR+DYb8rBI/zOfP8Z47iPW5xSMcJ8TtD5jjBHHFGRKeQWXvNswzBOPnDD3+qLFmw U3Xt6P+MOovwrpluXdvqfQwy7WGxjtPOs1s+DZOxrkfWMBNtrggXsi+LozOk4WaCz4Wq jyOl5tiS7NZgNgctPDB/yI2cs88ObgQUYM4x2RN4gsuY0UxGIJ9cNb7iBBFSdpiktndJ 4e02bVTk+O1aa19CxU99+pbERPhmAnI0giInQyymwNxZpz1UubfExwQMcXGQNOGLfbqo Hkd2G21alqHKRKV9gm+qwSZP1ytUP/jKsuzTTfzEcEPfutDF+q40vwv4zUc3qeAFrnIi 7Ycw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=RKDtFtb7SLuD+tJ0zzseVcwzqRkssOGsEhohTUnx5cA=; b=P7KV5KULi73nnjH9cAu4dgBdfCgWot4SJRX0GE6CFgOB6udzpAs63G5Na0q8gaCYp8 nczkLFUw3rTybvW+r6mZ6/rZtt+2DoKILhMMPWIeyD9rTozNXSd4LrGA2OPXp0NoJCYO IP1yPECchEPW9tNF18T98LX2w5xza5BjMwnX7ddTHoe0dwX7HjI2hXGq8v6+W6Ry4shM ji4Tc3+TmhQGYCRHt5UvX/eRZIBF65Pf82/aOXBaSKLAHK/G6n2lV8CQqZlAS7GaB0+G GY+t3lCYTkTe5whorG8eGjOvHZAEMDCPcecR4rUoZT+4iKf2MvKONuKW4DSuEHDpP7LD Ur9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=RKDtFtb7SLuD+tJ0zzseVcwzqRkssOGsEhohTUnx5cA=; b=TIsVuaAMzRrTql7y39yj0bq7U1IKbLbdikHGggl31FdQgolLmU/+PgAQqGHTRV3kSv wNPzut8wN/x/pNuxgsNAbPIiHseoqb6jA0P/812r+AGTFmQYJS39diIzFjw0iqU5Emws VUtrukuNio8j5sO9+Ee7uc1oXv/xvD7TABtNG4BPfYctChA2HUg/WNuOmWpeBzjW60Fp ooYLGTAgzNAw3k0lZp17c4NB7faxzyd9eCsEc7iEVldEjC3ZvDJjOBJ1C66X+QJIMLS4 O3gOxsQPrVfGcxeMNGjRPcTccIuMxslWKV/cDDub5ULgBRg2EKQyGhhtLH+RYoIIbPD5 Y7FQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AIkVDXKv8cs/Jrba4czjy/ldSlAzhPXFJf64FEh/ArAV/8ZsXfs5JzmcNqMxJziqrEU4QQ== X-Received: by 10.157.46.212 with SMTP id w78mr2177252ota.0.1485123142079; Sun, 22 Jan 2017 14:12:22 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.39.113 with SMTP id r104ls11023203ota.8.gmail; Sun, 22 Jan 2017 14:12:21 -0800 (PST) X-Received: by 10.157.4.105 with SMTP id 96mr2170734otc.17.1485123141658; Sun, 22 Jan 2017 14:12:21 -0800 (PST) X-Original-Sender: mirkolelansky-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:16774 Archived-At: ------=_Part_911_803636819.1485123141138 Content-Type: multipart/alternative; boundary="----=_Part_912_1965511756.1485123141138" ------=_Part_912_1965511756.1485123141138 Content-Type: text/plain; charset=UTF-8 I make some markdown conversion to html and latex. For some use cases i need a special handling for html and latex output. For that problem i use raw latex and raw html. The problem is that the pandoc parser parse raw block differently. First an example for better understanding: API \gls{API} . The pandoc parser converts this to the following json: {"blocks":[{"t":"Para","c":[{"t":"RawInline","c":["html",""]},{"t":"Str","c":"API"},{"t":"RawInline","c":["html",""]},{"t":"SoftBreak"},{"t":"RawInline","c":["tex","\\gls{API}"]}]}],"pandoc-api-version":[1,17,0,5],"meta":{}} . Here you see that the raw latex block is parsed correctly as one RawInline element but the raw html element is parsed as two RawInline elements which wraps a String element. Is this behaviour normal? For me the following seems better: {"t":"RawInline","c":["html","API"]} because then it will be easier to use output specific markup because the html writer will be ignore RawInline for latex and the latex writer will be ignore RawInline for html and print not the content of the String element. -- 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/246eb85b-905d-488c-9302-0513926cc55f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_912_1965511756.1485123141138 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I make some markdown conversion to html and latex. For som= e use cases i need a special handling for html and latex output. For that p= roblem i use raw latex and raw html. The problem is that the
pandoc par= ser parse raw block differently.

First an example for better unders= tanding:

<abbr title=3D"Application Programming Interface">A= PI</abbr>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
\gls{API}



.

The pandoc parser converts this to the = following json:

{"blocks":[{"t":"Para","c= ":[{"t":"RawInline","c":["html"= ;,"<abbr title=3D\"Application Programming Interface\">= ;"]},{"t":"Str","c":"API"},{&q= uot;t":"RawInline","c":["html","<= ;/abbr>"]},{"t":"SoftBreak"},{"t":&qu= ot;RawInline","c":["tex","\\gls{API}"]}]= }],"pandoc-api-version":[1,17,0,5],"meta":{}}

.

Here you see that the raw latex block is parsed cor= rectly as one RawInline element but the raw html element is parsed as two R= awInline elements which wraps a String element. Is this behaviour normal? F= or me the following seems better:

{"t"= :"RawInline","c":["html","<abbr title= =3D\"Application Programming Interface\">API</abbr>"= ;]}=

because then it will be easier to use output = specific markup because the html writer will be ignore RawInline for latex = and the latex writer will be ignore RawInline for html and print not the co= ntent of the String element.

--
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/246eb85b-905d-488c-9302-0513926cc55f%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_912_1965511756.1485123141138-- ------=_Part_911_803636819.1485123141138--