diff --git a/doc/userman/fclangversion.tex b/doc/userman/fclangversion.tex index ed36f53328fa6099840e10c46daa49d8db85a6d1..7d68dd54cf8a62851ce5edafa1e2ab86b2055c62 100644 --- a/doc/userman/fclangversion.tex +++ b/doc/userman/fclangversion.tex @@ -1,4 +1,4 @@ -\newcommand{\version}{0.0.10\xspace} -\newcommand{\fclangversion}{0.0.10\xspace} -\newcommand{\fcversion}{22.x~Titanium\xspace} -\newcommand{\clangversion}{6.0-11.0\xspace} +\newcommand{\version}{0.0.11+dev\xspace} +\newcommand{\fclangversion}{0.0.11+dev\xspace} +\newcommand{\fcversion}{24.0~Chromium\xspace} +\newcommand{\clangversion}{9.0-13.0\xspace} diff --git a/doc/userman/frama-c-book.cls b/doc/userman/frama-c-book.cls index f82a033e742632216258e8f6a8c37c23c8297825..e2d476f9ae44f43b4c17f7d5099d33bb1fd0be9e 100644 --- a/doc/userman/frama-c-book.cls +++ b/doc/userman/frama-c-book.cls @@ -3,28 +3,52 @@ % -------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{frama-c-book}[2009/02/05 LaTeX Class for Frama-C Books] +\newif\ifusecc +\usecctrue % -------------------------------------------------------------------------- % --- Base Class management --- % -------------------------------------------------------------------------- -\LoadClass[a4paper,11pt,twoside,openright]{report} -\DeclareOption{web}{\PassOptionsToPackage{colorlinks,urlcolor=blue}{hyperref}} -\DeclareOption{paper}{\PassOptionsToPackage{pdfborder=0 0 0}{hyperref}} -\ProcessOptions -\RequirePackage{fullpage} -\RequirePackage{hevea} +\makeatletter +\RequirePackage{kvoptions} +\SetupKeyvalOptions{ +family=framacbook, +prefix=framacbook@, +} \RequirePackage{ifthen} +\DeclareVoidOption{web}{\PassOptionsToPackage{colorlinks,urlcolor=blue}{hyperref}} +\DeclareVoidOption{paper}{\PassOptionsToPackage{pdfborder=0 0 0}{hyperref}} +\DeclareStringOption[{type=CC,version=4.0,modifier=by-sa}]{license} +\DeclareStringOption[english]{lang} +\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{report}} +\PassOptionsToClass{a4paper,11pt,twoside,openright}{report} + +\ProcessKeyvalOptions* + +\LoadClass{report} + +\PassOptionsToPackage{\framacbook@lang}{babel} + +\ifthenelse{\equal{\framacbook@license}{no}}{\useccfalse}{} +\ifusecc + \PassOptionsToPackage{\framacbook@license}{doclicense} +\fi +\RequirePackage{babel} +\RequirePackage{fullpage} +\RequirePackage{lmodern} \RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc} -\RequirePackage[a4paper,pdftex,pdfstartview=FitH]{hyperref} \RequirePackage{amssymb} -\RequirePackage{xcolor} +\RequirePackage[table]{xcolor} \RequirePackage[pdftex]{graphicx} +\RequirePackage{ifthen} \RequirePackage{xspace} \RequirePackage{makeidx} \RequirePackage[leftbars]{changebar} -\RequirePackage[english]{babel} \RequirePackage{fancyhdr} \RequirePackage{titlesec} +\RequirePackage{upquote} +\RequirePackage[pdftex,pdfstartview=FitH]{hyperref} +\ifusecc\RequirePackage{doclicense}\else\fi % -------------------------------------------------------------------------- % --- Page Layout --- % -------------------------------------------------------------------------- @@ -101,14 +125,49 @@ {#1} \medskip +\ifusecc\doclicenseThis\else\fi +} + +% \acknowledge{<flag image file>}{<text inside box>} +\newcommand{\acknowledge}[2]{ + \fbox{ + \begin{minipage}{0.97\textwidth} + \begin{minipage}{1.2cm} + \includegraphics[width=\linewidth]{#1} + \end{minipage} + \begin{minipage}{0.90\textwidth} + This project has received funding from #2. + \end{minipage} + \end{minipage} + } } + +\newcommand{\acknowledgeANR}{ + \acknowledge{anr-logo.png}{the French ANR projects + CAT~(ANR-05-RNTL-00301) and U3CAT~(08-SEGI-021-01) + } +} + +\newcommand{\acknowledgeEU}{ + \acknowledge{eu-flag.jpg}{the + European Union's Seventh Framework Programme (FP7/2007-2013) + under grant agreement N$^\circ$\,317753 (\mbox{STANCE}).\\ + It has also received funding from the Horizon 2020 research + and innovation programme, under grant agreements + N$^\circ$\,731453~(\mbox{VESSEDIA}), + N$^\circ$\,824231~(\mbox{DECODER}), + N$^\circ$\,830892~(\mbox{SPARTA}), + and N$^\circ$\,883242~(\mbox{ENSURESEC}) + } +} + % -------------------------------------------------------------------------- % --- Sectionning --- % -------------------------------------------------------------------------- \titleformat{\chapter}[display]{\Huge\raggedleft}% {\huge\chaptertitlename\,\thechapter}{0.5em}{} \titleformat{\section}[hang]{\Large\bfseries}{\thesection}{1em}{}% -[\vspace{-14pt}\rule{\textwidth}{0.1pt}\vspace{-8pt}] +[\vspace{-14pt}\rule{\textwidth}{0.1pt}\nopagebreak\vspace{-8pt}] \titleformat{\subsubsection}[hang]{\bfseries}{}{}{}% [\vspace{-8pt}] @@ -146,7 +205,7 @@ \definecolor{lstspecial}{rgb}{0.2,0.6,0.0} \definecolor{lstfile}{gray}{0.85} \newcommand{\lstbrk}{\mbox{$\color{blue}\scriptstyle\cdots$}} -\def\lp@basic{\ifmmode\normalfont\mathtt\mdseries\scriptsize\else\normalfont\ttfamily\mdseries\scriptsize\fi} +\def\lp@basic{\ifmmode\normalfont\mathtt\mdseries\small\else\normalfont\ttfamily\mdseries\small\fi} \def\lp@inline{\ifmmode\normalfont\mathtt\scriptstyle\else\normalfont\ttfamily\mdseries\small\fi} \def\lp@keyword{} \def\lp@special{\color{lstfg}} @@ -154,6 +213,7 @@ \def\lp@string{\color{lstfg}} \def\lp@ident{} \def\lp@number{\rmfamily\tiny\color{lstnum}} \lstdefinestyle{frama-c-style}{% + columns=flexible,% basicstyle=\lp@inline,% identifierstyle=\lp@ident,% commentstyle=\lp@comment,% @@ -204,8 +264,16 @@ % --- Verbatim Stuff ------------------------------------------------------- \lstdefinelanguage{Shell}[]{csh}% -{identifierstyle=\lp@basic,mathescape=false,backgroundcolor=,literate={\\\$}{\$}1} -\lstnewenvironment{shell}[1][]{\lstset{language=Shell,basicstyle=\lp@basic,#1}}{} +{escapechar=@ + identifierstyle=\lp@basic, + mathescape=false, + backgroundcolor=, + literate={\\\$}{\$}1 +} + +\lstnewenvironment{shell}[1][] +{\lstset{language=Shell,basicstyle=\lp@basic,#1}} +{} % ---- Stdout Stuff -------------------------------------------------------- \lstdefinelanguage{Logs}[]{csh}% @@ -242,7 +310,9 @@ keywordstyle=[3]\sffamily\bfseries,% identifierstyle=\ttfamily,% stringstyle=\ttfamily\color{lstfg},% commentstyle=\rmfamily\bfseries\color{lsttxt},% -literate={\\\$}{\$}1,% +literate={\\\$}{\$}1% +{€}{\textbackslash}1% +,% } % --- Configure ------------------------------------------------------------ \lstdefinelanguage{Configure}[]{csh}{% @@ -277,20 +347,21 @@ morekeywords=[2]{failwith,raise,when},% morekeywords=[3]{module,struct,sig,begin,end},% literate=% {~}{${\scriptstyle\thicksim}$}1% -{<}{$<$}1% -{>}{$>$}1% -{->}{$\rightarrow$}1% -{<-}{$\leftarrow$}1% -{:=}{$\leftarrow$}1% -{<=}{$\leq$}1% -{>=}{$\geq$}1% -{==}{$\equiv$}1% -{!=}{$\not\equiv$}1% -{<>}{$\neq$}1% -{'a}{$\alpha$}1% -{'b}{$\beta$}1% -{'c}{$\gamma$}1% -{µ}{`{}}1% +{<}{$<$ }1% +{>}{$>$ }1% +{->}{$\rightarrow$ }1% +{<-}{$\leftarrow$ }1% +{:=}{$\leftarrow$ }1% +{<=}{$\leq$ }1% +{>=}{$\geq$ }1% +{==}{$\equiv$ }1% +{!=}{$\not\equiv$ }1% +{<>}{$\neq$ }1% +{'a}{$\alpha$ }1% +{'b}{$\beta$ }1% +{'c}{$\gamma$ }1% +{µ}{`{}}1% +{€}{\textbackslash}1% } \lstdefinestyle{ocaml-basic}% @@ -326,7 +397,7 @@ basicstyle=\lp@inline,% {\lstinputlisting[style=why-style,basicstyle=\lp@basic]{#1}} \newcommand{\whyinline}[1]% {\lstinline[style=why-style]{#1}} - +\makeatother % -------------------------------------------------------------------------- % --- End. --- % -------------------------------------------------------------------------- diff --git a/doc/userman/main.tex b/doc/userman/main.tex index a1831078a61fe244e856cc79ef5d1bec1f6fcc68..61f49a25a9b392d18c12afd913d244dcf243bedd 100644 --- a/doc/userman/main.tex +++ b/doc/userman/main.tex @@ -1,14 +1,11 @@ -\documentclass[web]{frama-c-book} +\documentclass{frama-c-book} \usepackage{graphicx} \usepackage{calc} \usepackage{datetime} \newdateformat{ddMyyyydate}{\THEDAY~\monthname[\THEMONTH]~\THEYEAR} - - -\include{macros} -\include{fclangversion} - +\input{macros.tex} +\input{fclangversion.tex} \makeindex