diff --git a/doc/dev/documentation.org b/doc/dev/documentation.org index f2b27fed06bcd1e9733d984e83a9d171395774fa..4d2b58a2c5489a30ffc740a2644d8496ac331242 100644 --- a/doc/dev/documentation.org +++ b/doc/dev/documentation.org @@ -28,6 +28,9 @@ #+OPTIONS: toc:t #+LANGUAGE: UKenglish +#+BEGIN_ABSTRACT +#+END_ABSTRACT + * Introduction Pamhyr2 is free and open source software (FOSS) graphical user @@ -126,6 +129,7 @@ print(f"Document build on system: {os.name}") If you use GNUEmacs, it is also possible to run the code inside a block and export (or not) the reuslts in the document. +#+OPTIONS: float:nil #+CAPTION: Get os type name in Python code #+begin_src python :python python3 :results output :exports both :noweb yes import os @@ -138,15 +142,15 @@ print(f"Document build on system: {os.name}") *** Latex -If we export the file to PDF, org-mode use \LaTeX. So we can add some -piece of \LaTeX into the document[fn:: See \LaTeX part in -documentation: https://orgmode.org/org.html#Embedded-LaTeX (last +If we export the file to PDF, org-mode use {{{latex}}}. So we can add +some piece of {{{latex}}} into the document[fn:: See {{{latex}}} part +in documentation: https://orgmode.org/org.html#Embedded-LaTeX (last access 2023-09-15)]. For exemple, we can add math formula like =$E=mc^2$= ($E=mc^2$) or =\[E=mc^2\]=: \[E=mc^2\] -But we can also add every type of \LaTeX: +But we can also add every type of {{{latex}}}: #+BEGIN_EXAMPLE # Add latex in line @@ -158,9 +162,9 @@ But we can also add every type of \LaTeX: #+END_EXPORT #+END_EXAMPLE -It is also possible to add specific \LaTeX file header with +It is also possible to add specific {{{latex}}} file header with =#+LATEX_HEADER=. In this document we use the file -{{{file(doc/tools/latex.org)}}} for all \LaTeX headers. +{{{file(doc/tools/latex.org)}}} for all {{{latex}}} headers. *** Macro @@ -211,7 +215,7 @@ a lot better than it used to. *** References -The references use the \LaTeX bibtex tools. The bib file is in +The references use the {{{latex}}} bibtex tools. The bib file is in {{{file(/doc/tools/ref.bib)}}} and use for developers and user documentation. In document, use ={{{cite(<name>)}}}= to cite a paper. @@ -221,18 +225,21 @@ To export the files, a {{{build.sh}}} script is available in the org files directories. On GNU/Linux system you can build the documentation PDF file with the command =./build.sh=. Texlive package must be installed, you can install only needed packages or all texlive -packages, for example on Debian (and some derived system): +packages, for example on Debian (and some derived system) use command +Listing [[texlive-install]]. +#+NAME: texlive-install #+CAPTION: Installation command for texlive full on Debian system #+begin_src shell -sudo apt install texlive-full + sudo apt install texlive-full #+end_src Some org-mode configuration used in documentations files are define in =/doc/tools/=: -- {{{file(PamhyrDoc.cls)}}}: The \LaTeX theme +- {{{file(PamhyrDoc.cls)}}}: The {{{latex}}} document class - {{{file(macro.org)}}}: Available macro -- {{{file(latex.org)}}}: \LaTeX configutation for documentations files +- {{{file(latex.org)}}}: {{{latex}}} configutation for documentations + files - {{{file(setup.el)}}}: GNUEmacs configuration to build documentations - {{{file(ref.bib)}}}: Bibtex files for documentations files diff --git a/doc/images/GPLv3_Logo.png b/doc/images/GPLv3_Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1f6ddf89ad8e956bf674a98e9f0cb08d0f29e651 Binary files /dev/null and b/doc/images/GPLv3_Logo.png differ diff --git a/doc/tools/PamhyrDoc.cls b/doc/tools/PamhyrDoc.cls index e2d15fa062993f43d6bf9be80622950468418954..5d63b4b4b99c6efd43dcd49fa638865c179c9d48 100644 --- a/doc/tools/PamhyrDoc.cls +++ b/doc/tools/PamhyrDoc.cls @@ -66,12 +66,10 @@ \fontsize{26pt}{24pt} \selectfont \@title \\ + Document licence: GPLv3 \\ + \medskip + \includegraphics[width=3cm]{../images/GPLv3_Logo.png} \\ \medskip - } - \vspace{0.3cm} - { - %\centering - %\scshape \fontsize{14pt}{16pt} \selectfont © \@author \\ @@ -100,3 +98,39 @@ %%\rule{\textwidth}{0.4pt} } } + +%% +%% Verbatim +%% + +\AtBeginEnvironment{verbatim}{\footnotesize} + +%% Source code blocks +\usepackage{minted} +\usemintedstyle{emacs} +\setminted[c]{fontsize=\footnotesize,encoding=utf8,linenos} +\setminted[c++]{breaklines,fontsize=\footnotesize,encoding=utf8,linenos} +\setminted[python]{breaklines,fontsize=\footnotesize,encoding=utf8,linenos} +\setminted[shell]{breaklines,fontsize=\footnotesize,encoding=utf8} +\setminted[scheme]{breaklines,fontsize=\footnotesize,encoding=utf8} +\setminted[commun-lisp]{breaklines,fontsize=\footnotesize,encoding=utf8} +\setminted[text]{breaklines,fontsize=\footnotesize,encoding=utf8} +\setminted[llvm]{breaklines,fontsize=\footnotesize,encoding=utf8} + +\BeforeBeginEnvironment{minted}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% +\AfterEndEnvironment{minted}{\end{tcolorbox}}% + +\makeatletter +\AtBeginEnvironment{minted}{\dontdofcolorbox} + +\def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} +\makeatother + +\BeforeBeginEnvironment{verbatim}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% +\AfterEndEnvironment{verbatim}{\end{tcolorbox}}% + +\makeatletter +\AtBeginEnvironment{verbatim}{\dontdofcolorbox} + +\def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} +\makeatother diff --git a/doc/tools/latex.org b/doc/tools/latex.org index 32c47e2320728e1dc5177ad4ffe902c7a4409668..2e655049bbd0199cfb896cc32ae0ca6209acdc69 100644 --- a/doc/tools/latex.org +++ b/doc/tools/latex.org @@ -17,35 +17,3 @@ # -*- coding: utf-8 -*- #+LaTeX_CLASS: PamhyrDoc - -# Source code blocks -#+LATEX_HEADER: \usepackage{minted} -#+LATEX_HEADER: \usemintedstyle{emacs} -#+LATEX_HEADER: \setminted[c]{fontsize=\footnotesize,encoding=utf8,linenos} -#+LATEX_HEADER: \setminted[c++]{breaklines,fontsize=\footnotesize,encoding=utf8,linenos} -#+LATEX_HEADER: \setminted[shell]{breaklines,fontsize=\footnotesize} -#+LATEX_HEADER: \setminted[python]{breaklines,fontsize=\footnotesize,linenos} -#+LATEX_HEADER: \setminted[scheme]{breaklines,fontsize=\footnotesize} -#+LATEX_HEADER: \setminted[commun-lisp]{breaklines,fontsize=\footnotesize} -#+LATEX_HEADER: \setminted[text]{breaklines,fontsize=\footnotesize} -#+LATEX_HEADER: \setminted[llvm]{breaklines,fontsize=\footnotesize} - -#+LATEX_HEADER: \BeforeBeginEnvironment{minted}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% -#+LATEX_HEADER: \AfterEndEnvironment{minted}{\end{tcolorbox}}% - -#+LATEX_HEADER: \makeatletter -#+LATEX_HEADER: \AtBeginEnvironment{minted}{\dontdofcolorbox} - -#+LATEX_HEADER: \def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} -#+LATEX_HEADER: \makeatother - -#+LATEX_HEADER: \BeforeBeginEnvironment{verbatim}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% -#+LATEX_HEADER: \AfterEndEnvironment{verbatim}{\end{tcolorbox}}% - -#+LATEX_HEADER: \makeatletter -#+LATEX_HEADER: \AtBeginEnvironment{verbatim}{\dontdofcolorbox} - -#+LATEX_HEADER: \def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} -#+LATEX_HEADER: \makeatother - -#+LATEX_HEADER: \verbatimfont{\footnotesize} diff --git a/doc/tools/macro.org b/doc/tools/macro.org index fb760c9f1ee851ecd6f406899b8296ffa051a123..76db07806139414cceb01d8398b5f1bfa1495222 100644 --- a/doc/tools/macro.org +++ b/doc/tools/macro.org @@ -22,6 +22,7 @@ #+MACRO: Mage Mage #+MACRO: Rubarbe RubarBE #+MACRO: Inrae INRAE +#+MACRO: latex \LaTeX # Information #+MACRO: version (eval (pamhyr-version))