What is the quickest way (minimum number of manual steps) to let some highlighted text appear as say Courier 12 pt regular?
1.) In Mathematica notebooks, I use a different font in explanatory text cells for Mathematica expressions, keywords, and paths to files: I use Courier regular 12 pt for this.
When I do this via Format>Font>Courier... after entering the C of Courier, I have to select the desired font Courier each time with the mouse among all those starting with C, because as soon as I enter the second letter (in this case "o"), the selection box already changes to the fonts starting with o! And when I have selected Courier, Font Style jumps to Italic!
I want to assign Courier Regular 12 pt to the just selected text with the minimum number of keystrokes. How do I do that?
2.) Mathematica has the concept of Style sheets, which has some similarity to templates in Microsoft Word, LibreOffice and the like. In these word processing contexts, one distinguishes between
- direct formatting,
- formatting by paragraph styles,
- formatting by character styles.
Did I get it right, that styles in Mma are like paragraph styles in the wordprocesors and that there is also direct formatting in Mma. What is the precedence-rule between these two in Mma? Is there no equivalent to character styles?
FrontEndTokenExecute["FontPanel"]as explained in a comment here. Perhaps you can set a keyboard shortcut that evaluates that. If needed you can search for how to make keyboard shortcuts in Mathematica – userrandrand Dec 11 '22 at 02:39Cell[StyleData["New"], MenuSortingValue->10000]as can be seen after Shift+Ctl+e. You might change it then e.g. toCell[StyleData["New"], AutoSpacing->False, LineIndent->0, FontFamily->"Courier", FontSize->12, FontWeight->"Bold", FontSlant->"Plain", FontVariations->{"StrikeThrough"->False, "Underline"->False}]and press Shift+Ctl+e again. Then the defined styleNewexists. Just adding such an Expression into the big white field doesn't work. – Adalbert Hanßen Dec 13 '22 at 12:58KeyEvent.tror tojoker.m, such that I could assign Font=Courier 12 regular to the current selection? – Adalbert Hanßen Dec 13 '22 at 15:11Codeto the same appearance asOutput(which I already had at Courier 12 point regular). In the stylesheet it appears with grey background (although not part of the definition), but there is no grey background when applied to text. That's really what I want and I can assign it with Alt-8 to a marked portion in a text cell. This really solves my problem! – Adalbert Hanßen Dec 13 '22 at 22:32