I have the following environment taking four arguments, the latter two being optional. Things look as expected. Would I have to test for #4 in my case ?

    \IfNoValueTF {#3}
        { \noindent #1 \ #2 \, }
      { \noindent #1 \ #2 \ (#3)
        \vspace{0.1cm} \par \noindent \ignorespaces }
  { \vspace{0.3cm} }

1 Answer 1


You don't have to test for #4 as it's never empty it will always have a value, but you can not change that value from orange without also setting #3 as you have made the adjacent options #3 and #4 both optional.

It would be better to make the color #1



A blue statement with no title


A red statement with (title)


A statement with default color and a title


With this structure the two options can be set independently.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .