\documentclass{article}
\usepackage{ifthen}
\usepackage{currfile}
\newcommand{\textforpicture}{
\ifthenelse{John}{This is text 1 and the name of this file is \currfilebase}{nothing}
\ifthenelse{Jack}{This is text 2 and the name of this file is \currfilebase}{nothing}
\ifthenelse{Jill}{This is text 3 and the name of this file is \currfilebase}{nothing}}
\batchmode
\begin{document}
Experimental text fragement for John: \textforpicture{John}\\
Experimental text fragement for Jack: \textforpicture{Jack}\\
Experimental text fragement for Jill: \textforpicture{Jill}\\
\end{document}
Hello everyone, I am working on a report for some pupils and I have got the this idea: I would like to add text for each pupil based on a "database" comprising their names and some text blocks. If the name of the pupil is mentioned the respective text fragment (describing a picture) should be inserted and if possible the respective file name should also be mentioned. For this I tried the above code but ended up in a total mess. The compiled outcome is completely useless. Does anyone has got an idea how to solve the dilemma? Thank in advance!
ifthen
package obsolete?