Great, thank you!


On Thu, 08 Feb 2018 11:06:29 +0100, Wolfgang Schuster 
<> wrote:

Procházka Lukáš Ing. <>
8. Februar 2018 um 10:50

I'm trying to test whether value of \jobname is "Test"; I suppose it
should be as the file name is "Test.mkiv".

But the code:

  \ifx\jobname\T True\else False\fi
  \ctxcommand{doifelse("\jobname" == "Test")}{1}{0}

yields "No", "False" and "1", so only the printed "1" is what I expect.

Why \doifelse and \ifx are evaluated as false?

The string from \jobname consists of catcode 12 letters while normal text
consists of catcode 11 letters. If you need the name of the file use one
of the commands below.


\NC \tex{jobfilefullname}     \NC \jobfilefullname     \NC\NR
\NC \tex{jobfilename}         \NC \jobfilename         \NC\NR
\NC \tex{jobfilesuffix}       \NC \jobfilesuffix       \NC\NR
\NC \tex{inputfilebarename}   \NC \inputfilebarename   \NC\NR
\NC \tex{inputfilerealsuffix} \NC \inputfilerealsuffix \NC\NR
\NC \tex{inputfilesuffix}     \NC \inputfilesuffix     \NC\NR
\NC \tex{inputfilename}       \NC \inputfilename       \NC\NR



Ing. Lukáš Procházka |
Pontex s. r. o.      | | | 
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

If your question is of interest to others as well, please add an entry to the 

maillist : /
webpage  : /
archive  :
wiki     :

Reply via email to