Skip to content

Commit

Permalink
use new tag names from latex namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrike Fischer committed Aug 30, 2022
1 parent ecc7fd9 commit 92b8ce9
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions required/latex-lab/latex-lab-footnotes.dtx
Expand Up @@ -407,14 +407,15 @@
%
% \subsection{Technical details for the tagging}
%
% The \emph{footnotemark} should create a \texttt{/Lbl} structure\footnote{to ease debugging we use
% \texttt{/FEmarkLbl} which we rolemap to \texttt{/Lbl}} that should contain a \texttt{/Ref} entry pointing
% The \emph{footnotemark} should create a \texttt{/Lbl} structure\footnote{to make it easier
% to identify the role we use \texttt{/footnotemark} which we rolemap to \texttt{/Lbl}} that should contain a \texttt{/Ref} entry pointing
% to the structure of the \emph{footnotetext}.
%
% The \emph{footnotetext} should create a \texttt{/FENote} structure with a \texttt{/Ref}
% The \emph{footnotetext} should create a \texttt{/FENote}\footnote{We tag it as \texttt{/footnote} and role map it.}
% structure with a \texttt{/Ref}
% entry pointing to the structures of \emph{all} marks related to the note.
% The mark at the begin of the
% note is in a \texttt{/Lbl}\footnote{We tag it as \texttt{/FENoteLbl} to make debugging easier}
% note is in a \texttt{/Lbl}\footnote{We tag it as \texttt{/footnotelabel}.}
% structure but has to fulfil no special requirements.
%
% Structure objects and the underlying properties used by the tagging
Expand Down Expand Up @@ -1474,20 +1475,9 @@
% \subsection{Tagging and hyperlink code}
% \subsubsection{Rolemap for structure tags}
% We use role-mapping to get more speaking names
% in the PDF and so ease debugging. These names should probably
% be supported by tagpdf directly.
% \begin{NOTE}{UF}
% TODO: consider what tagpdf should provide here
% TODO: \cs{tagpdfsetup} should be perhaps in tagpdf-base.
% \end{NOTE}
% \begin{macrocode}
\AtBeginDocument
{
\tag_if_active:T{\tagpdfsetup{add-new-tag=FEmarkLbl/Lbl}\tagpdfsetup{add-new-tag=FENoteLbl/Lbl}}
}
% \end{macrocode}
% in the PDF and so ease debugging. These names are already
% provided by tagpdf directly.
%

% \subsubsection{Extending the label system}
% For \cs{footref} and (perhaps later for labeled footnotes)
% we must extend the label system.
Expand Down Expand Up @@ -1608,7 +1598,7 @@
% end an open mc and start the structure.
% \begin{macrocode}
\tag_mc_end_push:
\tag_struct_begin:n { tag=FEmarkLbl }
\tag_struct_begin:n { tag=footnotemark }
% \end{macrocode}
% The associated note is either auto detected
% or given by the user.
Expand Down Expand Up @@ -1699,16 +1689,16 @@
\cs_new_protected:Npn \tag@FENote #1#2 % #1 config point, \insert\footins #2 content
{
\tag_mc_end_push:
\tag_struct_begin:n { tag=FENote }
\tag_struct_begin:n { tag=footnote }
% \end{macrocode}
% Store the current structure number for labels.
% \begin{macrocode}
\tl_set:Nx \l_@@_currentstruct_tl { \tag_get:n{struct_num} }
% \end{macrocode}
% We want to move the label structure here. So we provide a NonStruct as a container
% We want to move the label structure here. So we provide a container
% It number is |\l__fnote_currentstruct_tl| plus 1.
% \begin{macrocode}
\tag_struct_begin:n { tag=NonStruct }\tag_struct_end:
\tag_struct_begin:n { tag=footnotelabel }\tag_struct_end:
% \end{macrocode}
% after we have opened the structure we can use the structure number to
% try to detect the connected marks. As with the marks we assume that sometimes
Expand Down Expand Up @@ -1788,9 +1778,12 @@
% \end{macrocode}
% now we add the tagging commands. We move the structure of the label to
% to the container at the begin of the note.
% \begin{NOTE}{UF}
% check if the NonStruct is really needed. Perhaps we can simply move the mc.
% \end{NOTE}
% \begin{macrocode}
\tag_struct_begin:n { tag=FENoteLbl,parent=\l_@@_currentstruct_tl +1 }
\tag_mc_begin:n { tag=FENoteLbl }
\tag_struct_begin:n { tag=NonStruct,parent=\l_@@_currentstruct_tl +1 }
\tag_mc_begin:n { tag=Lbl }
#1
\tag_mc_end:
\tag_struct_end:
Expand Down

0 comments on commit 92b8ce9

Please sign in to comment.