%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% One big LaTeX template to : %% * import all packages, %% * define many macros (from many other files), %% %% It is designed to make articles %% (\documentclass[french, a4paper, 10pt]{article}) %% and Beamer slides (with naereenbeamer.sty) %% %% by Lilian Besson, (C) 2014 - v1.9 2014/11/12 %% http://lbesson.bitbucket.org/ %% mailto:Lilian.BESSON[@]ens-cachan[.]fr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Permission is granted to freely use, copy, and distribute %% without restriction. Permission is also granted to distribute %% modified versions and incorporate into your own macro packages %% if a brief acknowledgement is given. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{naereen}[2014/11/12 v1.9 Naereen Package] \message{} %% %% Packages %% -------- %% hyperref, multicol, fancyhdr, geometry are NOT imported. %% do it your self in your .tex AFTER \usepackage{naereen} \RequirePackageWithOptions{babel} %\usepackage[french]{babel} %\usepackage[english]{babel} %\usepackage{babel} %% Well understand input, and nice output \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[T1]{fontenc} %% NEW: a small hack. %% If Using French \@ifpackagewith{babel}{french}{ %% Extra stuff to do if naereen was loaded with the French option %\frenchspacing{} %% Else }{ %% Extra stuff to do otherwise (English option or none) %\newcommand{\sub}[1]{\textsubscript{#1}} %\newcommand{\up}[1]{\textsuperscript{#1}} %% EndIf } % For japanese, see http://tex.stackexchange.com/questions/15516/how-to-write-japanese-with-latex % Starts a japanese paragraph with "\begin{CJK}{UTF8}{min}" and ends it with "\end{CJK}" %\usepackage{CJKutf8} % For better french support \usepackage{textcomp} % From docutils generated .tex files \usepackage{fixltx2e} % LaTeX patches, \textsubscript \usepackage{cmap} % fix search and cut-and-paste in Acrobat \usepackage{ifthen} \usepackage{longtable,ltcaption,array} \setlength{\extrarowheight}{2pt} \newlength{\DUtablewidth} % internal use in tables \usepackage{tabularx} %% AMS maths and others \usepackage{amsmath} %\usepackage[tbtags]{amsmath} \usepackage{amsthm} \usepackage{amsfonts} %% \usepackage{enumerate,amssymb} \usepackage{amssymb} \usepackage{fancyvrb} \usepackage{makeidx} % Use the right quotes (depending of the language of babel) \usepackage[babel=true]{csquotes} %% Colors \usepackage{xcolor} \usepackage{color} %[usenames,dvipsnames,pdftex] \usepackage{float} \usepackage{url} % Allows url with \url{http://truc.machin/ok?r=yes} %% Figures and effects \usepackage{framed} %%\usepackage{subfigure} \usepackage{multicol} \usepackage{wrapfig} \usepackage{lastpage} %% Source code \usepackage{moreverb} \usepackage{listings} %\usepackage{caption} \usepackage[hypcap]{caption} \usepackage{subcaption} %\usepackage[nottoc, notlof, notlot]{tocbibind} %\usepackage[clearempty]{titlesec} \usepackage{ifpdf} % Allows the \ifpdf \fi block %% Effects \usepackage{array} \usepackage{microtype} % Pour le mode BlackBoard généralisé (cf. http://forum.mathematex.net/latex-f6/fonction-indicatrice-et-page-de-garde-t6973.html) \usepackage{bbm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TiKZ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Graphism with TiKZ (add there additional TiKZ libraries) \usepackage{tikz} \usetikzlibrary{shapes, matrix, arrows, decorations.pathmorphing, fadings, shapes.geometric, calc} %% Custom TiKZ macros % \tikzset{every picture/.style={execute at begin picture={ % \shorthandoff{:;!?};} % }} %% Macro qui viennent de Tikz pour l'impatient % Définition des nouvelles options xmin, xmax, ymin, ymax % Valeurs par défaut : -10, 10, -10, 10 \tikzset{ xmin/.store in=\xmin, xmin/.default=-10, xmin=-10, xmax/.store in=\xmax, xmax/.default=10, xmax=10, ymin/.store in=\ymin, ymin/.default=-10, ymin=-10, ymax/.store in=\ymax, ymax/.default=10, ymax=10, } % Commande qui trace la grille entre (xmin,ymin) et (xmax,ymax) \newcommand {\grille} {\draw[help lines] (\xmin,\ymin) grid (\xmax,\ymax);} % Commande \axes \newcommand {\axes} { \draw[->] (\xmin,0) -- (\xmax,0); \draw[->] (0,\ymin) -- (0,\ymax); } % Commande qui limite l’affichage à (xmin,ymin) et (xmax,ymax) \newcommand {\fenetre} {\clip (\xmin,\ymin) rectangle (\xmax,\ymax);} %% Five stars rating macro (Source: http://tex.stackexchange.com/a/11395) \newcommand\scorebig[1]{ \pgfmathsetmacro\pgfxa{#1+1} \tikzstyle{scorestars}=[star, star points=5, star point ratio=2.25, draw, inner sep=0.15em,anchor=outer point 3] \begin{tikzpicture}[baseline] \foreach \i in {1,...,5} { \pgfmathparse{(\i<=#1?"yellow":"gray")} \edef\starcolor{\pgfmathresult} \draw (\i*1.1em, -0.12em) node[name=star\i, scorestars, fill=\starcolor] {}; } \pgfmathparse{(#1>int(#1)?int(#1+1):0} \let\partstar=\pgfmathresult \ifnum\partstar>0 \pgfmathsetmacro\starpart{#1-(int(#1))} \path [clip] ($(star\partstar.outer point 3)!(star\partstar.outer point 2)!(star\partstar.outer point 4)$) rectangle ($(star\partstar.outer point 2 |- star\partstar.outer point 1)!\starpart!(star\partstar.outer point 1 -| star\partstar.outer point 5)$); \fill (\partstar*1.1em, -0.12em) node[scorestars, fill=yellow] {}; \fi,\end{tikzpicture} } \newcommand\score[1]{{\tiny \scorebig{#1}}} %% \usepackage[upright]{fourier} %% Magic! \usepackage{relsize} \usepackage{setspace} %\usepackage[small,compact]{titlesec} %\usepackage{titlesec} \usepackage{stmaryrd} \usepackage{microtype} %% Disables ligatures (like ff or fi printed with special caracters) %\DisableLigatures{encoding = *, family = *} %% Customize lists and enumerates (Source: http://www.xm1math.net/doculatex/listes.html) \usepackage{enumitem} % \usepackage{enumerate} %% FIXME % \usepackage[pdftex]{graphicx} \usepackage{graphicx} %% Include the bibliography in the Tables of Content. FIXME %\usepackage[nottoc, notlof, notlot, numbib]{tocbibind} %% FIXME pf2.sty package by Leslie Lamport (cf. http://research.microsoft.com/en-us/um/people/lamport/latex/pf2.pdf) % \usepackage{pf2} %%%%%%%%%%%%%%%%%%%%%%%%%%% begin mathlig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % mathlig.tex % % (c) 2001 Jules Bean % Permission is granted to freely use, copy, and distribute % without restriction. Permission is also granted to distribute % modified versions and incorporate into your own macro packages % if a brief acknowledgement is given. % % Version 1.0 11 May 2001 % Define 'mathmode' ligatures, as in % %\mathlig{->}{\rightarrow} %\mathlig{<-}{\leftarrow} %\mathlig{<->}{\leftrightarrow} % % Works even if they have common prefixes (takes the longest match, % then backtracks). % % Can be used to create ligatures even if the second % and subsequent characters have weird catcodes, but I don't recommend % it. \count255\catcode`@ \catcode`@=11 \chardef\mathlig@atcode\count255 % Let or def an 'active' version of a token. Thanks to Donald % Arseneau and groups.google.com \def\actively#1#2{\begingroup\uccode`\~=`#2\relax\uppercase{\endgroup#1~}} % Eat the next token, and then pass control to mathlig@next@cmd \def\mathlig@gobble{\afterassignment\mathlig@next@cmd\let\mathlig@next= } % Used to delimit delimited arguments, and ifx tests for emptyness. \def\mathlig@delim{\mathlig@delim} % Some macros to help dealing with 'computed names' (csnames). % Just like def, but first parameter is evaluated as a csname \def\mathlig@defcs#1{\expandafter\def\csname#1\endcsname} % A version of \let \def\mathlig@let@cs#1#2{\expandafter\let\expandafter#1\csname#2\endcsname} % Maintain a 'list' of tokens as a macro which expands to them \def\mathlig@appendcs#1#2{\expandafter\edef\csname#1\endcsname{\csname#1\endcsname#2}} % The main externally visible macro. % Defines '#1' as a 'ligature' to expand to #2 % First uses \mathlig@checklig to make sure that all initial segments of % #1 as set up as ligatures. % Then sets the ligature #1 to expand to #2. \def\mathlig#1#2{\mathlig@checklig#1\mathlig@end\mathlig@defcs{mathlig@back@#1}{#2}\ignorespaces} % All the @check macros should be idempotent: they set up the definitions % only if it hasn't already been done. %Check #1#2 can be a ligature: % Check #1 is math-active. % If not, save the mathcode, set the macros #1 %Now check the suffix tables with \checkrest \def\mathlig@checklig#1#2\mathlig@end{% \expandafter\ifx\csname mathlig@forw@#1\endcsname\relax \expandafter\mathchardef\csname mathlig@back@#1\endcsname=\mathcode`#1% \mathcode`#1"8000\actively\def#1{\csname mathlig@look@#1\endcsname}% \mathlig@dolig#1\mathlig@delim \fi \mathlig@checksuffix#1#2\mathlig@end } %Two-part macro. %Check suffix tables. If #2 is empty, no suffix! %Otherwise, we make sure #2 is a valid suffix for #1, %then recurse for #3 on #1#2 \def\mathlig@checksuffix#1#2\mathlig@end{% \ifx\mathlig@delim#2\mathlig@delim\relax\else\mathlig@checksuffix@{#1}#2\mathlig@end\fi } \def\mathlig@checksuffix@#1#2#3\mathlig@end{% \expandafter\ifx\csname mathlig@forw@#1#2\endcsname\relax\mathlig@dosuffix{#1}{#2}\fi \mathlig@checksuffix{#1#2}#3\mathlig@end } % The do macros should not be called more than once for a given ligature. % Add #2 to the list of valid suffixes for #1 % Then make the ligature for #1#2 one which only backtracks, for now \def\mathlig@dosuffix#1#2{% \mathlig@appendcs{mathlig@toks@#1}{#2}% \mathlig@dolig{#1}{#2}\mathlig@delim } % Setup #1#2 so that ligatures beginning #1#2 work. % Such ligatures will look at what's coming next (in case % of a longer ligature) and, failing that, % backtrack to just #1 \def\mathlig@dolig#1#2\mathlig@delim{% %The look macro just \futurelets what's coming up and %then passes control to forw \mathlig@defcs{mathlig@look@#1#2}{% \mathlig@let@cs\mathlig@next{mathlig@forw@#1#2}\futurelet\mathlig@next@tok\mathlig@next}% %The forw macro uses chck to try all possible suffixes, passing control %either to one of those, or to the back macro \mathlig@defcs{mathlig@forw@#1#2}{% \mathlig@let@cs\mathlig@next{mathlig@back@#1#2}% \mathlig@let@cs\checker{mathlig@chck@#1#2}% \mathlig@let@cs\mathligtoks{mathlig@toks@#1#2}% \expandafter\ifx\expandafter\mathlig@delim\mathligtoks\mathlig@delim\relax\else \expandafter\checker\mathligtoks\mathlig@delim\fi \mathlig@next }% %The toks macro just stores the suffixes \mathlig@defcs{mathlig@toks@#1#2}{}% %The chk macro goes through the suffixes one by one %tail recursing until it runs out, or finds one. \mathlig@defcs{mathlig@chck@#1#2}##1##2\mathlig@delim{% %\message{Lig so far '#1#2', checking for '##1'}% \ifx\mathlig@next@tok##1% \mathlig@let@cs\mathlig@next@cmd{mathlig@look@#1#2##1}\let\mathlig@next\mathlig@gobble \fi \ifx\mathlig@delim##2\mathlig@delim\relax\else \csname mathlig@chck@#1#2\endcsname##2\mathlig@delim \fi }% % % The back macro, defined only if this is a ligature of at least % two characters, is a default fallback: go back to the previous char. % (If this is a ligature of only one character, the mathcode will have % been saved and set as the fallback elsewhere) \ifx\mathlig@delim#2\mathlig@delim\else \mathlig@defcs{mathlig@back@#1#2}{\csname mathlig@back@#1\endcsname #2}% \fi }% \catcode`@\mathlig@atcode %%%%%%%%%%%%%%%%%%%%%%%%%%% end mathlig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Last magic stuff \usepackage{xspace} \usepackage{mathabx} %% Multiple footnote (see http://tex.stackexchange.com/a/58028) \usepackage{scrextend} % \usepackage{cleveref}[2012/02/15]% v0.18.4; % \crefformat{footnote}{#2\footnotemark[#1]#3} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Options. \pagenumbering{arabic} \setcounter{tocdepth}{4} %% Disable if writting not in French. \frenchspacing % BibTeX style (default: alpha) : cf http://nodonn.tipido.net/bibstyle.php \bibliographystyle{alpha} \setlength{\parskip}{0.3\baselineskip} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Define some standard ``theorem'' types. From Paul Taylor's QED.sty \def\DefineStandardTheorems{% % % First set up uniform numbering in LaTeX; % don't use this in plain TeX because this usage of \newcommand is not % supported and we have already done by hand what it would do in LaTeX, % viz to define the macro \theResult and the count \c@Result. \relax\ifx\@@thm\undefined \newtheorem{result}{Result}[section]% % \@addtoreset{Result}{section}% % \ifx\chapter\undefined\else\@addtoreset{result}{chapter}\fi \fi % \let\theUnnumbered\relax\countdef\c@Unnumbered255 \def\p@Unnumbered{}% % % \def\mkthm##1##2{\newtheorem{##1}{##2}[section]}% \def\mkthm##1##2{\newtheorem{##1}{##2}}% % \mkthm{conjecture}{Conjecture}% \mkthm{conjectures}{Conjectures}% \mkthm{convention}{Convention}% \mkthm{conventions}{Conventions}% % \mkthm{corollary}{Corollary}% \mkthm{corollaries}{Corollaries}% \mkthm{counterexample}{Counterexample}% \mkthm{counterexamples}{Counterexamples}% % \mkthm{definition}{Definition}% % \mkthm{definitions}{Definitions}% \mkthm{exampl}{Example}% % \mkthm{lemma}{Lemma}% \mkthm{lemmas}{Lemmas}% \mkthm{demoEn}{Proof}% \mkthm{nb}{NB}% \mkthm{notation}{Notation}% \mkthm{notations}{Notations}% %\mkthm{note}{Note}% \mkthm{proposition}{Proposition}% \mkthm{propositions}{Propositions}% \mkthm{remark}{Remark}% \mkthm{remarks}{Remarks}% % \mkthm{theorem}{Theorem}% \mkthm{theorems}{Theorems}% \mkthm{thesis}{Thesis}% \mkthm{theses}{Theses}% %% Mine, in French. \mkthm{lem}{Lemme}% % \mkthm{rule}{Rule}% % \mkthm{lemr}{Rule}% \mkthm{prop}{Proposition}% \mkthm{theo}{Théorème}% \mkthm{coro}{Corollaire}% \mkthm{demo}{Preuve}% \mkthm{defn}{Définition}% \mkthm{nota}{Notation}% \mkthm{conj}{Conjecture}% \mkthm{remarque}{Remarque}% \mkthm{exmp}{Exemple}% \mkthm{case}{Cas}% \mkthm{mynote}{Note}% \mkthm{conc}{Conclusion}% %% new one my Vijay% % \mkthm{example}{Example}% % \mkthm{question}{Question}% % \mkthm{theorem}{Theorem}% % \mkthm{definition}{Definition}% % \mkthm{problem}{Problem}% } %% To have the enumeration follow from your section or subsection heading, %% you must use the amsmath package or use AMS class documents. Then enter %%\numberwithin{equation}{section} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Code embedding. %% Custom color for code embedding. \definecolor{dkgreen}{rgb}{0,0.4,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82} \lstset{ % backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor} basicstyle=\texttt\small, % the size of the fonts that are used for the code, FIXME \ttfamily breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace breaklines=true, % sets automatic line breaking captionpos=b, % sets the caption-position to bottom commentstyle=\small\color{dkgreen}, % comment style % deletekeywords={...}, % if you want to delete keywords from the given language % escapeinside={\%*}{*)}, % if you want to add LaTeX within your code % extendedchar=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 frame=single, % adds a frame around the code keywordstyle=\small\color{blue}, % keyword style language=python, % the language of the code % if you want to add more keywords to the set % morekeywords={define,domain,objects,init,goal,problem,action,parameters,precondition,effect,types,requirements,strips,typing}, numbers=left, % where to put the line-numbers; possible values are (none, left, right) numbersep=5pt, % how far the line-numbers are from the code numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' showstringspaces=false, % underline spaces within strings only showtabs=false, % show tabs within strings adding particular underscores stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered stringstyle=\small\color{mauve}, % string literal style tabsize=2, % sets default tabsize to 2 spaces prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}}, % pour la fin des lignes. aboveskip={1.5\baselineskip}, %title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title % title=\tiny{File \textcolor{blue}{\url{\lstname}}} % show the filename of files included with \lstinputlisting; also try caption instead of title %% FIXME title ! } \lstset{breaklines=true, basicstyle=\sffamily} %, extendedchars=true %% From https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings#Customizing_captions \DeclareCaptionFont{white}{ \color{white} } \DeclareCaptionFormat{listing}{ \colorbox[cmyk]{0.43, 0.35, 0.35, 0.01}{ \parbox{\textwidth}{\hspace{15pt}#1#2#3} } } \captionsetup[lstlisting]{format=listing, labelfont=white, textfont=white, singlelinecheck=false, font={bf,footnotesize} } %, margin=5pt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% From superquack.sty, and custom commands. \newcommand{\p}[1]{\ensuremath{\mathsf{#1}}} % predicate font \newcommand{\m}[1]{\ensuremath{\mathit{#1}}} % math font \newcommand{\emp}{\p{emp}} %% floats \floatstyle{plain} \newfloat{figure}{tp}{los} \floatname{figure}{Figure} \renewcommand{\topfraction}{0.9} \renewcommand{\bottomfraction}{0.3} \renewcommand{\textfraction}{0.07} \renewcommand{\floatpagefraction}{0.9} \renewcommand{\dblfloatpagefraction}{0.9} \setcounter{topnumber}{2} \setcounter{bottomnumber}{2} \setcounter{totalnumber}{4} % 2 may work better \setcounter{dbltopnumber}{2} % for 2-column pages \renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text % squeeeeeeeeeze \addtolength{\textfloatsep}{-10pt} \addtolength{\dbltextfloatsep}{-10pt} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% common.sty % Write a label above something, e.g. an arrow \newcommand{\stacklabel}[1]{\stackrel{\smash{\scriptscriptstyle #1}}} %% Quantifiers % \newcommand{\E}[1]{\exists #1.\,} % \newcommand{\V}[1]{\forall #1.\,} \newcommand{\E}[0]{\exists} \newcommand{\V}[0]{\forall} %% Sets \newcommand{\N}{\mathbb{N}} \newcommand{\R}{\mathbb{R}} \newcommand{\Rn}{\mathbb{R}^n} \newcommand{\MnR}{\mathbb{M}_n(\mathbb{R})} \newcommand{\C}{\mathbb{C}} \newcommand{\Cn}{\mathbb{C}^n} \newcommand{\MnC}{\mathbb{M}_n(\mathbb{C})} \newcommand{\Mn}[1]{\mathbb{M}_n(#1)} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\D}{\mathbb{D}} \newcommand{\K}{\mathbb{K}} \newcommand{\Pset}{\mathcal P} \renewcommand{\epsilon}{\varepsilon} %% By Vijay \newcommand{\IR}{\mathbb{R}} \newcommand{\IF}{\mathbb{F}} \newcommand{\IQ}{\mathbb{Q}} \newcommand{\IZ}{\mathbb{Z}} \newcommand{\IN}{\mathbb{N}} %%\renewcommand{\mod}{\mathrm{mod }} \newcommand{\dom}{\mathit{dom}} \newcommand{\set}[1]{\ensuremath{\mathsf{#1}}} \newcommand{\form}{\mathsf} \newcommand{\repl}[2]{[#1<-#2]} \newcommand{\exch}[2]{[#1<->#2]} \newcommand{\fv}{\mathit{fv}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Some others macros % Clicable urls (blue, red, green) \newcommand{\urlb}[1]{\textcolor{blue}{\url{#1}}} \newcommand{\urlr}[1]{\textcolor{red}{\url{#1}}} \newcommand{\urlg}[1]{\textcolor{dkgreen}{\url{#1}}} %% To embed code, % \includecode{language}{begin}{end}{uri} % and @uri must be RELATIVE to the .tex \newcommand{\includecode}[4]{\lstinputlisting[title={\small{Extern file \textcolor{blue}{\url{{#4}}} \textit{(lines {#2} to {#3}).}}}, language={#1}, firstline={#2}, lastline={#3}]{#4}} %% To embed code, previously colored with pygmentize % \pygmentize{label}{caption}{file} % and @file must be RELATIVE to the .sty, WITHOUT extension % @file.tex HAVE TO BE PRESENT \newcommand{\pygmentize}[3]{ \begin{figure}[H]\caption{#2}\label{#1} \small{ \input{#3.tex} } \end{figure}} \newcommand{\pygmentizeCustom}[4]{ \begin{figure}[H]\caption{#2}\label{#1} \begin{#4} \input{#3.tex} \end{#4} \end{figure}} \newcommand{\pygmentizeframed}[3]{ \begin{figure}[H]\caption{#2}\label{#1} \begin{framed} \small{ \input{#3.tex} } \end{framed} \end{figure}} %% A demo, ending by a # \newenvironment{demoBox}{\begin{demo} }{ $\Box$ \end{demo}} %% A conclusion, framed \newenvironment{concl}{\begin{framed} \textit{Conclusion}:}{ \end{framed}} %% Some enumerate environments \newenvironment{arab}{\begin{enumerate}[label=(\arabic*)]}{\end{enumerate}} \newenvironment{roma}{\begin{enumerate}[label=(\roman*)]}{\end{enumerate}} \newenvironment{Roma}{\begin{enumerate}[label=(\Roman*)]}{\end{enumerate}} \newenvironment{enumalph}{\begin{enumerate}[label=(\alph*)]}{\end{enumerate}} \newenvironment{enumAlph}{\begin{enumerate}[label=(\Alph*)]}{\end{enumerate}} %% Useful shortcuts. \newcommand{\ssi}{\textbf{ssi}~} \renewcommand{\iff}{\textbf{iff}~} \newcommand{\ie}[0]{\emph{i.e.}~} \newcommand{\ev}[0]{\emph{e.v.}~} \newcommand{\eg}[0]{\emph{e.g.}~} \renewcommand{\it}[1]{\textit{#1}} \renewcommand{\tt}[1]{\texttt{#1}} \renewcommand{\bf}[1]{\textbf{#1}} \renewcommand{\sc}[1]{\textsc{#1}} \newcommand{\un}[1]{\underline{#1}} \newcommand{\todo}[1]{\begin{framed} {\hspace{-1.5em}\color{red} \textbf{TODO} : #1\hspace{-0.5em}} \end{framed}} \usepackage{manfnt} %% Make At Letter part (what does this mean exactly ?) \makeatletter % Faire une commande \danger qui fasse un symbole danger ! FIXME hspace is badly controlled. \def\hang{\hangindent\parindent} \def\d@nger{\medbreak\begingroup\clubpenalty=10000 \def\par{\endgraf\endgroup\medbreak} \noindent\hang\hangafter=-2 \hbox to0pt{\hskip-\hangindent\dbend\hfill}} \outer\def\danger{\d@nger} % Pour mettre du texte en indice, même sans utiliser Babel:French et son \up \DeclareRobustCommand*\textsubscript[1]{% \@textsubscript{\selectfont#1}} \def\@textsubscript#1{% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} % Pour mettre du texte en exposant, même sans utiliser Babel:French et son \up \DeclareRobustCommand*\textsuperscript[1]{% \@textsuperscript{\selectfont#1}} \def\@textsuperscript#1{% {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}} % New exercise (mandatory, can be in the exam, assignement to do for the next tutorial) \newcommand\assignementnoargs{\item (\textbf{To do})~} \newcommand\assignementwithargs[1]{\item (\textbf{To do}, \hspace{-0.75em}\score{#1}\hspace{-0.2em})} \newcommand\assign[1][]{ \ifthenelse{\equal{#1}{}}{ \assignementnoargs{}}{ \assignementwithargs{#1}}} % New exercise (not mandatory, can be in the exam, may be corrected in the next tutorial) \newcommand\exercisenoargs{\item } \newcommand\exercisewithargs[1]{\item (\hspace{-0.75em}\score{#1}\hspace{-0.2em})} \newcommand\exer[1][]{ \ifthenelse{\equal{#1}{}}{ \exercisenoargs{}}{ \exercisewithargs{#1}}} %% New bonus exercise (really not mandatory, probably not in the exam, will not be corrected in the next tutorial) \newcommand\bonusnoargs{\item (\textbf{Bonus})~} \newcommand\bonuswithargs[1]{\item (\textbf{Bonus}, \hspace{-0.75em}\score{#1}\hspace{-0.2em})} \newcommand\bonus[1][]{ \ifthenelse{\equal{#1}{}}{ \bonusnoargs{}}{ \bonuswithargs{#1}}} \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Specialized math shortcuts \newcommand{\exo}[1]{ \section{Part {#1}} } \newcommand{\qu}[1]{ \subsection{Question {#1}} } \newcommand{\sq}[1]{ \subsubsection{{#1}} } \newcommand{\inv}[1]{\frac{1}{#1}} \newcommand{\e}[0]{\mathrm{e}} \newcommand{\dx}[0]{\mathrm{d}x} \newcommand{\dy}[0]{\mathrm{d}y} \newcommand{\dz}[0]{\mathrm{d}z} \newcommand{\dt}[0]{\mathrm{d}t} %% Hyperbolic functions \newcommand{\arccosh}[0]{\mathop{\mathrm{arccosh}}} \newcommand{\arcsinh}[0]{\mathop{\mathrm{arcsinh}}} \newcommand{\arctanh}[0]{\mathop{\mathrm{arctanh}}} %\newcommand{\cosh}{\mathop{\mathrm{\cosh}}} %\newcommand{\sinh}{\mathop{\mathrm{\sinh}}} %\newcommand{\tanh}{\mathop{\mathrm{\arctanh}}} %% Add \limits to sum, limit, product \renewcommand{\lim}[0]{\mathop{\mathrm{lim}}\limits} %% \renewcommand{\sum}[0]{\mathop{\large \Sigma}\limits} %% \renewcommand{\prod}[0]{\mathop{\large \Pi}\limits} \everymath{\displaystyle} \newcommand{\profvijay}[0]{\href{http://www.mahindraecolecentrale.edu.in/vijaysekhar-chellaboina.html}{Prof.~:~ Vijaysekhar~Chellaboina}} \newcommand{\profarya}[0]{\href{http://www.mahindraecolecentrale.edu.in/aryakumar-bhattacharya.html}{Prof.~:~Arya~Kumar~Bhattacharya}} \newcommand{\profsatya}[0]{\href{http://www.mahindraecolecentrale.edu.in/chirala-satyanarayana.html}{Prof.~:~Chirala~Satyanarayana}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% this is like defining stuff after the \begin{document} \AtBeginDocument{ %% changing the name of some titles. % \addto\captionsenglish{% \renewcommand{\contentsname}{Summary}% \renewcommand{\abstractname}{Executive Summary}% \renewcommand{\refname}{Bibliography}% \renewcommand{\listfigurename}{List of figures}% \renewcommand{\listtablename}{List of tables}% % } \addto\captionsfrench{% ref: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords \renewcommand{\contentsname}{Sommaire}% \renewcommand{\abstractname}{Résumé}% \renewcommand{\refname}{Bibliographie}% \renewcommand{\listfigurename}{Liste des figures}% \renewcommand{\listtablename}{Liste des tableaux}% } \DefineStandardTheorems{} % Docutils tables \setlength{\DUtablewidth}{0.85\linewidth} %% ligatures % to be safe, use only characters from the following list: % ` " ' ~ ! ? @ * ( ) [ ] < > - + = | : ; . , / 0 1 2 3 4 5 6 7 8 9 % each lig must be defined after all ligs it prefixes % 3 chars % 2 chars % \mathlig{|,}{\mathbin{\downarrow}} % \mathlig{|'}{\mathbin{\uparrow}} % 1 char WARNING: change standard spacing %% common.sty \mathlig{<==>}{\mathrel{\Longleftrightarrow}} % equivalence \mathlig{--->}{\mathrel{\longrightarrow}} % transitions % 3 chars % \mathlig{::=}{\mathrel{\Coloneqq}} \mathlig{-->}{\mathrel{\rightarrow}} % set function space \mathlig{->>}{\mathrel{\leadsto}} % \leadsto \mathlig{<->}{\mathrel{\leftrightarrow}} \mathlig{-|}{\dashv} \mathlig{--`}{\mathrel{\rightharpoonup}} % partial function \mathlig{===}{\mathrel{\equiv}} % syntactic equality \mathlig{=/=}{\mathrel{\not\equiv}} % not syntactic equality \mathlig{|/-}{\nvdash} % not entailment \mathlig{|/=}{\nvDash} % not forces \mathlig{<=>}{\mathrel{\Leftrightarrow}} % equivalence of expressions \mathlig{==>}{\mathrel{\Rightarrow}} % meta implication \mathlig{|||}{\mathrel{|}} % grammar \mathlig{-|-}{\mathrel{\mathrlap{\dashv} \hspace{5pt} \vdash}} % entails % 2 chars \mathlig{==}{\mathrel{\stackrel{\smash{\scriptscriptstyle\mathrm{def}}}{=}}} \mathlig{/|}{\mathbin{\wedge}} % additive conjunction \mathlig{|/}{\mathbin{\vee}} % additive disjunction \mathlig{/=}{\mathrel{\neq}} % non-equality expression \mathlig{<=}{\leq} % less than or equal expression \mathlig{>=}{\geq} % more than or equal expression \mathlig{|-}{\mathrel{\vdash}} % entails \mathlig{|=}{\vDash} % models \mathlig{|>}{\vartriangleright} \mathlig{<|}{\vartriangleleft} \mathlig{[|}{\llbracket} % open double bracket \mathlig{|]}{\rrbracket} % close double bracket \mathlig{->}{\mathord{\rightarrow}} % field dereference \mathlig{<-}{\mathord{\leftarrow}} % assignement %% seplog.sty \mathlig{--*}{\mathrel{\magicwand}} \mathlig{--o}{\mathrel{\septraction}} \mathlig{|->}{\mathrel{\mapsto}} % tight points-to \mathlig{||-}{\mathbin{\Vdash}} \mathlig{**}{\mathbin{\ocon}} %\mathlig{*}{\mathbin{\scon}} %% maths one (new!) \mathlig{||}{\|} \mathlig{..}{\dots} \mathlig{oo}{\infty} } %% BEGIN of docutils.sty % providelength (provide a length variable and set default, if it is new) \providecommand*{\DUprovidelength}[2]{ \ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{} } % docinfo (width of docinfo table) \DUprovidelength{\DUdocinfowidth}{0.9\textwidth} % fieldlist environment \ifthenelse{\isundefined{\DUfieldlist}}{ \newenvironment{DUfieldlist}% {\quote\description} {\enddescription\endquote} }{} % transition (break, fancybreak, anonymous section) \providecommand*{\DUtransition}[1][class-arg]{% \hspace*{\fill}\hrulefill\hspace*{\fill} \vskip 0.5\baselineskip } %% Horizontal Lines \providecommand*{\hline}[1][class-arg]{% \hspace*{\fill}\hrulefill\hspace*{\fill} \vskip 0.5\baselineskip } %% END of docutils.sty %% END of naereen.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%