diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 96e1c69..3dd1514 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,17 +35,24 @@ jobs: ./scripts/install_font.sh ./scripts/install_texlive.sh echo "PATH=${HOME}/.texlive/bin/x86_64-linux:$PATH" >> $GITHUB_ENV + - name: Set up template + run: | + mkdir -p ${{ env.TEXMFDIR }} + ln -s ${PWD} ${{ env.TEXMFDIR }}/latex-template + texhash - name: Test Lua run: | cd tests make lua-test - name: Test LaTeX run: | - mkdir -p ${{ env.TEXMFDIR }} - ln -s ${PWD} ${{ env.TEXMFDIR }}/latex-template - texhash cd tests + make simple-test make author-test + make images-test + make nocolor-test + make big-test + make big-toc-test - name: Remove template from TeXLive before caching run: | rm ${{ env.TEXMFDIR }}/latex-template diff --git a/documentation.md b/documentation.md index 6a4b3be..0e8cd4f 100644 --- a/documentation.md +++ b/documentation.md @@ -165,7 +165,7 @@ A \LaTeX command. ## Float environments -In addition to standard float (`table`, `figure`), the `equationFloat` could be used to have mathematics floats or to add a caption to an equation. +In addition to standard float (`figure`), the `equationFloat` could be used to have mathematics floats or to add a caption to an equation. ```latex \[ @@ -174,6 +174,19 @@ In addition to standard float (`table`, `figure`), the `equationFloat` could be \captionof{equationfloat}{A sum} ``` +## Tabl + +This template now relies on [`tabularray`](https://github.com/lvjr/tabularray), and one should thus use the specific `zdstblr` environment to create table. + +```latex +\begin{zdstblr}{ccc} +element & element & element\\ +element & element & element\\ +element & element & element\\ +\end{zdstblr} +\captionof{table}{Légende du tableau} +``` + ## Appendices To add an appendix, use the `Appendix` environment. Appendix will be grouped in order of apparition at the end of the document. diff --git a/tests/test.tex b/tests/test.tex index 6f08e38..e2bc7d4 100644 --- a/tests/test.tex +++ b/tests/test.tex @@ -202,35 +202,35 @@ Et finalement, un tableau: -\begin{longtabu}{|c|c|c|} \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -\caption{Légende} -\end{longtabu} +\begin{zdstblr}{ccc} +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +\end{zdstblr} +\captionof{table}{Légende du tableau} Notons que si une image est dans un tableau, elle est redimensionnée si elle est trop grande. @@ -238,17 +238,17 @@ De plus, on peut faire des tableaux compliqués, avec de la fusion de ligne ou de colonnes, et même des paragraphes dans les cases du tableau. -\begin{longtabu}{|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|} \hline - 1 - 1 & \multirow{2}{*}{\parbox{\linewidth}{\centering 1 - 2 \endgraf 2 - 2}} & 1 \par 32 \par 4 \\ \cline{1-1} \cline{3-3} - \rowfont[l]{} - 2 - 1 & & 2 - 3 \\ \hline - \rule{\linewidth}{1.0pt} & 3 - 2 & 3 - 3 \\ \hline - \end{longtabu} +%\begin{zdstblr}{|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|} +% 1 - 1 & \multirow{2}{*}{\parbox{\linewidth}{\centering 1 - 2 \endgraf 2 - 2}} & 1 \par 32 \par 4 \\ \cline{1-1} \cline{3-3} +% \rowfont[l]{} +% 2 - 1 & & 2 - 3 \\ +% \rule{\linewidth}{1.0pt} & 3 - 2 & 3 - 3 \\ +%\end{zdstblr} -\begin{longtabu}{|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|} \hline - Colonne 1 & Colonne 2 & \inlineImage{test-images/logo.png} \\ \hline - \rule{\linewidth}{1.0pt} & 3 - 2 & 3 - 3 \\ \hline - \end{longtabu} +%\begin{zdstblr}{|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|m{\dimexpr(\linewidth) / 3}|} +% Colonne 1 & Colonne 2 & \inlineImage{test-images/logo.png} \\ +% \rule{\linewidth}{1.0pt} & 3 - 2 & 3 - 3 \\ +%\end{zdstblr} \begin{Spoiler} @@ -268,14 +268,14 @@ Et un tableau: -\begin{longtabu}{|c|c|c|} \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -element & element & element\\ \hline -\caption{Légende du tableau} -\end{longtabu} +\begin{zdstblr}{ccc} +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +element & element & element\\ +\end{zdstblr} +\captionof{table}{Légende du tableau} Et une citation: @@ -324,14 +324,14 @@ ou des tableaux \footnote{Exemple de note \begin{Appendix} -\begin{longtabu}{|c|c|c|} \hline - element & element & element\\ \hline - element & element & element\\ \hline - element & element & element\\ \hline - element & element & element\\ \hline - element & element & element\\ \hline - \caption{Légende du tableau} - \end{longtabu} +\begin{zdstblr}{ccc} + element & element & element\\ + element & element & element\\ + element & element & element\\ + element & element & element\\ + element & element & element\\ + \end{zdstblr} + \captionof{table}{Légende du tableau} \end{Appendix} où il y a un tableau } ;