I’m trying to automate a conversion. I can successfully turn my Obsidian file to a .tex file via the shell command:
mkdir -p /Documents/Obsidian/Output/{{title}}
pandoc -r markdown-auto_identifiers -w latex {{file_path:absolute}} -o /Obsidian/Output/{{title}}/{{title}}.tex --template="/Documents/LaTeX/My Templates/Proposal/default-proposal.tex"
So far I’ve then had to open the .tex file with TeXstudio and compile it to PDF, important part of this is the bibliography, processing the citekeys.
I’d like to automate this. I’ve found out about latexmk
and if I open a terminal in that folder manually and run latexmk -pdf
in the same folder as the .tex file it works like a charm.
However, if I add
cd /Documents/Obsidian/Output/{{title}}
latexmk -pdf
to my Shell Command, it seems to do something and all the correct files are created. It even renders the PDF but the citekeys aren’t processed correctly, i.e. the citekeys are just printed as citekeys not in the desired citation format.
Does anyone have any idea how to solve this?
I’d even settle for a way to have a terminal window automatically open if that is an option.
Thanks