Skip to content
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

Clarify the uniqueness of Figure and Plot identifiers #2544

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,16 @@ \subsection{Annotations for Figures\doublelabel{annotations-for-figures}}
replacements, as described in \autoref{variable-replacements}, can be used in the
\lstinline!title! of \lstinline!Figure! and \lstinline!Plot!.

The \lstinline!identifier! in \lstinline!Figure! and \lstinline!Plot! is
optional, and is intended for programmatic access. A \lstinline!Figure!
\lstinline!identifier! must be unique within the class containing the
\lstinline!figures! annotation, whereas a \lstinline!Plot!
\lstinline!identifier! must be unique among the \lstinline!plots! in the
\lstinline!Figure! annotation.
The \lstinline!identifier! in \lstinline!Figure! and \lstinline!Plot! is an
optional \lstinline!String! identifier, and is intended to identify the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to say it's a String here, given the pseudo-code record definitions?

Copy link
Member Author

@otronarp otronarp Apr 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of the confusion was about the identifiers living in the same namespace as everything else, spelling out String here should make that more clear.

Copy link
Collaborator

@henrikt-ma henrikt-ma Apr 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's see if it the kind of clarification @gkurzbach was looking for, and perhaps see if @HansOlsson wants to have a say on the general style.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think it is fine now.

\lstinline!Figure! and \lstinline!Plot! for programmatic access. A
\lstinline!Figure! must be uniquely identified by its \lstinline!identifier! and
containing class. This means that a \lstinline!Figure! \lstinline!identifier!
must be unique among all \lstinline!Figure! annotations within the same
\lstinline!figures! annotation as well as among all \lstinline!figures!
annotations from inherited classes. A \lstinline!Plot! \lstinline!identifier!
on the otherhand is only required to be unique among the \lstinline!plots! in
the the same \lstinline!Figure! annotation.

\begin{nonnormative}
For \lstinline!Figure!, this makes it possible to reference the plot from a
Expand Down