Math & Scienceslides | Font Size of In-line Math Mode too small

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
TigerMO
Posts: 2
Joined: Mon Jan 14, 2013 11:40 pm

slides | Font Size of In-line Math Mode too small

Post by TigerMO »

I’m new to using LaTeX, so I apologize for a real newbie question. When I’m in the slides document class and have included an 11pt option, I notice in all in-line math environments that the variables appear smaller than the text. I’d prefer to have the variables larger and more equal in size to the surrounding text. Is this possible? Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

slides | Font Size of In-line Math Mode too small

Post by localghost »

The slides class does not accept options like 11pt to determine the font size. You should get a corresponding warning in the log file (*.log). And if I incorporate your sparse information into a sample document, I can't comprehend the described behaviour.

Code: Select all

\documentclass{slides}
\usepackage[T1]{fontenc}

\begin{document}
  We know that $E=mc^2$ \ldots
\end{document}
A screen capture of the resulting output is attached.

Besides the slides class is considered obsolete. There are much more sophisticated classes for presentations like beamer or powerdot. Or do you really plan to use an overhead projector? Because that's what the slides class was originally made for.


Best regards and welcome to the board
Thorsten
Attachments
The resulting output of the code sample.
The resulting output of the code sample.
slides-inline-math.png (4.87 KiB) Viewed 7902 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

slides | Font Size of In-line Math Mode too small

Post by Stefan Kottwitz »

Hi,

welcome to the board!

I can see the problem, it's designed this way and I don't like the size relation too.

Code: Select all

\documentclass{slides}
\usepackage[T1]{fontenc}% similar result also without
\begin{document}
m$m$m
\end{document}
slides-fonts-default.png
slides-fonts-default.png (1.4 KiB) Viewed 7896 times
You could use the command \DeclareMathSizes to adjust it. The class calls

Code: Select all

\DeclareMathSizes{19.907}{19.907}{16.59}{13.82}
and for further values. It can be changed, for example:

Code: Select all

\documentclass{slides}
\usepackage[T1]{fontenc}
\DeclareMathSizes{19.907}{21.9}{16.59}{13.82}
\begin{document}
m$m$m
\end{document}
slides-fonts-adjusted.png
slides-fonts-adjusted.png (1.5 KiB) Viewed 7896 times
However, it will also affect capital letters, so if you would use capital letters in math mode, you would see they are too big then. It's just that the sizes of small letters in the default choosen fonts don't match well, but the capital letters do. You could consider to use different fonts.

Finally, I support Thorstens recommendation to choose a more modern class. Such manual fixes are not recommendable. The mentioned classes beamer and powerdot are well designed and offer much more features.

Stefan
LaTeX.org admin
TigerMO
Posts: 2
Joined: Mon Jan 14, 2013 11:40 pm

Re: slides | Font Size of In-line Math Mode too small

Post by TigerMO »

Thanks for your replies.

Thorsten- the effect I’m describing IS visible in your example, but you don’t notice it because your in-line math is not in the middle of a text phrase. I don’t know how to attach a sample, but if you type this line in LaTeX, I think you’ll see it:

To show x times y in algebra, you just write xy.

The reason I’m using slides is because I’m doing updates to presentations that were originally written in the slides document class. I originally started trying to re-create each slide using beamer, but I discovered that the learning curve was too steep for me to be able to get the work done by the start of the semester next week. The layout of some of the slides is rather intricate, and with absolutely NO experience with LaTeX, it was taking too much time trying to figure out what needed to be changed in the source files to make them work with beamer. I was bombarded with error messages that I didn’t understand.

The lessons will be taught using an iPad connected to a video projector, so it is very similar to using an overhead projector. The PDF output has to be with a larger font sizes and more space for working out the problems, but still getting everything to fit.

I intend to learn beamer when I have the time to do that. I didn’t know about power dot, so I’ll look into that. Meanwhile, it appears that the issue I’ve encountered is a “bug” in that particular document class, and with it being “obsolete,” I don’t expect a fix to solve the problem.

Thanks for your help.

P.S. -- Do you have any suggestions for a beginner’s book to learn beamer?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

slides | Font Size of In-line Math Mode too small

Post by localghost »

TigerMO wrote:[…] Thorsten- the effect I’m describing IS visible in your example, but you don’t notice it because your in-line math is not in the middle of a text phrase. I don’t know how to attach a sample, but if you type this line in LaTeX, I think you’ll see it:

To show x times y in algebra, you just write xy. […]
Indeed. My example seems a bit inappropriate.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

slides | Font Size of In-line Math Mode too small

Post by Stefan Kottwitz »

You can already fix it by changing the font. Here, for example, Latin Modern, very recommendable and similar to the default LaTeX font:

Code: Select all

\usepackage[T1]{fontenc}
\usepackage{lmodern}
Then the sizes would match.

To be on the safe side, define default font macros also to use Latin Modern:

Code: Select all

\renewcommand*{\rmdefault}{lmr}
\renewcommand*{\sfdefault}{lmss}
\renewcommand*{\ttdefault}{lmtt}
\renewcommand*{\familydefault}{\rmdefault}
The last lines switches back to default roman font, i.e. with serifs. I would prefer it because the math font has serifs too. But if you would prefer having a sans-serif font, omit the last line.

Stefan
LaTeX.org admin
Post Reply