Possible Duplicate:
What’s the proper way to typeset a differential operator?


That is my new comamnd for writing the dx of an intergral. Just wanted to be able to type this in my code.

\d{x}  <<<where the x is the variable of integration>>>

What did I do wrong?


1 Answer 1

\renewcommand\d[1]{\:\textrm{d}#1} % if \d is already defined

only for a definition of an environment you use \newenvironment{env}. Another useful definition is:


in your definition you do not really need the argument and using \mathrm makes more sense, then it takes the d from the same math font and not from the text font

$\d x \textrm{ or } \diff x  $
  • Ok. uh. so what do I type in the body?
    – MaoYiyi
    Nov 17, 2012 at 7:49
  • \d{x} or \d x or \diff x
    – user2478
    Nov 17, 2012 at 7:52
  • 2
    @MaoYiyi: You should not use \d as that is already used elsewhere. Nov 17, 2012 at 7:53
  • 1
    @MaoYiyi: "that didn't work" is not a helpful message ... As Peter already mentioned, if the \d is already defined (for an accent), then use \renewcommand\d
    – user2478
    Nov 17, 2012 at 7:59
  • 1
    @MaoYiyi: sure makes no difference
    – user2478
    Nov 17, 2012 at 8:17

Not the answer you're looking for? Browse other questions tagged .