(NB Related question asks about such things without using the notation package... I would be quite happy with any answer, including the use of Notation)
With long, complex expressions I find the multiplicity of punctuation characters, especially commas, on a line makes the code very hard to parse visually.
I would like to be able to write more verbose but more readable code such as
If[True Then Print["True!"] Else Print["Not True!"]]
Using the Notation package and palette...
<< Notation` Notation[if[ c_ then t_ else e_] \[DoubleLongRightArrow] If[c_, t_,e_]]
where as required by the documentation on Entering Notation ("When defining your own notations it is critically important to use the notation templates") the items on either side of the arrow are indeed created with the notation templates.
This does indeed produce an "if then else" construct, but I would like to retain capitalisation as If Then Else, and this doesn't work:
Notation[If[ c_ Then t_ Else e_] \[DoubleLongRightArrow] If[c_, t_,e_]]
because - even though it is functionally OK - on creating input I see
If[True Then Print["True!"] Else Print["Not True!"], Null, Null, Null]
where the Nulls are greyed out prompts to supply the parts of If
Question How can one define such alternate notations, retaining capitalisation and how can they be made compatible with e.g. Which, where there may be an arbitrary number of conditions and conditional statements, without defining a new Which with notation patterns for each specific number of conditions?