could you help me to solve following problem?
below the MWE code and the error ==>Undefined control sequence. \end{Clisting}
why the error appear?
The problem to manage accent inside Clisting bloc is solved
The pdf document seems totally good.
the compilation operate with pdflatex
As you can see, I want to keep tikz and listing aspect in order to have a nice breakable box
\documentclass{book}
%mwe_clisting2
%Rétablissement des polices vectorielles
%Pour retourner dans le droit chemin, vous pouvez passer par le package ae ou bien utiliser les fontes modernes, voire les deux :
\usepackage{ae,lmodern} % ou seulement l'un, ou l'autre, ou times etc.
\usepackage[english,french]{babel}
\usepackage[utf8]{inputenc}
%%% Note that this is font encoding (determines what kind of font is used), not input encoding.
\usepackage[T1]{fontenc}
\usepackage[cyr]{aeguill}
\usepackage{tikz}
\tikzset{coltria/.style={fill=red!15!white}}
\usepackage{tcolorbox}
\tcbuselibrary{listings,breakable,skins,documentation,xparse}
\lstdefinestyle{Clst}{
literate=
{á}{{\'a}}1
{à}{{\`a }}1
{ã}{{\~a}}1
{é}{{\'e}}1
{ê}{{\^e}}1
{î}{{\^i}}1
{oe}{{\oe}}1
{í}{{\'i}}1
{ó}{{\'o}}1
{õ}{{\~o}}1
{ú}{{\'u}}1
{ü}{{\"u}}1
{ç}{{\c{c}}}1,
numbers=left,
numberstyle=\small,
numbersep=8pt,
frame = none,
language=C,
framexleftmargin=5pt, % la marge à gauche du code
% test pour améliorer la présentation du code
upquote=true,
columns=flexible,
basicstyle=\ttfamily,
basicstyle=\small, % ==> semble optimal \tiny est vraiment trop petit
% provoque une erreur texcsstyle=*\color{blue},
commentstyle=\color{green}, % comment style
keywordstyle=\color{blue}, % keyword style
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showtabs=false, % show tabs within strings adding particular underscores
stringstyle=\color{cyan}, % string literal style
numbers=none,
tabsize=4,
% pour couper les lignes trop longues
breaklines,
breakindent=1.5em, %?indente?de?3?caracteres?vers?la?droite
escapechar=µ,% pour escape en latex
% pour l'encodage à l'intérieur des listing utf8 et latin1 ?????
% inputencoding=utf8/latin1,
morekeywords=[2]{ % j'ajoute une catégorie de mots-clés
%%% pour tri sur le 5ieme caractere
gtk_window_new,
gtk_window_set_title,
gtk_window_set_resizable,
gtk_window_get_resizable,
gtk_window_is_maximized,
gtk_window_maximize,
gtk_window_unmaximize,
gtk_window_fullscreen,
gtk_window_fullscreen_on_monitor,
gtk_window_unfullscreen,
%%%%%%%%%%%
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
% dernier sans la virgule
},
morekeywords=[3]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 3ieme caractere
G_TYPE_NONE,
G_TYPE_INTERFACE,
G_TYPE_CHAR,
G_TYPE_UCHAR,
G_TYPE_BOOLEAN,
G_TYPE_INT,
G_TYPE_UINT,
G_TYPE_LONG,
% dernier sans la virgule
},
morekeywords=[4]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 1er caractere
GtkSourceLanguageManager,
GtkSourceSmartHomeEndType,
GtkSourceMarkAttributes,
GtkSourceDrawSpacesFlags,
GtkSourceCompletion,
GtkSourceGutter,
GtkSourceBackgroundPatternType,
Container_set_border_width,
GtkSourceSearchContext,
GtkFileChooserAction,
gboolean,
%%%%%%
cairo_rectangle,
cairo_fill,
% dernier sans la virgule
},
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type gtk_xxxxx
keywordstyle=[2]\monstyleblue, %%%\color{blue}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[1][keywords2]}, % ces mots-clés sont ajoutés à l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[1]\indexgtk}, % par le biais de macro \indexgtk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type g_xxxxx
keywordstyle=[3]\monstylegreen, %%%\color{green}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[3][keywords3]}, % ces mots-clés sont ajoutés à l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[3]\indexglib}, % par le biais de ma macro tri 3ieme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type GtkSourceSmartHomeEndType
keywordstyle=[4]\monstylebrown, %%%\color{brown}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[4][keywords4]}, % ces mots-clés sont ajoutés à l'index?oui
%% xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[4]\indextype}, % tri sur le mot entier
}
%---------------------------------------------------------------------------------------
%------------------------------ box dédié au code langage C ----------------------------
%---------------------------------------------------------------------------------------
\newtcblisting{Clisting}[2][]{empty,breakable,leftrule=5mm,left=2mm,
%frame style={fill,top color=red!75!black,bottom color=red!75!black,middle color=red},
frame style={fill,top color=green!75!black,bottom color=green!75!black,middle color=green},
listing only,
listing engine=listings,
listing options={style=Clst,tabsize=4,breaklines,
breakindent=1.5em,columns=fullflexible},
% keywordstyle=\color{red}},
colback=yellow!15!white,
% code for unbroken boxes:
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--cycle; },
interior code={\path[tcb fill interior] (interior.south west)--(interior.north west)
--([xshift=-4.8mm]interior.north east)--([yshift=-4.8mm]interior.north east)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },
attach boxed title to top center={yshift=-2mm},
title=\fcolorbox{black}{black}{\red{#2}},
% code for the first part of a break sequence:
skin first is subskin of={emptyfirst}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm)-- cycle; },
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west)--([xshift=-4.8mm]interior.north east)
--([yshift=-4.8mm]interior.north east)--(interior.south east|-frame.south)
--cycle; },
},%
% code for the middle part of a break sequence:
skin middle is subskin of={emptymiddle}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--(interior.south east|-frame.south)--cycle; },
},
% code for the last part of a break sequence:
skin last is subskin of={emptylast}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--([yshift=5mm]frame.south east)
--([xshift=-5mm]frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% attention dans les 3 commandes ci-dessous l'activation simultanée de \marginpar{\scriptsize provoque une situation ingérable par latex
\newcommand{\monstylered}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{red}{\emph{#1}}
}
\newcommand{\monstyleblue}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{blue}{\emph{#1}}
}
\newcommand{\monstylebrown}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{brown}{\emph{#1}}
}
\newcommand{\monstylegreen}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{green}{\emph{#1}}
}
%----------------------- Fin Traitement des listing ------------------------------
% --------------------- Macros pour indexation des mots clefs --------------------
% macro pour fabriquer le fichier d'index
\usepackage{makeidx}
\makeindex
% fabrication de l'index
%makeindex mwe_clisting2.idx -s perso.ist
%---------------------------------------------------------------------------------
%%%%%% tri a partir du 5ieme element gtk_XXXX et couleur index blue
\makeatletter
\def\#indexgtk#i#1#2#3#4#5,{\index{#5#\monstyleblue{#1#2#3#4#5}}}
\def\indexgtk#1{\#indexgtk#i#1,}
\makeatother
%---------------------------------------------------------------------------------
%%%%% tri a partir du 3ieme element G_NONE et couleur index green
\makeatletter
\def\#indexglib#i#1#2#3,{\index{#3#\monstylegreen{#1#2#3}}}
\def\indexglib#1{\#indexglib#i#1,}
\makeatother
%%%%%% tri a partir du 1er element MANQUE MISE EN ITALIQUE et couleur index marron
\makeatletter
\def\#indextype#i#1,{\index{#1#\monstylebrown{#1}}}
\def\indextype#1{\#indextype#i#1,}
\makeatother
%---------------------------------------------------------------------------------------
\begin{document}
Voici l'étape qui a toute les chances de ne pas être lue au début mais plutôt quand on est dans une belle impasse. Croire qu'on va s'en sortir sans un minimum de méthode n'est pas viable dans le projet que je vous propose de suivre.
Aidez-moi à conjurer le mauvais sort, et lisez avec attention cette liste de recommandation qui relève du bon sens pratique du développeur expérimenté qu'il aurait aimé découvrir dès ses premiers pas.
\begin{Clisting} {fonction draw\_func}
void draw_func (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GdkRGBA red, green, yellow, blue;
double w, h;
w = width / 2.0;
h = height / 2.0;
gdk_rgba_parse (&red, "red");
gdk_rgba_parse (&green, "green");
gdk_rgba_parse (&yellow, "yellow");
gdk_rgba_parse (&blue, "blue");
gdk_cairo_set_source_rgba (cr, &red);
cairo_rectangle (cr, 0, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &green);
cairo_rectangle (cr, w, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &yellow);
cairo_rectangle (cr, 0, h, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &blue);
cairo_rectangle (cr, w, h, w, h);
cairo_fill (cr);
}
...
gtk_drawing_area_set_draw_func (area, draw, NULL, NULL);
\end{Clisting}
\begin{Clisting}{here problem with accent}
gboolean TEST1 = TRUE
if (TEST1)
{
/** nouvel essai nouvelle méthode à tester **/
...
}
else
{
/** ancien bloc fonctionnel qui buggue **/
...
}
\end{Clisting}
\begin{Clisting}{Run ok with colorisation index}
gtk_window_new
gtk_window_set_title
gtk_window_set_resizable
gtk_window_get_resizable
gtk_window_is_maximized
gtk_window_maximize
gtk_window_unmaximize
gtk_window_fullscreen
gtk_window_fullscreen_on_monitor
gtk_window_unfullscreen
G_TYPE_NONE
G_TYPE_INTERFACE
G_TYPE_CHAR
G_TYPE_UCHAR
G_TYPE_BOOLEAN
G_TYPE_INT
G_TYPE_UINT
G_TYPE_LONG
GtkSourceLanguageManager
GtkSourceSmartHomeEndType
GtkSourceMarkAttributes
GtkSourceDrawSpacesFlags
GtkSourceCompletion
GtkSourceGutter
GtkSourceBackgroundPatternType
Container_set_border_width
GtkSourceSearchContext
GtkFileChooserAction
gboolean
\end{Clisting}
\printindex
\end{document}
EDIT : I changed the exemple code....
In order to understand, please compile with pdflatex, look two type of error.... as you have better knowledge as me you should help me.
pb with accent solved
Thanks a lot by advance
If you look at the complete error message in the log file, you get
! Undefined control sequence.
<argument> \red
{fonction draw\_func}
l.280 \end{Clisting}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
This tells you that \red is not defined, this is simply wrong syntax
\documentclass{book}
%mwe_clisting2
%Rétablissement des polices vectorielles
%Pour retourner dans le droit chemin, vous pouvez passer par le package ae ou bien utiliser les fontes modernes, voire les deux :
\usepackage{ae,lmodern} % ou seulement l'un, ou l'autre, ou times etc.
\usepackage[english,french]{babel}
\usepackage[utf8]{inputenc}
%%% Note that this is font encoding (determines what kind of font is used), not input encoding.
\usepackage[T1]{fontenc}
\usepackage[cyr]{aeguill}
\usepackage{tikz}
\tikzset{coltria/.style={fill=red!15!white}}
\usepackage{tcolorbox}
\tcbuselibrary{listings,breakable,skins,documentation,xparse}
\lstdefinestyle{Clst}{
literate=
{á}{{\'a}}1
{à}{{\`a }}1
{ã}{{\~a}}1
{é}{{\'e}}1
{ê}{{\^e}}1
{î}{{\^i}}1
{oe}{{\oe}}1
{í}{{\'i}}1
{ó}{{\'o}}1
{õ}{{\~o}}1
{ú}{{\'u}}1
{ü}{{\"u}}1
{ç}{{\c{c}}}1,
numbers=left,
numberstyle=\small,
numbersep=8pt,
frame = none,
language=C,
framexleftmargin=5pt, % la marge à gauche du code
% test pour améliorer la présentation du code
upquote=true,
columns=flexible,
basicstyle=\ttfamily,
basicstyle=\small, % ==> semble optimal \tiny est vraiment trop petit
% provoque une erreur texcsstyle=*\color{blue},
commentstyle=\color{green}, % comment style
keywordstyle=\color{blue}, % keyword style
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showtabs=false, % show tabs within strings adding particular underscores
stringstyle=\color{cyan}, % string literal style
numbers=none,
tabsize=4,
% pour couper les lignes trop longues
breaklines,
breakindent=1.5em, %?indente?de?3?caracteres?vers?la?droite
escapechar=µ,% pour escape en latex
% pour l'encodage à l'intérieur des listing utf8 et latin1 ?????
% inputencoding=utf8/latin1,
morekeywords=[2]{ % j'ajoute une catégorie de mots-clés
%%% pour tri sur le 5ieme caractere
gtk_window_new,
gtk_window_set_title,
gtk_window_set_resizable,
gtk_window_get_resizable,
gtk_window_is_maximized,
gtk_window_maximize,
gtk_window_unmaximize,
gtk_window_fullscreen,
gtk_window_fullscreen_on_monitor,
gtk_window_unfullscreen,
%%%%%%%%%%%
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
% dernier sans la virgule
},
morekeywords=[3]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 3ieme caractere
G_TYPE_NONE,
G_TYPE_INTERFACE,
G_TYPE_CHAR,
G_TYPE_UCHAR,
G_TYPE_BOOLEAN,
G_TYPE_INT,
G_TYPE_UINT,
G_TYPE_LONG,
% dernier sans la virgule
},
morekeywords=[4]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 1er caractere
GtkSourceLanguageManager,
GtkSourceSmartHomeEndType,
GtkSourceMarkAttributes,
GtkSourceDrawSpacesFlags,
GtkSourceCompletion,
GtkSourceGutter,
GtkSourceBackgroundPatternType,
Container_set_border_width,
GtkSourceSearchContext,
GtkFileChooserAction,
gboolean,
%%%%%%
cairo_rectangle,
cairo_fill,
% dernier sans la virgule
},
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type gtk_xxxxx
keywordstyle=[2]\monstyleblue, %%%\color{blue}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[1][keywords2]}, % ces mots-clés sont ajoutés à l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[1]\indexgtk}, % par le biais de macro \indexgtk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type g_xxxxx
keywordstyle=[3]\monstylegreen, %%%\color{green}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[3][keywords3]}, % ces mots-clés sont ajoutés à l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[3]\indexglib}, % par le biais de ma macro tri 3ieme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type GtkSourceSmartHomeEndType
keywordstyle=[4]\monstylebrown, %%%\color{brown}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[4][keywords4]}, % ces mots-clés sont ajoutés à l'index?oui
%% xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[4]\indextype}, % tri sur le mot entier
}
%---------------------------------------------------------------------------------------
%------------------------------ box dédié au code langage C ----------------------------
%---------------------------------------------------------------------------------------
\newtcblisting{Clisting}[2][]{empty,breakable,leftrule=5mm,left=2mm,
%frame style={fill,top color=red!75!black,bottom color=red!75!black,middle color=red},
frame style={fill,top color=green!75!black,bottom color=green!75!black,middle color=green},
listing only,
listing engine=listings,
listing options={style=Clst,tabsize=4,breaklines,
breakindent=1.5em,columns=fullflexible},
% keywordstyle=\color{red}},
colback=yellow!15!white,
% code for unbroken boxes:
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--cycle; },
interior code={\path[tcb fill interior] (interior.south west)--(interior.north west)
--([xshift=-4.8mm]interior.north east)--([yshift=-4.8mm]interior.north east)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },
attach boxed title to top center={yshift=-2mm},
title=\fcolorbox{black}{black}{\color{red}{#2}},
% code for the first part of a break sequence:
skin first is subskin of={emptyfirst}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm)-- cycle; },
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west)--([xshift=-4.8mm]interior.north east)
--([yshift=-4.8mm]interior.north east)--(interior.south east|-frame.south)
--cycle; },
},%
% code for the middle part of a break sequence:
skin middle is subskin of={emptymiddle}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--(interior.south east|-frame.south)--cycle; },
},
% code for the last part of a break sequence:
skin last is subskin of={emptylast}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--([yshift=5mm]frame.south east)
--([xshift=-5mm]frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% attention dans les 3 commandes ci-dessous l'activation simultanée de \marginpar{\scriptsize provoque une situation ingérable par latex
\newcommand{\monstylered}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{red}{\emph{#1}}
}
\newcommand{\monstyleblue}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{blue}{\emph{#1}}
}
\newcommand{\monstylebrown}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{brown}{\emph{#1}}
}
\newcommand{\monstylegreen}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{green}{\emph{#1}}
}
%----------------------- Fin Traitement des listing ------------------------------
% --------------------- Macros pour indexation des mots clefs --------------------
% macro pour fabriquer le fichier d'index
\usepackage{makeidx}
\makeindex
% fabrication de l'index
%makeindex mwe_clisting2.idx -s perso.ist
%---------------------------------------------------------------------------------
%%%%%% tri a partir du 5ieme element gtk_XXXX et couleur index blue
\makeatletter
\def\#indexgtk#i#1#2#3#4#5,{\index{#5#\monstyleblue{#1#2#3#4#5}}}
\def\indexgtk#1{\#indexgtk#i#1,}
\makeatother
%---------------------------------------------------------------------------------
%%%%% tri a partir du 3ieme element G_NONE et couleur index green
\makeatletter
\def\#indexglib#i#1#2#3,{\index{#3#\monstylegreen{#1#2#3}}}
\def\indexglib#1{\#indexglib#i#1,}
\makeatother
%%%%%% tri a partir du 1er element MANQUE MISE EN ITALIQUE et couleur index marron
\makeatletter
\def\#indextype#i#1,{\index{#1#\monstylebrown{#1}}}
\def\indextype#1{\#indextype#i#1,}
\makeatother
%---------------------------------------------------------------------------------------
\begin{document}
Voici l'étape qui a toute les chances de ne pas être lue au début mais plutôt quand on est dans une belle impasse. Croire qu'on va s'en sortir sans un minimum de méthode n'est pas viable dans le projet que je vous propose de suivre.
Aidez-moi à conjurer le mauvais sort, et lisez avec attention cette liste de recommandation qui relève du bon sens pratique du développeur expérimenté qu'il aurait aimé découvrir dès ses premiers pas.
\begin{Clisting} {fonction draw\_func}
void draw_func (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GdkRGBA red, green, yellow, blue;
double w, h;
w = width / 2.0;
h = height / 2.0;
gdk_rgba_parse (&red, "red");
gdk_rgba_parse (&green, "green");
gdk_rgba_parse (&yellow, "yellow");
gdk_rgba_parse (&blue, "blue");
gdk_cairo_set_source_rgba (cr, &red);
cairo_rectangle (cr, 0, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &green);
cairo_rectangle (cr, w, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &yellow);
cairo_rectangle (cr, 0, h, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &blue);
cairo_rectangle (cr, w, h, w, h);
cairo_fill (cr);
}
...
gtk_drawing_area_set_draw_func (area, draw, NULL, NULL);
\end{Clisting}
\begin{Clisting}{here problem with accent}
gboolean TEST1 = TRUE
if (TEST1)
{
/** nouvel essai nouvelle méthode à tester **/
...
}
else
{
/** ancien bloc fonctionnel qui buggue **/
...
}
\end{Clisting}
\begin{Clisting}{Run ok with colorisation index}
gtk_window_new
gtk_window_set_title
gtk_window_set_resizable
gtk_window_get_resizable
gtk_window_is_maximized
gtk_window_maximize
gtk_window_unmaximize
gtk_window_fullscreen
gtk_window_fullscreen_on_monitor
gtk_window_unfullscreen
G_TYPE_NONE
G_TYPE_INTERFACE
G_TYPE_CHAR
G_TYPE_UCHAR
G_TYPE_BOOLEAN
G_TYPE_INT
G_TYPE_UINT
G_TYPE_LONG
GtkSourceLanguageManager
GtkSourceSmartHomeEndType
GtkSourceMarkAttributes
GtkSourceDrawSpacesFlags
GtkSourceCompletion
GtkSourceGutter
GtkSourceBackgroundPatternType
Container_set_border_width
GtkSourceSearchContext
GtkFileChooserAction
gboolean
\end{Clisting}
\printindex
\end{document}
Related
I would like to resize my R code output on Beamer Latex. I have something like :
\begin{frame}[fragile]
\frametitle{Application du modèle : contenu de lung}
<<echo=FALSE>>=
library(survival)
attach(lung)
head(lung)
#
\textbf{\underline{Objectif:}} construire un modèle qui vérifie les hypothèses de Cox
à partir de ce jeu de données
\end{frame}
The problem is that the output table protrudes from the slide.
Thanks.
Edit : also when i try to compile this part of code
\begin{frame}{Premier modèle naïf}
<<echo=FALSE, linebreaks=TRUE>>=
library(survival)
model_1<-coxph(Surv(time,status) ~ age+factor(sex)+ph.ecog+wt.loss, data = lung)
cox.zph(model_1)
#
\textbf{\underline{Objectif:}} construire un modèle qui vérifie les hypothèses de Cox à partir de ce jeu de données
\end{frame}
It looks like :
Internally this kniter thingy seems wrap the code in a custom environment called kframe. You can change the font size for this environment like this:
\documentclass{beamer}
\AtBeginEnvironment{kframe}{\tiny}
\begin{document}
\begin{frame}[fragile]
\frametitle{Application du modèle : contenu de lung}
<<echo=FALSE>>=
library(survival)
attach(lung)
head(lung)
#
\textbf{\underline{Objectif:}} construire un modèle qui vérifie les hypothèses de Cox
à partir de ce jeu de données
\end{frame}
\end{document}
How to avoid losing typical Computer Modern typical curved "x" glyphe in math modes, when switching for \sfdefault for the whole document ?
%%% not canonical minimal.tex sample %%%
\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage{ucs}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amssymb}
\usepackage[french]{babel}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[italic]{mathastext}
\usepackage{siunitx}
\sisetup{output-decimal-marker = {,}}
\begin{document}
Je compose avec Babel pour la langue française, avec deux contraintes: police sans empattement, et véritable virgule française conforme aux usages pour les nombres à virgule.
Voici un document minimal, où je perds le $x$ arrondi habituel en Computer Modern. Je vérifie ce que donne la macro \verb+\num{}+ avec \num{5.2} et $\num{5.2}$ et \SI{5.2}{\kilo\metre\squared}.
$$
\int_{a}^{b} f\!\left( x \right) dx = \num{5.2} \quad \text{où} \quad AB = 5.2
$$
Le $x$ ne me convient pas (confusion pour certains élèves).
\end{document}
Based on #UlrikeFischer's solution at https://chat.stackexchange.com/transcript/message/57560730#57560730 you can use the following code to get the curly x back:
\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{siunitx}
\sisetup{output-decimal-marker = {,}}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[italic]{mathastext}
%
\DeclareSymbolFont{myletters}{T1}{cmr}{m}{it}
\AtBeginDocument{\DeclareMathSymbol{x}\mathalpha{myletters}{"78}}
\MTmathstandardletters
\begin{document}
Je compose avec Babel pour la langue française, avec deux contraintes: police sans empattement, et véritable virgule française conforme aux usages pour les nombres à virgule.
Voici un document minimal, où je perds le $x$ arrondi habituel en Computer Modern. Je vérifie ce que donne la macro \verb+\num{}+ avec \num{5.2} et $\num{5.2}$ et \SI{5.2}{\kilo\metre\squared}.
$$
\int_{a}^{b} f\!\left( x \right) dx = \num{5.2} \quad \text{où} \quad AB = 5.2
$$
Le $x$ ne me convient pas (confusion pour certains élèves).
\end{document}
I'm new to LaTeX and I'm trying to make my Cover Letter on Overleaf. My name is Codruț Ștefan, and when I want to implement that in this section, the "ț" and the "Ș" don't render:
\namesection{Codrut Stefan}{Ursache}{
\href{mailto:ursache.codrut71#gmail.com}{ursache.codrut71#gmail.com} | 0765991609 |
\urlstyle{same}\href{https://github.com/Kreker71}{Github} |
\urlstyle{same}\href{https://www.facebook.com/ursache.codrut}{Facebook}
}
The strange part is that when I write these special characters in the main part of the letter, everything is all right.
I also included these special tags at the begging \usepackage[romanian]{babel} \usepackage{combelow}
Please help me and sorry if it's a dumb question.
cover.tex:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Deedy - Cover Letter Template
% LaTeX Template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[]{cover}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{Page \thepage \hspace{1pt}}
\thispagestyle{empty}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TITLE NAME
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\namesection{Codruț Ștefan}{Ursache}{ \href{mailto:ursache.codrut71#gmail.com}{ursache.codrut71#gmail.com} | 0765991609 | \urlstyle{same}\href{https://github.com/Kreker71}{Github} | \urlstyle{same}\href{https://www.facebook.com/ursache.codrut}{Facebook}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MAIN COVER LETTER CONTENT
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hfill
\begin{minipage}[t]{0.5\textwidth}
\companyname{Microsoft Learn Student Ambassadors}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\currentdate{\today}
\end{minipage}
\vspace*{7mm}
\lettercontent{\hspace*{10mm} Dragă recrutant,}
% The first paragraph of your job application letter should include information on why you are writing. Mention the job you are applying for and where you found the position. If you have a contact at the company, mention the person's name and your connection here.
\lettercontent{\hspace*{10mm} Numele meu este Ursache Codruț-Ștefan. Am 18 ani și în prezent sunt student la Universitatea Politehnica din București, pe profilul Calculatoare și Tehnologia Informației. Atracția mea către domeniul informaticii a început din copilărie, prin prisma jocurilor pe calculator, ce reprezentau o provocare pentru mine, de a înțelege conceptele tehnice din spatele funcționalității acestora. Cu timpul, informatica a devenit o pasiune, fapt ce m-a determinat să urmez un profil de Matematică și Informatică cu predarea intensivă a Informaticii la Colegiul Național B.P.Hasdeu din Buzău, fiind unul dintre cele mai prestigioase licee din țară. Datorită metodelor avansate de predare, am putut să îmi însușesc un nivel de cunoștințe generale ridicat, cât și o bază complexă în primul meu limbaj de programare studiat, și anume C++.
}
% The next section of your cover letter should describe what you have to offer the company. Make strong connections between your abilities and the requirements listed in the job posting. Mention specifically how your skills and experience match the job. Expand on the information in your resume.
% Try to support each statement you make with a piece of evidence. Use several shorter paragraphs or bullets rather than one large block of text, which can be difficult to read and absorb quickly.
%For example
% Using the knowledge and skills I have acquired in my <DEGREE PROGRAM> combined with my technical abilities I believe I can provide significant value to <COMPANY> while providing me invaluable experience to <PREPARE FOR OR FURTHER CAREER>.
% <RELEVANT LIFE STORY/ WORK/ PROJECT >
% In own projects, my coursework, work as a <PREVIOUS JOB TITLE> I have applied knowledge of <SUBJECT MATTER>.
% <LIST OF SMART SOUNDING SKILLS AND TOOLS>.
% Combining these tools with my interests in <FIELD> issues, I hope to help the <DEPARTMENT> answer questions about the <SUBJECT> behind <FIELD> projects.
\lettercontent{\hspace*{10mm}Lumea se află în prezent într-o eră dominată de avansul rapid al tehnologiei asupra oamenilor, prin infiltrațiile sale în domenii cum ar fi medicina, inginerie, business. Fiind o fire cu o voință puternică cu privire la procesele de auto-învățare, pe care le consider esențiale în etapele pe care le parcurge un viitor programator, atenția mea a fost concentrată pe toate noutățile apărute din sfera științei, pentru a putea înțelege mai bine ce rol are și va avea în viitor tehnologia în viețile noastre. Acest lucru m-a determinat să înțeleg mai bine necesitățile lumii moderne, în strânsa legătura cu lumile artificiale create de fiecare calculator în parte.
}
%Proiect personal
\lettercontent{\hspace*{10mm}În clasa a 11-a, prin suportul imens acordat din partea unui profesor de informatică din cadrul liceului, am reușit să realizez primul meu proiect, ce a constat într-o oglindă inteligentă, ce îmbină eficient componente hardware, cum ar fi o placă principală de tip RaspberryPy Model 3B, și programare software, folosind concepte de Linux, NodeJS și Python. Dimensiunile acesteia sunt moderate, astfel încât se pot integra zone în care utilizatorul poate accesa știrile zilei, vremea, moduri diferite de vizualizare ce modifică luminozitatea, contrastul imaginii etc, în funcție de momentul în care oglinda este folosită. De asemenea, în funcție de momentul zilei, aceasta afișează un mesaj motivațional diferit(ex.: Dimineața între orele 07-10am sunt prezentate mesaje specifice pentru dimineață, precum "Bună dimineața!", "Cum a fost somnul?", "Gata pentru o nouă zi?"). Utilizarea site-ului GitHub m-a făcut să realizez cât de strânsă și unită este comunitatea de programatori din întreaga lume, prin intermediul acestuia reușind să implementez o funcție de RemoteControl a oglinzii prin intermediul smartphone-ului(widget-urile și oglinda pot fi închise și deschise de pe telefon).
}
% Proiecte liceu
\lettercontent{\hspace*{10mm}În perioada liceului, am înțeles cât de important este să pătrund cât mai adânc în diferite domenii ce fac parte din întregul științei calculatoarelor. O parte din efortul meu academic era îndreptat către rezolvarea problemelor de programare, fie ele strict efectuate în timpul orelor, fie proiecte avansate, cum ar fi jocuri sau aplicații. În timpul unui opțional în clasa a 11-a, am parcurs elemente de C\#, reușind, în decurs de doar câteva săptămâni, să proiectez diferite aplicații practice, destinate înțelegerii mai limpede a modului în care operează C\#, prin aceste procese educaționale: convertor valutar, tabel periodic al elementelor digital, generarea unor fractali și un calculator matematic. Lucrând la aceste aplicații, cât și la programe ce presupuneau o diversitate de noțiuni matematice, am conștientizat relația de interdependență dintre cele două ramuri științifice, matematica fiind un alt domeniu pe care mi-am canalizat atenția.}
%
% PATH
%
\lettercontent{\hspace*{10mm} Întotdeauna am fost adeptul ideii de posibilă conviețuire cu un calculator capabil să funcționeze autonom. Domeniul inteligenței artificiale cu ale sale sub-ramuri, Machine Learning și Deep Learning, creează pretextul unui viitor în care relațiile inter-umane vor fi dominate de legăturile stabilite între oameni și calculatoare. Fiind o persoană capabilă să se adapteze la orice provocare apărută în cadrul științei, cu precădere a științei calculatoarelor, fac parte din comunitatea ce se află în continuă dezvoltare, a oamenilor implicați, activ sau pasiv, în cercetarea inteligenței artificiale, aflată încă într-un stadiu de plină expansiune. De aceea, îmi doresc să fiu îndrumat corespunzător de către Microsoft Learn Student Ambassadors, spre a aprofunda noțiunile unei viitoare cariere de succes, combinând cercetarea acestui domeniu, până la realizarea programelor capabile să se auto-cerceteze.}
\lettercontent{\hspace*{10mm} Când vine vorba de hobby-uri, îmi place să mă surprind și să încerc lucruri noi, însă principalele mele atracții sunt îndreptate către fotografie și cinematografie. Fiecare fotografie ascunde în spatele ei o poveste ce poate fi descoperită la o analiză mai amănunțită, pixelii conținând nu doar o combinație de valori RGB, ci și o emoție sau o trăire a fotografului sau a obiectului fotografiat. Ceea ce ador cel mai mult la fotografie nu este acțiunea propriu-zisă de a face poze, ci posibilitatea de a o îmbina cu alte pasiuni dragi mie, cum ar fi drumețiile, concertele și observatul stelelor. Pe de altă parte, mă consider un cinefil dedicat. Părerea mea este că la fel cum elevii trebuie să învețe literatură și despre cât de multe lucruri are de oferit și de ascuns o carte, ar trebui să existe o oră asemănătoare pentru studiul filmelor, în care elevul are șansa să descopere de ce o anumită scenă a fost filmată cu cadre foarte mari, de ce filmul a fost produs Alb-Negru deși tehnologia din momentul filmării permitea o imagine color sau în câte moduri poate fi interpretat un anumit final. Trăim într-o eră a audio-vizualului în care, din păcate, din ce în ce mai multe filme care "au ceva de spus" sunt umbrite de filme comerciale, de cinema, pline de efecte speciale și lipsite de mesaj sau poveste.}
\lettercontent{\hspace*{10mm} Din punct de vedere al laturii sociale, sunt o persoană ce asociază fiecare interacțiune cu oamenii ca fiind o experiență din care pot învăța lucruri noi, ce mă pot ajuta în procesul meu de dezvoltare personală. De altfel, simt o nevoie intensă de a fi implicat în acte de voluntariat, dorind să am o contribuție, oricât de mică, asupra acțiunilor de ajutorare a oamenilor, dar și a animalelor. De exemplu, în primul an de liceu, am fost organizator într-o echipă ce a desfășurat un carnaval cu tematica Harry Potter, unde se vindeau sucuri și prăjituri. Banii strânși de pe urma acestora, cât și de pe urma vânzării biletelor pentru a putea intra la carnaval au fost donați unei case de bătrâni din orașul în care locuiesc.
}
\lettercontent{}
\lettercontent{}
\vspace{0.5cm}
\signature{Ursache Codruț Ștefan}
\end{document}
\documentclass[]{article}
cover.cls:
% Intro Options
\ProvidesClass{deedy-resume-openfont}[2014/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{print}{\def\#cv#print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}
}
\ProcessOptions\relax
\LoadClass{article}
% Package Imports
\usepackage[hmargin=2.54cm, vmargin=2.54cm]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{titlesec}
\usepackage[absolute]{textpos}
\usepackage{fontspec,xltxtra,xunicode}
% Publications
\usepackage{cite}
\renewcommand\refname{\vskip -1.5cm}
% Color definitions
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{date}{HTML}{666666}
\definecolor{primary}{HTML}{2b2b2b}
\definecolor{headings}{HTML}{6A6A6A}
\definecolor{subheadings}{HTML}{333333}
% Set main fonts
\usepackage{fontspec}
\setmainfont[Color=primary, Path = OpenFonts/fonts/lato/,BoldItalicFont=Lato-RegIta,BoldFont=Lato-Reg,ItalicFont=Lato-LigIta]{Lato-Lig}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text, Path = OpenFonts/fonts/raleway/]{Raleway-ExtraLight}
% Date command
\usepackage[absolute]{textpos}
% \usepackage[UKenglish]{isodate}
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}
\newcommand{\lastupdated}{\begin{textblock}{60}(155,5)
\color{date}\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont
Last Updated on \today
\end{textblock}}
% Name command
\newcommand{\namesection}[3]{
\centering{
\fontsize{40pt}{60pt}
\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Hai}\selectfont #1
\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Lig}\selectfont #2
} \\[5pt]
\centering{
\color{headings}
\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont #3}
\noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.0pt}}
\vspace{0pt}
}
% Section seperators
\usepackage{titlesec}
\titlespacing{\section}{0pt}{0pt}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{0pt}
\newcommand{\sectionsep}{\vspace{8pt}}
% Headings command
\titleformat{\section}{\color{headings}
\scshape\fontspec[Path = OpenFonts/fonts/OpenFonts/fonts/lato/]{Lato-Lig}\fontsize{16pt}{24pt}\selectfont \raggedright\uppercase}{}{0em}{}
% Subeadings command
\titleformat{\subsection}{
\color{subheadings}\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Bol}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase}{}{0em}{}
\newcommand{\runsubsection}[1]{
\color{subheadings}\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Bol}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase {#1} \normalfont}
% Descriptors command
\newcommand{\descript}[1]{
\color{subheadings}\raggedright\scshape\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}
% Location command
\newcommand{\location}[1]{
\color{headings}\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{10pt}{12pt}\selectfont {#1\\} \normalfont}
% Bullet Lists with fewer gaps command
\newenvironment{tightemize}{
\vspace{-\topsep}\begin{itemize}\itemsep1pt \parskip0pt \parsep0pt}
{\end{itemize}\vspace{-\topsep}}
% Cover Letter
\newcommand{\companyname}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Bol}\fontsize{12pt}{14pt}\selectfont {#1 \\} \normalfont}
\newcommand{\companyaddress}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\}\mbox{}\\\mbox{}\\ \normalfont}
\newcommand{\currentdate}[1]{\raggedleft\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}
% Letter content command
\newcommand{\lettercontent}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\}\mbox{}\\ \normalfont}
\newcommand{\closing}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\}\mbox{}\\\mbox{}\\ \normalfont}
\newcommand{\signature}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}
I begin with latex and I have this .tex document and I'd like to put on the top of each future pages the number and name of what chapter I am into.
\documentclass[a4paper]{report}
% Options possibles : 10pt, 11pt, 12pt (taille de la fonte)
% oneside, twoside (recto simple, recto-verso)
% draft, final (stade de développement)
\usepackage[utf8]{inputenc} % LaTeX, comprends les accents !
\usepackage[T1]{fontenc} % Police contenant les caractères français
\usepackage[francais]{babel} % Placez ici une liste de langues, la
% dernière étant la langue principale
\usepackage{amsthm} %Pour faire des remarques sur des théorème en mathématique
\usepackage[lenny]{fncychap}
\usepackage[a4paper]{geometry}% Réduire les marges
\usepackage{hyperref}
\usepackage{array,multirow,makecell}
\usepackage{diagbox}
\usepackage{pict2e}
\setcellgapes{1pt}
\makegapedcells
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}
% \pagestyle{headings} % Pour mettre des entêtes avec les titres
% des sections en haut de page
\title{\underline{\textbf{Rapport TER}}} % Les paramètres du titre : titre, auteur, date
\title{%
{\textbf{Rapport TER}} \\
\large Chip-firing games}
\bigbreak
\bigbreak
\author{Sébastien Gouverneur}
% \date{} % La date n'est pas requise (la date du
% jour de compilation est utilisée en son
% absence)
\sloppy % Ne pas faire déborder les lignes dans la marge
\begin{document}
\maketitle % Faire un titre utilisant les données
% passées à \title, \author et \date
\newpage
% \renewcommand{\contentsname}{Sommaire} %Modifie le nom par default de la table des matières
\tableofcontents % Table des matières
\newpage
\chapter{Introduction}
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\newpage
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
% \subsubsection{Titre} % Encore plus petite
% \paragraph{Titre} % Toutes petites sections (le nom \paragraph
% n'est pas très bien choisi)
% \subparagraph{Titre} % La dernière
% \appendix % Commençons les annexes
% \section{Titre} % Annexe A
% \section{Titre} % Annexe B
% \listoffigures % Table des figures
% \listoftables % Liste des tableaux
\end{document}
For exemple the page 4/4 should begin with something like
"Chapter 1. Introduction"
and for each next pages I'll add to my report, this notation will appear until I add another chapter and after that It will be for each next pages
"Chapter2. blabla"
Is it possible to do something like that and what package / commande should I use to do It? Thanks by advance.
Considering that you are using documentclass report, which is oneside by default, you may add \usepackage{fancyhdr} in your preamble and then, just after \begin{document}, you may add:
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\fancyhead[R]{}
\fancyhead[L]{\chaptername\ \thechapter\ --\ \leftmark}
This is only a rough sketch, not including page numbering (that may stay in the header too) and fine styling of the header itself.
How do I do a line break in a .text.slim before a variable?
|
Vous pouvez remonter votre offre en tête de liste afin de :
* Booster la visibilité de votre offre
* Bénéficier de 15 jours supplémentaires de diffusion
=<> #job_offer_publish_url
I want to add a line break before the #job_offer_publish_url but slim doesn't handle it...
I found a solution but not a pretty one...
|
Vous pouvez remonter votre offre en tête de liste afin de :
* Booster la visibilité de votre offre
* Bénéficier de 15 jours supplémentaires de diffusion
= '\n\n' + #job_offer_publish_url
I'll be happy to have something better !
Try explicitly adding a line break with br. Also, remove the | as it escapes everything indented below it, and remove the <> after = (which is a ruby call equivalent to <%= %>), <> will add whitespace before and after a tagged entity, but doesn't accomplish anything after a =.
p Vous pouvez remonter votre offre en tête de liste afin de :
* Booster la visibilité de votre offre
* Bénéficier de 15 jours supplémentaires de diffusion
br
= #job_offer_publish_url`