The LaTeX symbol list document recommends this:

\def\dbar{{\mathchar’26\mkern-12mu d}}

Compiling this gives an error about mathcar being undefined.

A minimal example follows:

\def\dbar{{\mathchar’26\mkern-12mu d}}


$\dbar Q = d U + \dbar W$

  • The error message changes if I enter the \def in the preamble instead of a different file to "Missing number, treated as zero". – auxsvr Jul 25 '11 at 10:33
  • \newcommand{\dbar} {\ensuremath{\,\mathchar'26\mkern-12mu d}} also preserves the space before dbar. – auxsvr Jul 25 '11 at 12:48

Works fine for me

\def\dbar{{\mathchar'26\mkern-12mu d}}
abc $\dbar$
  • Same error with your snippet: Missing number, treated as zero. – auxsvr Jul 25 '11 at 10:45
  • 3
    Make sure that you use the correct apostroph (use the one above the slash key on your keyboard). Or enter the number as decimal instead of octal (\mathchar22). – Ulrike Fischer Jul 25 '11 at 10:50
  • Thanks, that did it. Copy-paste from the PDF document copied the wrong apostroph. – auxsvr Jul 25 '11 at 10:59
  • Another problem now. Using fontspec, dbar turns into a d. Any ideas? – auxsvr Jul 25 '11 at 11:10
  • Setting option no-math fixed this. – auxsvr Jul 25 '11 at 12:36

Since you mention xelatex in your question I assume that you want a unicode-type solution to your problem.

This works for me:

đ $\text{đ}$

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.