Skip to content

Commit

Permalink
Improve comments in the LaTeX source
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 28, 2020
1 parent 884f556 commit 71cb366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chapters/annotations.tex
Expand Up @@ -273,7 +273,7 @@ \subsubsection{Text Markup in Captions}\label{text-markup-in-captions}
Links take the form \lstinline!%[$\mathit{text}$]($\mathit{link}$)!, where the \lstinline![$\mathit{text}$]! part is optional except for vendor-specific links, and text markup escape sequences don't apply inside the $\mathit{link}$. The $\mathit{link}$ can be in either of the following forms, where the interpretation is given by the first matching form:
\begin{itemize}
\item A \lstinline!variable:$\mathit{id}$!, where $\mathit{id}$ is a component reference in the form of \lstinline[language=grammar]!component-reference! in the grammar, such as \lstinline!inertia1.w!.
% The 'plt:id' form below should be deprecated in favor of using an improved form of Modelica URI in the future, making 'variable:id' the only non-URI.
% The 'plot:id' form below should be deprecated in favor of using an improved form of Modelica URI reference in the future, making 'variable:id' the only non-URI reference.
\item A \lstinline!plot:$\mathit{id}$!, where $\mathit{id}$ is the identifier of a \lstinline!Plot! in the current \lstinline!Figure!.
\item A vendor-specific URI expressed using a URI with scheme \lstinline!__$\mathit{nameOfVendor}$!, where $\mathit{nameOfVendor}$ is in the form of a valid URI scheme, conveying the name of the vendor defining the meaning of the link. A tool which does not understand the vendor-specific meaning of the link shall not send the URI to the operating system for interpretation, but only display the $\mathit{text}$ (which is mandatory for this form of link). A tool which understands the vendor-specific meaning is not required to use the $\mathit{text}$. A link with vendor-specific URI is denoted a \firstuse{vendor-specific link}.
% Use very short Modelica URI combined with carefull chosen wording below to deal with difficult line breaking.
Expand All @@ -292,7 +292,7 @@ \subsubsection{Text Markup in Captions}\label{text-markup-in-captions}
Similarly, the closing parenthesis `)' must be handled with care in $\mathit{link}$ in order to not be interpreted as the terminating delimiter of the \lstinline!($\mathit{link}$)!.
\begin{itemize}
\item For a \lstinline!variable:!, no special treatment is needed, as the component reference syntax of the \lstinline!<id>! allows parentheses to appear without risk of misinterpretation inside a quoted identifier. For example, \lstinline"%(variable:'try)me!')" has a parenthesis in \lstinline"'try)me!'" that must not be mistaken for the end of the \lstinline!($\mathit{link}$)!.
% The following shortcoming is planned to be addressed by applying URI interpretation of the 'plot:' form.
% The following shortcoming would be resolved if the 'plot:id' form was replaced by a Modelica URI reference, thanks to URL encoding.
\item For a \lstinline!plot:!, there is currently no way to reference a plot with `)' in its \lstinline!identifier!.
\item For a URI, a closing parenthesis must be URL encoded in order to not be interpreted as the end of the \lstinline!($\mathit{link}$)!. For example, the URL in \lstinline[language={[nocomment]modelica}]!%(http://bad.org/(tryme))! is just \filename{http://bad.org/(tryme}, and the entire link is followed by a stray closing parenthesis. To make it work, one has to use URL encoding: \lstinline[language={[nocomment]modelica}]!%(http://bad.org/%28tryme%29)! (using URL encoding of the opening parenthesis just for symmetry, and note that the \lstinline!%! of the percent-encoded sequences are not subject to text markup escape sequences).
\end{itemize}
Expand Down

0 comments on commit 71cb366

Please sign in to comment.