| 
									
										
										
										
											2019-02-24 14:23:28 +01:00
										 |  |  | \NeedsTeXFormat{LaTeX2e}[1995/12/01] | 
					
						
							|  |  |  | \ProvidesPackage{yslistings} | 
					
						
							|  |  |  | \RequirePackage{listings} | 
					
						
							|  |  |  | \RequirePackage{lstautogobble} | 
					
						
							|  |  |  | \RequirePackage{fontawesome} | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | \newbox\codebreakbox | 
					
						
							|  |  |  | \setbox\codebreakbox=\hbox{\textcolor[gray]{.75}{\scriptsize\upshape\faChevronCircleRight}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \lstset{upquote=true,basicstyle=\ttfamily\NoAutoSpacing, keepspaces=true,  columns=fullflexible, showstringspaces=false, commentstyle=\slshape, mathescape=true, stepnumber = 1, numberstyle=\scriptsize, numbersep=10pt, firstnumber=auto, breaklines=true, breakatwhitespace=true, prebreak={\copy\codebreakbox}, postbreak={\copy\codebreakbox}, autogobble, includerangemarker=false} | 
					
						
							|  |  |  | \lstset{literate= | 
					
						
							|  |  |  |   {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 | 
					
						
							|  |  |  |   {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1 | 
					
						
							|  |  |  |   {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1 | 
					
						
							|  |  |  |   {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1 | 
					
						
							|  |  |  |   {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 | 
					
						
							|  |  |  |   {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 | 
					
						
							|  |  |  |   {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1 | 
					
						
							|  |  |  |   {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1 | 
					
						
							|  |  |  |   {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 | 
					
						
							|  |  |  |   {ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1 | 
					
						
							|  |  |  |   {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1 | 
					
						
							|  |  |  |   {€}{{\euro}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1 | 
					
						
							|  |  |  |   {»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2019-08-11 18:20:10 +02:00
										 |  |  | \lstdefinestyle{numbers}{numbers = left, xleftmargin=2em} | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | \lstdefinestyle{nonumbers}{numbers = none} | 
					
						
							|  |  |  | \let\nm\| | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \lstdefinelanguage{mybash}[]{bash} | 
					
						
							|  |  |  | { morekeywords={ls, stat}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \lstdefinelanguage{mysql}[]{sql} | 
					
						
							| 
									
										
										
										
											2019-03-26 10:52:12 +01:00
										 |  |  | { } | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-15 13:37:44 +02:00
										 |  |  | %% 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"""}{"""}% | 
					
						
							|  |  |  | }% | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-03 10:35:42 +02:00
										 |  |  | \lstdefinelanguage{mycaml}[Objective]{caml} | 
					
						
							|  |  |  | { morekeywords={raise}} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-15 13:37:44 +02:00
										 |  |  | \def\|{\lstinline[language=Python3, name=inlinepython]|} %| | 
					
						
							| 
									
										
										
										
											2018-09-03 10:35:42 +02:00
										 |  |  | \def\°{\lstinline[language={mycaml}, name=inlinecaml]°} %° | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | \def\§{\lstinline[language=mysql, name=inlinesql]§} %§ | 
					
						
							|  |  |  | \def\>{\lstinline[language=mybash, name=inlineshell]>} %> | 
					
						
							| 
									
										
										
										
											2019-01-31 23:16:54 +01:00
										 |  |  | \def\£{\lstinline[language={[x86masm]Assembler}]£} %£ | 
					
						
							| 
									
										
										
										
											2019-08-15 13:37:44 +02:00
										 |  |  | \lstnewenvironment{lstpython}[1][]{\leavevmode\lstset{language=Python3, frame=single, frameround=tttt, #1}}{} | 
					
						
							| 
									
										
										
										
											2018-09-03 10:35:42 +02:00
										 |  |  | \lstnewenvironment{lstcaml}[1][]{\leavevmode\lstset{language=mycaml, frame=single, frameround=tttt, #1}}{} | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | \lstnewenvironment{lstsql}[1][]{\leavevmode\lstset{language=mysql, frame=single, frameround=tttt, #1}}{} | 
					
						
							|  |  |  | \lstnewenvironment{lstshell}[1][]{\leavevmode\lstset{language=mybash, frame=single, frameround=tttt, #1}}{} | 
					
						
							| 
									
										
										
										
											2018-09-03 10:35:42 +02:00
										 |  |  | \newcommand\lstinputcaml[1][]{\leavevmode\lstinputlisting[language={mycaml}, frame=single, frameround=tttt, rangeprefix=(***\ , rangesuffix=\ ***), #1]} | 
					
						
							| 
									
										
										
										
											2019-08-15 13:37:44 +02:00
										 |  |  | \newcommand\lstinputpython[1][]{\leavevmode\lstinputlisting[language={Python3}, frame=single, frameround=tttt, rangeprefix=\#\#\#\ , rangesuffix=\ \#\#\#, #1]} | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | \newcommand\lstinputsql[1][]{\leavevmode\lstinputlisting[language={mysql}, frame=single, frameround=tttt, rangeprefix=---\ , rangesuffix=\ ---, #1]} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \lstdefinelanguage{algorithme}{% | 
					
						
							|  |  |  |   morekeywords={Si, alors, TantQue, faire, PourChaque, FinSi, FinPour, FinTantQue, Fonction, Renvoyer, Sinon}, | 
					
						
							|  |  |  |   sensitive=true, | 
					
						
							|  |  |  |   morestring=[b]", | 
					
						
							| 
									
										
										
										
											2019-01-28 14:35:08 +01:00
										 |  |  |   morecomment=[s]{/*}{*/}, | 
					
						
							|  |  |  |   literate=*{:=}{{\hbox{\textbf{prend la valeur de}}}}{18}{Créer}{{\hbox{\textbf{Créer}}}}{5}{Définir}{{\hbox{\textbf{Définir}}}}{7}{<-result->}{{\hbox{\textbf{Le résultat est}}}}{15} | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | } | 
					
						
							|  |  |  | \lstnewenvironment{lstalgo}[1][]{\leavevmode\lstset{columns=fullflexible, basicstyle=\rmfamily\NoAutoSpacing, language=algorithme, frame=single, frameround=tttt, #1}}{} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-03 10:35:54 +02:00
										 |  |  | \newbox\hoareboxB | 
					
						
							|  |  |  | \newbox\hoareboxC | 
					
						
							|  |  |  | \newbox\hoareboxA | 
					
						
							|  |  |  | %\newenvironment{trhoare}[2]{\setbox\hoarebox=\hbox\begingroup\begin{lstpython}[frame=none, basicstyle=\ttfamily\scriptsize] | 
					
						
							|  |  |  | %}{\end{lstpython}\endgroup}\left\{#1\vphantom{\copy\hoarebox}\right\}\quad\copy\hoarebox\quad\left\{\vphantom{\copy\hoarebox}#3\right\}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | %\long\def\trhoare#1\trhcode{\setbox\hoareboxB=\hbox{#1}} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-21 19:12:43 +01:00
										 |  |  | \endinput |