Let's start by assuming your functions are just dummy symbols (i.e. they have no DownValues or other definitions assigned to them).
You could define a helper symbol for display purposes--I'll call it Pretty. (You could define Format directly on your symbols, but it sounds like you might only want to do this occasionally, "on demand").
Format[Pretty[f_][___]] := Style[f, Bold, Purple]
Now, let's assume that this is your expression:
f4[f1[1], f2[2, 3]] + f3[4, 5, 6]
You could now replace any desired heads with pretty versions:
f4[f1[1], f2[2, 3]] + f3[4, 5, 6] /. {f1 -> Pretty[f1], f2 -> Pretty[f2], f3 -> Pretty[f3]}
If your symbols aren't just dummy symbols, then it becomes more difficult. Let's apply some definitions:
f1[a_] := 2^a;
f2[a_, b_] := a^b;
f3[a_, b_, c_] := Mod[a*b, c];
f4[a_, b_] := a - b
If we just try the above again...
f4[f1[1], f2[2, 3]] + f3[4, 5, 6] /. {f1 -> Pretty[f1], f2 -> Pretty[f2], f3 -> Pretty[f3]}
...we'll get -4
.
But we can play some tricks:
Activate[
Inactivate[
f4[f1[1], f2[2, 3]] + f3[4, 5, 6]] /.
{f1 -> Pretty[f1], f2 -> Pretty[f2], f3 -> Pretty[f3]}]
to get f1-f2+f3
(in bold and purple!).
You need to be careful, because although this looks like just f1-f2+f3
, that's just the display form because of how I defined Format for Pretty expressions. The Pretty heads are still there, so you must be careful when doing any subsequent processing on this expression. For example, you might need to perform another replacement that un-applies the Pretty heads. One advantage of using Format directly on f1
et al is that the underlying expressions are still there--they haven't been mutated and so subsequent processing could proceed without needing to deal with Pretty.
Head
achieve your goal? $\endgroup$f1
,f2
, etc, already have definitions, then you'll need to suppress evaluation first. Like, iff1
is already defined so thatf1[1,2,3]
evaluates to17
(or whatever), then you'll need to suppress evaluation so thatf1
is still explicit and can be manipulated. $\endgroup$