Skip to content

Commit

Permalink
Remove possibility to wrap code fragment in double quotes
Browse files Browse the repository at this point in the history
As suggested by Hans.
  • Loading branch information
henrikt-ma committed Dec 27, 2022
1 parent 3356f85 commit 02d1c34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chapters/arrays.tex
Expand Up @@ -1263,7 +1263,7 @@ \subsection{Element-wise Division}\label{array-element-wise-division}\label{elem
2./[1, 2; 3, 4] // error; same as 2.0 / [1, 2; 3, 4]
2 ./[1, 2; 3, 4] // fine; element-wise division
\end{lstlisting}
This is a consequence of the parsing rules, since ``\lstinline!2.!'' is a lexical unit. Using a space after the literal solves the problem.
This is a consequence of the parsing rules, since `\lstinline!2.!' is a lexical unit. Using a space after the literal solves the problem.
\end{example}

\subsection{Element-wise Exponentiation}\label{element-wise-exponentiation}
Expand Down
8 changes: 2 additions & 6 deletions styleguide.md
Expand Up @@ -193,12 +193,8 @@ Symbolic ordinals: $n$th, $(n+1)$th.

Inline code is typically formatted using just the `\lstinline` macro.

Since the change of type face can be very hard to notice for small code fragments, quotes may sometimes be used to emphasize the distinction from the surrounding text, unless the code fragment consists of a single identifier (consistent presentation of identifiers is given higher priority than clarity of presentation in this case).
Use single quotes for a single letter code fragment, for example:
```
When automatically deriving a name, any trailing `\lstinline!1!' in the …
```
Use double quotes for a multi-letter code fragment, for example:
Since the change of type face can be very hard to notice for small code fragments, single quotes may sometimes be used to emphasize the distinction from the surrounding text, unless the code fragment consists of a single identifier (consistent presentation of identifiers is given higher priority than clarity of presentation in this case).
For example:
```
… and prepending the reduction expression with ``\lstinline!functionName(!''.
```
Expand Down

0 comments on commit 02d1c34

Please sign in to comment.