22 Ocak 2012 Pazar

Latex error: Unknown graphics extention: .eps

While trying to output a pdf from a .tex file including an .eps image, i got the error "Unknown graphics extention: .eps", even though including the graphics package..
Following this discussion http://www.latex-community.org/forum/viewtopic.php?f=31&t=84&sid=770badff71c4ad41aae498dbfad6c058&start=10, someone states that:

Remember, EPS only works with the following compiling routes:
LaTeX => DVI
LaTeX => PS
LaTeX => PS => PDF

but not with LaTeX => PDF !!!

So, i tried Texify instead of PDFTexify in WinEdt with success.. Afterwards, i converted the output to PDF with dvi2pdf as in the figure:

16 Ocak 2012 Pazartesi

pygraphviz on windows (Python 2.7)

Installing pygraphviz on Windows is a lit bit tricky.. It took almost all my sunday afternoon to find out a solution that works for me.. Finally i did by following instructions on http://blog.ropardo.ro/2011/11/28/installing-pygraphviz-on-windows/ 

Here is my steps:
  1. Install ActivePython Community Edition (http://www.activestate.com/activepython) in order to have easy_install. Add PYTHON_HOME/Scripts folder to PATH variable.
  2. Install required/wanted Python packages with easy_install. However, pygraphviz do not have a Windows build, and it can not be easy installed, since Python does not know where Graphviz is installed..
  3. Install Graphviz (http://www.graphviz.org/
  4. Installed an old version of MinGW (specifically the build on 20100831) (http://www.mingw.org/) . Add MinGW/bin to PATH.
  5. Download pygraphviz (http://networkx.lanl.gov/pygraphviz/) and extract it.
    1. Edit setup.py of pygraphviz as follows:     (they are None as default..)
      • library_path="C:/Graphviz 2.28/lib/release/lib"
      • include_path="C:/Graphviz 2.28/include/graphviz" 
    2. Modify line 285 (most probably) from “C:\python27\lib\distutils\unixcompiler.py" as follows:
      • old:  compiler = os.path.basename(sysconfig.get_config_var("CC"))
      • new: compiler =  "gcc" 
    3. Run the following command from pygraphviz-$version folder:
      • python setup.py build -c mingw32
    4. Copy the pygraphviz folder under (some place like) C:\pygraphviz-1.1\build\lib.win32-2.7 to Python site-packages.My site-packages location is  C:\Python27\Lib\site-packages.
After the steps above, import pygraphviz should succeed on Python interpreter..

The link which i presented in the beginning of this post worked for me.. However, some slightly different solutions exist (unfortunately, they did not help much my condition):