summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/brandeis-problemset
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-04 21:49:21 +0000
committerKarl Berry <karl@freefriends.org>2019-01-04 21:49:21 +0000
commitf29c8047c5a7322cd327fa3073991990fdc32920 (patch)
treea637d9d87566fb1b101cec1182eba7e760ef5bf2 /Master/texmf-dist/tex/latex/brandeis-problemset
parent39eaa60079c4839f8ed7bcdcf907c6ce0e5e75ab (diff)
brandeis-problemset (4jan19)
git-svn-id: svn://tug.org/texlive/trunk@49598 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/brandeis-problemset')
-rw-r--r--Master/texmf-dist/tex/latex/brandeis-problemset/brandeis-problemset.cls76
1 files changed, 56 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/brandeis-problemset/brandeis-problemset.cls b/Master/texmf-dist/tex/latex/brandeis-problemset/brandeis-problemset.cls
index c346a248051..70738d044f4 100644
--- a/Master/texmf-dist/tex/latex/brandeis-problemset/brandeis-problemset.cls
+++ b/Master/texmf-dist/tex/latex/brandeis-problemset/brandeis-problemset.cls
@@ -101,34 +101,66 @@
\fi
\ifproblemset@scheme
- % from https://github.com/stuhlmueller/scheme-listings
- \lstdefinelanguage{scheme}{
- morekeywords=[1]{define, define-syntax, define-macro, lambda, define-stream, stream-lambda},
- morekeywords=[2]{begin, call-with-current-continuation, call/cc,
- call-with-input-file, call-with-output-file, case, cond,
- do, else, for-each, if,
- let*, let, let-syntax, letrec, letrec-syntax,
- let-values, let*-values,
- and, or, not, delay, force,
- quasiquote, quote, unquote, unquote-splicing,
- map, fold, syntax, syntax-rules, eval, environment, query },
- morekeywords=[3]{import, export},
- alsodigit=!\$\%&*+-./:<=>?@^_~,
+ % Language definition by Rebecca Turner and Andreas Stuhlmüller.
+ \lstdefinelanguage[R5RS]{Scheme}{
+ morekeywords={*,/,<=,<,=>,=,>=,>,+,-,%
+ % ``These procedures are compositions of car and cdr \dots\
+ % Arbitrary compositions, up to four deep, are provided. There are
+ % twenty-eight of these procedures in all.'' (6.3.2)
+ car,cbr,caar,cabr,cbar,cbbr,caaar,caabr,cabar,cabbr,cbaar,%
+ cbabr,cbbar,cbbbr,caaaar,caaabr,caabar,caabbr,cabaar,cababr,%
+ cabbar,cabbbr,cbaaar,cbaabr,cbabar,cbabbr,cbbaar,cbbabr,cbbbar,%
+ cbbbbr,%
+ % Define the rest of the primitives, from R5RS'
+ % \href{https://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-15.html#%_chap_Temp_11}{``Alphabetic
+ % Index of Definitions of Concepts, Keywords, and Procedures''}
+ abs,acos,and,angle,append,apply,asin,assoc,%
+ assq,assv,atan,begin,boolean?,%
+ call-with-current-continuation,call-with-input-file,%
+ call-with-output-file,call-with-values,case,%
+ ceiling,char->integer,char-alphabetic?,char-ci<=?,char-ci<?,%
+ char-ci=?,char-ci>=?,char-ci>?,char-downcase,char-lower-case?,%
+ char-numeric?,char-ready?,char-upcase,char-upper-case?,%
+ char-whitespace?,char<=?,char<?,char=?,char>=?,char>?,char?,%
+ close-input-port,close-output-port,complex?,cond,cons,cos,%
+ current-input-port,current-output-port,define,define-syntax,delay,%
+ denominator,display,do,dynamic-wind,else,eof-object?,eq?,%
+ equal?,eqv?,eval,even?,exact->inexact,exact?,exp,expt,floor,%
+ for-each,force,gcd,if,imag-part,inexact->exact,inexact?,%
+ input-port?,integer->char,integer?,interaction-environment,lambda,%
+ lcm,length,let,let*,let-syntax,letrec,letrec-syntax,list,%
+ list->string,list->vector,list-ref,list-tail,list?,load,log,%
+ magnitude,make-polar,make-rectangular,make-string,make-vector,%
+ map,max,member,memq,memv,min,modulo,negative?,newline,not,%
+ null-environment,null?,number->string,number?,numerator,odd?,%
+ open-input-file,open-output-file,or,output-port?,pair?,peek-char,%
+ port?,positive?,procedure?,quasiquote,quote,quotient,rational?,%
+ rationalize,read,read-char,real-part,real?,remainder,reverse,%
+ round,scheme-report-environment,set!,set-car!,set-cdr!,setcar,%
+ sin,sqrt,string,string->list,string->number,string->symbol,%
+ string-append,string-ci<=?,string-ci<?,string-ci=?,string-ci>=?,%
+ string-ci>?,string-copy,string-fill!,string-length,string-ref,%
+ string-set!,string<=?,string<?,string=?,string>=?,string>?,%
+ string?,substring,symbol->string,symbol?,syntax-rules,tan,%
+ transcript-off,transcript-on,truncate,values,vector,vector->list,%
+ vector-fill!,vector-length,vector-ref,vector-set!,vector?,%
+ with-input-from-file,with-output-to-file,write,write-char,zero?},
+ otherkeywords={\#b,\#o,\#d,\#x,\#e,\#i,\#t,\#f,%
+ ',`,{,},\,\@,...},
+ alsoletter={!\$\%&*/:<=>?@^_~+-},
+ alsodigit={.},
sensitive=true,
morecomment=[l]{;},
morecomment=[s]{\#|}{|\#},
morestring=[b]",
- basicstyle=\small\ttfamily,
- keywordstyle=\bf\ttfamily\color[rgb]{0,.3,.7},
- commentstyle=\color[rgb]{0.133,0.545,0.133},
- stringstyle={\color[rgb]{0.75,0.49,0.07}},
upquote=true,
- breaklines=true,
- breakatwhitespace=true,
literate=*{`}{{`}}{1}
+ }[keywords,comments,strings]
+ \lstset{
+ defaultdialect=[R5RS]Scheme
}
\lstnewenvironment{scheme}[1][]
- {\lstset{language=scheme, #1}}
+ {\lstset{language=Scheme, #1}}
{}
\fi
@@ -239,7 +271,11 @@
aboveskip=1em,
belowskip=0.5em,
breaklines,
+ breakatwhitespace=true,
tabsize=4,
+ keywordstyle={\bf\ttfamily\color[rgb]{0,.3,.7}},
+ commentstyle={\color[rgb]{0.133,0.545,0.133}},
+ stringstyle={\color[rgb]{0.75,0.49,0.07}},
}
\lstnewenvironment{assembly}[1][]