I have a complex .tex file that I use as template for a particular type of document we use. Within the preamble, I define a variable for the name of the final document using something like the following:
\usepackage{mVersion}
\setVersion{1.0.5}
\increaseBuild
\renewcommand{\version}{v\versionnumber (\thebuildcounter)}
\newcommand{\FileName}{Some\_File\_Name\_\version.pdf}
This \FileName variable is used within the header of the document to list the expected name of the final pdf, which in this example would be Some_File_Name_v1.0.5(12345), assuming that the build number is 12345.
What I would like to do is to use this string to dynamically set the actual output file name as well. I can partly control the output name simply by naming the .tex to Some_File_Name.tex, but this doesn't append the version number, and I have to go back after the build completes and add the version and build numbers in windows.
Is it possible to configure TeXMaker to do this renaming for me automatically? My quick build command for these files is currently set to "PdfLaTeX + Bib(la)tex + PdfLaTeX (x2) + View Pdf" in the TeXMaker configuration window.
I'm ok with using a custom build command if necessary, as long as I don't have to do anything manually in the terminal. I have coworkers who need to build these documents on occasion, and I don't want them to have to muck with the command line, but I can set them up with a custom quick build command.
arara. – Alan Munn Feb 23 '23 at 18:42