Congigure Arara for eclipse.
Go to the tool button (see below)> external tool configuration
Then click on program > new
And configure arara as following :
Then create an example code. You .Rnw file or latex file must have the first lines with % arara:
and commands. Below I'm using first pdflatex to build the file then bibtex and makeglossary, finally I re-run the pdflatex twice for a complete document. You can avoid one step simply by typing !arara:
.
Here is an example which uses both \gls{}
commands for glossary and \cite{}
commands for bibtex. The R code is just to show that this is a .Rnw document.
% arara: pdflatex: { action: nonstopmode, synctex: True }
% arara: bibtex
% arara: makeglossaries
% arara: pdflatex: {action: nonstopmode, synctex: True }
% arara: pdflatex: {action: nonstopmode, synctex: True }
arara.Rnw :
% arara: pdflatex: { action: nonstopmode, synctex: True }
% arara: bibtex
% arara: makeglossaries
% arara: pdflatex: {action: nonstopmode, synctex: True }
% arara: pdflatex: {action: nonstopmode, synctex: True }
\documentclass{article}
\usepackage{glossaries}
\newglossaryentry{knitr}{name={Knitr},description={A package for reproducible
research}}
\newglossaryentry{latex}{name={Latex},description={A typesetting program}}
\newglossaryentry{arara}{name={Arara},description={TeX automation tool based on
rules and directives.}}
\makeglossaries
\begin{document}
<<get_citation, echo=FALSE, eval=FALSE >>=
print(citation("knitr"),bibtex=TRUE)
@
This short reproducible example demonstrates how to use the \gls{arara}
\gls{latex} tool with a \textbf{Sweave} document, using eclipse and \gls{knitr}.
For demonstration we will include a bibliography using \cite{knitr_2017} and
\cite{knitr_2015}.
\printglossary[numberedsection]
\bibliographystyle{plain}
\bibliography{arara}
\end{document}
arara.bib :
@Book{knitr_2015,
title = {Dynamic Documents with {R} and knitr},
author = {Yihui Xie},
publisher = {Chapman and Hall/CRC},
address = {Boca Raton, Florida},
year = {2015},
edition = {2nd},
note = {ISBN 978-1498716963},
url = {https://yihui.name/knitr/},
}
@Manual{knitr_2017,
title = {knitr: A General-Purpose Package for Dynamic Report Generation in R},
author = {Yihui Xie},
year = {2017},
note = {R package version 1.17},
url = {https://yihui.name/knitr/},
}
When first running the .Rmd, the bibliography and glossaries are not built.
So what you do is you shift the the LATEX file and click on the cmd button arara
finally you get the document built with the bibliography and glossaries, re-run the arara process if you need to update the bibliography and glossaries, otherwise just run the knitr command, the pdf will be built.