friendly / VCDR

Visualizing categorical data with R
0 stars 0 forks source link

Switching part colors changes color of running heads prematurely #69

Closed friendly closed 8 years ago

friendly commented 8 years ago

A comment from Michele on the book-11-03-15.pdf:

The only minor issue I saw were two instances where the running head color was wrong, and they both appear as the last page before a new Part (they are the color of the next Part)—see pgs. 112 and 257. We can let this go if you want.

@sciencegraph : is there an easy fix for this in book.Rnw ?

sciencegraph commented 8 years ago

I can't figure out what is the problem. Although, an easy way to fix it would be to compile two different pdfs with just the colors of part 1 and 2 and then substitute these two pages in the editor's pdf with Adobe Acrobat. This is not an elegant solution, but that will work.

friendly commented 8 years ago

No -- too much of a kludge. I think what happens is that the part colors change before the last page of the chapter at the end of a part is produced.

friendly commented 8 years ago

@sciencegraph : Can you test if something like \clearpage just before part{} will cure this?

sciencegraph commented 8 years ago

Yes, I'm testing different solutions.

sciencegraph commented 8 years ago

The problem disappears if the \part[] is set before its colors definition. just need to switch the order.

friendly commented 8 years ago

Great! I'll test this out tomorrow AM.

friendly commented 8 years ago

What does that do to the Part page? It seems to me that it will be in the previous part color.

sciencegraph commented 8 years ago

The problem arises when a new part starts, so by setting the color definition after the part declaration every thing works. Just need to switch the order in part II and part III like this:

\addtocontents{toc}{\protect\pagebreak}% Avoid bad pagebreak here \part[Exploratory and Hypothesis-Testing Methods]% {Exploratory and Hypothesis-Testing Methods[4ex] %\includegraphics[width=\textwidth,trim=80 50 80 50]{ch04/fig/berk-fourfold4-1} \includegraphics[width=\textwidth]{front/fig/partmap2}% }

\colorlet{sectcol}{col2!70!black} % section/subsection titles \colorlet{partcol0}{col2!80} \colorlet{partcol1}{col2!50} \colorlet{partcol2}{col2!20}

friendly commented 8 years ago

Ah, I see now. This works!