[okular] [Bug 401944] Copy listings created in Latex not copied properly

Martin bugzilla_noreply at kde.org
Tue Apr 28 13:40:40 BST 2020


https://bugs.kde.org/show_bug.cgi?id=401944

Martin <martin.marmsoler at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |RESOLVED
         Resolution|---                         |NOT A BUG

--- Comment #5 from Martin <martin.marmsoler at gmail.com> ---
By default, the spacing between characters is made uniform so as to preserve
alignments (source:
https://tex.stackexchange.com/questions/99416/latex-source-code-listing-with-less-space-between-characters)

So this is not a problem of okular or any other library. This is to make the
listing clearer to read and the spaces are in the listing it self.

Setting "columns=fullflexible" solves the problem

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{listings} % Syntax Highlining, Programmier sprachen
\begin{document}
        \begin{lstlisting}[columns=fullflexible, language=bash,caption={Skript
um für Eclipse die Projektdateien zu erstellen}]
        #!/bin/bash
        sudo apt-get install libevdev-dev libglib2.0-dev
        sudo apt-get install libpcre3 libpcre3-dev lzma lzma-dev
        \end{lstlisting}
\end{document}

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list