[latex3-commits] [git/LaTeX3-latex3-hyperref] master: add tagging function for l3build (b96b522)
David Carlisle
d.p.carlisle at gmail.com
Fri May 15 23:51:03 CEST 2020
Repository : https://github.com/latex3/hyperref
On branch : master
Link : https://github.com/latex3/hyperref/commit/b96b522bb22f4f540113e0028abb922945dbb81f
>---------------------------------------------------------------
commit b96b522bb22f4f540113e0028abb922945dbb81f
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Fri May 15 22:51:03 2020 +0100
add tagging function for l3build
>---------------------------------------------------------------
b96b522bb22f4f540113e0028abb922945dbb81f
build.lua | 34 ++++++++++++++++++++++++++++++++++
doc/manual.tex | 6 +++---
hyperref.dtx | 2 +-
3 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/build.lua b/build.lua
index 04d806f..61d548c 100644
--- a/build.lua
+++ b/build.lua
@@ -109,3 +109,37 @@ cleanfiles = { "doc/*.html", "doc/*.css"}
flatten = false
packtdszip = true
+
+
+-- l3build tag auto increases final letter
+-- l3build tag AUTO increases .two-digit number and sets final letter to 'a'
+
+tagfiles={"*.dtx","doc/*.tex"}
+function update_tag(file,content,tagname,tagdate)
+
+local tagpattern="(%d%d%d%d[-/]%d%d[-/]%d%d) v(%d+[.])(%d+)(%l)"
+local oldv,newv
+if tagname == 'auto' or tagname == 'AUTO' then
+ local i,j,olddate,a,b,c
+ i,j,olddate,a,b,c= string.find(content, tagpattern)
+ if i == nil then
+ print('OLD TAG NOT FOUND')
+ return content
+ else
+ print ('FOUND: ' .. olddate .. ' v' .. a .. b .. c)
+ oldv = olddate .. ' v' .. a .. b .. c
+ if tagname == 'AUTO' then
+ newv = tagdate .. ' v' .. a .. string.format("%02d",math.floor(b + 1)) .. 'a'
+ else
+ newv = tagdate .. ' v' .. a .. b .. string.char(string.byte(c)+1)
+ end
+ print('USING OLD TAG: ' .. oldv)
+ print('USING NEW TAG: ' .. newv)
+ local oldpattern = string.gsub(oldv,"[-/]", "[-/]")
+ content=string.gsub(content,oldpattern,newv)
+ return content
+ end
+else
+ error("only automatic tagging supported")
+end
+end
diff --git a/doc/manual.tex b/doc/manual.tex
index 7e6da78..ded7aeb 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -177,7 +177,7 @@
}
\makeatother
\title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}}
-\date{\mydate}
+\date{2020-05-15 v7.00e}
\begin{document}
@@ -1678,7 +1678,7 @@ sequence error would arise.
\subsection{Customizing index style file with \textbackslash nohyperpage}
- Since version 2008/08/14 v6.78f.
+ Since version 2008/08/14~v6.78f.
@@ -2051,7 +2051,7 @@ sequence error would arise.
require the protection of some characters, e.g. unmatched
left or right parentheses need escaping or the escape
character itself (backslash).
- Since 2006/02/12 v6.75a the PS/PDF driver should do
+ Since 2006/02/12~v6.75a the PS/PDF driver should do
this automatically. However I assume a problem with
compatibility, especially regarding the form part where
larger amounts of JavaScript code can be present.
diff --git a/hyperref.dtx b/hyperref.dtx
index 28fc81b..aa618b1 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -50,7 +50,7 @@
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
%<psdextra>\ProvidesFile{psdextra.def}
-%<!none> [2020/01/14 v7.00d %
+%<!none> [2020-05-15 v7.00e %
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
More information about the latex3-commits
mailing list.