im working on a project and on my paper im requiered to name the listings “Auflistung” but latex keeps naming them “Abbildung”. I tried using the comand renewcommand{lstlistingname}{Auflistung} but its not working as it keeps naming the list ing “Abbildung”
this is in my preamble:
usepackage{mathptmx}
usepackage[scaled=.92]{helvet}
usepackage{courier}
usepackage[a4paper,
margin=2.54cm,
marginparwidth=2.0cm,
footskip=1.0cm]{geometry}
clubpenalty=10000
widowpenalty=10000
displaywidowpenalty=10000
usepackage[
style=alphabetic,
backend=biber,
%backref=true
]{biblatex}
bibliography{jobname.bib}
DeclareFieldFormat*{title}{
mkbibemph{#1}}
usepackage{amssymb, amsmath}
usepackage{bm}
usepackage{graphicx}
usepackage[
breaklinks,
hidelinks,
pdfdisplaydoctitle,
pdfpagemode = {UseOutlines},
pdfpagelabels,
]{hyperref}
urlstyle{rm}
%usepackage{apacite}
usepackage{ngerman}
usepackage{microtype}
usepackage{listings}
usepackage{float}
usepackage{caption}
usepackage{xargs}
usepackage[pdftex,dvipsnames]{xcolor}
usepackage{scrhack}
renewcommand{lstlistingname}{Auflistung}
lstset{
language=Python, % Setzen Sie die Sprache
basicstyle=ttfamilysmall, % Grundstil
keywordstyle=color{blue}, % Stil für Schlüsselwörter
commentstyle=color{gray}, % Stil für Kommentare
stringstyle=color{red}, % Stil für Strings
numberstyle=tinycolor{gray}, % Stil für Zeilennummern
stepnumber=1, % Jede Zeile nummerieren
numbersep=0pt, % Abstand zwischen Nummern und Code
showstringspaces=false, % Leerzeichen in Strings nicht anzeigen
tabsize=4, % Tabulatorgröße
breaklines=true, % Zeilen umbrechen
breakatwhitespace=false, % Zeilenumbruch nur bei Leerzeichen
numbers=left, % Zeilennummern links anzeigen
firstnumber=1, % Erste Zeilennummer
numberfirstline=true, % Nummeriert die erste Zeile
}
%
setlength {marginparwidth }{2cm}
usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
newcommandx{unsure}[2][1=]{todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,#1]{#2}}
newcommandx{change}[2][1=]{todo[linecolor=blue,backgroundcolor=blue!25,bordercolor=blue,#1]{#2}}
newcommandx{info}[2][1=]{todo[linecolor=OliveGreen,backgroundcolor=OliveGreen!25,bordercolor=OliveGreen,#1]{#2}}
newcommandx{improvement}[2][1=]{todo[linecolor=Plum,backgroundcolor=Plum!25,bordercolor=Plum,#1]{#2}}
newcommandx{thiswillnotshow}[2][1=]{todo[disable,#1]{#2}}
and this is a example of how i use the listing:
begin{figure}[H]
centering
begin{minipage}{1textwidth}
begin{lstlisting}
def prozess(env):
yield env.timeout(5)
end{lstlisting}
end{minipage}
caption{Simples Beispiel wie das Timeout-Event in SimPy verwendet wird.}
label{fig:SimPyTimeout}
end{figure}
i really have no idea what to do so any help would be appreciated
i used renewcommand{lstlistingname}{Auflistung} but that dosen’t work
ben b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.