You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
I was recently made aware that only variables should be in italics in equations (see e.g. [1], [2], [3]). I never really reflected over the distinction, but now it seems obvious. Should we make LaTeX output of SymPy follow this?
e.g. change:
>>> x = sympy.Symbol('x') >>> print(sympy.latex(sympy.Integral(x, x)))
\int x\, dx
to:
>>> x = sympy.Symbol('x') >>> print(sympy.latex(sympy.Integral(x, x)))
\int x\, \mathrm{d}x
what do you think?
Best regards, Björn
Kalevi Suominen
unread,
May 24, 2016, 7:32:25 AM5/24/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
I have always disliked the trend to interpret the single letter d in dx (with no space between d and x) as an 'operator' comparable to sin, cos, etc. (with a space between sin and its argument). The result is typographically displeasing. I prefer to consider the d as paired with the integral sign. In other words, if the integral sign is slanted, so should be d.
Ondřej Čertík
unread,
May 24, 2016, 8:16:13 AM5/24/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
Hi Björn,
Indeed, I always define
\def\d{{\rm d}}
and use as:
\d x
(I guess I should rather use the Latex's style \mathrm, as you did,
but that's minor.)
So I am in fact following this rule, but I didn't realize that the
rule is as simple as "only variables should be in italics", but it
does make sense.
Regarding "dx", there are two styles in typesetting, and I've seen
lots of textbooks in the U.S. to type "d" in italics. Also some people
prefer that, as Kalevi wrote above.
As such, I think the solution is to add an option to the printer so
that the user can choose which style he or she prefers.
Ondrej
Aaron Meurer
unread,
May 24, 2016, 1:03:42 PM5/24/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
I remember discussing this once in an issue (I can't find it right
now). We decided to use dx with no roman type, which is what is done
now. I can't remember what the reason for the decision was, although
I do recall that I personally prefer using dx with no roman type, as
the roman d to me looks bad and out of place.