on master help sign in
Updates to idrislang.sty
commit8698e57b04173dc459e7e078b7c945bd1146b101 authorJan de Muijnck-Hughes <jfdm@st-andrews.ac.uk> dateMon 20 Oct 2014, 10:35 (12 years ago) parente34c6df
1 file changed+16−4
contribs/idrislang.sty+16−4
contribs/idrislang.sty+16−4
@@ -5,7 +5,10 @@
55%% + Provides a listings bindings:
66%% + idris :: default ascii
77%% + literateidris :: convert ascii maths to math symbols.
8−%% + Defines a `numbers' and `default' listings style.
8+%% + Defines a `numbers', `default', and `stdout' listings style.
9+%% + default :: default for Idris which is to use a tt font.
10+%% + numbers :: default but with numbers.
11+%% + stdout :: for formatting stdout.
912%% + Defines a `code' environment for typesetting idris.
1013%% + \begin{code}[...] ... \end{code}
1114%% + Defines an input command for externally defined idris files.
@@ -67,7 +70,7 @@
6770},
6871%% ------------------------------------------------------- [ Prelude Functions ]
6972 morekeywords={%
70− class, data, instance, record, dsl, postulate, default,
73+ class, data, instance, record, dsl, postulate, default,
7174 lambda, variable, index_first, index_next
7275 },
7376%% ---------------------------------------------------------------- [ Comments ]
@@ -89,7 +92,7 @@
8992 {>=}{{$\geq$}}2
9093 {<-}{{$\leftarrow$}}2
9194 {<=}{{$\leq$}}2
92− {=>}{{$\Rightarrow$}}2
95+ {=>}{{$\Rightarrow$}}2
9396 {==}{{$\equiv$}}2
9497 {\ .}{{$\circ$}}2
9598 {\ .\ }{{$\circ$}}2
@@ -100,8 +103,9 @@
100103%% -------------------------------------------------- [ Default Listings Style ]
101104
102105\lstdefinestyle{default}{%
103− basicstyle=\ttfamily
106+ basicstyle=\ttfamily\normalsize,
104107}
108+
105109\lstdefinestyle{numbers}{%
106110 numbers=left,
107111 numbersep=10pt,
@@ -109,6 +113,14 @@
109113 frame=leftline
110114}
111115
116+\lstdefinestyle{stdout}{%
117+ xleftmargin=\parindent,
118+ tabsize=2,
119+ basicstyle=\ttfamily\normalsize,
120+ showstringspaces=false,
121+ escapechar=^
122+}
123+
112124%% ------------------------------------------------------ [ A Code Environment ]
113125%% Replicate the existence of literate haskell code environments,
114126%% option to make pretty with numbers.