code style using listings

part1
Alexandre AGOSTINHO 2 years ago
parent 59d4ea9cd5
commit 5608d90971

@ -0,0 +1,20 @@
/**
* SAE 2.02 - Exploration algorithmique dun problème
* Prtie 1 / Exercice _
* Extrait code C
*/
#define NAME_MAX_LEN 40
#define NB_PTS_CARACT_MAX 10
/**
* @brief structure caractérisant un point dans la ville
*
* Un point n'a besoin de connaître que les point qu'il peut relier.
*/
typedef struct pointCaracteristique {
char nom[NAME_MAX_LEN];
struct pointCaracteristique *tPtsCaract;
} PointCaracteristique;

Binary file not shown.

@ -41,6 +41,30 @@
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
% Code style
\usepackage{listings}
\usepackage{color}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=C,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
% Title
\title{%
\begin{minipage}

@ -2,10 +2,23 @@
\documentclass[class=article, crop=false]{standalone}
%\usepackage[subpreambles=true]{standalone}
%\usepackage{listings}
\begin{document}
\section{Partie 1}
Ceci est la partie 1 de la SAE.%
\subsection{Question 1}
% insert struct code here
\begin{lstlisting}[language=C]
typedef struct pointCaracteristique {
char nom[NAME_MAX_LEN];
struct pointCaracteristique *tPtsCaract;
} PointCaracteristique;
\end{lstlisting}
\subsection{Question 2}
\quad Un point caractéristique n'a besoin de connaître que les points qu'il peut atteindre.
\end{document}
Loading…
Cancel
Save