# Set precise font size in memoir class

It seems, that there is a problem with font sizes in memoir class.

In the manual of the memoir class, p. 48, it is written that for example using class option 14 pt we'll get \normalsize = 14 pt.

However actually, using commands \normalsize \f@size the output is 14,4 pt. Using Adobe Acrobat Pro one can also check the font size. For this case it is 14,35 pt.

How to set precise font size in memoir class?

In particular, I need to get the size of the text 14,0 bp in pdf, i.e. this size should be observed by Adobe Acrobat Pro or, at least, by command \f@size, for \normalsize text style. I guess I need to establish in memoir class the value of \normalsize about 13,5--13,8 Tex pt.

The output with some highlighted strange values.

UPD1: actually as alephzero explained in comments, there is a difference between abbreviations of point values and real point values in TeX.

UPD2: Explanation given in comments by daleif: \huge, \Huge and \HUGE commands print the same value as \LARGE without extrafontsizes option.

And, of cause, I need a way how to get 14,0 bp in pdf, i.e. this size should be observed by Adobe Acrobat Pro or, at least, by command \f@size, for \normalsize text style.

MWE

    \documentclass[14pt]{memoir}
\begin{document}
%https://tex.stackexchange.com/a/20452/44348
Class option value versus real size.
\makeatletter

8pt VS \verb+\miniscule+ \miniscule \f@size

9pt VS \verb+\tiny+ \tiny \f@size

10pt VS \verb+\scriptsize+ \scriptsize \f@size

11pt VS \verb+\footnotesize+ \footnotesize \f@size

12pt VS \verb+\small+ \small \f@size

14pt VS \verb+\normalsize+ \normalsize \f@size

17pt VS \verb+\large+ \large \f@size

20pt VS\verb+\Large+ \Large \f@size

25pt VS \verb+\LARGE+ \LARGE \f@size

30pt VS \verb+\huge+ \huge \f@size

36pt VS \verb+\Huge+ \Huge \f@size

48pt VS \verb+\HUGE+ \HUGE \f@size
\makeatother
\end{document}

• the table is misleading: you're typesetting the 14 pt in 12pt, since you miss braces around the previous line; nevertheless the fonts are geometrically scaled, and that 0.4pt is really around 0.1mm, is really that important? – Moriambar Jun 3 '17 at 20:24
• The difference between TeX's "14.4 points" and Adobe's "14.35 points" is because TeX uses traditional printer's point sizes where 72.27 points = 1 inch, but Adobe uses "computer points" where 72 points (exactly) = 1 inch. If you want to match Adobe-sized points in TeX, measure them in "big points" with units bp not pt. – alephzero Jun 3 '17 at 20:41
• it's not a bug just your misunderstanding of the difference between tex and postscript points, we have several answers explaining the units used by tex. – David Carlisle Jun 3 '17 at 20:48
• In TeX (before LaTeX) Knuth made the typographic decision that fonts should be scaled in increments of 20% exactly. That's where the sizes 10, 12, 14.4, 17.28, 20.736, 24.8832, 29.85984, 35.831808 originally came from. Rounding them to 10, 12, 14, 17, 20, 25, 30, 36 is a mostly about making the names easier to use and remember - but one could quibble about whether "20" should really be "21". – alephzero Jun 3 '17 at 20:51
• @Moriambar "0.4pt is really around 0.1mm, is really that important?" If you have 40 lines of text per page, those 0.1mm increments change the total height of the text block by 4mm, which is important if you care about such things! 4mm is about the same height as an extra line of text on the page. – alephzero Jun 3 '17 at 20:53

First of you will need the extrafontsizes class option to activate the very large huge data. It is not well described in the manual. I've added that to my TODO list.

To change the font sizes to something more specific, create your own clo file. Say myfont14.clo, then start the document with

\providecommand*{\anyptfilebase}{myfont}
\providecommand*{\anyptsize}{14}
\documentclass[extrafontsizes,*pt]{memoir}


Copy the contents of mem14.clo to myfont14.clo and adjust it accordingly. Note that you can use

   \@setfontsize\normalsize{14bp}{17.5bp}%


instead of the syntax used in mem14.clo which assumes pt.

With 14bp \f@size says 14.05249, which should be the pt equivalent of the bp value.

• thank you for the explanations. I'll try to implement your recommendations on Sunday and perhaps, ask some extra questions (if nobody presents more detailed answer). – Vladimir Parkhomenko Jun 6 '17 at 9:05
• your method works very well. Futhermore, it helps to run for example this example tex.stackexchange.com/a/310065/44348. Why that example does not work without \providecommand*? I would be very grateful if you explain the meaning of the following options: {17.5bp} from your explanation, \@xipt, \@xviipt etc and the general logic how to set this values to get a success. – Vladimir Parkhomenko Jun 23 '17 at 15:15
• @VladimirParkhomenko which example are you referring to? Here providecommand is just useful, it defined the macro if it does not already exist. \@xipt is probably the same as {11pt} might also be just {11} as the macro will use pt if no unit is give (AFAIR). The actual value of 17.5 is the baselineskip, it is an arbitrary value, I think I just too the pt value from mem14 and used that. The \@xipt macros stem from a period of history where computers did not have a lot of memory, to latex \@xipt us one token {11pt} is at least 4. – daleif Jun 23 '17 at 15:23
• @VladimirParkhomenko again you need to be more specific. The baselineskip refers to the font size, each time you set a font size and a baselineskip. AFAIR memoir cannot load just any memX.clo for a given x, they are hard-coded into memoir (not sure that is true) thus you need to tell it exactly what to load. This does that. – daleif Jun 23 '17 at 15:53
• @VladimirParkhomenko what exactly are you saying it not working without what. – daleif Jun 23 '17 at 15:54