0
votes
0answers
41 views

How can I mimic the style of 'algorithm' in an 'lstlisting' environment?

In my LaTeX document, I have an algorithm added using algorithm and algorithmic: \documentclass{article} \usepackage{graphicx} \usepackage{apalike} \usepackage{setspace} \usepackage{amsmath} % ...
2
votes
2answers
73 views

Arabic font for Listing

Currently, I am using Listings package in order to insert my XML text in the document. For example the code: \begin{lstlisting} <Product Title="نوکیا" Type="گوشی"> \end{lstlisting} The ...
2
votes
1answer
58 views

Listings refuses to highlight identifiers such as 'intent–filter'. Why?

I have some xml code, which I want to look fine in my latexdocument. I am doing it this way: \documentclass[12pt]{scrartcl} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} ...
1
vote
1answer
36 views

How can I have a hyphenated XML tag in a listing?

Consider the following valid XML according to http://stackoverflow.com/a/1478623/1443496? \documentclass{article} \usepackage{listings} \lstset{ language=xml, morekeywords=some-tag, } ...
1
vote
1answer
91 views

Why is lstlisting splitting my XML tags?

I have a little problem with this ambient. I have some XML to insert into my document and the thing that really bugs me is that the new line breaks a closing tag in two. I indicated to the environment ...
4
votes
1answer
170 views

Color lines in source code that is embedded in LaTeX

I am looking for a way to mark some lines in a source code sample that will be integrated into my LaTeX code. I already found solutions to embed source code and have syntax highlighting like this ...
8
votes
1answer
91 views

How to omit the last four lines of a sample code in listing

I am using the listings package to include xml samples in the documentation I am writing. I am aware of the firstline and lastline attributes \lstinputlisting[firstline=4,lastline=24]{example.xml} ...
1
vote
1answer
157 views

XML with Listings: Different colors for attributes and elements

How can I make every attribute name in color X and every element name in color Y without adding keywords and stuff? What I did so far: \lstdefinelanguage{myXML} { morestring=[b]", ...
5
votes
1answer
3k views

Including XML file into LaTeX

I am using LaTeX for very first time and have very basic knowledge about it. I am using the template from here to write my thesis. I am using Ubuntu 12.04. When I try to include a small XML file in ...
10
votes
1answer
2k views

Listings package does not break

The following code does not break even though the breaklines and breakatwhitespace is set: \lstset{ language=XML, numbers=left, numberstyle=\tiny\color{gray}, stepnumber=1, ...
6
votes
1answer
2k views

XML syntax highlighting does not work

How do I make comments highlighted in the form: <!-- ======= Processing Root tag ======= --> . This is not working. \documentclass[11pt]{scrartcl} \usepackage{listings, color} ...
7
votes
3answers
770 views

Best way to write an xml tag

I'm writing a document about an XML schema, and I will be talking a lot of times about that <tag1> or that other <tag2>. Since I'm only mentioning them and not printing a whole XML file, ...
2
votes
1answer
1k views

How to render XML tag brackets bold with listings package?

I'm currently using the listings package to render my XML snippets. The default XML language settings recognize elements, attribute and text properly and my style is set to render tag names bold, ...
9
votes
2answers
3k views

XML highlighting - different style for attributes

I need to highlight syntax in my LaTeX presentation, so i've found this answer: XML syntax highlighting \lstdefinelanguage{XML} { morestring=[b]", morestring=[s]{>}{<}, ...
26
votes
5answers
23k views

XML syntax highlighting

I use the following code to include some XML code: \lstset{language=XML} \begin{lstlisting} <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" ...