Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Suppose I have:

\documentclass{article}
\begin{document}
$1 \cdot{1}$
\end{document}

I want to know the glyphs' Unicode for cdot special symbol. I followed such way.

I've run latex command on my *nix system and perform such command

\show\cdot

after that I see

\cdot=\mathchar"2201.

But that is wrong Unicode for CENTERED DOT character.

How can I determine the mapping rules from 2201 to Unicode?

share|improve this question
    
If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Caramdir Sep 22 '11 at 19:31
    
Thanks! I've tried to use some of that. But unfortunately Code button just shows some information but not highlight the code :( –  Michael Z Sep 22 '11 at 19:35

2 Answers 2

You guessed right that the "2201 is a number in hexadecimal representation, but this number is not connected to Unicode (which was born years after Knuth invented mathcodes).

The four hexadecimal digits tell TeX that \cdot is an operation symbol (the first digit 2), which must be taken from the font in math family 2 (the second digit), choosing the glyph at slot "01.

TeX knows about at most 16 math families, each can define three fonts for the normal size, first level subscripts and superscripts, and second level sub(super)scripts.

Family 0 fonts contain the upright letters, family 1 the math italic ones; family 2 fonts contain the most common math symbols; finally family 3 fonts contain the "big" symbols such as extensible parentheses.

These four families are compulsory if one wants to typeset math formulas, as TeX relies on parameters from these fonts to do its job. Other families can be (and are) defined by the LaTeX kernel (for \mathbf, \mathsf and so on) or by additional packages (for example stmaryrd).

There's no connection whatsoever between math codes and Unicode.

The XeTeX and LuaTeX engines define new primitives for dealing with Unicode math fonts, but that's another story.

TeX fonts contain at most 256 glyphs, the standard math fonts only 128. Their tables are laid out in the TeXbook or in TeX by Topic (on TeX Live this one is available with texdoc texbytopic). You can produce yourself the font tables by typesetting the following document:

\documentclass{article}
\usepackage[a4paper,margin=3cm]{geometry}
\usepackage{fonttable}
\setcounter{secnumdepth}{0}
\pagestyle{empty}
\begin{document}

\section{Family 0}
\xfonttable{OT1}{cmr}{m}{n}
\newpage

\section{Family 1}
\xfonttable{OML}{cmr}{m}{n}
\newpage

\section{Family 2}
\xfonttable{OMS}{cmr}{m}{n}
\newpage

\section{Family 3}
\xfonttable{OMX}{cmex}{m}{n}

\end{document}
share|improve this answer
    
Thanks a lot! It's very cognitively! But how can I obtain that family? Can I see it character set? Glyphs attributes? –  Michael Z Sep 22 '11 at 19:52

The unicode code for what you generate with \cdot in math mode is U+022C5. By the way, a fabulous listing of unicode codes for several thousand math symbols may be found online in the file unimath-symbols.pdf.

Addendum 26 Sept 2011: The unicode glyph U+00b7 can be rendered with the command $\cdotp$. The following MWE, which uses the Times-Roman like XITS Math font, shows that the outputs of $\cdot$ (unicode U+22C5) and $\cdotp$ are located on the same horizontal line. The only difference I can detect (and only at high magnification) is that the diameter of the dot produced by \cdotp is ever so slightly less than that created by \cdot; this stands to reason as \cdotp is used to build up the far more frequently used command \cdots (three consecutive centered dots) -- unicode char U+22EF.

% !TEX TS-program = xelatex
\documentclass{article}
\usepackage{unicode-math}  
\setmathfont{XITS Math}
\begin{document}
$\cdot \cdotp \cdot$ 
\end{document}
share|improve this answer
    
Thanks for your answer but I think u r wrong. If u will watch the boundaries of that glyph in, say, Times New Roman u will see it(Unicode symbol) hasn't strictly centered symbol comparing with Knuth's version. I recommend to use \u00b7 here! –  Michael Z Sep 26 '11 at 17:45
    
Please see the addendum to my answer -- \u00b7 (\cdotsp) is aligned on the same horizontal line as \u22C5 (\cdot), using the "XITS Math" math font (a Times Roman variant). –  Mico Sep 26 '11 at 21:16

Your Answer

 
discard

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.