I can find fancier cursive U's, but I can't find this exact one. \mathcal{U} wasn't just right.
3 Answers
If you’re using LuaLaTeX or XeLaTeX, you want to load unicode-math and a math font of your choice. The default Latin Modern Math \mathcal is pretty close in that specimen sheet, but you could use, for example, the \mathcal from STIX Two Math with:
\setmathfont{Latin Modern Math}
\setmathfont{STIX Two Math}[
range={cal,bfcal},
Scale=MatchUppercase ]
There’s a more complete list of OpenType math fonts that you can try on this site.
With PDFTeX, the best way to change supplementary math alphabets is mathalpha. The manual has a comprehensive set of specimens, but you might try
\usepackage[cal=esstix]{mathalpha}
with a calscaled= parameter if you need to adjust the size.
- 44,045
-
Thanks! I think I understand the problem now. I'm using Jupyter Notebooks which has STIX fonts installed by default.
https://stackoverflow.com/questions/28909747/how-do-i-configure-mathjax-for-ipython-notebooks gives good instructions on how to fix this.
– Rubikkon Mar 21 '21 at 02:05
If you are using OpTeX, then load appropriate Unicode font family and use {\cal U} or directly . For example:
\fontfam[lmfonts]
... subject to $f_i(x,u)\le 0$ for $u\in{\cal U}$, $i=1,\dots,m$.
or
... subject to $f_i(x,u) ≤ 0$ for $u ∈ $, $i = 1,\dots, m$.
\bye
- 74,238
Off-topic...I think..But if you want to create your image in LaTeX code you can use optidef package that it is specific.
\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{optidef}
\begin{document}
\begin{mini}<b>
{}{f_0(x)}{}{}
\addConstraint {f_i(x,u)}{\le 0\text{ for all } u\in\mathcal{U},,}{i=1,\ldots,m}
\end{mini}
\end{document}
- 54,118


\documentclass{article}\begin{document}$\mathcal{U}$\end{document}produces this picture (click) which is very much alike the one you want. – egreg Mar 21 '21 at 09:57