问题
I have a LaTeX document. I want to change the font size of all the text, to make it smaller.
Normally I would just change the documentclass part. However I am generating LaTeX files from another programme, and it is setting the documentclass, I can't change that. However I can put things in the preamble.
Is there anyway to change the font size in the preamble, without touching the documentclass declaration.
回答1:
You can use the \fontsize{size}{skip} command, where size is your desired fontsize, and skip is the distance between lines (multiplied by baselineskip).
For the new fontsize to take effect, you need to follow this command with \selectfont.
A similar question has been asked here: how to set LaTeX font size in millimeter?
回答2:
See LaTeX - Changing the FontSize. You can surround your text in begin...end blocks for the specific size, or you can surround your text with braces where you place the size immediately after the brace. Example:
\begin{Large}
This text is large.
\end{Large}
Or, using the braces:
{\Large This text is large.}
回答3:
Use any scale. For example, write
\mag 900
and get scale 90% or write
\mag 1440
and get scale 144%.
回答4:
Untested, but this might work, if you want to overwrite which size option the document class uses:
\makeatletter
\PassOptionsToClass{10pt}{article}
\makeatother
Of course, pick a size option that is supported by the document class, and replace article by the class your tool generates.
回答5:
You can designate font size as an option to most documentclasses, as in
\documentclass[letterpaper, **11pt**]{article}
Braces control scoping in TeX, just like elsewhere, as Michael indicated, so you can surround the whole document with {\Large }, but that's kinda silly when you can just use the option to the documentclass as above.
Another possibility is defining your own style file or documentclass. LaTeX is built for it, so give it a try.
来源:https://stackoverflow.com/questions/2636647/latex-changing-the-font-size-for-a-document-but-in-the-preamble-not-the-docu