On 01/17/2015 03:45 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Hi Pablo,
Thanks for your detailed reply: Somehow I missed it till just now. Comments:
Hi Idris,
On Wed, 14 Jan 2015 12:58:11 -0700, Pablo Rodriguez wrote:
[...] I have written a small book from a markdown source. The PDF document was generated by ConTeXt, previously converted with pandoc.
I think this is the wrong way to go. Mainly because conversion to ConTeXt doesn’t rettain language information and special attributes. I had to edit the ConTeXt source to add the missing features.
Similar experience here; see below. But even the conversion to epub had issues, especially in getting the front matter to come out right.
Sorry, what was wrong in the conversion to ePub? Unless you number your headings manually, you won’t get numbers in them. As far as I know, automatic numbering is impossible in ePub 2 (there seem to be no counters available). Is there any other feature you miss when converting to ePub.
In my opinion, the right way to go is to convert the markdown source to HTML and to parse it with an environment. Otherwise, updating the source is not straightforward (either you have two sources: markdown and ConTeXt).
What do you mean by 'parse it with an environment'? Could you give an example?
Well, the ConTeXt Suite has at least one: tex/texmf-context/tex/context/base/x-html.mkiv. Environments are the standard way that ConTeXt has to directly typeset XML files (http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf). Sorry, but I cannot send a more elaborate sample right now.
Why do you prefer to avoid markdown as a source document format?
I did a small-book project last year with markdown as source, with pdf and epub output. 95% or so was good but towards the end I had no choice but to decouple the context and epub files (so I had to deal with two sources). For that project I would say that the markdown/pandoc workflow was a qualified success.
Well, two sources is suboptimal at best.
OTOH I was not the author of that small book. As a writer I am more used to writing in ConTeXt than in markdown; the flow of ideas is less disturbed that way. Closely related, the current project has a lot of bibliographical references and I don't want to manually write a bibliography in markdown.
pandoc itself seems to be able to deal with bibliographies (I have never used them myself [either in pandoc, or in TeX]). I hope it helps, Pablo -- http://www.ousia.tk