7

(update) Just in case anyone else is interested in this, here's a combination I just found that comes close to being ideal, for my taste.

Similar math font as that of the mathdesign package, but slightly 'lighter', and spaced more liberally.

The settings are an adjusted version of Example 2 of XCharter documentation. All credit goes to @samcarter for pointing this out.

%% main settings

% scaled to match Charter font size of mathdesign, which I like best
% [osf] reduces number size in text mode... not sure yet about this one
\usepackage[scale=0.97]{XCharter} 

% scale math size to taste
\usepackage[libertine,bigdelims,vvarbb,scaled=1.05]{newtxmath} 

% error fix
\let\openbox\undefined 


%% optional settings

% I have no idea what I'm doing here.jpeg, but it sure looks prettier
\usepackage[spacing=true,kerning=true,babel=true,tracking=true]{microtype}

% different \mathcal style, but just a matter of taste
\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n} 
\renewcommand{\mathcal}[1]{\pazocal{#1}}

I am currently using

\usepackage[charter]{mathdesign}

While I like the text font, the math is spaced too densely for my taste.

I tried as an alternative

\usepackage[scale=0.97]{XCharter}

which seems to give me nearly identical text, but allows to set a different font for math mode.

The default math (which I get when using XCharter) is spaced the way I want it, but the font looks too thin/not heavy enough next to the Charter text font.

Alternatively, I tried

\usepackage[T1]{eulervm}

which is spaced nicely and looks 'heavy' enough, but I really don't like the characters (glyphs?).

(edit) Ideally, I would like something very similar to the default math font+spacing, but with a heavier font.

As you can probably tell, I'm not really knowledgeable about the tex internals here. For example, I don't know what controls the spacing in math mode.

So my question consists of two parts:

  • What would be a good "math font" to go with Charter text font (in the wide sense above, and probably not the right name for what I want, which is "math fonts + spacing")

  • How can I set it independently of the text fonts?

(Apologies if the following question is too "open ended", i.e. if "What would look good with X" isn't the type of question one should ask on this SE)

  • 1
    tug.dk/FontCatalogue/mathfonts.html will give you a list with fonts with math support - maybe have a look if you like one of them. – user36296 Jun 26 '17 at 15:09
  • @samcarter Thanks, will have a look. One question: I already struggled for a while how to set the math font independently. After loading for example \usepackage[scale=0.97]{XCharter}, will I load the math font by another \usepackage? or do I need to use something like \setmathfont, which I still struggle with? – Bert Zangle Jun 26 '17 at 15:13
  • (update) So let's say I'd like to use \usepackage{arev} for math and \usepackage{XCharter} for text. That doesn't seem to work though, and all fonts are from whatever is loaded last. Any pointer to an older question on SE showing how to fix that? – Bert Zangle Jun 26 '17 at 15:30
  • This depends on which fonts you want to use. Some packages have options to only load the math font or not load the math font ... but worst case you can do it manually, for example if you have loaded a package including a math font you can overwrite the normal text font with something like \renewcommand{\rmdefault}{mdbch} [this will change the normal text to charter and leave the previously chosen math alone] – user36296 Jun 26 '17 at 15:31
  • Mayeb read texdoc.net/texmf-dist/doc/fonts/xcharter/xcharter-doc.pdf it discussed possible math companions for charter – user36296 Jun 26 '17 at 15:36
4

Answer to the question in the question

http://texdoc.net/texmf-dist/doc/fonts/xcharter/xcharter-doc.pdf discusses suitable math companions for charter. Have a look there.


Answer to the question asked in your comment:

Probably not the most elegant solution, but if you have your desired math font, you can manually overwrite the font of the normal text, for example to use the charter font (as it is used with mathdesign)

\documentclass{article}

\usepackage{arev}
%\usepackage[charter]{mathdesign}

\renewcommand{\rmdefault}{mdbch}

\begin{document}

text

\begin{equation}
text
\end{equation}

text

\end{document}

or in the special case of the arev package you asked about in your comment, there is a dedicated package which only loads the math font:

\documentclass{article}

\usepackage[charter]{mathdesign}

\let\circledS\undefined
\let\mathcal\undefined
\let\mathbb\undefined

\usepackage{arevmath}

\begin{document}

text

\begin{equation}
text
\end{equation}

text

\end{document}
  • Three clarification questions, if you have the time: I previously used \renewcommand{\rmdefault}{mdbch} and I don't mind doing so, but: how can I derived the 'shorthand' (?), "mdbch" here, from the font or package name? I couldn't find these shorthands for some of the fonts I wanted to use. (1/3) – Bert Zangle Jun 26 '17 at 16:01
  • Do I need to \usepackage load the package that contains the font that I'm using with renewcommand\rmdefault? (2/3) – Bert Zangle Jun 26 '17 at 16:01
  • @BertZangle (1) To get mdbch I had a look into the source code of mathdesign - not sure how else to get them – user36296 Jun 26 '17 at 16:03
  • I noticed your 2nd part has a number of \let\circledS\undefined statements, which I also struggled with already. It's a way to avoid errors due to both packages setting math symbols, right? Just to see if I understand correctly, it doesn't mean the command is left undefined ultimately, but only for the /first/ package, but is set then by the second package. Correct? (3/3) – Bert Zangle Jun 26 '17 at 16:03
  • @BertZangle (2) no, the idea is to bypass the \usepackage{...} as this will probably also load the math font (as done in my first example) – user36296 Jun 26 '17 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.