Quickies

[categories] [index] [all (527)] [latest]

LaTeX
  1. En mode mathématique.

    m(i) = \left\{
        \begin{array}{ll}
            c_{si} & \mbox{si } \{s,i\} \in E \\
            \infty & \mbox{sinon}
        \end{array}
    \right
    

    Exactement la même chose, mais avec le paquetage amsmath :

    m(i) = \begin{cases}
           c_{si} & \text{si } \{s,i\} \in E \\
           \infty & \text{sinon}
           \end{cases}
    
  2. En mode mathématique.

    n \cdot
    \underbrace{\ln \left( \frac{35}{36} \right)}_{\mbox{\footnotesize{toujours }}< 0}
    < \overbrace{\ln \left(\frac{1}{2} \right)}^{\simeq -0.693}
    
  3. Avec les paquetages algorithmic et algorithm.

    %%% francisation des algorithmes
    \renewcommand{\algorithmicrequire} {\textbf{\textsc{Entrées:}}}
    \renewcommand{\algorithmicensure}  {\textbf{\textsc{Sorties:}}}
    \renewcommand{\algorithmicwhile}   {\textbf{tantque}}
    \renewcommand{\algorithmicdo}      {\textbf{faire}}
    \renewcommand{\algorithmicendwhile}{\textbf{fin tantque}}
    \renewcommand{\algorithmicend}     {\textbf{fin}}
    \renewcommand{\algorithmicif}      {\textbf{si}}
    \renewcommand{\algorithmicendif}   {\textbf{finsi}}
    \renewcommand{\algorithmicelse}    {\textbf{sinon}}
    \renewcommand{\algorithmicthen}    {\textbf{alors}}
    \renewcommand{\algorithmicfor}     {\textbf{pour}}
    \renewcommand{\algorithmicforall}  {\textbf{pour tout}}
    \renewcommand{\algorithmicdo}      {\textbf{faire}}
    \renewcommand{\algorithmicendfor}  {\textbf{fin pour}}
    \renewcommand{\algorithmicloop}    {\textbf{boucler}}
    \renewcommand{\algorithmicendloop} {\textbf{fin boucle}}
    \renewcommand{\algorithmicrepeat}  {\textbf{répéter}}
    \renewcommand{\algorithmicuntil}   {\textbf{jusqu'à}}
    
    \floatname{algorithm}{Algorithme}
    
    \let\mylistof\listof
    \renewcommand\listof[2]{\mylistof{algorithm}{Liste des algorithmes}}
    
    % pour palier au problème de niveau des algos
    \makeatletter
    \providecommand*{\toclevel@algorithm}{0}
    \makeatother
    
    %\listofalgorithms % pour lister les algos (après la toc)
    

    ...

    \begin{algorithm}
    \caption{Algorithme d'Euclide}
    \begin{algorithmic}
    %%-----------------------------------------------
    \REQUIRE $a, b \in {\mathbb N}$         % demande le paq. amssymb
    \ENSURE le pgcd de $a$ et $b$
    
    \STATE $x \leftarrow \textrm{max}(a,b)$
    \STATE $y \leftarrow \textrm{min}(a,b)$
    
    \WHILE {$y \neq 0$}
       \STATE $x \leftarrow y$
       \STATE $y \leftarrow x \mod y$       % demande le paq. amsmath
    \ENDWHILE
    
    \STATE Retourner $x$.
    %%-----------------------------------------------
    \end{algorithmic}
    \end{algorithm}
    
  4. \begin{flushleft}
    Voie lactée ô soeur lumineuse \\
    Des blancs ruisseaux de Chanaan
    \end{flushleft}
    
    \begin{flushright}
    Et des corps blancs des amoureuses \\
    Nageurs morts suivrons-nous d'ahan
    \end{flushright}
    
    \begin{center}
    Ton cours vers d'autres nébuleuses
    \end{center}
    
  5. Avec le paquetage pst-tree.

    \pstree{\Tcircle{A}}
           {\pstree{\Tcircle{B}}
                   {\Tcircle{D}
                    \Tcircle{E}}
            \pstree{\Tcircle{C}}
                   {\Tcircle{F}
                    \Tcircle{G}}}
    
  6. Avec le paquetage pst-all (pas besoin de charger color).

    \definecolor{macouleur}{rgb}{0.75, 0.75, 1.0}
    

    ...

    \newcommand{\B}[1]{\Tr{\psframebox{#1}}} % boite
    \newcommand{\C}[1]{\Tcircle{#1}}         % cercle
    \newcommand{\N}[1]{\Tr{#1}}              % normal
    %\newcommand{\T}[1]{\Ttri{#1}}           % triangle
    % triangle qui s'accroche par le haut (sous-arbres...)
    \newcommand{\T}[2][]{\Tr[ref=t]{\pstribox[#1]{#2}}}
    % cercle coloré
    \newcommand{\CC}[1]{\Tcircle[fillstyle=solid,fillcolor=macouleur]{#1}}
    
    % syntaxe : \pstree{le père}{les fils}
    \pstree{\C{titi}}
        {
            \B{toto}
            \pstree[levelsep=1cm]{\CC{tata}}
                {
                    \B{tutu}
                    \N{pipo}
                    \T{tonton}
                }
        }
    
  7. Avec le paquetage pst-tree.

    \newcommand{\C}[1]{\Tr{\psframebox{#1}}} % carré
    \newcommand{\R}[1]{\Tcircle{#1}}         % rond
    \newcommand{\N}[1]{\Tr{#1}}              % normal
    % syntaxe : \pstree{le père}{les fils}
    \pstree[treemode=R]{\R{titi}}
        {
            \C{toto}
            \pstree{\R{tata}}
                {
                    \C{tutu}
                    \R{345}
                    \N{tonton}
                }
        }
    
  8. Avec les paquetage pst-tree.

    \newcommand{\N}{\Tcircle[fillstyle=solid,fillcolor=black]{ }}
    \newcommand{\B}{\Tcircle[fillstyle=solid,fillcolor=white]{ }}
    
    \pstree[treemode=R]{\Tr{}}
           {
                \pstree{\B^{3/5}}
                {
                    \pstree{\B^{2/4}}
                    {
                        \pstree{\B^{1/3}}
                        {
                            \N_{2/2}
                        }
                        \N_{2/3}
                    }
                    \N_{2/4}
                }
                \N_{2/5}}
    
  9. Avec le paquetage vaucanson-g:

    \MediumPicture\VCDraw{% 
    \begin{VCPicture}{(0,-4)(4,4)}
    % states
    \State[1]{(0,0)}{1}
    \State[2]{(8,0)}{2}
    \FinalState[3]{(4,0)}{3}
    \State[4]{(0,-4)}{4}
    \FinalState[5]{(4,-4)}{5}
    % initial--final
    \Initial{1}
    %\Final{10}
    % transitions 
    \EdgeL{1}{3}{a}
    \EdgeL{1}{4}{b}
    \EdgeL{1}{5}{c}
    \ArcL{2}{3}{a}
    \EdgeL{2}{5}{c}
    \LoopN{3}{a}
    \ArcL{3}{2}{b}
    \ArcL{3}{5}{c}
    \ArcL{4}{5}{c}
    \ArcL{5}{3}{a}
    \ArcL{5}{4}{b}
    \LoopS{5}{c}
    \end{VCPicture}
    }
    
  10. Une manière simple et élégante d'écrire les siècles, proposée par A. Chambert-Loir sur fr.comp.text.tex :

    Avec la macro code128:

    \def\siecle#1{\textsc{\romannumeral #1}\textsuperscript{e}~siècle}
    

    ...

    Depuis le \siecle{19}, tout va mal !
    
  11. Avec la police French Cursive, les paquetages color et frcursive.

    Police créée par Emmanuel Beffara.

    \renewcommand{\seyesDefault}{\color{blue}}
    

    ...

    \begin{document}
    

    ...

    \begin{cursive}
      Vive l'école maternelle !
    
      \textbf{Gras}
      \textit{Italique} 
      \textcal{Calligraphie} % \calserie Calligraphie
    \end{cursive}
    
    \begin{quote}
      \cursive
      \seyes{Lignes normales.}
    \end{quote}
    
    \begin{quote}
      \cursive\acadshape
      \seyes[\color{red}]{Lignes comme au tableau.}
    \end{quote}
    
  12. en mode mathématique

    \left\{ \begin{array}{rrrrr}
       -9a & -2b & +6c & = & 11a \\
        6a & -6b & +7c & = & 11b \\
        2a & +9b & +6c & = & 11c
       \end{array}
    \right
    
  13. \begin{eqnarray*}
    \cos 2\theta & = & \cos^2 \theta - \sin^2 \theta \\
                 & = & 2 \cos^2 \theta - 1
    \end{eqnarray*}
    
  14. Avec la macro code128.

    \input code128
    \codetext{021\ seriot.ch} % avec texte
    %\code{021\ seriot.ch} % sans texte
    
  15. Avec la macro ean.

    \input ean13
    \ISBN 2-88074-488-1  \EAN 9-782880-744885
    

    ...

    \input ean8
    \EAN 1234-5670
    
  16. Avec le paquetage scrtime.

    Nous sommes le \today, il est \thistime.
    

    Sans paquetage particulier.

    % ----------------------------------------------------------------------
    % TIME OF DAY - Nelson Beebe - http://www.math.utah.edu/~beebe/
    \newcount\hh
    \newcount\mm
    \mm=\time
    \hh=\time
    \divide\hh by 60
    \divide\mm by 60
    \multiply\mm by 60
    \mm=-\mm
    \advance\mm by \time
    \def\hhmm{\number\hh:\ifnum\mm<10{}0\fi\number\mm}
    % ----------------------------------------------------------------------
    

    ...

    Nous sommes le \today, il est \hhmm.
    
  17. Avec le paquetage example:

    \begin{example}
    $$
    \sum_{n=1}^{10} \cdot
    \int_a^b e^{x} ~ dx
    $$
    \end{example}
    
  18. Avec le paquetage graphicx:

    \begin{figure}
    \begin{minipage}[t]{.4\linewidth}
        \begin{center}
           \includegraphics[scale=0.5]{images/nb_abo.ps}
           \caption{nombre d'abonnements au téléphone}
           \label{nbabo}
        \end{center}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{.4\linewidth}
        \begin{center}
           \includegraphics[scale=0.5]{images/croiss_nb_abo.ps}
           \caption{croissance du nombre d'abonnements au téléphone}
           \label{croissnbabo}
        \end{center}
    \end{minipage}
    \end{figure}
    
  19. (en mode mathématique)

    % http://www.ctan.org/tex-archive/macros/eplain/
    \def\fract#1/#2{\leavevmode
       \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}%
       \kern-.1em $/$%
       \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}%
    }% 
    

    ...

    9\frac{1}{2}
    

    ...

    9\fract 1/2
    
  20. Avec les paquetages epic, eepic et eclbip.

    \begin{bipartite}
       {1cm} % largeur étiquettes gauches
       {2cm} % largeur graphe
       {3cm} % largeur étiquettes droites
       {3mm} % hauteur max entre 2 noeuds
       {5mm} % larg. entre noeud et étiq.
    
    \leftnode{a}
    \leftnode{b}
    \leftnode{c}
    \rightnode[1]{chien}
    \rightnode[2]{chat}
    \rightnode[3]{lapin}
    \rightnode[4]{renard}
    \brush{\drawline}
    \match{b}{2}
    \match{b}{3}
    \match{c}{4}
    \match{a}{1}
    \brush{\dottedline{3}}
    \match{a}{2}
    \end{bipartite}
    
  21. Avec le paquetage pst-node.

    \begin{psmatrix}[mnode=circle]
       &   & A         \\
     F &   & C &   & B \\
     D &   & E &   & G \\
       & J &   & K
    \end{psmatrix}
    
    \psset{arrows=->}
    \ncline{1,3}{2,1}
    \ncline{1,3}{2,3}
    \ncline{1,3}{2,5}
    \ncline{2,5}{2,3}
    \ncline{2,5}{3,5}
    \ncline{2,3}{2,1}
    \ncline{3,1}{2,3}
    \ncline{3,3}{2,3}
    \ncline{3,3}{3,1}
    \ncline{3,3}{4,2}
    \ncline{2,1}{3,1}
    \ncline{3,5}{2,3}
    \ncline{3,5}{3,3}
    \ncline{4,2}{3,1}
    \ncline{4,2}{4,4}
    \ncline{4,4}{3,3}
    \ncline{4,4}{3,5}
    
  22. Avec le paquetage pst-node.

    \begin{psmatrix}[mnode=circle] % pour réduire :
     A &   & B \\                  % [mnode=circle,colsep=1,rowsep=1]
       & E     \\                  % défaut : rowsep et colsep = 1.5
     C &   & D
    \end{psmatrix}
    
    \psset{arrows=-,
           shortput=nab} % pondéré
    
    \ncline{1,1}{1,3}^{1}
    \ncline{1,1}{2,2}^{1}
    \ncline{1,1}{3,1}^{4}
    \ncline{1,3}{3,3}^{2}
    \ncline{2,2}{1,3}^{1}
    \ncline{2,2}{3,3}^{1}
    \ncline{3,1}{2,2}^{2}
    \ncline{3,1}{3,3}^{1}
    
  23. Avec le paquetage pst-node.

    \begin{psmatrix}[mnode=circle]
         & {v2}        \\
    {v1} &      & {v4} \\
         & {v3} & 
    \end{psmatrix}
    
    \psset{arrows=->,
           shortput=nab}
    
    \ncline{2,1}{1,2}^{3} 
    \ncline{2,1}{3,2}^{1}
    \ncline{1,2}{2,3}^{2}
    \ncline{3,2}{2,3}^{3}
    
    \ncarc[arcangle=10]{1,2}{3,2}^{1}
    \ncarc[arcangle=10]{3,2}{1,2}^{1}
    
  24. Avec le paquetage pst-node.

    \begin{psmatrix}[mnode=circle]
             &   &   & C & E            \\
    $\alpha$ & A & B & D &   & $\omega$ \\
             &   &   & F
    \end{psmatrix}
    
    \psset{arrows=->,
           labelsep=1mm,
           shortput=nab}
    
    \ncline[linewidth=2pt]{2,1}{2,2}^{0} 
    \ncline[linewidth=2pt]{2,2}{2,3}^{2} 
    \ncline[linewidth=2pt]{2,3}{1,4}^{4} 
    \ncline{2,3}{2,4}^{4} 
    \ncline{2,3}{3,4}^{4}
    \ncline[linewidth=2pt]{1,4}{1,5}^{3}
    \ncline{2,4}{1,5}^{2}
    \ncline{3,4}{2,6}^{4}
    \ncline[linewidth=2pt]{1,5}{2,6}^{10}   
    

    Une autre manière de faire exactement la même chose :

    \begin{pspicture}(0,0)(14,8)
    \cnodeput(2,4){a}{$\alpha$}
    \cnodeput(4,4){A}{A}
    \cnodeput(6,4){B}{B}
    \cnodeput(8,6){C}{C}
    \cnodeput(8,4){D}{D}
    \cnodeput(8,2){F}{F}
    \cnodeput(10,6){E}{E}
    \cnodeput(12,4){o}{$\omega$}
    %%%
    \ncline[linewidth=2pt]{->}{a}{A} \Aput{0}
    \ncline[linewidth=2pt]{->}{A}{B} \Aput{2}
    \ncline[linewidth=2pt]{->}{B}{C} \Aput{4}
    \ncline               {->}{B}{D} \Aput{4}
    \ncline               {->}{B}{F} \Aput{4}
    \ncline[linewidth=2pt]{->}{C}{E} \Aput{3}
    \ncline               {->}{D}{E} \Aput{2}
    \ncline[linewidth=2pt]{->}{E}{o} \Aput{10}
    \ncline               {->}{F}{o} \Aput{4}
    \end{pspicture}
    
  25. Avec le paquetage setspace :

    \singlespace
    \onehalfspace
    \doublespace
    
  26. Just draw the symbol you are looking for.

    http://detexify.kirelabs.org/classify.html

  27. Sans paquetage particulier.

    \begin{itemize}
    \item chien
    \item chat
    \item renard
    \item canari
    \item éléphant
    \end{itemize}
    

    ...

    \begin{enumerate}
    \item chien
    \item chat
    \item renard
    \item canari
    \item éléphant
    \end{enumerate}
    

    ...

    \begin{description}
    \item[chien] habite dans une niche et mange des os
    \item[renard] habite dans la forêt et mange des poules
    \item[canari] habite dans une cage et mange des graines
    \end{description}
    
  28. Avec le paquetage enumerate :

    \begin{enumerate}[1 --]
    \item chien
    \item chat
    \item renard
    \item canari
    \item éléphant
    \end{enumerate}
    

    ...

    \begin{enumerate}[a)]
    \item chien
    \item chat
    \item renard
    \item canari
    \item éléphant
    \end{enumerate}
    

    ...

    \begin{enumerate}[{ani.} i :]
    \item chien
    \item chat
    \item renard
    \item canari
    \item éléphant
    \end{enumerate}
    
  29. \usepackage{color}
    \usepackage{listings}
    
    \definecolor{pink}  {rgb}{0.67, 0.05, 0.57} % keywords
    \definecolor{red}   {rgb}{0.87, 0.20, 0.00} % strings
    \definecolor{green} {rgb}{0.00, 0.47, 0.00} % comments
    \definecolor{violet}{rgb}{0.41, 0.12, 0.61} % classes
    \definecolor{blue}  {rgb}{0.21, 0.00, 0.44} % functions
    \definecolor{brown} {rgb}{0.39, 0.22, 0.13} % brown
    
    \lstdefinelanguage{Objective-C 2.0}[Objective]{C} {
        morekeywords={id, Class, SEL, IMP, BOOL, nil, Nil, NO, YES,
                      oneway, in, out, inout, bycopy, byref,
                      self, super, _cmd,
                      @required, @optional,
                      @try, @throw, @catch, @finally,
                      @synchronized, @property, @synthesize, @dynamic},
        moredelim=[s][color{red}]{@"}{"},
        moredelim=[s][color{red}]{<}{>}
    }
    
    \lstdefinestyle{Xcode} {
        language        = Objective-C 2.0,
        basicstyle      = footnotesizettfamily,
        identifierstyle = color{black},
        commentstyle    = color{green},
        keywordstyle    = color{pink},
        stringstyle     = color{red},
        directivestyle  = color{brown},
        extendedchars   = true,
        tabsize         = 4,
        showspaces      = false,
        showstringspaces = false,
        breakautoindent = true,
        flexiblecolumns = true,
        keepspaces      = true,
        stepnumber      = 0,
        xleftmargin     = 0pt}
    
    \lstset{
        style = Xcode,
        caption=lstname,
        breaklines=false,
        frame=single
    }
    

    Use it like this:

    \begin{lstlisting}[name=Sample code, label=SampleCode]
    NSLog(@"hello");
    \end{lstlisting}
    

    List the listings:

    \lstlistoflistings
    
  30. Avec le paquetage amsmath, et en mode mathématique.

    \begin{matrix} 
    a & b \\
    c & d 
    \end{matrix}
    \quad
    \begin{pmatrix} 
    a & b \\
    c & d 
    \end{pmatrix}
    \quad
    \begin{bmatrix} 
    a & b \\
    c & d 
    \end{bmatrix}
    \quad
    \begin{vmatrix} 
    a & b \\
    c & d 
    \end{vmatrix}
    \quad
    \begin{Vmatrix} 
    a & b \\
    c & d 
    \end{Vmatrix}
    
  31. \marginpar{Ben tiens !}
    
  32. On écrit $a\equiv b\pmod{c}$, \\
    mais aussi $a = b \bmod c$.
    
  33. Add an additional directory path for \includegraphics

    \graphicspath{{./images/}}
    
  34. Le Indian TeX Users Group propose une excellente introduction à PSTricks sous la forme de magnifiques fichiers PDF plein l'exemples et d'explications très bien choisis.

    Ça se télécharge sur Sarovar, le SourceForge du pays de Gandhi.

  35. Pour qu'une section (ou une sous-section, etc.) ne soit pas numérotée, il faut le signaler par une étoile.

    \section*{Introduction}
    

    Pour qu'elle apparaisse quand-même dans la table des matières, on peut ajouter la ligne suivante :

    \addcontentsline{toc}{section}{Introduction}
    
  36. \usepackage{eurosym}
    
    \euro
    
  37. Un tableau qui se redimensionne pour tenir sur une page.

    Avec le package tabularx.

    % les 'X' indiquent les colonnes dont la largeur peut être modifiée
    \begin{tabularx}{450pt}{|c|X|c|X|c|c|c|c|c|c|c|c|c|c|c|}
    \hline
    Tâche         & $\alpha$   & T1       & T2         & T9       & T3 & T4 & T6 & T7 & T5  & T8  & T10 & T11 & T12      & $\omega$   \\
    \hline
    Numéro $k$    & 1          & 2        & 3          & 4        & 5  & 6  & 7  & 8  & 9   & 10  & 11  & 12  & 13       & 14         \\
    \hline
    Durée $d_{k}$ & 0          & 3        & 2          & 14       & 4  & 1  & 3  & 2  & 6   & 2   & 6   & 4   & 3        & 0          \\
    \hline
    \hline
    $Pred(k)$     & --         & $\alpha$ & $\alpha$   & $\alpha$ & T1 & T2 & T4 & T2 & T2  & T7  & T5  & T9  & T10      & T12        \\
    \hline
    $t_{k}$       & 0          & 0        & 0          & 0        & 3  & 7  & 8  & 2  & 2   & 11  & 13  & 14  & 19       & 22         \\
    \hline
    \hline
    $Succ(k)$     & T1 T2 T9   & T3       & T4  T5  T7 & T11      & T4 & T6 & T8 & T8 & T10 & T10 & T12 & T12 & $\omega$ & --         \\
    \hline
    $T_{k}$       & 0          & 0        & 5          & 1        & 3  & 7  & 8  & 9  & 7   & 11  & 13  & 15  & 19       & 22         \\
    \hline
    \end{tabularx}
    
  38. Avec le paquetage array.

    \newcolumntype{t}{>{\ttfamily}l}
    \newcolumntype{m}{>{\scshape}c}
    \newcolumntype{g}{>{\Large}r}
    

    ...

    \begin{document}
    

    ...

    \begin{tabular}{|t|m|g|}
    Texte  & Texte  & Texte\\
    Gauche & Centré & Droite
    \end{tabular}
    
  39. \begin{table}[h!]
    \begin{minipage}[t]{.4\linewidth}
        \begin{tabular}{|c|c|c|c|c|}
        \hline
        \multicolumn{5}{|l|}{queue de priorité} \\
        \hline
        E & D & C &   &   \\
        1 & 2 & 4 &   &   \\
        \hline
        \end{tabular}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{.4\linewidth}
        \begin{tabular}{|c|c|c|c|c|}
        \hline
        \multicolumn{5}{|l|}{tableau des pères} \\
        \hline
        A & B & C & D & E \\
        - & A & A & B & A \\
        \hline
        \end{tabular}
    \end{minipage}
    \end{table}
    
  40. Avec le paquetage ulem.

    \sout{texte barré}
    

    Avec le paquetage soul.

    \st{texte barré}
    
  41. Avec le paquetage color :

    \definecolor{orange}{rgb}{1.0, 0.5, 0.0}
    \definecolor{monbleu}{rgb}{0.25, 0.25, 0.75}
    

    ...

    \paragraph{}Je peux écrire en {\color{red}rouge}, en {\color{green}vert} et en {\color{blue}bleu}. \\
    Je peux aussi écrire en {\color{orange}orange} ou avec {\color{monbleu}mon bleu}. \\
    Ce n'est pas toujours \colorbox{monbleu}{\color{orange}très beau}.
    
  42. Avec le paquetage multicol.

    \begin{multicols}{3}
    

    ...

    \end{multicols}
    
  43. Avec les paquetages soul et color.

    \definecolor{bleuclair}{rgb}{0.7, 0.7, 1.0}
    \definecolor{rosepale}{rgb}{1.0, 0.7, 1.0}
    
    \newcommand{\hlrose}[1]{\sethlcolor{rosepale}\hl{#1}}
    
    \begin{document}
    
    On peut \hl{surligner un texte avec la couleur par défaut}.
    
    On peut choisir \hlrose{une autre couleur}.
    
    \sethlcolor{bleuclair}
    
    On peut aussi \hl{changer} la \hl{couleur} par \hl{défaut}.
    
  44. Avec les paquetage babel et l'option francais.

    \begin{tabular}{llll}
    M\up{me}, M\up{mes}    & Jean-Michel     & 1\ier\ 1\iere\ 1\ieres  & \og guillemets \fg          \\
    M\up{lle}, M\up{lles}  & pp.~12--15      & 2\ieme\ 2\iemes         & \nombre{1234,56}            \\
    M. \bsc{Dupont},       & --- en fait --- & \No 1, \no 2            & {\OE}uf, {\oe}ufs, \AE, \ae \\
    M\up{e}, M\up{gr}, MM. & $-1$ degrés     & 13\degres, 23~\degres C & À l'État.
    \end{tabular}
    

    Quelques liens :

    perso.wanadoo.fr résumé des règles typographiques de base (générales et scientifiques) listetypo.free.fr Orthotypographie [pdf], ouvrage posthume et inachevé, sur la page de Jean-Pierre Lacroux.

  45. Avec le paquetage url :

    \newcommand\email{\begingroup \urlstyle{rm}\Url}
    \newcommand\web{\begingroup \urlstyle{tt}\Url}
    

    ...

    \email{nicolas@seriot.ch}
    

    ...

    \web{http://seriot.ch}