Skip to content

Commit

Permalink
fix all other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Apr 22, 2024
1 parent 50a9a39 commit ab9ce8d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 59 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
\[
Expand All @@ -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.
110 changes: 55 additions & 55 deletions tests/test.tex
Original file line number Diff line number Diff line change
Expand Up @@ -202,53 +202,53 @@

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.
De même la largeur des lignes horizontales est adaptée si on est dans un tableau.
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}
Expand All @@ -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:

Expand Down Expand Up @@ -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
} ;
Expand Down

0 comments on commit ab9ce8d

Please sign in to comment.