Hi Pablo,
Thanks for your detailed reply: Somehow I missed it till just now.
Comments:
On Wed, 14 Jan 2015 12:58:11 -0700, Pablo Rodriguez
On 01/13/2015 08:59 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Dear gang,
I'm currently writing a paper with very basic typographical needs: blockquotes, emphasis, bibliography, perhaps a graphic or two. The publisher wants the thing in Word, naturally. The last time I did something like this I set up a markdown document and just exported it to both docx and to context. For simple documents this is at least workable, but I'd prefer to write in context, not markdown.
Hi Idris,
I think it is better to use a markdown source with pandoc. It is the closest model to its native format.
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.
[pandoc’s internal document format only allows attributes for certain elements, not for all of them. A workaround is to wrap then in divs an spans.]
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?
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. 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.
Now it's been a while since I've experimented with ConTeXt and epub. From lightly perusing the list it seems that there has been considerable movement on this front. So my question: Has anyone here succeeded in the following workflow:
context -> xml -> docx
[perhaps via pandoc]?
I don’t have any samples of this workflow, since I never worked this way.
It seems from this round of experimentation that the pain of context->docx via xml and pandoc will be more pain than it's worth. At some point I suspect this sort of workflow will get sorted out for ConTeXt, especially since it is somewhat unavoidable for many users.
pandoc doesn’t even have a ConTeXt reader (https://github.com/jgm/pandoc/issues/1423). You will need a way to generate a document in an XML format that pandoc understands.
XHTML is an option. And I guess that would be easy to generate with ConTeXt (I have never done it).
Just in case it helps,
Indeed, your comments are always helpful, Pablo: Thanks again!! Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523