4

I am writing my project docs in latex but I have a bunch of markdown (.md) files to include as chapters. I have a problem when latex parses the md files it reads all the tables and figures as plane text but does not render the tables nor the images. My environment is Mac OSX Mojave using MacTex-20180417, my editor is TexMaker with the LuaLatex engine. My file looks like:

\usepackage[blankBeforeHeading, html, fencedCode, 
            inlineFootnotes, citations, definitionLists, 
            hashEnumerators, smartEllipses, hybrid]{markdown}

\begin{document}

\markdownInput{myfile.md}

\end{document}

myfile.md includes a basic table and a figure but the pdf output only displays the raw data. eg: |this|is|my|table|.

My question is: Is there anything else I have to setup or any package to inlude in order to render the table and the figure?

i add a minimal example I made here

8
  • Please add a compilable MWE. Also, welcome to TeX.SE. Commented May 3, 2019 at 16:19
  • I added the MWE in the post Commented May 3, 2019 at 16:42
  • 2
    Please don't add links to MWEs. Instead edit your question to show the code directly. Commented May 3, 2019 at 16:54
  • The last time I checked the package did not support table rendering. Did you check the documentation? Commented May 3, 2019 at 17:20
  • I checked the documentation but there is no such section so I will try to search another way to solve this issue Commented May 3, 2019 at 17:27

2 Answers 2

5

You have to use the option pipeTables:

\documentclass{article}
\usepackage[blankBeforeHeading, html, fencedCode,
            inlineFootnotes, citations, definitionLists,
            hashEnumerators, smartEllipses, hybrid, pipeTables]{markdown}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.md}
This file is generated as a test for tables:

| Version | Date        |Paragraph| Description       | Author|
|:--------|:------------|---------|:------------------|-------|
| 1.0     | 12/Abril/19 | All     | initial commit    | RACG  |
| 1.0     | 12/Abril/19 | All     | initial commit    | RACG  |

\end{filecontents*}

\begin{document}
  \markdownInput{\jobname.md}
\end{document}

enter image description here

4

Maybe You should take a look at Pandoc: https://pandoc.org/ and convert .md files to LaTeX files?

1
  • I have used pandoc before but at the time I only want to render the tables and images everything else in my document is working fine Commented May 3, 2019 at 16:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.