0

I'm writing a memoir with a \documentclass[b4paper,14pt,english,twoside]{memoir} and was very surprised that math formulas are so small.

Then my goal is to increase math-mode font size but keep a 14pt document class.

Totally working for 12pt

I've searched a workaround, here with the following MWE (and amplified font size increase)

Here I set a 12pt document class and increasing math mode font size with \DeclareMathSize is working:

\documentclass[b4paper,12pt,english,twoside]{memoir}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc} % For French accents
\usepackage[T1]{fontenc}
\usepackage{lmodern, textcomp}




%%%%%%%%%%%%%%%% MATH et TiKZ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{amssymb}

\DeclareMathSizes{12}{20}{14}{10}

\begin{document}
test old $\displaystyle \lambda$
    \begin{equation}
        \displaystyle a\ge b_h \iff \sum_{j:a_j\ge b_h^j}
    \end{equation}

\end{document}

Which is totally working for 12pt memoir:

enter image description here

Doesn't work anymore for 14pt

Trying to change global font size from 12pt to a 14pt and keeping an increased math mode font size doesn't work anymore.

\documentclass[b4paper,14pt,english,twoside]{memoir}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc} % For French accents
\usepackage[T1]{fontenc}
\usepackage{lmodern, textcomp}




%%%%%%%%%%%%%%%% MATH et TiKZ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{amssymb}

\DeclareMathSizes{14}{20}{14}{10}

\begin{document}
test old $\displaystyle \lambda$
    \begin{equation}
        \displaystyle a\ge b_h \iff \sum_{j:a_j\ge b_h^j}
    \end{equation}

\end{document}

\DeclareMathSizes doesn't work anymore, switching to a 14pt document class:

enter image description here

When it's working and when it's not

After few other tests, it seems that the command is working for any nn pt if nn <= 12pt and it doesn't work anymore for any nn pt if nn >= 14pt (with nn being one of the allowed sizes for memoir class).

Another test ran by @daleif showed that it's not working neither for extarticle document class which also provides 14pt and 17t font sizes.

Why doesn't it work anymore, when above 14pt and what solutions do I have to fix it?

JKHA
  • 473
  • 1
    Do you mind rephrasing this question? I have no idea what it is you are trying to do, and what it is you want to show us with these two MWEs. – daleif Jul 11 '19 at 12:10
  • @daleif Yes sure! Thank you for your suggestion, I've tried editing my question, is it better now? – JKHA Jul 11 '19 at 12:16
  • I don't think this is related to memoir, if you switch to article and use say 100 for all four args for DeclareMathSizes nothing happens – daleif Jul 11 '19 at 12:18
  • @daleif Then it's perhaps a missunderstanding of what parameters to put into DeclareMathSizes? – JKHA Jul 11 '19 at 12:20
  • I'll pass it on to people to ought to know – daleif Jul 11 '19 at 12:22
  • @daleif, thanks, I've edited my question, correcting the memoir tag and mentions :) – JKHA Jul 11 '19 at 12:24
  • @daleif Actually, accordingly to the question I linked in my question, you can't set all four arguments to 100 because first one HAS to be equal to [14pt] or [12pt] in document class command, i.e. global font size of document – JKHA Jul 11 '19 at 12:26
  • Ahh, didn't get that then it seems to work – daleif Jul 11 '19 at 12:27
  • Then it may finally be related to memoir? – JKHA Jul 11 '19 at 12:28
  • 1
    Not sure, there should not be any difference between 14pt and 12pt for memoir. I'll dig – daleif Jul 11 '19 at 12:29
  • As far as I can see from a diff of mem12.clo and mem14.clo everything comes in matching pairs. Same number of macros. So how is DeclareMathSizes getting the default font size – daleif Jul 11 '19 at 12:36
  • @daleif I know that you are passing 12 or 14 to first arg of DeclareMathSizes, so that may be how it knows what's the default font size. – JKHA Jul 11 '19 at 12:38
  • 1
    Hmm, extarticle also offers 14pt and 17pt, it does not work there either – daleif Jul 11 '19 at 12:50
  • @daleif, I've mentionned your test and you in my question :) – JKHA Jul 11 '19 at 12:57
  • Fåk, it does not use 14pt when you as for 14pt, it uses \@xivpt which is 14.4, and then it works – daleif Jul 11 '19 at 13:00

1 Answers1

2

Life is never easy. You need to know the exact font size. memoir and other classes that provides an 14pt size class option (e.g. extarticle), is actually not using 14pt font size, the use \@xivpt, which is actually 14.4!! And 17pt is 17.28.

This stems from the old days when the fonts a certain sizes had to be generated. Nowadays where we have scalable fonts, things are a bit blurry, so things like this gets overlooked.

You can check the value using

\makeatletter
\typeout{\@xivpt}
\makeatother

Then

\DeclareMathSizes{14.4}....

seems to work just fine.

Perhaps better

\makeatletter
\DeclareMathSizes{\@xivpt}....
\makeatother

The \@... macros being used can be found in the mem<size>.clo files that comes with memoir

daleif
  • 54,450
  • So many thanks for you! That's the perfect answer for my question and you've been so helpful, I would have never find it by my own ;) Totally deserve my +1 and select haha – JKHA Jul 11 '19 at 13:11
  • 1
    @JKHA I never even though about the sizes of those macros. As I write above their value does from the old days. I got the explanation from the chat. – daleif Jul 11 '19 at 13:16