我遇到的另一个问题,并且找不到任何解决方案,那就是在回忆录类中定义新的页面样式,\thechapter
mark 不会在页眉中显示任何内容,除了可爱的 0。如果我\thechapter
用\thepage
或替换\theautor
- 两者都有效,但\thechapter
不起作用。
这是代码:我错过了什么?
% *****************************Document Class***************************************
\documentclass[12pt,twoside,a4paper,openany]{memoir}
% **********************************************************************************
% ******************************Titel & Autor Info*********************************
\author{}
\date{Vol. 9 * 2014}
\title{Journal of all Journals}
% *********************************************************************************
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[german=guillemets]{csquotes}
\setquotestyle{ngerman}
\usepackage[ngerman,english]{babel}
\usepackage{tabularx}
\usepackage{hyperref}
\usepackage{lipsum} % This package generates blind text. It's not part of the example per se...
% *******************Page Style: Page Margins*************************************
\usepackage[inner=4cm,outer=3cm]{geometry}
% ******************************Chapter Style*************************************
\chapterstyle{dash}
% *******************Überschriften Nummerierung***********************************
%Nummerierung der Überschriften aus \setcounter{secnumdepth}{-1} oder an bis Ebene # \setcounter{secnumdepth}{#}
%\setcounter{secnumdepth}{-1}
\setsecnumdepth{none}
% ********************************************************************************
% ****************************Abstract Keywords***********************************
\def\keywordsG#1{{\textbf{Schlagworte}:} \textit{{#1}}} %
\def\keywordsEN#1{{\textbf{Keywords}:} \textit{{#1}}} %
% ********************************************************************************
%***********************Header & Footer Article Normal Pages************************
\nouppercaseheads
\copypagestyle{myheadings}{plain}
\makeoddhead{myheadings}{\textit{Journal of all Journals (9) 2014, S. ??--??} }{}{}
\makeevenhead{myheadings}{}{}{\thechapter}
\makeoddfoot{myheadings}{\\ \thepage}{}{}
\makeevenfoot{myheadings}{}{}{\\ \thepage}
\setheadfoot{\onelineskip}{3\onelineskip}
%\setheaderspaces{*}{1.5\onelineskip}{*}
\aliaspagestyle{plain}{myheadings}
%***********************Header & Footer Article First Page************************
\usepackage{picture,calc}
\newsavebox\CopyRight
\newlength\makeway
\renewcommand\memendofchapterhook{%
\begin{lrbox}{\CopyRight}
\normalfont\normalsize
\begin{tabular}[b]{r p{10cm}}
\hline \\
creative commons & This work is published under a Creative-Commons-License (Attribution-Share Alike 4.0). More information at \protect\url{http://creativecommons.org/licenses/by-sa/4.0/}.\\
\hline \\
Published by: & Journal of all Journals,
ISSN 1111-2222 /
URL: \url{http://journalofalljournals.net},
URN: urn:nbn:de:000-11111111-2\\
&\\
Suggested citation: & A. Author. 2014. {Title. Subtitle}. \textit{Journal of all Journals} 9(1), pp-pp. \\
\hline \\
\end{tabular}
\end{lrbox}
\setlength\makeway{\dimexpr\ht\CopyRight+\dp\CopyRight-0.5em}
\enlargethispage{-\makeway}
}
\setlength\parskip{0pt}
\copypagestyle{firstpage}{plain}
\makeoddhead{firstpage}{\textit{Journal of all Journals (9) 2014, S. ??--??} }{}{}
\makeevenhead{firstpage}{}{}{}
\makeoddfoot{firstpage}{%
\begin{picture}(0,0)
\put(0,\footskip-0.5em){\usebox{\CopyRight}}
\end{picture}
}{\thepage}{}
\makeevenfoot{firstpage}{%
\begin{picture}(0,0)
\put(0,\footskip-0.5em){\usebox{\CopyRight}}
\end{picture}
}{\thepage}{}
\begin{document}
\frontmatter
\selectlanguage{ngerman}
\begin{titlingpage}
\maketitle
\end{titlingpage}
\section{Impressum}
\tableofcontents*
\thispagestyle{empty}
\chapter{Vorwort der Herausgeberinnen}
\mainmatter
\pagestyle{plain}
\cleardoublepage
\chapter[Erster Artikel (A. Autor)]{Erster Artikel}
\thispagestyle{firstpage}
% *****************Deutsche Zusammenfassung & Schlagworte**************************
\selectlanguage{ngerman}
\begin{center}
\textit{von A. Autor}
\break
\end{center}
\abstractrunin
\abslabeldelim{:}
\begin{abstract}
Vivamus eu tellus sed tellus consequat suscipit. Nam orci orci, malesuada id, gravida nec, ultricies vitae, erat. Donec risus turpis, luctus sit amet, interdum quis, porta sed, ipsum. Suspendisse condimentum, tortor at egestas posuere, neque metus tempor orci, et tincidunt urna nunc a purus. Sed facilisis blandit tellus. Nunc risus sem, suscipit nec, eleifend quis, cursus quis, libero. Curabitur et dolor. Sed vitae sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas ante. Duis ullamcorper enim. Donec tristique enim eu leo. Nullam molestie elit eu dolor. Nullam bibendum, turpis vitae tristique gravida, quam sapien tempor lectus, quis pretium tellus purus ac quam. Nulla facilisi.Vivamus eu tellus sed tellus consequat suscipit. Nam orci orci, malesuada id, gravida nec, ultricies vitae, erat. Donec risus turpis, luctus sit amet, interdum quis, porta sed, ipsum. Suspendisse condimentum, tortor at egestas posuere, neque metus tempor orci, et tincidunt urna nunc a purus. Sed facilisis blandit tellus. Nunc risus sem, suscipit nec, eleifend quis, cursus quis, libero. Curabitur et dolor. Sed vitae sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas ante. Duis ullamcorper enim. Donec tristique enim eu leo. Nullam molestie elit eu dolor. Nullam bibendum, turpis vitae tristique gravida, quam sapien tempor lectus, quis pretium tellus purus ac quam. Nulla facilisi.
\\
\keywordsG{Schlagwort1, Schlagwort2, Schlagwort3, Schlagwort4}
\end{abstract}
% **********************************************************************************
%*********************English Abstract & Keywords***********************************
\selectlanguage{english}
\abstractrunin
\abslabeldelim{:}
\begin{abstract}
Vivamus eu tellus sed tellus consequat suscipit. Nam orci orci, malesuada id, gravida nec, ultricies vitae, erat. Donec risus turpis, luctus sit amet, interdum quis, porta sed, ipsum. Suspendisse condimentum, tortor at egestas posuere, neque metus tempor orci, et tincidunt urna nunc a purus. Sed facilisis blandit tellus. Nunc risus sem, suscipit nec, eleifend quis, cursus quis, libero. Curabitur et dolor. Sed vitae sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas ante. Duis ullamcorper enim. Donec tristique enim eu leo. Nullam molestie elit eu dolor. Nullam bibendum, turpis vitae tristique gravida, quam sapien tempor lectus, quis pretium tellus purus ac quam. Nulla facilisi.
\\
\keywordsEN{keyword1, keyword 2, keyword 3, keyword 4}
\end{abstract}
% **********************************************************************************
\selectlanguage{ngerman}
% **********************************************************************************
\lipsum
\lipsum
\cleardoublepage
\chapter[Zweiter Artikel (B. Autor)]{Zweiter Artikel}
\thispagestyle{firstpage}
\begin{center}
\emph{von B. Autor}
\end{center}
\lipsum
\end{document}
答案1
来自 Astrinus 的评论:
不要使用\thechapter
,而是使用\leftmark
和\rightmark
并通过 自定义它们\markboth
。有关更多详细信息,请参阅memman.pdf
(memoir 官方手册,通过texdoc memman
)。