附录标题、目录和页眉

附录标题、目录和页眉

我对 LaTeX 还比较陌生,所以请多多包涵。我无法用已经回答过的问题解决我的问题,因此当然会发帖 :)

我的目录末尾如下所示,其中 A. XYZ 是我的第一个附录。 在此处输入图片描述

附录章节如下: 在此处输入图片描述

我希望目录条目如下所示:

附录 A: 行末的页码与之前相同

我希望我的实际附录页面有标题附录 A,章节标题附录 A。

我的主要 thesis.tex 文件如下所示:

    \documentclass[]{ifht}
\usepackage[titletoc,toc,title]{appendix}


\usepackage{etoolbox}
\appto\appendix{\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}}



\input{macros}

\hypersetup{pdftitle="Masterarbeit"}
\hypersetup{pdfauthor="Waqas Syed"}
\usepackage[english]{babel}

\addto\captionsenglish
{
    \renewcommand{\contentsname}{Table of Contents}%
}   

\usepackage[english=quotes]{csquotes}           


\addbibresource{chapter/literature.bib}
\addbibresource{chapter/ctan.bib}
\addbibresource{chapter/online.bib}


\input{chapter/acronyms}


\begin{document}

\input{ifht/titlepage_english}

\frontmatter

\input{ifht/statement_english}

\input{chapter/abstract}


\cleardoublepage 
\addcontentsline{toc}{chapter}{Table of Contents}


\tableofcontents            % automatically created registers for TOC
\KOMAoption{open}{any}      % formatting: no empty pages between registers
\listoffigures              % ..., figures 
\listoftables               % ...and tables
\KOMAoption{open}{right}    % reset to default behaviour for page breaks


\mainmatter
\input{chapter/chapter1}    % "Motivation und Zielsetzung"
\input{chapter/chapter2}    % "Theoretische Grundlagen"
\input{chapter/chapter3}    % "Modellierung"
\input{chapter/chapter4}    % "Analyse- und Bewertungsverfahren"
\input{chapter/chapter5}    % "Simulation und Ergebnisse"
\input{chapter/chapter6}    % "Zusammenfassung und Ausblick"
\input{chapter/chapter7}    % "Zusammenfassung und Ausblick"


\printbibliography[notkeyword=CTAN, notkeyword=software,heading=bibintoc]\label{list_lit}
\printbibliography[keyword=CTAN,heading=subbibliography,title={CTAN Dokumentationen}]\label{list_ctan}%
\printbibliography[keyword=software,heading=subbibliography,title={Software}]\label{list_software}%

% acronyms
\acsetup{list-style=tabular, list-heading=addchap, only-used=false}
\printacronyms[name={List of abbreviations}]

% Appendices

\appendix

%\renewcaptionname{english}{\appendixname}{Appendix}    
%\addcontentsline{toc}{chapter}{Appendix A} 



\input{chapter/appendix1.tex}           % Put in here all the things you

\backmatter
\end{document}

正在使用的类 ifht 如下:

%= ifht.cls ===============================================
%TODO Lizenz einfügen
%=========================================================%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ifht}[2014/05/30 Info class]

\LoadClass[]{scrbook}               % "book"-like document from KOMA-script
\RequirePackage[T1]{fontenc}        % Choose T1 encoding
\RequirePackage[utf8]{inputenc}     % Use UTF8. Period.
\RequirePackage{textcomp}           % textcompanion
%= I. Part ================================================
%  Use all of KOMA-script's options excessively to achieve
%  the desired layout and document features.
%==========================================================

%- KOMAoptions for TOC ------------------------------------
\KOMAoption{toc}{%
    listof,         % enties for 'List of figures' and 'List of tables' into TOC
%   bib,            % entry for bibliography into TOC
    graduated,      % graduated TOC for better readability 
    }
\setcounter{tocdepth}{2}        % values: chapter '0', section '1' and subsection '2'

%- KOMAoptions for paragraphs and text --------------------
\KOMAoption{parskip}{half*}     % 6pt between two paragraphs
\KOMAoption{fontsize}{11pt}     % 11pt default font size

%- KOMAoptions for basic page settings --------------------
\KOMAoption{pagesize}{pdftex}   % TeX-compiler pdfTeX
\KOMAoption{paper}{a4}          % DIN-A4
\KOMAoption{twoside}{true}      % doublesided pages
\raggedbottom                   % last lines on opposing pages do not need to align

%- Set font sizes for headings ----------------------------
% with KOMA's fontsize of 11pt the best match to the MS Word
% template are the following settings:
%                                KOMA     MS Word
% chapter:         \Large        14pt     15pt
% section:         \large        12pt     14pt
% subsection:      \large        12pt     13pt
% subsubsection:   \normalsize   11pt     12pt
\setkomafont{chapter}{\Large}               
\setkomafont{section}{\large}               
\setkomafont{subsection}{\large}                     
\setkomafont{subsubsection}{\normalsize \bfseries}

%= II. Part ===============================================
% load additional packages
%==========================================================
\RequirePackage[final]{pdfpages}    % include PDF files seamlessly
\RequirePackage{graphicx}           % include graphic files (PNG, JPG, PDF)
\RequirePackage{xcolor}             % advanced color handling
\RequirePackage{colortbl}           % color handling for tables
\RequirePackage{tabu}               % advanced tables
\RequirePackage{siunitx}            % usage of SI-units
\RequirePackage{acro}               % flexible and versatile acronym handling
\RequirePackage{microtype}          % aubliminal typographical refinements
\RequirePackage{titlesec}           % adjust spacing between section, subsection, etc.
\RequirePackage[scaled]{helvet}     % font family Helvetica, uses Nimbus L as replacement
\RequirePackage{pifont}             % additional symbols 
\RequirePackage{float}              % float objects for figures and tables
\RequirePackage{amsmath}            % AMS mathematical facilities
\RequirePackage{amsfonts}           % TeX fonts from the American Mathematical Society
\RequirePackage{amssymb}            % 
\RequirePackage[listings]{tcolorbox}% colored boxes
\RequirePackage{subcaption}         % subdivided float objects
\RequirePackage[backend=biber,style=alphabetic]{biblatex}   % bibliography
\RequirePackage{tikz}               % use PGF and TikZ to draw graphics



%= III. Part ==============================================
% PDF settings and basic page layout
% as recommanded in RRZN-Reader "LaTeX", the package 'hyperref' is 
% loaded as the last package, as it redefines many LaTeX-structures, 
% but before loading the 'geormetry' package
%==========================================================
\RequirePackage[pdftex]{hyperref}       % load before \usepackage{geometry} !!!
\hypersetup{pdfencoding=auto}           % use automatic encoding for bookmarks
\hypersetup{bookmarksnumbered=true}     % put section numbers in PDF bookmarks
\hypersetup{colorlinks=true}            % colored links instead of framed links
%\hypersetup{colorlinks=false}          % framed and colored links for debugging
\hypersetup{citecolor=black}            % define color for bibliographical citations
\hypersetup{linkcolor=black}            % define color for links 
\hypersetup{urlcolor=blue}              % define color for URLs 


%- Page geometry ------------------------------------------
% all values according to the MS Word template
\RequirePackage[bindingoffset=0.5cm,    % 0.5cm for binding purpose
                inner=2.75cm,           % 2.75cm inner border
                outer=2.75cm,           % 2.75cm outer border
                top=3.55cm,                 % 2.3cm top border
                bottom=3.35cm           % 3.25cm bottom border
                ]{geometry}             % 


%= IV. Part ===============================================
% defining all the parts of the templated that aren't delt 
% with by KOMAoptions
%==========================================================

%- Headers and footers ------------------------------------
% Equal to the MS Word template
%----------------------------------------------------------
\RequirePackage{fancyhdr}               % use fancyhdr for headers

\pagestyle{fancy}                       % choose pagestyle 'fancy' for the document 
\fancyhf{}                              % remove everything - start from scratch

\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % use chapter name for header
\fancyhead[RO,LE]{\thepage}             % define even and odd headers
\fancyhead[RE,LO]{\leftmark}            % ...

% redefine pagestyle 'plain' to have a correct header 
% on the first page of each chapter
\fancypagestyle{plain}{ %
  \fancyhf{}                                % remove everything - start from scratch
  \fancyhead[RO,LE]{\thepage}               % define even and odd headers
  \fancyhead[RE,LO]{\leftmark}              %
}
% remove the empty even page at the end of each chapter
% by redefining the 'cleardoublepage'-command
% (from fancyhdr-documentation)
\makeatletter
\def\cleardoublepage{\clearpage
  \if@twoside
    \ifodd\c@page\else
      \hbox{}\newpage
      \if@twocolumn\hbox{}\newpage\fi
    \fi
  \fi}
\makeatother

%- Paragraphs and fonts -----------------------------------
% use the sans serif font family Helvetica by default
%----------------------------------------------------------

\renewcommand*\familydefault{\sfdefault}        % base font is to be Helvetica, too

%- Headlines: Size, position, etc. ------------------------
%TODO Keep in mind the incompatability of KOMA and titlesec!
% There might be errors, but at the moment it is a viable 
% approach to redefine the vertical spacing.
% One has to use KOMA for chapters/parts and titlesec
% for sections, subsections, and so on.
% As the behaviour of both packages may change over time
% this section might be heavily edited in future.
%----------------------------------------------------------

% all headlines consist of numbers and a title
% the numbers start at 0cm, whereas the title starts at 2cm
\renewcommand*{\chapterformat}{\makebox[2cm][l]{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot}}
\renewcommand*{\othersectionlevelsformat}[3]{\makebox[2cm][l]{#3\autodot}}

% smaler vertical space above chapter headings and no additional space 
% below (apart from the parskip that is set via KOMA further above)
\renewcommand{\chapterheadstartvskip}{\vspace*{0\baselineskip}}
\renewcommand{\chapterheadendvskip}{\vspace*{0pt}}

% the same for sections, ... this time using titlesec. Define a 
% vertical space above and no (additional) vertical space below
\titlespacing*{\section}{0pt}{12pt}{0pt}
\titlespacing*{\subsection}{0pt}{12pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{6pt}{0pt}
\titlespacing*{\paragraph}{0pt}{6pt}{0pt}


%- Lists --------------------------------------------------
%TODO Some indents are  implemented differently compared 
% to the MS Word template. 
% It seems they are not set consistently with a purose (some
% seem to be adjusted, some seem to be on the default value)
% => thus: stick to KOMA-Script's default values as they 
% "just work"
%----------------------------------------------------------
% bulleted lists
\renewcommand{\labelitemi}  {$\bullet$}                     % bullet
\renewcommand{\labelitemii} {$\circ$}                       % circle
\renewcommand{\labelitemiii}{\rule[0.15ex]{0.75ex}{0.75ex}} % filled square
\renewcommand{\labelitemiv} {$\bullet$}                     % bullet
% numbered lists
\renewcommand\theenumi      {\arabic{enumi}}                % arabic numbering
\renewcommand\labelenumi    {\theenumi.}                    % numbers end with a dot
\renewcommand\theenumii     {\alph{enumii}}                 % letterd numbering
\renewcommand\labelenumii   {\theenumii.}                   % numbers end with a dot
\renewcommand\theenumiii    {\roman{enumiii}}               % roman numbering
\renewcommand\labelenumiii  {\theenumiii.}                  % numbers end with a dot
\renewcommand\theenumiv     {\arabic{enumiv}}               % arabic numbering
\renewcommand\labelenumiv   {\theenumiv.}                   % numbers end with a dot

%- Tables and graphics ------------------------------------
% define IFHT-specific table environment
%. color definitions ......................................
\definecolor{IFHTtabline}{HTML}{7BA0CD}     % color for lines
\definecolor{IFHTtabrow1}{HTML}{D3DFEE}     % alternating color #1 (light blue) for body
\definecolor{IFHTtabrow2}{named}{white}     % alternating color #2 (white) for body
\definecolor{IFHTtabhead}{HTML}{4F81BD}     % color for tablehead

%. global setup for lines in tables........................
\taburulecolor {IFHTtabline}        % choose color as defined above
\arrayrulewidth=1pt                 % set width to 1pt
\tabulinesep=6pt                    % separate text from lines by 6pt

%. IFHTtable ..............................................
% no adjustments needed at the moment
\newcommand{\IFHTtable}{%       
    \tabucline[]-%
}

%. IFHTtablehead ..........................................
% formatting of heading line(s) with bold faced, white colored 
% text, blue background
\newcommand{\IFHTtablehead}{%
%   \tabucline[]-%
    \rowfont[l]{%
    \bfseries%
    \color{white}}
    \taburowcolors[1]2{IFHTtabhead .. IFHTtabhead}%
}
%. IFHTtablebody ..........................................
% formatting of line in table body:
% - alternating colors (light blue, white)
% - first column bold faced text
% - separated with 1pt line
\newcommand{\IFHTtablebody}{%
%   \tabucline[]-%
    \taburowcolors[2]{IFHTtabrow2 .. IFHTtabrow1}
    \everyrow{\tabucline[IFHTtabline]-}%
}

%- Settings for packages ----------------------------------
%. "tcolorbox" ............................................
\tcbset{colback=IFHTtabrow1,colframe=IFHTtabline,fonttitle=\bfseries}
%. "biblatex" .............................................
\setlength{\bibitemsep}{12pt}

\endinput

相关内容