CTAN Comprehensive TeX Archive Network

Directory macros/generic/markdown



release CircleCI

The Markdown package converts markdown markup to commands. The functionality is provided both as a Lua module, and as plain , , and Cont macro packages that can be used to directly typeset documents containing markdown markup. Unlike other convertors, the Markdown package does not require any external programs, and makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown syntax is encouraged. 😉banner

Further information

For further information, consult one of the following:

  1. The user manual, which can be produced by interpreting the markdown.ins file using a Unicode-aware engine, such as (xetex markdown.ins) or Lua (luatex markdown.ins). The manual will reside in the file markdown.md and the CSS stylesheet markdown.css.
  2. The technical documentation, which can be typeset by running the MK tool on the markdown.dtx file (latexmk markdown.dtx) after installing the Markdown package. MK should be included in your distribution. The typeset documentation will reside in the file markdown.pdf.
  3. Tutorials and example documents by Lian Tze Lim at Overleaf:
  4. My journal articles published by TUGboat:
  5. My journal articles published by CSTUG (in Czech):


Logo Acknowledgement
I gratefully acknowledge the funding from the Faculty of Informatics at the Masaryk University in Brno, Czech Republic, for the development of the Markdown package.
Extensive user documentation for the Markdown package was kindly written by Lian Tze Lim and published by Overleaf.
Support for content slicing (Lua options shiftHeadings and slice) and pipe tables (Lua options pipeTables and tableCaptions) was graciously sponsored by David Vins and Omedym.


Apart from the example markdown documents, tests, and continuous integration, which are placed in the examples/, tests/, and .circleci/ directories, the complete source code and documentation of the package are placed in the markdown.dtx document following the literate programming paradigm. Some useful commands, such as building the release archives and typesetting the documentation, are placed in the Makefile file for ease of maintenance.

When the file markdown.ins is interpreted using a Unicode-aware engine, such as (xetex markdown.ins) or Lua (luatex markdown.ins), several files are produced from the markdown.dtx document. In markdown.dtx, the boundaries between the produced files are marked up using an XML-like syntax provided by the DocStrip plain package.

Running the MK tool on the markdown.dtx file (latexmk markdown.dtx) after the Markdown package has been installed typesets the documentation. In markdown.dtx, the documentation is placed inside comments and marked up using the ltxdockit document class. Support for typesetting the documentation is provided by the doc package.

Citing Markdown

When citing Markdown in academic papers and theses, please use the following entry:

  author  = {V\'{i}t Novotn\'{y}},
  year    = {2017},
  title   = {Using {M}arkdown Inside {\TeX} Documents},
  journal = {TUGboat},
  volume  = {38},
  number  = {2},
  pages   = {214--217},
  issn    = {0896-3207},
  url     = {https://tug.org/TUGboat/tb38-2/tb119novotny.pdf},
  urldate = {2020-07-31},

Download the contents of this package in one zip archive (557.3k).

markdown – A package for converting and rendering markdown documents inside

The package provides facilities for the conversion of markdown markup to plain . These are provided both in form of a Lua module and in form of plain , , and Cont macro packages that enable the direct inclusion of markdown documents inside documents.

Architecturally, the package consists of the Lunamark Lua module by John MacFarlane, which was slimmed down and rewritten for the needs of the package. Lunamark provides speedy markdown parsing for the rest of the package. On top of Lunamark sits code for the plain , , and Cont formats by VĂ­t NovotnĂ˝.

Bug trackerhttps://github.com/Witiko/markdown/issues
Version2.9.0 2020-09-14
LicensesThe Project Public License 1.3
Copyright2009–2016 John MacFarlane, Hans Hagen
2017–2020 VĂ­t NovotnĂ˝
MaintainerVĂ­t NovotnĂ˝
TDS archivemarkdown.tds.zip
Contained inTeX Live as markdown
MiKTeX as markdown
Guest Book Sitemap Contact Contact Author