Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog

Latex les sous figures

2 Décembre 2008 , Rédigé par Roger Bunivot Publié dans #Latex

L'environnement figure ne me suffisait pas j'en ai créé deux de plus:


\DeclareNewFloatType{spectre}{name=Spectre,within=chapter}
\DeclareNewFloatType{code}{name=Src,within=chapter}



Puis j'ai voulu pouvoir faire des sous-figures ou des sous spectres.


et mettre en italique les légendes.

Pour les sous-figures j'utilise le package subfigure:


\usepackage{subfigure}


\makeatletter
\renewcommand*{\subcapfont}{\it}
  \renewcommand{\p@subfigure}{}
  \renewcommand{\thesubfigure}{\thefigure.\alph{subfigure}
  }
  \renewcommand{\@thesubfigure}{%
  \thesubfigure -- \hskip\subfiglabelskip%
    }


% % % % % %     nouveau compteur
  \newcounter{subspectre}[spectre]
  \newif\ifspectretopcap
  \newif\ifsubspectretopcap


% % % % % %   retourné par ref
  \renewcommand{\p@subspectre}{\thespectre}
  \renewcommand{\thesubspectre}{\thespectre.\alph{subspectre}}


% % % % %   legende
  \newcommand{\@thesubspectre}{%
  \thespectre.\alph{subspectre}\hskip}
  \renewcommand{\@thesubspectre}{\thesubspectre -- \hskip\subfiglabelskip}
   
% % % %    liste  de figure
  \newcommand{\@@thesubspectre}{\thespectre}
  \newcommand{\ext@subspectre}{\ext@spectre}
  \newcommand{\l@subspectre}{\@dottedxxxline{\ext@subspectre}{2}{3.8em}{2.5em}}
  \newcounter{lomdepth}
  \setcounter{lomdepth}{1}
  \newcommand{\subspectre}{\subfigure}
  \newcommand{\@makesubspectrecaption}{\@makesubfigurecaption}
  \ifhyperrefloaded
    \newcommand\theHsubspectre{\thespectre.\arabic{subspectre}}
    \newcommand{\toclevel@subspectre}{1}

  \fi
\makeatother


Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article