I'm using the mathastext package to make math contents consist with the text. The package offers a \MTgreekfont command to change the font of greek letters. Current I use the lmtt font but its size does not match that of Courier, thus I would like to switch to the one native to Courier. However I cannot find the internal name of Courier (like lmtt for Latin Modern), \MTgreekfont{courier} does not work. How can I find this internal name? Or, is there a way to change the scale of current greek letters?

Moreover, what if I use Menlo font with xelatex? The font itself apparently offers greek letters, How could I use them with mathastext?

Below is a MWE.

%! TEX program = xelatex
\usepackage{courierten}% Courier
% \usepackage[no-math]{fontspec}% These two lines require xelatex
% \setmonofont[Mapping=tex-text]{Menlo}% Menlo
\MTgreekfont{lmtt} % What should I put here respectively, for Courier and Menlo?
\noindent Text\\
  • looking at the fd files seems to be CourierOneZeroPitch-TLF Jan 30, 2021 at 14:32
  • ... but that font has no Greek LaTeX Font Warning: Font shape 'LGR/CourierOneZeroPitch-TLF/m/it' undefined Jan 30, 2021 at 14:34
  • @DavidCarlisle I chose courierten for pdflatex, but in practice I use \setmonofont[Mapping=tex-text]{Courier} with xelatex, which I think contains Greek letters.
    – Jinwen
    Jan 30, 2021 at 14:38
  • sure but a Unicode Opentype font used by xelatex can have tens of thousands of characters, but a font used by pdflatex can have at most 256 so something has to go, the font maintainer can choose different subsets to make into pdftex compatible fonts the T1 encoding you have specified (and is supported by courier10) has 256 accented latin script characters and no Greek. It would be possible to subset the original font again to make a subset matching the Greek LGR pdftex encoding but that hasn't been done so far. Jan 30, 2021 at 14:43

4 Answers 4


Your options are:

  • Load an OpenType math font with unicode-math, in LuaLaTeX or XeLaTeX. All of them come with Greek alphabets. You can change its Greek alphabet with \setmathfont[Scale=MatchLowercase, range=it/{Greek,greek}]{Some Greek Italic Font}, etc.
  • Load \setmathsfont(Greek} in mathspec in XeTeX.
  • Load a legacy 8-bit font in the LGR encoding, using mathastext. You generally want to look for a file named lgr*.fd. if you don’t care about keeping the fixed width, you might pair the Greek Font Society’s GFS Neohellenic.
  • Load \usepackage{gfsneohellenicot} in PDFTeX to get GFS Neohellenic Math, then use \usepackage{mathastext} to change the Latin letters to Courier/Cursor.
  • Load a legacy OML math font, containing both Greek and Latin letters, with isomath or \DeclareMathAlphabet.

Solution, using pdflatex and mathastext. On my Linux system with texlive, I found the LGR font files with the command find texlive -name "*LGR*fd" (texlive is in my home directory), and then one can find the font names.


\usepackage{courierten} % CourierOneZeroPitch-TLF


% Switches font
% Creates row in tabular
\newcommand{\mtrow}[1]{\mtv{#1} #1:


\mtv{CourierOneZeroPitch-TLF} CourierOneZeroPitch-TLF is default
tt-font in the question's setup but it has no greek alphabet\medskip

\mtv{CourierOneZeroPitch-TLF} A little courier with its math
$\displaystyle\frac{\alpha\beta}{2}\int_0^1 f(x)dx$

\mtv{CourierOneZeroPitch-TLF} A little courier \MTversion*{lmtt} with
lmtt's math $\displaystyle\frac{\alpha\beta}{2}\int_0^1 f(x)dx$

\mtv{lmtt} A little lmtt with its math
$\displaystyle\frac{\alpha\beta}{2}\int_0^1 f(x)dx $

small sample

Many interesting and beautiful greek fonts that I could find in texlive on my system.

many greek fonts

  • 1
    there are also some with lowercase lgr such as tempora-TLF and others
    – user691586
    Feb 27 at 22:33
  • @user691586 you were right, so I added some more, including some funky ones like fmm and solomos. Feb 28 at 12:07

If you're using XeLaTeX, you can declare the Greek letters to use the main font (assuming it contains them).

\usepackage[no-math]{fontspec}% These two lines require xelatex



\Umathchardef\alpha="0 \symmtletterfont `α
\Umathchardef\beta="0 \symmtletterfont `β
\Umathchardef\gamma="0 \symmtletterfont `γ
\Umathchardef\epsilon="0 \symmtletterfont `ε


Text $x\alpha\beta\gamma\epsilon$


Fill in the rest.

enter image description here


To address the original problem, perhaps rescaling courier will do the job: use courier for math but, since it doesn't have its own greek, use lmtt's greek. In my opinion, lmtt's math looks better than couriers because of its use of italics instead of just slanted, so use courier with lmtt math.


\usepackage[scale=0.95]{courierten} % CourierOneZeroPitch-TLF

% Switches font

\mtv{courier} Here is a \emph{\textbf{little courier}} with its math
but doesn't have its own greek so I think it gets cmr's

\mtv{courierlmtt} Here is a \textbf{\emph{little courier}} with lmtt's
greek $\displaystyle\frac{\alpha\beta\gamma\delta}{2}\int_0^1
f(x)dx$. \bigskip

\mtv{lmtt} Here is a \emph{\textbf{little pure lmtt}} with it own math
$\displaystyle\frac{\alpha\beta\gamma\delta}{2}\int_0^1 f(x)dx$.\bigskip 

\mtv{courier}\mtv*{lmtt} Here is a \textbf{\emph{little courier}} with
lmtt math
$\displaystyle\frac{\alpha\beta\gamma\delta}{2}\int_0^1 f(x)dx$.

lmtt courier mix

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .