views:

415

answers:

5

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.

A: 

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.}
Michael Aaron Safyan
Yes that's a possibility, but I would need to do that for every single paragraph in the document. This is not the 'LaTeX way'
Rory
+5  A: 

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: http://stackoverflow.com/questions/890127

Jens
Putting that in my preamble doesn't change the font size.
Rory
+2  A: 

Use any scale. For example, write

\mag 900

and get scale 90% or write

\mag 1440

and get scale 144%.

Alexey Malistov
That doesn't change the font size for me. All it seems to do is change the spacing between things, (e.g. border, margins etc.)
Rory
@Rory. It works for me. It must work. All is scaled. Check `\mag 500`, for example.
Alexey Malistov
A: 

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.

Joel J. Adamson
I can't change the document class definition. I can't use this.
Rory
I misunderstood your question: can you change anything about the program producing the documents? In other words, is it your code?
Joel J. Adamson
A: 

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.

Damien Pollet