← Prev in month ← Prev in thread
Next in thread → Next in month →

[PATCH] formatting: escape \ldots in lstlisting

From
Michael S. Tsirkin <>
Date
2014-12-23T20:43:34+00:00
ID
Thread
[PATCH] formatting: escape \ldots in lstlisting
\ldots does not work within lstlisting, the result is
\ldots verbatim in the PDF output.

To fix, make $ an escape character, and escape the sequence:
$\ldots$

VIRTIO-115

Cc: Thomas Huth <>
Signed-off-by: Michael S. Tsirkin <>

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/branches/v1.0@452 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---

OK, I found a way to make \ldots work in lstlisting after all.
Checked in the following.

 content.tex | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/content.tex b/content.tex
index 66a1ed4..56c9807 100644
--- a/content.tex
+++ b/content.tex
@@ -4786,10 +4786,12 @@ according to the native endian of the guest rather than
 The controlq is used for other SCSI transport operations.
 Requests have the following format:
 
+{
+\lstset{escapechar=\$}
 \begin{lstlisting}
 struct virtio_scsi_ctrl {
         le32 type;
-\ldots
+$\ldots$
         u8 response;
 };
 
@@ -4803,6 +4805,7 @@ struct virtio_scsi_ctrl {
 #define VIRTIO_SCSI_S_FAILURE                  9
 #define VIRTIO_SCSI_S_INCORRECT_LUN            12
 \end{lstlisting}
+}
 
 The \field{type} identifies the remaining fields.
 
-- 
MST
← Prev in month ← Prev in thread
Next in thread → Next in month →