PanDoc + Latex

Hello,

I want to convert MD to PDF. The standard Export to PDF function has some limitations so i found the pandoc plugin. As i understand i need to use Latex for proper formatting. I am following a tutorial as how Latex should work and looks impressive.

What i am missing now is how this works with Obsidian and the Pandoc Plugin.
I could not find a simple explanation how these three components work together.

Can someone explain to me with an example how this should work?
If you have a simple example how to get from a note to a proper PDF would be great.

Thanks!

Johan

Usually you don’t have to do anything - just use the pandoc plugin to export your note:

pandoc_export

The only thing is: you need to have LaTex installed on your computer.

Yes, but not with the format you desire. How can i set header, footers, or a different font color for header. I see it can be done within Latex, but i am missing the connection with Obsidian. How can i configure Latex within Obsidian so i get the correct PDF output?

You have to define an export template. This requires some learning, however. If your question is just about formatting the output of your exports, a css solution is the much easier way (and then using the default obsidian pdf export function).

The important css variable here is @media print { }. You can find a basic stylesheet here, for example - just adapt it to your needs. See also this thread.

You can also work with css classes - this way you can be sure your exported pdf output has exactly the same formatting as your actual note.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.