reddit / emacs

How to export Denote notes to PDFs with specific options

olivuser · 2022-07-29 08:02
Hej fellows, recently u/protesilaos published an excellent package called Denote which provides a simple interface to note taking. Coming from an ugly hyrolo file and dreading the hidden complexities of org-roam, I rejoice this development. Now, I have been wanting to implement a workflow that allows me to export my notes to other formats such as ODT and PDF, so that I can share what I write down with other, non-tech-savvy people (my notes contain my knowledge database). However, I have some requirements for this: * I want to produce a continuous file which contains parts or the entirety of my knowledge database. * I want each note to have a separate heading. * I want each heading to feature the tags I associate with a particular note. Now, I know that there is an org-export facility or pandoc. However, in about two hours research I have not found out how to do what I want specifically for exporting Denote's notes. Denote uses four keywords at the start of each note: TITLE, DATE, (FILE)TAGS, IDENTIFIER. When exporting, I want that DATE and IDENTIFIER keywords are (can be) omitted. However, I want that the contents of the TITLE keyword are (automatically) transformed into a regular heading. Also, I want that the FILETAGS are included as a sub-heading. I have more experience with latex than I have with markdown/pandoc, let's get a tiny bit more concrete: I'd like to be able to transform the contents of the TITLE keyword into a latex `\chapter` (not the document's title, that won't work when collating several notes) and the contents of the FILETAGS keyword into a latex `\paragraph`, leaving the actual contents of the note itself untouched. Since I am new to programming and not versed with either org-mode (or its export), latex or pandoc, I am at a loss as to how to approach the problem. So the following would be really helpful to me: * **ideas on how to tackle the problem programmatically**: is this a problem to be heavy-lifted by org-latex-export alone, or do I need to effect the transformations beforehand? or is pandoc the right approach? * **suggestions on whether org-mode or markdown is the easier route to success**: I am currently in the process of transitioning from an old and kinda deficient notes system to a new one. Thus, I am willing to invest the time learning either org-mode or markdown more in-depth as soon as I know it will be able to do what I want. * **suggestions regarding (learning) resources related to the problem**: I did my best to be clear and concise in what I want. Obviously I won't say no to a bit of spoon-feeding, but I am just as glad to read into related resources. In my own research I was unable to find the information I need, so anything is welcome here. Thanks a bunch in advance. Have a good day, folks!
paretoOptimalDev · 2022-07-30 00:32
> Coming from an ugly hyrolo file and dreading the hidden complexities of org-roam, I rejoice this development. I'm somewhat familiar with denote, but is someone who uses org roam a ton... it also seems pretty simple. Maybe you consider the sqlite database part of that hidden complexity?
olivuser · 2022-07-30 06:20
Thanks for your input. So I have Kind of a love-hate with org mode generally speaking. While I admire(!!) the functionality it provides, the number of times even base org mode (no contrib, no fancy packages) has rendered my emacs usage less pleasurable is beyond my comfort zone. I just found out that you have to put org early in your loadpath, otherwise (that was my Problem) you literally can't type in an org mode buffer (another thread in this sub). The fact that with sqlite comes another factor unbeknownst to me into the emacs mix gives me THE SHIVERS1. I heard org roam can tend to get slow with large databases, and I am starting to appreciate the "one tool per job" Philosophy which I believe is often attributed to \*nix.