Pandoc plugin for exporting & Export to PDF

Thank you! That works great! Do you mind to explain how to update the font if you have a chance?

Sure, you need to open custom.css (it’s in /your-graph/logseq folder or you can open it from Logseq settings) and add the following.

This one if you want to change the font only in Document Mode (the one you activate with t d shortcut (press Esc, then t then d)) like me:

:root :is(.document-mode){
  font-family: "Only Emoji", "NewComputerModernMath", "cmr10", "Noto Sans";
  font-size: 20px;
}

Or use this one for the whole page content anyway:

{
  font-family: "Only Emoji", "NewComputerModernMath", "cmr10", "Noto Sans";
  font-size: 20px;
}

In case you also want to hide block&page Properties in Document Mode:

:root :is(.document-mode)  .block-properties.block-properties.block-properties {
    display: none !important;
}

Of course you need the font I linked installed in your system.

3 Likes

I wrote a filter that uses the Pandoc AST. It first reads the Logseq Markdown using Pandoc, processes it to smooth over some idiosyncrasies of logseq itself and of my workflow at the time, and writes out Pandoc again. It’s not documented, and might not do what you want, but it might be an example to build on.

4 Likes

That’s great! I’ll check it out!

Hi! Could you please provide a brief explanation on how to implement it in logseq? Thanks for your kind contribution

Re-upping @alexfazio’s question about documentation. Would love to know how this works.

1 Like

Hey @Ed_Nico , just curious if there are any updates on this, or if there might even be a timeline if the team did decide to develop this functionality.

Also just to cast my vote specifically for full pandoc integration and handling of logseq markdown idiosyncrasies.

Thank you!

Here is some documentation about the script: GitHub - Tamriel/logseq2pandoc: Export Logseq pages to PDF or epub

1 Like

The logseq-pandoc-plugin converts your pages and blocks to different formats using Pandoc.
Supports:

  • docx
  • pptx
  • html
  • latex
  • citations

https://github.com/benjypng/logseq-pandoc-plugin/blob/main/screenshots/demo.gif

3 Likes

Thank you for the plugin, it helps for initial .docx conversion! (Although requires manual activities in Word after it.)

I shared some enhancement ideas (and an issue) in Github, maybe these can be discussed here if needed / appropriate, as I haven’t found a Github discussion page for this repo.

Hey, thanks for pointing us at logseq-pandoc-plugin.
Generally looks cool, but it’s not really working well for me:

  • Doesn’t finish for large docs. Crashes?
  • Doesn’t understand some Logseq-specific MD syntax and just prints it, which looks ugly.
  • Doesn’t actually export to PDF, just Word, PPT, HTML, LaTeX. (yes, you can covert again from there)

With logseq-pdf-export-plugin I also still see a bunch of proprietary MD markup in the output (like list bullet format), and some LaTeX formulas are shown in the source code, not rendered.

What worked better for me was “Pdf Print” (logseq-plugin-pdf-print).
It just exports/prints the whole page as-is. That includes some UI, and margins etc. So not.a perfect print layout, but it works fairly well when:

  1. Use Document View
  2. Toggle Wide Mode
  3. Expand all blocks
  4. Scroll all the way to the end to render the full page

Any other suggestions that I should try?
Kind of odd, that PDF export/print isn’t built in.

1 Like