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.
For something different, you will have to insert options and packages in the preamble. To change the font size, add the desired font size between the square brackets of the document class declaration. Remember, font size must be of the form "12pt", "11pt", or "14pt". The body of your document!
Set the font size of the whole document by adding an option to the \documentclass command. (10pt, 11pt, and 12pt are available on most classes.) Extsizes package makes more sizes from 8pt to 20pt available for the whole document. Moresize package adds two more size commands: \HUGE and \ssmall.
The font can also be changed for a specific element in the document. The command \fontfamily{qcr}\selectfont will set the TeX gyre cursor font typeface, whose fontcode is qcr , for the text inside the braces.
The font-size-adjust property gives you better control of the font size when the first selected font is not available. When a font is not available, the browser uses the second specified font. This could result in a big change for the font size. To prevent this, use the font-size-adjust property.
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?
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.}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With