为参考书目添加编号

为参考书目添加编号

我无法使参考书目中的编号起作用。目前它看起来像这样: 在此处输入图片描述

我希望有Literatur这样的线路13 Literatur

这些是我的文件包:

\documentclass[
    a4paper,
    oneside,
    11pt,
    fleqn,
    headsepline,
    toc=listofnumbered, 
    bibliography=totocnumbered
    ]{scrartcl}
    \usepackage[bottom=3.5cm]{geometry}

    % deutsche Trennmuster etc.
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[english, ngerman]{babel} % \selectlanguage{english} if  needed
    \usepackage{lmodern} % use modern latin fonts

    % Custom commands
    \newcommand{\AUTHOR}{MY NAME}
    \newcommand{\INSTITUTE}{UNI}
    \newcommand{\LICENSEURL}{}
    \newcommand{\LICENSE}{}

    % Jede Überschrift 1 auf neuer Seite
    \let\stdsection\section
    \renewcommand\section{\clearpage\stdsection}

    % Multiple Authors
    \usepackage{authblk}

    % Include external pdf
    \usepackage{pdfpages}

    % Layout / Seitenränder
    \usepackage{geometry}

    % Inhaltsverzeichnis
    \usepackage{makeidx} 
    \makeindex

    \usepackage{url}
    \usepackage[pdfborder={0 0 0}]{hyperref}
    \usepackage[all]{hypcap}
    \usepackage{hyperxmp} % for license metadata

    \usepackage{tikz}

    % Glossar und Abkürzungsverzeichnis
    \usepackage[acronym,toc,nopostdot]{glossaries}
    \setglossarystyle{altlist}
    \usepackage{xparse}
    \DeclareDocumentCommand{\newdualentry}{ O{} O{} m m m m } {
        \newglossaryentry{gls-#3}{
            name={#4 : #5},
            text={#5\glsadd{#3}},
            description={#6},
            #1
        }
        \makeglossaries
        \newacronym[see={[Siehe:]{gls-#3}},#2]{#3}{#4}{#5\glsadd{gls-#3}}
    }
    \makeglossaries

    % Mathematik
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage{amsfonts}
    \usepackage{enumitem}

    % Images
    \usepackage{graphicx}
    \graphicspath{{images/}} % default paths

    % Boxes
    \usepackage{fancybox}

    %Tables
    \usepackage{tabularx}
    \usepackage{tabu}
    \usepackage{booktabs} % toprule, midrule, bottomrule
    \usepackage{array} % for matrix tables

    % Multi Columns
    \usepackage{multicol}

    % Header and footer
    \usepackage{scrlayer-scrpage}
    \setkomafont{pagehead}{\normalfont}
    \setkomafont{pagefoot}{\normalfont}
    \automark*{section}
    \clearpairofpagestyles
    \ihead{\headmark}
    \ohead{\AUTHOR}
    \cfoot{\pagemark}

    % Pseudocode
    \usepackage{algorithmic}
    \usepackage[linesnumbered,ruled]{algorithm2e}

    % Code Listings
    \usepackage{listings}
    \usepackage{color}
    \usepackage{beramono}

    \definecolor{bluekeywords}{rgb}{0,0,1}
    \definecolor{greencomments}{rgb}{0,0.5,0}
    \definecolor{redstrings}{rgb}{0.64,0.08,0.08}
    \definecolor{xmlcomments}{rgb}{0.5,0.5,0.5}
    \definecolor{types}{rgb}{0.17,0.57,0.68}

    \lstdefinestyle{visual-studio-style}{
        language=[Sharp]C,
        columns=flexible,
        showstringspaces=false,
        basicstyle=\footnotesize\ttfamily, 
        commentstyle=\color{greencomments},
        morekeywords={partial, var, value, get, set},
        keywordstyle=\bfseries\color{bluekeywords},
        stringstyle=\color{redstrings},
        breaklines=true,
        breakatwhitespace=true,
        tabsize=4,
        numbers=left,
        numberstyle=\tiny\color{black},
        frame=lines,
        showspaces=false,
        showtabs=false,
        escapeinside={£}{£},
    }

    \definecolor{DarkPurple}{rgb}{0.4, 0.1, 0.4}
    \definecolor{DarkCyan}{rgb}{0.0, 0.5, 0.4}
    \definecolor{LightLime}{rgb}{0.3, 0.5, 0.4}
    \definecolor{Blue}{rgb}{0.0, 0.0, 1.0}

    \lstdefinestyle{cevelop-style}{
        language=C++,  
        columns=flexible,
        showstringspaces=false,     
        basicstyle=\footnotesize\ttfamily, 
        keywordstyle=\bfseries\color{DarkPurple},
        commentstyle=\color{LightLime},
        stringstyle=\color{Blue}, 
        escapeinside={£}{£}, % latex scope within code      
        breaklines=true,
        breakatwhitespace=true,
        showspaces=false,
        showtabs=false,
        tabsize=4,
        morekeywords={include,ifndef,define},
        numbers=left,
        numberstyle=\tiny\color{black},
        frame=lines,
    }

    \lstdefinestyle{eclipse-style}{
        language=Java,  
        columns=flexible,
        showstringspaces=false,     
        basicstyle=\footnotesize\ttfamily, 
        keywordstyle=\bfseries\color{DarkPurple},
        commentstyle=\color{LightLime},
        stringstyle=\color{Blue}, 
        escapeinside={£}{£}, % latex scope within code      
        breaklines=true,
        breakatwhitespace=true,
        showspaces=false,
        showtabs=false,
        tabsize=4,
        morekeywords={length},
        numbers=left,
        numberstyle=\tiny\color{black},
        frame=lines,
    }
    \lstset{style=eclipse-style}

    \lstdefinelanguage{JavaScript}{
        keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break, let, const,any},
        keywordstyle=\color{blue}\bfseries,
        ndkeywords={class, export, boolean, throw, implements, import, this},
        ndkeywordstyle=\color{darkgray}\bfseries,
        identifierstyle=\color{black},
        sensitive=false,
        comment=[l]{//},
        morecomment=[s]{/*}{*/},
        commentstyle=\color{purple}\ttfamily,
        stringstyle=\color{red}\ttfamily,
        morestring=[b]',
        morestring=[b]"
    }

    \setlength{\parindent}{0pt}
    \setlength{\parskip}{1em}


    % Theorems \begin{mytheo}{title}{label}
    \usepackage{tcolorbox}
    \tcbuselibrary{theorems}
    \newtcbtheorem[number within=section]{definiton}{Definition}%
    {fonttitle=\bfseries}{def}
    \newtcbtheorem[number within=section]{remember}{Merke}%
    {fonttitle=\bfseries}{rem}
    \newtcbtheorem[number within=section]{hint}{Hinweis}%
    {fonttitle=\bfseries}{hnt}

    % Additional packages
    \usepackage{subfigure}
    \usepackage{footnote}
    \makesavenoteenv{tabular}
    \makesavenoteenv{table}
    \usepackage{svg}
    \usepackage{float}
    \usepackage{dblfloatfix}
    \usepackage{booktabs,caption}
    \usepackage{bookmark}
    \usepackage{apacite}
    \usepackage{lscape}
    \usepackage{pdflscape}

以下是添加我的参考书目的方式:

% Bibliography
\bibliographystyle{apacite}
\bibliography{Quellen}

谢谢你的帮助!

答案1

apacite包有这个选项numberedbib。将包加载为

\usepackage[numberedbib]{apacite}

相关内容