I'm writing my master thesis at the moment and I want to add some code listings to the appendix. The code is written in "Syntax", the programming language of SPSS Statistics.
Is there a way to enable syntax highlighting for SPSS Syntax code in listings
? Or is it possible to define words by myself that are highlighted afterwards?
I'm working with Lyx, if that matters.
Ideally, the typeset listing should look something like this:
Here is some sample code:
USE ALL.
*Filter für Gültige.
COMPUTE gueltig=0.
EXECUTE.
IF ((Ernsthaftigkeit1nurmalgucken5ernsthaftdabei > 2) AND (Alter < 75) AND (Aufmerksamkeit1abgelenkt5konzentriert > 2) AND (Musik1keine2Hobby3Profi > 0)) gueltig=1.
EXECUTE.
FILTER BY gueltig.
*Filter für deutsch erkannt (Audio und Verständnis korrekt).
USE ALL.
RECODE erkannteSprache ('d'=1) ('de'=1) ('Detsch'=1) ('deusch'=1) ('deustch'=1) ('Deutch'=1) ('deutsc'=1) ('deutscg'=1) ('deutsch'=1) ('Deutsch'=1) ('DEUTSCH'=1) ('Deutts'=1) ('german'=1) ('German'=1) ('German.'=1) ('Gernab'=1) (ELSE=0)
INTO deutscherkannt.
EXECUTE.
FILTER BY deutscherkannt.
*Filter für deutsche Sprache.
USE ALL.
RECODE ausgewählteSprache ("de"=1) (ELSE=0) INTO deutsch.
EXECUTE.
*Filter für auszuwählende Fälle.
USE ALL.
COMPUTE auswahl=0.
EXECUTE.
IF ((gueltig=1) AND (deutscherkannt=1)) auswahl=1.
EXECUTE.
FILTER BY auswahl.