Tried. Doesn't work.
Code: Select all
\documentclass{article}
\usepackage{listings}
\usepackage[dvipdfmx]{color}
%Define Colors
\definecolor{gray}{RGB}{102,102,102} %#666666
\definecolor{lightblue}{RGB}{0,102,153} %#006699
\definecolor{lightgreen}{RGB}{102,153,0} %#669900
\definecolor{bluegreen}{RGB}{51,153,126} %#33997e
\definecolor{magenta}{RGB}{217,74,122} %#d94a7a
\definecolor{orange}{RGB}{226,102,26} %#e2661a
\definecolor{purple}{RGB}{125,71,147} %#7d4793
\definecolor{green}{RGB}{113,138,98} %#718a62
\lstdefinelanguage{Processing}{
%keyword1&2&6
classoffset = 1,
morekeywords = {abstract, class, continue, default, enum, extends, false, final, finally, implements, import, instanceof, interface, native, new, null, package, private, protected, public, static, strictfp, throws, transient, true, void, volatile, length, assert, case, return, super, this, throw},
keywordstyle = \color{bluegreen},
%keyword3
classoffset = 2,
morekeywords = {catch, do, for, if, else, switch, synchronized, while, try},
keywordstyle = \color{lightgreen},
%keyword4
classoffset = 3,
morekeywords = {width, height, pixelHight, displayHeight, displayWidth, focused, frameCount, frameRate, key, keyCode, keyPressed, mouseButton, mousePressed, mouseX, mouseY, pixels, pixelWidth, pmouseX, pmouseY},
keywordstyle = \color{magenta},
%keyword5
classoffset = 4,
morekeywords = {Array, ArrayList, Boolean, Byte, BufferedReader, Character, Class, Double, Float, Integer, HashMap, PrintWriter, String, StringBuffer, StringBuilder, Thread, boolean, byte, char, color, double, float, int, long, short, FloatDict, FloatList, IntDict, IntList, JSONArray, JSONObject, PFont, PGraphics, PImage, PShader, PShape, PVector, StringDict, StringList, Table, TableRow, XML},
keywordstyle = \color{orange},
%function1
classoffset = 5,
morekeywords = {boolean(},
keywordstyle = \color{lightblue},
classoffset = 0,
sensitive = true,
morecomment = [l]{//},
morecomment = [s]{/*}{*/},
morecomment = [s]{/**}{*/},
commentstyle = \color{gray},
morestring = [b]",
morestring = [b]',
stringstyle = \color{purple}
}
\lstset{
language={Processing},
basicstyle={\small},
identifierstyle={\small},
commentstyle={\small\itshape},
keywordstyle={\small\bfseries},
ndkeywordstyle={\small},
stringstyle={\small\ttfamily},
frame={tb},
breaklines=true,
columns=[l]{fullflexible},
numbers=left,
xrightmargin=0em,
xleftmargin=3em,
numberstyle={\scriptsize},
stepnumber=1,
numbersep=1em,
lineskip=-0.5ex,
}
\begin{document}
\begin{lstlisting}
boolean;
boolean(1);
\end{lstlisting}
\end{document}