Theses, Books, Title pagesNew Page style in Legrand Orange Book

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
mahtlinux
Posts: 3
Joined: Fri Aug 14, 2020 10:59 pm

New Page style in Legrand Orange Book

Post by mahtlinux »

Hello everyone,
I'm trying to make a new page style work in the Legrand Orange Book. Once I have applied the new style for a range of pages inside a chapter, I'm not able to return to the original Fancy style by including \pagestyle{fancy} and the new Style is also applied to the rest of the book.
Thanks in advance.
Last edited by cgnieder on Sun Aug 23, 2020 7:58 pm, edited 1 time in total.

Recommended reading 2024:

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

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

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

New Page style in Legrand Orange Book

Post by rais »

and how did you create this new page style of yours?

KR
Rainer
mahtlinux
Posts: 3
Joined: Fri Aug 14, 2020 10:59 pm

New Page style in Legrand Orange Book

Post by mahtlinux »

Hi,
in the structure.tex file I've included this:

Code: Select all

\newlength{\myoddoffset}
\setlength{\myoddoffset}{\marginparwidth}

\fancypagestyle{mystyle}{
  \fancyhead{}
  \renewcommand{\pagecolor}{blue!5!white}
  \renewcommand{\headrulewidth}{0pt}
  \fancyfootoffset[leh,roh]{\myoddoffset}
  \fancyfoot[RO, LE] {\thepage}%
}
Then I've applied it inside a chapter with:

Code: Select all

\newpage
\pagestyle{mystyle}
At the end of the chapter I try to change to the previous style with:

Code: Select all

\newpage
\pagestyle{fancy}
but it remains my style and it is applied to the rest of the book as well.

Thanks for the help.
Last edited by cgnieder on Sun Aug 23, 2020 7:59 pm, edited 1 time in total.
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

New Page style in Legrand Orange Book

Post by rais »

weird.
Try

Code: Select all

\newpage
\begingroup
\pagestyle{mystyle}
to switch to your style and

Code: Select all

\newpage
\endgroup
to switch back to the original page style.

Or if your style is limited to a single page anyway, try

Code: Select all

\newpage
\thispagestyle{mystyle}
instead.

KR
Rainer
mahtlinux
Posts: 3
Joined: Fri Aug 14, 2020 10:59 pm

New Page style in Legrand Orange Book

Post by mahtlinux »

It works!
Thank you very much.
Post Reply