Generalfilename and ifthen

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Meiro
Posts: 1
Joined: Mon Aug 11, 2025 1:02 pm

filename and ifthen

Post by Meiro »

Hi,
I try to check the name of the latexfile with ifthenelse:

Code: Select all

\newcommand{\mydocument}{testfile}
\ifthenelse{\equal{\mydocument}{testfile}}{Test File}{empty mydocument}
\\
\jobname:\\
\ifthenelse{\equal{\jobname}{testfile}}{job: Test File}{empty job}
\\
\currfilename:\\
\ifthenelse{\equal{\currfilename}{testfile.tex}}{cur: testfile}{empty cur}
jobname and currfilename does not work. Any hints?
Thanks a lot
Meiro

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply