...follow up:


Perhaps better to define it as a *macro*?



\newcommand{\diff}{\mathrm{d}}



??



-----Original Message-----
From: Bernt Lie <[email protected]>
Sent: Tuesday, January 8, 2019 15:28
To: Bernt Lie <[email protected]>; [email protected]
Subject: LyX & differential *operator*



I use LyX 2.3.1 under Windows 10.



I'm trying to create an "operator" for the infinitesimal d. Thus, instead of 
writing $dx$ -- which leads to "d" in italic font, I go to Document/Settings... 
and the LaTeX Preamble field:



\DeclareMathOperator{\diff}{d}



Next, in the document, I write $\diff x$, i.e., I type: \diff + space + x when 
in math mode. The result is that "d" is typeset in roman font, which is what I 
want.



HOWEVER, the spacing between the roman d and the x is a little bit too large to 
be pretty.



OK -- I have tried to insert a negative space (\! + space) in the document, and 
that helps. However, now the spacing is a little bit too small...



* Question: is there a slightly smaller negative spacing?



Also: how can I insert the negative space into the operator definition? Doing:



\DeclareMathOperator{\diff}{\! d}



doesn't work.



Thanks!

-B

Reply via email to