TeX tips


Using new LaTeX 2e.

LaTeX 2e skeleton:
    % Doc:
    \documentclass[a4paper]{article}
    \usepackage{}
    \begin{document}

    \end{document}
Neprilis strucny navod do systemu LaTeX 2e (834K bytes, PS)


Insert graphics into document


Compressed .eps graphics

Since LaTeX 2e, dvips, and gv can maintain compressed graphics files automatically (under UNIX), we can store them compressed by gzip to save disk space. The only things you should do are:
  1. Create .eps.bb file with bounding box information about your graphics as follows
    getbbox file
    or for all eps files in current directory: getbbox '*.eps'
  2. Compress you Encapsulated PostScript (.eps) file(s)
    gzip file(s)
  3. Include your graphics for LaTeX 2e by standard way by \includegraphics command.
More information you can find in Using EPS Graphics in LaTeX 2e Documents (PS, 767K bytes) by Keith Reckdahl (available in both CMP rooms 110, 129).

Writing URL.

Load url style and use \url|...| the same way as the \verb|...| macro. The splitting lines at reasonable places is prefered now.

More informatin you can find in my internal report URL v TeXu (72K bytes, PS, in Czech) and at the end of the url.sty source code (17K bytes).


Changing LaTeX margins.

For full A4 portrait paper area \usepackage{fullpage}.

Generaly use in both LaTeX2e and LaTeX209 style Vmargin. There are two main macros:

  1. Set paper size:
  2. Set your margins and text sizes:
To make effect you should use both macros in the mentioned order.

Only loading style, not setting parameters described above, it sets default margin as follows:

    \usepackage{vmargin}
    \setpapersize{A4}
    \setmarginsrb{35mm}{20mm}{25mm}{15mm}{12pt}{11mm}{0pt}{11mm}
You find detailed information at the end of Vmargin.sty source file (15K bytes).

Seting landscape orientation.

  1. The whole document. Use Vmargin.sty as follows:
    and then run DVIPS -t landscape.

  2. The whole page. Use lscape package in LaTeX 2e in the next way:
  3. The whole figure or table. Include rotating package and use sidewaysfigure or sidewaystable environment instead of figure or table, respectively.

  4. Only a part of a page (e.g. item, paragraph).


Screen presentation in PDF by pdfLaTeX (CMPtalk).

    Use CMPTalk class in pdfLaTeX. Template, example (PDF, source).

    Make handouts from your slides:

    Instalation on personal (non-CMP net) computers:

    Translation with psfrag package:

    Package texpower makes possible pages with incremental material (overly) (TeXPower demos+manual).


PDFTeX - PDF document directly from TeX source.

    PDFTeX is a 100% TeX with Adobe Portable Document Format output if a new primitive \pdfoutput is positive. Otherwise creates standard DVI. Its author is Han The Thanh.

    Consult the concise and good PDFTex manual (PDF, 322K bytes). If you are PDF addicts, you probably know PDF manual (5.3Mb, PDF) with complete PDF description. Both manuals in printed form (but not latest versions) are available in CMP library (rooms 110 or 129). More information on CsTUG page (in Czech).

    Brief course:


Back to main CMP TeX page.
2003-04-17