8

I'm having trouble obtaining a bold upright dotless i in math mode when using pure unicode-math and fontspec. My MWE:

\documentclass[border=0.4in]{standalone}
\usepackage{fontspec}
\usepackage{unicode-math}
\begin{document}
  \Huge
  Vector $\symbfup{x}$; compare $\textbf{x}$.
  Unit vector $\symbfup{ı}$; compare $\textbf{ı}$.
\end{document}

enter image description here

I'm not sure why this particular Unicode character is treated differently from others. Any suggestions appreciated, as long as they still use fontspec and unicode-math.

12
  • Just to make sure I understand your objective(s): Should all characters in math mode be rendered upright? If so, have you considered passing the options math-style=upright and bold-style=upright to unicode-math?
    – Mico
    Sep 16, 2016 at 3:09
  • Latin Modern Math does not have a bold version, does it? Or is bold included in maths fonts already @Mico ?
    – cfr
    Sep 16, 2016 at 3:18
  • See gust.org.pl/projects/e-foundry/tg-math for an overview of what's currently available for unicode-math.
    – cfr
    Sep 16, 2016 at 3:32
  • otfinfo shows Latin Modern Math is Regular. I don't see any reason to think it is supposed to support bold, even though the type1 fonts do include bold versions. But I don't know enough about Unicode maths to know it isn't somehow a feature of the regular ...
    – cfr
    Sep 16, 2016 at 3:34
  • 1
    as a contributor to the unicode math symbol complement, i can say with assurance that, unless a solid requirement for a symbol could be shown, it was not added. bold letters are used to represent vectors, but the undotted i or j was expected to be used only with a diacritic, and vectors are not so embellished (to my knowledge, or that of anyone representing the unicode technical committee), so no need was seen for these letters in bold. if you can provide a counterexample, i will take it back for consideration. Sep 16, 2016 at 15:16

4 Answers 4

7

\symbfup (and the other \sym..commands) maps its argument to the Mathematical Alphanumeric Symbols unicode block http://unicode.org/charts/PDF/U1D400.pdf. It will only work for symbols which have a target there. You can't use it for arbitrary input.

If you want to use a bold unicode character which is not in the mathematical unicode block you will have to resort to a text font. The various \mathXX fonts can be used for this:

\documentclass{article}
\usepackage{unicode-math}
\setmainfont{Latin Modern Roman} %to force \mathtextbf to use EU-encoding
\begin{document}

%\mathbf is possible too, but \mathtextbf is ihmo clearer
Unit vector $\mathtextbf{\symup{ı}}$; compare $\textbf{ı}$.

\end{document}

enter image description here

1
  • Thanks — I didn't realize that the \sym... commands are actually mapping to an explicit Unicode range. Thanks for the explanation — that makes sense.
    – Derek
    Sep 16, 2016 at 13:31
5

There is no Unicode specification for a mathematical bold dotless i, so unicode-math cannot provide an automatic substitution: there is nothing to point at. The character seems to have its uses (with a hat or arrow for denoting a vector/versor), but until Unicode doesn't add it and fonts are updated, \symbfup cannot reach it.

So, for now, \textbf{\i} seems the only solution, albeit ugly.

Here's a search for “mathematical dotless” in Unicode points (courtesy of UnicodeChecker)

enter image description here

Contrast it with a search for “mathematical small i”

enter image description here

3

Neither the Latin Modern Math nor the XITS Math math fonts feature a bold version of \imath ("dotless i").

It looks like ı ("text-mode dotless i") is correctly mapped into \imath if it is encountered in math mode. And, as there is no bold version of \imath, ı and \symbfup{ı} both produce the same non-bold output.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for "\boldsymbol" macro
\usepackage{fontspec}
\setmainfont{Latin Modern Roman} 
%or: \setmainfont{XITS}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}  
%or: \setmathfont{XITS Math}

\begin{document}
\Huge
$\imath$, $ı$, 
$\boldsymbol{\imath}$, $\boldsymbol{ı}$, 
$\symbfup{\imath}$, $\symbfup{ı}$. 
\textbf{\i} \textbf{ı} % two forms of text-mode "dotless i"
\end{document}

If you load the unicode-math package with the options math-style=upright and bold-style=upright, you'll get the following results instead:

enter image description here

The characters are now upright (unsurprisingly), but the math-mode characters still are not in bold.

\documentclass{article}
\usepackage{amsmath} % for "\boldsymbol" macro
\usepackage{fontspec}
\setmainfont{Latin Modern Roman} 
%or: \setmainfont{XITS}
\usepackage[math-style=upright,bold-style=upright]{unicode-math}
\setmathfont{Latin Modern Math}  
%or: \setmathfont{XITS Math}

\begin{document}
\Huge
$\imath$, $ı$, 
$\boldsymbol{\imath}$, $\boldsymbol{ı}$, 
$\symbfup{\imath}$, $\symbfup{ı}$. 
\textbf{\i} \textbf{ı} % two forms of text-mode "dotless i"
\end{document}
1

This seems to work for inserting the text-mode character as a math letter, in math mode:

\documentclass[border=0.4in]{standalone}
\usepackage{fontspec}
\usepackage{unicode-math}

\DeclareRobustCommand\mbfupdotlessi{\mathalpha\hbox{\rmfamily\upshape\bfseries{ı}}}

\begin{document}
  \Huge
  Vector $\symbfup{x}$; compare $\textbf{x}$.
  Unit vector $a \symbfup{ı} + 1$; compare $a \mbfupdotlessi + 1$, $a \symup{ı} + 1$.
\end{document}

Output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .