Linked Questions
44 questions linked to/from The 'listings' package and UTF-8
14
votes
2
answers
2k
views
Unicode characters changing order in listings (XeTeX) [duplicate]
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 do ...
4
votes
0
answers
399
views
listingsutf8 in XeLaTeX [duplicate]
In order to cope with utf8 listing files, I want to use listingsutf8.
However on XeLaTeX i receive the warning:
Package listingsutf8 Warning: Package loading is aborted because of missing \pdf@...
1
vote
2
answers
163
views
strange unicode behavior in listings [duplicate]
I have the minimal document here:
\documentclass{article}
\usepackage{unicode-math}
\usepackage{listings}
\setmainfont{Stix}
\setmathfont{Latin Modern Math}
\setmonofont{Fira Mono}
\begin{document}
...
1
vote
1
answer
47
views
Spurious newline inserted by lstlisting when using the font BQN386 [duplicate]
I have a listing rendering problem with source code from the BQN programming language. I use lualatex (LuaHBTeX, Version 1.17.0 (TeX Live 2023)). I tested various fonts and the result is the same. The ...
0
votes
0
answers
74
views
Greek characters in snippets [duplicate]
I have this document class in which I type both in English and Greek.
\documentclass[12pt, a4]{article}
\usepackage{microtype}
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage{xltxtra}
\...
0
votes
0
answers
46
views
Greek letter inside a listings environment [duplicate]
I have some Greek letters in my Python script that I'd like to typeset with a listings environment. I use the FiraCode font that seems to support Greek letters. But the Greek letters sometimes do not ...
1
vote
0
answers
44
views
lstlisting typesets incorrectly some special characters when used with fontspec [duplicate]
This document results in the ellipsis (triple dots) being typeset before the parenthesis. Why is this so? How can I avoid this behavior?
Note that I use the unicode Horizontal Ellipsis U+2026 ...
0
votes
0
answers
15
views
listings changes the order of characters in a line of code [duplicate]
This is my minimum example
\documentclass[a4paper, 10pt]{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}
loads = {'-g·M·e·(Σsines),'; 'wind-like·half-sine,'};
\end{lstlisting}
\end{...
88
votes
7
answers
80k
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...
\documentclass[...
10
votes
4
answers
20k
views
How to set UTF8 in a lstlisting? (Error received)
I need to copy and past some UTF8 code into a lstlisting, but unfortunately, I receive the following error :
! Package inputenc Error: Unicode char \u8:�\lst@FillFixed@\lst@EC� not set up
for use ...
8
votes
4
answers
2k
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: ...
14
votes
1
answer
4k
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}
\usepackage[...
6
votes
3
answers
2k
views
lstlisting: color LaTeX commands like `\\` or `\!`
How can I achieve it with lstlisting, that LaTeX commands like \\ or \! are properly highlighted as syntax?
Adding those commands (with or without backslash) to moretexcs does not deliver the indented ...
7
votes
1
answer
1k
views
I'm having troubles with special chars in listings
I'm using TeXMaker to make a document in LaTeX.
So I already made several listing blocks, and when some error occurred, I simply was making a new line, like this:
{ß}{{\ss}}1
{ü}{{\"u}}1
{ä}{{\"a}}1
...
2
votes
2
answers
3k
views
polish characters ą
I cannot get to work my special chars in listings, my texmaker is configurated to use utf8 in options, but I get error:
! Package inputenc Error: Unicode char \u8:�\lst@FillFixed@ not set up for ...