Open GiggleLiu opened 1 year ago
According to https://github.com/mossr/julia-mono-listings/blob/master/julia_font.tex, the path is specified relatively for JuliaMono
, so maybe you are not in the right folder when running latexmk
.
Alternatively, what you can try to do is to remove the path
specification and install the font JuliaMono
globally on your system.
Thanks for the reply. The path of the ttf file is maybe correct. If I remove the ttf file, the error is different. Or do you have any suggested changes? My file structure is as above.
I did not install the ttf file because I wish the project can be compiled on different machines. I can do that if there is no elegant solutions to the path issue.
If I remove the ttf file, the error is different.
That's an interesting observation. Can you try compiling with tectonic --print <input>
? It probably won't change much but maybe it's good to check anther build system.
Can you also try specifying an absolute path for Path
in julia_font.tex
? Make sure to append a trailing slash (I don't know why but that's necessary).
I did not install the ttf file because I wish the project can be compiled on different machines. I can do that if there is no elegant solutions to the path issue.
In Books.jl
, I'm interpolating the absolute path to JuliaMono
inside the template.tex
and that works (https://github.com/JuliaBooks/Books.jl/blob/a9cfb52e81cd6d554b3406cd40e0e67ed48032e1/defaults/template.tex#L48-L53) reliably on multiple systems including MacOS and Linux, so your plan should also work. Debugging LaTeX is a pain though. For me what worked was lots of trial and error.
@GiggleLiu I had the same error and this worked for me:
diff --git a/julia-mono-listings.sty b/julia-mono-listings.sty
index cac02d0..a29e400 100644
--- a/julia-mono-listings.sty
+++ b/julia-mono-listings.sty
@@ -19,7 +19,6 @@
\newfontfamily\JuliaMono{JuliaMono}[
UprightFont = *-Regular,
BoldFont = *-Bold,
- Path = ./,
Extension = .ttf]
\newfontface\JuliaMonoRegular{JuliaMono-Regular}
\newfontface\JuliaMonoBold{JuliaMono-Bold}
I tried to compile the
example/example.tex
on my local host, but got the following error message.I have copied the example.tex file into the root folder, so there is a
JuliaMono-Regular.ttf
file in the compiling folder.Need some help to get over the error.