List of values in latex -
i updating documentation written in latex, , have implement kind of box contain list of possible values , default value specified item.
tex files contain predefined constructions.
there entry, defined \newcommand, takes input parameters , creates box.
used in next way:
%input values {min & max & default}: {0 & 1 & 0} in final pdf file construction transforms next representation:

as understood 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 implement similar next result:

here number of possible values can different.
i have not had experience latex before, sorry if of stupid question.
update (19.08.2015):
i have used next construction achieve goals (see answers here 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} } }
try compile following minimal example:
\documentclass{article} \newcommand{\inputvals}[5]{% \makebox[\linewidth][r]{% \begin{tabular}{lc} possible values: & #1\\ & #2\\ & #3\\ & #4\\[.7em] default value: & #5\\ \end{tabular} }} \begin{document} \inputvals{x}{y}{z}{t}{u} \end{document} this should give similar ask. notice command \inputvals defined in preamble (before \begin{document}) using \newcommand, , \inputvals used in document specifying 5 arguments. let know if implementation fits requirements.
Comments
Post a Comment