Intégration de la documentation

This commit is contained in:
Bastien Dumont
2021-04-15 22:23:06 +02:00
18 changed files with 2142 additions and 2 deletions

View File

@ -21,6 +21,8 @@ else
DOC_FILE = $(DOC_DIR)/GUIDE_CSL-Clio
endif
FILTERS_LIST_LAST != ./get-filters.sh $(FILTERS_FILE_LAST)
DOC_DIR = ../Documentation
DOC_FILE = $(DOC_DIR)/GUIDE_CSL-Clio
PANDOC_OPTIONS = -s \
$(FILTERS_LIST_FIRST) \
-C \
@ -30,6 +32,12 @@ PANDOC_OPTIONS = -s \
$(FILTERS_LIST_LAST)
PROV_PREFIX = PROV_
HTML-VIEWER = palemoon
COMMON_DOC_OPTIONS=-s \
--filter pandoc-crossref \
-L license-dans-metadonnees.lua \
--top-level-division=chapter \
$(DOC_FILE).md \
--resource-path=.:$(DOC_DIR)
.PHONY: $(BIBLIO_FILE)
@ -78,5 +86,12 @@ install: $(VALIDATION_PROV_FILE)
clean:
rm $(STYLESHEETS_DIR)/*/*$(OUTPUT_FILE_SUFFIX)
doc:
pandoc -s -o $(DOC_FILE).pdf --resource-path=.:$(DOC_DIR) --pdf-engine=lualatex --template=TEMPLATE_Guide-CSL-Clio.latex --filter pandoc-crossref $(DOC_FILE).md
doc: docA4 docDiapo
docA4: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.latex
pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_A4.pdf --pdf-engine=lualatex --top-level-division=chapter --template=TEMPLATE_Guide-CSL-Clio.latex
docDiapo: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.context
pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_Diapo.tex -t context --template=TEMPLATE_Guide-CSL-Clio.context && \
cd $(DOC_DIR) && \
context --noconsole --errors $(DOC_FILE)_Diapo.tex

View File

@ -0,0 +1,132 @@
\mainlanguage[fr]
\setuppapersize[S6]
\setuplayout[backspace=2cm, topspace=0.7cm, bottom=0.5cm, width=middle, height=fit]
\setupinteraction[state=start,
$if(title)$
title={$title$},
$endif$
n$if(subtitle)$
subtitle={$subtitle$},
$endif$
$if(author)$
author={$for(author)$$author$$sep$; $endfor$},
$endif$
$if(keywords)$
keyword={$for(keywords)$$keywords$$sep$; $endfor$},
$endif$
style=,
color=blue,
contrastcolor=,
click=yes]
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
\setupbodyfontenvironment[default][em=italic]
\definefontfamily[mainface][rm][cochineal]
\definefontfamily[mainface][ss][linuxbiolinumo]
\definefontfamily[mainface][tt][nimbusmonops][features=none]
\setupbodyfont[mainface,12pt]
\setuptype[lines=hyphenated]
\setuphead[chapter] [style=\ssc\bf\setupinterlinespace,header=empty]
\setuphead[section] [style=\ssb\bf\setupinterlinespace]
\setuphead[subsection] [style=\ssa\bf\setupinterlinespace]
\setuphead[subsubsection] [style=\ss\bf]
\setuphead[subsubsubsection] [style=\ss]
\setuphead[subsubsubsubsection][style=\ss\it]
\setupheads[indentnext=yes]
\setuppagenumbering[location=] % Pour que le numéro de page n'apparaisse pas en haut au milieu
\setupheader[text][leftstyle=\em]
\setupheadertexts[section][pagenumber]
\setupfootertexts$if(toc)$[{\inframed{\goto{Table des matières}[page(3)]}}]$endif$[{\inframed{\goto{Retour à la page précédente}[PreviousJump]}}]
\setupbackend[
format={pdf/a-1a:2005},
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]
\setupbackend[export=yes]
\setupstructure[state=start,method=auto]
\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes]
\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes]
\setupalign[hz,hanging]
\setupitaliccorrection[global, always]
\setupwhitespace[halfline]
\setupindenting[yes, small]
\setupnotation[footnote][alternative=left, numbercommand=, stopper={.}]
\setupitemize[autointro] % prevent orphan list intro
\setupitemize[1][leftmargindistance=yes]
\definesymbol[1][—]
\definesymbol[2][]
\definesymbol[3][-]
\setupfloats[default={here}]
\setupcaptions[way=bytext, prefixsegments=none]
\setupdelimitedtext[blockquote][indenting=no]
\definebreakpoints[lbreakwithouthyphen]
\definebreakpoint[lbreakwithouthyphen][=][type=1]
\definebreakpoint[lbreakwithouthyphen][-][type=1]
\setbreakpoints[lbreakwithouthyphen]
\definemakeup[titlepage][doubleside=no,align=middle,headerstate=empty]
\definemakeup[licensepage][doubleside=no,top=\vfill,headerstate=empty]
\starttext
\starttitlepagemakeup
$if(title)$
{\tfd\setupinterlinespace $title$}
$if(subtitle)$
\blank[force,1cm]
{\tfa\setupinterlinespace $subtitle$}
$endif$
$if(author)$
\blank[force,1cm]
{\tfa\setupinterlinespace $for(author)$$author$$sep$\crlf $endfor$}
$endif$
$if(date)$
\blank[force,1cm]
{\tfa\setupinterlinespace $date$}
$endif$
\stoptitlepagemakeup
\pagebreak
$endif$
\startlicensepagemakeup
$-- requiert le filtre "license-dans-metadonnees.lua"
\inframed[frame=off, width=0.66\textwidth, align=normal]{$license$}
\stoplicensepagemakeup
\pagebreak
\setupcombinedlist[content, listoftables, listoffigures][criterium=all,
list={chapter,section,subsection},
alternative=c]
\setuplist[chapter, section, subsection][color=no, numberstyle={\feature[-][f:oldstyle]}, pagestyle={\feature[-][f:oldstyle]}]
\setuplist[chapter][width=1em, style=\ss\bf]
\setuplist[section][margin=1em, width=2em]
\setuplist[subsection][margin=3em, width=3em]
$if(toc)$
%\reference[label:toc]
\completecontent
$endif$
$if(lot)$
\completelistoftables
$endif$
$if(lof)$
\completelistoffigures
$endif$
\pagebreak
$body$
\input{../Utilitaires/fdl-1.3_ConTeXt}
\stoptext

View File

@ -0,0 +1,134 @@
\documentclass[listof=leveldown, twoside=off]{scrbook}
\usepackage{microtype}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
% Don't number figures by chapter
\usepackage{chngcntr}
\counterwithout{figure}{section}
\counterwithout{table}{section}
\usepackage{longtable,booktabs,array}
% Change caption formatting (KOMA-script)
%% See also at the end of polyglossia bloc
\setkomafont{captionlabel}{\sffamily\bfseries}
\renewcommand*{\captionformat}{ : }
\setcapmargin{0.1\linewidth}
\addtolength{\belowcaptionskip}{2mm}
\usepackage[normalem]{ulem}
$if(highlighting-macros)$
$highlighting-macros$
$endif$
\usepackage[dvipsnames,svgnames*,x11names*]{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
\usepackage{parskip}
\setlength{\parindent}{1em}
\usepackage{polyglossia}
\setmainlanguage[autospacing=false, autospaceguillemets=false, frenchfootnote=true]{french}
\setmainfont[Script=Latin, Letters=Uppercase, Kerning=On, Diacritics=MarkToBase, Ligatures=Common, Numbers=Proportional]{cochineal}
\usepackage{biolinum}
%\setsansfont[Script=Latin, Diacritics=MarkToBase, Ligatures=Common, Numbers=Proportional]{biolinum}
\setmonofont{Nimbus Mono}
% Prevent polyglossia from setting figure labels to small caps
\gappto\captionsfrench{\def\figurename{Fig.}}
\gappto\captionsfrench{\def\tablename{Tab.}}
\renewcommand{\labelitemi}{—}
\renewcommand{\labelitemii}{}
\newcommand*{\noindentation}{\noindent} $-- Compatibilité avec le code ConTeXt
\usepackage{hyperref}
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},
$endif$
$if(author-meta)$
pdfauthor={$author-meta$},
$endif$
$if(lang)$
pdflang={$lang$},
$endif$
$if(subject)$
pdfsubject={$subject$},
$endif$
$if(keywords)$
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
$endif$
colorlinks=true,
linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
pdfcreator={LaTeX via pandoc}}
\title{$title$}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{$subtitle$}
\author{$for(author)$$author$$sep$ \and $endfor$}
\date{$date$}
\begin{document}
$if(title)$
\maketitle
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$endif$
\pagebreak
\thispagestyle{empty}
\vspace*{\fill}
\parbox[b!]{0.66\textwidth}{
$-- requiert le filtre "license-dans-metadonnees.lua"
$license$
}
\pagebreak
{
\hypersetup{linkcolor=black}
\setcounter{tocdepth}{$toc-depth$}
$if(toc)$\tableofcontents$endif$
$if(lot)$\listoftables$endif$
$if(lof)$\listoffigures$endif$
}
$if(linestretch)$
\setstretch{$linestretch$}
$endif$
$body$
$for(include-after)$
$include-after$
$endfor$
\include{fdl-1.3.tex}
\end{document}