Skip to content
Snippets Groups Projects
Commit 5369a682 authored by Olivier Cots's avatar Olivier Cots
Browse files

foo

parent 28246a61
No related branches found
No related tags found
No related merge requests found
%
% Auteur : Olivier Cots
% Date : 17 avril 2019
%
% macros latex
%
%---------------------------------------------------------------------------------------------------------------
% Repertoire contenant les videos
\def\repVideos{Videos/}
%\def\repVideos{./}
%---------------------------------------------------------------------------------------------------------------
% Mise en valeur
%\newcommand{\myemph}[1]{\emph{\textbf{#1}}} % remplace \emph
%\newcommand{\empha}[1]{\textbf{\textcolor{blue}{#1}}}
%\newcommand{\emphb}[1]{\textcolor{red}{#1}}
\newcommand{\cblue}[1]{{\color{blue} #1}}
\newcommand{\cred}[1]{{\color{red} #1}}
\newcommand{\cgreen}[1]{{\color{green} #1}}
\newcommand{\crose}[1]{{\color{rose} #1}}
\newcommand{\clink}[1]{{\color{linkcol} #1}}
\def\emphb{\cblue}
\def\emphr{\cred}
\def\emphg{\cgreen}
\def\emphp{\crose}
\def\emphl{\clink}
%
\newcommand{\myemph}[1]{\textbf{\textcolor{blue}{#1}}}
% Cross mark and check mark
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
% item
%\newcommand{\newpoint}{{\scriptsize\emphb{\raisebox{1.3pt}{$\blacktriangleright$}~}}}
\newcommand{\newpoint}{\emphb{\raisebox{0pt}{\textbullet}~}}
\newcommand{\retourligne}{~\\ \vspace{-\baselineskip}}
\ifSLIDES
%---------------------------------------------------------------------------------------------------------------
%---------------------------------------------------------------------------------------------------------------
% Beamer
%---------------------------------------------------------------------------------------------------------------
% Bullets
\newcommand{\myitem}[1]{\vfill #1}
\newcommand{\myitembullet}{{\small \textbullet} }
\newcommand{\myitembulletindent}{\vfill \hspace{1em} {\small \textbullet} \hspace{0.1em} }
\newcommand{\myitemtiret} {\hspace{1em} -- }
\newcommand{\myitemtiretnoi} {\vfill -- }
\fi
%---------------------------------------------------------------------------------------------------------------
% Commande pour creer un nouveau slide
% Couleur cfond doit etre definie
% myframe beamer
%\makeatletter
\def\colorbeamerheading{cfondtitre}
\newcommand{\setcolorbeamerheading}[1]{
\def\colorbeamerheading{#1}
}
\newenvironment{myframe}[2][]
{
\ifx\relax#1\relax%
\else
\def\colorbeamerheading{#1} % ce ne change que localement
\fi
\begin{frame}%
\begin{minipage}{0.9\textwidth}
\large \color{\colorbeamerheading}\textsc{#2}
\end{minipage}
\hfill%
\begin{minipage}{0.04\textwidth}
\begin{flushright}
\compteurPage[\colorbeamerheading]
\end{flushright}
\end{minipage}
\vspace{-2pt}
{\color{\colorbeamerheading}\noi\rule{\textwidth}{0.1em}}%
}
{%
\end{frame}
}
%\makeatother
%\def\sizefontslide{\normalsize}
%\newcommand{\myframeold}[2][cfond]{
% \addtocounter{pages}{1}
% \vfill\null\end{slide}\\
% \begin{slide}
% \hskip -.02\paperwidth
% %\MyColorBox[#1]{
% \begin{minipage}{1.0\paperwidth}
% \vspace{1em}
% \begin{minipage}{0.9\paperwidth}
% \hspace{0.24in} \large \color{#1}\textsc{#2}
% \end{minipage}
% \hfill
% \begin{minipage}{0.09\paperwidth}
% \compteurPage[#1]
% \end{minipage}
%
% {\color{#1}\noi\rule{\linewidth}{0.2em}}
% \end{minipage}
% %}
% \vspace{0.1in}\sizefontslide
%}
%%\newcommand{\newslide}{\frame}
\newcommand{\frameNoTitle}{
\addtocounter{pages}{1}
\vfill\null\end{slide}\\
\begin{slide}
\hskip -.02\paperwidth
\vspace{0.1in}\sizefontslide
}
%---------------------------------------------------------------------------------------------------------------
% Softwares, etc
\newcommand{\vrb}[1]{\texttt{#1}}
\newcommand{\cmd}[1]{\texttt{#1}}
\newcommand{\lib}[1]{\texttt{#1}}
\def\hampath{\lib{HamPath}}
\def\bocop{\lib{Bocop}}
\newcommand{\matlab}{\lib{Matlab}}
\newcommand{\octave}{\lib{Octave}}
\newcommand{\fortran}{\lib{Fortran}}
\newcommand{\python}{\lib{Python}}
\newcommand{\interface}{\lib{Interface}}
\newcommand\tapenade{\lib{TAPENADE}}
%---------------------------------------------------------------------------------------------------------------
%---------------------------------------------------------------------------------------------------------------
% Homepage
%\newcommand{\homepage}{http://cots.perso.enseeiht.fr}
%\newcommand{\resources}{\homepage/resources}
%---------------------------------------------------------------------------------------------------------------
% Misc
\newcommand{\noi}{\noindent}
\newcommand{\HRule}{\noi\rule{\linewidth}{0.3mm}}
%---------------------------------------------------------------------------------------------------------------
% Tag a gauche ou a droite : utile pour la numerotation des equations
\makeatletter
\newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno}
\newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno}
\makeatother
%---------------------------------------------------------------------------------------------------------------
% Litteraire
\newcommand\ie{\textit{i.e. }}
\newcommand\cf{{cf. }}
%---------------------------------------------------------------------------------------------------------------
% Notes personnelles : ne sont visibles que si \VIEWALLtrue est present dans le main
\newcommand{\notePerso}[1]{\ifVIEWALL{ {\color{green} NotePerso~:~#1} }\else\fi}
\newcommand{\noteInMarge}[1]{\ifVIEWALL{ \marginpar{{\color{red} #1}} }\else\fi} % Pour avoir des notes dans la marge
\newcommand{\todo}[1]{\ifVIEWALL{\noindent {\color{red} \it TODO!!! #1}~\\}\else\fi} % Pour ecrire des todoliste
%---------------------------------------------------------------------------------------------------------------
% Remplace la commande ``bar'' par ``xoverline''
%
\makeatletter
\newsavebox\myboxA
\newsavebox\myboxB
\newlength\mylenA
\newcommand*\xoverline[2][0.75]{%
\sbox{\myboxA}{$\m@th#2$}%
\setbox\myboxB\null% Phantom box
\ht\myboxB=\ht\myboxA%
\dp\myboxB=\dp\myboxA%
\wd\myboxB=#1\wd\myboxA% Scale phantom
\sbox\myboxB{$\m@th\overline{\copy\myboxB}$}% Overlined phantom
\setlength\mylenA{\the\wd\myboxA}% calc width diff
\addtolength\mylenA{-\the\wd\myboxB}%
\ifdim\wd\myboxB<\wd\myboxA%
\rlap{\hskip 0.5\mylenA\usebox\myboxB}{\usebox\myboxA}%
\else
\hskip -0.5\mylenA\rlap{\usebox\myboxA}{\hskip 0.5\mylenA\usebox\myboxB}%
\fi}
\makeatother
%---------------------------------------------------------------------------------------------------------------
% Les dessins
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]
\makeatletter
\newcommand{\gettikzxy}[3]{%
\tikz@scan@one@point\pgfutil@firstofone#1\relax
\edef#2{\the\pgf@x}%
\edef#3{\the\pgf@y}%
}
\makeatother
% Définition des nouvelles options xmin, xmax, ymin, ymax
% Valeurs par défaut : -3, 3, -3, 3
\tikzset{
xmin/.store in=\xmin, xmin/.default=-3, xmin=-3,
xmax/.store in=\xmax, xmax/.default=3, xmax=3,
ymin/.store in=\ymin, ymin/.default=-3, ymin=-3,
ymax/.store in=\ymax, ymax/.default=3, ymax=3,
}
% 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}[2] {
\draw[->,gray] (\xmin,0) -- (\xmax,0);
\draw[->,gray] (0,\ymin) -- (0,\ymax);
\draw (\xmax,0) node[below]{#1};
\draw (0,\ymax) node[left]{#2};
}
\newcommand {\axesDown}[2] {
\draw[->,gray] (\xmin,0) -- (\xmax,0);
\draw[->,gray] (0,\ymax) -- (0,\ymin);
\draw (\xmax,0) node[below]{#1};
\draw (0,\ymin) node[left]{#2};
}
% Commande qui limite l’affichage à (xmin,ymin) et (xmax,ymax)
\newcommand {\fenetre}
{\clip (\xmin,\ymin) rectangle (\xmax,\ymax);}
%---------------------------------------------------------------------------------------------------------------
% Les tableaux
\newcolumntype{C}[1]{>{\centering}p{#1}}
\newcolumntype{L}[1]{>{\raggedright}p{#1}}
\newcommand\Tstrut{\rule{0pt}{2.6ex}} % = `top' strut
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}} % = `bottom' strut
% Tableau : epaisseur des lignes
\newcommand{\smallhrule}{\specialrule{0.02em}{0.25em}{0.25em}}
\newcommand{\medhrule}{\specialrule{0.05em}{0.3em}{0.3em}}
\newcommand{\bighrule}{\specialrule{0.1em}{0.3em}{0.5em}}
%---------------------------------------------------------------------------------------------------------------
% Math
% indicatrice
\newcommand{\ind}{\mathds{1}}
% Fonction
\newcommand{\fonction}[5]{
\begin{array}{rcll}
#1 \colon & #2 & \longrightarrow & #3 \\
& #4 & \longmapsto & #5
\end{array}
}
% Elements differentiels
%\newcommand{\diff}{\mathop{}\mathopen{}\mathrm{d}}
\newcommand{\xDif}{{\rm D}}
\newcommand{\xdif}{\,{\rm d}}
\newcommand{\diff}{\xdif}
\newcommand{\Diff}{\xDif}
\newcommand{\pardiff}{{\rm \partial}}
\DeclareMathOperator{\dd}{d}
% Solutions
\newcommand\rsol{\bar{r}}
\newcommand\lsol{\bar{\lambda}}
\newcommand\fsol{\bar{f}}
\newcommand\ssol{\bar{s}}
\newcommand\xsol{\bar{x}}
\newcommand\ysol{\bar{y}}
\newcommand\usol{\bar{u}}
\newcommand\zsol{\bar{z}}
\newcommand\psol{\bar{p}}
\newcommand\tfsol{\bar{t}_f}
\newcommand\tsol{\bar{t}\hspace{0.1em}}
% Notion ensembliste
\newcommand{\adherence}[1]{\xoverline{#1}}
% Les ensembles
\newcommand{\Ball}{{B}} % Boule ouverte
\newcommand{\BallClosed}{\xoverline{B}} % Boule fermee
\newcommand{\M}{\mbox{$\mathbf{M}$}\xspace}
\newcommand{\U}{U}
\newcommand{\X}{X}
\newcommand{\B}{\mathcal{B}}
\newcommand{\E}{\mathcal{E}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\D}{\mathcal{D}}
\renewcommand{\O}{\mathcal{O}}
\renewcommand{\P}{\mathcal{P}}
\newcommand{\Htrue}{\mathcal{H}}
\newcommand{\GLcal}{\mathcal{GL}}
\newcommand{\Ecal}{\mathcal{E}}
\newcommand{\Kcal}{\mathcal{K}}
\newcommand{\Ccal}{\mathcal{C}}
\newcommand{\Fcal}{\mathcal{F}}
\newcommand{\Ncal}{\mathcal{N}}
\newcommand{\Lcal}{\mathcal{L}}
\newcommand{\Dcal}{\mathcal{D}}
\newcommand{\Ucal}{\mathcal{U}}
\newcommand{\Vcal}{\mathcal{V}}
\newcommand{\Ical}{\mathcal{I}}
\newcommand{\Acal}{\mathcal{A}}
\newcommand{\Sgot}{\mathfrak{S}} % pour d\'esigner le groupe des permutations ou groupe sym\'etrique
\newcommand{\xLn}[1]{{\Lcal}^{#1}} % Ensemble des applications lineaires continue
\newcommand{\xCn}[1]{{\Ccal}^{#1}} % Ensemble des applications de classe C^k
% Pour le cours de mesure et integration
\newcommand{\Bor}{\mathcal{B}}
\newcommand{\AT}{\mathcal{A}}
\newcommand{\BT}{\mathcal{B}}
\newcommand{\NT}{\mathcal{N}}
\newcommand{\CT}{\mathcal{C}}
\newcommand{\OT}{\mathcal{O}}
\newcommand{\FT}{\mathcal{F}}
\newcommand{\Parties}{\mathcal{P}}
\newcommand{\tribu}{\sigma}
\DeclareMathOperator{\card}{card}
\newcommand{\FM}{\mathcal{M}} % fonction mesurable
\newcommand{\FE}{\mathcal{E}} % fonction mesurable étagée
%\newcommand{\FM}{\mathcal{F}} % fonction mesurable
%\newcommand{\FE}{\mathcal{F}^0} % fonction mesurable étagée
\newcommand{\cl}[1]{[#1]} % ou overline
\newcommand*{\EnsembleQuotient}[2]%
{\ensuremath{%
#1\hspace{1pt}\!/\!\hspace{1pt}\raisebox{-.0ex}{\ensuremath{\mathcal{#2}}}}}
% Intervalles
\newcommand{\intervalle}[4]{\mathopen{#1}#2
\mathclose{}\mathpunct{},#3
\mathclose{#4}}
\newcommand{\intervalleff}[2]{\intervalle{[}{#1}{#2}{]}}
\newcommand{\intervalleof}[2]{\intervalle{]}{#1}{#2}{]}}
%\newcommand{\intervalleof}[2]{\intervalle{(}{#1}{#2}{]}}
\newcommand{\intervallefo}[2]{\intervalle{[}{#1}{#2}{[}}
%\newcommand{\intervallefo}[2]{\intervalle{[}{#1}{#2}{)}}
\newcommand{\intervalleoo}[2]{\intervalle{]}{#1}{#2}{[}}
%\newcommand{\intervalleoo}[2]{\intervalle{(}{#1}{#2}{)}}
\newcommand{\intervalleentier}[2]{\intervalle{\llbracket}{#1}{#2}{\rrbracket}}
% Derivees partielles
% Derivees partielles
\newcommand{\frp}[2]{\dfrac{\partial #1}{\partial #2}}
\newcommand{\frpp}[2]{\dfrac{\partial^2 #1}{\partial #2 ^2}}
\newcommand{\frpxx}[1]{\dfrac{\partial^2 #1}{\partial x^2}}
\newcommand{\frptt}[1]{\dfrac{\partial^2 #1}{\partial t^2}}
\newcommand{\frpuu}[1]{\frac{\partial^2 #1}{\partial u^2}}
\newcommand{\frpxu}[1]{\frac{\partial^2 #1}{\partial x \partial u}}
\newcommand{\frpux}[1]{\frac{\partial^2 #1}{\partial u \partial x}}
% Ensembles de nombres
\newcommand{\nbSet}[1]{\mathbb{#1}}
\newcommand{\setPositive}{+}
\newcommand{\setNegative}{-}
\newcommand{\setStar}{\text{*}}
\newcommand{\N}{\nbSet{N}}
\newcommand{\Z}{\nbSet{Z}}
\newcommand{\Q}{\nbSet{Q}}
\newcommand{\R}{\nbSet{R}} %\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\nbSet{C}}
\newcommand{\Sn}{\nbSet{S}}
\renewcommand{\S}{\mathbb{S}}
\newcommand{\setDeco}[2]{
\IfEqCase{#2}{
{b}{\xoverline{\nbSet{#1}}}
{s}{\nbSet{#1}^{\setStar}}
{sb}{\xoverline{\nbSet{#1}}^{\setStar}}
{n}{\nbSet{#1}^{\phantom{\setStar}}_{\setNegative}}
{p}{\nbSet{#1}^{\phantom{\setStar}}_{\setPositive}}
{sn}{\nbSet{#1}^{\setStar}_{\setNegative}}
{sp}{\nbSet{#1}^{\setStar}_{\setPositive}}
{bp}{\xoverline{\nbSet{#1}}_{\setPositive}}
}
}
\newcommand{\Nb}{ \ensuremath{\setDeco{N}{b}} }
\newcommand{\Ns}{ \ensuremath{\setDeco{N}{s}} }
\newcommand{\Nsb}{ \ensuremath{\setDeco{N}{sb}} }
\newcommand{\Rn}{ \ensuremath{\setDeco{R}{n}} }
\newcommand{\Rp}{ \ensuremath{\setDeco{R}{p}} }
\newcommand{\Rb}{ \ensuremath{\setDeco{R}{b}} }
\newcommand{\Rbp}{ \ensuremath{\setDeco{R}{bp}} }
\newcommand{\Rs}{ \ensuremath{\setDeco{R}{s}} }
\newcommand{\Rsp}{ \ensuremath{\setDeco{R}{sp}} }
\newcommand{\Rsn}{ \ensuremath{\setDeco{R}{sn}} }
% Matrice semi definie positive
\newcommand{\semidefpos}{\succeq 0}
\newcommand{\defpos}{\succ 0}
% Valeur absolue et norme
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\absStyle}[1]{\left\lvert#1\right\rvert}
\newcommand{\norme}[1]{\lVert#1\rVert}
\newcommand{\normeStyle}[1]{\left\lVert#1\right\rVert}
% Petit o et grand O
\newcommand{\petito}[1]{o\mathopen{}\left(#1\right)}
\newcommand{\grandO}[1]{O\mathopen{}\left(#1\right)}
% Ensemble des .. tels que ..
\newcommand{\enstq}[2]{\left\{#1\mathrel{}\middle|\mathrel{}#2\right\}}
% Produit scalaire
\newcommand{\prodscal}[2]{\left(#1 \,|\, #2\right)}
%\newcommand{\crochetDualite}[2]{\left\langle#1,#2\right\rangle}
\newcommand{\crochetDualite}[2]{#1 \cdot #2}
% Fleches : utiliser la commande \vv
%\renewcommand\tilde{\widetilde}
% Lettres avec tilde
\def\xt{\widetilde{x}}
\def\ut{\widetilde{u}}
\def\pt{\widetilde{p}}
\def\ft{\widetilde{f}}
\def\ct{\widetilde{c}}
\def\Et{\widetilde{E}}
\def\Ucalt{\widetilde{\Ucal}}
\def\Acalt{\widetilde{\Acal}}
\def\Phit{\widetilde{\Phi}}
% Operateur math
\makeatletter
\newcommand\RedeclareMathOperator{%
\@ifstar{\def\rmo@s{m}\rmo@redeclare}{\def\rmo@s{o}\rmo@redeclare}%
}
% this is taken from \renew@command
\newcommand\rmo@redeclare[2]{%
\begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup
\expandafter\@ifundefined\@gtempa
{\@latex@error{\noexpand#1undefined}\@ehc}%
\relax
\expandafter\rmo@declmathop\rmo@s{#1}{#2}}
% This is just \@declmathop without \@ifdefinable
\newcommand\rmo@declmathop[3]{%
\DeclareRobustCommand{#2}{\qopname\newmcodes@#1{#3}}%
}
\@onlypreamble\RedeclareMathOperator
\makeatother
\DeclareMathOperator{\argmax}{arg\,max}
%\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\rand}{rand}
\DeclareMathOperator{\rang}{rank}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\vect}{Vect}
\DeclareMathOperator{\Isom}{Isom}
\DeclareMathOperator{\im}{Im}
\RedeclareMathOperator{\Im}{Im}
\RedeclareMathOperator{\det}{det}
\DeclareMathOperator{\trace}{tr}
\DeclareMathOperator{\comatrice}{com}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\minimize}{minimiser}
\DeclareMathOperator{\comp}{num}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\graphe}{graphe}
\RedeclareMathOperator{\ker}{Ker}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\id}{Id}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\sh}{sh}
\DeclareMathOperator{\argsh}{argsh}
\DeclareMathOperator{\inv}{inv}
\DeclareMathOperator{\sym}{Sym}
% exponential mapping
\newcommand{\expmap}[3]{\exp({#2 #3}) (#1)}
% Fonction homotopique
\renewcommand{\hom}{\Phi}
% Epsilon, phi, theta, etc.
\newcommand{\veps}{\varepsilon}
\newcommand\vphi{\varphi}
\newcommand\pth{p_\theta}
\renewcommand\th{\theta}
\newcommand{\arc}{\gamma}
%---------------------------------------------------------------------------------------------------------------
% MACROS Ehouarn Simon
%\newcommand{\convn}{\underset{n\rightarrow +\infty}{\longrightarrow}}
%\newcommand{\convps}{\underset{n\rightarrow +\infty}{\overset{\text{p.p.}}{\longrightarrow}}}
\newcommand{\convn}{{\rightarrow}}
\newcommand{\convps}{{\overset{\text{p.p.}}{\longrightarrow}}}
%
% Auteur : Olivier Cots
% Date : 17 avril 2019
%
% packages latex
%
%---------------------------------------------------------------------------------------------------------------
%\usepackage{wrapfig}
%\renewcommand{\refname}{}
%---------------------------------------------------------------------------------------------------------------
% Voir http://www.cpt.univ-mrs.fr/~masson/latex/Cours-LaTeX-beamer-03.pdf
% sur les packages incontournables pour latexs
\usepackage{import} % Remplace les inpu et include
\usepackage[french]{babel} % This package manages culturally determined typographical (and other) rules for a wide range of languages.
%\usepackage[english]{babel} % This package manages culturally determined typographical (and other) rules for a wide range of languages.
\usepackage[utf8]{inputenc} % Accept different input encodings
\usepackage[T1]{fontenc} % Standard package for selecting font encodings
\usepackage{lmodern} % based on the Computer Modern fonts released into public domain by AMS
\usepackage{verbatim}
%---------------------------------------------------------------------------------------------------------------
% Couleurs
\usepackage{xcolor} % Driver-independent color extensions for LATEX and pdfLATEX
\usepackage{colortbl} % The package allows rows and columns to be coloured, and even individual cells.
% Utile pour ``Fancy Header Style Options'' dans le main
%---------------------------------------------------------------------------------------------------------------
%
\usepackage{fancyhdr} % Fancy Header and Footer
\ifSLIDES
\usepackage{xparse} % pour faire une commande myframe avec 1 ou 0 argument obligatoire
\else
%---------------------------------------------------------------------------------------------------------------
%---------------------------------------------------------------------------------------------------------------
% Poly
\usepackage{makeidx} % Standard package for creating indexe
%\usepackage{imakeidx} % Pour les index
%---------------------------------------------------------------------------------------------------------------
% Les chemins ou se trouvent les figures et les extensions de figures
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.jpg,.pdf,.png}
\usepackage[pagebackref,hyperindex=true,linktoc=all]{hyperref}
\else
\usepackage{graphicx}
\DeclareGraphicsExtensions{.ps,.eps}
\usepackage[dvipdfm,pagebackref,hyperindex=true,linktocpage]{hyperref}
\fi
\ifPOLY
%---------------------------------------------------------------------------------------------------------------
% Minitoc
\usepackage[nottoc, notlof, notlot]{tocbibind}
\usepackage[french]{minitoc}
%\let\minitocORIG\minitoc
%\renewcommand{\minitoc}{\minitocORIG \vspace{1.5em}}
\mtcsettitle{minitoc}{} % pas de titre : Sommaire
\nomtcrule % pas de trait horizontaux
%\let\minitocORIG\minitoc
%\renewcommand{\minitoc}{\minitocORIG \noindent\rule[0.0ex]{1.0\textwidth}{1pt} \vspace{0.0em}}
\fi
%---------------------------------------------------------------------------------------------------------------
% Les marges
\ifPOLY
\usepackage[a4paper,includeheadfoot,margin=2.54cm]{geometry}
\setlength{\headheight}{14pt} % ...at least 14.0pt. Pour eviter un warning
\fi
%---------------------------------------------------------------------------------------------------------------
% Pour les figures et sous-figures (commande subfigure)
\usepackage{caption}
\usepackage{subcaption}
%---------------------------------------------------------------------------------------------------------------
% Pour changer le format des titres de section, etc.
\usepackage[explicit]{titlesec}
%\usepackage[explicit, newlinetospace]{titlesec}
\fi
%\graphicspath{{\repRessource/figures/}}
\graphicspath{{.}{Figures/}{\relativePath/Logos/}}
%---------------------------------------------------------------------------------------------------------------
% Pour pouvoir ajuster les minipages contenant seulement une figure : \includegraphics[width=0.9\textwidth,valign=t]{./bocop_archi}
\usepackage[export]{adjustbox}
%---------------------------------------------------------------------------------------------------------------
%---------------------------------------------------------------------------------------------------------------
% Affichage sous forme de slides : pour reglage de la taille de la page
%\usepackage[screen]{pdfscreen}
%---------------------------------------------------------------------------------------------------------------
% Pour les environnements theoremes, etc.
\usepackage[many]{tcolorbox} % http://ctan.org/pkg/tcolorbox
\usepackage{totcount} % Compteur pour les probl\`emes
\usepackage{textcomp} % Commande textasteriskcentered pour newstep : utile dans les preuves pour une separation d'etapes
\@ifpackageloaded{versions}{}{\usepackage{versions}} % Permet de supprimer des environnement a la compilation : excludeversion, ou d'en ajouter : includeversion
\makeatletter
\usepackage{wasysym} % Pour les pointes noires pleines (RHD) en debut de preuve et autres
\makeatother
%---------------------------------------------------------------------------------------------------------------
% Les maths et ams
\usepackage{bigints} % big integrale
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{mathrsfs} % Donne une alternative a mathcal : mathscr. Les lettres sont encore plus courbees
\usepackage{mathtools} % Extension package to amsmath. Utile par exemple pour \coloneqq
\usepackage{xstring} % Pour avoir la commande \IfEqCase, pour la definition des ensembles
\usepackage{dsfont} % Utile pour la commande \mathds, pour un style different pour la definition des ensembles
\usepackage{stmaryrd} % Pour les definitions d'intervalles
\usepackage{yhmath} % L'arc de cercle pour les champs de Jacobi : wideparen
\usepackage[f]{esvect} % Pour les fleche pour le systeme hamiltonien : \vv{H}
%---------------------------------------------------------------------------------------------------------------
% Les dessins
\usepackage{tikz}
\usepackage{pgfkeys}
\usepackage[european resistor, european voltage, european current]{circuitikz}
\usepackage{pifont}
\usepackage{\relativePathTemplate/tikzgraphicx}
\usetikzlibrary{arrows,shapes,backgrounds,patterns,babel}
%---------------------------------------------------------------------------------------------------------------
% Les tableaux
\usepackage{calc}
\usepackage{array}
\usepackage{booktabs} % Tableau : epaisseur des lignes
%---------------------------------------------------------------------------------------------------------------
% Les itemize
\usepackage{marvosym} % Pour la commande Football pour les itemize
\usepackage{enumitem} % Pour pouvoir redefinir les separation entre items, etc.
%---------------------------------------------------------------------------------------------------------------
% Listings : pour inclure du code matlab, fortran, etc.
\usepackage{listings}
This diff is collapsed.
exam.sty 0 → 100644
%
% See https://en.wikibooks.org/wiki/LaTeX/Creating_Packages
% and https://www.overleaf.com/learn/latex/Writing_your_own_package
%
% Identification Part
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{exam}[14/12/2019 Exam package - Olivier Cots]
% --------------------------------------------------------------------------------
% Package loading
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{fancyhdr}
\RequirePackage{graphics}
\RequirePackage{versions}
\RequirePackage{xkeyval} % utile pour les options avec key-value
% --------------------------------------------------------------------------------
% Relative path : repertoire ou se trouve les fichiers de styles, etc
% en relatif par rapport au document tex
\newcommand{\relativePathTemplate}{}
\DeclareOptionX{relativePath}{\renewcommand{\relativePathTemplate}{#1}}
%\DeclareOptionX*{\PackageWarning{td}{`\CurrentOption' ignored}}% For unknown options
\ExecuteOptionsX{relativePath=./}% Preset keys, 'section' being the default here
% --------------------------------------------------------------------------------
% Declaration de variables de condition
% Condition pour slides vs autres
\newif\ifSLIDES
\SLIDESfalse % poly ou TD ou Exam
%\SLIDEStrue % slides sous beamer
% Condition pour poly vs autres
\newif\ifPOLY
\POLYfalse % TD ou Exam
% Condition si affichage en noir et blanc ou en couleur
\newif\ifBANDW
\BANDWfalse % dummy ici
% Condition si slides pour couleurs claires ou sombres
%\newif\ifLIGHT
% Option fiche or not fiche
\newif\ifFICHE
\FICHEfalse
% --------------------------------------------------------------------------------
% Options
% Correction ou non
\newif\ifCORR
\DeclareOptionX{correction}{\CORRtrue} % avec
\DeclareOptionX{nocorrection}{\CORRfalse} % sans
\ExecuteOptionsX{nocorrection} % option par défaut
% On execute les options et on passe au latex classique
\ProcessOptionsX\relax
%\ProcessOptions\relax % terminates the option processing.
% --------------------------------------------------------------------------------
%
\usepackage[a4paper,includeheadfoot,margin=2.5cm]{geometry}
% --------------------------------------------------------------------------------
%
\pagestyle{fancyplain}
\newcommand{\tp@lfoot}{}
\newcommand{\tp@cfoot}{{\textrm{\thepage}}}
\newcommand{\tp@rfoot}{}
%%%% Modification de la page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtolength{\headheight}{\baselineskip}
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt}
%%%% Page de titre %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\@title}{}
\newcommand{\@shorttitle}{}
\newcommand{\@numero}{}
\renewcommand{\@date}{}
\newcommand{\@discipline}{}
\newcommand{\@promotion}{}
\renewcommand{\title}[1]
{\renewcommand{\@title}{{#1}}}
\newcommand{\numero}[1]
{\renewcommand{\@numero}{{#1}}}
\newcommand{\shorttitle}[1]
{\renewcommand{\@shorttitle}{{#1}}}
\renewcommand{\date}[1]
{\renewcommand{\@date}{{#1}}}
\newcommand{\discipline}[1]
{\renewcommand{\@discipline}{{#1}}}
\newcommand{\promotion}[1]
{\renewcommand{\@promotion}{{#1}}}
\renewcommand{\maketitle}
{\par\begin{center}
{\includegraphics[width=5cm]{\relativePathTemplate/Logos/LOGO_INP_N7}}
\vspace*{1.0em}\par
\LARGE\bf \@title
\end{center}%
\thispagestyle{plain}
\addvspace{2em}}
%%%% Special commands for package and class files %%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument
{%
\lhead{\fancyplain
{{\scriptsize \emph{\@promotion}\\[-2pt] \textsc{\@discipline}}}
{\textsc{\small \@discipline}}}
\chead{}
\rhead{\fancyplain
{{\scriptsize \@date\\[-2pt] \@numero}}
{{\small \textbf{\@shorttitle}}}}
\lfoot{\tp@lfoot}
\cfoot{\tp@cfoot}
\rfoot{\tp@rfoot}
}
% --------------------------------------------------------------------------------
% Mes macros et autres packages en commun entre slides, poly, etc.
\input{\relativePathTemplate/MPS/defs_packages}
\input{\relativePathTemplate/MPS/defs_macros}
% --------------------------------------------------------------------------------
% DEB : Dans le defs_styles en principe
% Env correction
\newenvironment{mycorrection}{\begin{correction} $\RHD$ \color{blue}}{\color{black} \end{correction} }
%%%% Environnement pour les exercices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremstyle{plain}
\newtheorem{mytheorem}{Th\'eor\`eme}
\newtheorem{mylemma}{Lemme}
\newtheorem{mydefinition}{D\'efinition}
%% \theoremstyle{plain}
\theoremstyle{definition}
\newtheorem{myexercise}{{\makebox[0pt][r]{$\rhd$\hspace*{1ex}}Exercice}}
\newtheorem{myquestion}{}[myexercise]
\newtheorem{mysubquestion}{\hspace*{1em}}[myquestion]
\newtheorem{myquestionpb}{}
\newtheorem{mysubquestionpb}{\hspace*{1em}}[myquestionpb]
%\newtheorem{Exemple}{Exemple}
\newtheorem{myremark}{Remarque}
\newtheorem*{myremark*}{Remarque}
\newtheorem*{myinstruction*}{Consigne}
\newtheorem*{myinstructions*}{Consignes}
\newtheorem{mypart}{Partie}
%\newcounter{exercice}
%\newcounter{question}[exercice]
%\renewcommand{\theexercice}{\arabic{exercice}}
%\renewcommand{\thequestion}{\theexercice.\arabic{question}}
%\theoremstyle{definition}
%\newtheorem{Guide}{{\makebox[0pt][r]{$\blacktriangleright$\hspace*{1ex}}Guide}}
%\renewcommand{\theGuide}{\hspace*{-0.9ex}}
\definecolor{blue}{rgb}{0.06,0.06,0.6}
\definecolor{green}{rgb}{0.06,0.6,0.06}
\definecolor{red}{rgb}{0.6,0.04,0.04}
\newcommand{\supple}[1]{\noindent {\color{green} \it Suppl\'ement : #1}}
\newcommand{\rappel}[1]{\noindent {\color{red} \it Rappels : #1}}
% FIN : Dans le defs_styles en principe
% --------------------------------------------------------------------------------
% --------------------------------------------------------------------------------
% On affiche ou non la correction
\ifCORR
\includeversion{correction}
\else
\excludeversion{mycorrection}
\fi
% --------------------------------------------------------------------------------
%
\endinput % this must be the last command
logos/LOGO_INP_N7.png

42.6 KiB

logos/LOGO_UFTMP.jpg

622 KiB

logos/satelittebis.jpg

603 KiB

This diff is collapsed.
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{polycopie}[2019/13/10 Polycopie Package - Olivier Cots]
% --------------------------------------------------------------------------------
% Package loading
\RequirePackage{xkeyval} % utile pour les options avec key-value
% --------------------------------------------------------------------------------
% Relative path : repertoire ou se trouve les fichiers de styles, etc
% en relatif par rapport au document tex
\newcommand{\relativePathTemplate}{}
\DeclareOptionX{relativePath}{\renewcommand{\relativePathTemplate}{#1}}
%\DeclareOptionX*{\PackageWarning{td}{`\CurrentOption' ignored}}% For unknown options
\ExecuteOptionsX{relativePath=./}% Preset keys, 'section' being the default here
% --------------------------------------------------------------------------------
% Declaration de variables de condition et options
% Condition pour poly vs slides
\newif\ifSLIDES
\SLIDESfalse % poly
%\SLIDEStrue % slides sous beamer
% Condition si slides pour couleurs claires ou sombres
\newif\ifLIGHT
% Condition pour poly vs autres
\newif\ifPOLY
\POLYtrue % TD ou Exam
% \DeclareOption{dark}{\LIGHTfalse} % sombres
% \DeclareOption{light}{\LIGHTtrue} % claires
% \ExecuteOptions{dark} % option par défaut
% Condition si affichage en noir et blanc ou en couleur
\newif\ifBANDW
\DeclareOptionX{blackandwhite}{\BANDWtrue} % black and white
\DeclareOptionX{colored}{\BANDWfalse} % black and white
\ExecuteOptionsX{colored} % option par défaut
% Option fiche or not fiche
\newif\ifFICHE
\DeclareOptionX{fiche}{\FICHEtrue} % style fiche
\DeclareOptionX{nofiche}{\FICHEfalse} % style classique
\ExecuteOptionsX{nofiche} % option par défaut
% On execute les options et on passe au latex classique
\ProcessOptionsX\relax
%\ProcessOptions\relax % terminates the option processing.
%\ifFICHE
%% --------------------------------------------------------------------------------
%% Surcharge de section
%\renewcommand\section{\newpage\@startsection {section}{1}{\z@}%
% {-3.5ex \@plus -1ex \@minus -.2ex}%
% {2.3ex \@plus.2ex}%
% {\color{\colorSection}\normalfont\large\bfseries}
% }
%\fi
% --------------------------------------------------------------------------------
% Mes macros et autres packages en commun entre slides, poly, etc.
\input{\relativePathTemplate/MPS/defs_packages}
\input{\relativePathTemplate/MPS/defs_macros}
\input{\relativePathTemplate/MPS/defs_styles}
%
\endinput % this must be the last command
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{slides}[2019/13/10 Slides Package - Olivier Cots]
% --------------------------------------------------------------------------------
% Package loading
\RequirePackage{xkeyval} % utile pour les options avec key-value
% --------------------------------------------------------------------------------
% Relative path : repertoire ou se trouve les fichiers de styles, etc
% en relatif par rapport au document tex
\newcommand{\relativePathTemplate}{}
\DeclareOptionX{relativePath}{\renewcommand{\relativePathTemplate}{#1}}
%\DeclareOptionX*{\PackageWarning{td}{`\CurrentOption' ignored}}% For unknown options
\ExecuteOptionsX{relativePath=./}% Preset keys, 'section' being the default here
% --------------------------------------------------------------------------------
% Declaration de variables de condition et options
% Condition pour poly vs slides
\newif\ifSLIDES
%\SLIDESfalse % poly
\SLIDEStrue % slides sous beamer
% Condition pour poly vs autres : si slides est faux
\newif\ifPOLY
% \POLYfalse % TD ou Exam
% Condition si slides pour couleurs claires ou sombres
\newif\ifLIGHT
\DeclareOptionX{dark}{\LIGHTfalse} % sombres
\DeclareOptionX{light}{\LIGHTtrue} % claires
\ExecuteOptionsX{dark} % option par défaut
% Condition si affichage en noir et blanc ou en couleur
\newif\ifBANDW
\DeclareOptionX{blackandwhite}{\BANDWtrue} % black and white
\DeclareOptionX{colored}{\BANDWfalse} % black and white
\ExecuteOptionsX{colored} % option par défaut
% Option fiche or not fiche
\newif\ifFICHE
\FICHEfalse
% On execute les options et on passe au latex classique
\ProcessOptionsX\relax
%\ProcessOptions\relax % terminates the option processing.
% --------------------------------------------------------------------------------
% Mes macros et autres packages en commun entre slides, poly, etc.
\input{\relativePathTemplate/MPS/defs_packages}
\input{\relativePathTemplate/MPS/defs_macros}
\input{\relativePathTemplate/MPS/defs_styles}
%
\endinput % this must be the last command
td.sty 0 → 100644
%
% See https://en.wikibooks.org/wiki/LaTeX/Creating_Packages
% and https://www.overleaf.com/learn/latex/Writing_your_own_package
%
% Identification Part
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{td}[13/10/2019 TD package - Olivier Cots]
% --------------------------------------------------------------------------------
% Package loading
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{fancyhdr}
\RequirePackage{graphics}
\RequirePackage{versions}
\RequirePackage{xkeyval} % utile pour les options avec key-value
% --------------------------------------------------------------------------------
% Relative path : repertoire ou se trouve les fichiers de styles, etc
% en relatif par rapport au document tex
\newcommand{\relativePathTemplate}{}
\DeclareOptionX{relativePath}{\renewcommand{\relativePathTemplate}{#1}}
%\DeclareOptionX*{\PackageWarning{td}{`\CurrentOption' ignored}}% For unknown options
\ExecuteOptionsX{relativePath=./}% Preset keys, 'section' being the default here
% --------------------------------------------------------------------------------
% Declaration de variables de condition
% Condition pour slides vs autres
\newif\ifSLIDES
\SLIDESfalse % poly ou TD ou Exam
%\SLIDEStrue % slides sous beamer
% Condition pour poly vs autres
\newif\ifPOLY
\POLYfalse % TD ou Exam
% Condition si affichage en noir et blanc ou en couleur
\newif\ifBANDW
\BANDWfalse % dummy ici
% Condition si slides pour couleurs claires ou sombres
%\newif\ifLIGHT
% Option fiche or not fiche
\newif\ifFICHE
\FICHEfalse
% --------------------------------------------------------------------------------
% Options
% Correction ou non
\newif\ifCORR
\DeclareOptionX{correction}{\CORRtrue} % avec
\DeclareOptionX{nocorrection}{\CORRfalse} % sans
\ExecuteOptionsX{nocorrection} % option par défaut
% On execute les options et on passe au latex classique
\ProcessOptionsX\relax
%\ProcessOptions\relax % terminates the option processing.
% --------------------------------------------------------------------------------
%
\usepackage[a4paper,includeheadfoot,margin=2.54cm]{geometry}
% --------------------------------------------------------------------------------
%
\pagestyle{fancyplain}
\newcommand{\tp@lfoot}{}
\newcommand{\tp@cfoot}{{\textrm{\thepage}}}
\newcommand{\tp@rfoot}{}
%%%% Modification de la page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtolength{\headheight}{\baselineskip}
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt}
%%%% Page de titre %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\@title}{}
\newcommand{\@shorttitle}{}
\newcommand{\@numero}{}
\renewcommand{\@date}{}
\newcommand{\@discipline}{}
\newcommand{\@promotion}{}
\renewcommand{\title}[1]
{\renewcommand{\@title}{{#1}}}
\newcommand{\numero}[1]
{\renewcommand{\@numero}{{#1}}}
\newcommand{\shorttitle}[1]
{\renewcommand{\@shorttitle}{{#1}}}
\renewcommand{\date}[1]
{\renewcommand{\@date}{{#1}}}
\newcommand{\discipline}[1]
{\renewcommand{\@discipline}{{#1}}}
\newcommand{\promotion}[1]
{\renewcommand{\@promotion}{{#1}}}
\renewcommand{\maketitle}
{\par\begin{center}
{\includegraphics[width=5cm]{\relativePathTemplate/Logos/LOGO_INP_N7}}
\vspace*{1.0em}\par
\LARGE\bf \@title
\end{center}%
\thispagestyle{plain}
\addvspace{2em}}
%%%% Special commands for package and class files %%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument
{%
\lhead{\fancyplain
{{\scriptsize \emph{\@promotion}\\[-2pt] \textsc{\@discipline}}}
{\textsc{\small \@discipline}}}
\chead{}
\rhead{\fancyplain
{{\scriptsize \@date\\[-2pt] \@numero}}
{{\small \textbf{\@shorttitle}}}}
\lfoot{\tp@lfoot}
\cfoot{\tp@cfoot}
\rfoot{\tp@rfoot}
}
% --------------------------------------------------------------------------------
% Mes macros et autres packages en commun entre slides, poly, etc.
\input{\relativePathTemplate/MPS/defs_packages}
\input{\relativePathTemplate/MPS/defs_macros}
% --------------------------------------------------------------------------------
% DEB : Dans le defs_styles en principe
% Env correction
\newenvironment{mycorrection}{\begin{correction} $\RHD$ \color{blue}}{\color{black} \end{correction} }
%%%% Environnement pour les exercices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremstyle{plain}
\newtheorem{mytheorem}{Th\'eor\`eme}
\newtheorem{mylemma}{Lemme}
\newtheorem{mydefinition}{D\'efinition}
%% \theoremstyle{plain}
\theoremstyle{definition}
\newtheorem{myexercise}{{\makebox[0pt][r]{$\rhd$\hspace*{1ex}}Exercice}}
\newtheorem{myquestion}{}[myexercise]
\newtheorem{mysubquestion}{\hspace*{1em}}[myquestion]
\newtheorem{myquestionpb}{}
\newtheorem{mysubquestionpb}{\hspace*{1em}}[myquestionpb]
%\newtheorem{Exemple}{Exemple}
\newtheorem{myremark}{Remarque}
%\newcounter{exercice}
%\newcounter{question}[exercice]
%\renewcommand{\theexercice}{\arabic{exercice}}
%\renewcommand{\thequestion}{\theexercice.\arabic{question}}
%\theoremstyle{definition}
%\newtheorem{Guide}{{\makebox[0pt][r]{$\blacktriangleright$\hspace*{1ex}}Guide}}
%\renewcommand{\theGuide}{\hspace*{-0.9ex}}
\definecolor{blue}{rgb}{0.06,0.06,0.6}
\definecolor{green}{rgb}{0.06,0.6,0.06}
\definecolor{red}{rgb}{0.6,0.04,0.04}
\newcommand{\supple}[1]{\noindent {\color{green} \it Suppl\'ement : #1}}
\newcommand{\rappel}[1]{\noindent {\color{red} \it Rappels : #1}}
% FIN : Dans le defs_styles en principe
% --------------------------------------------------------------------------------
% --------------------------------------------------------------------------------
% On affiche ou non la correction
\ifCORR
\includeversion{correction}
\else
\excludeversion{mycorrection}
\fi
% --------------------------------------------------------------------------------
%
\endinput % this must be the last command
\ProvidesPackage{tikzgraphicx}[2010/02/23 TikZ+graphicx+GIMP Library]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2009, 2010, 2011 Benjamin Kellermann %
% %
% This program is free software: you can redistribute it and/or modify it %
% under the terms of the GNU General Public License as published by the %
% Free Software Foundation, either version 3 of the License, or (at your %
% option) any later version. %
% %
% This program is distributed in the hope that it will be useful, but %
% WITHOUT ANY WARRANTY; without even the implied warranty of %
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %
% General Public License for more details. %
% %
% You should have received a copy of the GNU General Public License along %
% with this program. If not, see <http://www.gnu.org/licenses/>. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%TODO: - Lupe malen
\RequirePackage{graphicx}
\RequirePackage{calc}
\RequirePackage{tikz}
\usetikzlibrary{calc}
%usage:
%\begin{tikzgraphics}[opts]{width}{xres}{yres}{picname}
% \pxnode…
%\end{tikzgraphics}
\newlength{\picscale}
\newlength{\picxrange}
\newlength{\picyrange}{}
\newcommand*{\picname}{}
\newenvironment*{tikzgraphics}[5][]{%
\setlength{\picscale}{#2}%
\setlength{\picxrange}{#3pt}%
\setlength{\picyrange}{#4pt}%
\renewcommand{\picname}{#5}%
\begin{tikzpicture}[scale=\picscale/\picxrange,#1]
\node[inner sep=0pt] (tikzgraphicsnode) at ($(\picxrange/2,\picyrange/2)$){\includegraphics[width=\picscale]{\picname}};
}{\end{tikzpicture}}
%usage:
%\pxcoordinate[opts]{x}{y}{name}
\newcommand*{\pxcoordinate}[4][]{%
\coordinate[#1] (#4) at ($(#2pt,\picyrange-#3pt)$);
}
%usage:
%\pxnode[opts]{x}{y}{name}{text}
\newcommand*{\pxnode}[5][]{%
\node[#1] (#4) at ($(#2pt,\picyrange-#3pt)$) {#5};
}
%usage:
%\pxrectangle[opts]{x}{y}{+x}{+y}
\newcommand*{\pxrectangle}[5][]{%
\draw[#1] ($(#2pt,\picyrange-#3pt)$) rectangle ($(#2pt+#4pt,\picyrange-#3pt-#5pt)$);
}
%usage:
%\pxellipse[opts]{x}{y}{+x}{+y}
\newcommand*{\pxellipse}[5][]{%
\draw[scale=0.5,#1] ($(#2pt*2+#4pt,\picyrange*2-#3pt*2-#5pt)$) ellipse (#4pt and #5pt);
}
%usage:
%\begin{tikzzoomgraphics}[opts]{scalefactor}{basex}{basey}{zoomx}{zoomy}
% \pxnode…
%\end{tikzzoomgraphics}
\newlength{\innerpicxadd}
\newlength{\innerpicyadd}
\newlength{\tmpscale}
\newlength{\oldpicyrange}
\newcommand*{\innerpicscale}{}
\newcommand*{\insertpicture}{}
\newenvironment*{tikzzoomgraphics}[6][]{%
\setlength{\tmpscale}{\picscale*\real{#2}}%
\pxnode{#3}{#4}{zoomgraphicanchor}{}%
\renewcommand*{\insertpicture}{%
\node[inner sep=.5\pgflinewidth,#1]
at ($(zoomgraphicanchor)+(\picxrange/2,-\oldpicyrange/2)+(-#5pt,#6pt)$) {%
\includegraphics[%
width=\tmpscale,%
keepaspectratio
]{\picname}};
}%
\setlength{\oldpicyrange}{\picyrange}%
\setlength{\picyrange}{\picyrange*\real{#2}}%
\renewcommand{\innerpicscale}{#2}%
\begin{scope}[scale=\real{#2},xshift=#3pt/#2-#5,yshift=(\oldpicyrange-#4pt)/#2-(\picyrange-#6pt),overlay,#1]%
}{%
\setlength{\picyrange}{\oldpicyrange}%
\end{scope}%
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment