On Sunday 27 March 2011 19:52:42 Steve Litt wrote:
> Hi all,
>
> Yet another problem with Chapter*. I have some appendices at the end of the
> book which I put as Chapter* instead of Chapter so they wouldn't be
> identified as "Chapter 58: Appendex A" on the page header or in the table
> of contents. It didn't work out too well.
>
> The page headers for Appendex A shows the header for the last chapter made
> with Chapter instead of Chapter*. In other words, the Appendix's page
> header shows something like "Chapter 57: Lastchaptertitle".
>
> I'm using a document class derived from class Book, and it's waaaaaaay too
> late to change to Memoir or Koma or any of those, and I don't like them
> anyway.
>
> I've attached a 2 chapter sample that clearly shows the problem on its PDF
> output's last page.
>
> Another problem is my super-duper date-showing header reverts to the one
> last shown in a legitimate chapter.
>
> I spoze there are two ways I can handle this. I could make the appendices
> chapters and include ERT like this just before they start:
>
> \renewcommand{\thechapter}{ }\renewcommand{\chaptername}{ }
>
> I'd need to do something similar with the date variable used in the date
> header, which isn't that hard.
>
> Or I could find some way to make Chapter* influence \thechapter and
> \chaptername and the like.
>
> Any ideas?
So here's what I ended up doing. From an authoring standpoint it's ugly, but
the output the user sees is fine, so what the heck. This works when the
desired Chapter* are all at the end, with no further Chapter headings or
anything that should be in Mainmatter.
After my chapters comes and Epilogue, which shouldn't have a chapter number,
and then come three Appendices, which shouldn't have chapter numbers. So
before the Epilogue I put in the following ERT:
\renewcommand{\hdrcolon}{ }
\renewcommand{\thechapter}{~}{ }
\renewcommand{\chapenglish}{ }
\backmatter
The first three commands blank out things like the word "Chapter, the chapter
number, and the colon that follows the chapter number in the headers. Note
that \hdrcolon and \chapenglish are my own creations -- I've manually set my
headers in my layout. Then I declare \backmatter, which does the following:
* Eliminates the words "Chapter", the chapter number, and colon from the
header.
* Eliminates the chapter number from the table of contents entry
Now if I'd had my druthers, I'd have wanted my Epilogue to be in the
mainmatter, but this workaround demands it be in the backmatter. Fine, but I
still want the user to think of the Epilogue as part of the book's text. So
what I do is put a blank line in the table of contents following the Epilogue.
Here's how. Between the end of the Epilogue and the start of Appendix A I
include the following ERT:
\addcontentsline{toc}{chapter}{~}
There we go. There's the kludgy Steve Litt we all know and love. He just
inserted a blank contents line. What can I say, it works, and if the reader
clicks on the blank chapter nothing happens, which is what you want.
Hey people, I didn't promise it would be pretty :-)
SteveT
Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt