I have some text that I want to be in between \normalsize
and \small
. Any way to do that?
2 Answers
Taking the average of normal and small size:
\RequirePackage{fix-cm}
\documentclass[12pt]{article}
\makeatletter
\AtBeginDocument{%
\begingroup
\normalsize
\let\tmp@n@s\f@size
\let\tmp@n@b\f@baselineskip
\small
\let\tmp@s@s\f@size
\let\tmp@s@b\f@baselineskip
\xdef\semismall@size{\fpeval{(\tmp@n@s+\tmp@s@s)/2}}%
\xdef\semismall@baselineskip{\fpeval{(\tmp@n@b+\tmp@s@b)/2}}%
\endgroup
}
\newcommand{\semismall}{\fontsize{\semismall@size}{\semismall@baselineskip}\selectfont}
\usepackage{lipsum}
\begin{document}
Normal size {\semismall not so small} {\small and small}
\lipsum[1][1-2] (\fontname\font)
{\semismall\lipsum[1][1-2] (\fontname\font)\par}
{\small\lipsum[1][1-2] (\fontname\font)\par}
\end{document}
I can't see how your reader will acknowledge the difference between normal size and semismall or between semismall and small.
Here is the same with a fully scalable font (Cochineal)
At 10pt main size
Addendum
Let me comment the image you got
I repeat the first image above for a comparison.
In the comment, you say that all sizes are the same, but it's not true. First of all, apart from scale factor and background, the typeset result is the same. If you look at the space between the period and U in the second line, you will see that it's smaller than the corresponding space in the fourth line: in the fourth line the font size is smaller and interword spaces are therefore larger in order to justify the text. In the 10.475pt part, TeX found no way to split “vestibulum” so that a part can go in the first line of the paragraph. If you look at “felis”, you can see that it's rather visibly to the left in the fifth line than in the third one.
This confirms my opinion: nobody can really spot that you're using a font size between \normalsize
and \small
.
I'd add that \small
is often used for quotations, but in this case the part is set with wider margins and separate from the main text by vertical space, like with
\begin{quotation}\small
text to be quoted
\end{quotation}
This tells that the text is not original, but doesn't hinder reading, because the size is not so different from the standard one.
The \semismall
trick might be used in a real emergency for cramming a bit more text in a paragraph, but in this case the second parameter to \fontsize
must be \f@baselineskip
so as to cover our tracks.
-
I get a compiler error for this one, undefined control sequence. Using TexShop on MacOS. Jul 1 at 16:26
-
@user129393192 You don't say what TeX distribution. Probably an outdated one: try adding
\usepackage{xfp}
.– egregJul 1 at 17:54 -
TeXShop v5.12, which it says is the latest. Using that package makes the output not like yours, but rather all the same size. Jul 1 at 18:02
-
@user129393192 TeXShop is just a front-end. What version of MacTeX did you last install?– egregJul 1 at 19:17
-
This is what
pdflatex --version
tells me. I think I downloaded from official website and set it to atuo-update:pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
Jul 1 at 19:41
\documentclass{article}
\usepackage{lmodern}
\newcommand\bitsmall{\fontsize{9.5}{11}\selectfont}
\begin{document}
Normal (10/12) {\bitsmall Bit small (9.5/11)} {\small Small (9/11)}.
\end{document}
The first number is the font size (default pt
units) the second the baselineskip which is only used if complete paragraphs are set in that size, not as here just fragments in a normalsize paragraph.
I use latin modern here, if using the original computer modern, add
\RequirePackage{fix-cm}
as first line to allow fonts at any size.
-
What exactly is difference between using
fix-cm
andlmodern
here? I am noticing both works, butlmodern
makes them smaller and more spaced out. I tend to like it more. Jul 1 at 16:37 -
@user129393192 fix-cm uses computer modern, lmodern uses latin modern which is a different but similar font set Jul 1 at 17:00
-
-
@user129393192 cm fonts would naturally allow being loaded at any size, just latex chooses to declare them at discrete sizes for legacy compatibility. fix-cm just removes those constraints. lmodern like almost all other families is declared for any size so does not need a package like fix-cm Jul 1 at 17:46
\fontsize{9.5}{11}\selectfont
if normalsize is 10pt(X)(X)(X)(X)(X)(X)(X)(X)