This is a Pygments lexer that performs syntax highlighting for:
- n3, turtle : Turtle/N3/NT (*.ttl, *.n3 and *.NT)
- sparql : SPARQL (*.sparql)
Make sure you're running Pygments 1.7 or higher and run
sudo python setup.py install
to install and e.g.
pygmentize -l turtle filename.ttl
to run Pygments.
This is mostly code from Openvest which seems to be abandoned. The original instructions on that site only works when using
pygmentize from the command-line. This implementation registers the package as a proper Pygments plugin which you can use from within Python, e.g.:
from pygments.lexers import (get_lexer_by_name,get_lexer_for_filename) get_lexer_by_name("turtle")
n3pygments was created based on this answer on the TeX StackExchange site. So yes, you can use it to perform using syntax highlighting on your code in LaTeX using Minted. I have also used it with success to perform syntax highlighting on an Octopress 2.0 blog.