"ptm" erscheint über CodeListing
Hallo zusammen,
ich schreibe aktuell meine erste Arbeit mit LaTeX und habe ein Problem bei den CodeListings. Wenn ich das Listing einfüge generiert OverLeaf die Buchstuben "ptm" direkt darüber, obwohl sich diese nirgends in meinem geschriebenen Dokument befinden.
So erstelle ich das Listing:
> \begin{lstlisting}[language=Java, caption=example]
> Hier ist Ich kann leider keine Biler hochladen daher so als Beispiel:
ptm
(hier fängt der Codeblock an)
1 H i e r i s t Programmcode
> \end{lstlisting}
Und hier sind meine Einstellungen zu den Listings:
> (hier endet der Codeblock)
Listing 6.1: example
Minimalbeispiel:
\documentclass[
paper = a4,
fontsize = 12pt,
headinclude = true,
% start chapters on the right side
open = right,
% Use twosided layout? Every chapter starts on the right side, therefore sometimes blank pages are added between chapters.
twoside = false,
BCOR = 10mm,
% add lists and bibliography to table of contents
toc = listofnumbered,
toc = bibnumbered,
% enumerate chapters as x.y instead of x.y.
numbers = noendperiod
]{scrreprt}
% use some additional package, add your own below if required
\usepackage[a4paper]{geometry}
\usepackage{subcaption}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{setspace}
\setstretch{1.5}
\usepackage[nottoc,numbib, notlof]{tocbibind}
\usepackage{float}
\newcommand\frontmatter{%
\cleardoublepage
\pagenumbering{roman}}
\newcommand\mainmatter{%
\cleardoublepage
\pagenumbering{arabic}}
\newcommand\backmatter{%
\cleardoublepage
\pagenumbering{Roman}}
% package for code listings
\usepackage{listings}
>
> \definecolor{lst_comments}{rgb}{0,
> % package providing colors (e.g. for syntax highlighting in listings)
\usepackage{xcolor}
% package for german language, change to english if required
\usepackage[ngerman]{babel}
\usepackage[german=quotes]{csquotes}
\usepackage{xpatch}
\usepackage{hyphenat}
% package to set the line spacing
\usepackage{setspace}
% package for hyperlinks (e.g., in the table of contents) and set links to same style as text
\usepackage[hidelinks]{hyperref}
% package to create acronyms
\usepackage[acronym]{glossaries}
% package for pseudocode
\usepackage[german, algochapter, linesnumbered]{algorithm2e}
% package to create diagrams
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.geometric, arrows}
\tikzset{font={\fontsize{10pt}{12}\selectfont}}
%%% additions by ACV
% Citations using APA style with biblatex
\usepackage[style=alphabetic, labelnumber, defernumbers=true, urldate=long, dateabbrev=false,backend=biber,backref=false,maxbibnames=20]{biblatex}
% Biblatex allows multiple bib-files
\addbibresource{bibliography/sources.bib}
% Tables using APA Style
\usepackage{booktabs}
% use microkerning for improved typesetting
\usepackage{microtype}
% include acronyms
% avoid bold caption for algorithms to be consistent with other captions
\SetAlCapSty{}
\SetNlSty{footnotesize}{}{}
% definitions for syntax highlighting in listings environment
% define custom colors for syntax highlighting in code listings
\definecolor{lst_comments}{rgb}{0, 0.75, 0} \definecolor{lst_linenumbers}{rgb}{0.2,
> 0}
\definecolor{lst_linenumbers}{rgb}{0.2, 0.2, 0.2} 0.2}
\definecolor{lst_keywords}{rgb}{0, 0,
> 0.75} \definecolor{lst_strings}{rgb}{0.75,
> 0, 0.75}
\definecolor{lst_strings}{rgb}{0.75, 0, 0}
> \definecolor{lst_background}{rgb}{0.97,
> \definecolor{lst_background}{rgb}{0.97, 0.97, 0.97}
>
>
% define style for listings
\lstdefinestyle{msqc_style}{
> backgroundcolor=\color{lst_background},
>
> backgroundcolor=\color{lst_background},
commentstyle=\color{lst_comments},
> keywordstyle=\color{lst_keywords},
> stringstyle=\color{lst_strings},
> % style of the line numbers on the left side
> numberstyle=\tiny\color{lst_linenumbers},
> % use monospace font for code and set size to the size of footnotes
> basicstyle=\rmdefault\footnotesize,
> % xleftmargin=2em,
% break long lines, if this happens it might be better to manually add a line break at an propriate appropriate place
> breaklines = true,
> % place caption below the listing
> captionpos = b,
> % don't drop spaces to fix alignment and always convert tabs to spaces
> keepspaces = true,
> % place line numbers on the left side
> numbers = left,
> % distance between line numbers and listing
> numbersep = 5pt,
> % don't show special characters for spaces
> showspaces = false,
> % don't show special characters for spaces in strings
> showstringspaces = false,
> % don't show special characters for tabs
> showtabs = false,
> % set size of tab to 4 spaces
> tabsize = 2 } 2
}
% set style for the document
> \lstset{style=msqc_style}
Ich kann leider keine Biler hochladen daher so als Beispiel:
ptm
(hier fängt der Codeblock an)
1 H i e r i s t
% set line spacing to 1.5
\onehalfspacing
\makeglossaries
\geometry{a4paper,left=45mm,right=20mm, top=30mm, bottom=3cm}
\begin{document}
\begin{lstlisting}[language=Java]
Hier ist Programmcode
(hier endet der Codeblock)
Listing 6.1: example
\end{lstlisting}
\end{document}
Hat jemand eine Idee, warum das "ptm" über den Codeblock generiert wird?