7

The current question is a follow-up to some previously asked questions, like this: It is possible to make fonts appear heavier (darker) in pdf output of Latex? and this: Make entire document heavier using pdfrender and this: Fake bold in LuaLaTeX. All of these questions deal with the document as a whole (equally text and math). In my case, I need to make only math font a bit thicker (darker). I use times for text and CM for math. The former is much heavier than the latter and they just look horrible. My goal then is to make CM math a little bit darker to shorten that gap. Is there a way to fix this? Thank you.

EDIT:

I add a not-so-minimal working example here showing my real usage as asked by some commentators. I use MiKTeX on Windows and I run pdflatex directly to obtain a pdf file:

\documentclass[a4paper,oneside,12pt,table]{book}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{textcomp}
\renewcommand{\rmdefault}{ptm}
\usepackage[scaled=0.92]{helvet}

\usepackage{pdfpages}
\usepackage{csquotes} 
\MakeOuterQuote{"}
\usepackage{moresize}
\usepackage{caption}
\usepackage[indention=10pt,position=top,margin=0pt,font=small,
            labelformat=parens,labelsep=space,skip=6pt,hypcap=false,
            labelfont=bf,list=true,textfont=sf]
            {subcaption}
\usepackage{graphicx,rotating,setspace}
\usepackage{array,booktabs,calc,longtable}
\usepackage{xcolor,multirow}
\usepackage{tocbibind}  % Show all lot, lof, loa, refs. in TOC
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{microtype}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{cleveref}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\addtolength{\headheight}{2.5pt}
\lhead{\itshape \chaptername ~\thechapter}
\rhead{\itshape \leftmark}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}% remove "Chapter N." prefix
\cfoot{\thepage}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\bibname}{References}

\begin{document}
\begin{titlepage}
Title Here and authorship
\end{titlepage}
\frontmatter
\pagestyle{plain}
\chapter{Dedication}
\chapter{Acknowledgments}
\chapter{Abstract}
\clearpage
  {%
    \singlespacing 
    \tableofcontents 
  }%
\clearpage
%========================= List of Figures ============================= 
\listoffigures
\clearpage
%=========================== List of Tables ============================ 
\listoftables 
\clearpage
%======================= List of Abbreviations ========================= 
\chapter{List of Abbreviations}
\clearpage
%================================ List of Symbols======================= 
\chapter{List of Symbols}
\clearpage
%================================ Main Chapters ======================== 
\pagestyle{fancy}
\mainmatter
\chapter{Introduction}
\section{First Section}
Some text which is OK! and some math which is so light:

\begin{equation}\label{e:barwq}
\begin{split}
H_c &=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
\sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
\Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}
\end{equation}

%========================== Additonal Appendices ======================= Appendices
\appendix
\clearpage
%====================== References Section ============================= 
\setstretch{1}
\begin{thebibliography}{199} % 199 is a random guess of the total number of references
\end{thebibliography}

\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
  • 1
    Try \mathbf and \boldsymbol. –  Apr 02 '15 at 00:44
  • 2
    Check the LaTeX Font Catalogue, specifically the Fonts with math support. Choosing any of these will show you examples of text, maths, and available styles. – erik Apr 02 '15 at 00:46
  • @Andrew - And how to differentiate between bold and non-bold? – AboAmmar Apr 02 '15 at 00:46
  • @erik - I searched that Catalogue, but I'm not satisfied with any of the choices there. I'm looking for a new way to define math font as the attempts in the links of my question. – AboAmmar Apr 02 '15 at 00:49
  • Since you're using Times as the text font, is there a reason for not using Times as the math font as well? – Mico Apr 02 '15 at 01:40
  • You might use fourier which defines a math version of Adobe Utopia. It has been extenede for text by erewhon, which brings real smallcapts in 4 versions, oldstyle numbers and inferior and superior figures. The mathdesign package defines math versions for Utopia, URW Garamond (extended by Garamondx) and Bitstream Charter (extended by xCharter). – Bernard Apr 02 '15 at 01:40
  • @Mico - To my knowledge, their is no good non-commercial package which can provide good Times math fonts. – AboAmmar Apr 02 '15 at 01:44
  • 3
    @AboAmmar - Have you checked out the newtxtext and newtxmath packages? They're definitely free, as is tge mathptmx package? – Mico Apr 02 '15 at 01:53
  • @Mico - Yes, these are the nearest to me, but, they still have some problems. Just to mention some: large symbols are a bit strange, \int, \sum, \pi, \sigma, ... are also not appealing to the eye. – AboAmmar Apr 02 '15 at 02:02
  • Those will work better with Times than CM. It is not going to be easier to fake darker CM for maths than it was for text.... Plus, you will have the inevitable mismatch to contend with. – cfr Apr 02 '15 at 02:02
  • There is also TeX Gyre Termes which comes with a math font too and STIX or XITS. – Andrew Swann Apr 21 '15 at 11:54
  • @AndrewSwann The problem is I have no choice for text but Times. – AboAmmar Apr 21 '15 at 11:59
  • You can just load the math fonts from these. Which engine are you using? How are you loading "Times"? – Andrew Swann Apr 21 '15 at 12:03
  • @AndrewSwann I'm using pdflatex and I load times by issuing\renewcommand{\rmdefault}{ptm}. – AboAmmar Apr 21 '15 at 12:20
  • Can you update your question with the extra info and provide a MWE. – Andrew Swann Apr 21 '15 at 12:23
  • @AndrewSwann Ok, I edited my question – AboAmmar Apr 21 '15 at 16:08
  • The standard solution would be to \usepackage{mathptmx} which sets \rmdefault to ptm and does some appropriate font substitutions in the math. However, newtxtext and newtxmath are regarded as more modern and complete versions of this. – Andrew Swann Apr 22 '15 at 06:55

2 Answers2

6

Comptuer Modern is intentionally light. It is better to choose a math font corresponding to your main text.

There is a package mathptmx in the psnfss bundle that sets the main text to ptm and fakes some corresponding math fonts. Using this gives better results than you are seeing. However, better would be to switch to a more modern solution provided by the newtxtext and newtxmath packages. Below are examples of each.

mathptmx

Sample mathptmx

\documentclass[a4paper,oneside,12pt,table]{book}

\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{textcomp}
\usepackage{mathptmx}
\usepackage[scaled=0.92]{helvet}
\usepackage{microtype}

\begin{document}
\chapter{Introduction}
\section{First Section}
Some text which is OK! and some math which is the same weight:

\begin{equation}\label{e:barwq}
\begin{split}
H_c &=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
\sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
\Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}
\end{equation}

\end{document}

newtxtext with newtxmath

Sample newtx

\documentclass[a4paper,oneside,12pt,table]{book}

\usepackage[T1]{fontenc}
\usepackage[helvratio=0.92]{newtxtext}
\usepackage{newtxmath}
\usepackage{microtype}

\begin{document}
\chapter{Introduction}
\section{First Section}
Some text which is OK! and some math which is the same weight:

\begin{equation}\label{e:barwq}
\begin{split}
H_c &=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
\sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
\Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}
\end{equation}

\end{document}
Andrew Swann
  • 95,762
0

You should also have a look at the mathtime (mtpro2) fonts. The fonts are commercial, but one only has to pay for the full set, which most people don't need. The fonts are better in some ways (eg kerning) than some alternatives.

JPi
  • 13,595
  • ,@JPi I already know about mtpro2 and use it some times in less-math demanding documents, but, this is a long document with heavy math (vectors, bold Capital Greek symbols, ...), so, the lite version of mtpro2 will be by no means sufficient. – AboAmmar Sep 07 '15 at 11:07
  • ok. (I've paid the $75.) – JPi Sep 07 '15 at 13:48