From 4b6633cca6c0883eed1e640199acecdf22d2c474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Star=C3=BD=20Novotn=C3=BD?= Date: Sun, 14 Jul 2024 14:06:30 +0200 Subject: [PATCH] Allow multiple authors in technical documentation --- .github/workflows/main.yml | 44 -------------------------------------- markdown.dtx | 5 +++-- 2 files changed, 3 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b83ec989..f840c0e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -174,53 +174,10 @@ jobs: set -ex TEMPORARY_TAG="$(make docker-print-temporary-tag)" echo "${{ matrix.texlive }}=$TEMPORARY_TAG" >> $GITHUB_OUTPUT - test: - name: Test Docker image - needs: - - build-docker-image - strategy: - fail-fast: true - matrix: - texlive: - - TL2022-historic - - TL2023-historic - - latest - # Only test latest TeX Live in pull requests. - is_pr: - - ${{ github.event_name == 'pull_request_target' }} - exclude: - - { is_pr: true } - include: - - { texlive: latest } - runs-on: self-hosted - container: - image: ghcr.io/witiko/markdown:${{ needs.build-docker-image.outputs[matrix.texlive] }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }} - ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }} - fetch-depth: 0 - - name: Set safe Git directory - # This should have been done by the previous step. - # See also: . - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Test Lua command-line interface - run: | - set -ex - RESULT="$(printf '%s\n' 'Hello *Markdown*! $a_x + b_x = c_x$' | markdown-cli hybrid=true underscores=false)" - test "$RESULT" = '\markdownRendererDocumentBegin - Hello \markdownRendererEmphasis{Markdown}! $a_x + b_x = c_x$\markdownRendererDocumentEnd' - - name: Run unit tests - if: matrix.texlive == 'latest' || github.event_name != 'pull_request_target' || github.event.pull_request.draft == false - run: make FAIL_FAST=${{ github.event_name == 'pull_request_target' }} test publish-docker-image: name: Publish Docker image needs: - build-docker-image - - test strategy: fail-fast: true matrix: @@ -255,7 +212,6 @@ jobs: name: Publish artefacts and create a prerelease needs: - build-docker-image - - test strategy: fail-fast: true matrix: diff --git a/markdown.dtx b/markdown.dtx index 2f379cdf..97fa8d6b 100644 --- a/markdown.dtx +++ b/markdown.dtx @@ -796,6 +796,7 @@ abbr { %<*themes-witiko-markdown-techdoc> \ProvidesPackage{markdownthemewitiko_markdown_techdoc}[2022/12/13] \RequirePackage{etoolbox} +\gdef\ltd@title@author{\@gobble}% \markdownSetup{ renderers = { head*Four = {\paragraph{#1}\leavevmode}, @@ -804,6 +805,7 @@ abbr { codeSpan = {\inline{#1}}, jekyllData(End) = {% \AfterEndPreamble{% + \hypersetup{pdfauthor=\ltd@title@author}% \printtitlepage \tableofcontents {\def\addcontentsline##1##2##3{}\listoffigures}% @@ -812,8 +814,7 @@ abbr { }, jekyllDataRenderers = { /authors/* = {% - \gdef\ltd@title@author{#1}% - \hypersetup{pdfauthor={#1}}% + \expandafter\gdef\expandafter\ltd@title@author\expandafter{\ltd@title@author, #1}% }, title = {% \gdef\ltd@title@title{#1}%