1

I'm trying to insert the Unicode 'increment' ∆ into my document as I'm describing an issue of two characters being mis-used.

My MWE doesn't work because I can't figure out the second \DeclareUnicodeCharacter input parameter. the docs for `inputenc' are totally uninformative. I'd assumed I assinged my own macro name but it seems note.

The .sty doc for my Uni's thesis format has these lines:

\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{ecsthesis}[2003/25/04 v1.6 LaTeX document class]
\def\baseclass{book}

So I assume I'm using fonts based on that class (on screen the body copy font looks like a 12pt Times Roman)

Here is my (non-working) MWE. How do I define the Unicle +2206 character?

MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
% fix use of delta character
\DeclareUnicodeCharacter{0394}{$\Delta$}
% fix use of increment character
\DeclareUnicodeCharacter{2206}{\Increment}

\begin{document}
The Capital Delta `$\Delta$' character (Unicode +0394) looks like, 
but is not the same as, the Increment `\increment' character (Unicode +2206).
\end{document}
1

The stix fonts have an \increment symbol. The \DeclareUnicodeCommand is not really necessary, \increment will work without it. \DeclareUnicodeCommand only allows you to insert ∆ directly in the source:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{stix}

% fix use of increment character
\DeclareUnicodeCharacter{2206}{\increment}

\begin{document}
The Capital Delta `$\Delta$' character (Unicode +0394) looks like,
but is not the same as, the Increment $\increment ∆ $ character (Unicode +2206).
\end{document}

enter image description here

  • As noted with the answer below, it isn't self-evident about case of the macro (as tripped over testing the other answer). In this case the PDF doesn't list a defined macro and it isn't clear why defining \Increment throws an error but \increment doesn't (and the package documentation is no use). – mwra Aug 4 at 12:06
  • [Hmm - no paragraph breaks in comments?] Warning to others - the stix package is incompatible with textcomp <sigh> causing me to lose access to \textquotesingle and \textquotedbl. String \texttt{'} \texttt{"} give a work around. Thanks nonetheless! – mwra Aug 4 at 12:11
  • 1
    You can use stix with the notext option to activate only the math font, or import only the one symbol. The main point of the answer is that if you want to use a symbol you need at first a font which has it. – Ulrike Fischer Aug 4 at 12:40
1

You are using pdflatex (or latex) which is restricted to 256 character encodings so in general Unicode Codes are not represented in the output, so you should map both U+0394 and U+2206 to \Delta (which is actually character 1 in the OT1 encoded Roman font)

If you use unicode-math package with a Unicode TeX, this is a separate character and defined as \increment

  • Thank you. For reasons unclear using unicode-math did not work. It might have beed a case issue \Increment vs \increment. But I got the above method working. This was useful nonetheless and I've noted it for the future. – mwra Aug 4 at 11:57
  • I should add that on checking the package PDF, page #26 is does list the macro as \increment. If you're not used to case sensitivity these things bite. User error, though! – mwra Aug 4 at 12: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.