[latex3-commits] [git/LaTeX3-latex3-latex2e] gh502: fix for #502 poor man's \texttasteriskcentered (306616d3)
Frank Mittelbach
frank.mittelbach at latex-project.org
Wed Feb 17 12:21:01 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : gh502
Link : https://github.com/latex3/latex2e/commit/306616d38cc93c31dedb38b88ffa08aeba8f8661
>---------------------------------------------------------------
commit 306616d38cc93c31dedb38b88ffa08aeba8f8661
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Wed Feb 17 12:21:01 2021 +0100
fix for #502 poor man's \texttasteriskcentered
>---------------------------------------------------------------
306616d38cc93c31dedb38b88ffa08aeba8f8661
base/changes.txt | 8 ++
base/doc/ltnews33.tex | 20 +++++
base/ltoutenc.dtx | 37 +++++++--
base/testfiles-search/README.md | 6 ++
base/testfiles-search/github-0502.lvt | 25 +++++++
base/testfiles-search/github-0502.tlg | 136 ++++++++++++++++++++++++++++++++++
6 files changed, 226 insertions(+), 6 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 67f9c839..9e5cfe62 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,14 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-02-17 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltoutenc.dtx (subsection{Definitions for the TS1 encoding}):
+ Special definition for \textasteriskcentered when missing in TS1 (gh/502)
+
+ * ltoutenc.dtx (subsection{Definitions for the TU encoding}):
+ Adjust values for \textasteriskcentered To match TS1 definition (gh/502)
+
2021-02-15 David Carlisle <David.Carlisle at latex-project.org>
* ltfssdcl.dtx: two additional \expandafter to avoid infinite
diff --git a/base/doc/ltnews33.tex b/base/doc/ltnews33.tex
index 80456212..3eabaeba 100644
--- a/base/doc/ltnews33.tex
+++ b/base/doc/ltnews33.tex
@@ -329,6 +329,26 @@ been changed.
+\subsection{Poor man's \cs{textasteriskcentered} if missing}
+
+The \cs{textasteriskcentered} symbol, used as part of the set of
+footnote symbols in \LaTeX{}, is it is assumed to be implemented by
+every fonts in the \texttt{TS1} encoding (when \pdfTeX{} is used) or
+in the \texttt{TU} encoding for the Unicode engines. Unfortunately,
+that assumption is not correct for all fonts, for example, for the
+\texttt{stix2} fonts don't offer the glyph, with the result that one
+gets missing glyphs when using \cs{thanks} etc.
+
+For that reason the definition for \cs{textasteriskcentered} was
+altered to check if there is a glyph in the right position andd if not
+a normal \enquote{*} is used, slightly enlarged and lowered. That may
+not be perfect in all cases, but certainly better than nothing show
+up.
+%
+\githubissue{502}
+
+
+
\subsection{\ldots}
\emph{to be written}
diff --git a/base/ltoutenc.dtx b/base/ltoutenc.dtx
index 162aa2b7..3b776e33 100644
--- a/base/ltoutenc.dtx
+++ b/base/ltoutenc.dtx
@@ -37,14 +37,14 @@
%<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
%<TU>\ProvidesFile{tuenc.def}
%<package>\ProvidesPackage{fontenc}
-%<OT1|T1|OMS|OML|OT4|TU|package> [2020/08/10 v2.0s
+%<OT1|T1|OMS|OML|OT4|TU|package> [2021/02/17 v2.0t
%<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file]
%<package> Standard LaTeX package]
%
%<*driver>
% \fi
\ProvidesFile{ltoutenc.dtx}
- [2020/12/05 v2.0s LaTeX Kernel (font encodings)]
+ [2021/02/17 v2.0t LaTeX Kernel (font encodings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutenc.dtx}
@@ -2583,8 +2583,31 @@
\DeclareTextSymbol{\textquotesingle}{TS1}{39}
% \end{macrocode}
% "28 = 40
-% \begin{macrocode}
-\DeclareTextSymbol{\textasteriskcentered}{TS1}{42}
+%
+% The symbol \cs{textasteriskcentered} ``\textasteriskcentered'' is
+% supposed to be always available in \texttt{TS1} and that is
+% important as it is used in footnote symbols. However, in a few
+% fonts it is missing even though they are otherwise fairly
+% complete. We therefore use a rather elaborate method and check if
+% the slot has a glyph and if not produce a poor mans's version by
+% using a normal ``*'' slightly enlarged and somewhat lowered.
+% The main application for this symbol is in footnote symbols and
+% there it should produce a comparable size and show a similar placement.
+% \changes{v2.0t}{2021/02/17}{Special definition for
+% \cs{textasteriskcentered} when missing in TS1 (gh/502)}
+% \begin{macrocode}
+%\DeclareTextSymbol{\textasteriskcentered}{TS1}{42} % that's wanted
+\DeclareTextCommand \textasteriskcentered{TS1}{% % and that's needed
+ \iffontchar\font 42 \char42 \else
+ \begingroup\fontencoding{T1}%
+ \fontsize
+ {\the\dimexpr1.3\dimexpr\f at size pt\relax}%
+ {\f at baselineskip}%
+ \selectfont
+ \raisebox{-0.7ex}[\dimexpr\height-0.7ex][0pt]{*}%
+ \endgroup
+ \fi
+}
% \end{macrocode}
% Note that '054 is a comma and '056 is a full stop: these make
% numbers using oldstyle digits easier to input.
@@ -3159,15 +3182,17 @@
% \end{macrocode}
%
% Not all fonts have U+2217 but using U+002A requires some adjustment.
+% \changes{v2.0t}{2021/02/17}{Adjust values for
+% \cs{textasteriskcentered} To match TS1 definition (gh/502)}
% \begin{macrocode}
\DeclareTextCommand{\textasteriskcentered}\UnicodeEncodingName{%
\iffontchar\font"2217 \char"2217 \else
\begingroup
\fontsize
- {\the\dimexpr1.2\dimexpr\f at size pt\relax}%
+ {\the\dimexpr1.3\dimexpr\f at size pt\relax}%
{\f at baselineskip}%
\selectfont
- \raisebox{-0.6ex}[\dimexpr\height-0.6ex][0pt]{*}%
+ \raisebox{-0.7ex}[\dimexpr\height-0.7ex][0pt]{*}%
\endgroup
\fi
}
diff --git a/base/testfiles-search/README.md b/base/testfiles-search/README.md
new file mode 100644
index 00000000..49b3b3d0
--- /dev/null
+++ b/base/testfiles-search/README.md
@@ -0,0 +1,6 @@
+The tests in this directory are *not* automatically run as part of the travis testing!
+
+You need to run them locally with
+```
+l3build check -cconfig-search
+```
diff --git a/base/testfiles-search/github-0502.lvt b/base/testfiles-search/github-0502.lvt
new file mode 100644
index 00000000..3ad7da24
--- /dev/null
+++ b/base/testfiles-search/github-0502.lvt
@@ -0,0 +1,25 @@
+\documentclass{article}
+
+\input{test2e}
+
+
+\usepackage[T1]{fontenc}
+\usepackage{stix2}
+
+
+\showoutput
+
+\begin{document}
+
+\START
+
+
+Where are you?
+
+\noindent
+A * \textsuperscript\textasteriskcentered\textasteriskcentered?\textlegacyasteriskcentered \\
+B \textbf{* \textsuperscript\textasteriskcentered\textasteriskcentered?\textlegacyasteriskcentered}\\
+C \textit{* \textsuperscript\textasteriskcentered\textasteriskcentered?\textlegacyasteriskcentered}
+
+\end{document}
+
diff --git a/base/testfiles-search/github-0502.tlg b/base/testfiles-search/github-0502.tlg
new file mode 100644
index 00000000..4581c3bc
--- /dev/null
+++ b/base/testfiles-search/github-0502.tlg
@@ -0,0 +1,136 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+LaTeX Font Info: Trying to load font information for LS1+stix2scr on input line ....
+LaTeX Font Info: Trying to load font information for LS2+stix2ex on input line ....
+LaTeX Font Info: Trying to load font information for LS1+stix2frak on input line ....
+LaTeX Font Info: Trying to load font information for LS1+stix2bb on input line ....
+LaTeX Font Info: Trying to load font information for LS2+stix2cal on input line ....
+LaTeX Font Info: Trying to load font information for LS1+stix2sf on input line ....
+LaTeX Font Info: Trying to load font information for LS2+stix2tt on input line ....
+LaTeX Font Info: Trying to load font information for TS1+stix2 on input line ....
+LaTeX Font Info: Trying to load font information for OMS+stix2 on input line ....
+LaTeX Font Info: No file OMSstix2.fd. on input line ....
+LaTeX Font Warning: Font shape `OMS/stix2/m/n' undefined
+(Font) using `OMS/cmsy/m/n' instead
+(Font) for symbol `textlegacyasteriskcentered' on input line ...
+LaTeX Font Warning: Font shape `OMS/stix2/b/n' undefined
+(Font) using `OMS/stix2/m/n' instead
+(Font) for symbol `textlegacyasteriskcentered' on input line ...
+LaTeX Font Warning: Font shape `OMS/stix2/m/it' undefined
+(Font) using `OMS/stix2/m/n' instead
+(Font) for symbol `textlegacyasteriskcentered' on input line ...
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+....\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 503.94617fil
+...\write-{}
+...\glue(\topskip) 2.815
+...\hbox(7.185+2.20999)x345.0, glue set 264.24014fil
+....\hbox(0.0+0.0)x15.0
+....\T1/stix2/m/n/10 W
+....\T1/stix2/m/n/10 h
+....\T1/stix2/m/n/10 e
+....\T1/stix2/m/n/10 r
+....\kern-0.1
+....\T1/stix2/m/n/10 e
+....\glue 2.34999 plus 1.16998 minus 0.78
+....\T1/stix2/m/n/10 a
+....\T1/stix2/m/n/10 r
+....\kern-0.1
+....\T1/stix2/m/n/10 e
+....\glue 2.34999 plus 1.16998 minus 0.78
+....\T1/stix2/m/n/10 y
+....\kern-0.05
+....\T1/stix2/m/n/10 o
+....\T1/stix2/m/n/10 u
+....\T1/stix2/m/n/10 ?
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 2.75214
+...\hbox(7.03787+0.075)x345.0, glue set 310.08252fil
+....\T1/stix2/m/n/10 A
+....\glue 2.34999 plus 1.16881 minus 0.78078
+....\T1/stix2/m/n/10 *
+....\glue 2.34999 plus 1.16998 minus 0.78
+....\mathon
+....\hbox(3.43788+0.0)x4.4975, shifted -3.59999
+.....\hbox(3.43788+0.0)x3.9975
+......\hbox(6.65926+0.0)x3.9975, shifted 3.22137
+.......\T1/stix2/m/n/9.75002 *
+....\mathoff
+....\hbox(4.58383+0.0)x5.33
+.....\hbox(8.87901+0.0)x5.33, shifted 4.29518
+......\T1/stix2/m/n/13.00003 *
+....\T1/stix2/m/n/10 ?
+....\OMS/stix2/m/n/10 ^^C
+....\penalty 10000
+....\glue 0.0 plus 1.0fil
+....\penalty -10000
+....\glue(\rightskip) 0.0
+...\penalty 150
+...\glue(\baselineskip) 4.6385
+...\hbox(7.2865+0.09)x345.0, glue set 310.09125fil
+....\T1/stix2/m/n/10 B
+....\kern 0.0
+....\glue 2.34999 plus 1.16881 minus 0.78078
+....\T1/stix2/b/n/10 *
+....\glue 2.34999 plus 1.16998 minus 0.78
+....\mathon
+....\hbox(3.68651+0.0)x4.64375, shifted -3.59999
+.....\hbox(3.68651+0.0)x4.14375
+......\hbox(6.90788+0.0)x4.14375, shifted 3.22137
+.......\T1/stix2/b/n/9.75002 *
+....\mathoff
+....\hbox(4.91533+0.0)x5.52501
+.....\hbox(9.21051+0.0)x5.52501, shifted 4.29518
+......\T1/stix2/b/n/13.00003 *
+....\T1/stix2/b/n/10 ?
+....\OMS/stix2/m/n/10 ^^C
+....\kern 0.0
+....\penalty 10000
+....\glue 0.0 plus 1.0fil
+....\penalty -10000
+....\glue(\rightskip) 0.0
+...\penalty 150
+...\glue(\baselineskip) 4.95988
+...\hbox(6.95012+0.135)x345.0, glue set 311.39478fil
+....\T1/stix2/m/n/10 C
+....\glue 2.34999 plus 1.16881 minus 0.78078
+....\T1/stix2/m/it/10 *
+....\glue 2.25 plus 1.12 minus 0.74998
+....\mathon
+....\hbox(3.35013+0.0)x4.31224, shifted -3.59999
+.....\hbox(3.35013+0.0)x3.81224
+......\hbox(6.5715+0.0)x3.81224, shifted 3.22137
+.......\T1/stix2/m/it/9.75002 *
+....\mathoff
+....\hbox(4.46683+0.0)x5.08301
+.....\hbox(8.76201+0.0)x5.08301, shifted 4.29518
+......\T1/stix2/m/it/13.00003 *
+....\T1/stix2/m/it/10 ?
+....\OMS/stix2/m/n/10 ^^C
+....\kern 0.0
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -0.135
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.475
+..\hbox(6.525+0.0)x345.0
+...\hbox(6.525+0.0)x345.0, glue set 170.02501fil
+....\glue 0.0 plus 1.0fil
+....\T1/stix2/m/n/10 1
+....\glue 0.0 plus 1.0fil
+(github-0502.aux)
+LaTeX Font Warning: Some font shapes were not available, defaults substituted.
More information about the latex3-commits
mailing list.