-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove NonStruct from footnote label #1481
Open
u-fischer
wants to merge
7
commits into
develop
Choose a base branch
from
UF-latex-lab-footnote-cleanup
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8,113
−8,341
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5b777cc
remove unneeded NonStruct in footnote tagging
u-fischer 9732f9d
improve docu
u-fischer 0a84802
more test files.
u-fischer f801e36
title testfiles
u-fischer 3131ba1
one more testfile
u-fischer d43c47a
merge develop
u-fischer fb43360
clarify temporary tagsupport status
u-fischer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
2024-09-30 Ulrike Fischer <[email protected]> | ||
* latex-lab-footnotes.dtx: remove unneeded NonStruct structure. | ||
|
||
2024-09-30 Frank Mittelbach <[email protected]> | ||
* latex-lab-math.dtx (subsection{Content grabbing}): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,8 @@ | |
% | ||
% for those people who are interested or want to report an issue. | ||
% | ||
\def\ltlabfootnotedate{2024-09-24} | ||
\def\ltlabfootnoteversion{0.8f} | ||
\def\ltlabfootnotedate{2024-09-30} | ||
\def\ltlabfootnoteversion{0.8g} | ||
|
||
%<*driver> | ||
\documentclass{l3doc} | ||
|
@@ -228,7 +228,8 @@ | |
% | ||
% To cater for different layout configurations there are four | ||
% sockets that can be set by a package or | ||
% class but there should be only one per document setting them, i.e., if two packages/classes set them they are mutually | ||
% class but there should be only one per document setting them, | ||
% i.e., if two packages/classes set them they are mutually | ||
% incompatible (or rather the last one wins most likely). | ||
% These are: | ||
% \begin{description} | ||
|
@@ -491,43 +492,67 @@ | |
% \subsection{Technical details for the tagging} | ||
% | ||
% The following sockets are set up for kernel use, when doing tagging: | ||
% There name and/or function will probably change as they currently | ||
% mix tagging with the link support. | ||
% | ||
% TODO: review this sockets | ||
% \begin{description} | ||
% \item[\socket{tagsupport/fnmark} (1 argument)] | ||
% | ||
% \DescribeSocket[noprint]{tagsupport/fnmark} | ||
% | ||
% | ||
% The socket is used in \cs{@footnotemark}/\cs{fnote_footnotemark:} | ||
% and takes \cs{@makefnmark} as argument. It prints the mark in the text | ||
% and surrounds it with a tagging structure and a link. As such it is | ||
% not solely for tagging and so should not be used with \cs{UseTaggingSocket} | ||
% as this would swallow the argument and loose the link support. | ||
% | ||
% \fmi{describe and decide on names} | ||
% | ||
% | ||
% \item[\socket{tagsupport/fntext/begin} (no argument)] | ||
% | ||
% \DescribeSocket[noprint]{tagsupport/fntext/begin} | ||
% | ||
% This socket is used before the main processing socket | ||
% (so before the \cs{insert} command). It opens the FEnote structure. | ||
% As it sets also the tl-var for the current structure and this is used | ||
% in destinations it should not use as tagging socket. | ||
Comment on lines
+519
to
+520
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
% | ||
% | ||
% \item[\socket{tagsupport/fntext/end} (no argument)] | ||
% | ||
% \DescribeSocket[noprint]{tagsupport/fntext/end} | ||
% | ||
% This socket is used after the main processing socket | ||
% (so after the \cs{insert} command). It closes the FEnote structure. | ||
% | ||
% \item[\socket{tagsupport/fntext/mark} (1 argument)] | ||
% | ||
% \DescribeSocket[noprint]{tagsupport/fntext/mark} | ||
% | ||
% | ||
% This socket is used around the mark in the footnote text. | ||
% It adds tagging support but also link support, so like the other | ||
% tagsupport sockets it should be always active. | ||
% | ||
% \item[\socket{tagsupport/fntext/text} (1 argument)] | ||
% | ||
% \DescribeSocket[noprint]{tagsupport/fntext/text} | ||
% | ||
% This socket handles mc-chunks around the text of the footnote. As it | ||
% takes an argument (the text) is should not be use as tagging socket either. | ||
Comment on lines
+542
to
+543
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll stop here, because I think this is a fundamental question that needs to be resolved first |
||
% | ||
% \end{description} | ||
% | ||
% | ||
% 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 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}\footnote{We tag it as \texttt{/footnote} and role map it.} | ||
% 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{/footnotelabel}.} | ||
|
@@ -582,8 +607,8 @@ | |
% with their own structure number as a key in a property. | ||
% | ||
% A following \cs{footnotetext} compares its own \cs{@thefnmark} with the values in | ||
% the prop. If there is a match it stores the structure numbers and removes the entries | ||
% from the properties (so in a normal document the property will never contain more than | ||
% the prop. If there is one or more match it stores the structure numbers and removes the entries | ||
% from the property (so in a normal document the property will never contain more than | ||
% a few entries). | ||
% | ||
% This works well as long as the \cs{footnotemark} commands are issued before the \cs{footnotetext} and | ||
|
@@ -626,9 +651,9 @@ | |
% | ||
% \subsubsection{\cs{footref}} | ||
% | ||
% \cs{footref} use internally the same command to set the mark as \cs{footnotemark}, it only | ||
% \cs{footref} uses internally the same command to set the mark as \cs{footnotemark}, it only | ||
% defines \cs{@thefnmark} differently. This \cs{@thefnmark} is not suitable for the method described | ||
% above, as it contains a reference command it can't be used to match a note, also \cs{footref} can | ||
% above: as it contains a reference command it can't be used to match a note, also \cs{footref} can | ||
% be used after the note has already been set. \cs{footref} disables therefore the automatic detection. | ||
% | ||
% Instead the \cs{label} command is | ||
|
@@ -672,7 +697,7 @@ | |
% | ||
% A \cs{footnotetext} creates a bunch of destinations (in most cases this sums up to | ||
% two destinations): one for every structure number in the \texttt{/Ref} (used as target | ||
% by the mark commands) and one for the structure number of the footnotetest itself | ||
% by the mark commands) and one for the structure number of the footnotetext itself | ||
% (used as target by \cs{footref}s commands). | ||
% | ||
% \subsection{Implementation details regarding tagging} | ||
|
@@ -899,8 +924,8 @@ | |
% This is used to pass the structure number of the note around, e.g. | ||
% to a label inside the note. | ||
% \begin{macrocode} | ||
\tl_new:N \l_@@_currentstruct_tl | ||
\tl_set:Nn \l_@@_currentstruct_tl {1} | ||
\tl_new:N \l_@@_currentstruct_tl | ||
\tl_set:Nn \l_@@_currentstruct_tl {2} | ||
% \end{macrocode} | ||
% | ||
% | ||
|
@@ -1997,11 +2022,7 @@ | |
% \begin{macrocode} | ||
\tl_set:Ne \l_@@_currentstruct_tl { \tag_get:n{struct_num} } | ||
% \end{macrocode} | ||
% 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=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 | ||
% no auto detection is done. | ||
|
@@ -2084,12 +2105,9 @@ | |
\MakeLinkTarget*{footnote*.\l_@@_currentstruct_tl} | ||
% \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} | ||
% the begin of the footnote structure. | ||
% \begin{macrocode} | ||
\tag_struct_begin:n { tag=NonStruct,parent=\l_@@_currentstruct_tl +1 } | ||
\tag_struct_begin:n { tag=footnotelabel,parent=\l_@@_currentstruct_tl,firstkid } | ||
\tag_mc_begin:n { tag=Lbl } | ||
#1 | ||
\tag_mc_end: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given the documentation the socket should not be "tagsupport/..." should it?
perhaps it should contain sockets that have the tagging stuff inside?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think one will have to rethink that. But I would suggest to leave that for after the november release and to improve now only the label tagging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fine, but then I think we should clearly state at the very top that the socket names as well as the suckets are likely to change because of that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment and a Todo.