6
votes
2answers
196 views

Can I include Chinese characters in listings? If so, how?

I'd like to include Chinese characters in listings. Can it be done, and, if so, how?
2
votes
0answers
45 views

Unicode and listings - still no luck

Although there are already some discussions on this issue, I can't get any of the proposed solutions to work for me. Take this document and compile it with xelatex: ...
0
votes
0answers
140 views

How to replace (unicode) characters by ü,ğ,ş etc.?

\documentclass[11pt,a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage[T1]{fontenc} ...
8
votes
4answers
215 views

Verbatim, wrappable and Unicode text included from a file

I am trying to output several megabytes of UTF8 text into a printable format. As enscript and friends don't like Unicode, this Unix SE question soon turned to LaTeX. Summary of requirements: ...
4
votes
2answers
134 views

Math escape in listings and surround white space

I want to use the double right arrow for some Scala code in listings. I thought I'd use the mathescape option and $\Rightarrow$. However, this "eats" whitespace around it, e.g. if I have foo ...
5
votes
1answer
146 views

Unicode characters in a listing environment are not colorized!

When using the package listing, colorized comments will not yield colorized exotic unicode characters. This is a minimal working example: \documentclass{minimal} \usepackage{ ...
6
votes
2answers
155 views

Uniform Unicode for text, math and listings?

What should I put in the preamble (preferably packages) for this to work as expected with its unicode characters? \documentclass{article} \usepackage{listings} \begin{document} $α$ α ...
1
vote
0answers
191 views

How to make listings display characters special characters

I am trying to show a directory structure of a tree using the listings package like so: ├── controllers │   ├── application_controller.rb what I get looks like this: controllers ...
3
votes
1answer
208 views

verbments (listings alternative) and UTF-8

This is a follow-up question to UTF8 for listings With these MWE I will not see the german umlauts in the resulted pdf (XeLaTeX was used): \documentclass{article} \usepackage{verbments} ...
6
votes
1answer
432 views

UTF8 for listings

With German umlauts I have to define these characters (Typesetting UTF8 listings with German Umlaute) and the following MWE is working: \documentclass{article} \usepackage[utf8]{inputenc} ...
3
votes
1answer
202 views

odd displays of accentuated characters in lstlisting environment

when i try to write accentuated characters (éà...) in a lstlisting environment, hence : \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{xcolor} ...
8
votes
1answer
136 views

How to apply the star (*) to only a few of the literates in listings environment?

I have a problem with the definition of literate: \lstset{ numbers=left, numberstyle=\footnotesize, stepnumber=1, numbersep=12pt, frame=none, framesep=7pt, breaklines=true, ...
4
votes
2answers
403 views

Unicode characters changing order in listings (XeTeX)

I am trying to input code listings with unicode characters and everything seems to work (more or less) except some unicode characters being displayed out of order. For example instead of służąca ...
7
votes
1answer
241 views

How do I get guillemets in a listing?

I'm wondering if it's possible to use guillemets («») in a lstlisting block? I have seen some solutions for including it in the document, but none with the listings package.
4
votes
1answer
229 views

How to highlight a non-ascii keyword using the listings package? [duplicate]

I'm trying to highlight a couple of keywords which contain non-ASCII characters using the listingsutf8 package. This is the relevant part of my document: \usepackage[brazilian]{babel} ...
15
votes
1answer
636 views

listings package changes hyphens to minus signs

The listings package transforms source-code hyphens (-, U+002D) into minus signs (−, U+2212) when using the default proportional fonts, though not when using the default monospaced typewriter font. A ...
9
votes
2answers
2k views

The 'listings' package and UTF-8

Please, do you know if there's any possibility how to use the listings package together with XeLaTeX? I have to use XelaTeX and therefore I have UTF-8 encoded files. This is not compatible with ...
18
votes
4answers
6k views

Having problems with listings and UTF-8. Can it be fixed?

I'm having some problems with listings and UTF-8 in my document. Maybe someone can help me? Some characters work, like é and ó, but á and others appear at the beginning of words... ...
5
votes
1answer
802 views

UTF-8 (BMP character set) support in listings.

I'm submitting a paper to a journal using LaTeX, and I need to be able to write Unicode symbols into listings. So far, I've been able to get by with the moreverb package. It's listing environment is ...