Latex Workshop: Build with recipe - Add biber and more combinations of pdflatex
AndreasLuckert opened this issue · comments
Is your feature request related to a problem? Please describe.
After each package-update, I need to include the lines mentioned below into the '.vscode/extensions/james-yu.latex-workshop-8.7.1/package.json'
- file (approx. between line 600 and 800) in order to be able to build LaTeX
-documents the way I need.
I want to compile LaTeX
via pdflatex
and biber
, as I don't use bibtex
(which I consider inferior to biber
).
{
"name": "pdflatex -> biber -> pdflatex TWICE",
"tools": [
"pdflatex",
"biber",
"pdflatex",
"pdflatex"
]
},
{
"name": "execute biber",
"tools": [
"biber"
]
},
{
"name": "execute pdflatex TWICE",
"tools": [
"pdflatex",
"pdflatex"
]
},
{
"name": "execute pdflatex",
"tools": [
"pdflatex"
]
}
and below that adding biber
{
"name": "biber",
"command": "biber",
"args": [
"%DOCFILE%"
],
"env": {}
}
Describe the solution you'd like
After each update, I have to insert these code lines manually. Please, just add them to your package-distribution by default, i.e. in your 'package.json
' - file. It doesn't hurt, but rather broadens the opportunities for the grateful users. You would do me a big favor!
Thanks so far for your great extension and making it better every time!
Describe alternatives you've considered
Up to now fix that every time manually before building my LaTeX
-documents.
Why not directly using the latexmk
recipe, which handles all this transparently?
Ok, thanks for the tip.
I didn't have latexmk
installed on my Lubuntu 18.04 OS,
but pdflatex
and biber
separatly.
I've just installed latexmk
via the synaptic
package manager and now it works just as well as calling my custom "pdflatex -> biber -> pdflatex TWICE
".
The only thing I found a bit unfortunate, was, that when trying to execute latexmk
before, it didn't tell me that it wasn't installed, but just didn't do anything (without e.g. returning a concise and telling error message why it couldn't be executed. Same thing with using biber
behind the scenes, as far as I remember. Therefore it was quite complicated to tell, back in the days, when I had the problem, why latexmk
wouldn't give me the desired result, which is why I ended up with the above-mentioned custom solution.)
In conclusion concerning latexmk
:
This command calls pdflatex
and the appropriate reference-compiler (bibtex
or biber
) automatically depending on the LaTeX
-code employed? Because how should it otherwise know, whether to use bibtex
or biber
behind the scences?
Yes, latexmk
first runs a LaTeX compiler (the default is pdflatex
) and then based on the content of the auxiliary files it decides how to handle the bibliography, index, ... Finally, the LaTeX compiler is called sufficiently many times to fix references.
I am very much surprised that you did not get any message saying that latexmk
was not installed. Have you checked the LaTeX Workshop extension log. If you have latex-workshop.message.error.show
set to true
, you should even have had a popup error.
The line "latex-workshop.message.error.show": true
was not yet part of my general settings.json
- file.
I've corrected that now.
At least 1 hour ago, when I didn't have latexmk
installed yet, a pop-up error didn't appear as usual on the bottom-right.
Thanks for all your tips!
If there is more to know or to implement, which is not yet done by default in your package, let me know, please.
The default value for latex-workshop.message.error.show
is true. So, need to put it in your settings.json
, it is already provided by the extension. This lead to me to find a little bug with the popup severity. This is now fixed, so I am closing this issue.
Alright, great! Thanks for your help, effort and commitment! Keep it up!