[latex3-commits] [latex3/tagpdf] renamekeys: rename keys, WIP (0d2da70)

github at latex-project.org github at latex-project.org
Thu Feb 15 00:47:15 CET 2024


Repository : https://github.com/latex3/tagpdf
On branch  : renamekeys
Link       : https://github.com/latex3/tagpdf/commit/0d2da7076b6dba431f9b8813033e1cd0ceb92a36

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

commit 0d2da7076b6dba431f9b8813033e1cd0ceb92a36
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Feb 15 00:47:15 2024 +0100

    rename keys, WIP


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

0d2da7076b6dba431f9b8813033e1cd0ceb92a36
 doc/tagpdf.tex          | 29 +++++++++++++------------
 doc/tagpdfsetup-keys.md | 10 ++++-----
 tagpdf-user.dtx         |  8 +++----
 tagpdf.dtx              | 58 +++++++++++++++++++++++++++++++------------------
 4 files changed, 61 insertions(+), 44 deletions(-)

diff --git a/doc/tagpdf.tex b/doc/tagpdf.tex
index 9efdd50..d6d78bc 100644
--- a/doc/tagpdf.tex
+++ b/doc/tagpdf.tex
@@ -396,7 +396,7 @@ some text
 
 When loading \pkg{tagpdf} through the \texttt{testphase} keys, it is automatically activated. 
 To deactivate it while still retaining all the other new code from the latex-lab testphase files,
-use in the preamble |\tagpdfsetup{activate-all=false}|. You can additionally also deactivate the 
+use in the preamble |\tagpdfsetup{activate/all=false}|. You can additionally also deactivate the 
 paratagging and the interword space code. 
 To suppress the loading of the package altogether you can try
 
@@ -464,29 +464,30 @@ The command should be normally used only in the preamble
 The key-val list understands the following keys:
 
 \begin{description}
-\item[\PrintKeyName{activate-all}] Boolean, initially false. Activates
+\item[\PrintKeyName{activate/all}] Boolean, initially false. Activates
   everything, that's normally the sensible thing to do.
 
-\item [\PrintKeyName{activate}] Like |activate-all|,
+\item [\PrintKeyName{activate}] Like |activate/all|,
   \emph{additionally} is opens at begin document a structure with
   |\tagstructbegin| and closes it at end document. The key accepts as
   value a tag name which is used as the tag of the structure.  The
   default value is |Document|.
 
-\item[\PrintKeyName{activate-mc}] Boolean, initially false. Activates
+\item[\PrintKeyName{activate/mc}] Boolean, initially false. Activates
   the code related to marked content.
 
-\item[\PrintKeyName{activate-struct}] Boolean, initially
+\item[\PrintKeyName{activate/struct}] Boolean, initially
   false. Activates the code related to structures. Should be used only
-  if \PrintKeyName{activate-mc} has been used too.
+  if \PrintKeyName{activate/mc} has been used too.
 
-\item[\PrintKeyName{no-struct-dest}] Starting with version 0.93
+\item[\PrintKeyName{activate/struct-dest}] Boolean, initially true.
+  Starting with version 0.93
   \pkg{tagpdf} will create automatically structure destinations (see
-  section~\ref{sec:struct-dest} if \pkg{hyperref} is used, if the
-  engine supports it and if the pdf version is 2.0. With this key this
+  section~\ref{sec:struct-dest} if \pkg{hyperref} is used and if the
+  engine supports it. With this key this
   can be suppressed.
 
-\item[\PrintKeyName{activate-tree}] Boolean, initially
+\item[\PrintKeyName{activate/tree}] Boolean, initially
   false. Activates the code related to trees. Should be used only if
   the two other keys has been used too.
 
@@ -498,10 +499,10 @@ The key-val list understands the following keys:
   \PrintKeyName{false}/\PrintKeyName{off}. The key
   activates/deactivates the insertion of space glyphs, see
   section~\ref{sec:spacechars}. In the luamode it only works if at
-  least \PrintKeyName{activate-mc} has been used.
+  least \PrintKeyName{activate/mc} has been used.
   The old name of the key |interwordspace| is still supported but deprecated.
 
-\item[\PrintKeyName{log}] Choice key, possible values
+\item[\PrintKeyName{debug/log}] Choice key, possible values
   \PrintKeyName{none}, \PrintKeyName{v}, \PrintKeyName{vv},
   \PrintKeyName{vvv}, \PrintKeyName{all}.  Setups the log level.
   Changing the value affects currently mostly the luamode:
@@ -545,7 +546,7 @@ The key-val list understands the following keys:
   accessibility checks. So I added it. Currently the tabsorder is the
   same for all pages. Perhaps this should be changed \ldots.
 
-\item[\PrintKeyName{tagunmarked}] Boolean,\sidenote{luamode} initially
+\item[\PrintKeyName{activate/tagunmarked}] Boolean,\sidenote{luamode} initially
   true. When this boolean is true, the lua code will try to mark
   everything that has not been marked yet as an artifact. The benefit
   is that one doesn't have to mark up every deco rule oneself. The
@@ -1004,7 +1005,7 @@ The key-val list understands the following keys:
 
   The\sidenote{lua mode only} lua mode will mark up everything unmarked as 
   \texttt{artifact=notype}. You can suppress this behavior by setting the 
-  tagpdfsetup key \texttt{tagunmarked} to false. See section 
+  tagpdfsetup key \texttt{activate/tagunmarked} to false. See section 
   \ref{ssec:setup}. 
 
   \item[\PrintKeyName{stash}] Normally marked content will be stored in the 
diff --git a/doc/tagpdfsetup-keys.md b/doc/tagpdfsetup-keys.md
index 2c06566..eb3b83a 100644
--- a/doc/tagpdfsetup-keys.md
+++ b/doc/tagpdfsetup-keys.md
@@ -10,11 +10,11 @@ to the PDF processing.
 ```
 activate .meta:n
 OK activate/spaces    (boolean, old interwordspace) in tagpdf-space.dtx
-activate/mc        (boolean, old: activate-mc)
-activate/tree      (boolean, old: activate-tree)
-activate/struct    (boolean, old: activate-struct)
-activate/all       (boolean, old: activate-all)
-activate/tagunmarked (boolean, old: tagunmarked)
+OK activate/mc        (boolean, old: activate-mc)
+OK activate/tree      (boolean, old: activate-tree)
+OK activate/struct    (boolean, old: activate-struct)
+OK activate/all       (boolean, old: activate-all)
+OK activate/tagunmarked (boolean, old: tagunmarked)
 activate/socket (boolean, temporary until tagging-sockets are in the kernel)
 activate/struct-dest (boolean, old: no-struct-dest)
 activate/mathml-tags (boolean, old: mathml-tags, adds them to the global rolemap)
diff --git a/tagpdf-user.dtx b/tagpdf-user.dtx
index ac7144d..31a2eda 100644
--- a/tagpdf-user.dtx
+++ b/tagpdf-user.dtx
@@ -60,7 +60,7 @@
 %
 % \begin{function}{activate (setup-key)}
 % And additional setup key which combine the other activate keys
-% |activate-mc|, |activate-tree|, |activate-struct| and additionally
+% |activate/mc|, |activate/tree|, |activate/struct| and additionally
 % add a document structure.
 % \end{function}
 %
@@ -664,7 +664,7 @@
 %<*package>
 %    \end{macrocode}
 % \subsection{Document structure}
-% \begin{macro}{\g_@@_root_default_tl,activate (setup-key),activate-socket (setup-key)}
+% \begin{macro}{\g_@@_root_default_tl,activate (setup-key),activate/socket (setup-key)}
 %    \begin{macrocode}
 \tl_new:N\g_@@_root_default_tl
 \tl_gset:Nn\g_@@_root_default_tl {Document}
@@ -674,11 +674,11 @@
 
 \keys_define:nn { @@ / setup}
  {  
-   activate-socket .bool_set:N  = \l_@@_active_socket_bool, 
+   activate/socket .bool_set:N  = \l_@@_active_socket_bool, 
    activate  .code:n =
     {
       \keys_set:nn { @@ / setup }
-        { activate-mc,activate-tree,activate-struct,activate-socket }
+        { activate/mc,activate/tree,activate/struct,activate/socket }
       \tl_gset:Nn\g_@@_root_default_tl {#1}  
     },
    activate .default:n = Document
diff --git a/tagpdf.dtx b/tagpdf.dtx
index 7a3f4e0..cdc592d 100644
--- a/tagpdf.dtx
+++ b/tagpdf.dtx
@@ -47,11 +47,16 @@
 %  interword spaces. It replaces the deprecated key |interwordspace|.
 % \end{function}
 %
-% \begin{function}{activate-mc (setup-key),
-%    activate-tree (setup-key),
-%    activate-struct (setup-key),
-%    activate-all (setup-key)}
-% Keys to activate the various tagging steps
+% \begin{function}{activate/mc (setup-key),
+%    activate/tree (setup-key),
+%    activate/struct (setup-key),
+%    activate/all (setup-key),
+%    activate-mc (deprecated),
+%    activate-tree (deprecated),
+%    activate-struct (deprecated),
+%    activate-all (deprecated),
+%    }
+% Keys to activate the various tagging steps. 
 % \end{function}
 %\begin{function}{no-struct-dest (setup-key)}
 % The key allows to suppress the creation of structure destinations
@@ -537,36 +542,43 @@
 %
 %
 % \section{Keys for tagpdfsetup}
-
+%
 % TODO: the log-levels must be sorted
 %
 % \begin{macro}
 %  {
-%    activate-space (setup-key),
-%    activate-mc (setup-key),
-%    activate-tree (setup-key),
-%    activate-struct (setup-key),
-%    activate-all (setup-key),
-%    no-struct-dest (setup-key),
+%    activate/mc (setup-key),
+%    activate/tree (setup-key),
+%    activate/struct (setup-key),
+%    activate/all (setup-key),
+%    activate/struct-dest (setup-key),
 %  }
 %  Keys to (globally) activate tagging.
-%  |activate-space| activates the additional parsing needed for
-%  interword spaces. It is not documented, the parsing is currently
-%  implicitly activated by the known key |interwordspace|, as the code will
-%  perhaps move to some other place, now that it is better separated.
-%  |no-struct-dest| allows to suppress structure destinations.
+%  |activate/spaces| activates the additional parsing needed for
+%  interword spaces. It is defined in tagpdf-space. 
+%  |activate/struct-dest| allows to activate or suppress structure destinations.
 %    \begin{macrocode}
 %<*package>
 \keys_define:nn { @@ / setup }
   {
+    activate/mc     .bool_gset:N = \g_@@_active_mc_bool,
+    activate/tree   .bool_gset:N = \g_@@_active_tree_bool,
+    activate/struct .bool_gset:N = \g_@@_active_struct_bool,
+    activate/all    .meta:n =
+      {activate/mc={#1},activate/tree={#1},activate/struct={#1}},
+    activate/all  .default:n = true,
+    activate/struct-dest .bool_gset:N = \g_@@_active_struct_dest_bool,
+%    \end{macrocode}
+% old, deprecated names
+%    \begin{macrocode}
     activate-mc     .bool_gset:N = \g_@@_active_mc_bool,
     activate-tree   .bool_gset:N = \g_@@_active_tree_bool,
     activate-struct .bool_gset:N = \g_@@_active_struct_bool,
     activate-all    .meta:n =
-      {activate-mc={#1},activate-tree={#1},activate-struct={#1}},
+      {activate/mc={#1},activate/tree={#1},activate/struct={#1}},
     activate-all  .default:n = true,
     no-struct-dest .bool_gset_inverse:N = \g_@@_active_struct_dest_bool,    
- %    \end{macrocode}
+%    \end{macrocode}
 % \end{macro}
 % \begin{macro}{debug/show (setup-key)}
 % Subkeys are defined in various other places.
@@ -598,8 +610,12 @@
 % This key allows to set if (in luamode) unmarked text should be
 % marked up as artifact. The initial value is true.
 %    \begin{macrocode}
-    tagunmarked     .bool_gset:N = \g_@@_tagunmarked_bool,
-    tagunmarked     .initial:n  = true,
+    activate/tagunmarked     .bool_gset:N = \g_@@_tagunmarked_bool,
+    activate/tagunmarked     .initial:n  = true,
+%    \end{macrocode}
+% deprecated name
+%    \begin{macrocode}
+    tagunmarked .meta:n = {activate/tagunmarked ={#1}}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{tabsorder (setup-key)}





More information about the latex3-commits mailing list.