summaryrefslogtreecommitdiff
path: root/design/pml.tex
blob: 6357a8fb46c387400ffa2d2fdf64e679c89ae832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%
% Set colours for syntax highlighting
%
\usepackage{color}
\definecolor{commentcolour}{rgb}{0.69, 0.13, 0.13}
\definecolor{tagcolour}{rgb}{0.0, 0.0, 1.0}
\definecolor{keywordcolour}{rgb}{0.72, 0.52, 0.04}
\definecolor{stringcolour}{rgb}{0.73, 0.56, 0.56}
\definecolor{identifiercolour}{rgb}{0.0, 0.0, 0.0}

\usepackage{listings}
\lstset{
  basicstyle=\ttfamily\small,
  keywordstyle=[0]\color{tagcolour},
  keywordstyle=[1]\color{keywordcolour},
  identifierstyle=\color{identifiercolour},
  commentstyle=\color{commentcolour},
  stringstyle=\color{stringcolour},
  showstringspaces=false
}

\lstdefinelanguage{PML}{
  morekeywords=[0]{window,frame,spacer,label,lineedit,textedit,button,%
    checkbox,togglebutton,radiobuttons,combobox,listbox,multilist}, %
  morekeywords=[1]{name,value,caption}, %
  tag=**[s]<>,%
  sensitive=f,%
  morestring=[d]",% ??? doubled
  MoreSelectCharTable=%
  \lst@CArgX--\relax\lst@DefDelimB{}{}%
                                  {\ifnum\lst@mode=\lst@tagmode\else
                                    \expandafter\@gobblethree
                                    \fi}%
                                  \lst@BeginComment\lst@commentmode{{\lst@commentstyle}}%
                                  \lst@CArgX--\relax\lst@DefDelimE{}{}{}%
                                  \lst@EndComment\lst@commentmode
}[keywords,comments,strings,html]%
\lstset{language=PML}