fmarotta / kaobook

A LaTeX class for books, reports or theses based on https://github.com/kenohori/thesis and https://github.com/Tufte-LaTeX/tufte-latex.
https://github.com/fmarotta/kaobook
LaTeX Project Public License v1.3c
861 stars 185 forks source link

How to possibly activate footers in kaobook #103

Closed acromarmot closed 3 years ago

acromarmot commented 3 years ago

Dear Mr. Marotta,

I'm currently typesetting a workbook with a lot of help from your amazing kaobook class. However, one thing I couldn't figure myself: I need to have a logo (vector graphics) in the footer on every even page. Could you maybe hint me on how to activate footers without changing the rest of this beautiful layout set?

Thanks in advance, acromarmot

fmarotta commented 3 years ago

Dear acromarmot, here is one possibility:

\renewpagestyle{scrheadings}{%
    {\smash{\hspace{-\headmarginparwidth}\hspace{-\headmarginparsep}\makebox[\headtotal][l]{%
        \makebox[7\hscale][r]{\thepage}%
        \makebox[3\hscale]{}\rule[-1mm]{0.5pt}{19\vscale-1mm}\makebox[3\hscale]{}%
        \makebox[\headtextwidth][l]{\leftmark}}}}%
    {\smash{\makebox[0pt][l]{\makebox[\headtotal][r]{%
        \makebox[\headtextwidth][r]{\hfill\rightmark}%
        \makebox[3\hscale]{}\rule[-1mm]{0.5pt}{19\vscale-1mm}\makebox[3\hscale]{}%
        \makebox[7\hscale][l]{\thepage}}}}}%
    {\smash{\makebox[0pt][l]{\makebox[\headtotal][r]{%
        \makebox[\headtextwidth][r]{\hfill\rightmark}%
        \makebox[3\hscale]{}\rule[-1mm]{0.5pt}{19\vscale-1mm}\makebox[3\hscale]{}%
        \makebox[7\hscale][l]{\thepage}}}}}%
}{%
    {\hfill\parbox{1cm}{\includegraphics{/path/to/your/logo}}}%
    {}% 
    {}% 
}

You should add this in the preamble of your main.tex. If you provide a minimal working example, I could maybe try and be more specific, but in general, for headers and footers you can refer to the KOMAScript guide, in particular page 453.