3

There are a number of simplified text markup languages, including the one use in wikipedia, the one used in stackoverflow, and the one used in github.

I am particulalry interested in githubs language, so called, [markdown][1] whose syntax seems as simple as this cheatsheet I just made:

# This is like \section
## This is like \subsection
### This is like \subsubsection
#### This is like \paragraph (say)

**bold** text is written like `*bold*` or `__bold__`
**italic** text is written like `*italic*` or `_italic_`

This are list:
- which can be bulleted
- or unbulleted, i.e., numbered
- or checklist.
To be numbered, write numbers, e.g., 1
1. first item
2. second item
1. third item

I particularly liked their simplified syntax for simple tables, and if not discouraged by the community, would be asking a related question soon.

  • 5
    This is related: tex.stackexchange.com/questions/236439/…. – Steven B. Segletes Nov 3 '16 at 11:15
  • 1
    One can write language-to-TeX converters using either TeX itself (can be tricky) or some scripting approach (often easier). I'm not sure what we can say beyond that! – Joseph Wright Nov 3 '16 at 12:56
  • 1
    It depends on your needs. Do you require multiple output formats? That might favour markdown. Do you need a lot of mathematics? Do you want to create graphics within your code? Fine control over vertical space, page-breaking? Those things would favour writing LaTeX natively. If you require both fine control and multiple output formats, and you are starting from scratch, without a lot of legacy documents, ConTeXt might be a good way to go. – Michael Palmer Nov 3 '16 at 13:45
  • 2
    For simple documents, markdown -> pandoc -> LaTeX|etc. is great. But as soon as the document gets even a little complicated, you start to miss the macro power of *TeX. For moderately simple things, you can add an intermediate step with GPP. This article shows a useful example (for ConTeXt). – jon Nov 3 '16 at 14:32
  • 1
    org-mode has a LaTeX export, and pandoc can convert from markdown to LaTeX as well. – ShreevatsaR Nov 3 '16 at 14:47
2

ConTeXt has a Markdown parser. From m-markdown.mkiv

This module deals with markdown which is a document encoding that
some \CONTEXT\ like much. It reminds me of the kind of minimal coding
we used before we ran into \TEX\ and were using a somewhat simple
rendering (pagination, etc) of documents. As I'm no user myself, it
is up to others to provide documentation and examples.

Things are constantly changing in ConTeXt and according to the above notice, the Markdown module is not a key priority. Therefore, your example as given above does not typeset as intended. A more minimal example as the one below however typesets as expected. If you run into any problem, just ask on the ConTeXt mailing list ntg-context@ntg.nl.

Save this as test.md.

**bold** text is written like `**bold**` or `__bold__`

*italic* text is written like `*italic*` or `_italic_`

This are list:

- which can be bulleted
- or unbulleted, i.e., numbered
- or checklist.

To be numbered, write numbers, e.g., 1

1. first item
2. second item
1. third item

Then run it with context.

$ context --extra=markdown test.md

The output will be saved to context-extra.pdf.

enter image description here

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.