7

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:

\documentclass[a4paper,11pt]{scrbook}
\def\dbar{{\mathchar’26\mkern-12mu d}}

\author{asd}
\title{asd}
\begin{document}
\maketitle

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

\end{document}
lockstep
  • 250,273
auxsvr
  • 73
  • 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

2 Answers2

4

Works fine for me

\documentclass{article}
\def\dbar{{\mathchar'26\mkern-12mu d}}
\begin{document}
abc $\dbar$
\end{document}
Ulrike Fischer
  • 327,261
2

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

This works for me:

\documentclass{article}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
đ $\text{đ}$
\end{document}
alfC
  • 14,350