Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Laurentius
Posts: 132 Joined: Wed Feb 11, 2009 11:38 pm
Post
by Laurentius » Tue Jun 16, 2015 3:21 am
After loading a font with unicode-math's \setmathfont, I can't access all glyphs in math mode. Why not?
Code: Select all
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Cambria Math}
\setmainfont{Cambria Math}
\usepackage{multicol}
\setlength{\columnseprule}{0.4pt}
\usepackage{multido}
\setlength{\parindent}{0pt}
\begin{document}
\begin{multicols}{6}
\multido{\i=0+1}{"03FF}{
\iffontchar\font\i
\makebox[3em][l]{\i}%
% $\symbol{\i}$\endgraf % shows fewer glyphs
\symbol{\i}\endgraf % shows more glyphs
\fi
}
\end{multicols}
\end{document}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis
Johannes_B
Site Moderator
Posts: 4182 Joined: Thu Nov 01, 2012 4:08 pm
Post
by Johannes_B » Tue Jun 16, 2015 3:55 pm
As you can see, the latin letters are italiziced in math mode. It would be very unusual to have the letter à in a variable, hence letters like that (and more that are not to be seen in an equation) are missing in math mode.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Laurentius
Posts: 132 Joined: Wed Feb 11, 2009 11:38 pm
Post
by Laurentius » Sun Jun 28, 2015 11:16 pm
Is there no way to get them back?
Johannes_B
Site Moderator
Posts: 4182 Joined: Thu Nov 01, 2012 4:08 pm
Post
by Johannes_B » Sun Jun 28, 2015 11:53 pm
Do you need them in mathmode, or in text within an equation?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Laurentius
Posts: 132 Joined: Wed Feb 11, 2009 11:38 pm
Post
by Laurentius » Mon Jun 29, 2015 2:03 pm
The thing is I want a prettier prime. The one returned by ' or ^\prime is a bit big, so I thought I might replace it with the Greek numeral mark ʹ, but this is not accessible in math mode.
Johannes_B
Site Moderator
Posts: 4182 Joined: Thu Nov 01, 2012 4:08 pm
Post
by Johannes_B » Mon Jun 29, 2015 3:32 pm
To be honest, i don't think this is a good idea. Better ask the font maintainers for a suggestion. They thought about the symbol and implemented it that way.
Code: Select all
\documentclass[border=5pt]{standalone}
\usepackage{fontspec}
\usepackage{mathtools}
\usepackage{xcolor}
\usepackage{unicode-math}
\setmathfont{Cambria Math}
\setmainfont{Cambria Math}
\begin{document}
$A' A^\prime A\text{ʹ}$
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.