ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Processing markdown
Date: Sat, 30 Jul 2011 14:15:53 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.02.1107301403420.30871@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <alpine.LNX.2.02.1107292241300.18663@ybpnyubfg.ybpnyqbznva>

> 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
___________________________________________________________________________________


      parent reply	other threads:[~2011-07-30 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 13:14 [OT] Research into Generative Typesetting John Haltiwanger
2011-07-23 16:37 ` Christian
2011-07-27 10:30   ` John Haltiwanger
2011-07-27 22:21     ` Aditya Mahajan
2011-07-28  8:18       ` Processing markdown (was: Research into Generative Typesetting) Wolfgang Schuster
2011-07-29 18:08         ` Aditya Mahajan
2011-07-29 20:38           ` Processing markdown Hans Hagen
2011-07-30  2:59             ` Aditya Mahajan
2011-07-30  7:37               ` Wolfgang Schuster
2011-07-30 14:03               ` Hans Hagen
2011-07-30 18:22                 ` Aditya Mahajan
2011-07-30 18:15               ` Aditya Mahajan [this message]

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=alpine.LNX.2.02.1107301403420.30871@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /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).