I tend to get \IfBooleanTF and \IfNoValueTF (and the other similar macros) mixed up and wondering which is the correct ones to use for the following optional parameters:
s,
o,
d,
g,
k_ (and k^) and
t_ (and t^).
From the documenation it seems that one should use:
\IfBooleanTF:s,t\IfNoValueTF:o,d,g,k
Questions:
- Is the above list of macros to use correct?
- What is the intention of distinguishing between
\IfBooleanTFand\IfNoValueTF? Wouldn't it make sense to just have one macro that does both jobs? Or, is there a case where a distinction is required?tandkusing different macros is especially confusing to me.
My reason for asking is: If I can understand the logic behind this, perhaps I'll be able to remember to use the correct ones.
Follow-up Question:
References:
s: Defining starred versions of commands (* macro)o: xparse: Define new command with multiple optional parametersd: Combine todonotes with mdframed to highlight paragraphs and write notes,g: Is it possible to use {} as delimiter for an optional xparse argument?k: Xparse k argument to parse options at end of environmentt: Xparse t argument type (underscore with optional parameter)
dto the argument types that need\IfNoValue(TF)– egreg Dec 23 '16 at 11:50