I want to input a file with a variable filename.
Suppose we have the following files:
foobar.tex
foo123.tex
bar123.tex
foo456.tex
bar456.tex
The files foo123 and foo456 are latex root files and include foobar.tex.
In foobar.tex I want to include bar123 if I compile foo123. When compiling foo456 the file bar456 should be included. And so on.
I started with xstring and tried \StrBehind{\jobname}{foo}. But this gives me an empty string.
My questions are:
How to extract the needed data from \jobname
and
how to build a new filename for using with \input
General ⇒ input files with variable filenames
NEW: TikZ book now 40% off at Amazon.com for a short time.
