TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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$

share|improve this question
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
up vote 3 down vote accepted

Works fine for me

\def\dbar{{\mathchar'26\mkern-12mu d}}
abc $\dbar$
share|improve this answer
Same error with your snippet: Missing number, treated as zero. – auxsvr Jul 25 '11 at 10:45
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{đ}$
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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