pretty-java is a ConTeXt module and provides Java syntax highlighting.
Java syntax highlighting.
\usemodule[t-pretty-java]
\setupbodyfont[8pt]
\starttext
\starttyping[option=java]
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
\stoptyping
\stoptext
A sample document is available here.
You'll need the ConTeXt Standalone distribution. pretty-java may work with packaged ConTeXt but it has not been tested yet.
At that early stage of development, I recommand to clone the repo and symlink the pretty-java
directory to tex/texmf-modules/tex/context/third/pretty-java
.
- Use pretty-java and report any issue with the Java snippet involved
- Follow the usual fork/branch/PR workflow to send changes, if I like them I'll merge them
Copyright (c) 2013 Renaud AUBIN