Questions tagged [jobname]

This is the base name used by a TeX run to identify itself.

This is the base name used by a TeX run to identify itself. It is usually the base of the filename of the main source file (e.g. mypaper.tex would, when TeXed, have jobname mypaper) but can also, in the standard implementations of TeX, be set at the command line such as with the switch -jobname. Auxiliary files produced by both TeX and LaTeX will have this as their base name; these include the .log, .aux, and of course, .dvi or .pdf as the output (see File extensions of LaTeX-related files for a list of file extensions associated with a (La)TeX build).

70 questions
14
votes
1 answer

Output Filename

I'm using texmaker and PdfLaTeX. With the exception of changing the .tex filename, does anyone know how to modify the output file name based on a parameter? I am aware that the following line... %& -job-name=XYZ if placed at the beginning of the…
9
votes
2 answers

How to pass \jobname with whitespace to external shell command

I need to pass \jobname to some external shell command and read back its input using the \input{|""} syntax. However \jobname may contain whitespaces. So how to quote it for the shell? % pdflatex --shell-escape "file with…
Daniel
  • 37,517
4
votes
1 answer

`\jobname` doesn't handle underscores properly

In this thread, @DavidCarlisle asked for an example showing that \jobname doesn't handle underscores properly. Here's an example \documentclass[11pt]{article} \begin{document} \begin{center} \jobname \\ \today \end{center} \end{document} If you…
Leo Simon
  • 2,199
3
votes
1 answer

Is there a simple way to build two pdfs from the same tex file?

I'm trying to hack together a way to generate solutions files to my quizzes and exams. Here is my current workflow. I have a file…
3
votes
2 answers

inside an \input file, how to determine the name "\input"ing file?

I have two tex files % file1.tex (this is the inputing file) \input file2 \bye and % file2.tex (this is the file input into file1.tex) \printTheNameOfWhateverFileInputMe What is working to show the first file name is % file2.tex (this is the file…
1
vote
1 answer

Automatically escape special characters

I have a document where I would like to put the jobname into the footer with the \jobname macro. However, if my main file has underscores in its file name, the jobname cannot be printed properly due to the underscore. How can I tell LaTeX to…
T. Pluess
  • 1,040