I use this page to keep a record of misellaneous Latex tips and tricks that I find useful.

  1. Multi line comments

    Define a new command as follws:

    \newcommand{\comment}[1]{}

    You can then comment multiple lines as follows:
    \comment{text to be commented}

  2. Embedding fonts in PDF file

    When submitting camera ready copies, it is usually required to embed all the fonts in the PDF. For this, first create a postscript file using dvips and then use the following command to create the required pdf:

    ps2pdf -dSubsetFonts=true -dEmbedAllFonts=true -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -sPAPERSIZE=letter input.ps output.pdf

    The optput pdf is of US Letter paper size.

  3. To control width of tables

    Sometimes, the tables span more than the textwidth. In such cases, use this package: \usepackage{changepage} and then adjust width of tables using following: \begin{table}
    \begin{adjustwidth}{left side adjustment, e.g. -1.5in}{right side adjustment, e.g. -1.5in}
    ...
    \end{adjustwidth}
    \end{table}