How can I remove lines on edge?
Closed this issue · 2 comments
mapodev commented
Hey, how can I remove the line of chapter decoration on top? I need only white space on edges of my script for Amazon publishing. You know what I mean?
AlexanderZeilmann commented
fmarotta commented
To remove the first one mentioned by AlexanderZeilmann, add this to the preamble of your main.tex
\makeatletter
\RenewDocumentCommand{\chapterstylekao}{}{%
\renewcommand*{\chapterformat}{%
\mbox{\chapappifchapterprefix{\nobreakspace}\scalebox{2.85}{\thechapter\autodot}}%
}%
\renewcommand\chapterlinesformat[3]{%
\vspace{3.5\vscale}%
\if@twoside%
\Ifthispageodd{%
\smash{\makebox[0pt][l]{%
\parbox[b]{\textwidth}{\flushright{##3}}%
%\makebox[\marginparsep][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}%
\makebox[\marginparsep][c]{}%
\parbox[b]{\marginparwidth}{##2}%
}}%
}{
\smash{\makebox[\textwidth][r]{%
\parbox[b]{\marginparwidth}{\flushright{##2}}%
\makebox[\marginparsep][c]{}%
\parbox[b]{\textwidth}{\flushleft{##3}}%
}}%
}
\else%
\smash{\makebox[0pt][l]{%
\parbox[b]{\textwidth}{\flushright{##3}}%
\makebox[\marginparsep][c]{}%
\parbox[b]{\marginparwidth}{##2}%
}}%
\fi%
}%
\RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter}%
\setlength{\mtocshift}{-3\vscale}%
}
\makeatother
To remove the second one, add the following:
\makeatletter
\renewpagestyle{scrheadings}{%
{\smash{\hspace{-\headmarginparwidth}\hspace{-\headmarginparsep}\makebox[\headtotal][l]{%
\makebox[7\hscale][r]{\thepage}%
\makebox[3\hscale]{}\makebox[3\hscale]{}%
\makebox[\headtextwidth][l]{\leftmark}}}}%
{\smash{\makebox[0pt][l]{\makebox[\headtotal][r]{%
\makebox[\headtextwidth][r]{\hfill\rightmark}%
\makebox[3\hscale]{}\makebox[3\hscale]{}%
\makebox[7\hscale][l]{\thepage}}}}}%
{\smash{\makebox[0pt][l]{\makebox[\headtotal][r]{%
\makebox[\headtextwidth][r]{\hfill\rightmark}%
\makebox[3\hscale]{}\makebox[3\hscale]{}%
\makebox[7\hscale][l]{\thepage}}}}}%
}{%
{}%
{}%
{}%
}
\makeatother
(You can also add both at the same time.)