Re: How to keep page header text from crashing into page numbers?
On Tue, 28 Jun 2016 13:25:20 -0400 Steve Littwrote: > On Tue, 28 Jun 2016 13:39:43 +0200 > Liviu Andronic wrote: > > > On Tue, Jun 28, 2016 at 3:07 AM, Steve Litt > > wrote: > > > Hi all, > > > > > > I'm using LyX 2.1.4, fancyhdr, I've customized even and odd page > > > headers to report current chapter and current section, > > > respectively. On even numbered pages, moderate length chapter > > > names crash into the page number. Short ones right justify away > > > from the page number, and long ones wrap so that the page number > > > isn't touched, but moderate length chapter names overwrite the > > > rightmost digit or two of the page number. > > > Have you tried Short Titles for the offending headings? > > > > Liviu > > No, I'd forgotten about that, thanks for reminding me. > > But even so, short names would be coathangering the symptom rather > than fixing the root cause. Here's why... > > If the line's long enough to wrap, this problem doesn't occur. If it's > way shorter than the space allotted, this problem doesn't occur. But > if it's in the middle, the problem occurs. What's happening is that > the text part of the header, the part that isn't the page number, is > using too wide a width to word wrap. Let me repeat: Long names aren't > the problem. Middle length names are the problem. > > That's the root cause. To fix this with short names I'd need to make > the names extremely short: So short as to be confusing to the reader. > > So, given that, does anyone know a way to get the text part of the > header to wrap in a smaller width, so it doesn't crash into the page > number to its left? Here's how I solved the problem. I changed the following: \renewcommand{\chaptermark}[1]{\markboth{\footnotesize\textsc{\textbf{\slshape\chaptername{} \thechapter: #1}}}{}} to the following: \renewcommand{\chaptermark}[1]{\markboth{~~~\footnotesize\textsc{\textbf{\slshape\chaptername{} \thechapter: #1}}}{}} The 7 tildes (non breaking spaces) guarantee that any chaptername header text already close to the page number will wrap, and yet shorter stuff overwrites the page number with blanks, which is like not overwriting it at all. None of the book's 19 chapters come close to the chapter name text overwriting any part of the page number. It's a hack, but it works. In no way does this preclude me from using Liviu's suggestion of short names. Instead, it means when I use those short names (thank you Liviu), for clarity instead of for ultra-clarity. Thanks, SteveT Steve Litt June 2016 featured book: Troubleshooting: Why Bother? http://www.troubleshooters.com/twb
Re: How to keep page header text from crashing into page numbers?
On Tue, Jun 28, 2016 at 7:25 PM, Steve Littwrote: > On Tue, 28 Jun 2016 13:39:43 +0200 > Liviu Andronic wrote: > >> On Tue, Jun 28, 2016 at 3:07 AM, Steve Litt >> wrote: >> > Hi all, >> > >> > I'm using LyX 2.1.4, fancyhdr, I've customized even and odd page >> > headers to report current chapter and current section, >> > respectively. On even numbered pages, moderate length chapter names >> > crash into the page number. Short ones right justify away from the >> > page number, and long ones wrap so that the page number isn't >> > touched, but moderate length chapter names overwrite the rightmost >> > digit or two of the page number. > >> Have you tried Short Titles for the offending headings? >> >> Liviu > > No, I'd forgotten about that, thanks for reminding me. > > But even so, short names would be coathangering the symptom rather than > fixing the root cause. Here's why... > > If the line's long enough to wrap, this problem doesn't occur. If it's > way shorter than the space allotted, this problem doesn't occur. But if > it's in the middle, the problem occurs. What's happening is that the > text part of the header, the part that isn't the page number, is using > too wide a width to word wrap. Let me repeat: Long names aren't the > problem. Middle length names are the problem. > > That's the root cause. To fix this with short names I'd need to make > the names extremely short: So short as to be confusing to the reader. > > So, given that, does anyone know a way to get the text part of the > header to wrap in a smaller width, so it doesn't crash into the page > number to its left? > I would suggest that this is a good question for http://tex.stackexchange.com/ . I'd wager you'll find there a LaTeX expert with a solution within the day (or an already existing question on this). I would expect this would have to do with some penalty of sorts either from LaTeX or from fancyhdr. Regards, Liviu > Thanks, > > SteveT > > Steve Litt > June 2016 featured book: Troubleshooting: Why Bother? > http://www.troubleshooters.com/twb
Re: How to keep page header text from crashing into page numbers?
On Tue, 28 Jun 2016 13:39:43 +0200 Liviu Andronicwrote: > On Tue, Jun 28, 2016 at 3:07 AM, Steve Litt > wrote: > > Hi all, > > > > I'm using LyX 2.1.4, fancyhdr, I've customized even and odd page > > headers to report current chapter and current section, > > respectively. On even numbered pages, moderate length chapter names > > crash into the page number. Short ones right justify away from the > > page number, and long ones wrap so that the page number isn't > > touched, but moderate length chapter names overwrite the rightmost > > digit or two of the page number. > Have you tried Short Titles for the offending headings? > > Liviu No, I'd forgotten about that, thanks for reminding me. But even so, short names would be coathangering the symptom rather than fixing the root cause. Here's why... If the line's long enough to wrap, this problem doesn't occur. If it's way shorter than the space allotted, this problem doesn't occur. But if it's in the middle, the problem occurs. What's happening is that the text part of the header, the part that isn't the page number, is using too wide a width to word wrap. Let me repeat: Long names aren't the problem. Middle length names are the problem. That's the root cause. To fix this with short names I'd need to make the names extremely short: So short as to be confusing to the reader. So, given that, does anyone know a way to get the text part of the header to wrap in a smaller width, so it doesn't crash into the page number to its left? Thanks, SteveT Steve Litt June 2016 featured book: Troubleshooting: Why Bother? http://www.troubleshooters.com/twb
Re: How to keep page header text from crashing into page numbers?
On Tue, Jun 28, 2016 at 3:07 AM, Steve Littwrote: > Hi all, > > I'm using LyX 2.1.4, fancyhdr, I've customized even and odd page > headers to report current chapter and current section, respectively. On > even numbered pages, moderate length chapter names crash into the page > number. Short ones right justify away from the page number, and long > ones wrap so that the page number isn't touched, but moderate length > chapter names overwrite the rightmost digit or two of the page number. > Have you tried Short Titles for the offending headings? Liviu > For best rendering on medium sized mobile devices, the paper format is > 5.5 inches long, and 3.5 inches wide. The margins, all measured in > inches, are: > > Top: .55 > Bottom: .3 > Inner: .2 > Outer: .2 > Head sep: .2 > Head height: .3 > Foot skip: .1 > > SteveT > > Steve Litt > June 2016 featured book: Troubleshooting: Why Bother? > http://www.troubleshooters.com/twb