summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx22
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin651937 -> 651915 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md15
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/README.md2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx118
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdfbin970322 -> 969776 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx14
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdfbin689425 -> 689293 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdfbin602789 -> 602678 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdfbin515894 -> 515655 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdfbin558776 -> 558695 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdfbin520848 -> 520717 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdfbin523027 -> 522909 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdfbin517529 -> 517431 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdfbin573035 -> 572978 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdfbin516601 -> 516496 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdfbin732905 -> 732815 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx134
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdfbin568327 -> 574517 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx9
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdfbin685888 -> 685909 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx339
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdfbin834415 -> 839263 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdfbin531463 -> 531300 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdfbin427965 -> 427710 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx87
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdfbin588499 -> 570601 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdfbin434711 -> 434477 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx6
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdfbin464600 -> 464354 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty2
-rw-r--r--macros/latex/required/babel/base/README.md22
-rw-r--r--macros/latex/required/babel/base/babel-code.pdfbin734099 -> 735414 bytes
-rw-r--r--macros/latex/required/babel/base/babel.dtx598
-rw-r--r--macros/latex/required/babel/base/babel.ins2
-rw-r--r--macros/latex/required/babel/base/babel.pdfbin520473 -> 521222 bytes
-rw-r--r--macros/latex/required/babel/base/bbcompat.dtx2
53 files changed, 801 insertions, 627 deletions
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index 08505964f2..032d3f4b01 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024hu)
+Easily typesetting Chinese theses or books (v2024hw)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 3d591c5d48..47e65db022 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/12/14}{2024hu}
+\ProvidesExplClass{easybook}{2024/12/21}{2024hw}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -39,13 +39,19 @@
mathfont .tl_set:N = \l__eb_mathfont_value_tl,
mathfont .initial:n = times,
configs .clist_gset:N = \g__eb_configs_file_clist,
- paper .code:n = { },
- class.code:n = { },
- floatpage.code:n = { },
- theorem .code:n = { },
- chem .code:n = { },
unknown .code:n = \clist_gput_right:NV \g__eb_doc_options_clist \CurrentOption
}
+\IfFormatAtLeastTF{2024/06/20}{}
+ {
+ \keys_define:nn { easybook }
+ {
+ paper .code:n = { },
+ class .code:n = { },
+ floatpage .code:n = { },
+ theorem .code:n = { },
+ chem .code:n = { }
+ }
+ }
\cs_if_exist:NTF \ProcessKeyOptions
{ \ProcessKeyOptions[easybook] }
@@ -302,7 +308,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/12/14}{2024hu}
+\ProvidesExplPackage{easybase}{2024/12/21}{2024hw}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -3000,7 +3006,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/12/14}{2024hu}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/12/21}{2024hw}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 64e9f4c21e..fd8cf9173e 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 759c7e3b72..c38e7f441f 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024hu,
- date = 2024/12/14,
+ version = v2024hw,
+ date = 2024/12/21,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
index c877156327..02ac42b9da 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
+++ b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
@@ -5,7 +5,22 @@ first release 0.95a, 2021-02-23 will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project uses date-based 'snapshot' version identifiers.
+## [2024-12-20]
+Version: 2024-12-20 v0.96o
+
+### Changed
+ - hyp/link/GoTo/Contents and hyp/link/URI/Contents now fill also the dictionary entry.
+ This allows to replace it fully.
+ - hyp/link/GoTo/Contents socket has been added to \hyper@linkstart too.
+ - content and name of dummy PDF/A-4F attachment.
+ - added testphase=latest key
+
+### Added
+ - l3pdfmeta: standard verification tests for embedded test, A-4 will switch to A-4F is embedded files are detected
+ - l3pdffile: counts embedded files for verification tests.
+
## [2024-10-27]
+Version: 2024-10-27 v0.96n
### Changed
- \pdf_bdc:nn now creates by default inline dictionaries if the engine support this.
diff --git a/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md
index a95a384f80..331b39939f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/README.md
+++ b/macros/latex/contrib/pdfmanagement-testphase/README.md
@@ -1,6 +1,6 @@
# LaTeX PDF management testphase bundle
-Version: 0.96n, 2024-10-27
+Version: 0.96o, 2024-12-20
This package is used during a test phase to load the new PDF management code
of LaTeX.
diff --git a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
index 1716e9f9b8..7dbb99bc1f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
@@ -24,7 +24,7 @@
%% This file has the LPPL maintenance status "maintained".
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{color-ltx}[2024-10-27 v0.96n
+\ProvidesPackage{color-ltx}[2024-12-20 v0.96o
Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2022/01/06 v1.3d) (DPC)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
diff --git a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
index 599680b6c5..c0a4cf94ad 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
@@ -19,7 +19,7 @@
%
% for those people who are interested.
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2024-10-27}{0.96n}
+\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2024-12-20}{0.96o}
{temporary patches for the colorspace package to test pdfresource management ... UF}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
index efcbc6e934..9284eb32f6 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
@@ -82,7 +82,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -456,7 +456,7 @@
% \end{hypkey}
%
% \subsection{Public interfaces}
-%
+%
% \begin{variable}
% {\l_hyp_annot_colorlink_bool,
% \l_hyp_annot_colorurl_bool,
@@ -486,7 +486,7 @@
% \end{variable}
% \subsection{Changed behaviour}
% \begin{description}
-% \item[colorlinks] |colorlinks| or |colorlinks=true| will as before disable the |pdfborder|
+% \item[colorlinks] |colorlinks| or |colorlinks=true| will as before disable the |pdfborder|
% (|colorlinks=false| will leave the |pdfborder| untouched), but it is possible
% to use the key in the document at any time, or to reenable the border if wanted.
% Internally |colorlinks| \& friends will no longer define/undefine
@@ -617,14 +617,14 @@
% implicit grouping of the content.
%
% \DescribeHypkey{nested-links}%
-%
+%
% Links are sometimes nested. E.g. if a section heading contains a reference
-% it can lead to nested links in the table of contents or if |\nameref| is used.
-% That is not forbidden and normally work as expected: If the link area overlap
-% normally the inner link is \enquote{on top} and chosen at a click.
+% it can lead to nested links in the table of contents or if |\nameref| is used.
+% That is not forbidden and normally work as expected: If the link area overlap
+% normally the inner link is \enquote{on top} and chosen at a click.
% But it is not always actually wanted, so with the |nested-links| (a boolean key)
-% it is possible to disable such nested links.
-%
+% it is possible to disable such nested links.
+%
% \section{Draftmode}
% pdftex and other engines knows a
% draftmode which can be set with |\pdfdraftmode=1|
@@ -965,7 +965,7 @@
%<@@=hyp>
% \end{macrocode}
% \begin{macrocode}
-\ProvidesFile{hgeneric-testphase.def}[2024-10-27 v0.96n %
+\ProvidesFile{hgeneric-testphase.def}[2024-12-20 v0.96o %
generic Hyperref driver for the LaTeX PDF management testphase bundle]
\RequirePackage{etoolbox} %why?
@@ -1529,13 +1529,13 @@
{
\tl_if_blank:nTF {#1}
{ \cs_set_eq:NN\BKM@color\@empty }
- {
+ {
\__hyp_color_set:ne {__hyp/tmpa}{#1}
\color_export:nVN
{__hyp/tmpa}
\g__hyp_bordercolormodel_str
\BKM@color
- }
+ }
}
}
\legacy_if:nTF { Hy@bookmarks }
@@ -1543,7 +1543,7 @@
\AddToHook{begindocument/before}[hyperref/bookmark]
{
\RequirePackage{bookmark}
- }
+ }
}
% \end{macrocode}
% empty hook chunk to ensure that the chunk exists.
@@ -1559,7 +1559,7 @@
%
% \section{Reference and label commands}
% This uses the in-built property module.
-%
+%
% \begin{macro}
% {
% \@@_property_record:nn,
@@ -1579,7 +1579,7 @@
% we generate a few variants. We use ee-variants as they already exist
% in the module and once this is there it can go here.
% \begin{macrocode}
-\cs_generate_variant:Nn \@@_property_record:nn {ee}
+\cs_generate_variant:Nn \@@_property_record:nn {ee}
% \end{macrocode}
% \end{macro}
% \section{Variables}
@@ -1708,12 +1708,14 @@
\tl_set:Nn \l_@@_text_enc_para_print_tl {utf8/string}
% \end{macrocode}
% \end{variable}
-%
-% It is also unclear how the /Contents entry would look at best.
+%
+% It is also unclear how the /Contents entry would look at best.
% So we use sockets. The first argument is the target (url or destination),
% For GoTo we also pass the text as argument.
-% The sockets should define \cs{l_@@_link_Contents_tl}
-% % \begin{macrocode}
+% The sockets should put something into the relevant annotation dictionaries.
+% \changes{v0.96o}{2024-10-27}{moved dictionary command into socket so that
+% it can be fully replaced.}
+% \begin{macrocode}
\tl_new:N\l_@@_link_Contents_tl
\socket_new:nn {hyp/link/GoTo/Contents}{2}
\socket_new:nn {hyp/link/URI/Contents}{1}
@@ -1722,14 +1724,18 @@
\@@_text_pdfstring:eoN
{ Go~to~destination~#1 }
{ \l_@@_text_enc_info_print_tl }
- \l_@@_link_Contents_tl
+ \l_@@_link_Contents_tl
+ \pdfannot_dict_put:nne {link/GoTo}{Contents}
+ {\l_@@_link_Contents_tl}
}
\socket_new_plug:nnn {hyp/link/URI/Contents}{default}
{
\@@_text_pdfstring:eoN
{ #1 }
{ \l_@@_text_enc_info_print_tl }
- \l_@@_link_Contents_tl
+ \l_@@_link_Contents_tl
+ \pdfannot_dict_put:nne {link/URI}{Contents}
+ {\l_@@_link_Contents_tl}
}
\socket_assign_plug:nn{hyp/link/GoTo/Contents}{default}
\socket_assign_plug:nn{hyp/link/URI/Contents}{default}
@@ -1951,7 +1957,7 @@
{
\@@_text_pdfstring:noN { #1 }{ \l_@@_text_enc_info_print_tl } #2
}
-\cs_generate_variant:Nn \@@_text_pdfstring_info:nN {eN,oN}
+\cs_generate_variant:Nn \@@_text_pdfstring_info:nN {eN,oN}
% \end{macrocode}
% \end{macro}
%
@@ -2035,19 +2041,19 @@
%
% This driver defines for consistency also
% |\hyper@linklaunch| for Launch and |\hyper@linknamed| for Named.
-%
+%
% \subsection{Link level}
% Links can be nested. Inner links need perhaps special handling, e.g.
-% to deactivate the link, or to change the border, or in the case of
+% to deactivate the link, or to change the border, or in the case of
% tagging to add some additional structure to handle the parent-child rules.
-% We therefore add a global counter which is increased at the begin of
-% link and decreased at the end.
+% We therefore add a global counter which is increased at the begin of
+% link and decreased at the end.
% \begin{macro}{g_@@_linknestlevel_int}
% \begin{macrocode}
\int_new:N \g_@@_linknestlevel_int
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_if_outer_link: {TF}
{
@@ -2066,12 +2072,12 @@
%
% \begin{macrocode}
\keys_define:nn { hyp }
- {
+ {
nested-links .choice:,
- nested-links / true .code:n =
+ nested-links / true .code:n =
{ \cs_set_eq:NN \@@_check_link_nesting:TF \use_i:nn },
- nested-links / false .code:n =
- { \cs_set_eq:NN \@@_check_link_nesting:TF \@@_if_outer_link:TF },
+ nested-links / false .code:n =
+ { \cs_set_eq:NN \@@_check_link_nesting:TF \@@_if_outer_link:TF },
nested-links .default:n = {true}
}
% \end{macrocode}
@@ -2251,17 +2257,15 @@
\group_begin:
\tl_set:Nn \l_hyp_current_dest_name_tl {#2}
% \end{macrocode}
-% this socket defines \cs{l_@@_link_Contents_tl}
+% this socket adds something to the /Contents key.
% \begin{macrocode}
\socket_use:nnn{hyp/link/GoTo/Contents}{#2}{#3}
- \pdfannot_dict_put:nne {link/GoTo}{Contents}
- {\l_@@_link_Contents_tl}
\hook_use:n {hyp/link/#1}
\@@_link_goto_begin:nw {#2}#3\Hy@xspace@end
\@@_link_goto_end:
\group_end:
\Hy@VerboseLinkStop
- }
+ }
{
\group_begin: #3\group_end:
}
@@ -2279,12 +2283,13 @@
\Hy@VerboseLinkStart{#1}{#2}% only for debug
\group_begin:
\tl_set:Nn \l_hyp_current_dest_name_tl {#2}
+ \socket_use:nnn{hyp/link/GoTo/Contents}{#2}{}
\hook_use:n {hyp/link/#1}
\@@_link_goto_begin:nw {#2}
- }
+ }
{
- \group_begin:
- }
+ \group_begin:
+ }
}
}
@@ -2300,7 +2305,7 @@
}
{
\group_end:
- }
+ }
\int_gdecr:N\g_@@_linknestlevel_int
}
}
@@ -2331,15 +2336,14 @@
\pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
}
% \end{macrocode}
-% This socket defines \cs{l_@@_link_Contents_tl}
+% This socket adds something to the /Contents key.
% \begin{macrocode}
- \socket_use:nn{hyp/link/URI/Contents}{#2}
- \pdfannot_dict_put:nne {link/URI}{Contents}{\l_@@_link_Contents_tl}
+ \socket_use:nn{hyp/link/URI/Contents}{#2}
\cs_set_eq:NN \# \c_hash_str
\cs_set_eq:NN \% \c_percent_str
\Hy@safe@activestrue
\mode_leave_vertical:
- \pdfannot_dict_put:nne {link/URI}{A}{<<\pdfdict_use:n {l_hyp/annot/A/URI}>>}
+ \pdfannot_dict_put:nne {link/URI}{A}{<<\pdfdict_use:n {l_hyp/annot/A/URI}>>}
\pdfannot_link:nen { URI }
{
}
@@ -2350,7 +2354,7 @@
\Hy@VerboseLinkStop %where is the start??
}
\group_end:
- }
+ }
{
\group_begin: #1 \group_end:
}
@@ -2425,7 +2429,7 @@
\Hy@VerboseLinkStop %where is the start??
}
\group_end:
- }
+ }
{
\group_begin: #1 \group_end:
}
@@ -2470,7 +2474,7 @@
\pdfdict_remove:nn {l_hyp/annot/A/Launch}{Win}
}
{
- \pdfdict_put:nne
+ \pdfdict_put:nne
{l_hyp/annot/A/Launch}
{Win}
{<</P \l_@@_para_tmpa_tl /F \l_@@_filename_tmpa_tl >>}
@@ -2549,7 +2553,7 @@
#2
}
\group_end:
- }
+ }
{ \group_begin: #2 \group_end: }
\int_gdecr:N\g_@@_linknestlevel_int
}
@@ -2684,7 +2688,7 @@
,colorrun =#1
,colormenu =#1
,colorfile =#1
- }
+ }
,colorlinks .default:n = {true}
}
% \end{macrocode}
@@ -3632,8 +3636,8 @@
}
,pdfprintclip / unknown .code:n =
{
- \msg_warning:nneee
- { hyp }
+ \msg_warning:nneee
+ { hyp }
{ unknown-choice+empty }
{ pdfprintclip }
{ MediaBox, CropBox, BleedBox, TrimBox, ArtBox }
@@ -3970,7 +3974,7 @@
pdf#1 .code:n =
{
\tl_set:Ne\l_@@_tmpa_tl {\text_expand:n{##1}}
- \@@_store_metadata:no {pdf#1}{\l_@@_tmpa_tl}
+ \@@_store_metadata:no {pdf#1}{\l_@@_tmpa_tl}
\tl_if_empty:NTF \l_@@_tmpa_tl
{
\str_case:nnF { #1 }
@@ -3991,21 +3995,21 @@
}
}
{
- \tl_set:Ne\l_@@_tmpb_tl {\clist_item:on{\l_@@_tmpa_tl}{1}}
+ \tl_set:Ne\l_@@_tmpb_tl {\clist_item:on{\l_@@_tmpa_tl}{1}}
\exp_args:NNV
\regex_extract_once:NnN \l_@@_optlang_regex \l_@@_tmpb_tl\l_@@_tmpa_seq
\seq_if_empty:NTF\l_@@_tmpa_seq
{
\@@_text_pdfstring_info:oN {\l_@@_tmpa_tl}\l_@@_tmpa_str
}
- {
+ {
\@@_text_pdfstring_info:eN {\seq_item:Nn \l_@@_tmpa_seq{3}}\l_@@_tmpa_str
}
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
\pdfmanagement_add:nne {Info}{#2}{\l_@@_tmpa_str}
}
- }
+ }
}
}
\keys_define:nn { hyp / info }
@@ -4024,10 +4028,10 @@
{
\pdfmanagement_add:nne {Info}{#2}{\l_@@_tmpa_str}
}
- }
+ }
}
,unknown .code:n =
- {
+ {
\@@_text_pdfstring_info:eN {##1}\l_@@_tmpa_str
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
@@ -4494,7 +4498,7 @@
\@@_property_record:ee {HyAnn@\the\HyAnn@Count}{abspage}
\property_ref_undefined_warn:ee {HyAnn@\the\HyAnn@Count}{abspage}
}%
-\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {T}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {T}
\def\Fld@pageobjref
{
\property_if_recorded:eeT {HyAnn@\the\HyAnn@Count}{abspage}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
index fc17ad821f..3fb0f4b621 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
index a5527beb90..01db341f39 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
@@ -45,7 +45,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
%
@@ -56,27 +56,27 @@
% \begin{macrocode}
%<drivers>\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-testphase-dvipdfmx.def}{2024-10-27}{}
+ {l3backend-testphase-dvipdfmx.def}{2024-12-20}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-testphase-dvips.def}{2024-10-27}{}
+ {l3backend-testphase-dvips.def}{2024-12-20}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-testphase-dvisvgm.def}{2024-10-27}{}
+ {l3backend-testphase-dvisvgm.def}{2024-12-20}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-testphase-luatex.def}{2024-10-27}{}
+ {l3backend-testphase-luatex.def}{2024-12-20}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-testphase-pdftex.def}{2024-10-27}{}
+ {l3backend-testphase-pdftex.def}{2024-12-20}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
%</pdftex>
%<*xdvipdfmx>
- {l3backend-testphase-xetex.def}{2024-10-27}{}
+ {l3backend-testphase-xetex.def}{2024-12-20}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
%</xdvipdfmx>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
index 85ddc460c5..a2a4a98c79 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
index 926ca522dd..0b972eb1a8 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -432,7 +432,7 @@
% \begin{macrocode}
%<@@=pdfannot>
%<*header>
-\ProvidesExplPackage{l3pdfannot}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdfannot}{2024-12-20}{0.96o}
{PDF-annotations}
\RequirePackage{l3pdfdict}
%</header>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
index b673972f79..8ddfb1df3c 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
index c4899de069..5578e53cad 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -208,7 +208,7 @@
% \begin{macrocode}
%<@@=pdfdict>
%<*header>
-\ProvidesExplPackage{l3pdfdict}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdfdict}{2024-12-20}{0.96o}
{Tools for PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
index 151d954f99..3713012c7e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
index 254b066361..9b2efa96e1 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
index f6e2c84977..379a9c1d81 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
index 47ae3c53ee..3b8af9603f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
@@ -64,7 +64,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -422,7 +422,7 @@
{
\@@_field:n { @@/checkbox/#1 }
}
- \keys_set:nn {pdffield}{parent=@@/checkbox/#1}
+ \keys_set:nn {pdffield}{parent={@@/checkbox/#1}}
}
\cs_generate_variant:Nn \@@_checkbox_field:n {V}
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
index 4691370bfd..f75dce35f0 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
index d2fdf8969f..00294fb8a9 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -520,7 +520,7 @@
% \begin{macrocode}
\@@_field:n { @@/choice/#1 }
}
- \keys_set:nn {pdffield}{parent=@@/choice/#1}
+ \keys_set:nn {pdffield}{parent={@@/choice/#1}}
}
\cs_generate_variant:Nn \@@_choice_field:n {V}
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
index ae480bc36a..7526342745 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
index 0f404d0f91..05dfabdeb1 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
@@ -55,7 +55,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -679,7 +679,7 @@
{
\@@_field:n { @@/pushbutton/#1 }
}
- \keys_set:nn {pdffield}{parent=@@/pushbutton/#1}
+ \keys_set:nn {pdffield}{parent={@@/pushbutton/#1}}
}
\cs_generate_variant:Nn \@@_pushbutton_field:n {V}
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
index 9c773ee0ff..8b166ca7c5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
index 046aa9d8ed..0a81bee046 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
@@ -83,7 +83,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -737,7 +737,7 @@
}
}
}
- \keys_set:nn {pdffield}{parent=@@/radio/#1}
+ \keys_set:nn {pdffield}{parent={@@/radio/#1}}
}
\cs_generate_variant:Nn \@@_radio_field:n {V}
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
index 0d56f1ae05..f75d76138d 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
index e1ee9c82db..a4d8f2872f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -513,7 +513,7 @@
{
\@@_field:n { @@/textfield/#1 }
}
- \keys_set:nn {pdffield}{parent=@@/textfield/#1}
+ \keys_set:nn {pdffield}{parent={@@/textfield/#1}}
}
\cs_generate_variant:Nn \@@_textfield_field:n {V}
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
index 726a1bc4d4..fd05048ee9 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
index bb2a5b101f..f51a8cf933 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
@@ -69,7 +69,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -972,7 +972,7 @@
%<*package>
%<@@=pdffield>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-testphase}{2024-10-27}{0.96n}%
+\ProvidesExplPackage{l3pdffield-testphase}{2024-12-20}{0.96o}%
{form fields}
% \end{macrocode}
% \subsection{hyperref specific command}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
index d6d9d79eb4..eaf13223a6 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
index c5161917a1..85aaa2ca86 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -205,6 +205,12 @@
% has to be added explicitly as there is no sensible way
% to retrieve this automatically.
% \item The mimetype (in the |/Subtype|) should be properly escaped.
+% So for example
+% \begin{verbatim}
+% \pdfdict_put:nne{l_pdffile}{Subtype}{/application\string#2Fx-tex}
+% \end{verbatim}
+% But while it is possible to set the subtype like this, it is normally better
+% to rely on the file extension and to let the code autodetect the subtype.
% This module contains a property list with maps a number of file extensions
% to mimetypes and the commands try to detect and fill the mimetype automatically.
% \item The dictionary can contain additional keys (|/Filter|, |/DecodeParms|),
@@ -337,9 +343,10 @@
%
% \begin{verbatim}
% \pdf_object_new:n {module/filespec/A} % a new filespec object
-% \pdf_object_ref:n {module/filespec/A} % a reference
-% \pdf_object_unnamed_write:nn { stream }{ {...}{content} } %writing the stream
-% % filling and writing the filespec dictionary:
+% \pdf_object_ref:n {module/filespec/A} % reference it somewhere, e.g. in AF
+% % now write the stream
+% \pdf_object_unnamed_write:nn { stream }{ {...}{content} }
+% % and fill and write the filespec dictionary:
% \pdffile_filespec:nnn {module/filespec/A}{A.xml}{\pdf_object_ref_last:}
% \end{verbatim}
%
@@ -356,6 +363,24 @@
% are not supported.
% \end{variable}
%
+% \begin{variable} {\g_pdffile_embed_pdfa_int,\g_pdffile_embed_nonpdfa_int}
+% These two integers hold the number of embedded files in PDF/A format
+% and non-PDF/A format and can be used for a rough test for the requirements
+% in l3pdfmeta |no_embed_content| (both should be zero)
+% and |only_pdfa_embed_content| (the second should be zero).
+% The commands |\pdffile_embed_stream:...| and |\pdffile_embed_file:...|
+% increase the integers. As the code can currently not detect if an embedded
+% file follows a PDF/A standard it simply goes by the extension: files embedded
+% as |.pdf| increase the first integer.
+%
+% |\pdffile_filespec:nnn| does \emph{not} increase the integers,
+% if this command is used it lies in the responsability of the
+% author to adjust the integers.
+%
+% The integers are public so that user
+% can query and adjust the values, e.g. in tests for a standard compliancy.
+% \end{variable}
+%
% \begin{variable}{\l_pdffile_source_name_str}
% This variable is set at the begin of \cs{pdffile_embed_file:nnn}. It can be
% (and is) used in the file dictionaries, see table~\ref{tab:filedict} for examples.
@@ -398,7 +423,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage{l3pdffile}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdffile}{2024-12-20}{0.96o}
{embedding and referencing files in PDF---LaTeX PDF management testphase bundle}
\RequirePackage{l3pdftools} %temporarily!!
%</header>
@@ -438,6 +463,8 @@
#1
}
% \end{macrocode}
+%
+% \subsection{Variables}
% \begin{variable}
% {
% \l_@@_tmpa_tl,
@@ -484,6 +511,28 @@
,.xml = application/xml
}
% \end{macrocode}
+%
+% \begin{variable} {\g_pdffile_embed_pdfa_int,\g_pdffile_embed_nonpdfa_int}
+% These two integers hold the number of embedded files in PDF/A format
+% and non-PDF/A format and can be used for a rough test for the requirements
+% in l3pdfmeta |no_embed_content| (both should be zero)
+% and |only_pdfa_embed_content| (the second should be zero).
+% The commands |\pdffile_embed_stream:...| and |\pdffile_embed_file:...|
+% increase the integers. As the code can currently not detect if an embedded
+% file follows a PDF/A standard it simply goes by the extension: files embedded
+% as |.pdf| increase the first integer.
+%
+% |\pdffile_filespec:nnn| does \emph{not} increase the integers,
+% if this command is used it lies in the responsability of the
+% author to adjust the integers.
+%
+% The integers are public so that user
+% can query and adjust the values, e.g. in tests for a standard compliancy.
+% \begin{macrocode}
+\int_new:N\g_pdffile_embed_pdfa_int
+\int_new:N\g_pdffile_embed_nonpdfa_int
+% \end{macrocode}
+% \end{variable}
% \begin{variable}
% {
% \l_pdffile_source_name_str
@@ -550,43 +599,54 @@
% \begin{macro}{\pdffile_embed_file:nnn, \pdffile_embed_stream:nnn, \pdffile_embed_stream:nnN}
% At first a command to set the mimetype. It either uses the current value
% in the file dictionary, or tries to guess it from the extension.
-% \begin{macro}{\@@_mimetype_set:nN,\@@_mimetype_set:VN}
+%
+% \begin{macro}{\@@_mimetype_set:nNN,\@@_mimetype_set:VNN}
% \begin{macro}{\@@_fstream_write:nN, \@@_fstream_write:VN}
% \begin{macro}{\@@_stream_write:nN, \@@_stream_write:VN}
% \begin{macrocode}
%#1 file name,
%#2 tl to return the (printed) value for the guessed mimetype
-\cs_new_protected:Npn \@@_mimetype_set:nN #1 #2
+%#3 tl to return the file extension (that is a string)
+\cs_new_protected:Npn \@@_mimetype_set:nNN #1 #2 #3
{
\file_parse_full_name:nNNN
{#1}
\l_@@_tmpa_str %unused
\l_@@_tmpb_str %unused
\l_@@_ext_str
- %check if Subtype has been set
- \pdfdict_get:nnN { l_pdffile}{Subtype}\l_@@_tmpa_tl
- %if not look up in the prop:
- \quark_if_no_value:NT \l_@@_tmpa_tl
+ %check if Subtype has been set
+ \pdfdict_get:nnN { l_pdffile}{Subtype}\l_@@_tmpa_tl
+ %if not look up in the prop:
+ \quark_if_no_value:NT \l_@@_tmpa_tl
+ {
+ \prop_get:NVNTF
+ \g_pdffile_mimetypes_prop
+ \l_@@_ext_str
+ \l_@@_tmpb_tl
{
- \prop_get:NVNTF
- \g_pdffile_mimetypes_prop
- \l_@@_ext_str
- \l_@@_tmpb_tl
- {
- \tl_set:Ne #2 {/Subtype~\pdf_name_from_unicode_e:V \l_@@_tmpb_tl}
- }
- {
- \msg_warning:nne { pdffile }{ mimetype-missing} {#1}
- \tl_clear:N #2
- }
+ \tl_set:Ne #2 {/Subtype~\pdf_name_from_unicode_e:V \l_@@_tmpb_tl}
+ }
+ {
+ \msg_warning:nne { pdffile }{ mimetype-missing} {#1}
+ \tl_clear:N #2
}
- }
+ }
+ \tl_set_eq:NN #3 \l_@@_ext_str
+ }
+
+\cs_generate_variant:Nn \@@_mimetype_set:nNN {VNN}
-\cs_generate_variant:Nn \@@_mimetype_set:nN {VN}
+% #1 tl containing a file extension
+\cs_new_protected:Npn \@@_count_embed:N #1
+ {
+ \str_if_eq:VnTF #1 {.pdf}
+ {\int_gincr:N \g_pdffile_embed_pdfa_int }
+ {\int_gincr:N \g_pdffile_embed_nonpdfa_int }
+ }
%#1 file name,
%#2 tl, should be empty or contain /Subtype /mimetype
-% e.g. result from \@@_mimetype_set:NN
+% e.g. result from \@@_mimetype_set:nNN
\cs_new_protected:Npn \@@_fstream_write:nN #1 #2
{
\pdf_object_unnamed_write:ne { fstream }
@@ -611,7 +671,7 @@
%#1 file content
%#2 tl, should be empty or contain /Subtype /mimtype
-% e.g. result from \@@_mimetype_set:NN
+% e.g. result from \@@_mimetype_set:nNN
\cs_new_protected:Npn \@@_stream_write:nN #1 #2
{
\pdf_object_unnamed_write:ne { stream }
@@ -647,7 +707,7 @@
\group_begin:
\pdf_string_from_unicode:nnN {utf8/string}{#2}\l_@@_tmpa_str
\pdfdict_put:nne {l_pdffile/Filespec}{F} { \l_@@_tmpa_str }
- \@@_filename_convert_to_print:nN { #2 } \l_@@_tmpa_str
+ \@@_filename_convert_to_print:nN { #2 } \l_@@_tmpa_str
\pdfdict_put:nne {l_pdffile/Filespec}{UF}{ \l_@@_tmpa_str }
\pdf_object_write:nne { #1 } { dict }
{
@@ -682,7 +742,7 @@
/EF <</F~#2 /UF~#2>>
}
}
- \tl_gset:Ne\g_@@_tmpa_tl{\pdf_object_ref_last:}
+ \tl_gset:Ne\g_@@_tmpa_tl{\pdf_object_ref_last:}
\group_end:
\tl_set_eq:NN#3\g_@@_tmpa_tl
}
@@ -708,9 +768,11 @@
{
\file_get_full_name:nNTF {#1} \l_pdffile_source_name_str
{
- \@@_mimetype_set:VN
+ \@@_mimetype_set:VNN
\l_pdffile_source_name_str
\l_@@_automimetype_tl
+ \l_@@_tmpa_tl
+ \@@_count_embed:N \l_@@_tmpa_tl
\@@_fstream_write:VN
\l_pdffile_source_name_str
\l_@@_automimetype_tl
@@ -772,8 +834,9 @@
{ #3 }
{{stream}{}{\tl_if_blank:nTF {#2}{stream.txt}{\exp_not:n{#2}}}}
\tl_if_blank:nTF {#2}
- { \@@_mimetype_set:nN {stream.txt}\l_@@_automimetype_tl}
- { \@@_mimetype_set:nN { #2 } \l_@@_automimetype_tl }
+ { \@@_mimetype_set:nNN {stream.txt}\l_@@_automimetype_tl \l_@@_tmpa_tl}
+ { \@@_mimetype_set:nNN { #2 } \l_@@_automimetype_tl \l_@@_tmpa_tl }
+ \@@_count_embed:N \l_@@_tmpa_tl
\@@_stream_write:nN
{ #1 }
\l_@@_automimetype_tl
@@ -791,8 +854,9 @@
\cs_new_protected:Npn \pdffile_embed_stream:nnN #1 #2 #3
{
\tl_if_blank:nTF {#2}
- { \@@_mimetype_set:nN {stream.txt}\l_@@_automimetype_tl}
- { \@@_mimetype_set:nN { #2 } \l_@@_automimetype_tl }
+ { \@@_mimetype_set:nNN {stream.txt}\l_@@_automimetype_tl \l_@@_tmpa_tl}
+ { \@@_mimetype_set:nNN { #2 } \l_@@_automimetype_tl \l_@@_tmpa_tl }
+ \@@_count_embed:N\l_@@_tmpa_tl
\@@_stream_write:nN
{ #1 }
\l_@@_automimetype_tl
@@ -806,9 +870,9 @@
\prop_gput:Nee
\g_pdffile_embed_prop
{ #3 }
- {{stream}{}{\tl_if_blank:nTF {#2}{stream.txt}{\exp_not:n{#2}}}}
+ {{stream}{}{\tl_if_blank:nTF {#2}{stream.txt}{\exp_not:n{#2}}}}
}
-
+
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
index d37c5c8ac0..0fbd0ec55e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
index 4aa1552a40..f51b389ac7 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
@@ -57,7 +57,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -347,7 +347,10 @@
% \cs{pdfmanagement_add:nnn} \{ThisPage\} \Arg{name} \Arg{value}
% \end{syntax}
% Adds |/|\meta{name} \meta{value} at \emph{shipout} to the page dictionary of the
-% current page. Current page means here the \emph{shipout} page.
+% current page. Current page means here the \emph{shipout} page. \emph{shipout} means
+% at the end of the \texttt{shipout/background} hook. Code that wants to set a value
+% in a shipout hook should use the \texttt{shipout/background} hook too. Other hooks
+% are either too early or too late.%
% It is always stored globally.
% If \Arg{name} has already a value set in the \texttt{Page}
% dictionary it will be overwritten for this page.
@@ -632,7 +635,7 @@
%<@@=pdfmanagement>
%<*header>
%
-\ProvidesExplPackage{l3pdfmanagement}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdfmanagement}{2024-12-20}{0.96o}
{Management of core PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
index dbb975b333..e72ef9c6bd 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
index 81cb004c53..8d9e64b466 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -182,15 +182,20 @@
% \item[|no_embed_content|] no |/EF| key in filespec, no |/Type/EmbeddedFiles|.
% \emph{This will be checked in future by \pkg{l3pdffiles}
% for the files it embeds.}
-% The restrictment is set for only PDF/A-1b.
-% PDF/A-2b and PDF/A3-b lifted this restriction: PDF/A-2b allows
+% The restriction is set only for PDF/A-1 versions.
+% PDF/A-2 and PDF/A-3 lifted this restriction: PDF/A-2 allows
% to embed other PDF documents conforming to either PDF/A-1 or PDF/A-2,
-% and PDF/A-3 allows any embedded files. I don't see a way to test the
-% PDF/A-2b requirement so currently it will simply allow everything. Perhaps
+% and PDF/A-3 and PDF/A-4F allows any embedded files.
+%
+% \item[|only_pdfa_embed_content|]
+% This is set for PDF/A-2a, PDF/A-2b, PDF/A-2u and PDF/A-4.
+% I don't see a way to test the
+% PDF/A-2 requirement so currently it will simply allow everything. Perhaps
% a test for at least the PDF-format will be added in future.
+%
% \item[|Catalog_no_OCProperties|] don't add |/OCProperties| to the catalog
% {\em l3pdfmeta removes this entry at the end of the document}
-% \item[|Catalog_OCProperties_no_AS|]
+% \item[|Catalog_OCProperties_no_AS|]
% do not use |/AS| optional content configuration dictionary.
% \item[|Catalog_EmbeddedFiles|] ensure that an |EmbeddedFiles| name tree is
% in the catalog. This is required for PDF/A-4f.
@@ -205,10 +210,10 @@
% \item[|tagged|] that is set in A-2a and A-3a and means that the pdf must be
% tagged. This is currently neither tested not enforced somewhere.
% \item[|no_CharSet|] CharSet is deprecated is pdf 2.0 and should not
-% be used in A-4. l3pdfmeta will therefore suppress it for the
+% be used in A-4. l3pdfmeta will therefore suppress it for the
% engines pdftex and luatex (the other engines have no suitable option)
% \item[|omit_CID|] This avoids with PDF/A-2 and newer a failure
-% because of with missing CID identifications
+% because of with missing CID identifications
% (e.g. from rule ISO 19005-2:2011, Clause: 6.2.11.4.2)
% It has only with luatex an effect.
% \item[|Trailer_no_Info|] The \texttt{Info} dictionary
@@ -219,7 +224,7 @@
% it should only contain the \texttt{/ModDate} entry. In
% texlive 2023 the engines pdftex and luatex have primitives
% to suppress the dictionary
-% and l3pdfmeta will make use of it.
+% and l3pdfmeta will make use of it.
% \end{description}
%
% \subsubsection{Tests with values and special handlers}
@@ -357,8 +362,8 @@
% This sets various metadata to values needed by the \LaTeX{}
% regression tests.
% It also sets the seed for random functions.
-% If a current l3backend is used and \cs{c_sys_timestamp_str} is available,
-% the command does not set dates, but
+% If a current l3backend is used and \cs{c_sys_timestamp_str} is available,
+% the command does not set dates, but
% assumes that the environment variable \verb+SOURCE_DATE_EPOCH+ is used.
% \end{function}
%
@@ -468,11 +473,11 @@
%
% \subsubsection{Declarations}
% PDF knows beside standards also a more generic method to declare conformance
-% to some specification by adding a declaration,
+% to some specification by adding a declaration,
% see \url{https://pdfa.org/wp-content/uploads/2019/09/PDF-Declarations.pdf}).
% Such declarations can be added as a simple url which identify the specification or
% with additional details regarding date and credentials. An example would be
-%
+%
% \begin{verbatim}
% \DocumentMetadata{}
% \documentclass{article}
@@ -489,10 +494,10 @@
% \ExplSyntaxOff
% \begin{document}
% text
-% \end{document}
-%
+% \end{document}
+%
% \end{verbatim}
-%
+%
% \subsubsection{Dates}
% \begin{itemize}
% \item
@@ -560,7 +565,7 @@
% The keys |pdfcopyright| and |pdflicenseurl| work similar as in \pkg{hyperxmp}.
% But differently to \pkg{hyperxmp} the code doesn't set the |xmpRights:Marked|
% property, as I have some doubts that one deduce its value simply
-% by checking if the other keys have been used; if needed it can be added by
+% by checking if the other keys have been used; if needed it can be added by
% using one of these settings (true means with copyright, false means public domain).
% \begin{verbatim}
% \AddToDocumentProperties[document]{copyright}{true}
@@ -604,33 +609,33 @@
% \begin{syntax}
% \cs{pdfmeta_xmp_add_declaration:n}\Arg{uri}
% \end{syntax}
-% This add a PDF declaration with the required |conformsTo| property to the XMP metadata.
-% \meta{uri} should not be empty and is a URI specifying
+% This add a PDF declaration with the required |conformsTo| property to the XMP metadata.
+% \meta{uri} should not be empty and is a URI specifying
% the standard or profile referred to by the PDF
% Declaration. If the uri contains a hash, use \cs{c_hash_str} to escape it
% and use the \texttt{e} variant to expand it.
% \end{function}
-%
+%
% \begin{function}{\pdfmeta_xmp_add_declaration:nnnnn,
% \pdfmeta_xmp_add_declaration:ennnn,
% \pdfmeta_xmp_add_declaration:eeenn}
% \begin{syntax}
% \cs{pdfmeta_xmp_add_declaration:nnnnn}\Arg{uri}\Arg{By}\Arg{Date}\Arg{Credentials}\Arg{Report}
% \end{syntax}
-% This add a PDF declaration to the XMP metadata similar
-% to \cs{pdfmeta_xmp_add_declaration:n}.
-% With \meta{By}, \meta{Date}, \meta{Credentials}, \meta{Report} the optional
-% fields |claimBy| (text), |claimDate| (iso date), |claimCredentials| (text) and
+% This add a PDF declaration to the XMP metadata similar
+% to \cs{pdfmeta_xmp_add_declaration:n}.
+% With \meta{By}, \meta{Date}, \meta{Credentials}, \meta{Report} the optional
+% fields |claimBy| (text), |claimDate| (iso date), |claimCredentials| (text) and
% |claimReport| (uri) of the |claimData| property can be given.
% If \cs{pdfmeta_xmp_add_declaration:nnnnn} is used twice with the same \meta{uri}
-% argument the |claimData| are concatenated. There is no check if the |claimData| are identical.
+% argument the |claimData| are concatenated. There is no check if the |claimData| are identical.
% \end{function}
-%
+%
% The following two commands can be used to extend the schema declarations in
% the XMP metadata. This is for example needed to implement a standard like ZUGferd/Factur X
% for invoices. A schema declaration should be added only once but as this task
% is probably not needed frequently only light guards are there to avoid duplicated entries.
-%
+%
% \begin{function}{\pdfmeta_xmp_schema_new:nnn}
% \begin{syntax}
% \cs{pdfmeta_xmp_schema_new:nnn}\Arg{text}\Arg{prefix}\Arg{uri}
@@ -638,9 +643,9 @@
% \meta{text} is some string describing the schema, e.g. |PDF/A~Identification~Schema|,
% \meta{prefix} is the unique prefix used by the schema. This prefix
% must be declared first with |\pdfmeta_xmp_xmlns_new:nn|. If a schema with this prefix
-% has already been declared, it will currently be ignored with a warning.
+% has already been declared, it will currently be ignored with a warning.
% The \meta{uri} is expanded, so a
-% hash can for example be given as |\c_hash_str|.
+% hash can for example be given as |\c_hash_str|.
% \end{function}
% \begin{function}{\pdfmeta_xmp_property_new:nnnnn}
@@ -649,14 +654,14 @@
% \end{syntax}
% If the new property already exists in the schema
% (as identified by the combination of \meta{schema prefix}
-% and \meta{name} the property is silently ignore.
+% and \meta{name} the property is silently ignore.
% \meta{schema prefix} is the prefix declared with the previous command.
% schema, e.g. |PDF/A~Identification~Schema|,
% \meta{name} is a short string that identifies the property, e.g. |xmpMM| or |year|. It must be
-% unique in the properties of a schema. \meta{type} is e.g. |URI| or |Integer| or |Text|,
-% \meta{category} is e.g. |internal| or |external|, \meta{description} is a free description string.
+% unique in the properties of a schema. \meta{type} is e.g. |URI| or |Integer| or |Text|,
+% \meta{category} is e.g. |internal| or |external|, \meta{description} is a free description string.
% \end{function}
-%
+%
% \end{documentation}
%
% \begin{implementation}
@@ -666,7 +671,7 @@
% \begin{macrocode}
%<@@=pdfmeta>
%<*header>
-\ProvidesExplPackage{l3pdfmeta}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdfmeta}{2024-12-20}{0.96o}
{PDF-Standards---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
@@ -680,6 +685,15 @@
\msg_new:nnn {pdf }{wrong-pdfversion}
{PDF~version~#1~is~too~#2~for~standard~'#3'.}
% \end{macrocode}
+% Messages for embedded files
+% \begin{macrocode}
+\msg_new:nnn {pdf }{validation-failure}
+ {
+ PDF~standard~validation~failure.\\
+ #1
+ }
+% \end{macrocode}
+%
% \begin{variable}{\l_@@_tmpa_tl,\l_@@_tmpb_tl,\l_@@_tmpa_str,
% \g_@@tmpa_str,\l_@@_tmpa_seq,\l_@@_tmpb_seq}
% \begin{macrocode}
@@ -855,7 +869,7 @@
\pdfmeta_standard_verify:nF { no_CharSet }
{ \__pdf_backend_omit_charset:n {1} }
\pdfmeta_standard_verify:nF { omit_CID }
- { \__pdf_backend_omit_cidset:n {1} }
+ { \__pdf_backend_omit_cidset:n {1} }
\pdfmeta_standard_verify:nnF { min_pdf_version }
{ \pdf_version: }
{ \msg_warning:nneee {pdf}{wrong-pdfversion}
@@ -894,6 +908,7 @@
% \g_@@_standard_pdf/A-3B_prop ,
% \g_@@_standard_pdf/A-3U_prop ,
% \g_@@_standard_pdf/A-4_prop ,
+% \g_@@_standard_pdf/A-4F_prop ,
% }
% \begin{macrocode}
\prop_new:c { g_@@_standard_pdf/A-1B_prop }
@@ -925,7 +940,7 @@
,Catalog_no_OCProperties =
% Rule 6.9-4 The AS key shall not appear in any optional content configuration dictionary.
% actually only starting with A-2 but doesn't harm here either
- ,Catalog_OCProperties_no_AS=
+ ,Catalog_OCProperties_no_AS=
%===============
% Rule 6.6.1-1: PDAction, S == "GoTo" || S == "GoToR" || S == "Thread"
% || S == "URI" || S == "Named" || S == "SubmitForm"
@@ -971,16 +986,20 @@
% embedding files is allowed (with restrictions)
\prop_gremove:cn
{ g_@@_standard_pdf/A-2B_prop }
- { embed_content}
+ { no_embed_content }
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-2B_prop }
+ { only_pdfa_embed_content }
+ {}
\prop_gput:cnn
{ g_@@_standard_pdf/A-2B_prop }{max_pdf_version}{1.7}
\prop_gput:cnn
{ g_@@_standard_pdf/A-2B_prop }{omit_CID}{}
-% OCG layers are allowed (with restrictions)
+% OCG layers are allowed (with restrictions)
\prop_gremove:cn
{ g_@@_standard_pdf/A-2B_prop }
{ Catalog_no_OCProperties }
-
+
%A-2u ==============
\prop_new:c { g_@@_standard_pdf/A-2U_prop }
\prop_gset_eq:cc
@@ -1017,10 +1036,10 @@
{ g_@@_standard_pdf/A-3B_prop }{year}{2012}
\prop_gput:cnn
{ g_@@_standard_pdf/A-3B_prop }{level}{3}
-% embedding files is allowed (with restrictions)
+% embedding files is allowed
\prop_gremove:cn
{ g_@@_standard_pdf/A-3B_prop }
- { embed_content}
+ { only_pdfa_embed_content }
%A-3u ==============
\prop_new:c { g_@@_standard_pdf/A-3U_prop }
\prop_gset_eq:cc
@@ -1062,12 +1081,14 @@
{ g_@@_standard_pdf/A-4_prop }{no_CharSet}{}
\prop_gput:cnn
{ g_@@_standard_pdf/A-4_prop }{Trailer_no_Info}{}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-4_prop }{only_pdfa_embed_content}{}
\prop_gremove:cn
{ g_@@_standard_pdf/A-4_prop }{conformance}
\prop_gremove:cn
{ g_@@_standard_pdf/A-4_prop }{max_pdf_version}
\prop_gremove:cn
- { g_@@_standard_pdf/A-4_prop }{Catalog_OCProperties_no_AS}
+ { g_@@_standard_pdf/A-4_prop }{Catalog_OCProperties_no_AS}
%A-4f ==============
\prop_new:c { g_@@_standard_pdf/A-4F_prop }
\prop_gset_eq:cc
@@ -1075,15 +1096,18 @@
{ g_@@_standard_pdf/A-4_prop }
\prop_gput:cnn
{ g_@@_standard_pdf/A-4F_prop }{conformance}{F}
-% containsEmbeddedFiles == true ISO 19005-4:2020, Clause: 6.9, Test number: 5
+% containsEmbeddedFiles == true ISO 19005-4:2020, Clause: 6.9, Test number: 5
\prop_gput:cnn
- { g_@@_standard_pdf/A-4F_prop }{Catalog_EmbeddedFiles}{}
+ { g_@@_standard_pdf/A-4F_prop }{Catalog_EmbeddedFiles}{}
+% can contain any file
+\prop_gremove:cn
+ { g_@@_standard_pdf/A-4F_prop }{only_pdfa_embed_content}
% \end{macrocode}
% \end{variable}
%
% \subsubsection{Embedded Files}
-% Standard 4-AF is needed if we add AF files for
-% tagging but it also requires an EmbeddedFiles name tree,
+% Standard 4-AF is needed if we add AF files for
+% tagging but it also requires an EmbeddedFiles name tree,
% so we test at the end if the name tree is empty and add a small readme if
% yes
% \begin{macrocode}
@@ -1092,23 +1116,78 @@
\pdfmeta_standard_verify:nF{Catalog_EmbeddedFiles}
{
\tl_gput_right:Nn\g__kernel_pdfmanagement_end_run_code_tl
- {
+ {
\bool_if:NT \g__pdfmanagement_active_bool
{
\pdfdict_if_empty:nT { g__pdf_Core/Catalog/Names/EmbeddedFiles }
{
- \group_begin:
+ \group_begin:
\pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(note~about~PDF/A-4F)}
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Unspecified }
- \pdffile_embed_stream:nnN {PDF~standard~A-4F~requires~a~file}{readme.txt}\l_@@_tmpa_tl
- \exp_args:Nne \__pdf_backend_Names_gpush:nn{EmbeddedFiles}{(readme)~\l_@@_tmpa_tl}
+ \pdffile_embed_stream:nnN
+ {The~document~was~declared~to~be~of~type~PDF/A-4f~but~hasn't~any~attachments.~
+ LaTeX~therefore~added~this~dummy~file.}
+ {pdf-A4f.txt}
+ \l_@@_tmpa_tl
+ \exp_args:Nne \__pdf_backend_Names_gpush:nn{EmbeddedFiles}{(pdf-A4f)~\l_@@_tmpa_tl}
\group_end:
}
- }
+ }
}
- }
-}
+ }
+}
+% \end{macrocode}
+% Before writing the xml we check if there are embedded files we know of. For A-4 we adjust
+% the standard to A-4F is needed.
+% \begin{macrocode}
+\AddToHook{pdfmeta/xmp}
+ {
+ \pdfmeta_standard_verify:nF{no_embed_content}
+ {
+ \bool_lazy_or:nnT
+ { ! \int_if_zero_p:n { \g_pdffile_embed_pdfa_int } }
+ { ! \int_if_zero_p:n { \g_pdffile_embed_nonpdfa_int } }
+ {
+ \prop_get:NnNT\g_@@_standard_prop { name }\l_@@_tmpa_tl
+ {
+ \msg_warning:nne { pdf } { validation-failure }
+ {
+ Embedded~files~detected.\iow_newline:
+ This~is~not~allowed~in~standard~\l_@@_tmpa_tl
+ }
+ }
+ }
+ }
+ \pdfmeta_standard_verify:nF {only_pdfa_embed_content}
+ {
+ \int_if_zero:nF { \g_pdffile_embed_nonpdfa_int }
+ {
+ \prop_get:NnNT\g_@@_standard_prop { name }\l_@@_tmpa_tl
+ {
+ \str_if_eq:VnTF {\l_@@_tmpa_tl} { pdf/A-4 }
+ {
+ \prop_gset_eq:cc
+ { g_@@_standard_prop }
+ { g_@@_standard_pdf/A-4F_prop }
+ \msg_warning:nne { pdf } { validation-failure }
+ {
+ Embedded~non-PDF~files~detected.\iow_newline:
+ Switching~standard~from~PDF/A-4~to~PDF/A-4F
+ }
+ }
+ {
+ \msg_warning:nne { pdf } { validation-failure }
+ {
+ Embedded~non-PDF~files~detected.\iow_newline:
+ This~is~not~allowed~in~standard~\l_@@_tmpa_tl
+ }
+ }
+ }
+ }
+ }
+ }
% \end{macrocode}
+%
% \subsubsection{Colorprofiles and Outputintents}
% The following provides a minimum of interface to add a color profile
% and an outputintent need for PDF/A for now. There will be need to extend it later,
@@ -1283,16 +1362,16 @@
\prop_map_inline:Nn \g_@@_outputintents_prop
{
\prop_if_exist:cTF {c_@@_colorprofile_#2}
- {
+ {
\@@_embed_colorprofile:n
{#2}
\@@_write_outputintent:nn
{#2}
{#1}
- }
+ }
{
\msg_warning:nnn{pdfmeta}{colorprofile-undefined}{#2}
- }
+ }
}
}
% \end{macrocode}
@@ -1318,7 +1397,7 @@
{ \pdfmeta_standard_item:n { outputintent_A } }
\l_@@_tmpb_tl
\prop_if_exist:cTF {c_@@_colorprofile_\l_@@_tmpb_tl}
- {
+ {
\exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl
\prop_map_inline:Nn \g_@@_outputintents_prop
{
@@ -1330,7 +1409,7 @@
}
{
\msg_warning:nne{pdfmeta}{colorprofile-undefined}{\l_@@_tmpb_tl}
- }
+ }
}
}
% \end{macrocode}
@@ -1386,15 +1465,15 @@
{
\pdf_version_compare:NnF < {2.0}
{
- \msg_warning:nneee
+ \msg_warning:nneee
{pdf}{wrong-pdfversion}
- {\pdf_version:}{high}{UA-1}
- }
- }
+ {\pdf_version:}{high}{UA-1}
+ }
+ }
},
% \end{macrocode}
% currently it is not possible to merge requirements - these need some thoughts as
-% every standard has some common keys like the name or the yes.
+% every standard has some common keys like the name or the yes.
% We therefore add some requirements manually.
% \begin{macrocode}
_pdfstandard / UA-2 .code:n =
@@ -1408,22 +1487,22 @@
\@@_xmp_wtpdf_reuse_declaration:
\pdf_version_compare:NnT < {2.0}
{
- \msg_warning:nneee
+ \msg_warning:nneee
{pdf}{wrong-pdfversion}
- {\pdf_version:}{low}{UA-2}
- }
- }
- },
+ {\pdf_version:}{low}{UA-2}
+ }
+ }
+ },
xmp .choice:,
xmp / true .code:n = { \bool_gset_true:N \g_@@_xmp_bool },
xmp / false .code:n = { \bool_gset_false:N \g_@@_xmp_bool},
xmp .default:n = true,
% \end{macrocode}
-% These keys allow to disable or force the wtpdf declarations.
+% These keys allow to disable or force the wtpdf declarations.
% Currently the content can not be changed and once they have been disabled there
% are gone. This will perhaps change.
% \begin{macrocode}
- xmp / wtpdf .code:n =
+ xmp / wtpdf .code:n =
{
\keys_set:nn {@@/xmp}{#1}
},
@@ -1436,13 +1515,13 @@
{
\cs_set_eq:NN \@@_xmp_wtpdf_reuse_declaration: \prg_do_nothing:
},
- accessibility .choice:,
- accessibility / true .code:n = \@@_xmp_wtpdf_accessibility_declaration:,
- accessibility /false .code:n =
+ accessibility .choice:,
+ accessibility / true .code:n = \@@_xmp_wtpdf_accessibility_declaration:,
+ accessibility /false .code:n =
{
\cs_set_eq:NN \@@_xmp_wtpdf_accessibility_declaration: \prg_do_nothing:
- },
- }
+ },
+ }
% \end{macrocode}
% XMP debugging option
% \begin{macrocode}
@@ -1900,7 +1979,7 @@
{
\@@_xmp_add_packet_line_attr:nneV
{rdf}{li}{xml:lang="\l_@@_tmpa_tl" }\l_@@_tmpb_tl
- }
+ }
}
\@@_xmp_add_packet_close:nn{rdf}{#3}
\@@_xmp_add_packet_close:nn {#1}{#2}
@@ -2088,11 +2167,11 @@
\cs_if_exist_use:c {@@_xmp_schema_#2_additions:}
\@@_xmp_add_packet_close:nn{rdf}{li}
}
- }
+ }
}
% \end{macrocode}
% \end{macro}
-%
+%
%
%
% \begin{macro}{\@@_xmp_property_new:nnnnn}
@@ -2161,7 +2240,7 @@
% Renditionclass declared by hyperxmp.
% Properties InstanceID and OriginalDocumentID declared by pdfx (pdfx.xmp)
% With the exception of OriginalDocumentID all are already allowed and
-% predefined.
+% predefined.
% \begin{macrocode}
\@@_xmp_schema_new:nnn
{XMP~Media~Management~Schema}
@@ -2194,10 +2273,10 @@
{rev}
{Integer}
{internal}
- {Revision~year~of~standard}
+ {Revision~year~of~standard}
% \end{macrocode}
% \end{macro}
-% \item[pdfuaid] here we need (?) to declare the property
+% \item[pdfuaid] here we need (?) to declare the property
% \enquote{part} and \enquote{rev}.
% \begin{macro}[no-user-doc]{pdfuaid~(schema)}
% \begin{macrocode}
@@ -2216,7 +2295,7 @@
{rev}
{Integer}
{internal}
- {Revision~of~ISO~14289~standard}
+ {Revision~of~ISO~14289~standard}
% \end{macrocode}
% \end{macro}
% \item[pdfx] According to [1] not an allowed schema, but it seems
@@ -2391,22 +2470,22 @@
% \end{macrocode}
% \end{macro}
% \item[jav]: currently ignored
-%
-% \item[declarations] The PDF Declarations mechanism allows creation and
-% editing software to declare, via a PDF Declaration, a PDF file to be in
-% conformance with a 3rd party specification or profile
+%
+% \item[declarations] The PDF Declarations mechanism allows creation and
+% editing software to declare, via a PDF Declaration, a PDF file to be in
+% conformance with a 3rd party specification or profile
% that may not be related to PDF technology. Their specification is for example
% described in \url{https://pdfa.org/wp-content/uploads/2019/09/PDF-Declarations.pdf}.
-%
+%
% If declarations are added to the XMP-metadata they need (for pdf/A compliance) a
% schema declaration. We do not add it by default but define here a command to enable
% it. (This can be done in the document preamble as xmp is built only at the end.)
-%
-%
+%
+%
% \begin{macrocode}
\cs_new_protected:Npn \@@_xmp_schema_enable_pdfd:
{
- \@@_xmp_xmlns_new:nn {pdfd}{http://pdfa.org/declarations/}
+ \@@_xmp_xmlns_new:nn {pdfd}{http://pdfa.org/declarations/}
\@@_xmp_schema_new:nnn
{PDF~Declarations~Schema}
{pdfd}
@@ -2416,7 +2495,7 @@
{declarations}
{Bag~declaration}
{external}
- {An~unordered~array~of~PDF~Declaration~entries,~where~each~PDF~Declaration~representing~a~statement~of~conformance~with~ an~identified~external~standard~or~profile,~along~with~optional~information~identifying~the~nature~of~the~claim.}
+ {An~unordered~array~of~PDF~Declaration~entries,~where~each~PDF~Declaration~representing~a~statement~of~conformance~with~ an~identified~external~standard~or~profile,~along~with~optional~information~identifying~the~nature~of~the~claim.}
% \end{macrocode}
% the values are complicated so we use the additions: method to add them.
% \begin{macrocode}
@@ -2459,14 +2538,14 @@
{An~unordered~array~of~claim~data,~where~each~claim~identifies~the~nature~of~the~claim.}
\@@_xmp_add_packet_close:nn{rdf}{Seq}
\@@_xmp_add_packet_close:nn{pdfaType}{field}
- \@@_xmp_add_packet_close:nn{rdf}{li}
+ \@@_xmp_add_packet_close:nn{rdf}{li}
\@@_xmp_add_packet_close:nn{rdf}{Seq}
\@@_xmp_add_packet_close:nn{pdfaSchema}{valueType}
- }
+ }
% \end{macrocode}
% the schema should be added only once so disable it after use:
% \begin{macrocode}
- \cs_gset_eq:NN \@@_xmp_schema_enable_pdfd: \prg_do_nothing:
+ \cs_gset_eq:NN \@@_xmp_schema_enable_pdfd: \prg_do_nothing:
}
% \end{macrocode}
%
@@ -2564,26 +2643,26 @@
{
\@@_xmp_add_packet_line:nne {pdfaid}{part}{\pdfmeta_standard_item:n{level}}
\@@_xmp_add_packet_line:nne
- {pdfaid}{conformance}{\pdfmeta_standard_item:n{conformance}}
- \int_compare:nNnTF {0\pdfmeta_standard_item:n{level}}<{4}
+ {pdfaid}{conformance}{\pdfmeta_standard_item:n{conformance}}
+ \int_compare:nNnTF {0\pdfmeta_standard_item:n{level}}<{4}
{\@@_xmp_add_packet_line:nne {pdfaid}{year} {\pdfmeta_standard_item:n{year}}}
{\@@_xmp_add_packet_line:nne {pdfaid}{rev} {\pdfmeta_standard_item:n{year}}}
\@@_xmp_add_packet_line:nne
{pdfxid}{GTS_PDFXVersion}{\GetDocumentProperties{document/pdfstandard-X}}
- \pdfmanagement_get_documentproperties:nNT {document/pdfstandard-UA}\l_@@_tmpa_tl
- {
+ \pdfmanagement_get_documentproperties:nNT {document/pdfstandard-UA}\l_@@_tmpa_tl
+ {
\@@_xmp_add_packet_line:nne
- {pdfuaid}{part}{\exp_last_unbraced:No\use_i:nn \l_@@_tmpa_tl}
+ {pdfuaid}{part}{\exp_last_unbraced:No\use_i:nn \l_@@_tmpa_tl}
\@@_xmp_add_packet_line:nne
- {pdfuaid}{rev}{\exp_last_unbraced:No\use_ii:nn \l_@@_tmpa_tl}
- }
+ {pdfuaid}{rev}{\exp_last_unbraced:No\use_ii:nn \l_@@_tmpa_tl}
+ }
}
% \end{macrocode}
% \end{macro}
%
% \subsection{Declarations}
% See \url{https://pdfa.org/wp-content/uploads/2019/09/PDF-Declarations.pdf}
-%
+%
% \begin{variable}{\g_@@_xmp_pdfd_data_prop}
% This holds the data for declarations.
% \begin{macrocode}
@@ -2598,11 +2677,11 @@
\prop_if_empty:NF\g_@@_xmp_pdfd_data_prop
{
\@@_xmp_add_packet_open:nn{pdfd}{declarations}
- \@@_xmp_add_packet_open:nn{rdf}{Bag}
+ \@@_xmp_add_packet_open:nn{rdf}{Bag}
\prop_map_inline:Nn \g_@@_xmp_pdfd_data_prop
{
\@@_xmp_build_pdfd_claim:nn{##1}{##2}
- }
+ }
\@@_xmp_add_packet_close:nn{rdf}{Bag}
\@@_xmp_add_packet_close:nn{pdfd}{declarations}
}
@@ -2616,20 +2695,20 @@
\cs_new_protected:Npn \@@_xmp_build_pdfd_claim:nn #1#2
{
\@@_xmp_add_packet_open_attr:nnn{rdf}{li}{rdf:parseType="Resource"}
- \@@_xmp_add_packet_line:nnn{pdfd}{conformsTo}{#1}
+ \@@_xmp_add_packet_line:nnn{pdfd}{conformsTo}{#1}
\tl_if_empty:nF {#2}
{
- \@@_xmp_add_packet_open:nn{pdfd}{claimData}
- \@@_xmp_add_packet_open:nn{rdf}{Bag}
+ \@@_xmp_add_packet_open:nn{pdfd}{claimData}
+ \@@_xmp_add_packet_open:nn{rdf}{Bag}
#2
- \@@_xmp_add_packet_close:nn{rdf}{Bag}
- \@@_xmp_add_packet_close:nn{pdfd}{claimData}
+ \@@_xmp_add_packet_close:nn{rdf}{Bag}
+ \@@_xmp_add_packet_close:nn{pdfd}{claimData}
}
- \@@_xmp_add_packet_close:nn{rdf}{li}
- }
+ \@@_xmp_add_packet_close:nn{rdf}{li}
+ }
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Photoshop}
% \begin{macro}{\@@_xmp_build_photoshop:}
% \begin{macrocode}
@@ -2808,11 +2887,11 @@
{Marked}
{
\str_case:en {\GetDocumentProperties{document/copyright}}
- {
+ {
{true}{True}
{false}{False}
}
- }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2982,18 +3061,20 @@
% We don't try to get the byte count. So we can put everything
% in the |shipout/lastpage| hook
% \begin{macrocode}
+\hook_new:n { pdfmeta/xmp }
\AddToHook{shipout/lastpage}
{
\bool_if:NT\g_@@_xmp_bool
{
- \str_if_exist:NTF\c_sys_timestamp_str
- {
+ \str_if_exist:NTF\c_sys_timestamp_str
+ {
\tl_set_eq:NN \l_@@_xmp_currentdate_tl \c_sys_timestamp_str
}
{
\file_get_timestamp:nN{\jobname.log}\l_@@_xmp_currentdate_tl
}
\@@_xmp_date_split:VN\l_@@_xmp_currentdate_tl\l_@@_xmp_currentdate_seq
+ \hook_use:n { pdfmeta/xmp }
\@@_xmp_build_packet:
\exp_args:No
\__pdf_backend_metadata_stream:n {\g_@@_xmp_packet_tl}
@@ -3036,13 +3117,13 @@
\cs_set_eq:NN \pdfmeta_xmp_schema_new:nnn \@@_xmp_schema_new:nnn
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\pdfmeta_xmp_property_new:nnnnn}
% \begin{macrocode}
\cs_set_eq:NN \pdfmeta_xmp_property_new:nnnnn \@@_xmp_property_new:nnnnn
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\pdfmeta_xmp_add_declaration:n,\pdfmeta_xmp_add_declaration:e}
% \begin{macrocode}
\cs_new_protected:Npn \pdfmeta_xmp_add_declaration:n #1 %conformsTo uri
@@ -3062,12 +3143,12 @@
\tl_set:Nn \l_@@_tmpa_tl
{
\@@_xmp_add_packet_open_attr:nnn{rdf}{li}{rdf:parseType="Resource"}
- \@@_xmp_add_packet_line:nnn{pdfd}{claimBy}{#2}
- \@@_xmp_add_packet_line:nnn{pdfd}{claimDate}{#3}
- \@@_xmp_add_packet_line:nnn{pdfd}{claimCredentials}{#4}
- \@@_xmp_add_packet_line:nnn{pdfd}{claimReport}{#5}
- \@@_xmp_add_packet_close:nn{rdf}{li}
- }
+ \@@_xmp_add_packet_line:nnn{pdfd}{claimBy}{#2}
+ \@@_xmp_add_packet_line:nnn{pdfd}{claimDate}{#3}
+ \@@_xmp_add_packet_line:nnn{pdfd}{claimCredentials}{#4}
+ \@@_xmp_add_packet_line:nnn{pdfd}{claimReport}{#5}
+ \@@_xmp_add_packet_close:nn{rdf}{li}
+ }
\prop_get:NnNT \g_@@_xmp_pdfd_data_prop {#1}\l_@@_tmpb_tl
{
\tl_concat:NNN \l_@@_tmpa_tl \l_@@_tmpa_tl \l_@@_tmpb_tl
@@ -3075,12 +3156,12 @@
\prop_gput:Nno\g_@@_xmp_pdfd_data_prop{#1}
{
\l_@@_tmpa_tl
- }
+ }
}
\cs_generate_variant:Nn\pdfmeta_xmp_add_declaration:nnnnn {e,eee}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Default declarations}
% The two declarations will be required quite often with ua-2, so we
% provide some interface.
@@ -3099,17 +3180,17 @@
{http://pdfa.org/declarations/wtpdf\c_hash_str reuse1.0}
{LaTeX~Project}
{\@@_xmp_iso_today:}{}{}
- }
+ }
\cs_new_protected:Npn \@@_xmp_wtpdf_accessibility_declaration:
{
\pdfmeta_xmp_add_declaration:ennnn
{http://pdfa.org/declarations/wtpdf\c_hash_str accessibility1.0}
{LaTeX~Project}
{\@@_xmp_iso_today:}{}{}
- }
+ }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
index 81ae8bb9f1..1f39fd7ea6 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
index ff65ed4700..9e089b8f84 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -238,7 +238,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage{l3pdftools}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdftools}{2024-12-20}{0.96o}
{candidate commands for l3pdf---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
index 42c877f7e5..82e210bf55 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
index 22b6d4bb08..5dd7f5cb96 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -132,7 +132,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*header>
-\ProvidesExplPackage{l3pdfxform}{2024-10-27}{0.96n}
+\ProvidesExplPackage{l3pdfxform}{2024-12-20}{0.96o}
{command to create xforms (beta)---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
index c7a594d64b..1d3bc37061 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
index 2bb0fcf215..692724cc35 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -55,7 +55,7 @@
% \section{\pkg{ltdocinit} documentation}
% This small module defined \cs{DocumentMetadata} but the definition
% has been moved to latex-lab. The documentation can be found in
-% \texttt{documentmetadata-support-doc-.pdf}
+% \texttt{documentmetadata-support-doc.pdf}
%
% \cs{DocumentMetadata} is also used to
% activate the new PDF management code and it loads
@@ -81,72 +81,20 @@
% This is an older alias for \cs{DocumentMetadata}
% \end{function}
%
-% Additionally to the keys described in \texttt{documentmetadata-support-doc-.pdf}
+% Additionally to the keys described in \texttt{documentmetadata-support-doc.pdf}
% the following keys/values are implemented
%
% \begin{description}
%
-% \item[\texttt{pdfstandard}] Choice key to set the pdf standard.
-%
-% Starting with version 0.95s it is also possible to use the values
-% |X-4|, |X-4p|, |X-5g|, |X-5n|, |X-5pg|, |X-6|, |X-6n|, |X-6p|, |UA-1|, for
-% a PDF/X and PDF/UA standard. These keys set \emph{only} the relevant
-% XMP-metadata. In version 0.95z support for |UA-2| has been added but
-% note that |UA-2| hasn't been released yet. It should be used only together
-% with pdf version 2.0.
-%
-% Beside this |A-1b|, |A-2a|, |A-2b|, |A-2u|, |A-3a|, |A-3b|, |A-3u| and |A-4|
-% are accepted as values for A-standards. The casing is irrelevant, |a-1b| works too.
-% Note that using these
-% key doesn't mean that the document actually follows the standard. \LaTeX{}
-% can neither ensure nor check all requirements of a standard, and not everything
-% it can do theoretically has already been implemented.
-% For A-standard a color profile is included and the
-% \texttt{/OutputIntent} is set and javascript action in hyperref are suppressed.
-% The |u| variants do not force unicode,
-% but they will pass the information to hyperref. The |a| variants
-% do \emph{not} enforce (or even test) a tagged pdf yet.
-% More information can be found in the documentation
-% of \pkg{l3pdfmeta}.
-%
-% |pdfstandard| can be used more than once to set overlapping standards, e.g:\\
-% |pdfstandard=A-2b,pdfstandard=X-4,pdfstandard=UA-1|
-%
-% \item[\texttt{xmp}] A boolean, if set to false no XMP metadata are added to the PDF.
-% The default is true. Details are described in the documentation of \pkg{l3pdfmeta}.
-%
% \item[\texttt{testphase}] This key is used to load testphase code. The values it accepts
% and their effect will change over time, when testphase packages are added or
-% removed or when the code is moved into the kernel. New value here are
+% removed or when the code is moved into the kernel. A new value here is
% \begin{description}
-% \item[\texttt{new-or-1}] This patches a few commands related
-% to the output routing. They are needed for the tagging
-% of paragraphs, for the tagging of header and footer and
-% to allow the PDF management to insert code which avoids that
-% links happening at page breaks spills into the header and footer.
-% This code is also loaded be the following values.
-% \item[\texttt{new-or}] This loads more changes to the output routine required for the
-% tagging. It is not compatible with every class! The code is also loaded by the
-% \texttt{phase-II} value.
+% \item[latest] This loads all existing modules.
% \end{description}
+%
% The |testphase| key can only be used in the first \cs{DocumentMetadata}.
%
-% \item[\texttt{debug}] This key activates some debug options. It takes a list of key-values
-% as value. Currently the following keys are known:
-% \begin{description}
-% \item[\texttt{para}] with the default and only value |show|. It will activate the |paratagging-show|
-% option of \pkg{tagpdf},
-% \item[\texttt{log}] with the values as described in the documentation \pkg{tagpdf},
-% \item[\texttt{uncompress}] which does the same as |uncompress| as main key
-% \item[\texttt{pdfmanagement}] a boolean which allows to deactivate the pdfmanagement.
-% This should only be done for debugging!
-% \item[\texttt{firstaidoff}] This accepts a comma lists of keywords and disables the patches
-% related to them. More information can be found in the documentation of
-% \pkg{pdfmanagement-firstaid}.
-% \item[\texttt{xmp-export}] This will export the XMP-metadata to a file \verb+\jobname.xmpi+.
-% with \texttt{debug=\{xmp-export=filename\}} the file name can be changed.
-% More information can be found in the documentation of \pkg{l3pdfmeta}.
-% \end{description}
% \end{description}
%
% \subsection{Container for document properties}
@@ -221,7 +169,7 @@
% \begin{macrocode}
%<@@=pdfmanagement>
%<*header>
-\ProvidesExplPackage{ltdocinit}{2024-10-27}{0.96n}
+\ProvidesExplPackage{ltdocinit}{2024-12-20}{0.96o}
{Initialize document metadata}
%</header>
% \end{macrocode}
@@ -246,6 +194,27 @@
{ \tl_new:N \g_@@_testphase_tl }
% \end{macrocode}
% \end{variable}
+% \subsection{New, temporary testphase keys}
+% TODO: remove after 2025-06-01 release
+%
+% \begin{macrocode}
+\msg_new:nnn { meta } { testphase-latest-loading-temp }
+ {
+ Loading~testphase~modules\\
+ #1
+ }
+\keys_define:nn { document / metadata }
+ {
+ ,testphase / latest .code:n =
+ {
+ \keys_set:nn
+ {document / metadata}
+ {testphase={phase-III,title,table,math,firstaid}}
+ \msg_note:nnn { meta } { testphase-latest-loading-temp }
+ { phase-III,~title,~table,~math,~firstaid }
+ }
+ }
+% \end{macrocode}
% \subsection{\cs{DeclareDocumentMetadata}}
% \cs{DocumentMetadata} is defined by the kernel.
% We only define the older alias \cs{DeclareDocumentMetadata}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
index f949362973..14426ae5dd 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
index 11e11e72bc..5dc0e4b3be 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -63,7 +63,7 @@
% |debug={firstaidoff={name1,name2,...},...}|.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{pdfmanagement-firstaid}{2024-10-27}{0.96n}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2024-12-20}{0.96o}
{LaTeX PDF management testphase bundle / firstaid-patches}
%<@@=pdfmanagement>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
index 669ad51696..3548eb40b9 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
index 0d8ffc6e4a..5adb3d9826 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.96n, released 2024-10-27}
+% \date{Version 0.96o, released 2024-12-20}
%
% \maketitle
% \begin{documentation}
@@ -394,7 +394,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*package>
-\ProvidesExplPackage{pdfmanagement-testphase}{2024-10-27}{0.96n}
+\ProvidesExplPackage{pdfmanagement-testphase}{2024-12-20}{0.96o}
{LaTeX PDF management testphase bundle}
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{2020-10-01}{}{
@@ -422,7 +422,7 @@
% to allow to set it in the document.
% \begin{macrocode}
%<*header>
-\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-10-27}{0.96n}
+\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-12-20}{0.96o}
{PDF~management~code~(testphase)}
% \end{macrocode}
% We define a boolean for the new delayed shipout. This is temporary. At some
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
index ad50a08e70..3a8efa4a73 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
index bde07318fd..421ee2f344 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
@@ -1,6 +1,6 @@
%% LaTeX2e file `xcolor-patches-tmp-ltx.sty'
%%
-\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-10-27 v0.96n patch xcolor for l3color]
+\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-12-20 v0.96o patch xcolor for l3color]
\@ifundefined{color_set:nn}{\RequirePackage{l3color}}{}
\ExplSyntaxOn
diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md
index b724c564c7..d72f0b442b 100644
--- a/macros/latex/required/babel/base/README.md
+++ b/macros/latex/required/babel/base/README.md
@@ -1,9 +1,9 @@
-## Babel 24.14
+## Babel 24.15
-2024-11-30
+2024-12-21
`Babel` is the multilingual framework to localize documents. It fully
-supports LaTeX and the Unicode engines LuaLaTeX and XeLaTeX. A few
+supports pdfLaTeX and the Unicode engines LuaLaTeX and XeLaTeX. A few
languages even work with Plain formats.
Its aim is to provide a localization framework for different languages,
@@ -21,7 +21,7 @@ features.
The latest stable version is available on <https://ctan.org/pkg/babel>.
-Changes in version 24.14 are described in:
+Changes in version 24.15 are described in:
https://latex3.github.io/babel/news/whats-new-in-babel-24.14.html
@@ -59,14 +59,12 @@ respective authors.
### Summary of latest changes
```
-24.14 2024-11-30
- * Now Harfbuzz is the default renderer with \babelfont in many
- (but not all) scripts (lua).
- * Now lazy locale loading sets 'import'.
- * Improvements in French (thanks to Daniel Flipo) and Japanese
- ini locale files (lua).
- * Fix issue with axis (tikz) in RTL (lua, #318). Thanks to Salim
- Bou.
+25.15 2024-12-21
+ * New: Locale for Interslavic, thanks to Adiee5.
+ * Fix: Import was not honored with lazy loading in some cases.
+ * Fix: Transforms where applied twice with unboxing, which could
+ even raise a cryptic lua error.
+ * Improvements in the manual thanks to Barbara Beeton.
```
### Previous changes
diff --git a/macros/latex/required/babel/base/babel-code.pdf b/macros/latex/required/babel/base/babel-code.pdf
index 04be685624..cf6ea04744 100644
--- a/macros/latex/required/babel/base/babel-code.pdf
+++ b/macros/latex/required/babel/base/babel-code.pdf
Binary files differ
diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx
index b64326162b..ec9d48de06 100644
--- a/macros/latex/required/babel/base/babel.dtx
+++ b/macros/latex/required/babel/base/babel.dtx
@@ -37,7 +37,7 @@
lang = en-001,
}
\ProvidesFile{babel.dtx}%
- [2024/11/30 v24.14
+ [2024/12/21 v24.15
The multilingual framework for pdfLaTeX, LuaLaTeX and XeLaTeX]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
@@ -79,7 +79,7 @@
\newcommand*\Lenv[1]{\texttt{#1}}
\newcommand*\menv[1]{\char`\{#1\char`\}}
\newcommand*\Eenv[1]{%
- \quad\ldots\quad
+ \quad...\quad
\texttt{\color{thered}\string\end\menv{#1}}}
\newcommand*\file[1]{\texttt{#1}}
\newcommand*\cls[1]{\texttt{#1}}
@@ -303,8 +303,8 @@ Johannes L. Braams\\[-.5ex]
Localization and internationalization\\[1cm]
Unicode\\
\largetex\\
-pdf\largetex\\
Lua\largetex\\
+pdf\largetex\\
Xe\largetex
\vspace{20cm}
\end{minipage}
@@ -323,8 +323,8 @@ Xe\largetex
\begin{description}
\item[\sffamily\color{messages}What is this document about?] This user
guide focuses on internationalization and localization with \LaTeX{}
-and \pdftex, \luatex{} and \xetex{}. There are also some notes on its
-use with e-Plain and pdf-Plain \TeX.
+and \pdftex, \luatex{} and \xetex{} with the \babel{} package. There
+are also some notes on its use with e-Plain and pdf-Plain \TeX.
\item[\sffamily\color{messages}I only need learn the most basic
features.] The first subsections (1.1-1.6) describe the ways
@@ -342,14 +342,14 @@ are highlighted with \New{X.XX}\hspace{-.5em}
(\raisebox{.15ex}{$\oplus$} is a link to the \babel{} site), and there
are some notes for the latest versions in
\href{https://latex3.github.io/babel/}{the \babel{} site}. The most
-recent features can be still unstable. Remember version 24.1 follows
+recent features can still be unstable. Remember version 24.1 follows
3.99, because of a new numbering scheme.
\item[\sffamily\color{messages}Can I help?] Sure! You can follow the
development of \babel{} in
\href{https://github.com/latex3/babel}{GitHub} and make suggestions,
including requirements for some language or script. Feel free to fork
-it and make pull requests. If you are the author of a package, send to
+it and make pull requests. If you are the author of a package, send
me a few test files which I'll add to mine, so that possible issues can
be caught in the development phase.
@@ -388,7 +388,7 @@ Basically, what you need is typically:
\begin{itemize}
\bfseries
\item Tell \babel{} which language or languages are required.
-\item With non-Latin scripts and Unicode engines (\luatex{} is the
+\item With non-Latin scripts and Unicode engines (\luatex\ is the
preferred one), select a suitable font (sec.~\ref{fonts})
\item In multilingual documents, switch the language in the text body
(sec.~\ref{selectors}).
@@ -452,7 +452,7 @@ the option |french| and will be able to use it.
\begin{example}
Now a simple monolingual document in Russian (text from the Wikipedia)
with \luatex{} or \xetex{}. Note neither \textsf{fontenc} nor
-\textsf{inputenc} are necessary, and a so-called Unicode font must be
+\textsf{inputenc} is necessary, and a so-called Unicode font must be
loaded (in this example with the help of |\babelfont|, described below).
\setengine{luatex/xetex}
@@ -484,7 +484,7 @@ _\babelfont{rm}{DejaVu Serif}_
\begin{note}
\Babel{} does not make any readjustments by default in font size,
- vertical positioning or line height by default. This is on purpose
+ vertical positioning or line height. This is on purpose
because the optimal solution depends on the document layout and the
font, and very likely the most appropriate one is a combination of
these settings.
@@ -505,7 +505,7 @@ _\babelfont{rm}{DejaVu Serif}_
\usepackage[_pdflang=es-MX_]{hyperref}
\end{verbatim}
This is not currently done by \babel{} and you must set it by hand. The
-PDF document language can be also set with |\DocumentMetadata|, before
+PDF document language can also be set with |\DocumentMetadata|, before
|\documentclass|; for example:
\begin{verbatim}
\DocumentMetadata{_lang=es-MX_}
@@ -530,9 +530,9 @@ even better, make sure the encoding in your editor is set to UTF-8.
\begin{troubleshooting}
Another typical error when using \babel{} is the following:
-\trouble{Unknown language `LANG'}
+\trouble{Unknown language 'LANG'}
\begin{verbatim}
-! Package babel Error: Unknown language `#1'. Either you have
+! Package babel Error: Unknown language 'LANG'. Either you have
(babel) misspelled its name, it has not been installed,
(babel) or you requested it in a previous run. Fix its name,
(babel) install it or just rerun the file, respectively. In
@@ -550,7 +550,7 @@ Another typical error when using \babel{} is the following:
The following warning is about hyphenation patterns, which are
not under the direct control of \babel:
\trouble{No hyphenation patterns were preloaded for (babel) the
- language `LANG' into the format}
+ language 'LANG' into the format}
\begin{verbatim}
Package babel Warning: No hyphenation patterns were preloaded for
(babel) the language `LANG' into the format.
@@ -562,13 +562,13 @@ Package babel Warning: No hyphenation patterns were preloaded for
correctly hyphenated. Some languages in some system may be raising
this warning wrongly (because they are not hyphenated) -- just ignore
it. See the manual of your distribution (Mac\TeX, Mik\TeX, \TeX Live,
- etc.) for further info about how to configure it.
+ etc.)\ for further info about how to configure it.
\end{troubleshooting}
\begin{troubleshooting}
\textit{You are loading directly a language style.}
Loading directly
-|sty| files in \LaTeX{} (ie, |\usepackage{<language>}|) was deprecated
+|sty| files in \LaTeX{} (i.e., |\usepackage{<language>}|) was deprecated
many years ago and you will get the error: \trouble{You are loading
directly a language style}
\begin{verbatim}
@@ -581,7 +581,7 @@ directly a language style}
\begin{note}
You will see an ‘info’ in the log file stating some data is being
loaded from an |ini| file. It includes standardized names for
- language and script used by |\babelfont|, and the BCP-47 tag, required in
+ language and script used by |\babelfont|, and the BCP 47 tag, required in
some cases by |\Make<Xxxxx>case|.
\end{note}
@@ -660,8 +660,8 @@ is first selected.
This is particularly useful in documents with many languages, and also
when there are short texts of this kind coming from an external source
-whose contents are not known on beforehand (for example, titles in a
-bibliography). At this regard, it is worth remembering that
+whose contents are not known beforehand (for example, titles in a
+bibliography). In this regard, it is worth remembering that
|\babelfont| does \textit{not} load any font until required, so that it
can be used just in case.
@@ -698,9 +698,9 @@ option, just write:
\begin{note}
Instead of its name, you may prefer to select the language with the
- corresponding BCP47 tag. This alternative, however, must be activated
- explicitly, because a two- or tree-letter word is a valid name for a
- language (eg, |lu| can be the locale name with tag |khb| or the tag
+ corresponding BCP 47 tag. This alternative, however, must be activated
+ explicitly, because a two- or three-letter word is a valid name for a
+ language (e.g., |lu| can be the locale name with tag |khb| or the tag
for |lubakatanga|). See section \ref{bcp47} for further details.
\end{note}
@@ -709,7 +709,7 @@ option, just write:
In multilingual documents, just use a list of the required languages
either as package or as class options. The last language is considered the
main one, activated by default. Sometimes, the main language changes
-the document layout (eg, |spanish| and |french|).
+the document layout (e.g., |spanish| and |french|).
To switch the language there are two basic macros, described below in
detail: |\selectlanguage| is used for blocks of text, while
@@ -721,7 +721,7 @@ detail: |\selectlanguage| is used for blocks of text, while
\documentclass{article}
\usepackage[dutch,english]{babel}
\end{verbatim}
- would tell \LaTeX\ that the document would be written in two
+ would tell \LaTeX{} that the document would be written in two
languages, Dutch and English, and that English would be the first
language in use, and the main one.
\end{example}
@@ -785,8 +785,8 @@ Vietnamese: \prefacename, \alsoname, \today.
\end{note}
\begin{note}
- Once loaded a language, you can select it with the corresponding
- BCP47 tag. See section \ref{bcp47} for further details.
+ Once a language is loaded, you can select it with the corresponding
+ BCP 47 tag. See section \ref{bcp47} for further details.
\end{note}
\begin{note}
@@ -812,8 +812,8 @@ cases:
language, while the rest will be loaded in the ‘classical’ way.
\item |provide+=*| loads the main language in the ‘classical’ way,
and the rest in the ‘modern’ one.
-\item |provide*=*| is the same for all languages, ie, main and
- secondary ones are all loaded in the ‘modern’ way.
+\item |provide*=*| is the same for all languages, i.e., main and
+ secondary ones are loaded in the ‘modern’ way.
\end{itemize}
More complex combinations can be handled with |\babelprovide|,
explained below.
@@ -848,12 +848,12 @@ much sense in this case.)
\subsection{Languages supported by \babel{} in the ‘classical’ mode}
(To be updated.) In the following table most of the languages supported
-by \babel{} with an |.ldf| file are listed, together with the names of
-the option which you can load \babel\ with for each language. Note this
+by \babel{} with an |ldf| file are listed, together with the names of
+the options which you can load \babel\ with for each language. Note this
list is open and the current options may be different. It does not
include |ini| files (see below).
-Except in a few cases (eg, |ngerman|, |serbianc|, |acadian|) names are
+Except in a few cases (e.g., |ngerman|, |serbianc|, |acadian|) names are
those of the Unicode CLDR (or based on them).
Most of them work out of the box, but some may require extra fonts,
@@ -1642,7 +1642,7 @@ If no language is given, then it is considered the default font for the
family. On the other hand, if there is one or more languages in the
optional argument, the font will be assigned to all of them, overriding
the default one. Alternatively, you may set a font for a script -- just
-precede its name (lowercase) with a star (eg, |*devanagari|).
+precede its name (lowercase) with a star (e.g., |*devanagari|).
With the optional argument, the font is \textit{not} yet loaded, but
just predeclared. In other words, font loading is lazy, which means you
@@ -1782,7 +1782,7 @@ And if you need, say, Arabic and Devanagari:
\setengine{luatex/xetex}
\begin{verbatim}
\usepackage{fontspec}
-\newfontscript{Devanagari}{dev2}
+\newfontscript{Devanagari}{deva}
\babelfont[hindi]{rm}{Shobhika}
\end{verbatim}
This makes sure the OpenType script for Devanagari is |deva| and not
@@ -1823,7 +1823,7 @@ And if you need, say, Arabic and Devanagari:
therefore in \xetex{} you can apply |Mapping|s. For example, there is
a set of
\href{https://github.com/davidmjones/brahmic-maps}{transliterations
- for Brahmic scripts} by Davis M. Jones. After installing
+ for Brahmic scripts} by David M. Jones. After installing
them in you distribution, just set the map as you would do with
\textsf{fontspec}.
\end{note}
@@ -1980,7 +1980,7 @@ like |{\selectlanguage{..} ..}|, which was not always the most
convenient way.
\begin{note}
- |\bibitem| is out of sync with |\selectlanguage| in the \file{.aux}
+ |\bibitem| is out of sync with |\selectlanguage| in the \file{aux}
file. The reason is |\bibitem| uses |\immediate| (and others, in
fact), while |\selectlanguage| doesn't. There is a similar issue with
floats, too. There is no known workaround, but it’s not usually a
@@ -2015,7 +2015,7 @@ it is a \textit{text} command, and therefore it doesn’t change the
paragraph direction.
\begin{example}
-Here is a document putting in practice some the techniques described,
+Here is a document putting in practice some of the techniques described,
which shows how to deal neatly with complex multilingual documents
in \luatex{} and \xetex, with the help of logical markup. You are
writing a book on Indic literature with many extracts in several
@@ -2179,7 +2179,7 @@ A couple of examples:
They are activated when the language is selected (at the |afterextras|
event), and it makes some assumptions which could not be fulfilled in
some languages. Note also you should include only macros defined by
-the language, not global macros (eg, |\TeX| of |\dag|).
+the language, not global macros (e.g., |\TeX| of |\dag|).
With |ini| files (see below), captions are ensured by default.
@@ -2198,7 +2198,7 @@ language. In addtion, |\mainlocalename| contains the main language.
the user level.
\begin{warning}
- Due to a bug, which lead to some internal inconsistencies in
+ Due to a bug, which led to some internal inconsistencies in
catcodes, |\languagename| should \textit{not} be used to test which
is the current language. Rely on |\localename| or, if you still need
|\languagename| for some reason, on \textsf{iflang}, by Heiko Oberdiek.
@@ -2219,7 +2219,7 @@ basic data required for fonts, casing and a few more.
This macro is fully expandable, but raises an error if the info doesn’t
exist. \New{3.75} Sometimes, it comes in handy to be able to use
-|\localeinfo| in an quite fully expandable way even if something went
+|\localeinfo| in a quite fully expandable way even if something went
wrong (for example, the locale currently active is undefined). For
these cases, |localeinfo*| just returns an empty string instead of
raising an error.
@@ -2239,11 +2239,11 @@ The available fields are:
\item[|script.name|], as provided by the Unicode CLDR.
\item[|script.tag.bcp47|] is the BCP 47 tag of the script
used by this locale. This is a required field for the fonts to be
- correctly set up, and therefore it should be always defined.
+ correctly set up, and therefore it should always be defined.
\item[|script.tag.opentype|] is the tag used by OpenType (usually,
but not always, the same as BCP 47).
\item[|region.tag.bcp47|] is the BCP 47 tag of the region or territory.
- Defined only if the locale loaded actually contains it (eg, |es-MX|
+ Defined only if the locale loaded actually contains it (e.g., |es-MX|
does, but |es| doesn’t), which is how locales behave in the CLDR.
\New{3.75}
\item[|variant.tag.bcp47|] is the BCP 47 tag of the variant (in the BCP 47
@@ -2256,12 +2256,12 @@ The available fields are:
\New{3.75}
\end{description}
-% All of these keys can be preceded by |main.| (eg, |main.tag.ini|),
+% All of these keys can be preceded by |main.| (e.g., |main.tag.ini|),
% which retrieves the values of the main locale.
\begin{note}
Currently, |x| is used for two separate functions, namely,
- identifying a \babel{} locale without a BCP47 tag and setting an
+ identifying a \babel{} locale without a BCP 47 tag and setting an
alternative set of rules for casing.
\end{note}
@@ -2325,7 +2325,7 @@ shows the loaded |ini|’s.
\New{3.9a}
These package options are processed before language options, so
-that they are taken into account irrespective of its order. The first
+that they are taken into account irrespective of their order. The first
three options have been available in previous versions.
\Describe{KeepShorthandsActive}{}
@@ -2335,8 +2335,8 @@ file, so that they are also available in the preamble.
\Describe{headfoot=}{\meta{language}} By default, headlines and
footlines are not touched (only marks), and if they contain
language-dependent macros (which is not usual) there may be unexpected
-results. With this option you may set the language in heads and foots.
-An alternative is to set the language explicitly when heads and foots
+results. With this option you may set the language in heads and feet.
+An alternative is to set the language explicitly when heads and feet
are redefined.
\Describe{noconfigs}{} Global and language default config files are
@@ -2369,15 +2369,15 @@ can take the following values:
\itemsep=-\parskip
\item[off] deactivates this feature and no case mapping is applied;
\item[first] sets it at the first switching commands in the
- current or parent scope (typically, when the aux file is first read
+ current or parent scope (typically, when the |aux| file is first read
and at |\begin{document}|, but also the first |\selectlanguage| in
- the preamble), and it's the default if a single
- language option has been stated;\footnote{Duplicated options count
- as several ones.}
+ the preamble), and it's the default if a single language option has
+ been stated. If a language option is repeated (e.g., |malay, malay|),
+ it counts as several ones, even if there is only a language.
\item[select] sets it only at |\selectlanguage|;
\item[other] also sets it at |otherlanguage|;
\item[other*] also sets it at |otherlanguage*| as well as in heads and
- foots (if the option |headfoot| is used) and in auxiliary files (ie,
+ feet (if the option |headfoot| is used) and in auxiliary files (i.e.,
at |\select@language|), and it's the default if several language
options have been stated. The option |first| can be regarded as an
optimized version of \texttt{other*} for monolingual
@@ -2432,13 +2432,13 @@ hyphenation patterns of a single language, too.
\Describe\AfterBabelLanguage{\marg{option-name}\marg{code}}
-This command is currently the only provided by |base|. Executes
+This command is currently the only one provided by |base|. Executes
\meta{code} when the file loaded by the corresponding package option
is finished (at |\ldf@finish|). The setting is global. So
\begin{verbatim}
\AfterBabelLanguage{french}{...}
\end{verbatim}
-does ... at the end of |french.ldf|. It can be used in |ldf| files,
+does |...|\ at the end of |french.ldf|. It can be used in |ldf| files,
too, but in such a case the code is executed only if
\meta{option-name} is the same as |\CurrentOption| (which could not
be the same as the option name as set in |\usepackage|!).
@@ -2478,7 +2478,7 @@ required for a locale, covering about 300 languages and 40 scripts,
plus basic templates for about 400 locales.
|ini| files are not meant only for \babel, and they has been devised as
-a resource for other packages. To easy interoperability between \TeX{}
+a resource for other packages. To ease interoperability between \TeX{}
and other systems, they are identified with the BCP 47 codes as
preferred by the Unicode Common Locale Data Repository, which was
used as source for most of the data provided by these files, where
@@ -2522,7 +2522,7 @@ lack of suitability of some features.
\babelpatterns[lao]{1ດ 1ມ 1ອ 1ງ 1ກ 1າ} % Random
\end{verbatim}
\item[East Asia scripts] Settings for either Simplified of Traditional
- should work out of the box, with basic line breaking with any
+ (Chinese) should work out of the box, with basic line breaking with any
renderer. Although for a few words and shorts texts the |ini| files
should be fine, CJK texts are best set with a dedicated framework
(\textsf{CJK}, \textsf{luatexja}, \textsf{kotex}, \textsf{CTeX},
@@ -2534,12 +2534,12 @@ lack of suitability of some features.
\usepackage{babel}
\end{verbatim}
\item[Latin, Greek, Cyrillic] Combining chars with the default
- \luatex{} font renderer might be wrong in some cases; on the other
- hand, with the Harfbuzz renderer diacritics are stacked correctly,
- but many hyphenations points are discarded (this bug is related to
- kerning, so it depends on the font). With \xetex{} both combining
- characters and hyphenation work as expected (not quite, but in most
- cases it works; the problem here are font clusters).
+ \luatex{} font renderer might be wrong; on the other hand, with the
+ Harfbuzz renderer diacritics are stacked correctly, but many
+ hyphenations points are discarded (this bug is related to kerning,
+ so it depends on the font). With \xetex{} both combining characters
+ and hyphenation work as expected (not quite, but in most cases it
+ works; the problem here are font clusters).
\end{description}
\end{note}
@@ -2572,11 +2572,11 @@ by external sources, and therefore \babel{} will provide a set of tools
to select the locales in different situations, adapted to the
particular needs of each case. Currently, \babel{} provides autoloading
of locales as described in this section. In these contexts autoloading
-is particularly important because we may not know on beforehand which
+is particularly important because we may not know beforehand which
languages will be requested.
It must be activated explicitly, because it is primarily meant for
-special tasks. Mapping from BCP 47 codes to locale names are not
+special tasks. Mapping from BCP 47 codes to locale names is not
hardcoded in \babel. Instead the data is taken from the \texttt{ini}
files, which means currently about 350 tags are already recognized.
\Babel{} performs a simple lookup in the following way: |fr-Latn-FR| $\to$
@@ -2648,7 +2648,7 @@ Several language definition files use their own methods to set
options. For example, \textsf{french} uses |\frenchsetup|,
\textsf{magyar} (1.5) uses |\magyarOptions|; modifiers provided by
|spanish| have no attribute counterparts. Macros setting
-options are also used (eg, |\ProsodicMarksOn| in \textsf{latin}).
+options are also used (e.g., |\ProsodicMarksOn| in \textsf{latin}).
This section describes the general tools provided by the \babel{} core.
@@ -2666,8 +2666,8 @@ stylistic choice, is:
\begin{verbatim}
\setlocalecaption{english}{contents}{Table of Contents}
\end{verbatim}
-This works not only with existing caption names, because it also serves
-to define new ones by setting the \textit{caption-name} to the name of
+This works not only with existing caption names, because it also serves to
+define new ones by setting the \textit{caption-name} to the name of
your choice (|name| will be postpended). Captions so defined or
redefined behave with the ‘new way’ described in the following note.
@@ -2729,7 +2729,7 @@ The changes may be discarded with a language selector, and the original
value restored.
\end{note}
-Macros to be run when a language is selected can be add to
+Macros to be run when a language is selected can be added to
|\extras<language>|:
\begin{verbatim}
\addto\extrasrussian{\mymacro}
@@ -2763,13 +2763,13 @@ the language name, and are prefixed with a dot (only when the language
is set as package option -- neither global options nor the |main| key
accepts them). An example is (spaces are not significant and they can
be added or removed):\footnote{No predefined ``axis'' for modifiers
-are provided because languages and their scripts have quite different
+is provided because languages and their scripts have quite different
needs.}
\begin{verbatim}
\usepackage[latin_.medieval_, spanish_.notilde.lcroman_, danish]{babel}
\end{verbatim}
-Attributes (described below) are considered modifiers, ie, you can
+Attributes (described below) are considered modifiers, i.e., you can
set an attribute by including it in the list of modifiers.
\New{3.89} Alternatively, modifiers can be set with a separate option,
@@ -2810,9 +2810,9 @@ with \babel. They are the equivalent of |\DeclareUppercaseMapping|,
|\DeclareLowercaseMapping|, and |\DeclareTitlecaseMapping| (see
\textsf{usrguide.pdf}). The purpose is twofold: (1) a user-friendly way
to declare them, because often BCP 47 tags are not known (and sometimes
-can be complex); (2) if for some reason the tag changes (eg, you decide
+can be complex); (2) if for some reason the tag changes (e.g., you decide
to tag |english| as |en-001| instead of |en-US|), the new mappings will
-be still assigned to that language.
+still be assigned to that language.
\begin{example} For Classical Latin (no need to know the tag is
\texttt{la-x-classic}):
@@ -2840,7 +2840,7 @@ following. All of them assume |\usepackage[english]{babel}|.
\begin{example}
Here is how to change the hyphenation rules because there are several
- criteria, or you must follow and editorial style. The following
+ criteria, or you must follow an editorial style. The following
example just uses the default Spanish rules in English:
\begin{verbatim}
\babelprovide[hyphenrules=spanish]{english}
@@ -2858,7 +2858,7 @@ print ‘cge’. (It doesn't work with \pdftex.)
\end{example}
\begin{example}
- Currently date format they can be changed only with imported data, but
+ Currently the date format can be changed only with imported data, but
with its high level interface it’s quite straightforward:
\begin{verbatim}
\babelprovide[
@@ -2867,7 +2867,7 @@ print ‘cge’. (It doesn't work with \pdftex.)
{english}
\end{verbatim}
Here |[d]| is the day number, |[MMMM]| the month name and |[y]| the
- years. It will print something like ‘5 (October) 2024’.
+ year. It will print something like ‘5 (October) 2024’.
\end{example}
\begin{example}
@@ -2886,7 +2886,6 @@ You can define new counters freely, and assign them to |\alph|:
\babelprovide[
counters/acute = á é í ó ú, % Define a counter named `acute`
alph = acute % Assign it to \alph
- alph = acute % Assign it to \alph
]{english}
\end{verbatim}
You can choose the name, and instead of `alphabetic` it can be another one.
@@ -2903,8 +2902,8 @@ events listed below can be used as a hook name in |\AddToHook| in the
form |babel/<language-name>/<event-name>| (with |*| it’s applied to
all languages), but there is a limitation, because the parameters
passed with the \babel{} mechanism are not allowed. The |\AddToHook|
-mechanism does \textit{not} replace the current one in `babel`. Its
-main advantage is you can reconfigure `babel` even before loading it.
+mechanism does \textit{not} replace the current one in \babel. Its
+main advantage is you can reconfigure \babel\ even before loading it.
See the example below.
\Describe{\AddBabelHook}{\oarg{language}\marg{name}\marg{event}\marg{code}}
@@ -3021,10 +3020,12 @@ set |\frenchspacing| only in |bengali|:
\subsection{Manage auxiliary files}
\Describe{\BabelContentsFiles}{}
-\New{3.9a} This macro contains a list of ``toc'' types
-requiring a command to switch the language. Its default value is
-|toc,lof,lot|, but you may redefine it with |\renewcommand| (it's up
-to you to make sure no toc type is duplicated).
+\New{3.9a} This macro contains a list of ``toc'' types requiring a
+command to switch the language. Its default value is |toc,lof,lot|, but
+you may redefine it with |\renewcommand| to add further types in case
+you need or there is a package enabling additional files, e.g., for
+theorems, algorithms, notation (it's up to you to make sure no toc type
+is duplicated).
\subsection{Code based on the selector}
@@ -3052,7 +3053,7 @@ automated document generation or conversion workflows.
This \LaTeX{} hook is executed just before locale files (either
\texttt{ini} or \texttt{ldf}) are loaded. It’s in fact, similar to the
-config files, but it’s executed a little later and there is no need to
+config files, but it’s executed a little later and there is no need for
a separate file. The following command has been devised for this hook,
but other candidates are |\AfterBabelLanguage| and |\DeclareOption|
(although the latter can be somewhat dangerous).
@@ -3076,7 +3077,7 @@ with the previous hook.
\PassOptionsToLocale{transforms=punctuation.space}{french}%
\PassOptionsToLocale{mapdigits}{malayalam}}
\end{verbatim}
- If you want to take a step further and force \babel{} to use always
+ If you want to take a step further and force \babel{} to always use
|ini| files in all secondary languages, you can resort to the \LaTeX{}
mechanism to pass options to packages:
\begin{verbatim}
@@ -3107,14 +3108,14 @@ set to 2 and 3. In either case, caption, date and language system are
not defined.
If no |ini| file is imported with |import|, \m{language-name} is still
-relevant because in such a case the hyphenation and breaking rules
+relevant because in such a case the hyphenation and like breaking rules
(including those for South East Asian and CJK) are based on it as
provided in the |ini| file corresponding to that name; the same applies
to OpenType language and script.
Conveniently, some options allow to fill the language, and \babel{}
warns you about what to do if there is a missing string. Very likely
-you will find alerts like that in the |log| file:
+you will find alerts like this in the |log| file:
\begin{verbatim}
Package babel Warning: \chaptername not set for 'mylang'. Please,
(babel) define it after the language has been loaded
@@ -3171,11 +3172,11 @@ If the language has been loaded as an argument in |\documentclass| or
|\usepackage|, then |\babelprovide| redefines the requested data.
\Describe{import=}{\meta{locale-tag}} The |<language-tag>| is optional.
-Imports the full data from the |ini| file corresponding to the locale
+It imports the full data from the |ini| file corresponding to the locale
being loaded, as set in |babel-<locale>.tex| (where |<locale>| is the
last argument in |\babelprovide|), including captions and date (and
also line breaking rules in newly defined languages). Unicode engines
-load the UTF-8 variants, while 8-bit engines load the LICR (ie, with
+load the UTF-8 variants, while 8-bit engines load the LICR (i.e., with
macros like |\'| or |\ss|) ones.
However, in some cases you may want to load a different |ini| file. In
@@ -3226,7 +3227,7 @@ alternative to |justification=unhyphenated|.
(thus overriding that set when \babel\ is loaded).
\begin{example}
Let's assume your document (\luatex{} or \xetex{}) is mainly in
- Polytonic Greek with but with some sections in Italian. Then, the
+ Polytonic Greek but with some sections in Italian. Then, the
first attempt should be:
\begin{verbatim}
\usepackage[italian, greek.polutoniko]{babel}
@@ -3235,7 +3236,7 @@ alternative to |justification=unhyphenated|.
\begin{verbatim}
\usepackage[italian, polytonicgreek, provide=*]{babel}
\end{verbatim}
-Remerber there is an alternative syntax for the latter:
+Remember there is an alternative syntax for the latter:
\begin{verbatim}
\usepackage[italian]{babel}
\babelprovide[import, main]{polytonicgreek}
@@ -3246,7 +3247,7 @@ there are only a few word in this language (see~\ref{mostlymono}).
\end{example}
\Describe{script=}{\meta{script-name}}
-\New{3.15} Sets the script name to be used by \textsf{fontspec} (eg,
+\New{3.15} Sets the script name to be used by \textsf{fontspec} (e.g.,
|Devanagari|). Overrides the value in the |ini| file. If
\textsf{fontspec} does not define it, then \babel{} sets its tag to
that provided by the |ini| file. This value is particularly important
@@ -3254,7 +3255,7 @@ because it sets the writing direction, so you must use it if for some
reason the default value is wrong.
\Describe{language=}{\meta{language-name}} \New{3.15}
-Sets the language name to be used by \textsf{fontspec} (eg, |Hindi|).
+Sets the language name to be used by \textsf{fontspec} (e.g., |Hindi|).
Overrides the value in the |ini| file. If \textsf{fontspec} does not
define it, then \babel{} sets its tag to that provided by the |ini|
file. Not so important, but sometimes still relevant.
@@ -3310,7 +3311,7 @@ locale (as set with |\babelfont|). Characters can be added or modified with
|\babelcharproperty|.
\New{3.81} Option |letters| restricts the ‘actions’ to letters, in the
-\TeX{} sense (i.~e., with catcode 11). Digits and punctuation are then
+\TeX{} sense (i.e., with catcode 11). Digits and punctuation are then
considered part of current locale (as set by a selector). This option
is useful when the main script in non-Latin and there is a secondary
one whose script is Latin.
@@ -3334,7 +3335,7 @@ one whose script is Latin.
complex. Several criteria are possible, like the main language (the
default in \babel), the first letter in the paragraph, or the
surrounding letters, among others, but even so manual switching can
- be still necessary.
+ still be necessary.
\end{note}
\Describe{transforms=}{\meta{transform-list}}
@@ -3351,7 +3352,7 @@ See section~\ref{interchar}.
\end{note}
\begin{example} When creating a locale from another locale, you may want
-to reset some properties, like the BCP-47 tags. Here is an example of
+to reset some properties, like the BCP 47 tags. Here is an example of
how to do it:
\begin{verbatim}
\babelprovide{spanish} % import=es by default
@@ -3380,7 +3381,7 @@ explained in the next section.
\marg{exceptions}}
\New{3.9a} Sets hyphenation exceptions for the languages given
-or, without the optional argument, for \textit{all} languages (eg,
+or, without the optional argument, for \textit{all} languages (e.g.,
proper nouns or common loan words, and of course monolingual
documents). Multiple declarations work much like |\hyphenation| (last
wins), but language exceptions take precedence over global ones.
@@ -3394,7 +3395,7 @@ encoding (not set in the preamble by default). For example:
\end{verbatim}
Listed words are saved expanded and therefore it relies on the
-LICR. Of course, it also works without the LICR if the input and the
+LICR\@. Of course, it also works without the LICR if the input and the
font encodings are the same, like in Unicode based engines.
\begin{note}
@@ -3437,7 +3438,7 @@ encoding (not set in the preamble by default). Multiple
|\babelpatterns|'s are allowed.
Listed patterns are saved expanded and therefore it relies on the
-LICR. Of course, it also works without the LICR if the input and the
+LICR\@. Of course, it also works without the LICR if the input and the
font encodings are the same, like in Unicode based engines.
\New{3.31} (Only \luatex.) With |\babelprovide| and |import|ed CJK
@@ -3447,8 +3448,8 @@ disabled in verbatim mode, or more precisely when the hyphenrules
are set to |nohyphenation|). It can be activated alternatively by
setting explicitly the |intraspace|.
-\New{3.27} Interword spacing for Thai, Lao and Khemer is activated
-automatically if a language with one of those scripts are loaded with
+\New{3.27} Interword spacing for Thai, Lao and Khmer is activated
+automatically if a language with one of those scripts is loaded with
|\babelprovide|. See the sample on the \babel{} repository. With both
Unicode engines, spacing is based on the ``current'' em unit (the size
of the previous char in \luatex, and the font size set by the last
@@ -3456,7 +3457,7 @@ of the previous char in \luatex, and the font size set by the last
\begin{note}
With Unicode engines, a line break can happen just before an explicit
- combining char (eg, \textit{\~{g}}, used in Guarani and Filipino, is
+ combining char (e.g., \textit{\~{g}}, used in Guarani and Filipino, is
not included as a combined char and it’s represented in Unicode as
|U+0067|~|U+0303|. This issue is not directly related to \babel, but
to the hyphenation patterns and/or the font renderer. However, at
@@ -3474,7 +3475,7 @@ alternative to a transform is |\babelpatterns|.
\optstar\texttt{[}\langlist\texttt{]}%
\marg{left}\marg{right}\oarg{hyphenationmin}}
-\New{24.10} See the news page for the rationale for this commands. It
+\New{24.10} See the news page for the rationale for this command. It
sets the corresponding values for the given languages (all languages
without the optional argument). With the star, the values are also
applied immediately (the optional argument and the star are currently
@@ -3485,7 +3486,7 @@ number of hyphens in all languages:
\begin{verbatim}
\babelhyphenmins{3}{4}
\end{verbatim}
-But there are also some 3-column text and you want to be more flexible:
+But there is also some 3-column text and you want to be more flexible:
\begin{verbatim}
\begin{multicols}{3}
\babelhyphenmins*{2}{3}
@@ -3512,7 +3513,7 @@ in the word. This is the desired behavior very often, but not always,
and therefore many languages provide shorthands for these
cases. Unfortunately, this has not been done consistently: for
example, \verb|"-| in Dutch, Portuguese, Catalan or Danish is a hard
-hyphen, while in German, Spanish, Norwegian, Slovak or Russian is a
+hyphen, while in German, Spanish, Norwegian, Slovak or Russian it is a
soft hyphen. Furthermore, some of them even redefine |\-|, so that you
cannot insert a soft hyphen without breaking opportunities in the rest
of the word.
@@ -3538,14 +3539,14 @@ you don't want to enable it, there is a starred counterpart:
|\babelhyphen*{soft}| (which in most cases is equivalent to the
original |\-|), |\babelhyphen*{hard}|, etc.
-Note |hard| is also good for isolated prefixes (eg, \textit{anti-})
-and |nobreak| for isolated suffixes (eg, \textit{-ism}), but in both
+Note |hard| is also good for isolated prefixes (e.g., \textit{anti-})
+and |nobreak| for isolated suffixes (e.g., \textit{-ism}), but in both
cases |\babelhyphen*{nobreak}| is usually better.
There are also some differences with \LaTeX: (1) the character used is
that set for the current font, while in \LaTeX{} it is hardwired to
|-| (a typical value); (2) the hyphen to be used in fonts with a
-negative |\hyphenchar| is |-|, like in \LaTeX, but it can be changed to
+negative |\hyphenchar| is |-|, as in \LaTeX, but it can be changed to
another value by redefining |\babelnullhyphen|; (3) a break after the
hyphen is forbidden if preceded by a glue ${>}0$~pt (at the beginning
of a word, provided it is not immediately preceded by, say, a
@@ -3563,7 +3564,7 @@ loading \file{zerohyph.tex}. It deactivates language shorthands, too
Except for these simple uses, |hyphenrules| is deprecated and
|otherlanguage*| (the starred version) is preferred, because the former
does not take into account possible changes in encodings of characters
-like, say, |'| done by some languages (eg, \textsf{italian},
+like, say, |'| done by some languages (e.g., \textsf{italian},
\textsf{french}, \textsf{ukrainian}).
\begin{note}
@@ -3594,7 +3595,7 @@ allows breaks only at spaces, which can be stretched to arbitrary
amounts. Although for European standards the result may look odd, in
some writing systems, like Malayalam and other Indic scripts, this has
been the customary (although not always the desired) practice. Because
-of that, no locale sets currently this mode by default (Amharic is an
+of that, no locale enables currently this mode by default (Amharic is an
exception). Unlike |\sloppy|, the |\hfuzz| and the |\vfuzz| are not
changed, because this line breaking mode is not really ‘sloppy’ (in
other words, overfull boxes are reported as usual).
@@ -3646,7 +3647,7 @@ some kinds of text can still require characters not directly available
on the keyboards (and sometimes not even as separated or precomposed
Unicode characters). As to the point 2, now \textsf{pdfTeX} provides
|\knbccode|, and \luatex{} can manipulate the glyph list. Tools for
-point 3 can be still very useful in general.
+point 3 can still be very useful in general.
There are four levels of shorthands: \textit{user}, \textit{language},
\textit{system}, and \textit{language user} (by order of precedence).
@@ -3656,12 +3657,12 @@ In most cases, you will use only shorthands provided by languages.
\begin{enumerate}
\item Activated chars used for two-char shorthands cannot be followed
by a closing brace |}| and the spaces following are gobbled. With
- one-char shorthands (eg,~|:|), they are preserved.
+ one-char shorthands (e.g.,~|:|), they are preserved.
\item If on a certain level (system, language, user, language user)
there is a one-char shorthand, two-char ones starting with that char
and on the same level are ignored.
\item Since they are active, a shorthand cannot contain the same
- character in its definition (except if deactivated with, eg,
+ character in its definition (except if deactivated with, e.g.,
|\string|).
\end{enumerate}
\end{note}
@@ -3674,7 +3675,7 @@ A typical error when using shorthands is the following:
! Argument of \language@active@arg" has an extra }.
\end{verbatim}
It means there is a closing brace just after a shorthand, which is not
-allowed (eg,~|"}|). Just add |{}| after (eg,~|"{}}|).
+allowed (e.g.,~|"}|). Just add |{}| after (e.g.,~|"{}}|).
\end{troubleshooting}
\Describe{\shorthandon}{\marg{shorthands-list}}
@@ -3687,7 +3688,7 @@ list of characters as their arguments.
The command |\shorthandoff| sets the |\catcode| for each of the
characters in its argument to other (12); the command |\shorthandon|
-sets the |\catcode| to active (13). Both commands only work on `known'
+sets the |\catcode| to active (13). Both commands work on only `known'
shorthand characters, and an error will be raised otherwise. You can
check if a character is a shorthand with |\ifbabelshorthand| (see
below).
@@ -3709,8 +3710,8 @@ your own, you may want to switch them off with the package option
|shorthands=off|, as described below.
\begin{warning}
- It is worth emphasizing these macros are meant for temporary changes.
- Whenever possible shorthands must be always enabled or disabled.
+ It is worth emphasizing that these macros are meant for temporary changes.
+ Whenever possible, shorthands must be always enabled or disabled.
\end{warning}
\Describe{\useshorthands}{\optstar\marg{char}}
@@ -3746,7 +3747,7 @@ shorthands. Language-dependent user shorthands take precedence over
``normal'' user shorthands.
\begin{example}
- Let's assume you want a unified set of shorthand for discretionaries
+ Let's assume you want a unified set of shorthands for discretionaries
(languages do not define shorthands consistently, and |"-|, |\-|,
|"=| have different meanings). You can start with, say:
\begin{verbatim}
@@ -3761,10 +3762,11 @@ shorthands. Language-dependent user shorthands take precedence over
\begin{verbatim}
\defineshorthand[*polish,*portuguese]{"-}{\babelhyphen{repeat}}
\end{verbatim}
- Here, options with |*| set a language-dependent user shorthand,
- which means the generic one above only applies for the rest of
- languages; without |*| they would (re)define the language shorthands
- instead, which are overridden by user ones.
+ Here, options with |*| set a language-dependent user shorthand, which
+ means the generic declarations above for |"-| apply to all languages
+ \textit{except} |polish| and |portuguese|; without |*| they would
+ (re)define the language shorthands instead, which are overridden by
+ user ones.
Now, you have a single unified shorthand (|"-|), with a
content-based meaning (`compound word hyphen') whose visual behavior
@@ -3791,7 +3793,7 @@ with, for example, |\useshorthands| or |\useshorthands*|.)
\begin{example}
Very often, this is a more convenient way to deactivate shorthands
than |\shorthandoff|, for example if you want to define a macro
- to easy typing phonetic characters with \textsf{tipa}:
+ to ease typing phonetic characters with \textsf{tipa}:
\begin{verbatim}
\newcommand{\myipa}[1]{{_\languageshorthands{none}_\tipaencoding#1}}
\end{verbatim}
@@ -3800,7 +3802,7 @@ with, for example, |\useshorthands| or |\useshorthands*|.)
\Describe{\babelshorthand}{\marg{shorthand}}
With this command you can use a shorthand even if (1) not activated in
\texttt{shorthands} (in this case only shorthands for the current
-language are taken into account, ie, not user shorthands), (2) turned
+language are taken into account, i.e., not user shorthands), (2) turned
off with |\shorthandoff| or (3) deactivated with the internal
|\bbl@deactivate|; for example, \verb|\babelshorthand{"u}| or
\verb|\babelshorthand{:}|. (You can conveniently define your own
@@ -3818,7 +3820,7 @@ macros, or even your own user shorthands provided they do not overlap.)
\bigskip
For your records, here is a list of shorthands, but you must double
-check them, as they may change:\footnote{Thanks to Enrico Gregorio}
+check them, as they may change:\footnote{Thanks to Enrico Gregorio.}
\begin{description}
\itemsep=-\parskip
@@ -3874,7 +3876,7 @@ compatibility.
\end{note}
\begin{note}
-Using a character mathematically active (ie, with math code |"8000|) as
+Using a character mathematically active (i.e., with math code |"8000|) as
a shorthand can make \TeX{} enter in an infinite loop in some rare
cases. (There is a partial solution.)
\end{note}
@@ -3890,7 +3892,7 @@ respectively, as a shorthand in case it is not done by default.
\Describe{shorthands=}{\meta{char}\meta{char}...
$\string|$ \texttt{off}}
The only language shorthands activated
-are those given, like, eg:
+are those given, like, e.g.:
\begin{verbatim}
\usepackage[esperanto,french,_shorthands=:;!?_]{babel}
\end{verbatim}
@@ -3902,7 +3904,7 @@ therefore they will not be recognized); however, |t| is provided for
the common case of |~| (as well as |c| for not so common case of the
comma).
-With |shorthands=off| no language shorthands are defined,
+With |shorthands=off| no language shorthands are defined.
As some languages use this mechanism for tools not available
otherwise, a macro \verb|\babelshorthand| is defined, which allows
using them; see above.
@@ -3916,8 +3918,8 @@ and |\pageref| are redefined (as well as a few macros from
With |safe=none| no macro is redefined. This option is strongly
recommended, because a good deal of incompatibilities and errors are
-related to these redefinitions. As of \New{3.34}, in $\epsilon$\TeX{}
-based engines (ie, almost every engine except the oldest ones)
+related to these redefinitions. As of \New{3.34}, in $\varepsilon$-\TeX{}
+based engines (i.e., almost every engine except the oldest ones)
shorthands can be used in these macros (formerly you could not).
\Describe{math=}{\texttt{active} $\string|$ \texttt{normal}}
@@ -4002,8 +4004,8 @@ Vai
\New{3.30} With \luatex{} there is an alternative approach for mapping
digits, namely, |mapdigits|. Conversion is based on the language and it
-is applied to the typeset text (not math, PDF bookmarks, etc.) before
-bidi and fonts are processed (ie, to the node list as generated by the
+is applied to the typeset text (not math, PDF bookmarks, etc.)\ before
+bidi and fonts are processed (i.e., to the node list as generated by the
\TeX{} code). This means the local digits have the correct
bidirectional behavior (unlike |Numbers=Arabic| in \textsf{fontspec},
which is deprecated). Another option is the transform |digits.native|.
@@ -4016,9 +4018,9 @@ which is deprecated). Another option is the transform |digits.native|.
\Describe{\localenumeral}{\marg{style}\marg{number}}
\DescribeOther{\localecounter}{\marg{style}\marg{counter}}
-\New{3.41} Many `ini` locale files provide information
+\New{3.41} Many |ini| locale files provide information
about non-positional numerical systems, based on those predefined in
-CSS. They only work with \luatex{} and \xetex{} and are fully
+CSS\@. They only work with \luatex{} and \xetex{} and are fully
expandable (even inside an unprotected |\edef|). Currently, they are
limited to numbers below 10000.
@@ -4123,8 +4125,8 @@ strings for other calendars: |am| (|ethiopic|), |ar| and
|ar-|* (|islamic|), |cop| (|coptic|), |fa| (|islamic|, |persian|), |he|
(|hebrew|), |hi| (|indian|), |th| (|buddhist|).
In the latter case, the three arguments are the year, the month, and
-the day in those in the corresponding calendar. They are \textit{not}
-the Gregorian data to be converted (which means, say, 13 is a valid
+the day for those in the corresponding calendar. They are \textit{not}
+the Gregorian date to be converted (which means, say, 13 is a valid
month number with |calendar=hebrew| and |calendar=coptic|). However,
with the option |convert| it’s converted (using internally the
following command).
@@ -4247,7 +4249,7 @@ devised by Yannis Haralambous for \textsf{dad} (simple and
\textit{dž}, \textit{LJ}, \textit{Lj}, \textit{lj}, \textit{NJ},
\textit{Nj}, \textit{nj}. It assumes they exist. This is not the
recommended way to make these transformations (the best way is with
-OTF features), but it can get you out of a hurry.}
+OTF features), but it can get you out in a hurry.}
\trans{Croatian, Czech, Polish, Portuguese, Slovak,
Spanish}{hyphen.repeat}{Explicit hyphens behave like
@@ -4257,7 +4259,7 @@ Spanish}{hyphen.repeat}{Explicit hyphens behave like
a non-syllabic preposition or conjunction into a non-breaking space.}
\trans{Finnish}{prehyphen.nobreak}{Line breaks just after hyphens
-prepended to words are prevented, like in “pakastekaapit ja -arkut”.}
+prepended to words are prevented, as in “pakastekaapit ja -arkut”.}
\trans{French}{punctuation.space}{Rules for proper spacing with
characters \textit{;:!?«»} are applied.}
@@ -4273,7 +4275,7 @@ alternative to |=|. |'| is tonos in Monotonic Greek, but oxia in
Polytonic and Ancient Greek.}
\trans{Greek}{sigma.final}{The transliteration system above does not
-convert the sigma at the end of a word (on purpose). This transforms
+convert the sigma at the end of a word (on purpose). This transform
does it. To prevent the conversion (an abbreviation, for example), write
|"s|.}
@@ -4315,7 +4317,7 @@ standard system devised by Ljudevit Gaj.}
\trans{Arabic, Persian}{kashida.plain}{Experimental. A very simple and
basic transform for ‘plain’ Arabic fonts, which attempts to distribute
-the tatwil as evenly as possible (starting at the end of the line). See
+the tatweel as evenly as possible (starting at the end of the line). See
the news for version 3.59.}
\trans{Arabic, Persian}{kashida.base}{Experimental \New{3.94}. Much
@@ -4374,18 +4376,18 @@ like |sf/m/it sf/b/it|.
Transforms set for specific fonts (at least once in any language) are
always reset with a font selector.
-In |\babelprovide|, transform labels can be tagged before its name,
+In |\babelprovide|, transform labels can be tagged before their name,
with a list separated with colons, like:
\begin{verbatim}
transforms = _rm:sf:_transform.name
\end{verbatim}
-\New{3.67} With the optional argument you can associate a user defined
+\New{3.67} With the optional argument you can associate a user-defined
transform to an attribute, so that it’s active only when it’s set
(currently its attribute value is ignored). With this mechanism
transforms can be set or unset even in the middle of paragraphs, and
applied to single words. To define, set and unset the attribute, the
-LaTeX kernel provides the macros |\newattribute|, |\setattribute| and
+\LaTeX{} kernel provides the macros |\newattribute|, |\setattribute| and
|\unsetattribute|. The following example shows how to use it, provided
an attribute named |\latinnoj| has been declared:
\begin{verbatim}
@@ -4478,9 +4480,9 @@ inter-character rules (aka ‘interchar’).
Declares a new character class, which is assigned to the characters in
\marg{char-list}, entered either as characters or in macro form
-(eg,~|\}|). If you need to enter them by their numeric value, use the
-\TeX{} |^|-notation (eg,~|^^^^1fa0|). Ranges are allowed, with a
-hyphen (eg,~|.,;a-zA-Z|). If you need the hyphen to be assigned a
+(e.g.,~|\}|). If you need to enter them by their numeric value, use the
+\TeX{} |^|-notation (e.g.,~|^^^^1fa0|). Ranges are allowed, with a
+hyphen (e.g.,~|.,;a-zA-Z|). If you need the hyphen to be assigned a
class, write it at the very beginning of the list.
There are several predefined ‘global’ classes, namely |default|,
@@ -4574,7 +4576,7 @@ characters \textit{;:!?«»} are applied.}
Currently \babel{} provides no standard interface to select
scripts, because they are best selected with either |\fontencoding|
(low-level) or a language name (high-level). Even the Latin script may
-require different encodings (ie, sets of glyphs) depending on the
+require different encodings (i.e., sets of glyphs) depending on the
language, and therefore such a switch would be in a sense
incomplete.\footnote{The so-called Unicode fonts do not improve the
situation either. So, a font suited for Vietnamese is not necessarily
@@ -4582,7 +4584,7 @@ suited for, say, the romanization of Indic languages, and the fact it
contains glyphs for Modern Greek does not mean it includes them for
Classic Greek.}
-Some languages sharing the same script define macros to switch it (eg,
+Some languages sharing the same script define macros to switch it (e.g.,
|\textcyrillic|), but be aware they may also set the language to a
certain default. Even the \babel{} core defined |\textlatin|, but is
was somewhat buggy because in some cases it messed up encodings and
@@ -4676,7 +4678,7 @@ No macros to select the writing direction are provided, either --
writing direction is intrinsic to each script and therefore it is best
set by the language (which can be a dummy one). Furthermore, there
are in fact two right-to-left modes, depending on the language, which
-differ in the way `weak' numeric characters are ordered (eg, Arabic
+differ in the way `weak' numeric characters are ordered (e.g., Arabic
\%123 \textit{vs} Hebrew 123\%).
\begin{warning}
@@ -4693,7 +4695,7 @@ differ in the way `weak' numeric characters are ordered (eg, Arabic
|gathered| may fail).
An effort is being made to avoid incompatibilities in the future
- (this one of the reason currently bidi must be explicitly requested
+ (this one of the reasons currently bidi must be explicitly requested
as a package option, with a certain bidi model, and also the |layout|
options described below).
\end{warning}
@@ -4716,14 +4718,14 @@ There are some package options controlling bidi writing.
With |default| the bidi mechanism is just activated (by default it is
not), but every change must be marked up. In \pdftex{} this is the only
-option. If the RL text only consists of letters and punctuation, it
+option. If the RL text consists of only letters and punctuation, it
will be fine in most cases, but numbers, for example, will be rendered
in the wrong order.
In \luatex, the preferred method is |basic|, which supports both L and
R text. |basic-r| was a first attempt to create a bidi algorithm and
provides a simple and fast method for R text in some typical cases.
-(They are named \texttt{basic} mainly because they only consider the
+(They are named \texttt{basic} mainly because they consider only the
intrinsic direction of scripts and weak directionality.)
In \xetex, |bidi-r| and |bidi-l| resort to the package \textsf{bidi}
@@ -4776,7 +4778,7 @@ See particularly |lua-bidibasic.tex| and |lua-secenum.tex|.
\begin{example}
With |bidi=basic| \textit{both} L and R text can be
- mixed without explicit markup (the latter will be only necessary in
+ mixed without explicit markup (the latter will be necessary only in
some special cases where the Unicode algorithm fails). It is used much
like |bidi=basic-r|, but with R text inside L text you may want to map
the font so that the correct features are in force. This is accomplished
@@ -4861,7 +4863,7 @@ options are required by all engines.
below |\BabelPatchSection| for further details).
\item[counters] required in all engines (except \luatex{} with
- |bidi=basic|) to reorder section numbers and the like (eg,
+ |bidi=basic|) to reorder section numbers and the like (e.g.,
\m{subsection}.\m{section}); required in \xetex{} and \pdftex{} for
counters in general, as well as in \luatex{} with |bidi=default|;
required in \luatex{} for numeric footnote marks $>$9 with
@@ -4917,7 +4919,7 @@ bidirectional (with both R and L paragraphs) documents in \luatex{}.
packages and classes (or even raise an error). \New{3.18}.
\item[graphics] modifies the |picture| environment so that the whole
-figure is L but the text is R. It \textit{does not} work with the
+figure is L but the text is R\@. It \textit{does not} work with the
standard |picture|, and \textit{pict2e} is required. It attempts to do
the same for \textsf{pgf/tikz}. Somewhat experimental. \New{3.32}.
@@ -4970,7 +4972,7 @@ RTL A \foreignlanguage{english}{ltr text \thechapter{} and still ltr} RTL B
\New{3.86} \textit{LuaTeX}. This command resets the internal text,
paragraph and body directions to those of the current locale (if
-different). Sometimes changing directly these values can be useful for
+different). Sometimes changing these values directly can be useful for
some hacks, and this command helps in restoring the directions to the
correct ones. It can be used in |>| arguments of \textsf{array}, too.
@@ -5022,7 +5024,7 @@ command is available always in bidi documents, even without
\BabelFootnote{\enfootnote}{english}{}{.}
\end{verbatim}
It adds a period outside the English part, so that it is placed
- at the left in the last line. This means the dot the end of the
+ at the left in the last line. This means the dot at the end of the
footnote text should be omitted.
\end{example}
@@ -5030,7 +5032,7 @@ command is available always in bidi documents, even without
\New{3.32} Part of the \babel{} job is to apply Unicode rules to some
script-specific features based on some properties. Currently, they are
-3, namely, direction (ie, bidi class), mirroring glyphs, and line
+3, namely, direction (i.e., bidi class), mirroring glyphs, and line
breaking for CJK scripts. These properties are stored in \textsf{lua}
tables, which you can modify with the following macro (for example,
to set them for glyphs in the PUA).
@@ -5089,7 +5091,7 @@ The first four are documented elsewhere. The following are by default
preamble) changes for math or \textsf{amsmath}, |linebreak.sea|,
|linebreak.cjk| and |justify.arabic| the corresponding algorithms,
|layout.tabular| and |layout.lists| changes for tabular and lists.
-Some of the are reverted only to some extent.
+Some of them are reverted only to some extent.
Other keys are:
\begin{multicols}{3}
@@ -5132,7 +5134,7 @@ There are compatibility issues with the following packages.
\trans{polyglossia}{This package is not compatible at all with \babel.
They should never be used together, because macros are different, and
-even those with the same name doesn’t behave in the same way. Also,
+even those with the same name don’t behave in the same way. Also,
languages are organized quite differently (\babel{} treats all locales
on an equal footing).}
@@ -5140,7 +5142,7 @@ on an equal footing).}
usually solved with \texttt{\string\usetikzlibrary\{babel\}}.}
\trans{cleveref}{Because of a long standing bug in this package, some
-languages can raise and error (particularly |spanish| and |greek|).}
+languages can raise an error (particularly |spanish| and |greek|).}
\trans{natbib}{Load it before \babel.}
@@ -5210,9 +5212,9 @@ details.
\section{Loading language hyphenation rules with \file{language.dat}}
-\TeX{} and most engines based on it (pdf\TeX, \xetex, $\epsilon$-\TeX,
+\TeX{} and most engines based on it (pdf\TeX, \xetex, $\varepsilon$-\TeX,
the main exception being \luatex) require hyphenation patterns to be
-preloaded when a format is created (eg, \LaTeX, Xe\LaTeX, pdf\LaTeX).
+preloaded when a format is created (e.g., \LaTeX, Xe\LaTeX, pdf\LaTeX).
\babel{} provides a tool which has become standard in many
distributions and based on a ``configuration file'' named
\file{language.dat}. The exact way this file is used depends on the
@@ -5251,7 +5253,7 @@ dutch hyphen.dutch exceptions.dutch % Nederlands
german hyphen.ger
\end{verbatim}
-You may also set the font encoding the patterns are intended for by
+You may also set the font encoding that the patterns are intended for by
following the language name by a colon and the encoding code. For
example:
\begin{verbatim}
@@ -5268,7 +5270,7 @@ definition files}
The \textit{language definition files} (ldf) must conform to a
number of conventions, because these files have to fill in the gaps
-left by the common code in \file{babel.def}, i.\,e., the
+left by the common code in \file{babel.def}, i.e., the
definitions of the macros that produce texts. Also the
language-switching possibility which has been built into the
\babel{} system has its implications.
@@ -5301,7 +5303,7 @@ The following assumptions are made:
selected, \babel{} will attempt setting it after lowercasing its
name.
\item The semantics of modifiers is not defined (on purpose). In most
- cases, they will just be simple separated options (eg,
+ cases, they will just be simple separated options (e.g.,
\texttt{spanish}), but a language might require, say, a set of
options organized as a tree with suboptions (in such a case, the
recommended separator is \verb|/|). How modifiers (saved in
@@ -5313,13 +5315,13 @@ Some recommendations:
\begin{itemize}
\item The preferred shorthand is |"|, which is not used in \LaTeX{}
(quotes are entered as |``| and |''|). Other good choices are
- characters which are not used in a certain context (eg, |=| in an
+ characters which are not used in a certain context (e.g., |=| in an
ancient language). Note however |=|, \texttt{<}, |>|, |:| and the like
can be dangerous, because they may be used as part of the syntax
of some elements (numeric expressions, key/value pairs, etc.).
\item Captions should not contain shorthands or encoding-dependent
commands (the latter is not always possible, but should be clearly
- documented). They should be defined using the LICR. You may
+ documented). They should be defined using the LICR\@. You may
also use the new tools for encoded strings, described below.
\item Avoid adding things to |\noextras<language>| except for umlauthigh
and friends, |\bbl@deactivate|, |\bbl@(non)frenchspacing|, and
@@ -5347,7 +5349,7 @@ strongly recommended.
Currently, the easiest way to contribute a new language is by taking
one of the 500 or so |ini| templates available on GitHub as a basis.
Just make a pull request or download it, and then, after filling out the
-fields, sent it to me. Feel free to ask for help or to make features
+fields, sent it to me. Feel free to ask for help or to make feature
requests.
As to \texttt{ldf} files, now language files are “outsourced” and are
@@ -5470,16 +5472,16 @@ of the \LaTeX\ command |\ProvidesPackage|.
The macro |\LdfInit| performs a couple of standard checks that
must be made at the beginning of a language definition file,
such as checking the category code of the @-sign, preventing
-the \file{.ldf} file from being processed twice, etc.
+the \file{ldf} file from being processed twice, etc.
\DescribeMacro{\ldf@quit}
-The macro |\ldf@quit| does work needed if a \file{.ldf} file was
+The macro |\ldf@quit| does work needed if an \file{ldf} file was
processed earlier. This includes resetting the category code of the
@-sign, preparing the language to be activated at |\begin{document}|
time, and ending the input stream.
\DescribeMacro{\ldf@finish}
-The macro |\ldf@finish| does work needed at the end of each \file{.ldf}
+The macro |\ldf@finish| does work needed at the end of each \file{ldf}
file. This includes resetting the category code of the @-sign, loading
a local configuration file, and preparing the language to be activated
at |\begin{document}| time.
@@ -5583,7 +5585,7 @@ to its former (mostly) non-active self.
Used to define the various
shorthands. It takes three arguments: the name for the collection of
shorthands this definition belongs to; the character (sequence) that
-makes up the shorthand, i.e.\ |~| or |"a|; and the code to be executed
+makes up the shorthand, i.e., |~| or |"a|; and the code to be executed
when the shorthand is encountered. (It does \textit{not} raise an
error if the shorthand character has not been ``initiated''.)
@@ -5607,7 +5609,7 @@ authors. See the description below.
Language definition files may want to \emph{re}define macros that
already exist. Therefore a mechanism for saving (and restoring) the
original definition of those macros is provided. We provide two macros
-for this\footnote{This mechanism was introduced by Bernd Raichle.}.
+for this.\footnote{This mechanism was introduced by Bernd Raichle.}
\DescribeMacro{\babel@save}
To save the current meaning of any control sequence, the macro
@@ -5630,7 +5632,7 @@ sequence or the previous value of the variable.
\DescribeMacro{\addto}
The macro |\addto{|\meta{control sequence}|}{|\meta{\TeX\ code}|}| can
be used to extend the definition of a macro. The macro need not be
-defined (ie, it can be undefined or |\relax|). This macro can, for
+defined (i.e., it can be undefined or |\relax|). This macro can, for
instance, be used in adding instructions to a macro like
|\extrasenglish|.
@@ -5678,7 +5680,7 @@ Those commands can be
used to properly switch French spacing on and off.
\begin{note}
- With |lfd| files, \babel does not take into account |\normalsfcodes|
+ With |ldf| files, \babel{} does not take into account |\normalsfcodes|
and (non-)French spacing is not always properly (un)set by languages
However, problems are unlikely to happen and therefore this part
remains untouched. With |ini| files, this issue has been addressed.
@@ -5691,16 +5693,16 @@ used to properly switch French spacing on and off.
encodings, intended mainly for \luatex{} and \xetex, although the old
way of defining/switching strings still works and it's used by default.
-It consist is a series of blocks started with
+It consists in a series of blocks started with
|\StartBabelCommands|. The last block is closed with
-|\EndBabelCommands|. Each block is a single group (ie, local
+|\EndBabelCommands|. Each block is a single group (i.e., local
declarations apply until the next |\StartBabelCommands| or
|\EndBabelCommands|). An |ldf| may contain several series of this
kind.
Thanks to this new feature, string values and string language switching
-are not mixed any more. Furthermore, strings do no need to be wrapped
-with formatting commands (eg, to select the writing direction)
+are not mixed any more. Furthermore, strings do not need to be wrapped
+with formatting commands (e.g., to select the writing direction)
because \babel{} takes care of it automatically. (See also
|\setlocalecaption|.)
@@ -5713,20 +5715,20 @@ intended for. A block is taken into account only if the
|\BabelLanguages| to a comma-separated list of languages to be
defined (if undefined, |\StartBabelCommands| sets it to
|\CurrentOption|). You may write |\CurrentOption| as the language,
-but this is discouraged -- a explicit name (or names) is much better
+but this is discouraged -- an explicit name (or names) is much better
and clearer.
-A ``selector'' selects a group of definition are to be used, optionally
+A ``selector'' selects a group of definition that are to be used, optionally
followed by extra info about the encodings to be used. The name
|unicode| must be used for \luatex{} and \xetex{}. Without a selector,
-the LICR representation (ie, with macros like |\~{n}| instead of |ñ|)
+the LICR representation (i.e., with macros like |\~{n}| instead of |ñ|)
is assumed.
If a string is set several times (because several blocks are read),
-the first one takes precedence (ie, it works much like
+the first one takes precedence (i.e., it works much like
|\providecommand|).
-Encoding info is |charset=| followed by a charset, which if given sets
+Encoding info is |charset=| followed by a charset, which, if given, sets
how the strings should be translated to the internal representation
used by the engine, typically |utf8|, which is the only value
supported currently (default is no translations). Note |charset| is
@@ -5806,7 +5808,7 @@ are overridden, which means the old way to define strings still works
and used by default (to be precise, is first set to undefined and then
strings are added). However, when used in the preamble or in a
package, new settings are added to the previous ones, if the language
-exists (in the \babel{} sense, ie, if |\date<language>| exists).
+exists (in the \babel{} sense, i.e., if |\date<language>| exists).
\begin{note}
The package option |strings| introduced in version 3.9 (around 2013)
@@ -5842,7 +5844,7 @@ transformation corresponding to the current charset or defined with
the hook |stringprocess|).
Use this command to define strings, without including any ``logic'' if
-possible, which should be a separated macro. See the example above for
+possible, which should be a separate macro. See the example above for
the date.
\Describe{\SetStringLoop}{\marg{macro-name}\marg{string-list}}
@@ -5903,6 +5905,8 @@ Spit helped find and repair bugs.
More recently, there are significant contributions by Salim Bou, Ulrike
Fischer, Loren Davis and Udi Fogiel.
+Barbara Beeton has helped in improving the manual.
+
There are also many contributors for specific languages, which are
mentioned in the respective files. Without them, \babel{} just
wouldn’t exist.
@@ -5912,7 +5916,7 @@ wouldn’t exist.
Saqi, 2001.
\bibitem{BEP} Johannes Braams, Victor Eijkhout and Nico Poppelier,
\emph{The development of national \LaTeX\ styles},
- \emph{TUGboat} 10 (1989) \#3, p.~401--406.
+ \emph{TUGboat} 10 (1989) \#3, pp.~401--406.
\bibitem{FE} Yannis Haralambous,
\emph{Fonts \& Encodings}, O'Reilly, 2007.
\bibitem{DEK} Donald E. Knuth,
@@ -5931,14 +5935,14 @@ wouldn’t exist.
Cambridge University Press, 2018
\bibitem{HP} Hubert Partl,
\emph{German \TeX},
- \emph{TUGboat} 9 (1988) \#1, p.~70--72.
+ \emph{TUGboat} 9 (1988) \#1, pp.~70--72.
\bibitem{ilatex} Joachim Schrod,
\emph{International \LaTeX\ is ready to use},
- \emph{TUGboat} 11 (1990) \#1, p.~87--90.
+ \emph{TUGboat} 11 (1990) \#1, pp.~87--90.
\bibitem{STS} Apostolos Syropoulos, Antonis Tsolomitis and Nick
Sofroniu,
\emph{Digital typography using \LaTeX},
- Springer, 2002, p.~301--373.
+ Springer, 2002, pp.~301--373.
\bibitem{treebus} K.F. Treebus.
\emph{Tekstwijzer, een gids voor het grafisch verwerken van
tekst},
@@ -5985,7 +5989,7 @@ wouldn’t exist.
% a series of lines between
% $\langle\langle$|*|\textit{name}$\rangle\rangle$ and
% $\langle\langle$|/|\textit{name}$\rangle\rangle$. The latter is
-% cumulative (eg, with \textit{More package options}). That brings a
+% cumulative (e.g., with \textit{More package options}). That brings a
% little bit of literate programming. The guards \texttt{<-name>} and
% \texttt{<+name>} have been redefined, too. See |babel.ins| for further
% details.
@@ -5997,7 +6001,7 @@ wouldn’t exist.
% separate |zip| file, not packed as |dtx|. Many of them are
% essentially finished (except bugs and mistakes, of course). Some of
% them are still incomplete (but they will be usable), and there are
-% some omissions (eg, there are no geographic areas in Spanish). Not
+% some omissions (e.g., there are no geographic areas in Spanish). Not
% all include LICR variants.
%
% |babel-*.ini| files contain the actual data; |babel-*.tex| files are
@@ -6009,8 +6013,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=24.14>>
-%<<date=2024/11/30>>
+%<<version=24.15>>
+%<<date=2024/12/21>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6130,7 +6134,7 @@ wouldn’t exist.
%
% \macro{\bbl@ifunset}
% To check if a macro is defined, we create a new macro, which does the
-% same as |\@ifundefined|. However, in an $\epsilon$-tex engine, it is
+% same as |\@ifundefined|. However, in an $\varepsilon$-tex engine, it is
% based on |\ifcsname|, which is more efficient, and does not waste
% memory. Defined inside a group, to avoid \cs{ifcsname} being
% implicitly set to |\relax| by the |\csname| test.
@@ -6161,7 +6165,7 @@ wouldn’t exist.
% \macro{\bbl@ifblank}
% A tool from \textsf{url}, by Donald Arseneau, which tests if a string
% is empty or space. The companion macros tests if a macro is defined
-% with some `real' value, ie, not |\relax| and not empty,
+% with some `real' value, i.e., not |\relax| and not empty,
%
% \begin{macrocode}
\def\bbl@ifblank#1{%
@@ -6174,7 +6178,7 @@ wouldn’t exist.
% For each element in the comma separated <key>|=|<value> list,
% execute <code> with |#1| and |#2| as the key and the value of
% current item (trimmed). In addition, the item is passed verbatim as
-% |#3|. With the <key> alone, it passes |\@empty| (ie, the macro thus
+% |#3|. With the <key> alone, it passes |\@empty| (i.e., the macro thus
% named, not an empty argument, which is what you get with <key>|=|
% and no value).
%
@@ -6227,7 +6231,7 @@ wouldn’t exist.
% \end{macrocode}
%
% An extension to the previous macro. It takes into account the
-% parameters, and it is string based (ie, if you replace |elax| by
+% parameters, and it is string based (i.e., if you replace |elax| by
% |ho|, then |\relax| becomes |\rho|). No checking is done at all,
% because it is not a general purpose macro, and it is used by \babel{}
% only when it works (an example where it does \textit{not} work is in
@@ -6515,7 +6519,7 @@ wouldn’t exist.
% \subsection{\texttt{base}}
%
% The first `real' option to be processed is |base|, which set the
-% hyphenation patterns then resets |ver@babel.sty| so that \LaTeX
+% hyphenation patterns then resets |ver@babel.sty| so that \LaTeX{}
% forgets about the first loading. After a subset of |babel.def| has
% been loaded (the old |switch.def|) and |\AfterBabelLanguage| defined,
% it exits.
@@ -6737,7 +6741,7 @@ wouldn’t exist.
\fi\fi
% \end{macrocode}
%
-% With |headfoot=lang| we can set the language used in heads/foots.
+% With |headfoot=lang| we can set the language used in heads/feet.
% For example, in babel/3796 just add |headfoot=english|. It
% misuses \cs{@resetactivechars}, but seems to work.
%
@@ -6880,7 +6884,7 @@ wouldn’t exist.
%
% After a name has been ‘fixed’, the selectors will try to load the
% language. If even the fixed name is not defined, will load it on the
-% fly, either based on its name, or if activated, its BCP47 code.
+% fly, either based on its name, or if activated, its BCP 47 code.
%
% We first need a couple of macros for a simple BCP 47 look up. It also
% makes sure, with |\bbl@bcpcase|, casing is the correct one, so that
@@ -6976,7 +6980,7 @@ wouldn’t exist.
% \end{macrocode}
%
% The following definition is preserved for backwards compatibility
-% (eg, \textsf{arabi}, \textsf{koma}). It is related to a trick for
+% (e.g., \textsf{arabi}, \textsf{koma}). It is related to a trick for
% 2.09, now discarded.
%
% \begin{macrocode}
@@ -7274,7 +7278,7 @@ wouldn’t exist.
\bbl@xin@{/u}{/\bbl@tempa}%
\ifin@\else\bbl@xin@{/e}{/\bbl@tempa}\fi % elongated forms
\ifin@\else\bbl@xin@{/k}{/\bbl@tempa}\fi % only kashida
- \ifin@\else\bbl@xin@{/p}{/\bbl@tempa}\fi % padding (eg, Tibetan)
+ \ifin@\else\bbl@xin@{/p}{/\bbl@tempa}\fi % padding (e.g., Tibetan)
\ifin@\else\bbl@xin@{/v}{/\bbl@tempa}\fi % variable font
% hyphenation - save mins
\babel@savevariable\lefthyphenmin
@@ -7567,7 +7571,7 @@ wouldn’t exist.
% language definition file the command |\ProvidesLanguage| is
% defined by \babel.
%
-% Depending on the format, ie, on if the former is defined, we use
+% Depending on the format, i.e., or if the former is defined, we use
% a similar definition or not.
%
% \begin{macrocode}
@@ -7910,7 +7914,7 @@ wouldn’t exist.
\fi
% \end{macrocode}
%
-% Since the following command is meant for a hook (although a \LaTeX
+% Since the following command is meant for a hook (although a \LaTeX{}
% one), it’s placed here.
%
% \begin{macrocode}
@@ -8081,7 +8085,7 @@ wouldn’t exist.
\fi
% \end{macrocode}
%
-% A bit of optimization. Select in heads/foots the language only if
+% A bit of optimization. Select in heads/feet the language only if
% necessary.
%
% \begin{macrocode}
@@ -8153,9 +8157,9 @@ wouldn’t exist.
% defines |"| as |\active@prefix "\active@char"| (where the first |"|
% is the character with its original catcode, when the shorthand is
% created, and |\active@char"| is a single token). In protected
-% contexts, it expands to |\protect "| or |\noexpand "| (ie, with the
+% contexts, it expands to |\protect "| or |\noexpand "| (i.e., with the
% original |"|); otherwise |\active@char"| is executed. This macro in
-% turn expands to |\normal@char"| in ``safe'' contexts (eg, |\label|),
+% turn expands to |\normal@char"| in ``safe'' contexts (e.g., |\label|),
% but |\user@active"| in normal ``unsafe'' ones. The latter search a
% definition in the user, language and system levels, in this order,
% but if none is found, |\normal@char"| is used. However, a deactivated
@@ -8247,7 +8251,7 @@ wouldn’t exist.
% of the package and of each language file (except with
% \textsf{KeepShorthandsActive}). It is re-activate again at
% |\begin{document}|. We also need to make sure that the shorthands are
-% active during the processing of the \file{.aux} file. Otherwise some
+% active during the processing of the \file{aux} file. Otherwise some
% citations may give unexpected results in the printout when a
% shorthand was used in the optional argument of |\bibitem| for
% example. Then we make it active (not strictly necessary, but done for
@@ -8507,10 +8511,10 @@ wouldn’t exist.
% Used to declare a shorthand
% on a certain level. It takes three arguments:
% \begin{enumerate}
-% \item a name for the collection of shorthands, i.e. `system', or
+% \item a name for the collection of shorthands, i.e., `system', or
% `dutch';
% \item the character (sequence) that makes up the shorthand,
-% i.e. |~| or |"a|;
+% i.e., |~| or |"a|;
% \item the code to be executed when the shorthand is encountered.
% \end{enumerate}
%
@@ -8590,7 +8594,7 @@ wouldn’t exist.
% \macro{\useshorthands}
%
% This is the user level macro. It initializes and activates the
-% character for use as a shorthand character (ie, it's active in the
+% character for use as a shorthand character (i.e., it's active in the
% preamble). Languages can deactivate shorthands, so a starred version
% is also provided which activates them always after the language has
% been switched.
@@ -8745,7 +8749,7 @@ wouldn’t exist.
\fi}
% \end{macrocode}
%
-% Note the value is that at the expansion time; eg, in the preamble
+% Note the value is that at the expansion time; e.g., in the preamble
% shorthands are usually deactivated.
%
% \begin{macrocode}
@@ -8816,7 +8820,7 @@ wouldn’t exist.
% \end{macrocode}
%
% Usually the |~| is active and expands to \verb*=\penalty\@M\ =.
-% When it is written to the \file{.aux} file it is written
+% When it is written to the \file{aux} file it is written
% expanded. To prevent that and to be able to use the character |~|
% as a start character for a shorthand, it is redefined here as a
% one character shorthand on system level. The system declaration
@@ -9029,7 +9033,7 @@ wouldn’t exist.
%
% The macro |\babel@save|\meta{csname} saves the current meaning of the
% control sequence \meta{csname} to |\originalTeX| (which has to be
-% expandable, i.\,e.\ you shouldn't let it to \cs{relax}). To do this,
+% expandable, i.e., you shouldn't let it to \cs{relax}). To do this,
% we let the current meaning to a temporary control sequence, the
% restore commands are appended to |\originalTeX| and the counter is
% incremented. The macro |\babel@savevariable|\meta{variable} saves the
@@ -9407,10 +9411,10 @@ wouldn’t exist.
% depending of if there is an optional argument: without it and
% |strings=encoded|, strings are defined
% always; otherwise, they are set only if they are still undefined
-% (ie, fallback values). With labelled blocks and
+% (i.e., fallback values). With labelled blocks and
% |strings=encoded|, define the strings, but with another value,
% define strings only if the current label or font encoding is the
-% value of |strings|; otherwise (ie, no |strings| or a block whose
+% value of |strings|; otherwise (i.e., no |strings| or a block whose
% label is not in |strings=|) do nothing.
%
% We presume the current block is not loaded, and therefore set
@@ -9453,12 +9457,12 @@ wouldn’t exist.
\def\bbl@sctest{%
\bbl@xin@{,\bbl@opt@strings,}{,\bbl@sc@label,\bbl@sc@fontenc,}}%
\fi
- \ifx\bbl@opt@strings\@nnil % ie, no strings key -> defaults
- \else\ifx\bbl@opt@strings\relax % ie, strings=encoded
+ \ifx\bbl@opt@strings\@nnil % i.e., no strings key -> defaults
+ \else\ifx\bbl@opt@strings\relax % i.e., strings=encoded
\let\AfterBabelCommands\bbl@aftercmds
\let\SetString\bbl@setstring
\let\bbl@stringdef\bbl@encstring
- \else % ie, strings=value
+ \else % i.e., strings=value
\bbl@sctest
\ifin@
\let\AfterBabelCommands\bbl@aftercmds
@@ -9527,17 +9531,17 @@ wouldn’t exist.
% of |\SetString| when it is ``active''
%
% First save the ``switcher''. Create it if undefined. Strings are
-% defined only if undefined (ie, like |\providescommmand|). With
+% defined only if undefined (i.e., like |\providescommmand|). With
% the event |stringprocess| you can preprocess the string by
% manipulating the value of |\BabelString|. If there are several
% hooks assigned to this event, preprocessing is done in the same
% order as defined. Finally, the string is set.
%
% \begin{macrocode}
-\def\bbl@setstring#1#2{% eg, \prefacename{<string>}
+\def\bbl@setstring#1#2{% e.g., \prefacename{<string>}
\bbl@forlang\bbl@tempa{%
\edef\bbl@LC{\bbl@tempa\bbl@stripslash#1}%
- \bbl@ifunset{\bbl@LC}% eg, \germanchaptername
+ \bbl@ifunset{\bbl@LC}% e.g., \germanchaptername
{\bbl@exp{%
\global\\\bbl@add\<\bbl@G\bbl@tempa>{\\\bbl@scset\\#1\<\bbl@LC>}}}%
{}%
@@ -10407,7 +10411,7 @@ wouldn’t exist.
\ifx\bbl@latinarabic\@undefined
\expandafter\let\expandafter\@arabic
\csname bbl@counter@\languagename\endcsname
- \else % ie, if layout=counters, which redefines \@arabic
+ \else % i.e., if layout=counters, which redefines \@arabic
\expandafter\let\expandafter\bbl@latinarabic
\csname bbl@counter@\languagename\endcsname
\fi
@@ -10972,11 +10976,11 @@ wouldn’t exist.
% \begin{macrocode}
\def\bbl@maybextx{-\bbl@csarg\ifx{extx@\languagename}\@empty x-\fi}
\def\bbl@inikv@characters#1#2{%
- \bbl@ifsamestring{#1}{casing}% eg, casing = uV
+ \bbl@ifsamestring{#1}{casing}% e.g., casing = uV
{\bbl@exp{%
\\\g@addto@macro\\\bbl@release@casing{%
\\\bbl@casemapping{}{\languagename}{\unexpanded{#2}}}}}%
- {\in@{$casing.}{$#1}% eg, casing.Uv = uV
+ {\in@{$casing.}{$#1}% e.g., casing.Uv = uV
\ifin@
\lowercase{\def\bbl@tempb{#1}}%
\bbl@replace\bbl@tempb{casing.}{}%
@@ -11122,7 +11126,7 @@ wouldn’t exist.
\else
%
% The following code is still under study. You can test it and make
- % suggestions. Eg, enumerate.2 = ([enumi]).([enumii]). It's
+ % suggestions. E.g., enumerate.2 = ([enumi]).([enumii]). It's
% language dependent.
\in@{enumerate.}{#1}%
\ifin@
@@ -11218,7 +11222,7 @@ wouldn’t exist.
{\bbl@ld@calendar}\bbl@they\bbl@them\bbl@thed
\fi
\fi
- \@nameuse{bbl@precalendar}% Remove, eg, +, -civil (-ca-islamic)
+ \@nameuse{bbl@precalendar}% Remove, e.g., +, -civil (-ca-islamic)
\edef\bbl@calendar{% Used in \month..., too
\bbl@ld@calendar
\ifx\bbl@ld@variant\@empty\else
@@ -11228,7 +11232,7 @@ wouldn’t exist.
{\@nameuse{bbl@date@\languagename @\bbl@calendar}%
\bbl@they\bbl@them\bbl@thed}%
\endgroup}
-% eg: 1=months, 2=wide, 3=1, 4=dummy, 5=value, 6=calendar
+% e.g.: 1=months, 2=wide, 3=1, 4=dummy, 5=value, 6=calendar
\def\bbl@inidate#1.#2.#3.#4\relax#5#6{% TODO - ignore with 'captions'
\bbl@trim@def\bbl@tempa{#1.#2}%
\bbl@ifsamestring{\bbl@tempa}{months.wide}% to savedate
@@ -11450,7 +11454,7 @@ wouldn’t exist.
% \end{macrocode}
%
% The following |ini| reader ignores everything but the
-% |identification| section. It is called when a font is defined (ie,
+% |identification| section. It is called when a font is defined (i.e.,
% when the language is first selected) to know which script/language
% must be enabled. This means we must make sure a few characters are
% not active. The |ini| is not read directly, but with a proxy |tex|
@@ -11477,19 +11481,19 @@ wouldn’t exist.
% \begin{macrocode}
\def\bbl@setdigits#1#2#3#4#5{%
\bbl@exp{%
- \def\<\languagename digits>####1{% ie, \langdigits
+ \def\<\languagename digits>####1{% i.e., \langdigits
\<bbl@digits@\languagename>####1\\\@nil}%
\let\<bbl@cntr@digits@\languagename>\<\languagename digits>%
- \def\<\languagename counter>####1{% ie, \langcounter
+ \def\<\languagename counter>####1{% i.e., \langcounter
\\\expandafter\<bbl@counter@\languagename>%
\\\csname c@####1\endcsname}%
- \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang
+ \def\<bbl@counter@\languagename>####1{% i.e., \bbl@counter@lang
\\\expandafter\<bbl@digits@\languagename>%
\\\number####1\\\@nil}}%
\def\bbl@tempa##1##2##3##4##5{%
\bbl@exp{% Wow, quite a lot of hashes! :-(
\def\<bbl@digits@\languagename>########1{%
- \\\ifx########1\\\@nil % ie, \bbl@digits@lang
+ \\\ifx########1\\\@nil % i.e., \bbl@digits@lang
\\\else
\\\ifx0########1#1%
\\\else\\\ifx1########1#2%
@@ -11599,7 +11603,7 @@ wouldn’t exist.
\fi
\expandafter\bbl@casemapping@ii\bbl@tempb\@@}
\def\bbl@casemapping@ii#1#2#3\@@{%
- \in@{#1#3}{<>}% ie, if <u>, <l>, <t>
+ \in@{#1#3}{<>}% i.e., if <u>, <l>, <t>
\ifin@
\edef\bbl@tempe{%
\if#2u1 \else\if#2l2 \else\if#2t3 \fi\fi\fi}%
@@ -11706,7 +11710,7 @@ wouldn’t exist.
\typeout{*******}}
% \end{macrocode}
%
-% \subsection{BCP-47 related commands}
+% \subsection{BCP 47 related commands}
%
% \begin{macrocode}
\newif\ifbbl@bcpallowed
@@ -11749,7 +11753,7 @@ wouldn’t exist.
%
% Still somewhat hackish. WIP. Note |\str_if_eq:nnTF| is fully
% expandable (|\bbl@ifsamestring| isn’t). The argument is the prefix to
-% tag.bcp47. Can be prece
+% tag.bcp47.
%
% \begin{macrocode}
\providecommand\BCPdata{}
@@ -11942,7 +11946,7 @@ wouldn’t exist.
%
% \begin{macrocode}
\bbl@trace{Cross referencing macros}
-\ifx\bbl@opt@safe\@empty\else % ie, if 'ref' and/or 'bib'
+\ifx\bbl@opt@safe\@empty\else % i.e., if 'ref' and/or 'bib'
\def\@newl@bel#1#2#3{%
{\@safe@activestrue
\bbl@ifunset{#1@#2}%
@@ -11956,7 +11960,7 @@ wouldn’t exist.
% \macro{\@testdef}
%
% An internal \LaTeX\ macro used to test if the labels that have
-% been written on the |.aux| file have changed. It is called by
+% been written on the |aux| file have changed. It is called by
% the |\enddocument| macro.
%
% \begin{macrocode}
@@ -12093,14 +12097,14 @@ wouldn’t exist.
%
% \macro{\bibcite}
%
-% The macro that is used in the |.aux| file to
+% The macro that is used in the |aux| file to
% define citation labels. When packages such as \pkg{natbib} or
% \pkg{cite} are not loaded its second argument is used to typeset the
% citation label. In that case, this second argument can contain
% active characters but is used in an environment where
% |\@safe@activestrue| is in effect. This switch needs to be reset
% inside the |\hbox| which contains the citation label. In order to
-% determine during \file{.aux} file processing which definition of
+% determine during \file{aux} file processing which definition of
% |\bibcite| is needed we define |\bibcite| in such a way that it
% redefines itself with the proper definition. We call
% |\bbl@cite@choice| to select the proper definition for |\bibcite|.
@@ -12136,7 +12140,7 @@ wouldn’t exist.
\global\let\bbl@cite@choice\relax}
% \end{macrocode}
%
-% When a document is run for the first time, no \file{.aux} file is
+% When a document is run for the first time, no \file{aux} file is
% available, and |\bibcite| will not yet be properly defined. In
% this case, this has to happen before the document starts.
%
@@ -12147,7 +12151,7 @@ wouldn’t exist.
% \macro{\@bibitem}
%
% One of the two internal \LaTeX\ macros called by |\bibitem|
-% that write the citation label on the |.aux| file.
+% that write the citation label on the |aux| file.
%
% \begin{macrocode}
\bbl@redefine\@bibitem#1{%
@@ -12394,7 +12398,7 @@ wouldn’t exist.
%
% \macro{\substitutefontfamily}
%
-% \textit{Deprecated.} It creates an \file{.fd} file on the fly. The
+% \textit{Deprecated.} It creates an \file{fd} file on the fly. The
% first argument is an encoding mnemonic, the second and third
% arguments are font family names. Use the tools provided by \LaTeX\
% (|\DeclareFontFamilySubstitution|).
@@ -12871,7 +12875,7 @@ wouldn’t exist.
% Another way to extend the list of `known' options for \babel\ was
% to create the file \file{bblopts.cfg} in which one can add option
% declarations. However, this mechanism is deprecated -- if you
-% want an alternative name for a language, just create a new |.ldf|
+% want an alternative name for a language, just create a new |ldf|
% file loading the actual one. You can also set the name
% of the file with the package option |config=<name>|, which will
% load |<name>.cfg| instead.
@@ -12922,7 +12926,7 @@ wouldn’t exist.
\edef\bbl@tempa{\bbl@tempf,\bbl@language@opts}%
\bbl@foreach\bbl@tempa{\edef\bbl@tempb{#1,\bbl@tempb}}%
\bbl@foreach\bbl@tempb{% \bbl@tempb is a reversed list
- \ifx\bbl@opt@main\@nnil % ie, if not yet assigned
+ \ifx\bbl@opt@main\@nnil % i.e., if not yet assigned
\ifodd\bbl@iniflag % = *=
\IfFileExists{babel-#1.tex}{\def\bbl@opt@main{#1}}{}%
\else % n +=
@@ -12933,7 +12937,7 @@ wouldn’t exist.
\else
\bbl@info{Main language set with 'main='. Except if you have\\%
problems, prefer the default mechanism for setting\\%
- the main language, ie, as the last declared.\\%
+ the main language, i.e., as the last declared.\\%
Reported}
\fi
% \end{macrocode}
@@ -13516,7 +13520,7 @@ wouldn’t exist.
\righthyphenmin##2\relax}%
\def\selectlanguage{%
\errhelp{Selecting a language requires a package supporting it}%
- \errmessage{Not loaded}}%
+ \errmessage{No multilingual package has been loaded}}%
\let\foreignlanguage\selectlanguage
\let\otherlanguage\selectlanguage
\expandafter\let\csname otherlanguage*\endcsname\selectlanguage
@@ -13696,18 +13700,12 @@ wouldn’t exist.
\DisableBabelHook{babel-fontspec}
\@onlypreamble\babelfont
\newcommand\babelfont[2][]{% 1=langs/scripts 2=fam
- \bbl@foreach{#1}{%
- \expandafter\ifx\csname date##1\endcsname\relax
- \IfFileExists{babel-##1.tex}%
- {\babelprovide{##1}}%
- {}%
- \fi}%
- \edef\bbl@tempa{#1}%
- \def\bbl@tempb{#2}% Used by \bbl@bblfont
\ifx\fontspec\@undefined
\usepackage{fontspec}%
\fi
\EnableBabelHook{babel-fontspec}%
+ \edef\bbl@tempa{#1}%
+ \def\bbl@tempb{#2}% Used by \bbl@bblfont
\bbl@bblfont}
\newcommand\bbl@bblfont[2][]{% 1=features 2=fontname, @font=rm|sf|tt
\bbl@ifunset{\bbl@tempb family}%
@@ -13721,7 +13719,7 @@ wouldn’t exist.
\let\<bbl@\bbl@tempb dflt@\languagename>\<bbl@\bbl@tempb dflt@>%
\\\bbl@font@set\<bbl@\bbl@tempb dflt@\languagename>%
\<\bbl@tempb default>\<\bbl@tempb family>}}%
- {\bbl@foreach\bbl@tempa{% ie bbl@rmdflt@lang / *scrt
+ {\bbl@foreach\bbl@tempa{% i.e., bbl@rmdflt@lang / *scrt
\bbl@csarg\def{\bbl@tempb dflt@##1}{<>{#1}{#2}}}}}%
% \end{macrocode}
%
@@ -13763,7 +13761,7 @@ wouldn’t exist.
{}}%
\gdef\bbl@switchfont{%
\bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}%
- \bbl@exp{% eg Arabic -> arabic
+ \bbl@exp{% e.g., Arabic -> arabic
\lowercase{\edef\\\bbl@tempa{\bbl@cl{sname}}}}%
\bbl@foreach\bbl@font@fams{%
\bbl@ifunset{bbl@##1dflt@\languagename}% (1) language?
@@ -13845,13 +13843,13 @@ wouldn’t exist.
% inspecting if the variant declaration contains |>ssub*|).
%
% \begin{macrocode}
-\def\bbl@font@set#1#2#3{% eg \bbl@rmdflt@lang \rmdefault \rmfamily
+\def\bbl@font@set#1#2#3{% e.g., \bbl@rmdflt@lang \rmdefault \rmfamily
\bbl@xin@{<>}{#1}%
\ifin@
\bbl@exp{\\\bbl@fontspec@set\\#1\expandafter\@gobbletwo#1\\#3}%
\fi
\bbl@exp{% 'Unprotected' macros return prev values
- \def\\#2{#1}% eg, \rmdefault{\bbl@rmdflt@lang}
+ \def\\#2{#1}% e.g., \rmdefault{\bbl@rmdflt@lang}
\\\bbl@ifsamestring{#2}{\f@family}%
{\\#3%
\\\bbl@ifsamestring{\f@series}{\bfdefault}{\\\bfseries}{}%
@@ -13868,11 +13866,11 @@ wouldn’t exist.
\edef\bbl@tempb{\bbl@stripslash#4/}% Catcodes hack (better pass it).
\bbl@exp{\\\bbl@replace\\\bbl@tempb{\bbl@stripslash\family/}{}}%
\let\bbl@mapselect\relax
- \let\bbl@temp@fam#4% eg, '\rmfamily', to be restored below
+ \let\bbl@temp@fam#4% e.g., '\rmfamily', to be restored below
\let#4\@empty % Make sure \renewfontfamily is valid
\bbl@set@renderer
\bbl@exp{%
- \let\\\bbl@temp@pfam\<\bbl@stripslash#4\space>% eg, '\rmfamily '
+ \let\\\bbl@temp@pfam\<\bbl@stripslash#4\space>% e.g., '\rmfamily '
\<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl@cl{sname}}%
{\\\newfontscript{\bbl@cl{sname}}{\bbl@cl{sotf}}}%
\<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl@cl{lname}}%
@@ -13880,11 +13878,11 @@ wouldn’t exist.
\\\renewfontfamily\\#4%
[\bbl@cl{lsys},% xetex removes unknown features :-(
\ifcase\bbl@engine\or RawFeature={family=\bbl@tempb},\fi
- #2]}{#3}% ie \bbl@exp{..}{#3}
+ #2]}{#3}% i.e., \bbl@exp{..}{#3}
\bbl@unset@renderer
\begingroup
#4%
- \xdef#1{\f@family}% eg, \bbl@rmdflt@lang{FreeSerif(0)}
+ \xdef#1{\f@family}% e.g., \bbl@rmdflt@lang{FreeSerif(0)}
\endgroup % TODO. Find better tests:
\bbl@xin@{\string>\string s\string s\string u\string b\string*}%
{\expandafter\meaning\csname TU/#1/bx/sc\endcsname}%
@@ -13901,7 +13899,7 @@ wouldn’t exist.
\let\bbl@mapselect\bbl@tempe}%
% \end{macrocode}
%
-% |font@rst| and |famrst| are only used when there are no global
+% |font@rst| and |famrst| are only used when there is no global
% settings, to save and restore de previous families. Not really
% necessary, but done for optimization.
%
@@ -14104,7 +14102,7 @@ wouldn’t exist.
% |\bbl@usingxeclass\bbl@xeclass@punct@english||\bbl@charclass{.}|%
% |\bbl@charclass{,}| (etc.), where |\bbl@usingxeclass| stores the class to be
% applied to the subsequent characters. The \cs{ifcat} part deals with
-% the alternative way to enter characters as macros (eg, |\}|). As a
+% the alternative way to enter characters as macros (e.g., |\}|). As a
% special case, hyphens are stored as |\bbl@upto|, to deal with ranges.
%
% \begin{macrocode}
@@ -14409,7 +14407,7 @@ wouldn’t exist.
% starts, to read the list of available languages from |language.dat|
% (for the |base| option); (2) at hyphen.cfg, to modify some macros;
% (3) in the middle of |plain.def| and |babel.sty|, by |babel.def|,
-% with the commands and other definitions for |luatex| (eg,
+% with the commands and other definitions for |luatex| (e.g.,
% |\babelpatterns|).
%
% \begin{macrocode}
@@ -14819,7 +14817,7 @@ wouldn’t exist.
% First, some general code for line breaking, used by
% |\babelposthyphenation|.
%
-% Replace regular (ie, implicit) discretionaries by spaceskips, based
+% Replace regular (i.e., implicit) discretionaries by spaceskips, based
% on the previous glyph (which I think makes sense, because the hyphen
% and the previous char go always together). Other discretionaries are
% not touched. See Unicode UAX 14.
@@ -14869,7 +14867,7 @@ wouldn’t exist.
quad = font.getfont(last_char.font).size
for lg, rg in pairs(sea_ranges) do
if last_char.char > rg[1] and last_char.char < rg[2] then
- lg = lg:sub(1, 4) &% Remove trailing number of, eg, Cyrl1
+ lg = lg:sub(1, 4) &% Remove trailing number of, e.g., Cyrl1
local intraspace = Babel.intraspaces[lg]
local intrapenalty = Babel.intrapenalties[lg]
local n
@@ -14994,6 +14992,9 @@ wouldn’t exist.
func(head)
end
end
+ if Babel.set_hboxed then
+ Babel.set_hboxed(head)
+ end
if Babel.sea_enabled then
Babel.sea_disc_to_space(head)
end
@@ -15611,8 +15612,6 @@ end
load( 'return Babel.locale_props'..
'[\the\csname bbl@id@@#3\endcsname].' .. d)() )
end )
- texio.write( '+++++' )
- texio.write( _VERSION )
rep, n = rep:gsub( '{([%a%-%.]+)|([%-%d%.]+)}',
'{\the\csname bbl@id@@#3\endcsname,"%1",%2}')
end
@@ -15742,12 +15741,18 @@ end
{\bbl@csarg\unsetattribute{ATR@#1@\languagename @}}}
\def\bbl@activateposthyphen{%
\let\bbl@activateposthyphen\relax
+ \ifx\bbl@attr@hboxed\@undefined
+ \newattribute\bbl@attr@hboxed
+ \fi
\directlua{
require('babel-transforms.lua')
Babel.linebreaking.add_after(Babel.post_hyphenate_replace)
}}
\def\bbl@activateprehyphen{%
\let\bbl@activateprehyphen\relax
+ \ifx\bbl@attr@hboxed\@undefined
+ \newattribute\bbl@attr@hboxed
+ \fi
\directlua{
require('babel-transforms.lua')
Babel.linebreaking.add_before(Babel.pre_hyphenate_replace)
@@ -15936,7 +15941,7 @@ end
% Unlike \xetex{}, \luatex{} requires only minimal changes for
% right-to-left layouts, particularly in monolingual documents (the
% engine itself reverses boxes -- including column order or headings
-% --, margins, etc.) with |bidi=basic|, without having to patch
+% --, margins, etc.)\ with |bidi=basic|, without having to patch
% almost any macro where text direction is relevant.
%
% Still, there are three areas deserving special attention, namely,
@@ -16602,6 +16607,15 @@ function Babel.tovalue(v)
end
end
+Babel.attr_hboxed = luatexbase.registernumber'bbl@attr@hboxed'
+
+function Babel.set_hboxed(head, gc)
+ for item in node.traverse(head) do
+ node.set_attribute(item, Babel.attr_hboxed, 1)
+ end
+ return head
+end
+
Babel.fetch_subtext = {}
Babel.ignore_pre_char = function(node)
@@ -16634,7 +16648,11 @@ Babel.fetch_subtext[0] = function(head)
if Babel.ignore_pre_char(item) then
word_string = word_string .. Babel.us_char
else
- word_string = word_string .. unicode.utf8.char(item.char)
+ if node.has_attribute(item, Babel.attr_hboxed) then
+ word_string = word_string .. Babel.us_char
+ else
+ word_string = word_string .. unicode.utf8.char(item.char)
+ end
end
word_nodes[#word_nodes+1] = item
else
@@ -16642,7 +16660,11 @@ Babel.fetch_subtext[0] = function(head)
end
elseif item.id == 12 and item.subtype == 13 then
- word_string = word_string .. ' '
+ if node.has_attribute(item, Babel.attr_hboxed) then
+ word_string = word_string .. Babel.us_char
+ else
+ word_string = word_string .. ' '
+ end
word_nodes[#word_nodes+1] = item
-- Ignore leading unrecognized nodes, too.
@@ -16683,7 +16705,11 @@ Babel.fetch_subtext[1] = function(head)
if item.lang == lang or lang == nil then
if (item.char ~= 124) and (item.char ~= 61) then -- not =, not |
lang = lang or item.lang
- word_string = word_string .. unicode.utf8.char(item.char)
+ if node.has_attribute(item, Babel.attr_hboxed) then
+ word_string = word_string .. Babel.us_char
+ else
+ word_string = word_string .. unicode.utf8.char(item.char)
+ end
word_nodes[#word_nodes+1] = item
end
else
@@ -16691,11 +16717,19 @@ Babel.fetch_subtext[1] = function(head)
end
elseif item.id == 7 and item.subtype == 2 then
- word_string = word_string .. '='
+ if node.has_attribute(item, Babel.attr_hboxed) then
+ word_string = word_string .. Babel.us_char
+ else
+ word_string = word_string .. '='
+ end
word_nodes[#word_nodes+1] = item
elseif item.id == 7 and item.subtype == 3 then
- word_string = word_string .. '|'
+ if node.has_attribute(item, Babel.attr_hboxed) then
+ word_string = word_string .. Babel.us_char
+ else
+ word_string = word_string .. '|'
+ end
word_nodes[#word_nodes+1] = item
-- (1) Go to next word if nothing was found, and (2) implicitly
@@ -17000,7 +17034,7 @@ function Babel.hyphenate_replace(head, mode)
d.attr = item_base.attr
head, new = node.insert_before(head, item, d)
- end -- ie replacement cases
+ end -- i.e., replacement cases
-- Shared by disc, space(factor), kern, node and penalty.
if sc == 1 then
@@ -23305,7 +23339,7 @@ local ranges = Babel.ranges
local DIR = node.id("dir")
local function dir_mark(head, from, to, outer)
- dir = (outer == 'r') and 'TLT' or 'TRT' -- ie, reverse
+ dir = (outer == 'r') and 'TLT' or 'TRT' -- i.e., reverse
local d = node.new(DIR)
d.dir = '+' .. dir
node.insert_before(head, from, d)
@@ -23436,7 +23470,7 @@ function Babel.bidi(head, ispar)
% Numbers in R mode. A sequence of <en>, <et>, <an>, <es> and <cs> is
% typeset (with some rules) in L mode. We store the starting and
% ending points, and only when anything different is found (including
-% nil, ie, a non-char), the textdir is set. This means you cannot
+% nil, i.e., a non-char), the textdir is set. This means you cannot
% insert, say, a whatsit, but this is what I would expect (with
% \textsf{luacolor} you may colorize some digits). Anyway, this
% behavior could be changed with a switch in the future. Note in the
@@ -23559,7 +23593,7 @@ end
%
% \begin{macrocode}
%<*basic>
--- eg, Babel.fontmap[1][<prefontid>]=<dirfontid>
+-- e.g., Babel.fontmap[1][<prefontid>]=<dirfontid>
Babel.fontmap = Babel.fontmap or {}
Babel.fontmap[0] = {} -- l
@@ -23587,7 +23621,7 @@ local GLYPH = node.id('glyph')
local function insert_implicit(head, state, outer)
local new_state = state
if state.sim and state.eim and state.sim ~= state.eim then
- dir = ((outer == 'r') and 'TLT' or 'TRT') -- ie, reverse
+ dir = ((outer == 'r') and 'TLT' or 'TRT') -- i.e., reverse
local d = node.new(DIR)
d.dir = '+' .. dir
node.insert_before(head, state.sim, d)
@@ -24367,7 +24401,7 @@ Babel.cjk_breaks = {
\LdfInit{nil}{datenil}
% \end{macrocode}
%
-% When this file is read as an option, i.e. by the |\usepackage|
+% When this file is read as an option, i.e., by the |\usepackage|
% command, \texttt{nil} could be an `unknown' language in which case we
% have to make it known.
%
diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins
index 2b1653a5ba..3ee035de16 100644
--- a/macros/latex/required/babel/base/babel.ins
+++ b/macros/latex/required/babel/base/babel.ins
@@ -26,7 +26,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
-\def\filedate{2024/11/30}
+\def\filedate{2024/12/21}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf
index 2ae7842239..c6b9883859 100644
--- a/macros/latex/required/babel/base/babel.pdf
+++ b/macros/latex/required/babel/base/babel.pdf
Binary files differ
diff --git a/macros/latex/required/babel/base/bbcompat.dtx b/macros/latex/required/babel/base/bbcompat.dtx
index 5ef97f1162..7276671bc1 100644
--- a/macros/latex/required/babel/base/bbcompat.dtx
+++ b/macros/latex/required/babel/base/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2024/11/30 v24.]
+\ProvidesFile{bbcompat.dtx}[2024/12/21 v24.]
%</dtx>
%
%% File 'bbcompat.dtx'