This is more a question than an issue, but it may help to improve the documentation. A non-trivial LaTeX project consists of many files other than the main file, like figures, tex, sty, cls, etc. They are provided to the compiler with the additionalFiles option. Right now, the documentation in compiler.js is quite minimal:
@property {Object<string, string|Uint8Array>} [additionalFiles] - Additional files for compilation
My question is about the key. I understand that it is a filename. However, how about files residing in a different directory? Consider the following project structure:
/main.tex
/logo.jpeg
/figures/plot.pdf
/revision/main.tex
/revision/figures/plot.pdf
Let's assume that both main.tex files could be compiled, resulting in two different pdf documents. Say, I would like to compile the file
/revision/main.tex. How should the keys of the various figures look like?
I would provide the content of /revision/main.tex as the source parameter. Then my first reflex is to make the paths relative to the source:
const additionalFiles = {
"../logo.jpeg": something1,
"../figures/plot.pdf": something2,
"figures/plot.pdf": something3,
};
Is that the intended (correct) way to do it?
I guess that this question really addresses busytex internals, but it would still be good to document the correct use of additionalFiles.
This is more a question than an issue, but it may help to improve the documentation. A non-trivial LaTeX project consists of many files other than the main file, like figures, tex, sty, cls, etc. They are provided to the compiler with the
additionalFilesoption. Right now, the documentation incompiler.jsis quite minimal:My question is about the key. I understand that it is a filename. However, how about files residing in a different directory? Consider the following project structure:
Let's assume that both
main.texfiles could be compiled, resulting in two different pdf documents. Say, I would like to compile the file/revision/main.tex. How should the keys of the various figures look like?I would provide the content of
/revision/main.texas thesourceparameter. Then my first reflex is to make the paths relative to the source:Is that the intended (correct) way to do it?
I guess that this question really addresses busytex internals, but it would still be good to document the correct use of
additionalFiles.