書名(左)

書名(左)

我正在使用頁面佈局標題在回憶錄中。僅顯示頁碼,不顯示章節名稱或標題

頁面外側的對開頁;在反面頁面上,章節名稱、編號和標題(傾斜大寫)設置在書脊邊緣,而在正面頁面上,章節編號和大寫標題則設置在書脊邊緣處。

從上面我的理解是,頁碼、章節名稱和書名都會自動填入標題,但需要定義在我的標題。如果是這樣,什麼可能會抑制頁面標題中的章節名稱和標題?

編輯新增:

我想要完成的是頁首佈局,頁碼位於外角,書名和章節標題位於內角:

書名(左)

和章節標題#(右側)

但我得到的是:

!在此輸入影像描述]1]]1]

我在文件>設定>頁面佈局中使用頁面樣式“myheadings”,並且我已將章節更改為 \chapter 而不是 \chapter*。

對於頁面樣式,我在序言中有以下內容,改編自此問題的答案]]2]:

\makepagestyle{myheading}
\makeevenhead{myheading}{\thepage}{}{\mytitle}
\makeoddhead{myheading}{\leftmark}{}{\thepage}
\def\mytitle {Title Of Book}
\pagestyle{myheading}

標題現在可以正確顯示標題(有時)以及我想要的頁碼。但是,我在\leftmark應該去的地方有一個空白。我是否需要 a) 定義,\leftmark以便它知道我想要章節標題,或 b) 重置,\leftmark以便它可以獲取預設值?或者完全是別的什麼?

使用最小的範例(除去我之前的所有自訂樣式,標題除外)仍然只能得到頁碼、分配的標題,而沒有章節標題。

% Preview source code

%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclassenglish,oldfontcommands]{memoir}
\usepackageT1]{fontenc}
\usepackagelatin9]{inputenc}
\usepackagepaperwidth=5in,paperheight=8in]{geometry}
\geometry{verbose}
\pagestyle{myheadings}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\makeatletter
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage {lipsum}

\makepagestyle{myheadings}
\makeevenhead{myheadings}{\thepage}{}{\mytitle}
\makeoddhead{myheadings}{\leftmark}{}{\thepage}
\def\mytitle {Title Of Book}
\pagestyle{myheadings}

\makeatother

\usepackage{babel}
\begin{document}

\title{Title of Book}


\author{Author}
\maketitle

\chapter{Lorem Ipsum}

\lipsum[1-5]

\chapter*{Ipsum Lorem}

\lipsum[1-6]
\end{document}

1]:https://i.stack.imgur.com/gQErb.png 2]:在回憶錄類標題中包含文件標題

答案1

Don't use the name `myheadings`, use your own. `myheadings` is predefined to do stuff you don't want.


%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english,oldfontcommands]{memoir}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\usepackage[paperwidth=5in,paperheight=8in]{geometry}
\geometry{verbose}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\makeatletter
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage {lipsum}

\makepagestyle{kitty}
\makeevenhead{kitty}{\thepage}{}{\mytitle}
\makeoddhead{kitty}{\leftmark}{}{\thepage}
\def\mytitle {Title Of Book}
\pagestyle{kitty}

\makeatother

\begin{document}

\title{Title of Book}


\author{Author}
\maketitle

\chapter{Wombat}

\lipsum[1-5]

\end{document}

答案2

在該類別中,memoir預設頁面樣式是\pagestyle{headings}a\chapter*{...}不產生標題的地方,儘管\chapter{...}它會產生標題。使用onesideclass 選項\section{...}不會為標頭新增任何內容。

試試這個:

\documentclass%
%[oneside]%
{memoir}
\usepackage{lipsum}
\pagestyle{headings}
\begin{document}
\chapter{Lorem Ipsum}
 %% \chapter*{Lorem Ipsum}
\lipsum[1-5]
\section{Section}
\lipsum[6-15]
\end{document}

如果您使用該twoside選項並且未加星標\chapter,那麼我認為您得到了您想要的。否則,您需要定義自己的\pagestyle.

沒人memoir \pagestyle知道你的書名,所以這取決於你。

相關內容