目前,我正在准备一个文档,上面写着我的歌词。在网上搜索后,我找到了一种不错的章节样式。但是,它需要一些修改。我想在文档的最左下角添加一个页脚(一个用于写歌曲日期的框,每首歌的日期都不同),但仅限于章节页面。这是我的最小示例:
\documentclass[12pt]{report}
%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\usepackage[Bjornstrup]{fncychap}
\usepackage[utf8x]{inputenc}
\usepackage[turkish]{babel}
\begin{document}
\title{Hayatım...} % type title between braces
\author{Rıza Bayoğlu} % type author(s) between braces
\date{-} % type date between braces
\maketitle
\tableofcontents
\chapter{Bekleyiş}
Yine uzun bir bekleyiş\\
Sonsuzluğa doğru\\
Kanat açmış uçarken\\
Yine sabah oldu.
\end{document}
顺便问一下,我怎样才能将页码位置改为右下角,而不是放在中间且字体大小大于文本?
答案1
使用fancyhdr
它很容易定义合适的页面样式,但必须更改其他内容。我还定义了一个\chapterdate
命令,用于\chapter
设置章节的日期。
\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[turkish]{babel}
\usepackage{fancyhdr,etoolbox}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyfoot[R]{\thepage}
\fancypagestyle{chapter}{%
\renewcommand{\headrulewidth}{0pt}%
\fancyhf{}%
\fancyfoot[R]{\thepage}%
\fancyfoot[L]{\THEchapterdate}%
}
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}%
\fancyhf{}%
\fancyfoot[R]{\thepage}%
}
\patchcmd{\chapter}{plain}{chapter}{}{}
\makeatletter
\pretocmd{\@starttoc}{\thispagestyle{plain}}{}{}
\makeatother
\newcommand{\THEchapterdate}{\today} % default
\newcommand{\chapterdate}[1]{\renewcommand{\THEchapterdate}{#1}}
\begin{document}
\title{Hayatım...} % type title between braces
\author{Rıza Bayoğlu} % type author(s) between braces
\date{9 Eylül, 2013} % type date between braces
\maketitle
\tableofcontents
\chapter{Bekleyiş}
\chapterdate{1 Eylül, 2010}
Yine uzun bir bekleyiş\\
Sonsuzluğa doğru\\
Kanat açmış uçarken\\
Yine sabah oldu.
\chapter{Whatever}
\chapterdate{30 Eylül, 2011}
Yine uzun bir bekleyiş\\
Sonsuzluğa doğru\\
Kanat açmış uçarken\\
Yine sabah oldu.
\end{document}
请注意,\usepackage[turkish]{babel}
您不需要自己更改标签,土耳其语将会被正确地连字符。
我删除了对的调用,fncychap
因为我不喜欢这些章节样式;说实话,我认为它们是我见过的最丑陋的。但是,如果您真的想,只需将其放回去;代码不需要任何更改。
答案2
使用titleps
包
\documentclass[12pt]{report}
%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\usepackage[Bjornstrup]{fncychap}
\usepackage[utf8x]{inputenc}
\renewcommand*\contentsname{İçindekiler}
\renewcommand*\chaptername{Bölüm}
\usepackage{titleps}
\newpagestyle{main}{%
\setfoot%
{\thepage}% left
{}% centre
{% right
\fbox{
\begin{minipage}{2in}
\hfill\vspace{1.5\baselineskip}
\end{minipage}
}
}
}
\begin{document}
\title{Hayatım...} % type title between braces
\author{Rıza Bayoğlu} % type author(s) between braces
\date{9 Eylül, 2013} % type date between braces
\maketitle
\tableofcontents
\chapter{Bekleyiş}
\thispagestyle{main} % Change for chapters
\pagestyle{main} % change for the rest of
Yine uzun bir bekleyiş\\
Sonsuzluğa doğru\\
Kanat açmış uçarken\\
Yine sabah oldu.
\end{document}