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.

When I use TeX Gyre Termes Math with unicode-math like in the example I can't get the \bigstar symbol. It seems that the font does not have a bigstar at U-2605. Is there a way to re-define the \bigstar command to deliver a scaled version of the \star command to fit the math sizes? BTW, \ast is a lot bigger than \star; I wouldn't have to bother about \bigstar if \star were of the same size as \ast.

\documentclass{minimal}
\usepackage{fontspec}
\setmainfont[Numbers=OldStyle, Ligatures=TeX]{TeX Gyre Termes}
\usepackage[math-style=ISO]{unicode-math}%
\setmathfont[Numbers=Lining]{TeX Gyre Termes Math}
\begin{document}
\begin{equation}
    (\mathbb{Z}(p))^\star \star \qquad 
    \left(\mathbb{Z}(p)\right)^{\bigstar} \bigstar\qquad
    (\mathbb{Z}(p))^\ast \ast
\end{equation}
    ---$\symbol{"2605}$\symbol{"2605}---
\end{document}
share|improve this question

2 Answers 2

up vote 6 down vote accepted

The glyph corresponding to U+2605 is not available in TeX Gyre Termes (text and math). You can use the glyph from another font:

\documentclass{article}

\usepackage[math-style=ISO]{unicode-math}

\setmainfont[Numbers=OldStyle, Ligatures=TeX]{TeX Gyre Termes}

\setmathfont[Numbers=Lining]{TeX Gyre Termes Math}
\setmathfont[range=\bigstar]{XITS Math}
\setmathfont[range=\int]{TeX Gyre Termes Math} % just to get parameters from this font

\begin{document}

\begin{equation}
(\mathbb{Z}(p))^\star \star \qquad
\mathbb{Z}(p))^{\bigstar} \bigstar\qquad
(\mathbb{Z}(p))^\ast \ast
\end{equation}

\end{document}

enter image description here

Note that Numbers=Lining for TeX Gyre Termes Math is meaningless. Also, using oldstyle figures with Times New Roman (or any lookalike thereof) is an anachronism.

Note also that \bigstar is classified as a math ordinary symbol, so you need \mathbin{\bigstar} when you want it to act as a binary operation symbol.

share|improve this answer
    
that's it. That way I can replace the \star with one of \ast size. (XIT's bigstar looks too big as a superscript.) I'm not using a Times-like font in my project. While we're at it: Can I replace the numerals with those from another font, too? –  Blackface Jul 9 at 11:22
    
@Blackface You'd still have the problem of letters in math mode that would be different. –  egreg Jul 9 at 11:57
    
I made the minimal example just for the \star question. I actually have some lines like \setmathfont[range=\mathup/{latin,Latin,num},Numbers=Lining]{Calluna} between the range={\star,\bigstar} and the range=\int. I found out about the num after I posted my last comment. –  Blackface Jul 10 at 12:17
    
The \setmathfont[range=\int]{TeX Gyre Termes Math} line should be last to circumvent a problem with unicode-math, see tex.stackexchange.com/a/67058/4427 Your case of using Calluna is exactly the one addressed by the answer. –  egreg Jul 10 at 12:19

You may enlarge the original star with help of the relsize package. The height is not absolutely identical like this, but the approach is quite easy and you are using the same font for both symbols.

% arara: lualatex

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Numbers=OldStyle, Ligatures=TeX]{texgyretermes-regular.otf}
\usepackage[math-style=ISO]{unicode-math}%
\setmathfont{texgyretermes-math.otf}
\usepackage{relsize}
\newcommand{\STAR}{\mathlarger{\mathlarger{\star}}}

\begin{document}        
$\STAR\star\ast$

\newdimen\astheight
\setbox0=\hbox{$\ast$}
\astheight=\ht0 \advance\astheight by \dp0
The height of the $\ast$ symbol is: \the\astheight

\newdimen\STARheight
\setbox0=\hbox{$\STAR$}
\STARheight=\ht0 \advance\STARheight by \dp0
The height of the $\STAR$ symbol is: \the\STARheight

$
(\mathbb{Z}(p))^\star \star \qquad
\mathbb{Z}(p))^{\STAR} \STAR \qquad
(\mathbb{Z}(p))^\ast \ast
$
\end{document}

enter image description here

share|improve this answer

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.