Monday, March 5, 2012

Latex - Beamer + minted + Pygments

The minted package allows you to highlight source code according to its language type by using pygments.

rene@linux-2561:~> sudo zypper in python-Pygments
rene@linux-2561:~/bin> unzip 
   creating: minted/
  inflating: minted/minted.dtx       
  inflating: minted/minted.ins       
  inflating: minted/minted.pdf       
  inflating: minted/README           
  inflating: minted/Makefile 
rene@linux-2561:~/bin/minted> python --version
Python 2.7.2
rene@linux-2561:~/bin/minted> make
tex minted.ins
This is TeX, Version 3.1415926 (TeX Live 2011)
(./minted.ins (/usr/share/texmf/tex/latex/base/docstrip.tex
Utility: `docstrip' 2.5d <2005/07/29>
English documentation    <1999/03/31>

* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *

* No Configuration file found, using default settings. *


Generating file(s) minted.sty 

Processing file minted.dtx (package) -> minted.sty
Lines  processed: 1296
Comments removed: 994
Comments  passed: 0
Codelines passed: 296

No pages of output.
Transcript written on minted.log

rene@linux-2561:~/bin/minted> sudo cp minted.sty /usr/share/texmf/tex/latex/minted/

rene@linux-2561:~> sudo texhash
texhash: Updating /etc/texmf/ls-R... 
texhash: Updating /var/lib/texmf/main/ls-R... 
texhash: Updating /usr/share/texmf/../../../var/lib/texmf/dist/ls-R... 
texhash: Updating /var/cache/texmf/fonts/ls-R... 
texhash: Updating /var/lib/texmf/ls-R... 
texhash: Done.

This is what I've got so far:

\item Generating factorials
WITH RECURSIVE source (counter,product) AS
     SELECT counter +1 , product * (counter +1)
         FROM source WHERE counter < 10)
SELECT counter, product FROM source;
Other references:

No comments:

Post a Comment