Verwendete Umgebung: sharelatex.com Minimalbeispiel: Open in Online-Editor
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{listings} \begin{document} \begin{verbatim} apt-get install software-properties-common apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E084DAB9 add-apt-repository ppa:marutter/rrutter apt-get update apt-get upgrade \end{verbatim} \begin{lstlisting} [caption={ein paar Zeilen code}\label{lst:test123},captionpos=t] apt-get install software-properties-common apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E084DAB9 add-apt-repository ppa:marutter/rrutter apt-get update apt-get upgrade \end{lstlisting} \end{document} Problem: Ich möchte die Befehle in ein Dokument einfügen. Beim kompilieren kommen jetzt ganz viele Fehlermeldungen: Open in Online-Editor
Package inputenc Error: Unicode char \u8:‑ not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.12 \end{verbatim} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. main.tex, line 17 Package inputenc Error: Unicode char \u8:�\expandafter\lst@FillFixed@ not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E0... Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. main.tex, line 17 Package inputenc Error: Keyboard character used is undefined (inputenc) in inputencoding `utf8'. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E0... You need to provide a definition with \DeclareInputText or \DeclareInputMath before using this key. main.tex, line 17 Package inputenc Error: Unicode char \u8:�\lst@FillFixed@\lst@EC� not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E0... Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. main.tex, line 17 Package inputenc Error: Keyboard character used is undefined (inputenc) in inputencoding `utf8'. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E0... You need to provide a definition with \DeclareInputText or \DeclareInputMath before using this key. main.tex, line 17 Package inputenc Error: Unicode char \u8:�\lst@EC�\lst@EC� not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E0... Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. main.tex, line 17 Package inputenc Error: Unicode char \u8:�\lst@FillFixed@\lst@EC� not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 ...er keyserver.ubuntu.com ‑‑recv‑keys E084DAB9 Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. main.tex, line 17 Package inputenc Error: Keyboard character used is undefined (inputenc) in inputencoding `utf8'. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 ...er keyserver.ubuntu.com ‑‑recv‑keys E084DAB9 You need to provide a definition with \DeclareInputText or \DeclareInputMath before using this key. main.tex, line 17 Package inputenc Error: Unicode char \u8:�\lst@EC�\lst@EC� not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.17 ...er keyserver.ubuntu.com ‑‑recv‑keys E084DAB9 Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. : Einen Hinweis habe ich hier gefunden, kann ihn nur nicht auf mein Problem übertragen: http://texwelt.de/wissen/fragen/3013/package-inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex-warum-zeigt-das-literaturverzeichnis-keine-umlaute Wie kann ich das Problem lösen? Es fehlen alle '--' komplett Ausgabe: gefragt 13 Feb '15, 13:45 joerg_reuter cgnieder |
Die Zeile Open in Online-Editor
apt‑key adv ‑‑keyserver keyserver.ubuntu.com ‑‑recv‑keys E084DAB9 in beiden Listings enthält nicht »normale« Bindestriche Herausgefunden habe ich das folgendermaßen:
Damit war der Schuldige gefunden: das Zeichen nach Lösung: in der betreffenden Zeile alle Bindestriche durch »normale« Bindestriche ersetzen, zum Beispiel durch Search & Replace. Übrigens: das optionale Argument der Open in Online-Editor
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{listings} \begin{document} \begin{verbatim} apt-get install software-properties-common apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 add-apt-repository ppa:marutter/rrutter apt-get update apt-get upgrade \end{verbatim} \begin{lstlisting}[caption={ein paar Zeilen code}\label{lst:test123},captionpos=t] apt-get install software-properties-common apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 add-apt-repository ppa:marutter/rrutter apt-get update apt-get upgrade \end{lstlisting} \end{document} beantwortet 13 Feb '15, 14:01 cgnieder Vielen Dank. Da wäre ich mein Lebtag nicht drauf gekommen.
(13 Feb '15, 16:06)
joerg_reuter
|
Willkommen auf der TeXwelt!