Pandoc plugin for exporting & Export to PDF

It would be great if there some way to automate from Logseq both filtering through something like roam tools (https://roam-tools.ryanguill.com/) and then conversion with pandoc (GitHub - OliverBalfour/obsidian-pandoc: Pandoc document export plugin for Obsidian (https://obsidian.md)).

Zettlr has built-in markdown-to-Pandoc conversion and is open-source, so it’s another resource for someone that wants to build this plug-in.

I really love Logseq’s default white theme!
It would be lovely if I could export my notes as

  1. As it is displayed
  2. In paragraph format
5 Likes

Being able to export as .doc (docx), odf (Libreoffice), and PDF would be useful. Notes made in Locseq could then be easily exported and coded and analysized in qualitative data analysis software like HyperResearch, MaxQDA, or Quirkos.

7 Likes

I will vote for export a note as PDF, which is convinient for sharing.

7 Likes

Logseq is getting better every week. My only worry, now that I have migrated all my notes and articles and book chapters in progress, is that exporting to pandoc/Panwriter (for push-a-button production of pretty publishable pdf files via LaTeX) will be very complicated or even impossible. The ideal export feature would…

  • transform selected Logseq pages to vanilla markdown
  • concatenate them so they become one markdown document
  • turn references into well-formed markdown internal linksº and include embeds as simply the text that was embedded
  • not leave any Logseq-specific syntax in the exported file

Please support my request!

º Markdown can link to headings only, so page titles should become headings during export, but I don’t know what to do with references to blocks…

7 Likes

I’ll vote for this! Currently the single page markdown export can be serviceable, but is cludgy for use with multiple pages, etc.

1 Like

Can we get the option to print the notes to pdf , it would really help with submitting papers.

3 Likes

Integrating Pandoc is being looked into by the devs to allow pdf (and other format) exporting

5 Likes

I would prefer integrated Pandoc support but in the meanwhile there is this plugin:

By setting Logseq to use Computer Modern (the default LaTeX font when exporting a PDF with Pandoc) and other adjustments like using Document Mode the result is pretty similar:

1 Like

This is VERY nice. Could you send the font link?

NewCM10Regular:

https://ctan.mirror.garr.it/mirrors/ctan/fonts/newcomputermodern/otf/

Upvoted!

Pandoc support would be much appreciated. Especially interesting for those working in science/research and full form writers. And likely to bring interest to LogSeq from those crowds.

This might not be feasible near-term, but the LogSeq<->pandoc Holy Grail would certainly be full Pandoc readers and writers for LogSeq. In that way, conversion to/from loads of interesting formats would be possible, like:

  • markdown of various flavours
  • Org-Mode
  • HTML
  • EPUB
  • Man pages
  • LaTeX, LaTeX Beamer
  • OPML
  • various bibliography formats
  • docx, RTF, ODT
  • pdf
  • Jupyter notebook
  • various Wiki flavours

Add to that all the citation styles and formats supported by Pandoc.

And, since the LogSeq graph can then be converted to and from the Pandoc AST, the possibility to apply Pandoc filters (written in Lua or JSON) to the AST tree and, hence, to the LogSeq graph.

4 Likes

Another way to export a page relatively easy is using the ‘Doc viewer exporter’ plugin. It exports the document as a html as shown in logseq. You can open this html in Word (sadly, it does not work great together with LibreOffice). Export it to the folder that holds your pages to ensure images are included. From there, export to pdf, or open the page in Chrome/Firefox and export there as pdf.

2 Likes

Very interesting resource, it would also be very good if it was possible to create a website using the notes in Logseq, a good example is Org Mode Hello Worg, the Org-Mode Community!, it supports exporting to full HTML or PDF.

It would be great, as it could be used for public documentation, articles, blogs and other uses, even more so if it were possible to export a clean and standard Markdown or other type of format, so the HTML could be generated by a static site generator like Zola , MkDocs and the like.

2 Likes

‘Doc viewer exporter’ plugin v1.11.1 works great but its big problem is that it does not display tags.

Hi Alex. I am new to logseq, I am wondering how do you manage to print the math equations

Hi and welcome,

Logseq supports LaTeX syntax for math formulas and there are two ways to insert it:

  1. Inline: wrap the formula between two $: $E=mc^2$. This is meant to be used in the same line with other text.

  2. Block (it will be centered), you need a line with two $$, then one or more lines of formulas and then a line with two $$:

    $$
    E=mc^2
    $$

To insert a new line inside the same block, press Shift+Enter (as opposed to Enter that by default create a new block).

This is how almost all Markdown editors support math formulas.

In case you don’t know LaTeX, it’s the industry standard to produce academic documents and math ones in particular, start from here to learn it:

That guide comes from a popular LaTeX online editor, Overleaf.

Logseq doesn’t support the whole LaTex but just the math formulas and does so thanks to a popular library to display LaTeX formulas on the Web: KaTeX.

Since people often need other features from LaTeX in their formulas, KaTeX adds some “functions” to bridge the gap: Supported Functions · KaTeX

The functions above are syntax you can use in Logseq too and in other Markdown editors that uses KaTeX for formulas.

1 Like

Thank you for your great response! (I was using the block equation before, and I didn’t know the in line one). I had some difficulty in printing the latex math equations in my logseq document. When I’m using the pdf exporting plug-in you referred to, the latex equations will be printed as its source code form instead of the displayed form. Do you have any suggestions?

With reference to the plugin mentioned above, I use Download as PDF > Print with Retained Formatting.

The other option is export as Markdown and then use Pandoc to convert it to PDF.

1 Like