Page Layout ⇒ memoir | Left Alignment of ToC Title
-
CharlieMAC
- Posts: 19
- Joined: Wed May 04, 2011 5:50 pm
memoir | Left Alignment of ToC Title
I'm writing my thesis using the memoir document class and I have a very customized chapter style, which I got from a paper I saw sometime ago.
It turns out this chapter style customization affects the alignment of the title of the ToC and friends. Currently, both ToC and chapter titles are right aligned. So, I'd like to have the chapter titles right aligned and ToC title left aligned. Is that possible?
I provide MWE attached below.
Many thanks
CharlieMAC
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
CharlieMAC
- Posts: 19
- Joined: Wed May 04, 2011 5:50 pm
memoir | Left Alignment of ToC Title
The thing is I don't understand the code related to the customized chapter style
Code: Select all
\definecolor{nicered}{rgb}{.647,.129,.149}
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[0cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}
}
\makeatother
\chapterstyle{daleif1}Thanks in advance
CharlieMAC
-
CharlieMAC
- Posts: 19
- Joined: Wed May 04, 2011 5:50 pm
memoir | Left Alignment of ToC Title
I post the code I used:
Code: Select all
\makechapterstyle{daleif12}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedright ##1\par}
}Code: Select all
\chapterstyle{daleif12}
\tableofcontents
\chapterstyle{daleif1}