nifty wrote:I have a document from the author and he is using the listings package. […]
Can't the author just leave the concerned piece of code to you so that you can reproduce the appearance? Nevertheless, a
minimal example that shows your recent efforts would be good to get closer to a solution.
Anyway, you have to set the colors for identifiers and strings explicitly. From what I can see on the pictures you attached, I tried to reproduce the desired output.
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage[dvipsnames]{xcolor}
\lstset{%
basicstyle=\small\ttfamily,
breaklines=true,
columns=fullflexible,
frame=single,
frameround=tttt,
showstringspaces=false
}
\begin{document}
\lstinputlisting[%
language=HTML,
backgroundcolor=\color{Apricot!25},
identifierstyle=\color{magenta!50!black},
stringstyle=\color{blue}
]{scr/html/roll.html}
\end{document}
It goes without saying that this is only a basic example which needs some adjustments, especially regarding the colors. Since you didn't provide any code, I can't explain why the pieces of text you mentioned are colored in your example.
And next time please upload attachments to the forum sever. External links can get lost with time and make a problem incomprehensible later. If necessary, convert and scale images to match the 256kb limit for single attachments.
Thorsten