TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the best way to create an environment that takes a number of arguments, like this:

Text argument #1,
Text argument #2,
Text argument #3,
Text argument #4}

and produces something like this:


\multicolumn{1}{l}{\textbf{Finding \foo}} \\
\textbf{Synopsis:}  & \textbf{Text argument \#1} \\
Recommendation:     & Text argument \#2 \\
Comments:           & Text argument \#3 \\
Risk value          & Text argument \#4 \\

Where \foo is a custom stepcounter defined by

share|improve this question
Are you sure you want that syntax for \finding? What if a "text argument" contains a comma? \finding{Text argument #1}{Text argument #2}{Text argument #3}{Text argument #4} would be easier to set up and less ambiguous. And how would you specify a caption? – Jubobs Aug 6 '14 at 23:20
Good point. Your suggestion is better. For this table, I do not want a caption. – Martin Clouthier Aug 6 '14 at 23:25
Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Jubobs Aug 6 '14 at 23:32
up vote 4 down vote accepted

Specifying the four arguments as a comma-separated list is probably not a good idea: what if an argument contains a comma? Using the regular TeX syntax for passing arguments is preferable.

Note that \tn is defined nowhere in your code snippet; I substituted \\ for every occurence of it.

enter image description here


    \multicolumn{1}{l}{\textbf{Finding AUTOMATIC\_COUNTER}} \\
    \textbf{Synopsis:}  & \textbf{#1} \\
    Recommendation:     & #2 \\
    Comments:           & #3 \\
    Risk value          & #4 \\

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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