On Wed, Feb 2, 2011 at 8:35 PM, Richard Heck <rgh...@comcast.net> wrote:
> On 02/01/2011 08:58 PM, Stig Rognes wrote: > >> Hello LyX-users, >> >> I'm using book class (Memoir) and would like to have the frontmatter >> (abstract, acknowledgments (unnumbered chapter), nom, lof, lot, and toc >> itself) appear in emphasized/italics font on the Contents page. I don't >> want the actual chapter titles appear in italics, just in the ToC. >> >> I've tried the following hack, which kinda works, first removing LyX's own >> List of tables, then inserting two TeX-boxes, first a non-contents-listed >> lot, and then one adding it manually right after: >> >> \listoftables* >> \addcontentsline{toc}{chapter}{\emph{List of tables}} >> >> This isn't good enough though, as it messes up the pdf-bookmarks page >> numbering and doesn't work with LyX's own List of Tables, Nomenclature, or >> whatever list. And I haven't found any hack for getting the Contents-insert >> itself in the ToC appear in italics/emphasis. >> >> Any ideas would be highly appreciated! >> >> Well, it's a wild guess, but what if you temporarily redefine > \addcontentsline at the start of the frontmatter and then restore it at the > end? E.g.: > > \let\oldaddcl=\addcontentsline > \renewcommand\addcontentsline[3]{\oldaddcl{#1}{#2}{\emph{#3}} > ... > \let\addcontentsline=\oldaddcl > > Something like that ought to have the right effect. > > rh > > Stig >> > > Thanks Richard, but either I misunderstood your instructions or else it didn't work. I put \let\oldaddcl=\addcontentsline \renewcommand\addcontentsline[3]{\oldaddcl{#1}{#2}{\emph{#3}} in an ERT at the start of the document, and \let\addcontentsline=\oldaddcl in an ERT after the Contents, before the first chapter. But in the pdf everything went blank, and later: Cannot view file: File does not exist. DVI generates empty output. Stig