texlive[61734] Master/texmf-dist/doc/texlive/texlive-en: alt text for

commits+karl at tug.org commits+karl at tug.org
Tue Jan 25 18:27:54 CET 2022


Revision: 61734
          http://tug.org/svn/texlive?view=revision&revision=61734
Author:   karl
Date:     2022-01-25 18:27:53 +0100 (Tue, 25 Jan 2022)
Log Message:
-----------
alt text for all images, for minimal VPAT compliance

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/texlive/texlive-en/Makefile
    trunk/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg
    trunk/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty
    trunk/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog

Added: trunk/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog	2022-01-25 17:27:53 UTC (rev 61734)
@@ -0,0 +1,14 @@
+2022-01-25  Karl Berry  <karl at freefriends.org>
+
+	* tex-live.sty (\tlpng): require new third argument for alt text.
+	* texlive-en.tex: change all \tlpng calls.
+	* live4ht.cfg (graphics*): remove \Configure, redundant with
+	\tlpng macro now.
+
+	* Makefile (env): texlive-en before texlive-common,
+	for sake of example.
+	(run_htlatex, htopts1, htopts2): new variables to separate out the
+	htlatex invocation.
+	(html1 h): new targets to just run htlatex once.
+
+(Public domain.)

Modified: trunk/Master/texmf-dist/doc/texlive/texlive-en/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/texlive/texlive-en/Makefile	2022-01-25 00:48:46 UTC (rev 61733)
+++ trunk/Master/texmf-dist/doc/texlive/texlive-en/Makefile	2022-01-25 17:27:53 UTC (rev 61734)
@@ -5,7 +5,7 @@
 all: pdf html
 
 tlpre = # possible prefix to run from the pretest
-env = TEXINPUTS=.:../texlive-common:../texlive-en:; export TEXINPUTS; $(tlpre)
+env = TEXINPUTS=.:../texlive-en:../texlive-common:; export TEXINPUTS; $(tlpre)
 
 pdflatex_opts =  --file-line-error
 pdflatex = pdflatex $(pdflatex_opts) '\nonstopmode\def\Status{1}\input $(doc)'
@@ -30,8 +30,9 @@
 	$(env) $(texfot_pdf) $(pdflatex)
 	$(env) $(texfot_pdf) $(pdflatex)
 
-# It is better to use htlatex than the individual runs since then we can
-# easily specify these options; \Preamble in live4ht.cfg is not equivalent.
+# It is best to use the htlatex wrapper since then we can easily specify
+# these options; using \Preamble in live4ht.cfg is not equivalent.
+# 
 # The options here:
 # live4ht - reads our live4ht.cfg.
 # info - extra debugging info.
@@ -40,13 +41,16 @@
 # charset - UTF-8 is more likely to work well than Latin 1.
 # fn-in - keep footnotes in the main output file.
 # 
-# The other option, -cunihtf -utf8, goes along with the charset and
-# tells tex4ht to look for Unicode font encodings. See https://tug.org/tex4ht.
-html h:
+# The other argument, where we pass, -cunihtf -utf8, goes along with the
+# charset and tells tex4ht to look for Unicode font encodings. See
+# https://tug.org/tex4ht.
+# 
+htopts1 = "live4ht,info,xhtml,html5,charset=utf-8,fn-in"
+htopts2 = " -cunihtf -utf8"
+run_htlatex = $(env) $(texfot_html) htlatex $(doc) $(htopts1) $(htopts2) </dev/null
+html:
 	rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out
-	$(env) $(texfot_html) htlatex $(doc) \
-          "live4ht,info,xhtml,html5,charset=utf-8,fn-in" \
-	  " -cunihtf -utf8" </dev/null
+	$(run_htlatex)
 	ls -l texlive-??.html texlive-??.css
 
 # This is the old way, no longer used.
@@ -65,6 +69,10 @@
 pdf1 p:
 	$(env) $(texfot_pdf) $(pdflatex)
 
+# ditto for html.
+html1 h:
+	$(run_htlatex)
+
 clean:
 	rm -f *.aux *.log *.blg *.toc *.out *.lot tex4ht.ps *.4*
 	rm -f *.xref* *.lg *.idv *.out *.otc *.tmp tmp.*

Modified: trunk/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg
===================================================================
--- trunk/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg	2022-01-25 00:48:46 UTC (rev 61733)
+++ trunk/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg	2022-01-25 17:27:53 UTC (rev 61734)
@@ -11,12 +11,7 @@
 <link rel="stylesheet" type="text/css" href="\jobname.css" >\Hnewline
 <link rel="stylesheet" type="text/css" href="tex-live.css" >\Hnewline
 }}
-% use png graphics as-is
-\Configure{graphics*}
-         {png}
-         {\Needs{""}%
-          \Picture[pict]{../texlive-common/\csname Gin at base\endcsname.png}%
-         }
+
 % or LaTeX complains it is missing.
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty
===================================================================
--- trunk/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty	2022-01-25 00:48:46 UTC (rev 61733)
+++ trunk/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty	2022-01-25 17:27:53 UTC (rev 61734)
@@ -217,12 +217,13 @@
 \providecommand*{\web}{\texttt{WEB}\xspace}
 
 % Include a png image.
-% #1 - name of image file in ../texlive-common/, always .png
+% #1 - basename of image file in ../texlive-common/, always .png
 % #2 - width for TeX
-%
-\def\tlpng#1#2{%
-  \ifnum \Status=2 % html, want relative path in output
-    \includegraphics{../texlive-common/#1.png}%
+% #3 - alt text for image; used only in html
+\def\tlpng#1#2#3{%
+  \ifnum \Status=2 % html, have to have explicit relative path in output
+    \includegraphics[alt={#3}]{../texlive-common/#1.png}%
+    %
     % We intentionally are not specifying the size, so that the natural
     % size of the graphic is used in the HTML output. Thus we do not
     % get a graphics.sty warning about "cannot determine size of graphic
@@ -294,7 +295,7 @@
 \else
   \providecommand{\Status}{2}% running TeX4ht
 \fi
-%\typeout{Status is \Status}
+#\typeout{Status is \Status}
 %
 \newif\ifSingleColumn
 %

Modified: trunk/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex	2022-01-25 00:48:46 UTC (rev 61733)
+++ trunk/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex	2022-01-25 17:27:53 UTC (rev 61734)
@@ -491,8 +491,9 @@
 \end{description}
 
 \begin{figure}[tb]
-\tlpng{nsis_installer}{.6\linewidth}
-\caption{First stage of Windows \code{.exe} installer}\label{fig:nsis}
+\def\figdesc{First stage of Windows \code{.exe} installer}
+\tlpng{nsis_installer}{.6\linewidth}{\figdesc}
+\caption{\figdesc}\label{fig:nsis}
 \end{figure}
 
 The same installer program is run, whatever the source.  The most
@@ -635,13 +636,13 @@
 \end{figure}
 
 \begin{figure}[tb]
-\tlpng{basic-w32}{.6\linewidth}
+\tlpng{basic-w32}{.6\linewidth}{Basic installer screen (Windows)}
 \caption{Basic installer screen (Windows); the Advanced button will
   result in something like figure~\ref{fig:advanced-lnx}}\label{fig:basic-w32}
 \end{figure}
 
 \begin{figure}[tb]
-\tlpng{advanced-lnx}{\linewidth}
+\tlpng{advanced-lnx}{\linewidth}{Advanced installer screen (\GNU/Linux)}
 \caption{Advanced \GUI{} installer screen
   (\GNU/Linux)}\label{fig:advanced-lnx}
 \end{figure}
@@ -765,8 +766,9 @@
 specialized and country-specific schemes.
 
 \begin{figure}[tb]
-\centering \tlpng{stdcoll}{.7\linewidth}
-\caption{Collections menu}\label{fig:collections-gui}
+\def\figdesc{Collections menu}
+\centering \tlpng{stdcoll}{.7\linewidth}{\figdesc}
+\caption{\figdesc}\label{fig:collections-gui}
 \end{figure}
 
 You can refine your scheme selection with the `collections' menu
@@ -1515,7 +1517,7 @@
 choice of a few common tasks, as shown in this screenshot:
 
 \medskip
-\tlpng{tray-menu}{4cm}
+\tlpng{tray-menu}{4cm}{Windows tray menu}
 \smallskip
 
 \noindent The `More\ldots' entry explains how you can customize this menu.
@@ -1582,20 +1584,23 @@
 \label{sec:tlmgr}
 
 \begin{figure}[tb]
-\tlpng{tlshell-macos}{\linewidth}
-\caption{\prog{tlshell} \GUI, showing the Actions menu (\MacOSX)}
+\def\figdesc{\prog{tlshell} \GUI, showing the Actions menu (\MacOSX)}
+\tlpng{tlshell-macos}{\linewidth}{\figdesc}
+\caption{\figdesc}
 \label{fig:tlshell}
 \end{figure}
 
 \begin{figure}[tb]
-\tlpng{tlcockpit-packages}{.8\linewidth}
-\caption{\prog{tlcockpit} \GUI{} for \prog{tlmgr}}
+\def\figdesc{\prog{tlcockpit} \GUI{} for \prog{tlmgr}}
+\tlpng{tlcockpit-packages}{.8\linewidth}{\figdesc}
+\caption{\figdesc}
 \label{fig:tlcockpit}
 \end{figure}
 
 \begin{figure}[tb]
-\tlpng{tlmgr-gui}{\linewidth}
-\caption{Legacy \prog{tlmgr} \GUI\ mode: main window, after `Load'}
+\def\figdesc{Legacy \prog{tlmgr} \GUI\ mode: main window, after `Load'}
+\tlpng{tlmgr-gui}{\linewidth}{\figdesc}
+\caption{\figdesc}
 \label{fig:tlmgr-gui}
 \end{figure}
 



More information about the tex-live-commits mailing list.