-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Is your feature request related to a problem?
As I mentioned in pytask-dev/latex-dependency-scanner#12 I have problems with the compile chain if I want to use bib2gls
additionally.
latexmk
does not support bib2gls
and so I have to do it manually.
bib2gls
needs the main .aux file to run, so latex must be compiled one time, than bib2gls
must be run and afterwards the two final latex compilations.
Describe the solution you'd like
The current system is really rigid, just one entry point for latex. I would suggest a more flexible way in addition to that to create distinct tasks to latex compilation, biber
running and bib2gls
running as well as other indexing engines. So one could define different deps for the first and the final latex runs.
I would like to discuss how this API could look like.
My first suggestion is something like:
@pytask.mark.latex_first
@pytask.mark.depends_on("doc.tex")
@pytask.mark.produces("doc.bcf") # may be inferred
@pytask.mark.produces("doc.aux") # may be inferred
@pytask.mark.produces("doc.pdf")
def task_latex_first_run():
pass # dummy
@pytask.mark.latex_biber
@pytask.mark.depends_on("doc.tex")
@pytask.mark.depends_on("doc.bcf") # may be inferred
@pytask.mark.produces("doc.bbl") # may be inferred
# *.bib inferred by dep scanner
def task_latex_biber():
pass # dummy
@pytask.mark.latex_bib2gls
@pytask.mark.depends_on("doc.tex")
@pytask.mark.depends_on("doc.aux") # may be inferred
# *.bib and *.glstex inferred by dep scanner
def task_latex_biber():
pass # dummy
@pytask.mark.latex_final
@pytask.mark.depends_on("doc.bbl") # may be inferred
@pytask.mark.depends_on("doc.tex")
@pytask.mark.produces("doc.pdf")
# *.glstex inferred by dep scanner
def task_latex_final_run():
pass # dummy (compile two times)