I am trying to create a workflow in which a single Markdown source document will spit HTML and LaTex friendly Markdown files. Since my content editor uses PC I need him to work on source document but also able to see output in HTML or LaTeX.

I am looking for a simple macro expanding software which will process my macros and create necessary doc both in Linux and Windows.

Mock example

My Source Markdown File

{@ verse @}
| first line
| second line
{@ verse @}


HTML-friendly Markdown                   LaTex Friendly Markdown

<div id="" class="verse">                     \begin{verse}
| first line                                  | first line   
| second line                                 | second line
</div>                                        \end{verse}

In short

The macro expanding software should be:

  1. Simple
  2. Available in Linux and Windows

Since you say, in comments above, that Cygwin is a possibility, that opens up the possibility of may *nix utilities, such as sed & awk.

Personally, I would code a Python script, but, if you don't code, take a look at sed & awk


I can recommend to write Python plugin for CudaText (or Sublime Text). Py library exists for MD, Latex, etc. Then you set a hotkey for plugin. This hotkey will generate 2 files in the folder needed, from text opened in editor. No ready program which I know.

MD to HTML - plugin exists. Only need plugin for MD to Latex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.