Commit 8d5f75bb authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

Updated LaTeX docs models for pandoc v2+

parent b65f2452
......@@ -9,7 +9,7 @@ See also [developers documentation](DEVELOPERS.md) (in french)
* [jalhyd](https://gitlab.irstea.fr/cassiopee/jalhyd)
* npm
* python3
* pandoc (optional, for PDF documentation only)
* pandoc ^2 (optional, for PDF documentation only)
* texlive (optional, for PDF documentation only)
Building the HTML documentation requires MkDocs and some extensions:
......
......@@ -30,12 +30,16 @@ If we take the example of a rectangular channel, [the proposed scilab code examp
K=50;
If=0.005;
Q=0.01;
function z=DQ(y);z=Q-K*(b*y)^(5/3)/(b+2*y)^(2/3)*sqrt(If); endfunction
function z=DQ(y);
z=Q-K*(b*y)^(5/3)/(b+2*y)^(2/3)*sqrt(If);
endfunction
yn=fsolve(0.5,DQ);
tmax=0;
t0=10;
dt=-0.5;
function z=f(y,t);z=(If-Q^2*(b+2*y)^(4/3)/(K^2*(b*y)^(10/3)))/(1-Q^2/(9.81*b^2*y^3)); endfunction
function z=f(y,t);
z=(If-Q^2*(b+2*y)^(4/3)/(K^2*(b*y)^(10/3)))/(1-Q^2/(9.81*b^2*y^3));
endfunction
y0=0.12;
```
......
......@@ -36,7 +36,8 @@ N=(tmax-t0)/dt;
ii=1:N+1;
t=(ii-1)*dt; // time vector
t2=0:tmax; // time vector with a finer step, for the exact solution
// time vector with a finer step, for the exact solution
t2=0:tmax;
// Solution by Euler method, noted ye
ye(1)=y0; // boundary condition
......
......@@ -29,12 +29,16 @@ Si on prend l'exemple d'un canal rectangulaire, [l'exemple de code scilab propos
K=50;
If=0.005;
Q=0.01;
function z=DQ(y);z=Q-K*(b*y)^(5/3)/(b+2*y)^(2/3)*sqrt(If); endfunction
function z=DQ(y);
z=Q-K*(b*y)^(5/3)/(b+2*y)^(2/3)*sqrt(If);
endfunction
yn=fsolve(0.5,DQ);
tmax=0;
t0=10;
dt=-0.5;
function z=f(y,t);z=(If-Q^2*(b+2*y)^(4/3)/(K^2*(b*y)^(10/3)))/(1-Q^2/(9.81*b^2*y^3)); endfunction
function z=f(y,t);
z=(If-Q^2*(b+2*y)^(4/3)/(K^2*(b*y)^(10/3)))/(1-Q^2/(9.81*b^2*y^3));
endfunction
y0=0.12;
```
......
......@@ -36,7 +36,8 @@ N=(tmax-t0)/dt;
ii=1:N+1;
t=(ii-1)*dt; // vecteur temps
t2=0:tmax; // vecteur temps avec un pas plus fin, pour la solution exacte
// vecteur temps avec un pas plus fin, pour la solution exacte
t2=0:tmax;
// Solution par méthode d'Euler, notée ye
ye(1)=y0; // condition à la limite
......
......@@ -41,8 +41,48 @@
\newcommand{\website}{\url{www.g-eau.fr}\\\url{www.inrae.fr}}
%*******************************************************************************
% ******************* FOR PANDOC V2+ *************************
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
%*******************************************************************************
\begin{document}
%Supprime les veuves et orphelines
......
......@@ -41,8 +41,48 @@
\newcommand{\website}{\url{www.g-eau.fr}\\\url{www.inrae.fr}}
%*******************************************************************************
% ******************* FOR PANDOC V2+ *************************
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
%*******************************************************************************
\begin{document}
%Supprime les veuves et orphelines
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment