Update yslistings.sty
Cette révision appartient à :
@@ -33,23 +33,56 @@
|
||||
\lstdefinelanguage{mysql}[]{sql}
|
||||
{ }
|
||||
|
||||
\lstdefinelanguage{mypython}[]{python}
|
||||
{ morekeywords={yield, as}}
|
||||
%% Python definition (c) 1998 Michael Weber
|
||||
%% Additional definitions (2013) Alexis Dimitriadis
|
||||
%%
|
||||
\lstdefinelanguage{Python3}{%
|
||||
morekeywords={access, and, as, async, break, class, continue, def, del, elif, else,%
|
||||
except, exec, finally, for, from, global, if, import, in, is, lambda,%
|
||||
nonlocal, not, or, pass, raise, return, try, while, yield},%
|
||||
% Built-ins
|
||||
morekeywords=[2]{abs, all, any, basestring, bin, bool, bytearray,%
|
||||
callable, chr, classmethod, cmp, compile, complex, delattr, dict, dir,%
|
||||
divmod, enumerate, eval, execfile, file, filter, float, format,%
|
||||
frozenset, getattr, globals, hasattr, hash, help, hex, id, input, int,%
|
||||
isinstance, issubclass, iter, len, list, locals, long, map, max,%
|
||||
memoryview, min, next, object, oct, open, ord, pow, property, range,%
|
||||
input, reduce, reload, repr, reversed, round, set, setattr, slice,%
|
||||
sorted, staticmethod, str, sum, super, tuple, type, unichr, unicode,%
|
||||
vars, zip, apply, buffer, coerce, intern, print},%
|
||||
keywordstyle=[2]{\relax},
|
||||
sensitive=true,%
|
||||
morecomment=[l]\#,%
|
||||
morestring=[b]',%
|
||||
morestring=[b]",%
|
||||
morecomment=[s]{'''}{'''},% used for documentation text
|
||||
% (mulitiline strings)
|
||||
morecomment=[s]{"""}{"""},% added by Philipp Matthias Hahn
|
||||
morestring=[s]{r'}{'},% `raw' strings
|
||||
morestring=[s]{r"}{"},%
|
||||
morestring=[s]{r'''}{'''},%
|
||||
morestring=[s]{r"""}{"""},%
|
||||
morestring=[s]{u'}{'},% unicode strings
|
||||
morestring=[s]{u"}{"},%
|
||||
morestring=[s]{u'''}{'''},%
|
||||
morestring=[s]{u"""}{"""}%
|
||||
}%
|
||||
|
||||
|
||||
\lstdefinelanguage{mycaml}[Objective]{caml}
|
||||
{ morekeywords={raise}}
|
||||
|
||||
\def\|{\lstinline[language=mypython, name=inlinepython]|} %|
|
||||
\def\|{\lstinline[language=Python3, name=inlinepython]|} %|
|
||||
\def\°{\lstinline[language={mycaml}, name=inlinecaml]°} %°
|
||||
\def\§{\lstinline[language=mysql, name=inlinesql]§} %§
|
||||
\def\>{\lstinline[language=mybash, name=inlineshell]>} %>
|
||||
\def\£{\lstinline[language={[x86masm]Assembler}]£} %£
|
||||
\lstnewenvironment{lstpython}[1][]{\leavevmode\lstset{language=mypython, frame=single, frameround=tttt, #1}}{}
|
||||
\lstnewenvironment{lstpython}[1][]{\leavevmode\lstset{language=Python3, frame=single, frameround=tttt, #1}}{}
|
||||
\lstnewenvironment{lstcaml}[1][]{\leavevmode\lstset{language=mycaml, frame=single, frameround=tttt, #1}}{}
|
||||
\lstnewenvironment{lstsql}[1][]{\leavevmode\lstset{language=mysql, frame=single, frameround=tttt, #1}}{}
|
||||
\lstnewenvironment{lstshell}[1][]{\leavevmode\lstset{language=mybash, frame=single, frameround=tttt, #1}}{}
|
||||
\newcommand\lstinputcaml[1][]{\leavevmode\lstinputlisting[language={mycaml}, frame=single, frameround=tttt, rangeprefix=(***\ , rangesuffix=\ ***), #1]}
|
||||
\newcommand\lstinputpython[1][]{\leavevmode\lstinputlisting[language={mypython}, frame=single, frameround=tttt, rangeprefix=\#\#\#\ , rangesuffix=\ \#\#\#, #1]}
|
||||
\newcommand\lstinputpython[1][]{\leavevmode\lstinputlisting[language={Python3}, frame=single, frameround=tttt, rangeprefix=\#\#\#\ , rangesuffix=\ \#\#\#, #1]}
|
||||
\newcommand\lstinputsql[1][]{\leavevmode\lstinputlisting[language={mysql}, frame=single, frameround=tttt, rangeprefix=---\ , rangesuffix=\ ---, #1]}
|
||||
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur