部分章节缺少丹麦语格式

部分章节缺少丹麦语格式

从图中可以清楚看出,尽管丹麦语格式存在于章节、小节和正文中,但它并未正确包含在各个章节中。enter image description here代码在这里`

序言中的代码如下:

在 main.tex 文件中,使用了命令 \chapter、\section、\subsection。

\documentclass[11pt, a4paper,openright]{book}


% Sprogpakker %
\usepackage[utf8]{inputenc}                 
\usepackage[danish]{babel}                  
\usepackage[T1]{fontenc}                    
\usepackage{ragged2e,anyfontsize}
\addto\captionsdanish{
    \renewcommand\appendixname{Appendiks}
    \renewcommand\contentsname{Indholdsfortegnelse} 
    \renewcommand\appendixpagename{Appendiks}
    \renewcommand\appendixtocname{Appendiks}        
}

% Tabeller og figurer %
\usepackage{graphicx} 
\usepackage{multirow}                       
\usepackage{colortbl} 
\usepackage{floatrow}
\definecolor{aaublue}{RGB}{33,26,82}
\usepackage{xcolor}
\usepackage[pages=some]{background}
\floatsetup[table]{capposition=top}
\usepackage{array,booktabs}
\usepackage{framed}
\usepackage{multicol} 
\usepackage{multirow} 
\usepackage{diagbox} 
\usepackage{makecell} 
\usepackage{tabularx}
\renewcommand{\arraystretch}{1.5}



% Tekstformattering %
\usepackage{lmodern}
\usepackage{lastpage} 
\linespread{1.3}
\usepackage{csquotes}



% Fodnoter %
\usepackage{gensymb}
\usepackage[within=none]{caption}
\captionsetup{%
  font=footnotesize,
  labelfont=bf 
}


% Matematik %
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[framed,amsmath,thmmarks]{ntheorem}
\usepackage{siunitx} 
\sisetup{
    output-decimal-marker = {,},
    per-mode = fraction
} 
\usepackage[version=3]{mhchem} 

% Margin %
\usepackage[top=1in, bottom=1.5in, left=1in, right=1in]{geometry}
\setlength\parindent{0pt}

% Kapiteludseende %
\usepackage{titlesec}

\newfont{\chapterNumber}{eurb10 scaled 8000}

\titleformat{\chapter}[display]%
{\relax}{\mbox{}\marginpar{\vspace*{-\baselineskip}\color{gray}\chapterNumber\thechapter}}{0pt}%
    {\Huge\itshape}[\normalsize\vspace*{.1\baselineskip}\titlerule]% 

\titlespacing*{\chapter}{0pt}{0cm}{1cm}
\titleformat{\section}{\Large}{\makebox[0cm][r]{\thesection\hspace{1em}}}{0em}{\scshape\lowercase}
\titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}
\titleformat{\subsection}{\large}{\thesubsection}{.6em}{\itshape}
\titlespacing*{\subsection}{0pt}{\baselineskip}{\baselineskip}
\titleformat{\subsubsection}{\bfseries}{}{}{}
\titlespacing*{\subsubsection}{0pt}{\baselineskip}{\baselineskip}

% Headers and Footers %
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} %delete everything
\renewcommand{\headrulewidth}{0pt} %remove the horizontal line in the header
\fancyhead[RE]{\color{aaublue}\small\nouppercase\leftmark} %even page - chapter title
\fancyhead[LO]{\color{aaublue}\small\nouppercase\rightmark} %uneven page - section title
\fancyhead[LE,RO]{\thepage} %page number on all pages
% Do not stretch the content of a page. Instead,
% insert white space at the bottom of the page
\raggedbottom
% Enable arithmetics with length. Useful when
% typesetting the layout.
\usepackage{calc}
\usepackage{amsmath}


\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
  \clearpage
  {\pagestyle{empty}\origdoublepage}%
}
\let\cleardoublepage\clearemptydoublepage

%Change the headers and footers


% Kildeliste %
\usepackage[
    backend = biber,
    style = authoryear,
    natbib = true
]{biblatex}
\addbibresource{bibliography.bib}


% Add the command \pageref{LastPage} which refers to the
% page number of the last page
\usepackage[
%  disable, %turn off todonotes
  colorinlistoftodos, %enable a coloured square in the list of todos
  textwidth=\marginparwidth, %set the width of the todonotes
  textsize=scriptsize, %size of the text in the todonotes
  ]{todonotes}

\usepackage{inconsolata}

\usepackage{color}
\definecolor{bluekeywords}{rgb}{0.13,0.13,1}
\definecolor{greencomments}{rgb}{0,0.5,0}
\definecolor{redstrings}{rgb}{0.9,0,0}

\usepackage{listings}
\lstset{language=[Sharp]C,
  showspaces=false,
  showtabs=false,
  breaklines=true,
  showstringspaces=false,
  breakatwhitespace=true,
  escapeinside={(*@}{@*)},
  commentstyle=\color{greencomments},
  keywordstyle=\color{bluekeywords},
  stringstyle=\color{redstrings},
  basicstyle=\ttfamily
}

% Hyperlinks %
\usepackage{hyperref}
\hypersetup{%
    pdfpagelabels=true,%
    plainpages=false,%
    pdfauthor={Author(s)},%
    pdftitle={YNWA},%
    pdfsubject={Subject},%
    bookmarksnumbered=true,%
    colorlinks,%
    citecolor=black,%
    filecolor=black,%
    linkcolor=black,% you should probably change this to black before printing
    urlcolor=black,%
    pdfstartview=FitH%
}

\usepackage{listings}
\lstset{
    xleftmargin = -1.5cm,
    numbers = left,
    numbersep = -35pt
}

% THEOREM %
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}

% Appendix %
\usepackage[toc,page]{appendix}

相关内容