[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: added fix for github/0154 (7ab1652c)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Jul 11 13:39:39 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/7ab1652c83035ff5a88c188a563c96ddd14d053a

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

commit 7ab1652c83035ff5a88c188a563c96ddd14d053a
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Jul 11 13:39:39 2019 +0200

    added fix for github/0154


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

7ab1652c83035ff5a88c188a563c96ddd14d053a
 base/changes.txt                      |   5 +
 base/testfiles-legacy/github-0154.lvt |  27 +++++
 base/testfiles-legacy/github-0154.tlg | 206 ++++++++++++++++++++++++++++++++++
 base/utf8ienc.dtx                     |  22 +++-
 doc/ltnews30.tex                      |  15 ++-
 5 files changed, 272 insertions(+), 3 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index e002cdd0..11ad40cf 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2019-07-11  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* utf8ienc.dtx (subsection{The mapping table}):
+	Accept typical f-ligatures and st in utf8 encoding (github/154)
+
 2019-07-09  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* utf8ienc.dtx (subsection{Housekeeping}):
diff --git a/base/testfiles-legacy/github-0154.lvt b/base/testfiles-legacy/github-0154.lvt
new file mode 100644
index 00000000..7506c894
--- /dev/null
+++ b/base/testfiles-legacy/github-0154.lvt
@@ -0,0 +1,27 @@
+% allow for f-ligatures with 8-bit engines
+
+\documentclass{article}
+
+
+\input{test2e}
+
+\usepackage[T1,T2A,T2B,T2C,OT1]{fontenc}
+
+\newcommand\test[1]{\fontencoding{#1}\selectfont #1:  ff, fi,  fl, ffi, ffl, ſt and  st. \par}
+
+\showoutput
+
+\begin{document}
+
+
+\START
+
+\test{T1}
+\test{T2A}
+\test{T2B}
+\test{T2C}
+\test{OT1}
+% \test{LY1}     % we can't test LY1 as it is not part of the kernel
+
+
+\end{document}
diff --git a/base/testfiles-legacy/github-0154.tlg b/base/testfiles-legacy/github-0154.tlg
new file mode 100644
index 00000000..2c4291c5
--- /dev/null
+++ b/base/testfiles-legacy/github-0154.tlg
@@ -0,0 +1,206 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+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
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 491.94745fil
+...\write-{}
+...\glue(\topskip) 3.1128
+...\hbox(6.8872+1.94397)x345.0, glue set 206.08582fil
+....\hbox(0.0+0.0)x15.0
+....\T1/cmr/m/n/10 T
+....\T1/cmr/m/n/10 1
+....\T1/cmr/m/n/10 :
+....\glue 4.44336 plus 3.33252 minus 0.55542
+....\T1/cmr/m/n/10 ^^[ (ligature ff)
+....\T1/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T1/cmr/m/n/10 ^^\ (ligature fi)
+....\T1/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T1/cmr/m/n/10 ^^] (ligature fl)
+....\T1/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T1/cmr/m/n/10 ^^^ (ligature ffi)
+....\T1/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T1/cmr/m/n/10 ^^_ (ligature ffl)
+....\T1/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T1/cmr/m/n/10 f
+....\T1/cmr/m/n/10 t
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T1/cmr/m/n/10 a
+....\T1/cmr/m/n/10 n
+....\T1/cmr/m/n/10 d
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T1/cmr/m/n/10 s
+....\T1/cmr/m/n/10 t
+....\T1/cmr/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) 3.11328
+...\hbox(6.94275+1.94397)x345.0, glue set 199.69849fil
+....\hbox(0.0+0.0)x15.0
+....\T2A/cmr/m/n/10 T
+....\T2A/cmr/m/n/10 2
+....\T2A/cmr/m/n/10 A
+....\T2A/cmr/m/n/10 :
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2A/cmr/m/n/10 ^^[ (ligature ff)
+....\T2A/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2A/cmr/m/n/10 ^^\ (ligature fi)
+....\T2A/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2A/cmr/m/n/10 ^^] (ligature fl)
+....\T2A/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2A/cmr/m/n/10 ^^^ (ligature ffi)
+....\T2A/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2A/cmr/m/n/10 ^^_ (ligature ffl)
+....\T2A/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2A/cmr/m/n/10 f
+....\T2A/cmr/m/n/10 t
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2A/cmr/m/n/10 a
+....\T2A/cmr/m/n/10 n
+....\T2A/cmr/m/n/10 d
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2A/cmr/m/n/10 s
+....\T2A/cmr/m/n/10 t
+....\T2A/cmr/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) 3.11328
+...\hbox(6.94275+1.94397)x345.0, glue set 200.11505fil
+....\hbox(0.0+0.0)x15.0
+....\T2B/cmr/m/n/10 T
+....\T2B/cmr/m/n/10 2
+....\T2B/cmr/m/n/10 B
+....\T2B/cmr/m/n/10 :
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2B/cmr/m/n/10 ^^[ (ligature ff)
+....\T2B/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2B/cmr/m/n/10 ^^\ (ligature fi)
+....\T2B/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2B/cmr/m/n/10 ^^] (ligature fl)
+....\T2B/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2B/cmr/m/n/10 ^^^ (ligature ffi)
+....\T2B/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2B/cmr/m/n/10 ^^_ (ligature ffl)
+....\T2B/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2B/cmr/m/n/10 f
+....\T2B/cmr/m/n/10 t
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2B/cmr/m/n/10 a
+....\T2B/cmr/m/n/10 n
+....\T2B/cmr/m/n/10 d
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2B/cmr/m/n/10 s
+....\T2B/cmr/m/n/10 t
+....\T2B/cmr/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) 3.11328
+...\hbox(6.94275+1.94397)x345.0, glue set 199.9762fil
+....\hbox(0.0+0.0)x15.0
+....\T2C/cmr/m/n/10 T
+....\T2C/cmr/m/n/10 2
+....\T2C/cmr/m/n/10 C
+....\T2C/cmr/m/n/10 :
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2C/cmr/m/n/10 ^^[ (ligature ff)
+....\T2C/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2C/cmr/m/n/10 ^^\ (ligature fi)
+....\T2C/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2C/cmr/m/n/10 ^^] (ligature fl)
+....\T2C/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2C/cmr/m/n/10 ^^^ (ligature ffi)
+....\T2C/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2C/cmr/m/n/10 ^^_ (ligature ffl)
+....\T2C/cmr/m/n/10 ,
+....\glue 3.33252 plus 2.08282 minus 0.88867
+....\T2C/cmr/m/n/10 f
+....\T2C/cmr/m/n/10 t
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2C/cmr/m/n/10 a
+....\T2C/cmr/m/n/10 n
+....\T2C/cmr/m/n/10 d
+....\glue 3.33252 plus 1.66626 minus 1.11084
+....\T2C/cmr/m/n/10 s
+....\T2C/cmr/m/n/10 t
+....\T2C/cmr/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) 3.11159
+...\hbox(6.94444+1.94444)x345.0, glue set 198.27751fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 O
+....\OT1/cmr/m/n/10 T
+....\OT1/cmr/m/n/10 1
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 ^^K (ligature ff)
+....\OT1/cmr/m/n/10 ,
+....\glue 3.33333 plus 2.08331 minus 0.88889
+....\OT1/cmr/m/n/10 ^^L (ligature fi)
+....\OT1/cmr/m/n/10 ,
+....\glue 3.33333 plus 2.08331 minus 0.88889
+....\OT1/cmr/m/n/10 ^^M (ligature fl)
+....\OT1/cmr/m/n/10 ,
+....\glue 3.33333 plus 2.08331 minus 0.88889
+....\OT1/cmr/m/n/10 ^^N (ligature ffi)
+....\OT1/cmr/m/n/10 ,
+....\glue 3.33333 plus 2.08331 minus 0.88889
+....\OT1/cmr/m/n/10 ^^O (ligature ffl)
+....\OT1/cmr/m/n/10 ,
+....\glue 3.33333 plus 2.08331 minus 0.88889
+....\OT1/cmr/m/n/10 f
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 d
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 .
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -1.94444
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 1
+...\glue 0.0 plus 1.0fil
+(github-0154.aux)
diff --git a/base/utf8ienc.dtx b/base/utf8ienc.dtx
index 1ef560c3..d6c8f82f 100644
--- a/base/utf8ienc.dtx
+++ b/base/utf8ienc.dtx
@@ -216,7 +216,7 @@
 %<+ts1> \ProvidesFile{ts1enc.dfu}
 %<+x2>  \ProvidesFile{x2enc.dfu}
 %<+all> \ProvidesFile{utf8enc.dfu}
-%<-utf8-2018>   [2019/07/09 v1.2i UTF-8 support for inputenc]
+%<-utf8-2018>   [2019/07/11 v1.2j UTF-8 support for inputenc]
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -1782,11 +1782,31 @@
 %<all,t1>\DeclareUnicodeCharacter{1E20}{\@tabacckludge=G}
 %<all,t1>\DeclareUnicodeCharacter{1E21}{\@tabacckludge=g}
 %    \end{macrocode}
+%
+%    When doing cut-and-paste from other documents f-ligatures might show
+%    up as Unicode characters. We translate them back to individual
+%    characters so that they get accepted. If supported by the font
+%    (which is normally the case) they are then reconstructed as
+%    ligatures so they come out as desired. Otherwise they will come
+%    out as individual characters which is fine too.
+% \changes{v1.2j}{2019/07/11}{Add typical f-ligatures and st (github/154)}
+%    \begin{macrocode}
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB00}{ff}   % ff
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB01}{fi}   % fi
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB02}{fl}   % fl
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB03}{ffi}  % ffi
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB04}{ffl}  % ffl
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB05}{ft}   % ſt
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB06}{st}   % st
+%    \end{macrocode}
+%
+%
 % \changes{v1.2c}{2018/04/05}{Add BOM}
 %    \begin{macrocode}
 %<all,ts1,utf8>\DeclareUnicodeCharacter{FEFF}{\ifhmode\nobreak\fi}
 %    \end{macrocode}
 %    
+% 
 % \endgroup
 % \subsection{Notes}
 %
diff --git a/doc/ltnews30.tex b/doc/ltnews30.tex
index 083533a7..7b4b282c 100644
--- a/doc/ltnews30.tex
+++ b/doc/ltnews30.tex
@@ -191,12 +191,23 @@ This change was also applied in the \pkg{array} package.
 
 \githubissue{122}
 
-the Unicode slots \texttt{27E8} and \texttt{27E9} have been mapped to
+The Unicode slots \texttt{27E8} and \texttt{27E9} have been mapped to
 \cs{textlangle} and \cs{textrangle} which is the recommended mapping.
 
 \githubissue{110}
 
-\subsection{Improve \cs{InputIfFileExists}'s handling of fie names}
+When doing cut-and-paste from other documents f-ligatures might show
+up as Unicode characters. In the past those got rejected.  We now
+translate them back to individual characters so that they get
+accepted. If supported by the font (which is normally the case) they
+are then reconstructed as ligatures and thus come out as
+desired. Otherwise they will come out as individual characters which
+is fine too.
+
+\githubissue{154}
+
+
+\subsection{Improve \cs{InputIfFileExists}'s handling of file names}
 
 In rare circumstances it was possible that \cs{InputIfFileExists}
 would work incorrectly, e.g., a construction such as





More information about the latex3-commits mailing list