This question is a confirmation and a follow-up using the code from this question

I'm preparing a template, which relies on some texts which will be provided in a CSV file (ex, disclaimer text, large chunk of text). Maybe I'm overthinking it, but the idea is to automatize some parts of my documents' production using Latex.

Among some other requirements, the code

  • must not throw an error if some text is not present and
  • must be clever enough to process some conditional, like if DB contains "disclaimer2" then display it, otherwise try to display "disclaimer" (default).

The code from the link above do not treat the case of 2-dimension array but seems to contain only 1-dimension list. So I've tried to expand it. Good point, my code compiles fine on Sharelatex, but still I'd have some question, as sanity check from more exper users than me.


% Patch \DTLgetlocation to gobble the error
% Conditional on Existence of entry in DB
    % #1 = DB name, #2 = member to check for
    % #3 = code to execute if member is in DB
    % #4 = code to execute if member is not in DB



        \multicolumn{1}{c}{\Large{\textbf{Second Disclaimer}}\vspace*{0.5cm}} \\ \hline
        \textit{highlights} & \begin{minipage}[t]{0.45\textwidth}\DTLfetch{dbDocOptions}{key}{disclaimer2}{value}\end{minipage} \\ \hline




  1. I've noted that my code compile without the package xparse & etoolbox. Is it necessary ?
  2. Sorry for the generality, but have I missed some important caveat which may break this code or cause a cryptic error ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.