Sunday, October 09, 2011

pdf to eps conversion

Currently, I need to convert pdf files to eps so that they can be included in latex files.

  1. Use Acrobat Pro open the pdf file. 
    Click File -> export -> PostScript -> Encapsulated PostScript or use "Save As" and change "Save As Type"
    However, the bounding box is NOT correctly calculated.
    You can use gsview to correct it.  Use gsview open the eps file, click "File -> PS to EPS", select "Automatically calculate Bounding Box" and save the output file.

  2. Use ghostscript.  Execute following command:
    gswin32 -sDEVICE=epswrite -sOutputFile=<filename>.eps <filename>.pdf
    This works well and bounding box is correctly calculated.

  3. Use Xpdf (http://www.foolabs.com/xpdf/download.html)
    pdftops -eps <filename>.pdf <filename>.eps
    However, the bounding box is NOT correctly calculated.

Brief Latex notes for equations

In-line: $…$

Single line, without equation number: \[ … \] or \begin{equation*} … \end{equation*}

Single line, with equation number: \begin{equation} … \end{equation}

Multi-line, without equation number: \begin{align*} ... \end{align*}

Multi-line, with equation number: \begin{align} ... \end{align}

"a double backslash (\\) is used to separate the lines, and an ampersand symbol (&) is used to indicate the place at which the formulas should be aligned."

For align, \label must be put in front of each equation. For equation, it does not matter you put it in front or in the end.