I am currently trying to set up a document template that allows for automated creation of different output files depending on a certain "input".
The "input" could be a variable or a certain kind of command.
What i am trying to achieve is something along the lines of
\documentclass{article}
\newcommand{\tool}{Photoshop}
\begin{document}
\section{Install Guide for the tool \tool}
\ldots
After installation, you can find the tool under ``C:\textbackslash Program
Files\textbackslash\tool''. \par\bigskip
Pseudocode starts here: \par\bigskip
if (\textbackslash tool == ``Photoshop''): \newline
The amazing thing about \textbackslash tool\ is: it is quite
expensive\ldots\newline
fi\par\bigskip
else if (\textbackslash tool == ``GIMP''): \newline
The amazing thing about \textbackslash tool is: it is freeware and
Open-Source as well!\newline
fi\par\bigskip
else: \newline
I don't know what tool you are talking about, please tell me more!
\end{document}
So far, i have only found "if" examples comparing numbers with \ifnum or macros with \ifx.
This does not seem to work with strings, however. I am aware of the includeonly and excludeonlypackages, which would however require a lot of fiddling once the document grows bigger.
Also, it would probably be difficult to steer includeonly/excludeonly from outside of the document (document build will be automatized via ant)
\ifstrequalfrometoolbox. This can handle your string matching. – Dominikus K. Mar 19 '13 at 09:26includeonlyand the like in this context, since it has several side effects. – Chris Mar 19 '13 at 09:27