From b534a0bcf54467e7c9a27cc7a7d03f51ae478c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Star=C3=BD=20Novotn=C3=BD?= Date: Sun, 16 Jun 2024 15:03:29 +0200 Subject: [PATCH] Correctly include short version in `markdown.html` --- Makefile | 5 +++-- markdown.dtx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 82d13962..0562a601 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ ifeq ($(NO_DOCUMENTATION), true) endif VERSION=$(shell git describe --tags --always --long --exclude latest) -SHORT_VERSION=$(shell git describe --tags --always --long --exclude latest | sed 's/-.*//') +SHORTVERSION=$(shell git describe --tags --always --long --exclude latest | sed 's/-.*//') LASTMODIFIED=$(shell git log -1 --date=format:%Y-%m-%d --format=%ad) ifndef DOCKER_TEXLIVE_TAG @@ -125,8 +125,8 @@ $(EXTRACTABLES): $(INSTALLER) $(DTXARCHIVE) luatex $< sed -i \ -e 's#(((VERSION)))#$(VERSION)#g' \ + -e 's#(((SHORTVERSION)))#$(SHORTVERSION)#g' \ -e 's#(((LASTMODIFIED)))#$(LASTMODIFIED)#g' \ - -e 's#(((SHORT_VERSION)))#$(SHORT_VERSION)#g' \ $(INSTALLABLES) sed -i \ -e '/\\ExplSyntaxOff/{N;/\\ExplSyntaxOn/d;}' \ @@ -177,6 +177,7 @@ markdown-transcluded.md: markdown.md markdown-interfaces.md markdown-options.md %.html: %-transcluded.md %.css sed -e 's#\\markdownVersion{}#$(VERSION)#g' \ + -e 's#\\markdownShortVersion{}#$(SHORTVERSION)#g' \ -e 's#\\markdownLastModified{}#$(LASTMODIFIED)#g' \ -e 's#\\TeX{}#TeX#g' \ -e 's#\\LaTeX{}#LaTeX#g' \ diff --git a/markdown.dtx b/markdown.dtx index 212d0036..34bb6f89 100644 --- a/markdown.dtx +++ b/markdown.dtx @@ -969,14 +969,14 @@ If Markdown is not included in your \TeX{} distribution, you will need to install it. From [Releases][], download [an archive `markdown.zip` for this version of the -Markdown package ((((SHORT_VERSION))))][this-release] or a different version +Markdown package (\markdownShortVersion{})][this-release] or a different version that you wish to install. Then, unzip the archive. If you downloaded a different version of the Markdown package, you should now locate a file named `markdown.html` with the user manual for that version, open it and follow the installation steps in it rather than the steps from this manual. [releases]: https://github.com/witiko/markdown/releases (Releases - witiko/markdown) - [this-release]: https://github.com/Witiko/markdown/releases/download/(((SHORT_VERSION)))/markdown.zip + [this-release]: https://github.com/witiko/markdown/releases/download/\markdownShortVersion{}/markdown.zip (Release \markdownShortVersion{} - witiko/markdown) Alternatively, download the package from the repository using Git, enter the directory named `markdown` and run the `make base` command using GNU Make: