Skip to content

Instantly share code, notes, and snippets.

@erickedji
Created May 8, 2009 15:20
Show Gist options
  • Save erickedji/108822 to your computer and use it in GitHub Desktop.
Save erickedji/108822 to your computer and use it in GitHub Desktop.
LaTeX document utilities
%% Macros d'utilité générale pour documents LaTeX
%%
%% Eric KEDJI <eric.kedji@gmail.com>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% START - macros
\newcommand{\nom}[1]{\textsc{\texttt{#1}}}
\newcommand{\pagevide}{\titlepage\phantom{INVISIBLE}\endtitlepage}
\newcommand{\capture}[4]{
\begin{figure}[#2]
\centering
\includegraphics[width=#3]{#1}
\caption{#4 \label{#1}}
\end{figure}
}
% intro et conclusion de chapitre
\newcommand{\introduction}[1]{\emph{#1}}
\newcommand{\conclusion}[1]{\emph{#1}}
% eviter l'espace après les deux points dans une url
\let\urlorig\url
\renewcommand{\url}[1]{%
\begin{otherlanguage}{english}\urlorig{#1}\end{otherlanguage}%
}
% définition pour pouvoir spécifier le format d'une ligne entière
\newcolumntype{+}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
% citer plus simplement
\newcommand{\aquote}[2]{
\begin{quote}
\emph{``#1''} \\
-- #2.
\end{quote}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END - macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% START - new environments
\newenvironment{remerciement}{%
\titlepage
\null\vfil
\begin{center}%
\bfseries Remerciements
\end{center}}%
{\par\vfil\null\endtitlepage}
\newcommand{\gitem}[1]{\item[\nom{#1}:]}
\newenvironment{glossaire}{%
\titlepage
\chapter*{Glossaire}\begin{description}}%
{\end{description}\endtitlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END - new environments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment