[latex3-commits] [git/LaTeX3-latex3-latex2e] graphics-alt: alt key for issue #651 (343c918f)

David Carlisle d.p.carlisle at gmail.com
Thu Sep 16 18:07:35 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : graphics-alt
Link       : https://github.com/latex3/latex2e/commit/343c918f78bd194228ef27940faa0cf3e76b6146

>---------------------------------------------------------------

commit 343c918f78bd194228ef27940faa0cf3e76b6146
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Thu Sep 16 17:07:35 2021 +0100

    alt key for issue #651


>---------------------------------------------------------------

343c918f78bd194228ef27940faa0cf3e76b6146
 base/doc/ltnews34.tex                                         |  8 +++++---
 required/graphics/changes.txt                                 |  4 ++++
 required/graphics/graphicx.dtx                                | 11 ++++++++++-
 required/graphics/testfiles/github-0651.lvt                   |  8 ++++++++
 .../graphics/testfiles/github-0651.tlg                        |  0
 5 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 7be637f1..b40cf437 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -612,10 +612,12 @@ so that \# does not generate an error.
 \section{Changes to packages in the \pkg{graphics} category}
 
 
-\subsection{???}
-
+\subsection{Key for alt text}
+A new key \texttt{alt} has been added to \verb|\includegraphics| allowing specification
+of an alternative text for accessibility.
+This is unused by default but may be used by extension packages and possible future use.
 %
-\githubissue{000}
+\githubissue{651}
 
 
 
diff --git a/required/graphics/changes.txt b/required/graphics/changes.txt
index 1bd6b4ff..f094e083 100644
--- a/required/graphics/changes.txt
+++ b/required/graphics/changes.txt
@@ -4,6 +4,10 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2021-09-16  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* graphicx.dtx: Add an alt key to \includegraphiics gh/651
+
 2021-08-13  David Carlisle  <David.Carlisle at latex-project.org>
 
 	* longtable.dtx: ensure \ext at table is defined (gh/g37)
diff --git a/required/graphics/graphicx.dtx b/required/graphics/graphicx.dtx
index a2fc17e3..29e0db5b 100644
--- a/required/graphics/graphicx.dtx
+++ b/required/graphics/graphicx.dtx
@@ -19,7 +19,7 @@
 %<driver> \ProvidesFile{graphicx.drv}
 % \fi
 %         \ProvidesFile{graphicx.dtx}
-          [2020/12/05 v1.2c  Enhanced LaTeX Graphics (DPC,SPQR)]
+          [2021/09/16 v1.2d  Enhanced LaTeX Graphics (DPC,SPQR)]
 %
 % \iffalse
 %<*driver>
@@ -565,6 +565,15 @@
 %    \end{macrocode}
 % \end{key}
 %
+% \begin{key}{Gin}{alt}
+% \changes{v1.2d}{2021/09/16 }{alt key gh/651}
+% By default the |alt| key does nothing but may be used
+% for alternative text for accessibility uses in extensions.
+%    \begin{macrocode}
+\define at key{Gin}{alt}{}
+%    \end{macrocode}
+% \end{key}
+%
 % \begin{macro}{\Gin at boolkey}
 % Helper function for defining boolean valued functions. The order of
 % arguments allows |\lowercase| to only act on the user-supplied
diff --git a/required/graphics/testfiles/github-0651.lvt b/required/graphics/testfiles/github-0651.lvt
new file mode 100644
index 00000000..79a01b75
--- /dev/null
+++ b/required/graphics/testfiles/github-0651.lvt
@@ -0,0 +1,8 @@
+\documentclass{article}
+\input{test2e}
+\usepackage[demo]{graphicx}
+\begin{document}
+\START
+% no error from alt
+\includegraphics[alt=demo run blank rectangle]{thisimage}
+\END
\ No newline at end of file
diff --git a/base/testfiles/github-0060.luatex.tlg b/required/graphics/testfiles/github-0651.tlg
similarity index 100%
copy from base/testfiles/github-0060.luatex.tlg
copy to required/graphics/testfiles/github-0651.tlg





More information about the latex3-commits mailing list.