helpListings package for LaTeX - Support: sr #315, Listings and XML

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

sr #315: Listings and XML

Submitted by:  Brooks Moses <brooks>
Submitted on:  Wed Apr 13 05:13:46 2011  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Wed Apr 13 05:13:46 2011, original submission:

Franco Alberto Cardillo wrote, on Fri, 05 Mar 2010 13:29:36 +0100:


Hello Sir,
I need to put beautifully formatted XML source code in a latex document. I chose to use the Listings package and read the documentation. However, I am not able to modify how the XML code is printed.

I want to insert the following XML code:

<?xml version='1.0' encoding='UTF-8'?>
<BASE>
<NAME>myName</NAME>
<DOMAIN>domain</DOMAIN>
<NOTICES>
<NOTICE ID="ID">
...
</NOTICE>
</NOTICES>
</BASE>

I am able to have BASE, DOMAINE, etc in green color, however I am not able to have <, >, <?, etc in that color or another one at the same time.

The latex source code follows (the commented lines are previous attempts).

stset{
language=XML,
basicstyle=\ttfamily\footnotesize,
frame=leftline,
backgroundcolor=\color{bggray},
stringstyle=\color{blue},
%emph={[1]<,>}, emphstyle={[1]\color{red}},
%emph={[1]NOTICE,NOTICES,NAME,BASE,DOMAINE}, emphstyle={[1]\color{red}},
%emph={[2]<?,?>}, emphstyle={[2]\color{green}},
morekeywords={[1]NOTICE,NOTICES,NAME,BASE,DOMAINE},keywordstyle={[1]\color{red}},
%otherkeywords={<NOTICE>,</NOTICE>},keywordstyle=\color{red}
}}{}

I hope you will find some minutes to help me.

Thanks anyway!
Regards,
FA Cardillo

Brooks Moses <brooks>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by brooks (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray