My requirement:
- Comments should appear within a notebook in blue and font size 12 and in Courier by default.
- This should work on not just my machine (by tweaking the preference of MY Mathematica)
I could use this code but the problem is when I open the notebook, the comments are still in gray.
SetOptions[EvaluationNotebook[], AutoStyleOptions -> {"CommentStyle" -> {FontColor -> Blue, FontFamily -> "Courier", FontSize -> 12, FontWeight -> Bold}}];
Once I evaluate this cell, it turns blue. I would like to have it in this format even before I evaluate anything. I am looking for something where just by opening this notebook, it will by default evaluate this cell or something like that, but machine independent?
I could simply use cell style as "Text" and have it formatted. However, the problem is, I cannot divide cells within a function and if I need to put in comments within a function is not possible to use the cell style as "Text".
SetOptions[$FrontEnd, ...]
duplicate: Is there a way to programmatically set global preferences? $\endgroup$