From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92775 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Improving Pandoc Support for ConTeXt Date: Sat, 24 Oct 2015 15:11:21 -0400 (EDT) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-573169478-1445713609=:6217" X-Trace: ger.gmane.org 1445713952 29061 80.91.229.3 (24 Oct 2015 19:12:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 19:12:32 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Oct 24 21:12:17 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zq4Ea-0000yV-Er for gctc-ntg-context-518@m.gmane.org; Sat, 24 Oct 2015 21:12:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C4C7410216 for ; Sat, 24 Oct 2015 21:12:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KBfnnc1dMr29 for ; Sat, 24 Oct 2015 21:12:06 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8726910231 for ; Sat, 24 Oct 2015 21:11:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9D0AB101F9 for ; Sat, 24 Oct 2015 21:11:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yLEf0b732yaT for ; Sat, 24 Oct 2015 21:11:17 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 216B0101E8 for ; Sat, 24 Oct 2015 21:11:17 +0200 (CEST) Original-Received: from orford.cim.mcgill.ca (orford.cim.mcgill.ca [132.206.73.2]) by filter4-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t9OJBDdm010562 for ; Sat, 24 Oct 2015 21:11:15 +0200 Original-Received: from [192.168.0.11] (unknown [135.0.226.162]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: adityam) by orford.cim.mcgill.ca (Postfix) with ESMTPSA id DA8FBF7D15 for ; Sat, 24 Oct 2015 15:11:11 -0400 (EDT) In-Reply-To: User-Agent: Alpine 2.02 (OSX 1266 2009-07-14) Content-ID: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=132.206.73.2; country=CA; region=Quebec; city=Montreal; latitude=45.504; longitude=-73.5747; http://maps.google.com/maps?q=45.504,-73.5747&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01Px7bdwS - f2ab96d9522a - 20151024 (trained as not-spam) Received-SPF: neutral (filter4-ams.mf.surf.net: 132.206.73.2 is neither permitted nor denied by domain adityam@umich.edu) receiver=filter4-ams.mf.surf.net; client-ip=132.206.73.2; envelope-from=; helo=orford.cim.mcgill.ca; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:92775 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-573169478-1445713609=:6217 Content-Type: TEXT/PLAIN; CHARSET=UTF-8; FORMAT=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Mon, 19 Oct 2015, Andrew Dunning wrote: > Dear list, > > Pandoc, if you have not heard of it before, is a rather brilliant=20 > program for converting text between different markup languages: it=20 > allows, in essence, for technology-independent writing. I used pandoc to generate class notes for a course (I needed to generate=20 both HTML output and PDF output). I used the system for three years (I no= =20 longer teach that course), and I found pandoc to be very limiting, I ended= =20 up using a lot of preprocessing macros=20 (https://randomdeterminism.wordpress.com/2012/06/01/how-i-stopped-worring-a= nd-started-using-markdown-like-tex/) > It has been mentioned a few times on this list, with Pablo Rodr=C3=ADguez= =20 > recently developing a set of templates for typesetting its XHTML output= =20 > (at https://github.com/ousia/from-pandoc-to-context). One of its aims is= =20 > to ease the process of producing a high-quality PDF; it has the=20 > strongest support for LaTeX at the moment, but it seems to me that=20 > ConTeXt would ultimately provide a more reliable and lightweight=20 > solution. The basic support is already in place; it only needs to be=20 > more thoroughly updated to take advantage of MkIV. This translation is not written in a ConTeXtish way. A lot of \startmode[*en,*uk] \chapter{...} \stopmode \startmode[*es] \chapter {...} \stopmode etc could be written using \labeltext. For example: \chapter{\labeltext{notes}] \setuplabeltext[en][notes=3D{Notes}] \setuplabeltext[es][notes=3D{Notas}] etc. I think that it will be easier if the pandoc-to-context code converts XML= =20 environments to ConTeXt environments and provides a default implementation= =20 of those environments. For example, ..., etc. can be translated to ConTeXt=20 macros (such as \pandocstrong{...}) rather than direct formatting=20 commands. Then \pandocstrong could be defined as \definehighlight[pandocstrong][style=3Dbold] Simplicarly, h2, h3, can be translated to \startpandocsection etc.,=20 allowing the user to change the level of the sections. Have a look at=20 m-markdown in the source for such an implementation. This makes it much easier for a user to change the style. > If you feel even more inclined to develop the Pandoc support for=20 > ConTeXt, its writer can be found at=20 > .=20 > In my experience, ConTeXt is much easier to use than LaTeX, but it is=20 > more difficult to get started with initially due to the lack of=20 > resources for new users; it is my hope that full support for it in=20 > Pandoc will provide one way of delving into it more deeply. I think that parsing pandoc's XHTML output is a more robust solution than= =20 changing the ConTeXt writer. > I am working on improving Pandoc's generic ConTeXt template, at=20 > ;=20 > the initial proposal is at=20 > , which aims to show=20 > more of ConTeXt=E2=80=99s potential to the user through making variables= =20 > available that configure its options. I am still new to ConTeXt (having= =20 > used LaTeX for several years), and could not find a recent starter=20 > document. The example at=20 > is from 2006, and=20 > clearly does not exhibit the system=E2=80=99s full potential. I would be= =20 > grateful to know of any potential areas for improvement. I find that it is easier to write a new template according to my needs=20 rather than make the default template flexible enough that it fits=20 everyone's needs. One of the big advatanges of ConTeXt, as compared to=20 LaTeX, is that it is relatively easy to write a new style starting from=20 scratch. Aditya --0-573169478-1445713609=:6217 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --0-573169478-1445713609=:6217--