commit e8d57f99a83a20fd778667c5ac243e68b84b5ad9 Author: Julien Fastré Date: Mon Jul 26 15:11:23 2021 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2d1e77f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/* +user-manual.pdf diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1a266e8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "src/pandoc/template"] + path = pandoc/template + url = https://github.com/Wandmalfarbe/pandoc-latex-template.git +[submodule "src/pandoc/cl"] + path = pandoc/cl + url = https://gitea.champs-libres.be/champs-libres/pandoc-cl.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..29ad1f1 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +Manuel utilisateur Vendée +========================= + +## Compilation + +`docker-compose` est utilisé pour compiler le manuel. + +Commande: + +```bash +docker-compose up +``` + +Le fichier généré est `user-manual.pdf` + + +### Utilisateur + +L'utilisateur qui exécute la compilation est, par défaut, l'utilisateur ayant l'id `1000`. + diff --git a/build-pandoc.sh b/build-pandoc.sh new file mode 100755 index 0000000..0c009c9 --- /dev/null +++ b/build-pandoc.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +echo "This script is for building pandoc natively" + +# enter the current directory +cd "$(dirname $0)" +export PANDOC_DIR=pandoc/cl + +files=( + src/parcours.md +) + +if [ -z $1 ]; then + export target=pdf +else + export target=$1 +fi + +export ARGS=" + --from markdown + --metadata-file ./metadata.yaml + --lua-filter "${PANDOC_DIR}/format-link.lua" +" +export PDF_TEMPLATE="./pandoc/template/eisvogel.tex" +export LATEX_ARGS=" + --template "${PDF_TEMPLATE}" + --lua-filter "${PANDOC_DIR}/boxes.lua" +" + + +if [ $target == "debug" ]; then + pandoc $ARGS $LATEX_ARGS \ + --to latex \ + $files; +elif [ $target == "pdf" ]; then + pandoc $ARGS $LATEX_ARGS \ + --to pdf \ + --pdf-engine xelatex \ + -o ./user-manual.pdf \ + $files +elif [ $target == "html" ]; then + # check target directory exists + if [ ! -d "./build/html" ]; then + echo "create build/html directory" + mkdir -p "./build/html" + fi + + pandoc $ARGS \ + --to html \ + -o ./build/html/index.html \ + $files +fi + diff --git a/debug.tex b/debug.tex new file mode 100644 index 0000000..816fee8 --- /dev/null +++ b/debug.tex @@ -0,0 +1,383 @@ +This script is for building pandoc natively +%% +% Copyright (c) 2017 - 2021, Pascal Wagler; +% Copyright (c) 2014 - 2021, John MacFarlane +% +% All rights reserved. +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions +% are met: +% +% - Redistributions of source code must retain the above copyright +% notice, this list of conditions and the following disclaimer. +% +% - Redistributions in binary form must reproduce the above copyright +% notice, this list of conditions and the following disclaimer in the +% documentation and/or other materials provided with the distribution. +% +% - Neither the name of John MacFarlane nor the names of other +% contributors may be used to endorse or promote products derived +% from this software without specific prior written permission. +% +% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +% FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +% COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGE. +%% + +%% +% This is the Eisvogel pandoc LaTeX template. +% +% For usage information and examples visit the official GitHub page: +% https://github.com/Wandmalfarbe/pandoc-latex-template +%% + +% Options for packages loaded elsewhere +\PassOptionsToPackage{unicode}{hyperref} +\PassOptionsToPackage{hyphens}{url} +\PassOptionsToPackage{dvipsnames,svgnames*,x11names*,table}{xcolor} +% +\documentclass[ + french, + paper=a4, + ,captions=tableheading +]{scrartcl} +\usepackage{amsmath,amssymb} +\usepackage{lmodern} +\usepackage{setspace} +\setstretch{1.2} +\usepackage{ifxetex,ifluatex} +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provide euro and other symbols +\else % if luatex or xetex + \usepackage{unicode-math} + \defaultfontfeatures{Scale=MatchLowercase} + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} +\fi +% Use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\IfFileExists{microtype.sty}{% use microtype if available + \usepackage[]{microtype} + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\makeatletter +\@ifundefined{KOMAClassName}{% if non-KOMA class + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt}} +}{% if KOMA class + \KOMAoptions{parskip=half}} +\makeatother +\usepackage{xcolor} +\definecolor{default-linkcolor}{HTML}{A50000} +\definecolor{default-filecolor}{HTML}{A50000} +\definecolor{default-citecolor}{HTML}{4077C0} +\definecolor{default-urlcolor}{HTML}{4077C0} +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} +\hypersetup{ + pdftitle={Manuel utilisateur de Chill}, + pdflang={fr-BE}, + hidelinks, + breaklinks=true, + pdfcreator={LaTeX via pandoc with the Eisvogel template}} +\urlstyle{same} % disable monospaced font for URLs +\usepackage[margin=2.5cm,includehead=true,includefoot=true,centering,]{geometry} +% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways +\usepackage{footnotebackref} +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering + +% Make use of float-package and set default placement for figures to H. +% The option H means 'PUT IT HERE' (as opposed to the standard h option which means 'You may put it here if you like'). +\usepackage{float} +\floatplacement{figure}{H} + +\ifxetex + % See issue https://github.com/reutenauer/polyglossia/issues/127 + \renewcommand*\familydefault{\sfdefault} + % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) + \usepackage{polyglossia} + \setmainlanguage[]{french} +\else + \usepackage[main=french]{babel} +% get rid of language-specific shorthands (see #6817): +\let\LanguageShortHands\languageshorthands +\def\languageshorthands#1{} +\fi +\ifluatex + \usepackage{selnolig} % disable illegal ligatures +\fi + +\title{Manuel utilisateur de Chill} +\author{} +\date{} + + + +%% +%% added +%% + +% +% language specification +% +% If no language is specified, use English as the default main document language. +% + + + +% +% for the background color of the title page +% + +% +% break urls +% +\PassOptionsToPackage{hyphens}{url} + +% +% When using babel or polyglossia with biblatex, loading csquotes is recommended +% to ensure that quoted texts are typeset according to the rules of your main language. +% +\usepackage{csquotes} + +% +% captions +% +\definecolor{caption-color}{HTML}{777777} +\usepackage[font={stretch=1.2}, textfont={color=caption-color}, position=top, skip=4mm, labelfont=bf, singlelinecheck=false, justification=raggedright]{caption} +\setcapindent{0em} + +% +% blockquote +% +\definecolor{blockquote-border}{RGB}{221,221,221} +\definecolor{blockquote-text}{RGB}{119,119,119} +\usepackage{mdframed} +\newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote} +\renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}% +\item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}} + +% +% Source Sans Pro as the de­fault font fam­ily +% Source Code Pro for monospace text +% +% 'default' option sets the default +% font family to Source Sans Pro, not \sfdefault. +% +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + \else % if not pdftex + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + + % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887 + % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the + % fix is still unreleased. + % TODO: Remove this workaround when the new version of sourcecodepro is released on CTAN. + \ifxetex + \makeatletter + \defaultfontfeatures[\ttfamily] + { Numbers = \sourcecodepro@figurestyle, + Scale = \SourceCodePro@scale, + Extension = .otf } + \setmonofont + [ UprightFont = *-\sourcecodepro@regstyle, + ItalicFont = *-\sourcecodepro@regstyle It, + BoldFont = *-\sourcecodepro@boldstyle, + BoldItalicFont = *-\sourcecodepro@boldstyle It ] + {SourceCodePro} + \makeatother + \fi + \fi + +% +% heading color +% +\definecolor{heading-color}{RGB}{40,40,40} +\addtokomafont{section}{\color{heading-color}} +% When using the classes report, scrreprt, book, +% scrbook or memoir, uncomment the following line. +%\addtokomafont{chapter}{\color{heading-color}} + +% +% variables for title, author and date +% +\usepackage{titling} +\title{Manuel utilisateur de Chill} +\author{} +\date{} + +% +% tables +% + +% +% remove paragraph indention +% +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +\setlength{\emergencystretch}{3em} % prevent overfull lines + +% +% +% Listings +% +% + + +% +% header and footer +% +\usepackage[headsepline,footsepline]{scrlayer-scrpage} + +\newpairofpagestyles{eisvogel-header-footer}{ + \clearpairofpagestyles + \ihead[]{Manuel utilisateur de Chill} + \chead[]{} + \ohead[Manuel utilisateur de Chill]{} + \ifoot[\thepage]{} + \cfoot[]{} + \ofoot[]{\thepage} + \addtokomafont{pageheadfoot}{\upshape} +} +\pagestyle{eisvogel-header-footer} + +%% +%% end added +%% + +\begin{document} + +%% +%% begin titlepage +%% + +%% +%% end titlepage +%% + + + +{ +\setcounter{tocdepth}{3} +\tableofcontents +} +\hypertarget{parcours}{% +\section{Parcours}\label{parcours}} + +TODO explication globale + +\begin{noteblock} + +Les informations suivantes sont \textbf{requises} pour valider un +parcours: + +\begin{itemize} +\tightlist +\item + le parcours doit renseigner au moins un usager concerné; +\item + au moins une problématique sociale est renseignée; +\item + le parcours est attribué à au moins un service; +\item + le parcours doit être + \protect\hyperlink{sec:parcours-localisation}{localisé} (section~\ref{sec:parcours-localisation}, page~\pageref{sec:parcours-localisation}); +\end{itemize} + +\end{noteblock} + +\hypertarget{sec:parcours-localisation}{% +\subsection{Localisation du parcours}\label{sec:parcours-localisation}} + +Chaque parcours \textbf{doit} être localisé. + +La localisation est réalisée par l'une ou l'autre manière: + +\begin{itemize} +\tightlist +\item + soit en indiquant une adresse temporaire sur le parcours; +\item + soit en renseignant un usager concerné ou un interlocuteur privilégié + du parcours. Dans ce cas, l'adresse du domicile de cet usager sera + utilisée pour localiser le parcours. +\end{itemize} + +\hypertarget{pourquoi-localiser-les-parcours}{% +\subsubsection{Pourquoi localiser les parcours +?}\label{pourquoi-localiser-les-parcours}} + +La localisation des parcours permet: + +\begin{itemize} +\tightlist +\item + de désigner les référents automatiquement, ou d'inclure les parcours + dans les listes des réunions de régulation pour les bons services et + MDSF; +\item + de générer des statistiques localisées; +\item + de gérer les droits +\end{itemize} + +\hypertarget{localiser-le-parcours-aupruxe8s-dun-usager-concernuxe9-ou-dun-interlocuteur-priviluxe9giuxe9}{% +\subsubsection{Localiser le parcours auprès d'un usager concerné ou d'un +interlocuteur +privilégié}\label{localiser-le-parcours-aupruxe8s-dun-usager-concernuxe9-ou-dun-interlocuteur-priviluxe9giuxe9}} + +Dans le cas où un usager ou un interlocuteur privilégié\footnote{Uniquement + les usagers: les tiers ne sont pas concernés.} dispose d'une adresse, +il est possible de localiser le parcours auprès de cet usager. + +Lorsqu'un parcours est localisé auprès d'un usager: + +\begin{itemize} +\tightlist +\item + le parcours ``suit'' l'adresse de l'usager lorsqu'il déménage; +\item + il n'est pas possible de dissocier du parcours l'usager concerné ou + l'interlocuteur privilégié; +\end{itemize} + +Par ailleurs, + +\begin{itemize} +\tightlist +\item + l'usager ne peut pas quitter le parcours, tant que le parcours est + localisé auprès de lui; +\item + l'usager ne peut pas quitter son ménage sans laisser d'adresse, tant + qu'il localisé auprès d'au moins un parcours. +\end{itemize} + +\hypertarget{localisation-temporaire}{% +\subsubsection{Localisation temporaire}\label{localisation-temporaire}} + +Une adresse temporaire peut être attribuée à un parcours. + +\hypertarget{section}{% +\subsubsection{}\label{section}} + +\end{document} diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..f682848 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +version: "3" + +services: + texlive: + image: chill_user_manual_build + build: + context: docker/latex + command: ./build-pandoc.sh + # currently hardcoded, sorry + user: "1000" + volumes: + - .:/workdir + working_dir: /workdir + diff --git a/docker/latex/Dockerfile b/docker/latex/Dockerfile new file mode 100644 index 0000000..7e65047 --- /dev/null +++ b/docker/latex/Dockerfile @@ -0,0 +1,7 @@ +FROM ghcr.io/xu-cheng/texlive-full:latest as textlive +LABEL maintainer="info@champs-libres.be" + +RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing add inkscape +RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing add pandoc + + diff --git a/metadata.yaml b/metadata.yaml new file mode 100644 index 0000000..374a12e --- /dev/null +++ b/metadata.yaml @@ -0,0 +1,9 @@ +--- +title: Manuel utilisateur de Chill +lang: fr-BE +toc: true + + +header-includes: | + \usepackage{awesomebox} +... diff --git a/pandoc/cl b/pandoc/cl new file mode 160000 index 0000000..2368788 --- /dev/null +++ b/pandoc/cl @@ -0,0 +1 @@ +Subproject commit 236878874f0badffd6bf7a15ff1f7b661a43c9ea diff --git a/pandoc/template b/pandoc/template new file mode 160000 index 0000000..4909f13 --- /dev/null +++ b/pandoc/template @@ -0,0 +1 @@ +Subproject commit 4909f13d58bb4c66243def1f6e01becd1820c767 diff --git a/src/parcours.md b/src/parcours.md new file mode 100644 index 0000000..a9d9b3d --- /dev/null +++ b/src/parcours.md @@ -0,0 +1,62 @@ + +# Parcours + + +TODO explication globale + +::: { .info } + +Les informations suivantes sont **requises** pour valider un parcours: + +* le parcours doit renseigner au moins un usager concerné; +* au moins une problématique sociale est renseignée; +* le parcours est attribué à au moins un service; +* le parcours doit être [localisé](#sec:parcours-localisation); + +::: + +## Localisation du parcours {#sec:parcours-localisation} + +Chaque parcours **doit** être localisé. + +La localisation est réalisée par l'une ou l'autre manière: + +* soit en indiquant une adresse temporaire sur le parcours; +* soit en renseignant un usager concerné ou un interlocuteur privilégié du parcours. Dans ce cas, l'adresse du domicile de cet usager sera utilisée pour localiser le parcours. + +::: {.vendee} + +### Pourquoi localiser les parcours ? + +La localisation des parcours permet: + +* de désigner les référents automatiquement, ou d'inclure les parcours dans les listes des réunions de régulation pour les bons services et MDSF; +* de générer des statistiques localisées; +* de gérer les droits + +::: + +### Localiser le parcours auprès d'un usager concerné ou d'un interlocuteur privilégié + +Dans le cas où un usager ou un interlocuteur privilégié[^usager-only] dispose d'une adresse, il est possible de localiser le parcours auprès de cet usager. + +[^usager-only]: Uniquement les usagers: les tiers ne sont pas concernés. + +Lorsqu'un parcours est localisé auprès d'un usager: + +* le parcours "suit" l'adresse de l'usager lorsqu'il déménage; +* il n'est pas possible de dissocier du parcours l'usager concerné ou l'interlocuteur privilégié; + +Par ailleurs, + +* l'usager ne peut pas quitter le parcours, tant que le parcours est localisé auprès de lui; +* l'usager ne peut pas quitter son ménage sans laisser d'adresse, tant qu'il localisé auprès d'au moins un parcours. + + +### Localisation temporaire + +Une adresse temporaire peut être attribuée à un parcours. + + + +###