;;; latex-tempo.el --- Templates for LaTeX with help of tempo.el and AucTeX

;; Author: Guy Yeterian 
;; 
;; Created: 01 July 1998
;; Version: 1.0
;; Version: 1.1 January 99
;; Keywords: Templates for LaTeX Mode with auctex

;; Copyright (C) 1998  GYe

;; 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 2, 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 GNU Emacs; see the file COPYING.  If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

;;; Commentary:
;;  This package is for use with AucTeX. You can add your TeX macros or add 
;;  template for AucTeX. 
;;  In version 1.1 we modify (with help of advice.el) tempo-insert. This
;;  function can now run TeX-insert-macro (look at the code for see how to do
;;  this.   
;;  

;; 

;;; Description:
;;   latex-tempo.el  makes it easier to write LaTeX documents. This mode
;;   handles inserting LaTeX codes in a variety of ways (keybindings,
;;   completion in the buffer, running auctex functions both for command and
;;   environment ).  





(defvar latex-tempo-env-tags nil
  "List of LaTeX environments tags.")

(defvar latex-tempo-com-tags nil
  "List of LaTeX commands tags.")


;;; latex-mode-hook
(require 'tempo)
(require 'advice)

(setq-default tempo-interactive t)
;(setq-default tempo-insert-region t)
(setq-default 
 tempo-match-finder "\\b\\([^\b]+\\)\\=")  ;; The definition in tempo.el is false.

;;; install latex-mode and define list for environements and commands.
(add-hook 'LaTeX-mode-hook 
          '(lambda ()
             (tempo-use-tag-list 'latex-tempo-env-tags)
             (tempo-use-tag-list 'latex-tempo-com-tags)
             ))

(add-hook 'LaTeX-math-mode-hook
 '(lambda ()
    (tempo-use-tag-list 'latex-tempo-env-tags)
    (tempo-use-tag-list 'latex-tempo-com-tags)
    ))

;;
;; modification of tempo for running auctex function
(defadvice tempo-insert (before run-function (element on-region))
  "run (auctex) lisp  function"
  (if (and (consp element)
           (eq (car element) 'f))
      (progn 
        (apply (nth 1 element) (nthcdr 2 element))    
        (ad-set-arg 0 nil))))
    
;;
;; activate the new tempo-insert
(ad-activate 'tempo-insert t)
           

;;; LaTeX function uses later

;;
;; Insert a environment of the amsthm package. 
;; pour completer mes macros persos sous amsthm
(defun LaTeX-env-thm (environment)
  "Insert ENVIRONMENT with optional argument
   usage with AMSTHM ."
  (let ((titre (read-string "Title : ")))
    (LaTeX-insert-environment environment
                              (concat 
                               (if (not (zerop(length titre)))
                                   (format "[%s]" titre))))))
  

;;
;;  tempo-user-elements
(defvar tempo-user-elements nil)
 

;;; tempo function's here.

;;
;;; function to construct the environments templates.
(defun latex-tempo-env (l)
  "Construct tempo-template for LaTeX environment"
  (let* ((tag (car l))
         (nom (nth 1 l))
         (element (nth 2 l)))    
    (tempo-define-template nom element tag  nil 'latex-tempo-env-tags)))
  

;;; function to construct LaTeX commands
(defun latex-tempo-com (l)
  "Construct tempo-template for LaTeX commands."
  (let* ((tag (car l))
         (element (nth 1 l)))
    (tempo-define-template tag element tag nil 'latex-tempo-com-tags)))
  



;;; The templates.
    
;;; here you install your templates for environments
;;; LaTeX environments tags
(mapcar
 'latex-tempo-env 
 '(("enu" "enumerate"    ((LaTeX-env-item "enumerate")))
   ("ite" "itemize"      ((LaTeX-env-item "itemize")))
   ("des"  "description" ((LaTeX-env-item "description")))
   ("dis" "displaymath" ((LaTeX-environment-menu "displaymath")))
   ("equ" "equation"    ((LaTeX-environment-menu "equation")))
   ("mul" "multicols"   ((LaTeX-environment-menu "multicols")))
   ("rem" "remarque"    ((LaTeX-environment-menu "remarque")))
   ("eno" "enonce"      ((LaTeX-environment-menu "enonce")))
   ("cor"  "corollaire" ((LaTeX-environment-menu "corollaire")))
   ("tab"  "tabular"    ((LaTeX-environment-menu "tabular")))
   ("cen"  "center"     ((LaTeX-environment-menu "center")))
   ("lst"  "lstlisting"     ((LaTeX-environment-menu "lstlisting")))
    ("box"  "boxedverbatim"     ((LaTeX-environment-menu "boxedverbatim")))
     ("dan"  "DANGER"     ((LaTeX-environment-menu "DANGER")))
     ("frame" "frame"   ((LaTeX-environment-menu "frame")) )
      ("arrayl"  "arrayl"     ((LaTeX-environment-menu "arrayl")))
       ("def"  "Defi"     ((LaTeX-environment-menu "Defi")))
        ("thm"  "The"     ((LaTeX-environment-menu "The")))
         ("prop"  "Pro"     ((LaTeX-environment-menu "Pro")))
         ("ver" "verse"  ((LaTeX-environment-menu "verse")))
         ("dia" "frame"  ((LaTeX-environment-menu "frame")))
         ("quo" "quote"  ((LaTeX-environment-menu "quote")))
         ("vrb" "Verbatim"  ((LaTeX-environment-menu "Verbatim")))
          ("ali" "align*"  ((LaTeX-environment-menu "align*")))
          ("exo" "EXO"  ((LaTeX-environment-menu "EXO")))
;;       ("xcas" "xcas"  ((LaTeX-environment-menu "xcas")))
;;       ("Xcas" "xcass"  ((LaTeX-environment-menu "Xcass")))
         

         
     ));;Here LaTeX environments tags 




;;; Here you install your LaTeX commands tags 
(mapcar
 'latex-tempo-com
   '(("int1"  ("\\int_{" (p "liminf:") "}^{" (p "limsup:") "}" p 
               "\\;d"(p "var :")))
     ("big" ("\\big( "p" \\big)"))
     ("Big" ("\\Big( "p" \\Big)"))
     ("Box" ("\\begin{figure}
  \\begin{BoxedVerbatim}
    $\\mathtt{" p "}$
 \\end{BoxedVerbatim}
\\end{figure}"))
     ("verb" ("\\verb+" p "+"))
     ("deuz"("2\\textsuperscript{nde}"))
     ("ens"("\\bigl\\{" p "\\bigr\\}"))
     ("prem"("1\\textsuperscript{ère}"))
     ("term"("T\\textsuperscript{ale}"))
     ("bfra"("\\begin{frame}"))
     ("efra"("\\end{frame}"))
     ( "ds"("\\displaystyle"))
     ("fonc"("$"p"\\colon\\begin{array}{rll} "p" &\\to & "p" \\\\ x  & \\mapsto & "p" \\end{array}$"))
      ("Fonc"("$"p"\\colon\\begin{array}{rll} "p" &\\to & "p" \\\\ "p"  & \\mapsto & "p" \\end{array}$"))
     ("ab" ("\\left|"p"\\right|"))
     ("lin" ("\\displaystyle\\lim_{n\\to +\\infty}") )
     ("lim" ("\\displaystyle\\lim_{ "p" \\to "p" } ") )
     ;("limd"("\\displaystyle\\lim_{{"p"\\to "p"}\\atop{"p">"p"}}") )
     ;("limG"("\\displaystyle\\lim_{{"p"\\to "p"}\\atop{"p"<"p"}}") )
     ("ben" ("\\begin{enumerate}"))
     ("en" ("\\end{enumerate}"))
     ("df" ("\\dfrac{"p"}{"p"}"))
     ("no" ("\\norm{"p"}"))
     ("bi" ("\\binom{"p"}{"p"}"))
     ("fr" ("\\frac{"p"}{"p"}"))
     ("sq" ("\\sqrt{"p"}"))
     ("sum" ("\\sum_{"p"}^{"p"}"))
     ("pa" ("\\left("p"\\right)"))
     ("cro" ("\\left["p"\\right]"))
     ("ac" ("\\left\\{"p"\\right\\}"))
     ("ei" ("\\E^{\\efr{"p"\\I\\pi}{"p"}}"))
     ("i" ("\\item "p""))
     ("tri" ("\\item[$\\triangleright$]"p""))
     ("br" ("$\\bbr$"p))
     ("bz" ("$\\bbz$"p))
     ("bq" ("$\\bbq$"p))
     ("bc" ("$\\bbc$"p))
     ("bn" ("$\\bbn$"p))
     ("bk" ("$\\bbk$"p))
     ("bf" ("$\\bbf$"p))
     ("bp" ("$\\bbp$"p))
     ("se" ("\\set{"p"}"))
     ("bar" ("\\overline{"p"}"))
     ("O" ("\\Omega"))
     ("o" ("\\omega"))
     ("a" ("\\alpha"))
     ("e" ("\\varepsilon"))
     ("f" ("\\varphi"))
     ("db" ("\\dbinom{"p"}{"p"}"))
     ("te" ("\\text{"p"}"))
     ("ve" ("$\\ve{"p"}$"))
     ("mq" ("montrer que"))
     ("Mq" ("Montrez que"))
     ("cr" ("courbe représentative"))
     ("Et" ("\\'Etudiez"))
     ("oij" ("$(O,\\ve{i},\\ve{j})$"))
     ("oijk" ("$(O,\\ve{i},\\ve{j},\\ve{k})$"))
     ("got" ("\\textgoth{"p"}"))
     ("fra" ("\\textfrak{"p"}"))
     ("ssi" ("si, et seulement si, "))
     ("iff" ("\\Longleftrightarrow"))
     ("imp" ("\\Longrightarrow"))
     ("ro"  ("repère orthonormé "))
     ("nov"("\\DecalNorme{\\ve{"p"}}"))
     ("nov"("\\DecalNorme{\\ve{"p"}}"))
     ("coov"("\\ve{"p"}\\begin{pmatrix}"p" \\\\ "p"\\end{pmatrix}"))
     ("v"("\\ve{"p"}"))
     ("p"(p"~\\%"))
     ("n"("\\nombre{"p"}"))
     ("act" ((act)))
     ("lv"  ((f TeX-insert-macro "limv")))
     ("ca"  ((f TeX-insert-macro "card")))
     ("fr"  ((f TeX-insert-macro "frac")))
  ("bv" ("\\begin{verse}"))
  ("ev" ("\\end{verse}"))
     ("trans"("\\vphantom{"p"}^{\rm t}"p))
     ("lec"("\\LECON{"p"}{"p" }{"p"}{"p"}{"p"}"))
     ("x"("\\Prog{XCAS} "))
     ("vb"("\\verb+"p"+"))


;; algorithm2e

("alg"("
\\begin{algorithm}[H]
\\caption{"p"}
\\Entree{}\\;
\\Ini{}\\;
\\Deb{

 } 
\\end{algorithm}"))


     
;; danger

     ("Dan"("\\begin{figure}[!h]
              \\begin{DANGER}
              "p"
               \\end{DANGER}
               \\end{figure}"))

;; idée
     
 ("id"("\\begin{figure}[!h]
              \\begin{Idee}
              "p"
               \\end{Idee}
               \\end{figure}"))


;; tableau
 
     ("tab"("\\begin{center}
             \\begin{tabularx}{"p"\\textwidth}{Y{"p"}}
             \\whline
             "p"

             \\whline
             \\end{tabularx}
             \\end{center}"
                   )  )



;; XCAS à la Yves


     ("xcas"("\\begin{XCAS}
"p"
\\end{XCAS}
\\input{XCAS}

\\lignea
"
))
     
;; preambule
     
     
     ("pre"("\\documentclass[10pt,a4paper,twoside]{report}
\\usepackage[height=250mm,width=183mm]{geometry}
\\usepackage{preambule-utf8}
%\\usepackage[upright]{fourier}
\\usepackage[boldsans]{ccfonts}
\\usepackage{beton,euler}
\\graphicspath{{/home/moi/Figures/}}
\\entete{\\large \\bfseries"p"}{\\normalsize\\textsf{\\rightmark}}{Lycée Jean \\textsc{Perrin} - "p"}%g,d,b
\\begin{document}
\\setlength{\\parindent}{0pt}
\\thispagestyle{empty}

"p"

\\end{document}"))


;; encadre

     ("enc"("
\\psshadowbox*[fillcolor=0.8white,framearc=.25]{%
\\begin{minipage}{\\textwidth}
\\smallskip
{\\LARGE\\bfseries \\begin{center} "p"  \\end{center}}
\\smallskip
\\end{minipage}
}
\\vspace{1cm}"))



     
;; preambule paysage     
     
     ("pays"("\\documentclass[10pt,landscape]{report}
\\usepackage[height=170mm,width=265mm,left=1.5cm]{geometry}
\\usepackage{preambule-utf8}
%\\usepackage[upright]{fourier}
\\usepackage[boldsans]{ccfonts}
\\usepackage{beton,euler}
\\graphicspath{{/home/moi/Figures/}}
\\entete{\\large \\bfseries"p"}{\\normalsize\\textsf{\\rightmark}}{Lycée Jean \\textsc{Perrin} - "p"}%g,d,b
\\begin{document}
\\setlength{\\parindent}{0pt}
\\thispagestyle{empty}

\\begin{multicols}{2}

"p"

\\end{multicols}
\\end{document}"))


;; figure

     
     ("fig"("
\\begin{figure}
\\begin{center}
  \\includegraphics{"p"}
\\end{center}
\\end{figure}
"
))


     ;; titre

("tit" ("\\setcounter{NumLecon}{"p"}
%\\TITRE{IV}{Chapitre}{Vecteurs, bases}{et repères}{Vecteurs, bases et repères}{robin.eps}

\\TITRE{}{Chapitre }{"p" }{}{}{}
         "))


("Enc" ("\\Enc{"p"}{"p"}{"p"}  % titre,couleur,taille h"))

("filec" ( "%  En préambule,  les  sources metapost.  Si  vous lancez  latex  sur ce  fichier,  il vous  placera
% automatiquement le fichier .mp dans le répertoire courant. 
\\begin{filecontents*}{"p".mp}
"p"
\\end{filecontents*}
"p
))




;; beamer


("beamer"(
"\\documentclass[xcolor={hyperref,dvips,ps2pdf},dvips]{beamer} 
\\usepackage[baw]{fvrb-ex}
\\fvset{xrightmargin=0cm,gobble=2,formatcom=\color{blue}}
\\graphicspath{{/home/moi/Figures/FigSeconde/}}
\\usepackage{BeamerPolymaths}
\\renewcommand\\FancyVerbFormatLine[1]{\\colorbox{green}{#1}}

\\mode<presentation>
{
  \\usetheme[secheader]{Madrid}
  % or ...Warsaw

  \\setbeamercovered{highly dynamic}
  % or whatever (possibly just delete it)
}


\\title["p"] % (optional, use only with long paper titles)
{"p"}

\\subtitle{"p"}

\\author["p"] % (optional, use only with lots of authors)
{Guillaume CONNAN }
% - Give the names in the same order as the appear in the paper.
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\\institute{Lycée Jean PERRIN}% (optional, but mostly needed)


\\date["p"] % (optional, should be abbreviation of conference name)
{"p"}
% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\\subject{"p"}

\\AtBeginSubsection[]
{
  \\begin{frame}<beamer>
    \\frametitle{Sommaire}
     
    \\tableofcontents[currentsection,currentsubsection]
       
  \\end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

\\beamerdefaultoverlayspecification{<+->}


\\begin{document}

\\begin{frame}
  \\titlepage
\\end{frame}

\\begin{frame}
  \\frametitle{Sommaire}
  \\tableofcontents
  % You might wish to add the option [pausesections]
\\end{frame}

"p"

\\end{document}"))


;; animation

("anim"("\\documentclass{article}
\\usepackage{multido}
\\usepackage{graphicx}
\\usepackage[height=260mm,width=183mm,a4paper]{geometry}
%\\graphicspath{{/home/moi/Figures/figuresTS/}}
\\begin{document}
\\multido{\\i=0+1}{19}{\\centering\\includegraphics[width=\\textwidth]{"p".\\i}\\newpage}
\\end{document}
"))


;; ds

("ds"(
"\\documentclass[10pt,a4paper]{report}
\\usepackage[height=255mm,width=183mm]{geometry}
\\usepackage{preambule}
\\usepackage[upright]{fourier}
\\graphicspath{{/home/moi/Figures/figuresTS/}}
%\\entete{DS n°1}{Jeudi 4 octobre 2007}{Jean Perrin - T\textsuperscript{ale}S 5}%g,d,b
\\begin{document}
\\setlength{\\parindent}{0pt}
\\pagestyle{empty}


\\psshadowbox*[fillcolor=0.8white,framearc=.25]{%
\\begin{minipage}{\\textwidth}
\\smallskip
{\\LARGE\\bfseries \\sffamily \\begin{center} Devoir Surveillé n°"p" \\hfill Jeudi 4 octobre 2007 \\\\
                                  T\\textsuperscript{ale}S 5   \\hfill 2 heures  \\end{center}}
\\smallskip
\\end{minipage}
}





\\end{document}
"))


;; preambule livret sesamaths

("sesa"("

\\documentclass[11pt]{article}
\\usepackage[T1]{fontenc}
\\usepackage[latin1]{inputenc}          % les bons codes pour les bonnes lettres
\\usepackage{listings}% pour les listings informatiques
\\usepackage[frenchb]{babel}
\\usepackage{keystroke}% pour les touches du clavier
\\usepackage{amsmath,amsfonts,amsthm,geometry,pst-all}
\\usepackage{amssymb}
\\geometry{a4paper,left=1cm,right=1cm,top=1cm,bottom=1cm,noheadfoot}
\\usepackage{pifont}
\\usepackage{graphicx}
%\\usepackage{yhmath} %pour faire un arc de cercle $\\wideparen{AB}$ 
\\usepackage{eurosym} % pour avoir le symbole euro \\euro
\\pagestyle{empty}
\\setlength{\\parindent}{0cm}
\\usepackage{multicol}
\\usepackage{slashbox} %pour barrer une cellule d'un tableau
\\usepackage{color}
\\usepackage{mathrsfs, wasysym} % mathscfs donne accès aux lettres curvilignes
\\usepackage{pstricks,pstricks-add,pst-math,pst-xkey} % packages utiles pour le pstricks
\\usepackage{multirow,colortbl,tabularx} % packages utilisés dans un tableau (tabular)
\\usepackage{array}
\\usepackage{calc,fp}

\\makeatletter
\\define@key[psset]{}{transpalpha}{\\pst@checknum{#1}\\pstranspalpha}
\\psset{transpalpha=1}
\\def\\psfs@transp{%
  \\addto@pscode{/Normal .setblendmode \\pstranspalpha .setshapealpha }%
  \\psfs@solid}
%%%%%%%%%%%%%%%%%%%%%%%%%% Ceci sert lorsqu'on remplit une figure géométrique

\\newcounter{numero}
\\newcommand{\\partie}{
\\addtocounter{numero}{1}%
\\textbf{\\psframebox*[fillcolor=black!60]{\\textbf{\\white Partie \\arabic{numero}:}}}\\quad}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% incrémente le numéro de la partie

\\setlength\\leftmargini{0.73cm}
\\renewcommand{\\labelenumi}{\\psframebox*[fillcolor=black!25]{\\textbf{\\white{\\arabic{enumi}.}}}}
\\setlength\\leftmarginii{0.40cm}
\\renewcommand{\\labelenumii}{\\textbf{\\alph{enumii}.}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% définition des items

\\newcounter{degradecadre}
\\newcounter{ptinit}
\\newcounter{ptfin}
\\newcounter{ycadreinit}
\\newcounter{ycadrefin}
\\newcommand{\\cadre}[2]{\\begin{pspicture}(0,0)(19,1.4)
        \\multido{\\i=1+1}{16}{
                \\multido{\\n=1+1}{2}{
                        \\FPeval{\\degradecadre}{90-\\i*4}
                        \\FPeval{\\ptinit}{1.1875*(\\i-1)}
                        \\FPeval{\\ptfin}{1.1875*(\\i-1)+1.1875}
                        \\FPeval{\\ycadreinit}{(\\n-1)*1.4}
                        \\FPeval{\\ycadrefin}{(\\n-1)*1.4+0.1}
                        \\psframe[fillstyle=solid,fillcolor=black!\\degradecadre,linestyle=none](\\ptinit,\\ycadreinit)(\\ptfin,\\ycadrefin)}}
        \\psframe[fillstyle=solid,fillcolor=black!90,linestyle=none](0,0)(0.1,1.4)
        \\psframe[fillstyle=solid,fillcolor=black!26,linestyle=none](18.9,0)(19,1.4)
        \\rput(9.5,1){#1} \\rput(9.5,0.4){#2}
\\end{pspicture}\\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cadre et titre

\\newcounter{degrade}
\\newcounter{ptdepart}
\\newcounter{ptfinal}
\\def\\lignetirets{\\begin{pspicture}(0,0)(19,0.2)
        \\multido{\\i=1+1}{16}{
                \\FPeval{\\degrade}{90-\\i*4}
                \\FPeval{\\ptdepart}{1.2*(\\i-1)}
                \\FPeval{\\ptfinal}{1.2*(\\i-1)+1}
                \\psframe[fillstyle=solid,fillcolor=black!\\degrade,linestyle=none](\\ptdepart,0)(\\ptfinal,0.2)}
\\end{pspicture}\\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ligne tirets

\\renewcommand\\rmdefault{phv}

\\newcommand{\\procedure}[3]{
        \\setlength{\\arrayrulewidth}{1.8pt}
        \\begin{tabularx}{#1}[t]{|X}
                \\rowcolor[gray]{0.6}
                \\textcolor{white}{#2}\\\\ 
                \\cellcolor{gray!20}
                #3\\\\
         \\hline
        \\end{tabularx}
        \\setlength{\\arrayrulewidth}{0.6pt}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% crée les cadres pour Procédure; en paramètre, on met le texte

\\newcommand\\R{{\\mathbb R}} % les réels
\\newcommand\\Q{{\\mathbb Q}} % les rationnels
\\newcommand\\Z{{\\mathbb Z}} % les entiers relatifs
\\newcommand\\D{{\\mathbb D}} % les décimaux
\\newcommand\\N{{\\mathbb N}} % les entiers naturels
\\newcommand\\bC{{\\mathbb C}} % les complexes
\\newcommand\\bc{{\\mathscr C}} % pour les courbes
\\newcommand\\Pl{\\mathscr{P}} % pour les plans
\\newcommand\\Oij{$\\left(O;~\\vec{i},~\\vec{j}\\right)$} % pour nommer un repère (O;i,j)
\\newcommand\\cad{c'est-à-dire}
\\newcommand\\e{\\mathrm{e}} %pour écrire correctement le nombre e
\\renewcommand\\i{\\mathrm{i}} %pour écrire correctement le nombre i
\\renewcommand\\d{\\,\\text{d}} % pour avoir un d droit dans l'intégrale

\\newcommand{\\ve}[1]{\\overrightarrow{#1}} %pour les vecteurs
\\newcommand{\\Cnp}[2]{\\displaystyle{{#1 \\choose #2}}} % pour les p parmi n
\\newcommand{\\systeme}[2]{\\left\\{\\begin{array}{l}
        #1\\\\
        #2\\\\
\\end{array}\\right.} % pour créer un système de deux équations

\\makeatletter
\\newlength{\\@longarc}
\\newcommand{\\arc}[1]{\\settowidth{\\@longarc}{$#1$}
        \\addtolength{\\@longarc}{-0.2em}
        \\unitlength \\@longarc
        \\ensuremath{
                \\stackrel{\\begin{picture}(1,0.2)
                        \\qbezier(0,0)(0.5,0.2)(1,0)
                \\end{picture}}
                {#1}
        }}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%   Pour les listings de code et les réponses du logiciel


\\usepackage{bold-extra,fancyvrb}
\\usepackage[scaled=0.85]{luximono}
\\DefineVerbatimEnvironment{boxedverbatim}{Verbatim}{gobble=2,frame=single,framesep=4mm,label=\\textit{\\small
    Réponse du logiciel}}

\\definecolor{0.9white}{rgb}{0.9,0.9,0.9}
\\definecolor{0.2white}{rgb}{0.2,0.2,0.2}


\\lstloadlanguages{XCAS}
\\lstset{numbers=none,language=XCAS,xleftmargin=10pt,%
keywordstyle =\\color{0.2white}\\bfseries\\usefont{OT1}{cmtt}{b}{n},basicstyle=\\ttfamily,commentstyle=\\normalfont\\scriptsize\\itshape,%\\small,
    backgroundcolor=\\color{0.9white},breaklines=true}
   

\\newcommand\\Prog[1]{{\\bfseries\\ttfamily #1}}

\\newcommand{\\code}[1]{\\texttt{#1}}


% %%% un ; avec un peu d'espace autour pour les intervalles
\\newcommand{\\pv}{\\ensuremath{\\: ; \\,}}

%%%%%%%%%%%%%%%%%%%%% pour créer un arc de cercle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Début du document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\\begin{document}
\\setlength{\\unitlength}{1mm}

\\cadre{\\LARGE \\emph{"p" }}{\\Large \\emph{ }}



\\textbf{Compétences mathématiques\\::}\\par
        \\hspace{1cm} $\\bullet$  

\\textbf{Compétences informatiques\\::}\\par
        \\hspace{1cm} $\\bullet$  

\\textbf{Prérequis\\::}\\par
        \\hspace{1cm} $\\bullet$  

\\lignetirets


\\partie \\textbf{ }\\\\
\\procedure{\\linewidth}{Le problème}{ }

\\begin{enumerate}
\\item \\textbf{  }\\\\


\\end{enumerate}

\\end{document}



"))

;; TP xcas sur le site

("sitex"("
<tr><td>
<div class=\"menul\">
<ul class=\"itemsl\">
<li> <a href=\"http://gconnan.free.fr/les pdf/"p".pdf\">
<img src=\"./pdf.png\"width=\"22\" height=\"22\" border=\"0\" alt=\"\"> </a></li>

<li> <a href=\"http://gconnan.free.fr/les_sources/"p".tex\">
<img src=\"./tex.png\"width=\"22\" height=\"22\" border=\"0\" alt=\"\"> </a> </li>

<li><a  class=\"lien\"href=\"http://gconnan.free.fr/les pdf/"p"_capture.pdf\"style=\"text-decoration:none;color:#ffff00\">
 Visualisation session</a> </li>
<li><a  class=\"lien\"href=\"http://gconnan.free.fr/les_sources/"p".xws\"style=\"text-decoration:none;color:#ffff00\">
session XCAS</a></li>
 </ul>
</div>

 
<div class=\"contenu\">
<h1> titre </h1>
texte
</div>

</td>
</tr>

"))

;;; Preambule mini


("mini"("

\\documentclass[12pt]{article}
\\usepackage[height=250mm,width=183mm]{geometry}
\\usepackage[T1]{fontenc}
\\usepackage[french]{babel}
\\usepackage[upright]{fourier}
\\usepackage[xcas]{tablor}
\\usepackage{graphicx}



\\begin{document}
\\initablor

"p"

\\end{document}
"))




;;;;; pgiac




("pgiac"("


\\documentclass[12pt]{article}
\\usepackage[height=250mm,width=183mm]{geometry}
\\usepackage[T1]{fontenc}
\\usepackage[utf8]{inputenc}
\\usepackage[french]{babel}
\\usepackage[boldsans]{ccfonts}
\\usepackage{beton,euler}
\\usepackage{amsmath,amssymb,amsbsy,amsfonts,amstext,amscd,amsopn,amsxtra}
\\usepackage{listings,keystroke}
\\usepackage{xcolor,hyperref}
\\usepackage[french]{varioref}
\\usepackage[dvips,final]{graphicx}
%\\usepackage{bold-extra,fancyvrb}
%\\usepackage{luximono}
\\newcommand{\\ie}{\\leqslant}  % inferieur ou egal
\\newcommand{\\se}{\\geqslant}  % superieur ou egal




\\lstset{numbers=none,language=XCAS,xleftmargin=10pt,%
keywordstyle =\\color{red}\\usefont{OT1}{cmtt}{b}{n},basicstyle=\\ttfamily\\footnotesize\\color{red},commentstyle=\\normalfont\\scriptsize\\slshape,breaklines=true,backgroundcolor=\\color{0.9white}}


\\newcommand{\\MarqueCommandeGiac}[1]{%
    \\color{red}$>\\ $}
\\newcommand{\\MarqueLaTeXGiac}{%
    \\color{blue}}
\\newcommand{\\InscriptionFigureGiac}[1]{%
    \\begin{center}
        \\includegraphics[width=0.7\\linewidth]{#1}
    \\end{center}}

\\definecolor{0.6white}{rgb}{0.6,0.6,0.6}
\\definecolor{0.4white}{rgb}{0.4,0.4,0.4}
\\definecolor{0.8white}{rgb}{0.8,0.8,0.8}
\\definecolor{0.2white}{rgb}{0.2,0.2,0.2}
\\definecolor{0.9white}{rgb}{0.9,0.9,0.9}
%% On redéfinit l'allure des sections en gardant \\section, etc.

\\usepackage{sectsty}


\\sectionfont{\\LARGE \\sffamily\\color{0.2white}}
\\subsectionfont{\\sffamily\\color{0.4white}}
\\renewcommand\\thesection{\\Roman{section} -}
\\renewcommand\\thesubsection{\\arabic{subsection}. }
\\subsubsectionfont{\\sffamily\\color{0.6white}}
\\renewcommand\\thesubsubsection{\\alph{subsubsection}. }

\\title{"p"}

\\author{Guillaume CONNAN\\\\ \\href{http://tehessin.tuxfamily.org}{http://tehessin.tuxfamily.org}}

\\begin{document}


\\setlength{\\parindent}{0mm}

\\maketitle

%\\initablor

.gp string = text

.gp commande = listing




"p"


%\\nettoyer

\\end{document}

"))


;;
;;            TABLOR
;;;
;cas tableau de variation
      ("TV" (& > "\\begin{center}"n>
                 "\\begin{TV}" n>
"TV(["(p "debut de l'intervalle:")","(p "fin de l'intervalle:")"],"
                 "["(p "liste de valeurs interdites (,) :")"],"
                 "\""(p "nom de la fonction :")"\","
                 "\""(p "nom de la variable :")"\","
                 ""(p "expression de la fonction (utiliser x) :")","
""(p "type de tableau (1:complet, 0:sans signe, 2:que le signe) :")","
""(p "trigo ? (t:oui, n:non) :")","
                 "\\tv)" n>
               "\\end{TV}" n>
               "\\end{center}" > % ))
      ;cas TVI
      ("TVI" (& > "\\begin{center}"n>
                  "\\begin{TVI}" n>
"TVI(["(p "debut de l'intervalle:")","(p "fin de l'intervalle:")"],"
                  "["(p "liste de valeurs interdites (,) :")"],"
                  "\""(p "nom de la fonction :")"\","
                  "\""(p "nom de la variable :")"\","
                  ""(p "expression de la fonction (utiliser x) :")","
""(p "type de tableau (1:complet, 0:sans signe, 2:que le signe) :")","
""(p "trigo ? (t:oui, n:non) :")","
                  ""(p "f(x)=l pour la valeur l :")","
                  "\\tv)" n>
                  "\\end{TVI}" n>
                  "\\end{center}" > % ))
      ;cas signe produit
      ("TS" (& > "\\begin{center}"n>
                  "\\begin{TS}" n>
                  "TS(\""(p "nom du produit :")"\","
                 "["(p "liste des facteurs (,) :")"],"
        "["(p "debut de l'intervalle:")","(p "fin de l'intervalle:")"],"
        ""(p "trigo ? (t:oui, n:non) :")","
                  "\\tv)" n>
                  "\\end{TS}" n>
                  "\\end{center}" > % ))
      ;cas signe quotient
      ("TSq" (& > "\\begin{center}"n>
                  "\\begin{TSq}" n>
                  "TSq(\""(p "nom du quotient :")"\","
                  "["(p "liste des facteurs du numerateur (,) :")"],"
                  "["(p "liste des facteurs du denominateur (,) :")"],"
        "["(p "debut de l'intervalle:")","(p "fin de l'intervalle:")"],"
        ""(p "trigo ? (t:oui, n:non) :")","
                  "\\tv)" n>    
                  "\\end{TSq}" n>
                  "\\end{center}" > % ))

; Tableau signe court
 ("TSc" (& > "\\begin{center}"n>
                  "\\begin{TSc}" n>
                  "TSc("(p "expression :")",""["
(p "debut de l'intervalle:")","
(p "fin de l'intervalle:")"],""["
(p "liste de valeurs interdites (,) :")"],"""
(p "trigo ? (t:oui, n:non) :")","
                  "\\tv)" n>
                  "\\end{TSc}" n>
                  "\\end{center}" > % ))

       ;cas tableau de variation avec zone interdite
      ("TVZ" (& > "\\begin{center}"n>
                 "\\begin{TV}" n>
"TVZ(["(p "debut de l'intervalle:")","(p "fin de l'intervalle:")"],"
                 "["(p "liste de valeurs interdites (,) :")"],"
                  "["(p "liste des zones interdites ([,],[,]) :")"],"
                 "\""(p "nom de la fonction :")"\","
                 "\""(p "nom de la variable :")"\","
                 ""(p "expression de la fonction (utiliser x) :")","
""(p "type de tableau (1:complet, 0:sans signe, 2:que le signe) :")","
""(p "trigo ? (t:oui, n:non) :")","
                 "\\tv)" n>
               "\\end{TV}" n>
               "\\end{center}" > % ))
;cas TVP
      ("TVP" (& > "\\begin{center}"n>
                  "\\begin{TVI}" n>
"TVP(["(p "debut de l'intervalle:")","(p "fin de l'intervalle:")"],"
                  "[["(p "liste de valeurs interdites de x(t)(,) :")"],"
                   "["(p "liste de valeurs interdites de y(t)(,) :")"]],"
                  "[\""(p "nom de la fonction x :")"\","
                   "\""(p "nom de la fonction y :")"\"],"
                  "\""(p "nom de la variable :")"\","
                  "["(p "expression de la fonction x (utiliser t) :")","
                  ""(p "expression de la fonction y (utiliser t) :")"],"
""(p "type de tableau (1:complet, 0:sans signe, 2:que le signe) :")","
                  ""(p "t si fonctions trigo, n sinon :")","
                  "\\tv)" n>
                  "\\end{TVP}" n>
                  "\\end{center}" > % ))





;;;;;;; 1VARSTAT

; tableu

("tableu" (& > "\\begin{center}"n>
               "\\begin{pro-tableu}{"
(p"numero du tableau :")"}"n>        
"["
(p " liste des X :")"],["
(p " Effectif :")"]" n>
               "\\end{pro-tableu}" n>
               "\\end{center}" > % ))



; 1varstat



("1varstat" (& > "\\begin{center}"n>
               "\\begin{pro-1varstat}{"
(p"numero du tableau :")"}"n>          
"["
(p " liste des X :")"],["
(p " Effectif :")"]"n>
               "\\end{pro-1varstat}" n>
               "\\end{center}" > % ))



; moustache



("moustache" (& > "\\begin{center}"n>
               "\\begin{pro-moustache}{"
(p"numero de la boite :")"}"n>
"["
(p " liste des X :")"],["
(p " Effectif :")"],"
(p "xmin : ")","
(p "xmax : ")","
(p "unites par cm : ")","
(p "ecart legende x : ")","
(p "ecart grille x : ")","
 "[]" n>
               "\\end{pro-moustache}" n>
               "\\end{center}" > % ))





; batons




("batons" (& > "\\begin{center}"n>
               "\\begin{pro-batons}{"
(p"numero du graphique :")"}"n>        
"["
(p " liste des X :")"],["
(p " liste des Y :")"],"
(p "xmin : ")","
(p "xmax : ")","
(p "ymin : ")","
(p "ymax : ")","
(p "unites x par cm : ")","
(p "unites y par cm : ")","
(p "ecart legende y : ")","
(p "ecart grille y : ")","
 "[]" n>
               "\\end{pro-batons}" n>
               "\\end{center}" > % ))



; batons1e




("batons1e" (& > "\\begin{center}"n>
               "\\begin{pro-batons}{"
(p"numero du graphique  :")"}"n>
"["
(p " liste des X :")"],["
(p " liste des Y :")"],"
(p "xmin : ")","
(p "xmax : ")","
(p "ymin : ")","
(p "ymax : ")","
(p "unites x par cm : ")","
(p "unites y par cm : ")","
(p "ecart legende y : ")","
(p "ecart grille y : ")",[[\"ecart-type\","
(p "multiple de s : ")"]]"n>
               "\\end{pro-batons}" n>
               "\\end{center}" > % ))





;;;;; Pro -2varstat

;; nuage






("nuage" (& > "\\begin{center}"n>
               "\\begin{pro-nuage}{"
(p "numero du graphique : ")"}"n>
"["
(p " liste des X :")"],["
(p " liste des Y :")"],"
(p "xmin : ")","
(p "xmax : ")","
(p "ymin : ")","
(p "ymax : ")","
(p "unites x par cm : ")","
(p "unites y par cm : ")","
(p "ecart legende x : ")","
(p "ecart legende y : ")","
(p "ecart grille x : ")","
(p "ecart grille y : ")",[]" n>
               "\\end{pro-nuage}" n>
               "\\end{center}" > % ))



("lissage" (& > "\\begin{center}"n>
               "\\begin{pro-lissage}{"
(p "numero du graphique : ")"}"n>
"["
(p " liste des X :")"],["
(p " liste des Y :")"],"
(p "xmin : ")","
(p "xmax : ")","
(p "ymin : ")","
(p "ymax : ")","
(p "unites x par cm : ")","
(p "unites y par cm : ")","
(p "ecart legende x : ")","
(p "ecart legende y : ")","
(p "ecart grille x : ")","
(p "ecart grille y : ")",[\"mcc\","
(p "ordre du lissage : ")",[\""
(p "couleur : ")"\"],[\"texte-libre\",["
(p "coordonnees de la legende : ")"],\""
(p "position de la legende : ")"\",\""
(p "couleur de la legende : ")"\"]]"n>
               "\\end{pro-lissage}" n>
               "\\end{center}" > % ))




;;;; PRO-STATDIV

; pro-camembert


("camembert" (& > "\\begin{center}"n>
               "\\begin{pro-camembert}{"
(p "numero du diagramme : ")"}"   n>
"["
(p " label des X :")"],["
(p " Effectif :")"],"
(p " rayon du camembert : ")",[]" n>
               "\\end{pro-camembert}" n>
               "\\end{center}" > % ))



("tablecam" (& > "\\begin{center}"n>
               "\\begin{pro-tablecam}{"
(p "numero du tableau : ")"}" n>
"\""
(p "titre " )"\",["
(p " label des X :")"],["
(p " Effectif :")"]" n>
               "\\end{pro-tablecam}" n>
               "\\end{center}" > % ))




("baton" (& > "\\begin{center}"n>
               "\\begin{pro-batonslabel}{"
(p "numero du diagramme : ")"}" n>
"["
(p " label des X :")"],["
(p " Effectif :")"],"
(p "ymin,ymax :")","
(p "ux,uy : ")","
(p "ecart legende y : ")","
(p "ecart grille y : ")",[[\"texte-ordonnees\",\""
(p "texte ordonnees : ")"\"]]"n>
               "\\end{pro-batonslabel}" n>
               "\\end{center}" > % ))





("micamembert" (& > "\\begin{center}"n>
               "\\begin{pro-micamembert}{"
(p "numero du diagramme : ")"}"   n>
"["
(p " label des X :")"],["
(p " Effectif :")"],"
(p " rayon du camembert : ")",[]" n>
               "\\end{pro-micamembert}" n>
               "\\end{center}" > % ))



("tablemicam" (& > "\\begin{center}"n>
               "\\begin{pro-tablemicam}{"
(p "numero du tableau : ")"}" n>
"\""
(p "titre " )"\",["
(p " label des X :")"],["
(p " Effectif :")"]" n>
               "\\end{pro-tablemicam}" n>
               "\\end{center}" > % ))




("tablehisto" (& > "\\begin{center}"n>
               "\\begin{pro-tablehisto}{"
(p "numero du tableau : ")"}" n>
"["
(p " Bornes des X :")"],["
(p " Effectif :")"]" n>
               "\\end{pro-tablehisto}" n>
               "\\end{center}" > % ))





("histo" (& > "\\begin{center}"n>
               "\\begin{pro-histogramme}{"
(p "numero du diagramme : ")"}" n>
"["
(p " bornes des X :")"],["
(p " Effectifs :")"],"
(p "xmin,xmax :")","
(p "hauteur en cm :")","
(p "ux : ")","
(p "ecart legende x, ecart legende y : ")","
(p "ecart grille x, ecart grille y : ")",[[\"texte-ordonnees\",\""
(p "texte ordonnees : ")"\"]]"n>
               "\\end{pro-histogramme}" n>
               "\\end{center}" > % ))












; PRO-COURBES

; pro-courbefn

("courbefn" (& > "\\begin{center}"n>
"\\begin{pro-courbefn}{"(p " numero de la courbe : ")"}" n>
"["(p " expression de la fonction (var x) :")",\""
(p " couleur : ")"\",["
(p " x debut courbe,x fin courbe :")",\""
(p " bornes ouvertes/fermees (oo, of,fo,ff) :")"\"]],"
(p "xmin,xmax,ymin,ymax :")","
(p "ux,uy (les unites) :")","
(p "cx,cy (ecarts entre deux graduations) :")","
(p "gx,gy (ecarts entre deux lignes du quadrillage) :")",[[\"texte-courbe\","
(p "abscisse de la légende :")",\""
(p "legende en code latex (remplacer \\ par @) :")"\",\""
(p "position de la legende (bot,top,lft,rt,llft,lrt,urt,ulft) :")"\",\""
(p "couleur de la legende  :")"\"],[\"titre-droite\",\""
(p "titre en haut a droite en code latex (remplacer \\ par @)  :")"\"],[\"titre-gauche\",\""
(p "titre en haut a gauche en code latex (remplacer \\ par @)  :")"\"],[\"tangente\","
(p "abscisse du pt de tangence : ")",\""
(p "nom du point de tang. en code latex : ")"\",\""
(p "position de la legende (bot,top, etc.) : ")"\",\""
(p "couleur de la tangente : ")"\","
(p "longueur d'une 1/2 tang. : ")"],[\"asymp-obli\","
(p "expression de l'asymptote oblique (var x) : ")",["
(p "au voisinage de (sep ,) :")"],\""
(p "couleur de l'asymptote : ")"\"],[\"asymp-verti\","
(p "equation y=  : ")",[-infinity,+infinity],\""
(p "couleur de l'asymptote : ")"\"],[\"asymp-hori\","
(p "equation x=  : ")",["
(p "au voisinage de (sep ,) :")"],\""
(p "couleur de l'asymptote : ")"\"],[\"aire-sous-courbe\","
(p "xmin,xmax  : ")",\""
(p "couleur du domaine : ")"\"],[\"riemann\","
(p "xmin,xmax,nb de rectangles,  : ")",\""
(p "min ou max ? ")"\",\""
(p "couleur du domaine : ")"\"],[\"point-courbe\","
(p "abscisse du point de la courbe : ")",\""
(p "nom du point de la courbe au format latex : ")"\",\""
(p "position de la legende (bot, top, etc.) :")"\",\""
(p "couleur de la legende : ")"\",[\""
(p "x pour seulement la legende x, xy siles 2 : ")"\"]],[\"point-libre\"[,"
(p "abscisse,ordonnee du point de la courbe au format giac : ")"],\""
(p "nom du point de la courbe au format latex : ")"\",\""
(p "position de la legende (bot, top, etc.) :")"\",\""
(p "couleur de la legende : ")"\",[\""
(p "x pour seulement la legende x, xy siles 2 : ")"\",\""
(p "abscisse au format latex : ")"\",\""
(p "ordonnee au format latex : ")"\"]]]" n>
"\\end{pro-courbefn}" n>
 "\\end{center}" > % ))





;;; alterqcm

( "alterqcm" ( & >
       "\\begin{alterqcm}[" ( p "Options: ") "]" n  
       "\\AQquestion[" (p "Options: ") "]{" p "}" "{\% " n 
       "{}""," n 
       "{}" n 
       "}"  n 
       "\\end{alterqcm}"  >%))


( "aq" ( & >
        "\\AQquestion[" (p "Options: ") "]{" p "}" "{\% " n
        "{}""," n 
       "{}" n 
       "}"  n 
        > %))



;;;; encadres

("def" (& >
"\\begin{figure}[!h]"n>
"\\begin{Definition}[" (p " titre ? ")"]" n>
    p n>
"\\end{Definition}"n>
"\\end{figure}" > % ))
            

("prop" (& >
"\\begin{figure}[!h]"n>
"\\begin{Propriete}[" (p " titre ? ")"]" n>
    p n>
"\\end{Propriete}"n>
"\\end{figure}" > % ))
            


("rem" (& >
"\\begin{figure}[!h]"n>
"\\begin{Remarque}[" (p " titre ? ")"]" n>
    p n>
"\\end{Remarque}"n>
"\\end{figure}" > % ))


("exem" (& >
"\\begin{figure}[!h]"n>
"\\begin{Exemple}[" (p " titre ? ")"]" n>
    p n>
"\\end{Exemple}"n>
"\\end{figure}" > % ))
            


("id" (& >
"\\begin{figure}[!h]"n>
"\\begin{Idee}{" (p " titre ? ")"}" n>
    p n>
"\\end{Idee}"n>
"\\end{figure}" > % ))
            


("dan" (& >
"\\begin{figure}[!h]"n>
"\\begin{DANGER}[" (p " titre ? ")"]" n>
    p n>
"\\end{DANGER}"n>
"\\end{figure}" > % ))
            


("the" (& >
"\\begin{figure}[!h]"n>
"\\begin{Theoreme}[" (p " titre ? ")"]" n>
    p n>
"\\end{Theoreme}"n>
"\\end{figure}" > % ))
            


("ret" (& >
"\\begin{figure}[!h]"n>
"\\begin{Retenir}[" (p " titre ? ")"]" n>
    p n>
"\\end{Retenir}"n>
"\\end{figure}" > % ))
            



("pb" (& >
"\\begin{figure}[!h]"n>
"\\begin{Probleme}[" (p " titre ? ")"]" n>
    p n>
"\\end{Probleme}"n>
"\\end{figure}" > % ))
            


;;;;; autres commandes

("bloc" (& > "\\begin{block}{"
           (p "titre du bloc : ")"}"n>
                "\\end{block}" > % ))
           




;;; preambule utf8 cours

("precours" ("
\\documentclass[10pt,a4paper,twoside]{article}
\\usepackage[height=250mm,width=183mm]{geometry}
\\usepackage{picins}
\\usepackage{fancyvrb,amsmath,amssymb,amsbsy,amsfonts,amstext,amscd,amsopn,amsxtra}
\\usepackage[utf8x]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage[upright]{fourier}
      \\let\\danger\\undefined
        \\DeclareMathSymbol{\\mthdotlessiup}{\\mathalpha}{operators}{25}%

        \\DeclareMathSymbol{\\mthdotlessiup}{\\mathalpha}{operators}{16}%
\\usepackage[pdftex]{color,graphicx}    
\\newcommand{\\eme}{\\textsuperscript{e}}

\\usepackage[frenchb]{babel}

\\usepackage{fancyhdr,bclogo}
\\usepackage{listings}

\\usepackage[french]{varioref}

\\usepackage[super,idem=strict,ibidem=name]{jurabib}
\\usepackage{url}
\\bibliographystyle{jurabib}

\\usepackage[pdftex,bookmarks,colorlinks]{hyperref}

\\usepackage{manfnt,marvosym,bbding,ifsym}


\\setlength{\\headheight}{12.5pt}



\\usepackage{xcolor}
\\definecolor{0.6white}{rgb}{0.6,0.6,0.6}
\\definecolor{0.4white}{rgb}{0.4,0.4,0.4}
\\definecolor{0.8white}{rgb}{0.8,0.8,0.8}
\\definecolor{0.2white}{rgb}{0.2,0.2,0.2}


\\usepackage{sectsty}


\\sectionfont{\\LARGE \\sffamily\\color{0.2white}}
\\subsectionfont{\\sffamily\\color{0.4white}}
\\renewcommand\\thesection{\\Roman{section} -}
\\renewcommand\\thesubsection{\\alph{subsection}. }
\\subsubsectionfont{\\sffamily\\color{0.6white}}
\\renewcommand\\thesubsubsection{\\roman{subsection}. }

\\newcommand{\\xcas}{\\lstset{numbers=none,language=mupad,xleftmargin=10pt,%
keywordstyle =\\color{0.2white}\\usefont{OT1}{cmtt}{b}{n},basicstyle=\\ttfamily,commentstyle=\\normalfont\\scriptsize\\slshape,
    backgroundcolor=\\color{0.8white},breaklines=true}
}

% %%% un ; avec un peu d'espace autour pour les intervalles
\\newcommand{\\pv}{\\ensuremath{\\: ; \\,}}

\\newcommand{\\NoLecon}{}
\\newcommand{\\NomSection}{}
\\newcommand{\\NomChap}{}
\\newcommand{\\NomLecon}{}
\\newcommand{\\NumLecon}{}


%%%%%%%%%%%%%%%%%NUL
%%%   LECOND{numero}{ecrire  trucieme}{titre}{suite   du  titre   en  dessous}{titre   en   un  seul
%%% morceau}{image sur le côté}


\\newcommand{\\LECOND}[6]{
%\\setcounter{pb}{0}\\setcounter{sec}{0}\\setcounter{num}{0}\\setcounter{solnum}{0}
%\\setcounter{Def}{0}\\setcounter{Prop}{0}\\setcounter{Th}{0}
\\renewcommand{\\NomLecon}{#5}
\\renewcommand{\\NumLecon}{#1}\\renewcommand{\\NoLecon}{#2}
%\\thispagestyle{empty}
\\begin{minipage}[t]{0.75\\textwidth}\\vspace{0cm}
\\begin{center}
%\\pscharpath[linestyle=none,fillstyle=gradient,gradbegin=black,gradend=bleu,gradmidpoint=0.5]
\\textcolor{0.4white}{\\LARGE\\textsc{#2 Le\\c con}}\\\\
\\bigskip\\bigskip\\bigskip
\\textcolor{0.4white}{\\bfseries \\Huge{ #3}} \\\\ 
\\textcolor{0.4white}{\\bfseries\\Huge{ #4}}   
%\\addcontentsline{toc}{chapter}{\\protect\\numberline{}{\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\! \\textcolor{bleu}{\\textsc{#2\\ \\ Leçon} : \\ #5}} \\ \\sm}
\\end{center}
\\end{minipage}
\\begin{minipage}[t]{0.3\\textwidth}\\vspace{0cm}      % �rajouter si on veut une illustration
\\hspace{-1.5cm}
\\includegraphics[width=\\textwidth]{#6}
\\end{minipage}
}

\\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}}

\\newcommand{\\sm}{\\smallskip} 



% %%% Fraction en oblique
\\newcommand{\\ofr}[2]{%
        \\raisebox{0ex}{$#1$}\\negthinspace\\slash
        \\raisebox{-.5ex}{$#2$}}



\\newcommand{\\ie}{\\leqslant}  % inf�ieur ou �al
\\newcommand{\\se}{\\geqslant}  % sup�ieur ou �al



\\newcommand\\ath[1]{\\foreignlanguage{greek}{\\athnum{#1}}}



\\fancyfoot[C]{{\\scriptsize\\textsl{ 1\\textsuperscript{ère} ES1- Lycée Jean \\textsc{Perrin} - 2008/2009 }}}
 \\fancyhead[RO,LE]{\\thepage} \\fancyhead[RE,LO]{ }
 \\fancyhead[CO]{ \\sffamily\\MakeLowercase{\\leftmark} } 
  \\fancyhead[CE]{\\large\\textbf{STATISTIQUES } }
\\renewcommand{\\headrulewidth}{0.4pt}
 \\pagestyle{fancy}









\\usepackage{tabularx}

%%%%%%% Colonne épaisse
\\newcolumntype{I}{!{\\vrule width 2pt}}

%%%%%%%%%%%%%%% ligne épaisse
\\newlength\\savedwidth
\\newcommand\\whline{\\noalign{\\global\\savedwidth\\arrayrulewidth
                                             \\global\\arrayrulewidth 2pt}%
                                 \\hline
                                 \\noalign{\\global\\arrayrulewidth\\savedwidth}}




%%%%%%%%%%%%% entete tableau normal
\\newcolumntype{N}[1]{  I@{\\vrule height.5cm width0pt depth.2cm\\hspace{.5cm}}c@{\\hspace{.5cm}}I@{\\vrule height.5cm width0pt depth.2cm\\hspace{.5cm}}c@{\\hspace{.5cm}}*#1{|@{\\vrule height.5cm width0pt depth.2cm\\hspace{.5cm}}c@{\\hspace{.5cm}}}I  }

\\setlength\\extrarowheight{4pt}

\\renewcommand\\tabularxcolumn[1]{m{#1}}  % pour centrer verticalement
\\newcolumntype{Z}{>{\\centering\\arraybackslash}X} % pour centrer horizontalement
\\newcolumntype{Y}[1]{IcIZ*{#1}{|Z} I}


\\newcommand{\\vtabb}{\\rule[-1.3em]{0pt}{4em}}






\\usepackage{casio,ti83font,keystroke,xlop} 


\\graphicspath{{/home/moi/Photos/Tehessin/}{/home/moi/Figures/FigSeconde/}{/home/moi/Figures/FigSeconde/20078/}{/home/moi/Photos/Maths/}}

%%% pointillé


\\usepackage{docacompleter}



\\newcommand{\\cacheb}[1]{\\dotfill\\textcolor{white}{#1}\\textcolor{white}{#1}}
\\newcommand{\\cacheg}[1]{\\dotfill\\textcolor{0.9white}{#1}\\textcolor{0.9white}{#1}}
\\newcommand{\\cachegg}[1]{\\dots\\dots\\textcolor{0.8white}{#1}\\textcolor{0.8white}{#1}}

% \\renewcommand{\\cacher}{}
% \\renewcommand{\\cacheg}{}
% \\renewcommand{\\cachegg}{}
% \\renewcommand{\\cacheb}{}



%%% bclogo


% petits environnements bclogo

\\newcounter{remar}\\newcounter{exem}\\newcounter{definit}\\newcounter{propri}
\\newcounter{theor}


\\newenvironment{DANGER}[1][Attention !]{%
\\begin{bclogo}{\\danger}{#1}{0.9white}{0.1}{0}}
{\\end{bclogo}}

\\newenvironment{Idee}[1]{%
\\begin{bclogo}{\\coeur}{#1}{0.9white}{0.1}{0}}
{\\end{bclogo}}


\\newenvironment{Remarque}[1][]{%
\\refstepcounter{remar}
\\begin{bclogo}{\\note}{Remarque \\theremar\\ : #1}{0.9white}{0.1}{0}}
{\\end{bclogo}}



\\newenvironment{Exemple}[1][]{%
\\refstepcounter{exem}
\\begin{bclogo}{\\panchant}{Exemple \\theexem\\ : #1}{0.9white}{0.1}{0}}
{\\end{bclogo}}



\\newenvironment{Definition}[1][]{%
\\refstepcounter{definit}
\\begin{bclogo}{\\orne}{Définition \\thedefinit\\ : #1}{0.9white}{0.1}{0}}
{\\end{bclogo}}




\\newenvironment{Propriete}[1][]{%
\\refstepcounter{propri}
\\begin{bclogo}{\\etoile}{Propriété \\thepropri\\ : #1}{0.9white}{0.1}{0}}
{\\end{bclogo}}




\\newenvironment{Theoreme}[1][]{%
\\refstepcounter{theor}
\\begin{bclogo}{\\fleur}{Théorème \\thetheor\\ : #1}{0.9white}{0.1}{0}}
{\\end{bclogo}}




%\\DeclareGraphicsRule{*}{mps}{*}{}

\\fancyfoot[C]{{\\scriptsize\\textsl{ "p"- Lycée Jean \\textsc{Perrin} - 2008/2009 }}}
 \\fancyhead[RO,LE]{\\thepage} \\fancyhead[RE,LO]{ }
 \\fancyhead[CO]{ \\sffamily\\MakeLowercase{\\leftmark} } 
  \\fancyhead[CE]{\\large\\textbf{STATISTIQUES } }
\\renewcommand{\\headrulewidth}{0.4pt}
 \\pagestyle{fancy}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%     FIN DU PREAMBULE

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\\begin{document}
\\setlength{\\parindent}{0pt}
\\thispagestyle{empty}

%\\xcas

\\LECOND{"p" }{ ième}{ }{}{ }{}



\\end{document}

"))













     
     
      ));;Here LaTeX commands tags


;; some local key. 
;; The most important is f3 to complete your tag's.
(add-hook 'LaTeX-mode-hook
  (function
   (lambda ()
     (define-key LaTeX-mode-map [C-M-right] 'tempo-forward-mark)
     (define-key LaTeX-mode-map [C-M-left]  'tempo-backward-mark)
     (define-key LaTeX-mode-map [f3] 'tempo-complete-tag))))

(provide 'latex-tempo)
;;; latex-tempo ends here