0

I have a problem getting two seperate bibliographies from a main .bib file. The other problem is the issue with the \defcitealias described here. I tried to reproduce the example in the link, but it is not working for me.

MWE

% arara: pdflatex
% arara: bibtex
% arara: bibtex: { files: [ sec ] }
% arara: pdflatex
% arara: pdflatex

\documentclass[a4paper]{article} \usepackage[numbers]{natbib}

\makeatletter \def@mb@citenamelist{cite,citep,citet,citealp,citealt,citepalias,citetalias} \makeatother

\usepackage{multibib} \newcites{sec}{Other bibliographic references}

\defcitealias{manual-full}{International journal of logistics, issue 91}

\begin{document}

\cite{article-full}

\citesec{booklet-full}

Something something something and then \citepaliassec{manual-full}.

\bibliographystyle{plainnat}
\bibliography{xampl}

\let\noopsort\undefined
\let\printfirst\undefined
\let\singleletter\undefined
\let\switchargs\undefined

\bibliographystylesec{plainnat}
\bibliographysec{xampl}

\end{document}

Output

enter image description here

Also, I am wondering what is ment with "To process your document, three runs of LATEX and two runs of BibTEX are required." in the multibib manual p.4? I compiled my .tex document in TeXStudio with F5 and F8, was this the way to do it?

Edit

I added the lines

% arara: pdflatex
% arara: bibtex
% arara: bibtex: { files: [ sec ] }
% arara: pdflatex
% arara: pdflatex

for the compiling issue, but the problem/output stays the same.

Edit2

I followed the instructions recommended here and installed arara.

enter image description here

Then, I implemented arara in TeXstudio

enter image description here enter image description here

Then, I tried to compile the data using arara but I got the error message:

Prozess gestartet: "C:/Users/.../AppData/Local/Programs/MiKTeX/miktex/bin/x64/arara.exe" -v -l "natbib+multibib"
Entschuldigung, aber arara.exe ist aus dem folgenden Grund fehlgeschlagen: MiKTeX could not find the script engine 'java.exe' which is required to execute 'arara'. Abhilfe: Make sure 'java.exe' is installed on your system. Die Log-Datei enthält hoffentlich alle Informationen, um MiKTeX wieder in Gang zu bringen. C:\Users\...\AppData\Local\MiKTeX\miktex\log\arara.log Für weitere Information, besuchen Sie: https://miktex.org/kb/fix-script-engine-not-found

I think the Java issue is stated wrong, since I can run arara and it is already installed.

enter image description here

Does anyone know the cause of the error?

Excelsior
  • 2,322
  • I think arara might be making this more complicated than it needs to be? I simply compiled the mwe you provide in TeXstudio (twice) and both bibliographies were produced. Not sure what the default is, but Options > Configure TeXstudio > Commands > BibTeX = parallel bibtex -- ?*.aux which evidently runs bibtex on all aux files. I also successfully compiled in the terminal using pdflatex mwe && bibtex mwe && bibtex sec && pdflatex mwe && pdflatex mwe. – jessexknight Apr 03 '21 at 12:25
  • @jessexknight I changed bibtex8.exe % (default) to your suggestion parallel bibtex -- ?*.aux and now all references were not linkes i.e. labeled with ?. Is there sommething else I have to change in TeXstudio? – Excelsior Apr 03 '21 at 16:37
  • Sorry, I think it's a linux/mac (me) vs windows (you?) thing: I think you should change it to parallel bibtex8.exe -- ?*.aux. – jessexknight Apr 03 '21 at 16:42
  • @jessexknight I am sorry, I ment bibtex.exe %. I am using windows, you are right. Then the change would be parallel bibtex.exe -- ?*.aux ? The error message I recieved with parallel bibtex -- ?* was that they could not run the command parallel bibtex -- sec.aux – Excelsior Apr 03 '21 at 16:52
  • Try removing parallel, so just bibtex.exe -- ?*.aux The ?*.aux should be platform independent. – jessexknight Apr 03 '21 at 16:56
  • 1
    Without parallel I get two bibliographies. I have to move the four \let... commands between the two bibliography commands and now it works perfect. Thanks a lot. – Excelsior Apr 03 '21 at 17:01
  • @jessexknight Is there some source or documentation where I can find these kind of command lines? – Excelsior Apr 03 '21 at 17:02
  • Kind of. At the bottom of Options > Configure TeXstudio > Commands, there is a short blurb explaining the special characters. I myself wasn't sure where parallel came from but apparently it's a linux thing. – jessexknight Apr 03 '21 at 17:10

1 Answers1

1

If you're using TeXstudio, you don't need to use Arara, since the following setting will run all the appropriate tools (latex, bibtex) in the right order:

Options > Configure TeXstudio... > Commands > BibTeX = bibtex -- ?*.aux (or bibtex.exe on Windows).

The explanation at the bottom of the Commands page gives the explanation of ?*.aux: all .aux files in the current directory. By default, TeXstudio will run (pdf)latex and bibliography tool a reasonable number of times while compiling. These settings are defined in the Build page, but the default values all work fine for me. You may still have to compile twice.

You may also be interested to know about magic comments in TeXstudio.

jessexknight
  • 2,732