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

learn more… | top users | synonyms

72
votes
8answers
10k views

Can one TeX file output to multiple PDF files?

I'd like to be able to create a TeX file that will output multiple PDF files with one compilation. I'm not even sure if this is possible. Here is the setup: I am writing dozens of cover letters for ...
33
votes
3answers
6k views

How to influence the name of the pdf file created with pdfLaTeX (from within the source code)?

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 ...
20
votes
5answers
2k views

Comment out lines without using % and comment enviroment

I would like to ask something which will greatly facilitate my work. But before, I introduce you to the problem I face. In my attempt to gather my notes for my students and give them something more ...
19
votes
2answers
897 views

Macro to retrieve the real name of the source file if pdflatex is invoked with -jobname

This question led to a new feature in a package: As of version 0.6 currfile supports the requested feature via a new package option and the -recorder compiler switch. For details, see Martin's ...
19
votes
2answers
836 views

What are the allowed characters in filenames?

What characters can be used in filenames for the main document and input files, both .tex and images etc.? I'm not asking about which are recommended to be used, but about a list of all possible ...
19
votes
1answer
771 views

Can/Should I use '\jobname' to pass information from outside LaTeX?

I'm creating a parameterized document. I want to pass a string into the document from outside at 'compile time'. In particular: a comma-separated list. This list will then be used by LaTeX to resolve ...
18
votes
2answers
3k views

What is the variable that contains the source file name?

I am writing a package that saves information to an external file. I would like to name that file according to the source one; something like foo.tex -> foo.bar But I cannot find any variable that ...
13
votes
1answer
357 views

Why does \jobname give asterisks/stars instead of spaces, and how do I fix this?

When I LaTeX a file named test 1.tex with the code \edef\temp{\jobname.txt}\show\temp, I get > \temp=macro: ->test*1.txt. This seems to work fine with LaTeX's internal commands, but if I then ...
11
votes
1answer
276 views

Encoding of non-ASCII characters (Umlauts) in \jobname

I need to parse \jobname to extract some metadata (such as the subject of a letter) that is encoded in the filename of the .tex file. The filenames are not restricted to ASCII, but maybe any UTF8 ...
9
votes
1answer
3k views

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... ...
9
votes
0answers
78 views

Determine File Name and Line Number Where a Macro is Invoked From

Wondering if there is any way to print out (for debugging purposes) the file name and the line number from where a macro is invoked (not where it is defined). My attempt to use the currfile package ...
8
votes
2answers
279 views

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{|"<shell command>"} syntax. However \jobname may contain whitespaces. So how to quote it for the ...
8
votes
3answers
1k views

How to use the exact same file for handout and presentation modes in beamer

I want to use the exact same file for my beamer presentation and handout. I do not like the need to comment out lines in order to create the handout or presentation (my current solution), nor do I ...
8
votes
2answers
872 views

How to test --jobname compilation option within latex file

Due to some commands in my preamble (\synctex=1,\makenomenclature,\settocdepth{subsection}) which are not fully compatible with --jobname procedure, I would like to add a test before these three line ...
8
votes
1answer
486 views

Multiple PDF generation with one tex file

I'm writing my cv using moderncv, and I want to make it in 2 languages. I wrote a common part, which both languages will have, and specific ones, where I put the translated content. I also want to ...
7
votes
2answers
923 views

Specify -job-name option to pdflatex with special characters

I'm working on a python script that will compile a series of latex documents according to a work list. Basically, the script reads the file name and title of a document, adds a couple of things that ...
6
votes
3answers
281 views

Reparing the \jobname for use in titlehead

If I name a LaTeX file hw1, I want to print Homework 1. How can I do this? I can print the string hw1 directly using \jobname, but I don't want spaces in my file name or have to type that out each ...
6
votes
2answers
173 views

How can I check if the filename of a LaTeX document contains a string?

I am preparing a LaTeX beamer presentation for students. I am looking for a simple way to create two versions of my presentation. One version for the Students, which just contains the text of the ...
5
votes
6answers
1k views

Automatically create two PDF output files from one tex file [duplicate]

Possible Duplicate: Can one TeX file output to multiple PDF files? Let's say I have a tex file foo.tex. Now, I want to achieve that pdflatex does not only create a file foo.pdf but ...
5
votes
2answers
517 views

Timestamp in document / pdf name

Let's assume my document is called test.tex. Instead of creating a test.pdf I would like to add a suffix date stamp to the filename, e.g. test_2013_05_29 (test_yyyy_mm_dd). I am compiling with ...
5
votes
1answer
881 views

Jobname of inputted file?

\begin{filecontents}{foo.tex} \def\foo{\jobname} \end{filecontents} \documentclass{article} \begin{document} \input{foo} \foo \end{document} This outputs the jobname of the main file not "foo". How ...
3
votes
2answers
367 views

\jobname in Gummi

The command \jobname usually print the file name without the path and extension, so inside a file called foo.tex will print just foo. With pdflatex foo.test or compiling from LaTeXila certainly I ...
3
votes
1answer
179 views

Line-break \jobname

Imagine I have a file called My_very_long_document_name_that_does_not_fit_in_the_left_footer.tex Now I would like to include this long string in the left footer of my document. For this, I use ...
3
votes
1answer
197 views

The attachfile2 package doesn't work when using \jobname

I'm using MiKTeX 2.9 on a Windows 7 Home Premium 64-bit computer. I have been experimenting with using attachfile2 to make a link to an embedded LaTeX file. When I compile the following document, ...
3
votes
1answer
103 views

How can i use eclipse to use the date and version in my output filename

This is less a direct LaTeX question than it is about compiling LaTeX. I am using eclipse and in my project properties i set Output File = document.pdf . My demoproject compiles and outputs the File. ...
2
votes
1answer
160 views

-job-name and BibTeX do not work together?

I have a problem using the %& -job-name= command together with the bibliography. If I compile the file without the -job-name command, the bibliography appears normally, with that command, ...
2
votes
1answer
455 views

using texlive:latex/pdflatex/xelatex and shebang (jobname)

I'm wondering, why my minimal example (in file shebang.tex) %& -job-name=test \listfiles \documentclass{article} \begin{document} Hidiho \end{document} will always (no matter if using latex, ...
1
vote
0answers
14 views

Using external pdfviewer when the pdf name is changed using -job-name

I am using TexMaker and SumatraPDF for a viewer. Everything works fine. I then wanted to change the pdf name when compiling using the following command: %& -job-name=SLR-Review This placed on ...
1
vote
0answers
29 views

Why can't I use \ifstrequal to check the \jobname? [duplicate]

I want to use the same source file to compile various target files using the -jobname option. I want to ensure that the option is not forgotten, so my approach was to check whether the \jobname is ...
1
vote
0answers
478 views

tikz externalize optimizes pictures away although jobname complies [closed]

I used tikz externalize successfully for a time now. But since my pc crashed once the externalized pictures are instantly deleted. Reading the manual I found out, that they are "optimized away" ...