From fc1e72173ba76451e39f722985fdd7c4e712231d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Star=C3=BD=20Novotn=C3=BD?= Date: Thu, 4 Jul 2024 13:46:06 +0200 Subject: [PATCH 1/3] Update to Markdown 3, use expltools prefix, use small Docker image in CI --- .github/workflows/main.yml | 23 +++--- docs/DEPENDS.txt | 1 + .../warnings-and-errors/00-introduction.md | 0 .../warnings-and-errors/01-preprocessing.md | 0 .../02-lexical-analysis.md | 0 .../03-syntactic-analysis.md | 0 .../04-semantic-analysis.md | 0 .../warnings-and-errors/05-flow-analysis.md | 0 .../warnings-and-errors/99-caveats.md | 0 .../explcheck}/warnings-and-errors/CAVEATS.md | 0 .../latex-documents/2024-05-08/expl3.pdf | Bin .../2024-05-08/l3styleguide.pdf | Bin .../latex-documents/2024-05-15/interface3.pdf | Bin .../warnings-and-errors.tex | 8 +- .../explcheck}/warnings-and-errors.bib | 0 .../explcheck}/warnings-and-errors.ist | 0 .../latex/expl3check/warnings-and-errors.cls | 13 ---- .../tex/latex/expltools/explcheck/DEPENDS.txt | 8 ++ ...pltools_explcheck_warnings-and-errors.sty} | 70 +++++++++--------- .../explcheck/warnings-and-errors.cls | 21 ++++++ texmf/tex/latex/markdown/DEPENDS.txt | 9 +++ 21 files changed, 92 insertions(+), 61 deletions(-) create mode 100644 docs/DEPENDS.txt rename docs/{ => expltools/explcheck}/warnings-and-errors/00-introduction.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/01-preprocessing.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/02-lexical-analysis.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/03-syntactic-analysis.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/04-semantic-analysis.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/05-flow-analysis.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/99-caveats.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/CAVEATS.md (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/latex-documents/2024-05-08/expl3.pdf (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/latex-documents/2024-05-08/l3styleguide.pdf (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/latex-documents/2024-05-15/interface3.pdf (100%) rename docs/{ => expltools/explcheck}/warnings-and-errors/warnings-and-errors.tex (73%) rename texmf/bibtex/bib/{expl3check => expltools/explcheck}/warnings-and-errors.bib (100%) rename texmf/makeindex/{expl3check => expltools/explcheck}/warnings-and-errors.ist (100%) delete mode 100644 texmf/tex/latex/expl3check/warnings-and-errors.cls create mode 100644 texmf/tex/latex/expltools/explcheck/DEPENDS.txt rename texmf/tex/latex/{expl3check/markdownthemewitiko_expl3check_warnings-and-errors.sty => expltools/explcheck/markdownthemewitiko_expltools_explcheck_warnings-and-errors.sty} (63%) create mode 100644 texmf/tex/latex/expltools/explcheck/warnings-and-errors.cls create mode 100644 texmf/tex/latex/markdown/DEPENDS.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da0e35cd..7bb4e6f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,6 @@ jobs: docs: name: Typeset documentation runs-on: ubuntu-latest - container: - image: texlive/texlive:TL2023-historic permissions: contents: write steps: @@ -21,18 +19,25 @@ jobs: - name: Install additional packages run: | set -ex - apt -qy update - apt -qy install --no-install-recommends parallel + sudo apt -qy update + sudo apt -qy install --no-install-recommends parallel + - name: Install TeX Live + uses: teatimeguest/setup-texlive-action@v3 + with: + packages: | + scheme-basic + package-file: | + **/DEPENDS.txt - name: Typeset documentation run: | set -ex - export TEXMFHOME=../../texmf - parallel --halt now,fail=1 -- latexmk -r docs/latexmkrc -cd ':::' docs/*/*.tex + export TEXMFHOME="$PWD"/texmf + find docs/ -type f -name '*.tex' | parallel --halt now,fail=1 -- latexmk -r docs/latexmkrc -cd - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: docs - path: docs/*/*.pdf + name: Documentation + path: docs/**/*.pdf - name: Create a prerelease if: github.ref == 'refs/heads/main' uses: marvinpinto/action-automatic-releases@latest @@ -41,4 +46,4 @@ jobs: automatic_release_tag: latest prerelease: true repo_token: ${{ secrets.GITHUB_TOKEN }} - files: docs/*/*.pdf + files: docs/**/*.pdf diff --git a/docs/DEPENDS.txt b/docs/DEPENDS.txt new file mode 100644 index 00000000..27012cda --- /dev/null +++ b/docs/DEPENDS.txt @@ -0,0 +1 @@ +latexmk diff --git a/docs/warnings-and-errors/00-introduction.md b/docs/expltools/explcheck/warnings-and-errors/00-introduction.md similarity index 100% rename from docs/warnings-and-errors/00-introduction.md rename to docs/expltools/explcheck/warnings-and-errors/00-introduction.md diff --git a/docs/warnings-and-errors/01-preprocessing.md b/docs/expltools/explcheck/warnings-and-errors/01-preprocessing.md similarity index 100% rename from docs/warnings-and-errors/01-preprocessing.md rename to docs/expltools/explcheck/warnings-and-errors/01-preprocessing.md diff --git a/docs/warnings-and-errors/02-lexical-analysis.md b/docs/expltools/explcheck/warnings-and-errors/02-lexical-analysis.md similarity index 100% rename from docs/warnings-and-errors/02-lexical-analysis.md rename to docs/expltools/explcheck/warnings-and-errors/02-lexical-analysis.md diff --git a/docs/warnings-and-errors/03-syntactic-analysis.md b/docs/expltools/explcheck/warnings-and-errors/03-syntactic-analysis.md similarity index 100% rename from docs/warnings-and-errors/03-syntactic-analysis.md rename to docs/expltools/explcheck/warnings-and-errors/03-syntactic-analysis.md diff --git a/docs/warnings-and-errors/04-semantic-analysis.md b/docs/expltools/explcheck/warnings-and-errors/04-semantic-analysis.md similarity index 100% rename from docs/warnings-and-errors/04-semantic-analysis.md rename to docs/expltools/explcheck/warnings-and-errors/04-semantic-analysis.md diff --git a/docs/warnings-and-errors/05-flow-analysis.md b/docs/expltools/explcheck/warnings-and-errors/05-flow-analysis.md similarity index 100% rename from docs/warnings-and-errors/05-flow-analysis.md rename to docs/expltools/explcheck/warnings-and-errors/05-flow-analysis.md diff --git a/docs/warnings-and-errors/99-caveats.md b/docs/expltools/explcheck/warnings-and-errors/99-caveats.md similarity index 100% rename from docs/warnings-and-errors/99-caveats.md rename to docs/expltools/explcheck/warnings-and-errors/99-caveats.md diff --git a/docs/warnings-and-errors/CAVEATS.md b/docs/expltools/explcheck/warnings-and-errors/CAVEATS.md similarity index 100% rename from docs/warnings-and-errors/CAVEATS.md rename to docs/expltools/explcheck/warnings-and-errors/CAVEATS.md diff --git a/docs/warnings-and-errors/latex-documents/2024-05-08/expl3.pdf b/docs/expltools/explcheck/warnings-and-errors/latex-documents/2024-05-08/expl3.pdf similarity index 100% rename from docs/warnings-and-errors/latex-documents/2024-05-08/expl3.pdf rename to docs/expltools/explcheck/warnings-and-errors/latex-documents/2024-05-08/expl3.pdf diff --git a/docs/warnings-and-errors/latex-documents/2024-05-08/l3styleguide.pdf b/docs/expltools/explcheck/warnings-and-errors/latex-documents/2024-05-08/l3styleguide.pdf similarity index 100% rename from docs/warnings-and-errors/latex-documents/2024-05-08/l3styleguide.pdf rename to docs/expltools/explcheck/warnings-and-errors/latex-documents/2024-05-08/l3styleguide.pdf diff --git a/docs/warnings-and-errors/latex-documents/2024-05-15/interface3.pdf b/docs/expltools/explcheck/warnings-and-errors/latex-documents/2024-05-15/interface3.pdf similarity index 100% rename from docs/warnings-and-errors/latex-documents/2024-05-15/interface3.pdf rename to docs/expltools/explcheck/warnings-and-errors/latex-documents/2024-05-15/interface3.pdf diff --git a/docs/warnings-and-errors/warnings-and-errors.tex b/docs/expltools/explcheck/warnings-and-errors/warnings-and-errors.tex similarity index 73% rename from docs/warnings-and-errors/warnings-and-errors.tex rename to docs/expltools/explcheck/warnings-and-errors/warnings-and-errors.tex index da97ef14..caff0f98 100644 --- a/docs/warnings-and-errors/warnings-and-errors.tex +++ b/docs/expltools/explcheck/warnings-and-errors/warnings-and-errors.tex @@ -1,13 +1,13 @@ -\documentclass{expl3check/warnings-and-errors} -\begin{markdown*}{snippet=witiko/expl3check/warnings-and-errors/metadata} +\documentclass{expltools/explcheck/warnings-and-errors} +\begin{markdown}[snippet=metadata] title: Warnings and errors for the expl3 analysis tool author: Vít Starý Novotný -\end{markdown*} +\end{markdown} \begin{document} \tableofcontents \clearpage \setcounter{secnumdepth}{0} -\markdownSetup{snippet=witiko/expl3check/warnings-and-errors/body} +\markdownSetup{snippet=body} \markdownInput{00-introduction.md} \setcounter{secnumdepth}{1} \markdownInput{01-preprocessing.md} diff --git a/texmf/bibtex/bib/expl3check/warnings-and-errors.bib b/texmf/bibtex/bib/expltools/explcheck/warnings-and-errors.bib similarity index 100% rename from texmf/bibtex/bib/expl3check/warnings-and-errors.bib rename to texmf/bibtex/bib/expltools/explcheck/warnings-and-errors.bib diff --git a/texmf/makeindex/expl3check/warnings-and-errors.ist b/texmf/makeindex/expltools/explcheck/warnings-and-errors.ist similarity index 100% rename from texmf/makeindex/expl3check/warnings-and-errors.ist rename to texmf/makeindex/expltools/explcheck/warnings-and-errors.ist diff --git a/texmf/tex/latex/expl3check/warnings-and-errors.cls b/texmf/tex/latex/expl3check/warnings-and-errors.cls deleted file mode 100644 index a79a5b61..00000000 --- a/texmf/tex/latex/expl3check/warnings-and-errors.cls +++ /dev/null @@ -1,13 +0,0 @@ -\LoadClass{article} -\RequirePackage{lua-widow-control} -\RequirePackage{minted} -\setminted{breaklines, linenos} -\PassOptionsToPackage{theme=witiko/expl3check/warnings-and-errors}{markdown} -\RequirePackage{markdown} -\RequirePackage{biblatex} -\addbibresource{warnings-and-errors.bib} -\RequirePackage{embedfile} -\RequirePackage{imakeidx} -\makeindex[columns=3, intoc, options=-s warnings-and-errors.ist] -\RequirePackage{hyperref} -\def\meta#1{$\langle$\textrm{\textit{#1}}$\rangle$} \ No newline at end of file diff --git a/texmf/tex/latex/expltools/explcheck/DEPENDS.txt b/texmf/tex/latex/expltools/explcheck/DEPENDS.txt new file mode 100644 index 00000000..b9a412fd --- /dev/null +++ b/texmf/tex/latex/expltools/explcheck/DEPENDS.txt @@ -0,0 +1,8 @@ +biber +biblatex +embedfile +hyperref +imakeidx +lua-widow-control +markdown +minted diff --git a/texmf/tex/latex/expl3check/markdownthemewitiko_expl3check_warnings-and-errors.sty b/texmf/tex/latex/expltools/explcheck/markdownthemewitiko_expltools_explcheck_warnings-and-errors.sty similarity index 63% rename from texmf/tex/latex/expl3check/markdownthemewitiko_expl3check_warnings-and-errors.sty rename to texmf/tex/latex/expltools/explcheck/markdownthemewitiko_expltools_explcheck_warnings-and-errors.sty index 6f2153ff..48ff1267 100644 --- a/texmf/tex/latex/expl3check/markdownthemewitiko_expl3check_warnings-and-errors.sty +++ b/texmf/tex/latex/expltools/explcheck/markdownthemewitiko_expltools_explcheck_warnings-and-errors.sty @@ -1,53 +1,53 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesExplPackage - {markdownthemewitiko_expl3check_warnings-and-errors}% - {2024-06-24}% - {0.0.1}% - {Snippets for typesetting the documentation of the warnings and errors for the expl3check tool} + {markdownthemewitiko_expltools_explcheck_warnings-and-errors.sty}% + {2024-07-04}% + {0.0.2}% + {Snippets for typesetting the documentation of the warnings and errors for the expl3 analysis tool} \int_new:N - \g_subsection_int + \g__expltools_explcheck_subsection_int \tl_new:N - \g_subsection_tl + \g__expltools_explcheck_subsection_tl \tl_new:N - \l_current_label_tl + \l__expltools_explcheck_current_label_tl \tl_new:N - \l_current_identifier_tl + \l__expltools_explcheck_current_identifier_tl \prop_new:N - \g_labels_prop + \g__expltools_explcheck_labels_prop \cs_new:Nn - \increment_counters: + \__expltools_explcheck_increment_counters: { \int_gincr:N - \g_subsection_int + \g__expltools_explcheck_subsection_int \int_compare:nTF - { \g_subsection_int < 10 } + { \g__expltools_explcheck_subsection_int < 10 } { \tl_gset:Nn - \g_subsection_tl + \g__expltools_explcheck_subsection_tl { 0 } \tl_gput_right:NV - \g_subsection_tl - \g_subsection_int + \g__expltools_explcheck_subsection_tl + \g__expltools_explcheck_subsection_int } { \tl_gset:NV - \g_subsection_tl - \g_subsection_int + \g__expltools_explcheck_subsection_tl + \g__expltools_explcheck_subsection_int } \tl_if_empty:NF - \l_current_identifier_tl + \l__expltools_explcheck_current_identifier_tl { \prop_gput:NVV - \g_labels_prop - \l_current_identifier_tl - \l_current_label_tl + \g__expltools_explcheck_labels_prop + \l__expltools_explcheck_current_identifier_tl + \l__expltools_explcheck_current_label_tl \exp_args:NV \label - \l_current_identifier_tl + \l__expltools_explcheck_current_identifier_tl } \exp_args:NV \index - \l_current_label_tl + \l__expltools_explcheck_current_label_tl } \markdownSetupSnippet { metadata } @@ -62,7 +62,7 @@ content_blocks, definition_lists, fenced_code, - footnotes, + notes, header_attributes, html, raw_attribute, @@ -108,7 +108,7 @@ \l_tmpa_tl { ] } \prop_get:NVN - \g_labels_prop + \g__expltools_explcheck_labels_prop \l_tmpb_tl \l_tmpb_tl \tl_put_right:Nx @@ -121,10 +121,10 @@ headingOne = { \section { #1 } \int_gset:Nn - \g_subsection_int + \g__expltools_explcheck_subsection_int { 0 } \tl_gset:Nn - \g_subsection_tl + \g__expltools_explcheck_subsection_tl { 00 } }, headerAttributeContextBegin = { @@ -134,16 +134,16 @@ renderers = { attributeIdentifier = { \tl_set:Nn - \l_current_identifier_tl + \l__expltools_explcheck_current_identifier_tl { ##1 } }, attributeClassName = { \tl_set:Nx - \l_current_label_tl + \l__expltools_explcheck_current_label_tl { \str_uppercase:n { ##1 } \thesection - \g_subsection_tl + \g__expltools_explcheck_subsection_tl } \markdownSetup { @@ -151,16 +151,16 @@ headingTwo = { \subsection { - ####1~[ \l_current_label_tl ] + ####1~[ \l__expltools_explcheck_current_label_tl ] } - \increment_counters: + \__expltools_explcheck_increment_counters: }, headingThree = { \subsubsection { - ####1~[ \l_current_label_tl ] + ####1~[ \l__expltools_explcheck_current_label_tl ] } - \increment_counters: + \__expltools_explcheck_increment_counters: }, }, } @@ -172,4 +172,4 @@ \group_end: }, }, - } \ No newline at end of file + } diff --git a/texmf/tex/latex/expltools/explcheck/warnings-and-errors.cls b/texmf/tex/latex/expltools/explcheck/warnings-and-errors.cls new file mode 100644 index 00000000..bbbefbb9 --- /dev/null +++ b/texmf/tex/latex/expltools/explcheck/warnings-and-errors.cls @@ -0,0 +1,21 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass% + {warnings-and-errors}% + [2024-07-04 0.0.2 Documentation for typesetting the documentation of the warnings and errors for the expl3 analysis tool] +\LoadClass{article} +\RequirePackage{lua-widow-control} +\RequirePackage{minted} +\setminted{breaklines, linenos} +\RequirePackage{markdown} +\markdownSetup { + import = { + witiko/expltools/explcheck/warnings-and-errors = {metadata, body}, + } +} +\RequirePackage{biblatex} +\addbibresource{warnings-and-errors.bib} +\RequirePackage{embedfile} +\RequirePackage{imakeidx} +\makeindex[columns=3, intoc, options=-s warnings-and-errors.ist] +\RequirePackage{hyperref} +\def\meta#1{$\langle$\textrm{\textit{#1}}$\rangle$} diff --git a/texmf/tex/latex/markdown/DEPENDS.txt b/texmf/tex/latex/markdown/DEPENDS.txt new file mode 100644 index 00000000..618dfed8 --- /dev/null +++ b/texmf/tex/latex/markdown/DEPENDS.txt @@ -0,0 +1,9 @@ +csvsimple +gobble +l3kernel +lt3luabridge +microtype +paralist +pgf +scheme-basic +xkeyval From 0b1111f5591db8b5be8c37e8afb8a3bbbe452e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Star=C3=BD=20Novotn=C3=BD?= Date: Tue, 9 Jul 2024 13:24:26 +0200 Subject: [PATCH 2/3] Complete markdown's dependencies --- texmf/tex/latex/markdown/DEPENDS.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/texmf/tex/latex/markdown/DEPENDS.txt b/texmf/tex/latex/markdown/DEPENDS.txt index 618dfed8..6614511f 100644 --- a/texmf/tex/latex/markdown/DEPENDS.txt +++ b/texmf/tex/latex/markdown/DEPENDS.txt @@ -1,9 +1,22 @@ +amsfonts +amsmath +catchfile csvsimple +etoolbox gobble +graphics +grffile l3kernel +latex lt3luabridge +ltxcmds +lua-tinyyaml +lua-uni-algos microtype paralist pgf scheme-basic +soul +url +verse xkeyval From de63e892af21a815cbf1c74b8ff29997f4742923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Star=C3=BD=20Novotn=C3=BD?= Date: Mon, 22 Jul 2024 00:12:21 +0200 Subject: [PATCH 3/3] Remove hard dependencies of markdown --- texmf/tex/latex/markdown/DEPENDS.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/texmf/tex/latex/markdown/DEPENDS.txt b/texmf/tex/latex/markdown/DEPENDS.txt index 6614511f..ce4a895b 100644 --- a/texmf/tex/latex/markdown/DEPENDS.txt +++ b/texmf/tex/latex/markdown/DEPENDS.txt @@ -2,21 +2,17 @@ amsfonts amsmath catchfile csvsimple +epstopdf-pkg etoolbox +fancyvrb gobble graphics grffile -l3kernel latex -lt3luabridge ltxcmds -lua-tinyyaml -lua-uni-algos -microtype paralist pgf -scheme-basic soul +tools url verse -xkeyval