For a PhD thesis cover template in our university, there is some code as follow:

%%% Jury member n1 (Président) %%%
\newcommand{\jurynameA}{M. Cabot}
\newcommand{\juryroleA}{Président du jury}
%%% Jury member n2 (Rapporteur) %%%
\newcommand{\jurynameB}{M. Blonde}
\newcommand{\juryroleB}{Rapporteur} % 
%%% Jury member n3 (Rapporteur) %%%
\newcommand{\jurynameC}{M. Blue}
%%% Jury member n4 (Examinateur) %%%
\newcommand{\jurynameD}{M. Brown}
%%% Jury member n5 (Examinateur) %%%
\newcommand{\jurynameE}{M. Orange}
\newcommand{\jurygradeE}{One more rank}
%%% Jury member n6 (Directeur) %%%
\newcommand{\jurynameF}{M. Pink}
\newcommand{\juryroleF}{Directeur de thèse}
%%% Jury member n7 (Co-Directeur) %%%
\newcommand{\jurynameG}{M. White}
\newcommand{\juryroleG}{Co-Directeur de thèse}

    \textsc{\jurynameA}  & \jurygradeA & (\juryroleA) \\
    \null  & \textit{\juryadressA} & \\

    \textsc{\jurynameB}  & \jurygradeB & (\juryroleB) \\
    \null  & \textit{\juryadressB} & \\

    \textsc{\jurynameC}  & \jurygradeC & (\juryroleC) \\
    \null  & \textit{\juryadressC} & \\

    \textsc{\jurynameD}  & \jurygradeD & (\juryroleD) \\
    \null  & \textit{\juryadressD} & \\

    \textsc{\jurynameE}  & \jurygradeE & (\juryroleE) \\
    \null  & \textit{\juryadressE} & \\

    \textsc{\jurynameF}  & \jurygradeF & (\juryroleF) \\
    \null  & \textit{\juryadressF} & \\

    \textsc{\jurynameG}  & \jurygradeG & (\juryroleG) \\
    \null  & \textit{\juryadressG} & \\


I was wondering if it would be possible to input data more easily (something like \addmember{M. Pink}{Yourplace}{HDR}{Directeur de thèse}), and then have the table generated automatically without worrying about the number of jury members (some people may have 4 members, some up to 8).

In Python for instance, I would have used a list of dict (or just of lists if I did not care about semantics), each dict describing a jury member, and would have iterated over that list to write the table. Is it possible to do something like that with LaTeX?

  • pgfplotstable allows you to typeset a table from a dataset you load.
    – user121799
    Feb 28 '19 at 0:18

Here's one way to do it using standard LaTeX methods from etoolbox and pgffor.

    \typeout{Warning: your committee has too many members! Extra members ignored.}
\foreach \x in {1,...,\value{members}}{
\csuse{juryname\x} &
\csuse{jurygrade\x} &
&\itshape\csuse{juryadress\x} &\tabularnewline
\addmember{M. Cabot}{Montréal}{PhD}{Président du jury}
\addmember{M. Blonde}{Trois Rivières}{PhD}{Rapporteur}
\addmember{M. Brun}{Québec}{PhD}{Examinateur}
\addmember{M. Vert}{Paris}{PhD}{Examinateur}
\addmember{M. Gris}{Montréal}{PhD}{Directeur de thèse}

output of code

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.