# Change font of single greek letter in math environment for all equations (classicthesis.sty)

I am using the classicthesis style (not the whole package, just the .sty) to write a (very long) document, and I don't like the Euler font for \xi in the math environment. This is an example with the Euler font:

\documentclass[a4paper,10 pt,twoside]{book}
\usepackage[T1]{fontenc} %font encoding
\usepackage[utf8]{inputenc} %input encoding
\usepackage[french,english]{babel}

\begin{document}
This is \verb+\xi+: $\xi$
\end{document}


Whereas this is how it looks with the computer modern (CM) font:

I like the other characters of Euler, but for \xi I would like to use the CM font.

Is there a way to change the font for \xi from Euler to CM in the whole document, but keeping Euler for the other math fonts?

Here I save the original as \altxi, so that both remain available.

I used Fig.4 on p.430 of the TeXbook, to determine the font name as cmmi and the slot as 24.

Side note: as a general rule, this is a bad idea, as the font dimensions and weight of what you are replacing with will generally not match those of what is being replaced.

\documentclass[a4paper,10 pt,twoside]{book}
\usepackage[T1]{fontenc} %font encoding
\usepackage[utf8]{inputenc} %input encoding
\usepackage[french,english]{babel}
% =============================================
%Import symbols from font cmmi without importing the whole package
% =============================================
\DeclareFontFamily{U} {cmmi}{}

\DeclareFontShape{U}{cmmi}{m}{n}{
<-6> cmmi5
<6-7> cmmi6
<7-8> cmmi7
<8-9> cmmi8
<9-10> cmmi9
<10-12> cmmi10
<12-> cmmi12}{}

\DeclareSymbolFont{Xcmmi} {U} {cmmi}{m}{n}

\let\altxi\xi
\DeclareMathSymbol{\xi}{\mathord}{Xcmmi}{24}
% =============================================

\begin{document}
This is \verb+\xi+: $\xi$ and $\altxi$
\end{document}


• Thank you for your answer, works perfectly. Just to explain better why I need it to do this: I have several figures with \xi in CM fonts, and it may be distracting for the readers to have two different-looking symbols in the equations and in the figures. If it wasn't necessary, I would agree that it's better not to do such a thing. Sep 26, 2019 at 10:08

Not an answer as such because outside the box of the question, but unicode-math allows access to OpenType fonts and the Mathematical unicode blocks.

For example, randomly, just to illustrate:

Generic code

\documentclass[12pt]{article}
\usepackage{xcolor}
\usepackage{unicode-math}
\setmathfont{XITS Math}[Colour=blue]
\setmathfontface\masana{Asana Math}
\setmathfontface\mdejavu{DejaVu Math}
\setmathfontface\mtgdeja{TeX Gyre DejaVu Math}
\setmathfontface\mpagella{TeX Gyre Pagella Math}
\setmathfontface\mbonum{TeX Gyre Bonum Math}
\setmathfontface\mschola{TeX Gyre Schola Math}
\setmathfontface\mtermes{TeX Gyre Termes Math}
\setmathfontface\mlatin{Latin Modern Math}
\setmathfontface\mcambria{Cambria Math}
\setmathfontface\mfira{Fira Math}
\setmathfontface\mfreeserif{FreeSerif}
\setmathfontface\mlibert{Libertinus Math}
\setmathfontface\mnoto{Noto Sans Symbols}
\setmathfontface\mqui{Quivira}
\setmathfontface\mstixtwo{STIX Two Math}
\setmathfontface\mstixgen{STIXGeneral}
\setmathfontface\msymbola{Symbola}
\newcommand\mfsize{\Huge}
\setmainfont{Noto Serif}

%mas = Mathematical Alphanumeric Symbols block in unicode
\newcommand\themassym{𝜉}     % or use \symbol{^^^^nnnn}
\newcommand\thetextsym{ξ}     % different unicode point

\begin{document}
\section {Sampling $\mitxi$}%symbol name comes from     unicode-math-table.tex
This is (unicode MAS) \textit{\thetextsym} in math mode:
\vspace{24pt}

\begin{tabular}{rccl}
XITS Math & \mfsize $\themassym$ & \mfsize $\mcambria \themassym$ & Cambria Math \\
\ &\ & \ & \ \\
Asana Math & \mfsize $\masana {\themassym}$ & \mfsize $\mfira \themassym$ & Fira Math \\
\ &\ & \ & \ \\
DejaVu Math & \mfsize $\mdejavu \themassym$ & \mfsize $\mfreeserif \themassym$ & FreeSerif \\
\ &\ & \ & \ \\
Tex Gyre Bonum Math & \mfsize $\mbonum \themassym$ & \mfsize $\mlibert \themassym$ & Libertinus Math \\
\ &\ & \ & \ \\
Tex Gyre DejaVu Math & \mfsize $\mtgdeja \themassym$ & \mfsize $\mnoto \themassym$ & Noto Sans Symbols \\
\ &\ & \ & \ \\
Tex Gyre Pagella Math & \mfsize $\mpagella \themassym$ & \mfsize $\mqui \themassym$ & Quivira \\
\ &\ & \ & \ \\
Tex Gyre Schola Math & \mfsize $\mschola \themassym$ & \mfsize $\mstixtwo \themassym$ &STIX Two Math \\
\ &\ & \ & \ \\
Tex Gyre Termes Math & \mfsize $\mtermes \themassym$ & \mfsize $\mstixgen \themassym$ & STIXGeneral \\
\ &\ & \ & \ \\
Latin Modern Math & \mfsize $\mlatin \themassym$ & \mfsize $\msymbola \themassym$ & Symbola \\
\end{tabular}
\end{document}


unicode-math allows the symbol range (for example, lower case Greek) to have a different font from the main math font, or map one style (bold upright) to another.

Henri Menke's answer at Importing a Single Symbol From a Different Font explains how to import a symbol from one font into the main font, using the range option.