Skip to content

Commit

Permalink
Add some design comments
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Oct 2, 2020
1 parent 8bb419d commit 8d09d32
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions base/ltzref.dtx
Expand Up @@ -52,6 +52,36 @@
% The names of labels and attributes may be arbitrary. Note that there is
% a single namespace for each.
%
% \subsection{Design discussion}
%
% The design here largely follows ideas from \pkg{zref}. In patrticular, there
% are two independent concepts: attributes that can be recorded between runs,
% and labels which consist of lists of these attributes. The reason for the
% split is that individual labels will want to record some but not all
% attributes. For examples, a label concerned with position would track
% the $x$ and $y$ co-ordinates of the current point, but not for example
% the page number.
%
% In the current implementation, attributes share a single namespace. This
% allows multiple lists to re-use the same attribute, for example page number,
% absolute page number, etc. This does mean that \emph{changing} a standard
% attribute is an issue. However, some attributes have complex definitions
% (again, see \pkg{zref} at present): having them in a single shared space
% avoids the need to copy code.
%
% Labels could be implemented as |prop| data. That is not done at present as
% there is no obvious need to map to or copy the data. As such, faster
% performance is available using a hash table approach as in a \enquote{classical}
% set up. Data written to the |.aux| file uses simple paired \emph{balanced
% text} not keyvals: this avoids any restrictions on names and again offers
% increased performance.
%
% We likely need to think about the use of \tn{@bsphack}/\tn{@esphack}, which
% live at the document command level. We also should look at how changes here
% impact on the main \cs{label} and \cs{ref} commands. In particular, note that
% the referencing command here is expandable, which makes issuing a rerun warning
% more challenging.
%
% \subsection{Code interfaces}
%
% \begin{function}{\ref_attribute_gset:nnnn}
Expand Down

0 comments on commit 8d09d32

Please sign in to comment.