LaTeX forum ⇒ 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)
user49915
Posts: 79
Joined: Wed Apr 17, 2019 12:51 pm

Give me my fancy math X from mathptmx back!

Postby user49915 » Wed Apr 01, 2020 1:29 am

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 854 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 854 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/contrib/jknappen/mathrsfs.sty on the CTAN file system and 1996-01-01 is the internal date stated inside http://mirrors.ctan.org/macros/latex/contrib/jknappen/mathrsfs.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.

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Apr 01, 2020 5:07 am

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: 79
Joined: Wed Apr 17, 2019 12:51 pm

Postby user49915 » Wed Apr 01, 2020 11:42 am

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: 2
Joined: Sat Feb 21, 2015 6:01 pm

Postby samcarter » Wed Apr 01, 2020 2:17 pm

It is trivial to size scale it automatically if one uses a unit relative to the font size, e.g. em

user49915
Posts: 79
Joined: Wed Apr 17, 2019 12:51 pm

Postby user49915 » Wed Apr 01, 2020 2:49 pm

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.


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 2 guests