diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-25 17:27:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-25 17:27:53 +0000 |
commit | f963592a5cad6f4daad7603c236b0d7d4a526b12 (patch) | |
tree | f1a71c17da0f250c0c9805f75d0848c7798137c7 /Master | |
parent | dea8eec39c3c1a73f8efb059cd30c6f319e0947c (diff) |
alt text for all images, for minimal VPAT compliance
git-svn-id: svn://tug.org/texlive/trunk@61734 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
5 files changed, 57 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog b/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog new file mode 100644 index 00000000000..2b6fecedbc2 --- /dev/null +++ b/Master/texmf-dist/doc/texlive/texlive-en/ChangeLog @@ -0,0 +1,14 @@ +2022-01-25 Karl Berry <karl@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.) diff --git a/Master/texmf-dist/doc/texlive/texlive-en/Makefile b/Master/texmf-dist/doc/texlive/texlive-en/Makefile index 1ec27126f48..ae145d67565 100644 --- a/Master/texmf-dist/doc/texlive/texlive-en/Makefile +++ b/Master/texmf-dist/doc/texlive/texlive-en/Makefile @@ -5,7 +5,7 @@ doc = texlive-en 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 @@ pdf: $(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 @@ pdf: # 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 @@ html-separate: 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.* diff --git a/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg b/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg index 4a815697c71..39c3c092d29 100644 --- a/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg +++ b/Master/texmf-dist/doc/texlive/texlive-en/live4ht.cfg @@ -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@base\endcsname.png}% - } + % or LaTeX complains it is missing. \begin{document} diff --git a/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty b/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty index cd4da00ee60..a832ec21e8c 100644 --- a/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty +++ b/Master/texmf-dist/doc/texlive/texlive-en/tex-live.sty @@ -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 % diff --git a/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex b/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex index 749e55fe3f6..97ac690aae4 100644 --- a/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex +++ b/Master/texmf-dist/doc/texlive/texlive-en/texlive-en.tex @@ -491,8 +491,9 @@ Internet, please see section~\ref{sec:dvd-install-net-updates}. \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 @@ Actions: \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 @@ just plain and \LaTeX, \optname{small} for a few more programs 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 @@ of the installation and create a temporary `tray menu' offering a 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 @@ choice of a few common tasks, as shown in this screenshot: \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} |