Difference between revisions of "Command/jobname"

From Wiki
Jump to navigation Jump to search
m (add category debugging)
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>jobname</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==

Latest revision as of 16:26, 11 November 2019

\jobname

Syntax (autogenerated)


Syntax

\jobname

Description

The command \jobname prints the basename (the name without the .tex extension) of the TeX file on which ConTeXt was invoked. E.g. in the simple case of mydocument.tex, \jobname will produce mydocument. If one is using products and components, then \jobname will resolve to the basename of whatever product (or component) the context or texexec command was invoked on.

Example

With a single file:

Job name: \jobname

Multi-file example: a product and a component.

% myproduct.tex
\startproduct
    \component c_mycomponent
\stopproduct

and

% mycomponent.tex
\startcomponent c_mycomponent % not required, but good for clarity
\jobname
\stopcomponent

Compiling this with context myproduct.tex</context> means \jobname in mycompnent.tex resolves to myproduct. (Same with texexec, naturally.)

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: