
목차(장 제목 위)에 저자 이름을 삽입하고 싶습니다.여기처럼:
그러나 제안된 방법은 scrreprt 유형의 문서에서는 작동하지 않습니다.
\documentclass[12pt,a4paper,oneside,ngerman]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
\tableofcontents
\chapter{Blabla 1}
sdadasdas
\section{Blabla 1.1}
fd
\subsection{Blabla 1.1.1}
das
\end{document}
미리 감사드립니다!
답변1
적응Gonzalo Medina의 이전 답변screport
클래스 대신 에 작업하는 것은 memoir
그리 어렵지 않습니다. 변경해야 할 주요 사항은 tocloft
패키지를 명시적으로 로드하는 것입니다. (수업에서 당신을 위해 로드되었습니다 memoir
.)
\documentclass[12pt,a4paper,oneside,ngerman]{scrreprt}
\usepackage{babel}
\usepackage{blindtext}
%\usepackage[ansinew]{inputenc} %% is this needed/correct?
\renewcommand{\thesection}{\arabic{section}}
\setcounter{secnumdepth}{3} % Subsection mit Zähler (1.1) versehen
%%
% Kolumnentitel
%%
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} } % Stil der Kopfzeile zurücksetzen
\renewcommand{\sectionmark}[1]{ \markright{#1}{} } % Stil der Kopfzeile
%%
% Inhaltsverzeichnis
%%
\usepackage{tocloft}
\renewcommand*{\cftchapdotsep}{\cftdotsep}
\setcounter{tocdepth}{0}
\renewcommand{\cftchapfont}{\normalfont}
\renewcommand{\cftchappagefont}{\normalfont}
\makeatletter
\DeclareRobustCommand\authortoctext[1]{%
{\addvspace{10pt}\nopagebreak\leftskip0em\relax
\rightskip \@tocrmarg\relax
\noindent\itshape#1\par\addvspace{-7pt}}}
\makeatother
\newcommand\authortoc[1]{%
\gdef\chapterauthor{#1}%
\addtocontents{toc}{\authortoctext{#1}}}
%%
% Dokumentenbeginn
%%
\begin{document}
\tableofcontents
\authortoc{Walter von der Vogelweide}
\chapter{Ich sass uf eynem Steine?}
\section{Und dachte Bein mit Beine}
\Blindtext\Blindtext\Blindtext\Blindtext
\authortoc{Hartman von Aue}
\chapter[Was auch immer]{So gebt nur mehr und immer mehr}
\section{Moralische Quellen der Irrationalitat}
\Blindtext\Blindtext\Blindtext\Blindtext
\end{document}