Fonts & Character SetsGive me my fancy math X from mathptmx back!

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

Give me my fancy math X from mathptmx back!

Post by user49915 »

In the old times of mathptmx, we wrote stuff such as

\documentclass{article}
\pagestyle{empty}
\usepackage{mathptmx}
\begin{document}
Let \(\mathcal{X}=\{X_1,\ldots,X_n\}\).
\end{document}


and got from pdflatex a fancy calligraphic math X, which was sufficiently fancy to be visibly distinct from the remaining italicized X in X_1 till X_n:
mwe1.png
mwe1.png (5.3 KiB) Viewed 5639 times
However, in the more modern times, mathptmx has been obsoleted in favor of newtx.
Feeding

\documentclass{article}
\pagestyle{empty}
\usepackage{newtxmath}
\begin{document}
Let \(\mathcal{X}=\{X_1,\ldots,X_n\}\).
\end{document}


to pdflatex results in a dull
mwe2.png
mwe2.png (4.86 KiB) Viewed 5639 times
The distinction between the first X and the remaining occurrences is far less prominent. This is unfortunate, as it requires additional attention from the reader to distinguish between the two.

For pdflatex, what is the advised way of getting the fancy math X, such as in mathptmx, Image, or similar, if you use newtxtext and newtxmath for standard text and math fonts? Yes, I know there is mathrsfs, which is not obsolete in CTAN but is pretty dated (1999-06-30 is the date of the file http://mirrors.ctan.org/macros/latex/co ... thrsfs.sty on the CTAN file system and 1996-01-01 is the internal date stated inside http://mirrors.ctan.org/macros/latex/co ... thrsfs.sty). Is it still advisable to use mathrsfs+\mathscr or are there better options?

Crosspost: http://tex.stackexchange.com/questions/536297
Last edited by user49915 on Wed Apr 01, 2020 1:40 pm, edited 5 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Give me my fancy math X from mathptmx back!

Post by Johannes_B »

You know you could just input a picture of your letter.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

Give me my fancy math X from mathptmx back!

Post by user49915 »

A picture of X wouldn't result in X in the text layer of the PDF file generated. Moreover, I find it difficult to size-scale it automatically if needed.
Last edited by user49915 on Wed Apr 01, 2020 2:48 pm, edited 1 time in total.
samcarter
Posts: 3
Joined: Sat Feb 21, 2015 6:01 pm

Give me my fancy math X from mathptmx back!

Post by samcarter »

It is trivial to size scale it automatically if one uses a unit relative to the font size, e.g. em
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

Give me my fancy math X from mathptmx back!

Post by user49915 »

samcarter wrote:It is trivial to size scale it automatically if one uses a unit relative to the font size, e.g. em
I correct myself: I find it difficult... Probably, you mean ex rather than em, to match the height of the font.
Anyway, even if it's solved, the problem of how to get X into the PDF text layer remains.
Post Reply