I can't seem to find any consensus on the right way to typeset a differential operator, whether it is:

  • in a standalone context: standalone differential
  • as part of a derivative: derivative
  • as part of an integral: integral

In all of these cases, I have seen them sometimes italicized like variables (as in the second and third examples above) and sometimes not italicized like operator names (as in the first example above). There is also additional variation in how much spacing goes between the "d" and whatever it is acting on.

Seeing as this is an incredibly common symbol in many branches of mathematics, I am curious about the lack of standardization -- I've seen all possible combinations used in all possible contexts by many respected authors and publishers.

Are there any rules of thumb that I can follow? I personally tend to prefer the non-italicized version with very little space next to it, so I add:


to my default preamble, and use that everywhere, but I'd like to know if I'm breaking any hard-and-fast rules here.

  • 21
    Some related issues: should Euler's e be italicized? how about the imaginary unit i? should single-letter subscripts that are not variables/indices be italicized (eg, "f" in t-subscript-f representing a "final" time)? (Everyone seems to agree that multi-letter subscripts of this type should be roman). My opinion (seems to be shared by many British publishers) is that these should all be roman, along with the differential d. Many US publishers make them all italic. Perhaps there are publishers who use a mix of both, but I don't remember seeing it.
    – Lev Bishop
    Apr 3 '11 at 1:47
  • 5
    Constants like e and i should also be upright. This is covered in the document.
    – Emre
    Apr 3 '11 at 1:57
  • 5
    Interesting -- I was surprised to read that particular rule in the "standard". Still, that seems to be a rule that is universally ignored, whereas the differential rule seems to be split approximately down the middle. Apr 3 '11 at 3:12
  • 3
    By the by, I asked this question: tex.stackexchange.com/q/2969/86 partly so that I could write \int_0^1 e^{2\pi i t} d t and have the e, \pi, i, d all automatically typeset upright. Apr 3 '11 at 19:48
  • 6
    Springer-Verlag's monograph style had \def\D{\mathrm{d}} for the differential operator. I agree with Hendrik Vogt's post below for spacing, that one should typically (but not always) write \,\D x. The exception: after a fraction, e.g., \frac{\sin(x)}{x}\D x is OK; and after a function, e.g., \cos(x)\D x is also OK. But I think there is no single golden rule...it's an art, not a science. Oct 20 '13 at 16:34

There is a standard: it should be upright, not italicized. Read Typesetting mathematics for science and technology according to ISO 31/XI

I suggest using the commath package to correctly typeset differentials.

  • 21
    (1) Because most mathematicians (who are, after all, the main group of people writing the most mathematics) are not typography experts, and could care less about your ISO standard. In general, just because something is "standard" doesn't mean people will use/follow it. (2) Because most people are lazy and dx is easier to type than \D{x} Apr 3 '11 at 1:11
  • 63
    @Willie: I'm not entirely satisfied by that argument; because mathematicians in general do go to great lengths to have consistent and attractive notation. I regularly see mathematical papers in LaTeX doing much more onerous things than spending three extra keystrokes to get a proper differential. Spivak wrote an entire book about properly typesetting formulas, and he still uses the "incorrect" dx. I suspect it has more to do with a genuine difference in opinion than pure laziness. But I suppose this is not the sort of question that it is easy to settle definitively in either direction :) Apr 3 '11 at 1:22
  • 11
    @Adrian I think that one argument that Willie left out was that if you've never seen something typeset a different way, you may never realise that there is a different way to do it. Seeing dx all my life, I never thought that an upright 'd' may be better until I happened to be trying to decide what colour 'd' should be! Then I realised that 'd' was an operator, so should be typeset as such, and that operators were typeset as upright (and blue, since you ask). Apr 3 '11 at 19:09
  • 9
    @egreg: Hmmm, I'd say that \int ... d. is an operator. So the d by itself may not be an operator but together with the \int it becomes one. Jun 18 '11 at 16:51
  • 4
    @Andrew: not at all, dx is simply the name of a function (an element in the dual basis ...); but it's clearly OT. ;-) The vast majority of mathematicians use an italic d, and Knuth himself does. :-)
    – egreg
    Jun 18 '11 at 17:19

I'd say it really depends on the context. As Emre pointed out, there's an ISO standard; according to wikipedia, ISO 31-11 was superseded in 2009 by ISO 80000-2. The latter carries the title "Quantities and units -- Part 2: Mathematical signs and symbols to be used in the natural sciences and technology".

As a mathematician I think: Why should I use the same notation as, say, an electrical engineer? In some of the sciences they may have good reasons for the choices in the ISO standard, but those reasons need not apply to every field that uses mathematical notation. It appears that I'm not in bad company here: Of course the TeXbook was written before ISO 31, but let me quote some examples from page 168:

On the same page, Knuth also uses the math italic $e$ for the Euler number. For mathematical typesetting, I like Knuth's choices here very much. I can't say anything about other sciences.

  • 51
    knuth's choices were based on an extensive study of journals (including acta mathematica (swedish) and transactions of the american math society from the early 20th century) which were considered to have high typographical standards. it's also true that mathematicians came very late to the standards game, as opposed to engineers. (as a former u.s. representative on an iso working group on document processing, i have personal knowledge of this.) not all scientific and technical publishing has the same traditions. Apr 3 '11 at 13:31
  • 1
    @barbara: I thought Knuth would have done no less. I didn't write this in my answer, but this is somehow what I meant: It's OK to have different traditions and to follow these. Not everything has to be standardised. Apr 3 '11 at 13:34
  • 11
    Personally I prefer the differential operator upright. After all it is an abbreviation like tan or sin, why should this be any different? My late thesis supervisor drilled that in my head. He did type his thesis with an IBM golfball and used to brag about the care and time it took him to typeset it right. He was one of the first persons to adopt TeX in the RSA. Apr 3 '11 at 19:54
  • 4
    @Yiannis: It's a matter of personal taste. But I wouldn't regard "d" as an abbreviation for anything (e.g. "cos" is an abbreviation for "cosine", and the latter is what I say when reading "cos"). Apr 3 '11 at 19:58
  • 4
    Not sure why you're blaming us. I just flipped through 6 of my electrical engineering textbooks and all of them use italic d. Upright d looks strange to me, though my pedantic side is drawn to the logical distinction of it...
    – endolith
    Aug 7 '14 at 2:42

tl,dr: It's complicated, but be consistent.

I believe the answers here tend to miss the point. While Emre mentions that there is an international norm regarding typesetting mathematics that is very explicit about this topic, Hendrik Vogt makes the right argument, but doesn't take it far enough. This question doesn't have an answer as simple as yes or no, rather it depends on your field, your publishers standard, the location you hail from and your wish for consistency. It's like asking what bibliography style is the right one for science. There are established traditions for typesetting mathematics, in part by the mathematical community of a country or family of countries, in part by the publishers. This transcends this question by far, since this touches a lot of other subjects, e.g. how ellipses, vectors and tensors look (this one has even more variety to offer than our subject) or the appearance of relation symbols, for example.

For example as Beccari points out, this tradition of 'uprighting the differential' is less at home in the pure mathematics than it is in the applied variety or the neighbouring sciences. Physicists and engineers, for example, tend to lean towards the upright form more than the mathematicians.

This however is not even half of the picture, since there tend to be big differences when it comes to the nationality of an author. For example the style fans of slanted differentials are used to originates in the English speaking domain, and coincidental evidence, like all the books in your shelf adhering to that style, only tells us that the books you buy are likely by American publishers. Unfortunately not even the publishers are very consistent in what they put out. I once worked for a rather big European science publisher and on asking how they ensure consistency, they admitted they basically don't. They even just print a Word document, if that's what they get and \LaTeX ing it would be too much effort. Some things don't even have an established convention: I once tried to figure out the correct way to typeset the Laplacian symbol and literally every(!) book I picked up had a different style.

So for the issue at hand: in Russia the integral sign leans left instead of right (Zaitsev), while the upright school of thought (both integral and differential) originates in Central Europe, probably Germany. When you put the integrands at the end, like is common in parts of physics, the spacing also may change between the integral and the differential. Compare this sample to see what i mean:

integrals in different traditions

This shows why in my eyes it is not a very good idea to prescribe upright or slanted for the differential, since people then tend to overlook the integral sign and spacing issues involved, and there is a good chance that whatever answer you give them will be wrong.

Also it is not set in stone where to put the limits, even when adhering to a right leaning integral style, as Knuth has said himself (http://tex.loria.fr/typographie/mathwriting.pdf) (also see Mathematics into Type by Swanson)

In German and Russian tradition, there are indeed conventions and norms where to put it that are adhered to, but even here discretion is advised. DIN, the German equivalent of ISO or ANSI, for example, has the norms 1302, 1304 and 1338 for typesetting mathematical formulas, similar to ISO 80000-2. These norms came out of the particular community and were mainly a write-up of the already established traditions. The ridiculous part comes in form of the DIN norms themselves, because they use the relation symbols inconsistently. The ones preferred by norm 1338 are leqq and geqq, but the majority of the norms published after 1338 use leg and geq!, so all of this has to be taken with a grain of salt.

Now you can make an argument for uniformity in the way math is typeset, to make it easier to read and parse. In the end, it really doesn't matter too much, the most important question is, if people can understand it. If you write an undergrad text in your native language then it's likely better to adhere to the traditional style your crowd expects.

I recommend looking at where you come from, who you are writing for, making a choice about those questions and sticking to them! Consistency, within your own documents and even across them, is worth a lot more for your readers than trying to guess the conventions the biggest subset of them may be used to. Defining a macro for yourself that wraps all this and makes it easy to change the look with a simple change in one place is the best practical advice one can give.

It's interesting to note that in a way Latex itself has changed the picture, given its ubiquitous use in the mathematics and the fact that some choices are made for you via the default. A lot of people don't want to mess with things like the issue mentioned. Also, as Zaitsev mentioned, some things, like properly scaling the left leaning integral, seem to be quite hard to achieve, since Knuth didn't have those in mind when designing TeX.

  • 5
    i've seen the two-line less/greater-than or equal symbol used in the same document with a different meaning than the one-line version (although i can't put my hands on it just now), so even defining a norm can be counterproductive. (after all, the first thing many mathematicians do is define their notation, which may be very idiosyncratic.) Jan 2 '13 at 19:14
  • One could add to your answer that the usage heavily depends on personal preferences. Even inside one community of mathematicians, it varies from author to author. Jan 3 '13 at 12:42
  • 1
    I really prefer ⩽ over ≤. Am I a communist now? ;) It just seems much more balanced than ≤. I guess it's better not to go against the tide here though :/
    – Christian
    Sep 4 '13 at 14:53
  • "Physicists and engineers, for example, tend to lean towards the upright form more than the mathematicians". This depends on where you're from. My experience, in an Australian university was the opposite. If you're to assert things like "the right argument", surely, scientists and mathematicians should be more concerned about what something actually means, not whether or not it's aesthetically pleasing or "most" people do it such and such a way. For example, the term "imaginary" originates in the concept of such numbers not being well received (mistakenly) by the establishment at the time. Apr 20 '19 at 0:49

Upright feels more correct, but it is very rarely used and it looks ugly (though I may just think so because I'm so used to seeing the alternative). Personally, I prefer going with the alternative which is most often used and least ugly.

I use \mathop{dx} to get the correct spacing before and after differentials. Thus, it will be apparent that "dx" is its own entity, and not a d multiplied by an x, and it nicely separates the differentials:

\int e^{-x^2-y^2}\mathop{dx}\mathop{dy}

  • 3
    I completely agree with this, except "Upright feels more correct." Actually it doesn't, and all I know is how I saw my teachers and texts write dx (with both italicized.. and this happens everywhere from Numerical Recipes to Salas and Hille's Calculus text to Schaum's outlines.) I've actually never, to my recollection, seen an upright d and an italicized x together, to my recollection. Far as I'm concerned dx is the correct way to right it.
    – bobobobo
    May 11 '12 at 19:18
  • 1
    \mathop{dx}, {dv} {dt} ... etc used for my thesis, simple and stand alone from other symbols.
    – KOF
    Jan 12 '13 at 7:23
  • 5
    +1 because this seems to be smart solution. But IMO something like \mathop{\mathrm{d}x} looks also decent.
    – doc
    Feb 3 '13 at 16:22

This covers the input side of things rather than the display side, but it’s a technique I’ve found useful:

In XeLaTeX or LuaLaTeX, I do something like this:

\newcommand*{\diffdchar}{d}    % or {ⅆ}, or {\mathrm{d}}, or whatever standard you’d like to adhere to

Edit: Per egreg’s comment, the newunicodechar package can make this easier, and will work for regular TeX (with \usepackage[utf8]{inputenc} applied):

\newcommand*{\diffdchar}{d}    % or {ⅆ}, or {\mathrm{d}}, or …

In either case,

$ⅆxⅆy=rⅆrⅆθ$    % Assuming Xe/LuaLatex, or \newunicodechar{θ}{\theta}

$xⅆy/ⅆx$         % For comparison;
$xⅆy/\!ⅆx$       % need spacing hack for linear fractions,
$x\frac{ⅆy}{ⅆx}$ % ... but built-up fractions are OK.
  • 3
    With the newunicodechar package this becomes \newunicodechar{ⅆ}{\mathop{\diffchar\!}}, but I'd prefer \newunicodechar{ⅆ}{\mathop{}\!\diffchar}.
    – egreg
    Sep 9 '11 at 22:24
  • 3
    @Adrian: the character that jcsalomon activates is U+2146 (DOUBLE-STRUCK ITALIC SMALL D), that's hardly ever used and stands up well in an editor window. The result is exactly the same as those presented in other answers. With newunicodechar XeTeX and LuaTeX are not needed, it also works with the standard utf8 option for inputenc.
    – egreg
    Sep 9 '11 at 22:29
  • 1
    @egreg, is there any benefit to \mathop{}\!\diffchar over \mathop{\diffchar\!}? Sep 12 '11 at 18:01
  • 1
    @alfC, also see my gist.github.com/jcsalomon/1325295 where I’ve collected the Unicode characters I’ve found most useful into a handy reference sheet. Apr 9 '14 at 20:16
  • 1
    @J.C.Salomon, I am exploring creating Snippets in Gedit to autmatically create unicode character with key combinations (or autotext) and at the same time using \newunicodechar in the document to customize the actual look in the document. I don't know how I didn't discover this before. I just typed this equation, which in normal latex would take several lines: C⌄ℓ {ⅆT⌄ℓ⁄ⅆt}=∇(κ⌄ℓ ∇T⌄ℓ) + G⌄{sℓ}(T⌄s - T⌄ℓ) + G⌄{eℓ}(T⌄e - T⌄ℓ), I was able to redifine the meaing of as "text subscript". It is almost like typing rich-formatted equations with Mathematica. Very fast, consice and meaningful.
    – alfC
    Apr 9 '14 at 20:29

"Scientific Style and Format - The CSE Manual for Authors, Editors, and Publishers" suggests using roman(upright) d to typeset differential operators (CSE 7th ed, page 160). As someone already pointed out, authors, in general, don't care whether it shows up as italics dt or not. It is left mostly to technical copyeditors like me to fix this. - Dave Ledesma

  • 9
    I do care very much that it shows up as italic :-) Jul 2 '11 at 16:26

I vote for upright e, i and d. In fact, I use upright and sans serif because it makes these symbols stand out clearly, but I haven't seen that used anywhere.

While we're at it, please allow me to point out that when "romanizing" multi-letter suffixes (like, say, "fin" for "final"), it's advisable to go for \textnormal rather than \mathrm, because the latter just renders a bunch of Roman characters side-by-side, without optimizing the spacing to make them look like the abbreviation to a single word.

  • 4
    Thank you for the \textnormal tip :) I honestly didn't expect to still be getting useful information out of this question 1.5 years after posting it! Nov 9 '12 at 3:34
  • 2
    There is also \text (from amsmath I think) but I don't know the typographic difference.
    – marczellm
    Jan 2 '13 at 19:39
  • 3
    @marczellm \textnormal{#1} is basically \text{\normalfont #1} with some more tweaks. Therefore you use \textnormal for sin, but \text for if and only if. The reason is that sin should be upright even in for instance a theorem statement, whereas if and only if as a part of a displayed equation should be italic in a theorem statement (given you typeset theorems in italics).
    – yo'
    May 31 '13 at 10:39
  • 1
    @tohecz Thank you. I use \sin though :)
    – marczellm
    May 31 '13 at 11:18
  • 1
    @marczellm That's of course correct. But if you wanted to define it manually, \mathop{\textnormal{sin}} would be much better than \mathop{\text{sin}}.
    – yo'
    May 31 '13 at 19:24

Just to throw another option in the already muddy (or bloody?) water here. The physics package contains its own set of automation for typesetting this stuff (including ordinary and partial derivatives) as well as automation for Dirac's quantum mechanics notation (bras and kets) and a number of odds and ends mostly related to re-sizing brackets and typesetting "evaluate at" indications.

Some basics from the package:

  • For differentials: \dd or \dd{x}.

  • For ordinary derivatives: \dv{x} for the derivative with respect to $x$ operator, \dv{f}{x} for the derivative of $f$ with respect to $x$ and \dv[2]{f}{x} for the second derivative of $f$ with respect to $x$.

  • For partial derivatives: \pdv{x} for the partial derivative with respect to $x$ operator, \pdv{f}{x} for the partial derivative of $f$ with respect to $x$ and \pdv[2]{f}{x} for the second partial derivative of $f$ with respect to $x$. \pdv{f}{x}{y} for the mixed partial derivative of $f$ with respect to $x$ and $y$.

    The documentation does not indicate if this extends to higher mixed derivatives or not; experiment shows that \pdv{f}{x}{y}{z} does not generate the third partial derivative with respect to $x$, $y$ and $z$ but typesets as \pdv{f}{x}{y} followed by $z$.

This package uses roman d's and italic type for the quantity whose differential it is in keeping with the standard that Emre cites (and therefore at odds with the history of mathematical typesetting as noted by many posters herein).

  • 2
    The package also has the italicdiff option for printing the differential d in italics. :-)
    – egreg
    Oct 26 '15 at 17:25
  • The package has {}-delimited optional arguments, which is a deadly sin
    – yo'
    Sep 16 '16 at 11:50
  • Note that we can italicize the d's using \usepackage[italicdiff]{physics}. Apr 9 '17 at 5:23

I'm a newcomer to mathematics, so maybe there's an obvious reason why nobody else has suggested this … but personally, I find slanted (but still roman) d's to look most attractive, and yet be “most differentiable” (pun intended 🤣) from possible variables named ‘d’ or operators with an upright, roman ‘d’ in their name:

\newcommand*\dif{\mathop{}\!\textnormal{\slshape d}}

d(x) = \frac{\dif}{\dif x}
      x \cdot \mathop{\mathrm{dep}}(x)


Here's a sample of the output. Beautiful, easy to tell at a glance what-is-what, and adheres to the spirit of the ISO standard, while maintaining the beauty and traditional form of mathematics textbooks. (At least IMHO!)

enter image description here

(Of course, this depends on \sl being a defined font, which, while it works just fine in standard LaTeX environments, may not be the case if you're using more modern typography from something like LuaLaTeX or XeLaTeX — maybe see How do I “fake” slanted text in LaTeX? on SO.)

  • 6
    Rather than \textrm{\sl d} it should be \textnormal{\slshape d}
    – egreg
    Sep 10 '17 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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