[Tex/LaTex] How to influence the name of the pdf file created with pdfLaTeX (from within the source code)

external filesjobname

I have a source file called 2011-05-27_Myfilename.tex and I'd like to create a PDF file from it called only Myfilename.pdf.

Can this be configured from within the .tex file itself?

(It seems to be possible with

pdflatex -jobname=Myfilename.tex 2011-05-27_Myfilename.tex

However, as many different files are concerned, It would be easier to have an option like output=Myfilename in the LaTeX source code.)

Best Answer

I'm afraid you cannot alter the output name from within the LaTeX source: the \jobname primitive can be read but not altered. You can arrange two-file solutions which allow one LaTeX file to 'call' another, but I am not sure that will answer your problem here.

Related Question