Run the preview through pandoc and give users the ability to control options?

I think providing users the option to use pandoc for md -> preview would solve a lot of problems, re: latex usage:

Pandoc doesn’t directly solve the mathjax request, but presumably being able to fully convert the markdown to latex and back would get rid of that problem.

It would also make things like this smoother, if we can see an HTML preview generated by pandoc:

If and when bibtex support is added (maybe as a plugin) pandoc’s citeproc can also generate citations at the bottom of the html:

I’m talking about something like similar this Markdown Preview Enhanced plugin for VSCode: Basically, give users the option to user the pandoc html option instead, to get a possibly less pretty, but more fully featured, HTML previewer.


Why not simply use VSCode as an external editor?
Doesn’t affect ability of Obsidian to access the file and gives you access to all the VSCode extensions.

The one feature that Obsidian has over all other roam-alternatives is that it has great support for autocompleting links that don’t yet have files. I find this to be a crucial feature. Otherwise one can end up with multiple links for the same thing that are named slightly differently, which defeats the point. Having to click through to each file every time you create a link is disruptive to the writing process. This is how org-roam, Zettlr, and VSCode’s Markdown Notes extensions work.

Obsidian generally handles links better: “shortest unique” links, great support for link refactoring (which, I suppose I could come back to Obsidian to do), etc.

1 Like

It’s also worth remembering that wysiwyg is on the roadmap, so preview will probably be temporary.

1 Like

I was comparing Obsidian markdown versus Pandoc markdown and come up with list of Pandoc extension. List is probably not complete one, and likely it’s easier to use gfm (GitHub-Flavored Markdown) as a format. Still posting it here just in case, as it helped me understand features and possible deviations with other editors.

  • space_in_atx_header
  • backtick_code_blocks
  • task_lists
  • pipe_tables
  • intraword_underscores
  • strikeout
  • tex_math_dollars
  • raw_html (but without markdown inside)
  • shortcut_reference_links
  • footnotes
  • inline_notes
  • all_symbols_escapable
  • lists_without_preceding_blankline

As this forum has some different markdown, you may copy below in Obsidian for some illustration.

- space_in_atx_header
 \# without space after is a hashtag not a header
- backtick_code_blocks
- task_lists
 - [ ] task
- pipe_tables
- intraword_underscores
 feas*ible*, not feas_able_
- strikeout
 This ~~is deleted text.~~
- tex_math_dollars
 $a = b$
- raw_html (but without markdown inside)
	<td>[a link](</td>
- shortcut_reference_links, see [link] 


- footnotes [^footnote] (numbered automatically) [^3], multi line supported 
 [^footnote]: footnotes 
 [^3]: it's two
- inline_notes^[Inlines notes are easier to write, since you don't have to pick an identifier and move down to type the note.]

- all_symbols_escapable
 \<one two\>

- lists_without_preceding_blankline

1 Like

Marked 2 (macOS only) offers great previews, you can use your own CSS, and it can export to a variety of formats, from PDF to DOCX to RTF to HTML…and more.

1 Like

I concur. At least this is how i use it. Along with pandoc processor options to have my references rendered from Zotero + custom preprocessor for having Obsidian [[WikiLinks]] in Marked2 clickable (they open appropriate files in right back in Obsidian).

If anyone is interested the gist with instructions is below. Maybe it will be helfpul for someone


Bumping this request. It has a lot of value.

Benefits are numerous:

  • Pandoc is an extension of Markdown, users could opt into supporting it via setting toggle
    • Users can use more flexible table formats including multiline tables
  • Obsidian preview mode uses Pandoc behind the scenes to generate the preview resulting in richer rendering
  • Users could control certain rendering options in settings
  • Pandoc allows creation of “filters” to preprocess the abstract syntax tree prior to rendering
    • Obsidian devs could write filters to customize how Obsidian renders content
    • Obsidian could expose capability for plugin authors to write filters (all or a subset)
    • Filters can be written in essentially any language including NodeJS and Python, with many supporting libraries available
  • Obsidian could enable export to any format supported by Pandoc, not just PDF (e.g. to Word, HTML, etc.)
  • Obsidian can provide a feature export entire vault to [format] including features to convert/export entire vault to [markdown flavor] – enabling user to always return to “Obsidian default markdown” or whatever at any time

No doubt there are many more capabilities here.