I am updating documentation written in latex, and I have to implement kind of box which will contain list of possible values and default value for specified item.
Tex files already contain some predefined constructions.
There is an entry, defined by \newcommand, which takes input parameters and creates a box.
It is used in next way:
%Input values {Min & Max & Default}:
{0 & 1 & 0}
In final pdf file this construction transforms to next representation:
As I understood it is implemented in next piece of code:
\makebox[\linewidth][r]{
\begin{tabular}{llll}
Input values: & \mitalic{Min} & \mitalic{Max} & \mitalic{Default} \\ & #8 \\
& & & \\
\end{tabular}
}
My goal is to implement something similar with next result:
Here number of possible values can be different.
I have not had any experience with latex before, so sorry if for some of you it is stupid question.
UPDATE (19.08.2015):
I have used next construction to achieve my goals (see answers here for more information):
\newcommand{\ParseOptMenuItemList}[1]
{
\def\tmplist{#1}%
\@tempcnta=\z@
\@for\tmp:=\tmplist\do{\advance\@tempcnta\@ne
\expandafter\let\csname temp\@roman\@tempcnta\endcsname\tmp
}%
\makebox[\linewidth][r]{%
\begin{tabular}{lc}
Possible values: \ifthenelse{\equal{\tempi}{}}{}{& \tempi\\}
\ifthenelse{\equal{\tempii}{}}{}{& \tempii\\}
\ifthenelse{\equal{\tempiii}{}}{}{& \tempiii\\}
\ifthenelse{\equal{\tempiv}{}}{}{& \tempiv\\}
\ifthenelse{\equal{\tempv}{}}{}{& \tempv\\}
\ifthenelse{\equal{\tempvi}{}}{}{& \tempvi\\}
\ifthenelse{\equal{\tempvii}{}}{}{& \tempvii\\}
\ifthenelse{\equal{\tempviii}{}}{}{& \tempviii\\}
\ifthenelse{\equal{\tempix}{}}{}{& \tempix\\}
\ifthenelse{\equal{\tempx}{}}{}{& \tempx\\}
\ifthenelse{\equal{\tempxi}{}}{}{& \tempxi\\}
\ifthenelse{\equal{\tempxii}{}}{}{& \tempxii\\}
\ifthenelse{\equal{\tempxiii}{}}{}{& \tempxiii\\}
\ifthenelse{\equal{\tempxiv}{}}{}{& \tempxiv\\}
\ifthenelse{\equal{\tempxv}{}}{}{& \tempxv\\}
\ifthenelse{\equal{\tempxvi}{}}{}{& \tempxvi\\}
\ifthenelse{\equal{\tempxvii}{}}{}{& \tempxvii\\}
\ifthenelse{\equal{\tempxviii}{}}{}{& \tempxviii\\}
Default value: & \tempxix\\
\end{tabular}
}
}