2

I borrowed some code from showcase-of-beautiful-typography

and try to do same decoration using memoir class without fancyhdr

Here is MWE:

            \documentclass[twoside,12pt,english]{memoir}
            \usepackage{babel}
            \usepackage[utf8]{inputenc}
            \usepackage{color}
            \definecolor{marron}{RGB}{60,30,10}
            \definecolor{darkblue}{RGB}{0,0,80}
            \definecolor{lightblue}{RGB}{80,80,80}
            \definecolor{darkgreen}{RGB}{0,80,0}
            \definecolor{darkgray}{RGB}{0,80,0}
            \definecolor{darkred}{RGB}{80,0,0}
            \definecolor{shadecolor}{rgb}{0.97,0.97,0.97}
            \usepackage{lettrine}
            \input Acorn.fd
            \newcommand*\initfamily{\usefont{U}{Acorn}{xl}{n}}
            \usepackage{fourier-orns}
            \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
            \renewcommand{\sectionmark}[1]{\markright{#1}}
            \usepackage{etoolbox}
            \makeatletter
            \patchcmd{\makeheadrule}
            {\@width #2\@height #3 }
            {\color{darkgray}\raisebox{-2.1pt}[10pt][10pt]{\leafright} \hrulefill \raisebox{-2.1pt}[10pt][10pt]{~~~\decofourleft \decotwo\decofourright~~~} \hrulefill \raisebox{-2.1pt}[10pt][10pt]{ \leafleft}%
            }
            {}
            {}
            \makeatother
        \nouppercaseheads
        \makepagestyle{myruled}


        \makeevenhead{myruled}{\thepage}{}{}
        \makeoddhead{myruled}{}{\rightmark}{\thepage}
        \makeevenfoot{myruled}{}{}{} 
        \makeoddfoot{myruled}{}{}{}
        \makeatletter % because of \@chapapp
        \makepsmarks{myruled}{
            \nouppercaseheads
            \createmark{chapter}{both}{nonumber}{\@chapapp\ }{. \ }
            \createmark{section}{right}{shownumber}{}{. \ }
            }
        \makeatother
        \pagestyle{myruled}
        \begin{document}
        \chapter{Test}
        Test. \newpage
        \section{Plant\ae}
        Test section. 
        \newpage
        Test. 
        \end{document}

If i move decoration code in the first {} nothing is displayed....How can i redefine memoir's builtin hrule?

output:

enter image description here

p.s. same question about makefootrule

1 Answers1

3

This seems to work

        \renewcommand\myruledheadrule{%
          \color{darkgray}\raisebox{-2.1pt}[10pt][10pt]{\leafright}%
          \hrulefill%
          \raisebox{-2.1pt}[10pt][10pt]{~~~\decofourleft%
            \decotwo\decofourright~~~} \hrulefill%
          \raisebox{-2.1pt}[10pt][10pt]{ \leafleft}%
          \vskip-24pt
        }

you may need to change the \vskip-24pt part. The resulting height of the rule should end up as zero.

\makeheadrule{name}{}{} just defines \nameheadrule

daleif
  • 54,450