[latex3-commits] [git/LaTeX3-latex3-latex3] master: Declare 8-bit encodings as a public function (e344999)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jun 2 17:11:41 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/e344999f76ca9974f25899259d63baee5866e4df

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

commit e344999f76ca9974f25899259d63baee5866e4df
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jun 2 16:11:41 2019 +0100

    Declare 8-bit encodings as a public function


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

e344999f76ca9974f25899259d63baee5866e4df
 l3experimental/l3str/l3str-convert.dtx |   58 +++++++++++++++++---------------
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/l3experimental/l3str/l3str-convert.dtx b/l3experimental/l3str/l3str-convert.dtx
index 8a7b937..8b55b48 100644
--- a/l3experimental/l3str/l3str-convert.dtx
+++ b/l3experimental/l3str/l3str-convert.dtx
@@ -191,6 +191,19 @@
 %   encoding. Instead, the \meta{false code} is performed.
 % \end{function}
 %
+% \section{Creating $8$-bit mappings}
+%
+% \begin{function}{\str_declare_eight_bit_encoding:nnn}
+%   \begin{syntax}
+%     \cs{str_declare_eight_bit_encoding:nnn} \Arg{name} \Arg{mapping} \Arg{missing}
+%   \end{syntax}
+%   Declares the encoding \meta{name} to map bytes to Unicode
+%   characters according to the \meta{mapping}, and map those bytes
+%   which are not mentioned in the \meta{mapping} either to the
+%   replacement character (if they appear in \meta{missing}), or to
+%   themselves.
+% \end{function}
+%
 % \section{Possibilities, and things to do}
 %
 % Encoding/escaping-related tasks.
@@ -1087,18 +1100,9 @@
 % All the 8-bit encodings which \pkg{l3str} supports rely on the same
 % internal functions.
 %
-% \begin{macro}{\@@_declare_eight_bit_encoding:nnn}
-%   \begin{syntax}
-%     \cs{@@_declare_eight_bit_encoding:nnn} \Arg{name} \Arg{mapping} \Arg{missing}
-%   \end{syntax}
-%   This declares the encoding \meta{name} to map bytes to Unicode
-%   characters according to the \meta{mapping}, and map those bytes
-%   which are not mentioned in the \meta{mapping} either to the
-%   replacement character (if they appear in \meta{missing}), or to
-%   themselves.
-%
+% \begin{macro}{\str_declare_eight_bit_encoding:nnn}
 %   All the 8-bit encoding definition file start with
-%   \cs{@@_declare_eight_bit_encoding:nnn} \Arg{encoding name}
+%   \cs{str_declare_eight_bit_encoding:nnn} \Arg{encoding name}
 %   \Arg{mapping} \Arg{missing bytes}.  The \meta{mapping} argument is a
 %   token list of pairs \Arg{byte} \Arg{Unicode} expressed in uppercase
 %   hexadecimal notation.  The \meta{missing} argument is a token list
@@ -1106,7 +1110,7 @@
 %   \meta{mapping} nor the \meta{missing} lists maps to the same code
 %   point in Unicode.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_eight_bit_encoding:nnn #1#2#3
+\cs_new_protected:Npn \str_declare_eight_bit_encoding:nnn #1#2#3
   {
     \tl_set:Nn \l_@@_internal_tl {#1}
     \cs_new_protected:cpn { @@_convert_decode_#1: }
@@ -2594,7 +2598,7 @@
 % family, we keep track only of differences, and of unassigned bytes.
 %    \begin{macrocode}
 %<*iso88591>
-\@@_declare_eight_bit_encoding:nnn { iso88591 }
+\str_declare_eight_bit_encoding:nnn { iso88591 }
   {
   }
   {
@@ -2604,7 +2608,7 @@
 %
 %    \begin{macrocode}
 %<*iso88592>
-\@@_declare_eight_bit_encoding:nnn { iso88592 }
+\str_declare_eight_bit_encoding:nnn { iso88592 }
   {
     { A1 } { 0104 }
     { A2 } { 02D8 }
@@ -2671,7 +2675,7 @@
 %
 %    \begin{macrocode}
 %<*iso88593>
-\@@_declare_eight_bit_encoding:nnn { iso88593 }
+\str_declare_eight_bit_encoding:nnn { iso88593 }
   {
     { A1 } { 0126 }
     { A2 } { 02D8 }
@@ -2716,7 +2720,7 @@
 %
 %    \begin{macrocode}
 %<*iso88594>
-\@@_declare_eight_bit_encoding:nnn { iso88594 }
+\str_declare_eight_bit_encoding:nnn { iso88594 }
   {
     { A1 } { 0104 }
     { A2 } { 0138 }
@@ -2776,7 +2780,7 @@
 %
 %    \begin{macrocode}
 %<*iso88595>
-\@@_declare_eight_bit_encoding:nnn { iso88595 }
+\str_declare_eight_bit_encoding:nnn { iso88595 }
   {
     { A1 } { 0401 }
     { A2 } { 0402 }
@@ -2880,7 +2884,7 @@
 %
 %    \begin{macrocode}
 %<*iso88596>
-\@@_declare_eight_bit_encoding:nnn { iso88596 }
+\str_declare_eight_bit_encoding:nnn { iso88596 }
   {
     { AC } { 060C }
     { BB } { 061B }
@@ -2970,7 +2974,7 @@
 %
 %    \begin{macrocode}
 %<*iso88597>
-\@@_declare_eight_bit_encoding:nnn { iso88597 }
+\str_declare_eight_bit_encoding:nnn { iso88597 }
   {
     { A1 } { 2018 }
     { A2 } { 2019 }
@@ -3059,7 +3063,7 @@
 %
 %    \begin{macrocode}
 %<*iso88598>
-\@@_declare_eight_bit_encoding:nnn { iso88598 }
+\str_declare_eight_bit_encoding:nnn { iso88598 }
   {
     { AA } { 00D7 }
     { BA } { 00F7 }
@@ -3136,7 +3140,7 @@
 %
 %    \begin{macrocode}
 %<*iso88599>
-\@@_declare_eight_bit_encoding:nnn { iso88599 }
+\str_declare_eight_bit_encoding:nnn { iso88599 }
   {
     { D0 } { 011E }
     { DD } { 0130 }
@@ -3152,7 +3156,7 @@
 %
 %    \begin{macrocode}
 %<*iso885910>
-\@@_declare_eight_bit_encoding:nnn { iso885910 }
+\str_declare_eight_bit_encoding:nnn { iso885910 }
   {
     { A1 } { 0104 }
     { A2 } { 0112 }
@@ -3208,7 +3212,7 @@
 %
 %    \begin{macrocode}
 %<*iso885911>
-\@@_declare_eight_bit_encoding:nnn { iso885911 }
+\str_declare_eight_bit_encoding:nnn { iso885911 }
   {
     { A1 } { 0E01 }
     { A2 } { 0E02 }
@@ -3309,7 +3313,7 @@
 %
 %    \begin{macrocode}
 %<*iso885913>
-\@@_declare_eight_bit_encoding:nnn { iso885913 }
+\str_declare_eight_bit_encoding:nnn { iso885913 }
   {
     { A1 } { 201D }
     { A5 } { 201E }
@@ -3375,7 +3379,7 @@
 %
 %    \begin{macrocode}
 %<*iso885914>
-\@@_declare_eight_bit_encoding:nnn { iso885914 }
+\str_declare_eight_bit_encoding:nnn { iso885914 }
   {
     { A1 } { 1E02 }
     { A2 } { 1E03 }
@@ -3416,7 +3420,7 @@
 %
 %    \begin{macrocode}
 %<*iso885915>
-\@@_declare_eight_bit_encoding:nnn { iso885915 }
+\str_declare_eight_bit_encoding:nnn { iso885915 }
   {
     { A4 } { 20AC }
     { A6 } { 0160 }
@@ -3434,7 +3438,7 @@
 %
 %    \begin{macrocode}
 %<*iso885916>
-\@@_declare_eight_bit_encoding:nnn { iso885916 }
+\str_declare_eight_bit_encoding:nnn { iso885916 }
   {
     { A1 } { 0104 }
     { A2 } { 0105 }





More information about the latex3-commits mailing list