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
extend label to five data and add hook #956
Changes from 3 commits
e054767
25959b5
ebf1330
411c3c1
fd7eee3
acabc9c
7e9fb3c
3021e9f
a98b2c2
79a2c4f
bab50d6
ba939de
d537bc3
5ecc181
3fa77df
9b6547f
c066f2b
1494dd4
9d23473
05289ae
cd9aacc
4b5fefe
f6cd16e
074218f
5b05881
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,6 +149,29 @@ \section{New or improved commands} | |
% | ||
\githubissue{xxx} | ||
|
||
\subsection{Extension of the \cs{label} command} | ||
|
||
Up to now the \cs{label} command stored in standard \LaTeX{} into the | ||
\cs{newlabel} command in the \texttt{.aux} file two data: | ||
\cs{@currentlabel}, which normally contains the state of the current | ||
counter, and \cs{thepage} for the current page number. \pkg{hyperref} and | ||
\pkg{nameref} patch the \cs{label} command to store five data: | ||
Additionally they save \cs{@currentlabelname}, which normally contains the | ||
current title text and can be retrieved with \cs{nameref} and | ||
\cs{@currentHref} which is the name of the destination needed to create an | ||
active link. The fifth data container is currently only used if external | ||
references are loaded with the \pkg{xr-hyper} package. | ||
|
||
Starting with this release the number of arguments have be unified. | ||
\cs{label} now writes a | ||
\cs{newlabel} command containing five data: \cs{@currentlabel}, | ||
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. with five arguments 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. No! They are not (and in ltxref never become) arguments of anything -- Suggestion: ... command that stores, in its second argument, the following five items of data: 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. container ==> item |
||
\cs{thepage}, \cs{@currentlabelname}, \cs{@currentHref}. The fifth | ||
container is reserved for the kernel and contains data needed for the | ||
tagged PDF project. | ||
|
||
Additionally a hook with the name \texttt{label} has been added. It is | ||
executed before the writing to the \texttt{.aux} file. Code using | ||
the hook can refer to the label argument with \cs{label@name}. | ||
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. if @currentlabelname etc why \label@name and not @labelargument, ie the @ always in the same position? 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. from a general perspective I wonder if there shouldn't actually be 6 arguments (the last 2 key/value lists)
shold probably be discussed elsewhere, not in this pull. 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.
perhaps, but at first the patches from hyperref and nameref should disappear. 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. If changing to 6 items is too difficult, item 6 could contain two sub-items(?), one for holding the user-information (in a well-defined and consistent format) and the other for the kernel. 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. As discussed yesterday, we can do with one argument as long as we define that datastructure in a way that packages (or users) can add to it in a controlled way. But if not we can indeed use 2 brace groups to separate them if that seems advisable in the end. 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. argument ==> (data) item |
||
|
||
\section{Code improvements} | ||
|
||
|
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.
would use "values" not "data" even if data is correct in its plural
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.
or "data items"