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

Use more overview tables for annotations #3628

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

henrikt-ma
Copy link
Collaborator

This improves the presentation of some sections in the Annotations chapter, by applying the kind of overview table which is used, for example, in 18.7 Simulations.

This change was triggered by me trying to get an overview of the existing annotations, which isn't easy in in the unstructured sections. More sections could be restructured similarly, but I am keeping down the size of this PR by only taking care of two sections in pressing need, and where the transformation is straight-forward.

Also fixing some minor issues which appear to be results of the recent work on formalizing the notation.

\tablehead{Annotation} & \tablehead{Description} & \tablehead{Details}\\
\hline
\hline
{\lstinline!singleInstance!} & Allow at most one instane & \Cref{modelica:singleInstance}\\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{\lstinline!singleInstance!} & Allow at most one instane & \Cref{modelica:singleInstance}\\
{\lstinline!singleInstance!} & Allow at most one instance & \Cref{modelica:singleInstance}\\

\hline
{\lstinline!singleInstance!} & Allow at most one instane & \Cref{modelica:singleInstance}\\
{\lstinline!mustBeConnected!} & Connector must be connected at least once & \Cref{modelica:mustBeConnected}\\
{\lstinline!mayOnlyConnectOnce!} & Connector must be connected at most once & \Cref{modelica:mayOnlyConnectOnce}\\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Description should be consistent with the name:

Suggested change
{\lstinline!mayOnlyConnectOnce!} & Connector must be connected at most once & \Cref{modelica:mayOnlyConnectOnce}\\
{\lstinline!mayOnlyConnectOnce!} & Connector may at most be connected once & \Cref{modelica:mayOnlyConnectOnce}\\


\begin{annotationdefinition}[absoluteValue]
\begin{synopsis}\begin{lstlisting}
/*literal*/ constant Boolean absoluteValue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/*literal*/ constant Boolean absoluteValue;
/*literal*/ constant Boolean absoluteValue = true;

Should keep the default.

@HansOlsson
Copy link
Collaborator

I can understand that this helps, but my concern with adding such tables is that it is a form of duplicated information, which adds a maintenance burden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants