Following the recommendation of the kind user in this post: PDFLaTeX and Arabic, Farsi and other scripts
I switched compilers, from Pdftex to Luatex in order to be able to print non-Latin alphabets, which works.
What doesn't work is my shell script to automatically convert from markdown, via pandoc, to a .tex file, to a PDF via Latexmk. I had this working perfectly, but I don't know how to do it for Luatex.
This was the script:
mkdir -p /home/Docs/Notes/{{title}}
pandoc -r markdown-auto_identifiers -w latex {{file_path:absolute}} -o /home/Docs/Notes/{{title}}/{{title}}.tex --template="/home/Docs/LaTeX/My Templates/Notes/Notes.tex" --lua-filter=/home/Docs/LaTeX/Filters/highlight.lua --lua-filter=/home/Docs/LaTeX/Filters/highlight-period.lua --lua-filter=/home/Docs/LaTeX/Filters/Span.lua --lua-filter=/home/Docs/LaTeX/Filters/Span-period.lua
gnome-terminal -- bash -c "cd /home/Docs/Notes/{{title}} && latexmk -pvc -pdf < /dev/null && latexmk -c && cp {{title}}.pdf /home/Docs/Notes/ && exit; exec bash"
I run this from a plugin in Obsidian.md (a markdown editor) that can replace the {{title}} variables with the current note, i.e. file, name.
With the above script, I get told:
! Package babel Error: The bidi method 'basic' is available only in
(babel) luatex. I'll continue with 'bidi=default', so
(babel) expect wrong results.
I believe only the part after gnome-terminal is relevant, and I tried switching the latexmk command to this: latexmk -pdflatex=lualatex -pdf {{title}}.tex
With this it compiles a little further, but still get an error, and no PDF is produced.
=== TeX engine is 'pdfTeX'
Latexmk: Found input bbl file '2023-07-24.bbl'
Latexmk: Log file says output to '2023-07-24.pdf'
Biber warning: [177] Biber.pm:130> WARN - The file '2023-07-24.bcf' does not contain any citations!
Latexmk: Found biber source file(s) [2023-07-24.bcf]
Latexmk: All targets (2023-07-24.pdf) are up-to-date
Rc files read:
/etc/LatexMk
Latexmk: This is Latexmk, John Collins, 20 November 2021, version: 4.76.
cp: cannot create regular file '/home/Docs/Notes/': Not a directory
My MWE LaTeX Document from the other thread:
\documentclass[a4paper, 12pt, oneside]{article}
\usepackage[bidi=basic]{babel}
\babelprovide[main, import]{english}
\babelprovide[onchar = ids fonts]{arabic}
\babelfont[arabic]{rm}[Renderer = HarfBuzz, Scale = MatchLowercase]{Amiri}
\begin{document}
Giaurs - From Persian فروشگاه (gâvor)
\end{document}
How can I adapt this script to automate the process once again.
Thanks!
-pdfto-pdfluaseelatexmk --help– David Carlisle Aug 23 '23 at 14:18-lualatex– daleif Aug 23 '23 at 14:27