In that case, you could use
\space
instead:Code: Select all
\renewcommand*{\thelstlisting}{Code\space\arabic{lstlisting}}
\space
instead:Code: Select all
\renewcommand*{\thelstlisting}{Code\space\arabic{lstlisting}}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Code: Select all
\usepackage{tocloft}
\setlength{\cftchapnumwidth}{0pt} % Pour ajouter un espace devant le titre des chapitres.
\setlength{\cftsecnumwidth}{35pt} % Pour ajouter un espace devant le titre des sections.
\renewcommand{\cftchappresnum}{\chaptername\ }
\setlength{\cftsubsecindent}{53pt} % Pour ajouter un espace devant le No. des sous-sections.
%\renewcommand{\cftchapaftersnum}{~:} % Pour écrire « Chapitre : »
\renewcommand{\cftchapaftersnumb}{\newline}
\renewcommand{\cftchapdotsep}{\cftdotsep} % Ajoute les points . . . devant les chapitres.
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
Code: Select all
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\renewcommand{\thefigure}{\bfseries\arabic{figure}}
\renewcommand{\thetable}{\bfseries\arabic{table}}
\renewcommand{\cfttabpresnum}{\textbf{Tabelle }}
\renewcommand{\cftfigpresnum}{\textbf{Abbildung }}
\renewcommand{\cftfigaftersnum}{\textbf{:}}
\renewcommand{\cfttabaftersnum}{\textbf{:}}
\setlength{\cftfignumwidth}{3.1cm}
\setlength{\cfttabnumwidth}{2.5cm}
\setlength{\cftfigindent}{0cm}
\setlength{\cfttabindent}{0cm}
Code: Select all
\makeatletter
%\renewcommand{\numberline}[1]{\hb@xt@\@tempdima{#1: }}
\renewcommand\l@lstlisting[2]{\@dottedtocline{1}{0cm}{4em}{#1}{#2}}
\makeatother
\begin{document}
\counterwithout{lstlisting}{chapter}
\renewcommand*{\thelstlisting}{Code~\arabic{lstlisting}}
Code: Select all
\makeatletter
\renewcommand{\numberline}[1]{\hb@xt@\@tempdima{#1: }}
\renewcommand\l@lstlisting[2]{\@dottedtocline{1}{0cm}{4em}{#1}{#2}}
\makeatother
\begin{document}
\counterwithout{lstlisting}{chapter}
\renewcommand*{\thelstlisting}{Code~\arabic{lstlisting}}
Code: Select all
\makeatletter
\renewcommand\l@listing[2]{\@dottedtocline{1}{0em}{2.5em}{\textbf{Quellcode}~#1}{#2}} %Bezeichner im Verzeichnis
\renewcommand\thelisting{\textbf{\arabic{listing}:}}
\makeatother
Code: Select all
\renewcommand\listoflistingscaption{Quellcodeverzeichnis} %Bezeichner des Verzeichnisses
\renewcommand\listingname{Quellcode}%Bezeichner des Listings
\clearpage % notwendig sonst stimmt seitenzahl nicht
\addcontentsline{toc}{chapter}{Quellcodeverzeichnis} % Eintrag im Inhaltsverzeichnis
\listoflistings % Listing ausführen
Code: Select all
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\renewcommand{\thefigure}{\bfseries\arabic{figure}}
\renewcommand{\thetable}{\bfseries\arabic{table}}
\renewcommand{\cfttabpresnum}{\textbf{Tabelle }}
\renewcommand{\cftfigpresnum}{\textbf{Abbildung }}
\renewcommand{\cftfigaftersnum}{\textbf{:}}
\renewcommand{\cfttabaftersnum}{\textbf{:}}
\setlength{\cftfignumwidth}{3,1cm}
\setlength{\cfttabnumwidth}{2,5cm}
\setlength{\cftfigindent}{0cm}
\setlength{\cfttabindent}{0cm}
Code: Select all
\usepackage[labelsep=space,labelformat=simple,labelfont=bf]{caption}
\captionsetup[figure]{labelsep=colon,labelformat=simple,labelfont=bf}
\captionsetup[table]{labelsep=colon,labelformat=simple,labelfont=bf}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p