kks32 / phd-thesis-template

A LaTeX / XeLaTeX / LuaLaTeX PhD thesis template for Cambridge University Engineering Department (CUED)
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/
MIT License
820 stars 392 forks source link

mathcal looks like mathscr when times option is enabled #211

Closed AustinT closed 3 years ago

AustinT commented 3 years ago

This template is extremely nice, but one issue I am having is that \mathcal seems to render as \mathscr when the times option is enabled. I am not sure whether this is an issue with the package mathptmx or due to some other command which has been overwritten in this template specifically. Any suggestions for resolving this?

I've tried searching, but haven't been able to find any instances of people reporting this issue elsewhere, which is why I am raising an issue with this package specifically.

What I see:

image

What I'd like to see:

image (but with times font)

GR8DAN commented 3 years ago

Are you using XeLaTeX or pdfLaTeX as the engine? Font set up is dependant on the engine, see the class file.

Will involve using \setmathfont see

XeTeX: What happened to \mathcal and \mathscr?

Directory fonts/xits

AustinT commented 3 years ago

Are you using XeLaTeX or pdfLaTeX as the engine? Font set up is dependant on the engine, see the class file.

Will involve using \setmathfont see

XeTeX: What happened to \mathcal and \mathscr?

Directory fonts/xits

No, I'm using pdflatex, thanks for the suggestion though, that does seem very similar to what I am encountering.

For reference, I am just using the default setting in the MakeFile, which uses pdflatex.

GR8DAN commented 3 years ago

In that case, for this: LaTeX Zbar Replace \RequirePackage{textcomp} (line 516 in the class file, PHDThesisPSnPDF.cls) with \RequirePackage{newtxmath}, I think newtxmath loads textcomp. Use:

\begin{equation}
f:\chi \mapsto \Zbar
\end{equation} 

To adjust the character position use:

\begin{equation}
f:\chi \mapsto \raisebox{-2pt}{$\Zbar$}
\end{equation}

Moved LaTeX Zbar See also: Directory fonts/newtx I think the Stix fonts will also be suitable, stix – OpenType Unicode maths fonts, but that will require extra coding to switch to the appropriate font for pdfLaTeX.

AustinT commented 3 years ago

In that case, for this: LaTeX Zbar Replace \RequirePackage{textcomp} (line 516 in the class file, PHDThesisPSnPDF.cls) with \RequirePackage{newtxmath}, I think newtxmath loads textcomp. Use:

\begin{equation}
f:\chi \mapsto \Zbar
\end{equation} 

To adjust the character position use:

\begin{equation}
f:\chi \mapsto \raisebox{-2pt}{$\Zbar$}
\end{equation}

Moved LaTeX Zbar See also: Directory fonts/newtx I think the Stix fonts will also be suitable, stix – OpenType Unicode maths fonts, but that will require extra coding to switch to the appropriate font for pdfLaTeX.

Thank you for the suggestion, but it didn't change the font like I hoped. For reference, the code I am using is $f:\mathcal{X}\mapsto\mathcal{Z}$, not $f:\chi \mapsto \Zbar$ as you suggested. The issue is that $\mathcal{X}$ is just rendering in a different font (like $\mathscr{X}$ might normally render).

However, it was solved by replacing \RequirePackage{textcomp} with \RequirePackage{stix}! Thank you very much for the solution!