generated from ivoa-std/doc-template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
syntaxXML.tex
51 lines (46 loc) · 2.34 KB
/
syntaxXML.tex
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
39
40
41
42
43
44
45
46
47
48
49
50
51
\usepackage{listings}
\usepackage{xcolor}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{OliveGreen}{rgb}{0.1,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{lightblue}{rgb}{0.0,0.0,0.9}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
\definecolor{darkred}{rgb}{0.6,0.0,0.0}
\lstset{
basicstyle=\ttfamily\footnotesize,
columns=fullflexible,
showstringspaces=false,
numbers=left, % where to put the line-numbers
numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers
stepnumber=1,
numbersep=2pt, % how far the line-numbers are from the code
backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=none, % adds a frame around the code
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
tabsize=2, % sets default tabsize to 2 spaces
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
title=\lstname, % show the filename of files included with \lstinputlisting;
% also try caption instead of title
commentstyle=\color{green}\upshape
}
\lstdefinelanguage{XML}
{
morestring=[s][\color{mauve}]{"}{"},
morestring=[s][\color{black}]{>}{<},
commentstyle=\color{dkgreen},
morecomment=[s]{<?}{?>},
morecomment=[s][\color{dkgreen}]{<!--}{-->},
stringstyle=\color{black},
identifierstyle=\color{lightblue},
keywordstyle=\color{black},
emph={dmid,dmtype,dmrole,value},emphstyle={\color{magenta}},
morekeywords={xmlns,xsi,noNamespaceSchemaLocation,dm-mapping:INSTANCE,dm-mapping:ATTRIBUTE, dm-mapping:COLLECTION,VODML,MODEL,dm-mapping:COLLECTION,dm-mapping:GLOBALS,type,id,source,target,version,dmref,name}% list your attributes here
}