0

I am trying to get rid of strange spacing between words in lstlisting. enter image description here

\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}
  • Though I did answer your question, please don't remove your code since it might be of interest for future readers! – Skillmon Jul 12 '17 at 14:31
4

In \lstset use showstringspaces=false.

  • 1
    Good guesswork, but this is not how the site works. The code is necessary in order for the thread be useful to other readers. – egreg Jul 12 '17 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.