1

I am trying to generate these symbols using amssymb:

enter image description here

Some of them don't show up, like the triangles. How can I reproduce them as close as possible?

\documentclass[a4paper,12pt]{article}
\usepackage{rotating}
\usepackage{amsmath,amssymb}  
\usepackage[no-math]{fontspec}
\setmainfont{TeX Gyre Termes}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\usepackage[cal = txupr]{mathalpha}
\begin{document} 
$\bullet$
$\blacksquare$ 
\rotatebox[origin=c]{45}{$\blacksquare$}
$\blacktriangle$ 
$\blacktriangledown$ 
$\blacktriangleleft$ 
$\blacktriangleright$
$\bigstar$ 
$\boxtimes$
\end{document}
Rodrigo
  • 567
  • where do the symbols come from? Could be possible to generate the svg, eps o pdf file an use it as: https://tex.stackexchange.com/questions/13594/how-to-add-a-custom-symbol-to-latex – scd Oct 05 '20 at 09:50

1 Answers1

2

The problem is that the font you are using simply does not support those symbols. If you pick a font that does then the symbols appear:

\documentclass[a4paper,12pt]{article}
\usepackage{rotating}
\usepackage{amsmath, amssymb}  
\usepackage[no-math]{fontspec}
\setmainfont{TeX Gyre Termes}
\usepackage{unicode-math}
\setmathfont{STIX}
%\usepackage[cal = txupr]{mathalpha}
\begin{document}

bullet:$\bullet$

blacksquare $\blacksquare$

blacksquare rotated \rotatebox[origin=c]{45}{$\blacksquare$}

blacktriangle $\blacktriangle$

blacktriangledown $\blacktriangledown$

blacktriangleleft $\blacktriangleleft$

blacktriangleright $\blacktriangleright$

bigstar $\bigstar$

boxtimes $\boxtimes$

\end{document}

Note: In general you should either use amssymb or unicode-math. In case you decide to use the unicode you should replace the \blacksquare command to \mdblksquare. You could also comment out the unicode-math and stay only with amssymb - in which case you'll have all symbols but no control over the font.

Another note: I did not have the mathalpha package and so edited it out.

Elad Den
  • 3,941