Skip to content

Commit

Permalink
Add escape around 'and' that's considered natural language
Browse files Browse the repository at this point in the history
This makes sense when thinking of this lstlisting as a quick and dirty way of writing an equation with lots of inline code, and then this 'and' would have been inside \text{...}.
  • Loading branch information
henrikt-ma committed Jun 17, 2020
1 parent 7047859 commit 572d1a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapters/arrays.tex
Expand Up @@ -675,7 +675,7 @@ \subsection{Array Concatenation}\doublelabel{array-concatenation}
Formally, the concatenation \lstinline[mathescape=true]!R = cat($k$, A, B, C, $\ldots$)! is defined as follows. Let $n$ = \lstinline!ndims(A)! = \lstinline!ndims(B)! = \lstinline!ndims(C)! = \ldots Then the size of \lstinline!R! is given by
\begin{lstlisting}[language=modelica,escapechar=!,mathescape=true,frame=none,xleftmargin=1em]
size(R,$k$) = size(A,$k$) + size(B,$k$) + size(C,$k$) + $\ldots$
size(R,$j$) = size(A,$j$) = size(B,$j$) = size(C,$j$) = $\ldots$ !for! $1 \leq j \leq n$ and $j \neq k$
size(R,$j$) = size(A,$j$) = size(B,$j$) = size(C,$j$) = $\ldots$ !for! $1 \leq j \leq n$ !and! $j \neq k$
\end{lstlisting}
and the array elements of \lstinline!R! are given by
\begin{lstlisting}[language=modelica,escapechar=!,mathescape=true,frame=none,xleftmargin=1em]
Expand Down

0 comments on commit 572d1a9

Please sign in to comment.