From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/70345 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Processing markdown Date: Sat, 30 Jul 2011 14:15:53 -0400 (EDT) Message-ID: References: <003c01cc4956$c1e18820$45a49860$@gmx.de> <64AF744D-BEA6-420C-B5CF-8A62A45499F1@googlemail.com> <4E331A39.7040600@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1312049707 19706 80.91.229.12 (30 Jul 2011 18:15:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2011 18:15:07 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jul 30 20:15:01 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QnE3w-0001Et-Ni for gctc-ntg-context-518@m.gmane.org; Sat, 30 Jul 2011 20:15:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D6523CAEA3; Sat, 30 Jul 2011 20:14:59 +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 6N3+0cS5mCCL; Sat, 30 Jul 2011 20:14:57 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E20C4CAE9D; Sat, 30 Jul 2011 20:14:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3A341CAE9D for ; Sat, 30 Jul 2011 20:14:55 +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 WsbwIHdffliY for ; Sat, 30 Jul 2011 20:14:43 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id C12D3CAE56 for ; Sat, 30 Jul 2011 20:14:43 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p6UIEfnP011696 for ; Sat, 30 Jul 2011 20:14:42 +0200 Original-Received: FROM adi-netbook (bas3-montreal02-1096680502.dsl.bell.ca [65.94.4.54]) By tombraider.mr.itd.umich.edu ID 4E344A0F.F2C48.19070 ; Authuser adityam; 30 Jul 2011 14:14:40 EDT In-Reply-To: User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bFeieFWz - 8759ce7715d7 - 20110730 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:70345 Archived-At: > On Fri, 29 Jul 2011, Hans Hagen wrote: >> In due time we can extend the parser (given that I know the specs). A small feature is missing in the handling of figures. The markdown syntax[1] states that figures are specified as follows: ![Alt text](/path/to/img.jpg) Pandoc, when translating from markdown to latex/context, treats the alt-text as the figure caption. ConTeXt, just ignores the alt text. I would suggest changing the c_image function to (not completely sure about this) local function c_image(lab,src,tit) return { "\\placemarkdownfigure{", lab, "}", "{", "\\externalfigure[", src, "]", "}" } end where \placemarkdownfigure is a new type of float. I have not used any optional argument to \placemarkdownfigure so that the options can be set using \setupfloat. The default setup could be \setupfloat[markdownfigure][default={here,nonumber}] What do others think? Aditya [1]: http://daringfireball.net/projects/markdown/syntax#img ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________