3

Currently, I am preparing a document where my song lyrics are written on. I found a nice chapter style after some search on the internet. However, it needs some modification. I want to add a footer (a box to write the date of songs which is different for each song) to the most bottom left corner of my document, but only for the chapter pages. Here is my minimal example:

\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}

By the way, how can I change page number location to the bottom right side instead of placing it at the middle with a font size greater than the text?

2 Answers 2

3

With fancyhdr it's easy to define a suitable page style, but something else must be changed. I also define a \chapterdate command to be supplied after \chapter to set the chapter's date.

\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}

Note that with \usepackage[turkish]{babel} you don't need to change the labels yourself and Turkish will be properly hyphenated.

I removed the call to fncychap because I like none of those chapter styles; to be honest, I consider them among the ugliest I've ever seen. However, just put it back, if you really want to; the code doesn't need any change.

4
  • Thank you for the reply. Your code did not provide me what I wanted. I am happy with the original chapter style as it is more appropriate for what I am trying to do. To clarify the subject I am updating my original question. Sep 10, 2013 at 9:55
  • @RızaBayoğlu You can add back fncychap if you really want to; this won't affect the placement of the date in the chapter starting pages. I'll add code for having the page number at the bottom left; but a more sensible placement would be "page number at bottom right, date at bottom left".
    – egreg
    Sep 10, 2013 at 10:12
  • You are right. Can you please change the places for the page number and the date? And if possible make it larger than the lyrics font size? By the way, there is problem that the date should not be the current date but the one I can specify for each chapter. Sep 10, 2013 at 10:25
  • @RızaBayoğlu Exchanged positions and supplied a command for setting the chapter's date. For enlarging the font size of the date, just add, for instance, a \large command: \fancyfoot[L]{\large\THEchapterdate}
    – egreg
    Sep 10, 2013 at 10:35
0

Use the titleps package

\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}
2
  • Miktex could not compile your code. I got this error message: ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ot1pzc.fd") Overfull \hbox (10.0pt too wide) in paragraph at lines 30--30 [][][][][][][][][] ) * Sep 10, 2013 at 7:39
  • @RızaBayoğlu This is not an error; just a warning. Did you get the pdf?
    – TeXtnik
    Sep 11, 2013 at 7:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .