Install latexmk by entering the following commands in the terminal:
sudo apt update sudo apt install latexmk
Description:
Perl script for running LaTeX the correct number of times
Latexmk runs LaTeX the correct number of times to resolve cross references, etc; it also runs auxiliary programs (bibtex, makeindex if necessary, and dvips and/or a previewer as requested). It has a number of other useful capabilities, for example to start a previewer and then run latex whenever the source files are updated, so that the previewer gives an up-to-date view of the document.
Version: 1:4.41-1
Section: universe/tex