Wednesday, 31 October 2007

Font sizes in LaTeX

To write text in different sizes in LaTeX, you can use the following standard size-changing commands (from p. 170 in The LaTeX Companion):

  • \tiny
  • \scriptsize
  • \footnotesize
  • \small
  • \normalsize
  • \large
  • \Large
  • \LARGE
  • \huge
  • \Huge

Tuesday, 23 October 2007

Source code in LaTeX

If you want to include some source code into a LaTeX-document, you can of course use the verbatim environment. It can be useful to refer to an external file rather than copy & paste the source into the LaTeX-file.

To refer to an external file (which has the advantage that you do not need to apply modifications in two places) can be done by using the moreverb package: insert
at the beginning of your document. I use the following macro

You can now use
in your document if you want to include the source text in the file ex5.m.