我正在尝试消除 lstlisting 中单词之间的奇怪间距。
\lstnewenvironment{code}[1][]%
{\noindent\minipage{\linewidth}\medskip
\lstset{basicstyle=\ttfamily\small,#1,columns=fullflexible, sensitive=true, language=XML, breaklines=true,
morekeywords={rdf,rdfs,owl,SELECT,CONSTRUCT,DESCRIBE,ASK,WHERE,FROM,NAMED,PREFIX,BASE,OPTIONAL,FILTER,GRAPH,LIMIT,OFFSET,SERVICE,UNION,EXISTS,NOT,BINDINGS,MINUS,a}
}}
{\endminipage}
_
\begin{code}
<http://www.example.com/humans.rdfs#hasMother> a rdf:Property;
rdfs:label "has for mother"@en,
\end{code}
答案1
正在\lstset
使用showstringspaces=false
。