Skip to content

Instantly share code, notes, and snippets.

@Robadob
Created July 25, 2019 11:07
Show Gist options
  • Save Robadob/acde8f771b4e691244f1c8b55051e50e to your computer and use it in GitHub Desktop.
Save Robadob/acde8f771b4e691244f1c8b55051e50e to your computer and use it in GitHub Desktop.
%preamble
\usepackage{listings}
\usepackage{algorithm}
\usepackage{xcolor}
\lstdefinestyle{xml} {
language=XML,
extendedchars=true,
breaklines=true,
breakatwhitespace=true,
emph={},
emphstyle=\color{red},
basicstyle=\ttfamily,
columns=fullflexible,
commentstyle=\color{gray}\upshape,
morestring=[b]",
morecomment=[s]{<?}{?>},
morecomment=[s][\color{forestgreen}]{<!--}{-->},
keywordstyle=\color{orangered},
stringstyle=\ttfamily\color{black}\normalfont,
tagstyle=\color{blue}\bf,
morekeywords={attribute,xmlns,version,type,release},
}
%document body
\begin{algorithm}
\lstinputlisting[style=xml]{test.xml}
\caption{Some Caption.}
\end{algorithm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment