Problem statement
When I try to apply the \MakeUppercase
command to a macro whose value is retrieved from a .csv
table via \DTLfetch
from the datatool
package, I get a compilation error.
I am looking for a solution that overcomes this problem.
Minimal (non-)working example (MWE)
\documentclass{article}
\usepackage{datatool}
\DTLloaddb{data}{data.csv}
\def\myvariable{\DTLfetch{data}{Key}{Variable}{Value}}%
\begin{document}
\myvariable\\% This works as expected
\MakeUppercase{\myvariable}% TODO: This breaks compilation
\end{document}
with data.csv
consisting of:
Key,Value
Variable,1f.45
Error received upon compilation
Trying to compile the above example results in the following error:
! Illegal parameter number in definition of \reserved@a.
<to be read again>
3
l.11 \MakeUppercase{\myvariable}
\DTLfetch
- it seems that it is overcome at tex.stackexchange.com/questions/248965/… by using\DTLassignfirstmatch
instead (which does not suit my situation, however). I'll amend the original question accordingly.