Re: How to make frontmatter appear in italics in ToC?

2011-02-04 Thread Stig Rognes
On Thu, Feb 3, 2011 at 9:20 PM, Richard Heck  wrote:

>  On 02/03/2011 01:59 PM, Stig Rognes wrote:
>
>
>
> 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.
>
>  Instead:
>
> \let\oldaddcl=\addcontentsline
>
> \def\addcontentsline#1#2#3{%
>
> \addtocontents{#1}{\protect\contentsline{#2}{\emph{#3}}{\thepage}}}
>
>
> in the preamble, which is stolen from the LaTeX declaration. I actually
> tested that, and it works.
>
>  Richard
>
>
Put it in preamble, but still no luck. This time it did produce a pdf
(despite a loong list of errors) but then *everything* in Contents was in
italics, Acknowledgments and LoF had disappeared etc. Plus the pdf index got
mixed up.

Maybe it's got someting to do with the Memoir class, maybe it's something
else in my preamble, I don't know. Anyway I think I've changed my mind about
the whole thing, think I'll just stick with the standard font.

Stig


Re: How to make frontmatter appear in italics in ToC?

2011-02-03 Thread Richard Heck

On 02/03/2011 01:59 PM, Stig Rognes wrote:



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.


Instead:

\let\oldaddcl=\addcontentsline

\def\addcontentsline#1#2#3{%

\addtocontents{#1}{\protect\contentsline{#2}{\emph{#3}}{\thepage}}}


in the preamble, which is stolen from the LaTeX declaration. I actually 
tested that, and it works.


Richard



Re: How to make frontmatter appear in italics in ToC?

2011-02-03 Thread Stig Rognes
On Wed, Feb 2, 2011 at 8:35 PM, Richard Heck  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


Re: How to make frontmatter appear in italics in ToC?

2011-02-02 Thread Richard Heck

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




How to make frontmatter appear in italics in ToC?

2011-02-01 Thread Stig Rognes
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!

Stig