Theses, Books, Title pagesAdd a rule at the bottom of the pages

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Ben_85
Posts: 4
Joined: Wed Mar 08, 2017 9:57 pm

Add a rule at the bottom of the pages

Post by Ben_85 »

I want to add a rule at the bottom of the pages (like the one it is at the top, but without anything printed). I've tried with fancyhdr package but I get some errors related to the template. Is there something I can do?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Add a rule at the bottom of the pages

Post by Stefan Kottwitz »

Hi Ben,
Ben_85 wrote:I've tried with fancyhdr package
perhaps show what you tried.
Ben_85 wrote:but I get some errors related to the template
Please post the error messages (and the code).

Stefan
LaTeX.org admin
Ben_85
Posts: 4
Joined: Wed Mar 08, 2017 9:57 pm

Add a rule at the bottom of the pages

Post by Ben_85 »

I've tried putting before \begin{document}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\footrulewidth}{1pt}


and he error message is

''Class MastersDoctoralThesis Error: Package `fancyhdr' is incompatible(MastersDoctoralThesis) with this class. \usepackage{fancyhdr}''

After that I've thought that maybe fancyhdr package doesn't accept only a rule, so I've tried to put more charateristics of the package from here

[url][https://es.sharelatex.com/learn/Headers_and_footers[/url]

in order to find the error, but everytime i Ggt the same.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Add a rule at the bottom of the pages

Post by Stefan Kottwitz »

Instead of fancyhdr, use features of the package scrlayer-scrpage, that's used in the template.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Add a rule at the bottom of the pages

Post by Johannes_B »

Try footsepline as option after headsepline.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Ben_85
Posts: 4
Joined: Wed Mar 08, 2017 9:57 pm

Add a rule at the bottom of the pages

Post by Ben_85 »

Everything I do on the .tex file is for nothing, I get erros everytime. I've tried to edit the .cls file,

\RequirePackage[markcase=used]{scrlayer-scrpage}
\providepairofpagestyles{thesisSimple}{%
\clearpairofpagestyles%
\automark[chapter]{chapter}
\ihead{\headmark}% Inner header
\ohead[\pagemark]{\pagemark}% Outer header
}
\ifoot{}% Inner footer
\ofoot{}% Outer footer
\pagestyle{thesisSimple}
\providepairofpagestyles[thesisSimple]{thesis}{%
\automark*[section]{}%
}
\providepairofpagestyles[thesisSimple]{review}{%
\ofoot[\shorttitle/\authorname]{\shorttitle/\authorname}
\ifoot[\today]{\today}
}
\pagestyle{thesis}
\ifbool{headsepline}{\KOMAoption{headsepline}{true}}{}
\PreventPackageFromLoading[\ClassError{\classname}{Package `fancyhdr' is
incompatible\MessageBreak with this class}{The pagesyles are defined
using package `scrlayer-scrpage', please consult the\MessageBreak
KOMA-script documentation for details.}]{fancyhdr}


And I get a footer but without the rule, which is what I want.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Add a rule at the bottom of the pages

Post by Johannes_B »

Please don't edit the class file. The license prohibits that.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Ben_85
Posts: 4
Joined: Wed Mar 08, 2017 9:57 pm

Add a rule at the bottom of the pages

Post by Ben_85 »

Ok, I'm sorry. I didn't know that.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Add a rule at the bottom of the pages

Post by Johannes_B »

Really, all you have to do is to add a line saying footsepline right after headsepline.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Add a rule at the bottom of the pages

Post by Stefan Kottwitz »

Hi Johannes,

how does he add this option within the template, within the document? I did not check it.

Ben: not to change a class because of licensing is one thing. Nobody can say don't do it on your own computer. ;-) It's just that it breaks when you update the class or move to another computer. A class should never be changed except by the developer or maintainer. That's no issue for a user: you can use class options and commands, but you can also redefine things if needed. So, instead of writing in class file, a \renewcommand may do it. Perhaps Johannes knows an option here or a macro to redefine.

Stefan
LaTeX.org admin
Post Reply