0
$\begingroup$

I'm almost certain that there is no (simple) way to achieve this as a user, but I'll ask anyway: What has always bothered the heck out of me is that Mathematica's TraditionalForm just doesn't look quite right, and does not follow some of the widespread traditions for mathematical typesetting. I'm not even talking about the poor spacing of objects overall; Mathematica just isn't TeX/LaTeX, and there's probably no hope it ever will be, even though in principle this should be possible, but I digress...

What I have in mind here is the time-honored law that says that names of functions should not be italicized (which is why LaTeX provides things like \sin, \cos, \tan, etc., etc.). Mathematica and its frontend know exactly what objetcs are defined as functions, so it should be able to follow tradition and print function names in upright fonts.

Is there any way for the user to achieve this? Is there any way to get the powers that be at Mathematica do this for us?

$\endgroup$

closed as off-topic by WReach, m_goldberg, Mr.Wizard Aug 6 '16 at 6:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ I don't see this if I evaluate TraditionalForm[3 Sin[x] + 2 Cos[2 x]]. I have "sin" and "cos" in a Roman font. $\endgroup$ – mikado Aug 5 '16 at 19:43
  • $\begingroup$ I'm voting to close this question as off-topic because the problem the user is experiencing can not be reproduced by others. $\endgroup$ – m_goldberg Aug 6 '16 at 0:03
  • 1
    $\begingroup$ Did the OP simply pick a poor example? Trig functions are converted to lowercase roman font in traditional form, but this is not the case generically: TraditionalForm[3 f[x]+2 g[x] ] has italicized f and g. Perhaps the OP is asking that for anything of the form h_[ ___ ], h be printed in non-italicized font? @m_goldberg $\endgroup$ – jjc385 Aug 6 '16 at 2:10
  • 1
    $\begingroup$ @jjc385. See my answer $\endgroup$ – m_goldberg Aug 6 '16 at 5:28
  • $\begingroup$ Pirx, please edit your question to include some images of what you are describing, as well as the code used to produce it. $\endgroup$ – Mr.Wizard Aug 6 '16 at 6:19
4
$\begingroup$

It is traditional in math notation to italicize the names of functions when they are a single letter and to display them non-italicized when multi-letter. Mathematica follows this convention with user-defined functions or functional forms when displaying them in traditional form.

For example

f[x] + func[x] // TraditionalForm

result

One may use SingleLetterItalics to control this behavior:

noitalic = Style[#, SingleLetterItalics -> False]&;

noitalic[f][x] + func[x] // TraditionalForm

enter image description here

$\endgroup$
  • $\begingroup$ I hadn't realized single letter functions were italicized by convention. +1 $\endgroup$ – jjc385 Aug 6 '16 at 7:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.