I'm having a problem where in markdown-live-preview-mode tables are not correctly converted to HTML from markdown. I'm using markdown-mode. I've tried using pandoc to create the HTML and pandoc correctly produces the table. I would like to set markdown-mode to use pandoc to create the HTML file for the live preview.

I get this from current markdown-live:

| Page Type | Description | |:-----------:|:---------------------------------------------------------:| | Stand-alone |
about or static text | | Referance | Index lookup page wit likns of all blog pasts or products | |
periodical | Blog posts or writing column, any series |

If I do M-! [return] pandoc -s -o filename.html filename.md [return]. [position cursor on eww buffer] g.

<tr class="header">
<th style="text-align: center;">Page Type</th>
<th style="text-align: center;">Description</th>
<tr class="odd">
<td style="text-align: center;">Stand-alone</td>
<td style="text-align: center;">about or static text</td>
<tr class="even">
<td style="text-align: center;">Referance</td>
<td style="text-align: center;">Index lookup page wit likns of all blog pasts or products</td>
<tr class="odd">
<td style="text-align: center;">periodical</td>
<td style="text-align: center;">Blog posts or writing column, any series</td>

It doesn't work on stackexchange; markdown tables. After running pandoc the output is correct in filename.html

I'm thinking there is a way to customize the command that markdown-mode uses to convert markdown to HTML in emacs init file.

1 Answer 1


Here are the settings I use:

(setq markdown-command
       " --from=markdown --to=html"
       " --standalone --mathjax --highlight-style=pygments"
       " --css=pandoc.css"
       " --quiet"
       " --number-sections"
       " --lua-filter=lua.lua"
       " --metadata-file=metadata.yml"
       " --metadata=reference-section-title:'References & Further Reading'"
       " --filter pandoc-citeproc"
       " --bibliography=bibfile.bib"

This lets me open an html file that is generated via pandoc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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