Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 71772ac2 authored by Grégory Mounié's avatar Grégory Mounié
Browse files

Passage à minted du mini code C

Coloration identique aux TP (style tango)

Defaut: minted ne permet pas de mettre un \alert dans une string du
code. Le "\n" ajouté est moins visible.
parent f8e1a685
......@@ -38,7 +38,7 @@ handouts: $(HANDOUTS_NUP:%=%.pdf)
printf '%s\n\n%s\n' '\documentclass{beamer}' \
'\input{$*}' > $@
PDFLATEX_OPTIONS=-file-line-error
PDFLATEX_OPTIONS=-file-line-error -shell-escape
LU_MASTERS=$(SLIDES) $(HANDOUTS)
DEPENDS=$(TEXANIMS)
......
......@@ -2,7 +2,9 @@
\usepackage{moy-bouveret-slides}
\usepackage{comment}
%\excludecomment{detailed}
\usepackage{minted}
\usemintedstyle{tango}
% \excludecomment{detailed}
\newenvironment{detailed}{}{}
\usepackage{moy-bouveret-tikz}
......@@ -94,44 +96,45 @@
\begin{column}{.3\textwidth}
My version
{\scriptsize
\begin{semiverbatim}
\begin{minted}[escapeinside=||]{C}
#include <stdio.h>
int main () \{
int main () {
printf("Hello");
return \alert{EXIT_SUCCESS};
\}
\end{semiverbatim}
return |\alert{EXIT\_SUCCESS}|;
}
\end{minted}
}
\end{column}
\begin{column}{.3\textwidth}
Your version
{\scriptsize
\begin{semiverbatim}
% l'option minted escapeinside ne marche pas dans une string
\begin{minted}{c}
#include <stdio.h>
int main () \{
printf("Hello\alert{!\\n}");
int main () {
printf("Hello\n");
return 0;
\}
\end{semiverbatim}
}
\end{minted}
}
\end{column}
\pause
\begin{column}{.3\textwidth}
Common ancestor
{\scriptsize
\begin{semiverbatim}
\begin{minted}{c}
#include <stdio.h>
int main () \{
int main () {
printf("Hello");
return 0;
\}
\end{semiverbatim}
}
\end{minted}
}
\end{column}
\end{columns}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment