When creating a document that consists of both Latin and CJK (Chinese, Japanese, Korean) scripts, I often find that the Latin typefaces do not blend well with the CJK ones in terms of their relative proportions: The Latin typefaces often look too small compared with the CJK typefaces.
To solve this problem in LaTeX, one approach is to scale up the Latin typefaces. For example, suppose that we want to use Times (or its clone) for Latin text and for math, but scaled to 108%. We can write
\documentclass{article}% default font size for body text is 10pt
\usepackage[no-math]{fontspec}
\setmainfont{TeX Gyre Termes}[Scale=1.08]
\usepackage[scaled=1.08]{newtxmath}
\begin{document}
Nominal font size for body text: \csname f@size\endcsname pt
Times clone font size: \the\fontdimen6 \font
Math font size: $\the\fontdimen6\space\textfont1\space$
\end{document}
Do you see the problems?
- We have asked for a scale factor of 1.08, but LaTeX gives us Times scaled to 10.80002pt. What’s up with the extra 0.00002pt?
- The
newtxmath
package has an option to scale math fonts. But what about other math font packages? For example, the (commercial) math font packagemtpro2
does not have ascaled
option. To someone who purchases the “Complete” license, this can be very frustrating.
To address the first problem (the inaccurate scaling), I offer the file
allow-frac-scale.tex
. This file takes advantage of
eTeX’s “expressions”, so you can write your scale factors in
fractions to get more accurate scaling results:
\input{allow-frac-scale}
\documentclass{article}% default font size for body text is 10pt
\usepackage[no-math]{fontspec}
\setmainfont{TeX Gyre Termes}[Scale=108/100]
\usepackage[scaled=108/100]{newtxmath}
\begin{document}
Nominal font size for body text: \csname f@size\endcsname pt
Times clone font size: \the\fontdimen6 \font
Math font size: $\the\fontdimen6\space\textfont1\space$
\end{document}
For those who have licensed mtpro2
,
I offer the file mtpro2-patch.tex
. But first, you
need to manually fix 14 bugs in your mtpro2.sty
file (please let me know if
you find more). Otherwise my patch file may produce errors. The instructions are
outlined at the beginning of the file.
This file started as a tool to scale the MathTime Pro 2 fonts, but over the years it grew to something much more. To use it, you write in your preamble:
\usepackage[<options>]{mtpro2}
\newcommand*\mtpscale{<scale factor>}% optional
\newcommand*\mtpscriptscale{<scale factor>}% optional
\newcommand*\mtpscriptscriptscale{<scale factor>}% optional
\input{mtpro2-patch}
Here are the features:
- Scale the entire MathTime Pro 2 family according to your scale factor(s), for both “Lite” and “Complete” versions.
- Some font bugs are fixed too: The parentheses of your binomial coefficients are no longer overly large.
- Provide a
\mtp@bBigg@
command to help you create\biggg
,\Biggg
, etc. - Fix the sizing of
\undercbrace
and\overcbrace
when your font size is no longer 10pt. - Redefine
pmatrix
to always use large round parentheses, so you don’t need to write\PARENS{\begin{matrix}...\end{matrix}}
anymore. - Redefine
Bmatrix
andcases
to always use the appropriate braces (they know about curly, morphed, and straight braces). - Provide
\tabularbin
and\tabularrel
in case (pun intended) you want to align your binary and relation symbols incases
or any stacked expressions. - Provide
\cramped
, with an implementation slightly different from (and less buggy than) themathtools
version. - Provide
\subalign
if you want alignment points in your subscript stacks. - Finally, there are various fixes to the bugs I’ve found in the
amsmath
package and in the LaTeX2e kernel. These bugs were reported to the LaTeX team, but they might never get fixed due to backward compatibility concerns.