Try arara. It also has a great manual.
\expandafter\thecomment
Arara provides us with ways (rules) to compile the document that are specific to the document. The rules for compilation are put inside the document. Hence, compilation boils down to a simple arara yourtexfile
.
First, install arara and make sure that the arara executable is included in system path. Arara also needs java runtime environment
(jre) to be installed. To use arara we should add the rules inside the document itself as in the following code. Save this code as yourfile.tex
and execute arara yourfile
:
% arara: pdflatex: {synctex: yes}
% arara: makeindex: { style: yourfile }
% arara: biber
% arara: pdflatex: {synctex: yes}
% arara: pdflatex: {synctex: yes}
% arara: clean: {files: [yourfile.aux, yourfile.idx, yourfile.ilg, yourfile.ind, yourfile.log, yourfile.bbl, yourfile.bcf, yourfile.ist, yourfile.blg, yourfile.run.xml]}
%
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage{makeidx}
\begin{filecontents}{\jobname.ist}
heading_prefix "{\\bfseries "
heading_suffix "\\hfil}\\nopagebreak\n"
headings_flag 1
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
delim_r "\\textendash"
suffix_2p "\\nohyperpage{\\,f.}"
suffix_3p "\\nohyperpage{\\,ff.}"
\end{filecontents}
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\makeindex
\begin{document}
A citation\cite{companion} and an index entry\index{bla} and some arbitrary text.
\printbibliography
\printindex
\end{document}
To comment out an arara directive, just put !
like
% !arara: makeindex
For more details, consult the excellent arara guide.