\leftmark 改为显示 CONTENTS

\leftmark 改为显示 CONTENTS

我在将子节名称放入 fancyhdr 页面样式时遇到了问题。每次我输入 \leftmark 时,它都会显示“INDHOLD”,这是丹麦语,意思是“内容”。有人能帮我显示我的子节吗?这是我的文档,直到它显示 \begin{document}:

\documentclass[a4paper, 12pt]{extarticle}

%Commands ----------------------------------------------------------------------------------------------------------------------------------------------------------
\newcommand{\R}{\mathbb{R}}
\newcommand{\Legeme}{\mathbb{L}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}

%Packages  ----------------------------------------------------------------------------------------------------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[danish]{babel}
\usepackage{fancyhdr}
\usepackage[dvipsnames]{xcolor}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{titlesec}
\usepackage[left=0.5in, right=0.5in, top=0.8in, bottom=0.8in]{geometry}
\usepackage{lipsum}
\usepackage[breaklinks, colorlinks,linkcolor=ForestGreen, 
citecolor=ForestGreen, urlcolor=ForestGreen]{hyperref}
\usepackage[utf8x]{inputenc}
\usepackage{titlesec}
\usepackage{fix-cm}
\usepackage{titletoc}
\usepackage{tocloft}
\usepackage{setspace}
\usepackage[all]{hypcap}



%Commands and setups  ----------------------------------------------------------------------------------------------------------------------------------------------------------
\pagestyle{fancy}


\fancyhf{}
\fancyfoot[R]{\textbf \thepage}
\fancyfoot[L]{\thesubsection \leftmark}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{2pt}
\renewcommand{\footrule}{\hbox 
to\headwidth{\color{ForestGreen}\leaders\hrule height \footrulewidth\hfill}}

\newcommand{\dl}[1]{\underline{\underline{#1}}}



\renewcommand\cftsecafterpnum{\vskip5pt}
\renewcommand{\cftdot}{\textbf{.}}
\renewcommand{\cfttoctitlefont}{\bfseries \fontsize{30}{0}\selectfont 
\fontfamily{put}\selectfont}
\renewcommand{\cftsecfont}{\bfseries \fontsize{14}{0}\selectfont 
\fontfamily{put}\selectfont}
\renewcommand{\cftsubsecfont}{ \fontsize{11}{0}\selectfont 
\fontfamily{put}\selectfont}
\renewcommand{\cftsubsecafterpnum}{\vskip1ex}
\renewcommand{\cftsubsubsecfont}{ \fontsize{11}{0}\selectfont 
\fontfamily{put}\selectfont}
\renewcommand{\cftsubsubsecafterpnum}{\vskip1ex}

相关内容