Re: changing fixed names 'Contents', 'List of Figures', etc. Maybe solved

2012-05-29 Thread Guenter Milde
On 2012-05-29, Steve Litt wrote:
 On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said:

 I cannot change the default strings 'Contents', 'List of Figures',
 etc. that are generated as titles of these sections.  I have tried
 putting in the preamble commands of the type:

 \renewcommand{\contentsname}{Table of Contents}

 But nothing works.  I am typing in English without the babel package.

Are you sure you do not use the babel packge? LyX uses it by default. 
What does the ViewSource window show when you tick the show complete
source box? (You can also export your example to LaTeX and play with
it.)

I am asking, because the minimal LaTeX example

  \documentclass[english]{article}
  % \usepackage{babel}
  
  \renewcommand{\contentsname}{Table of Contents} 
  
  \begin{document}
  
  \tableofcontents
  \section{test the best}
  
  \end{document}

works as you expect (showing Table of Contents as contents heading in
the output).

 I reproduced your symptom in an article based document, putting
 \renewcommand{\contentsname}{Table of Contents} in the document
 preamble, as you would expect it should be. Like you, my document
 continued to print the table of contents title as Contents. So then I
 exported to LaTeX, fooled around with it, and discovered it works only
 if \renewcommand{\contentsname}{Table of Contents} is in the document
 itself, not the document header.

The usual trick in these cases is \AtBeginDocument. Indeed, replacing
renaming \renewcommand{\contentsname}{Table of Contents} with:

 \AtBeginDocument{\renewcommand{\contentsname}{Table of Contents}}

works also with babel as expected.

 So I went back into LyX, removed \renewcommand{\contentsname}{Table of
 Contents} from the document preamble, and put it in an ERT before the
 Table of Contents, and it did the right thing.

No need for ERT with \AtBeginDocument.

Günter



Re: changing fixed names 'Contents', 'List of Figures', etc. Maybe solved

2012-05-29 Thread Guenter Milde
On 2012-05-29, Steve Litt wrote:
 On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said:

 I cannot change the default strings 'Contents', 'List of Figures',
 etc. that are generated as titles of these sections.  I have tried
 putting in the preamble commands of the type:

 \renewcommand{\contentsname}{Table of Contents}

 But nothing works.  I am typing in English without the babel package.

Are you sure you do not use the babel packge? LyX uses it by default. 
What does the ViewSource window show when you tick the show complete
source box? (You can also export your example to LaTeX and play with
it.)

I am asking, because the minimal LaTeX example

  \documentclass[english]{article}
  % \usepackage{babel}
  
  \renewcommand{\contentsname}{Table of Contents} 
  
  \begin{document}
  
  \tableofcontents
  \section{test the best}
  
  \end{document}

works as you expect (showing Table of Contents as contents heading in
the output).

 I reproduced your symptom in an article based document, putting
 \renewcommand{\contentsname}{Table of Contents} in the document
 preamble, as you would expect it should be. Like you, my document
 continued to print the table of contents title as Contents. So then I
 exported to LaTeX, fooled around with it, and discovered it works only
 if \renewcommand{\contentsname}{Table of Contents} is in the document
 itself, not the document header.

The usual trick in these cases is \AtBeginDocument. Indeed, replacing
renaming \renewcommand{\contentsname}{Table of Contents} with:

 \AtBeginDocument{\renewcommand{\contentsname}{Table of Contents}}

works also with babel as expected.

 So I went back into LyX, removed \renewcommand{\contentsname}{Table of
 Contents} from the document preamble, and put it in an ERT before the
 Table of Contents, and it did the right thing.

No need for ERT with \AtBeginDocument.

Günter



Re: changing fixed names 'Contents', 'List of Figures', etc. Maybe solved

2012-05-28 Thread Steve Litt
On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said:
 Steve Litt slitt at troubleshooters.com writes:
 
  
  On Mon, 28 May 2012 23:11:41 + (UTC), ddiedrichs said:
   it's an article
  
  Context???
  
  
 I cannot change the default strings 'Contents', 'List of Figures',
 etc. that are generated as titles of these sections.  I have tried
 putting in the preamble commands of the type:
 
 \renewcommand{\contentsname}{Table of Contents}
 
 But nothing works.  I am typing in English without the babel package.


Hi ddiedrichs,

I reproduced your symptom in an article based document, putting
\renewcommand{\contentsname}{Table of Contents} in the document
preamble, as you would expect it should be. Like you, my document
continued to print the table of contents title as Contents. So then I
exported to LaTeX, fooled around with it, and discovered it works only
if \renewcommand{\contentsname}{Table of Contents} is in the document
itself, not the document header.

So I went back into LyX, removed \renewcommand{\contentsname}{Table of
Contents} from the document preamble, and put it in an ERT before the
Table of Contents, and it did the right thing.

I'm attaching a 1.8K example LyX file that properly changes the
contents name.

If this solves your problem, please reply and mark the subject as
SOLVED so others who follow you know what to do. I found this to be
very surprising behavior.

Thanks

SteveT

Steve Litt*  http://www.troubleshooters.com/
  *  http://twitter.com/stevelitt
Troubleshooting Training  *  Human Performance



test.lyx
Description: application/lyx


Re: changing fixed names 'Contents', 'List of Figures', etc. Maybe solved

2012-05-28 Thread Steve Litt
On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said:
 Steve Litt slitt at troubleshooters.com writes:
 
  
  On Mon, 28 May 2012 23:11:41 + (UTC), ddiedrichs said:
   it's an article
  
  Context???
  
  
 I cannot change the default strings 'Contents', 'List of Figures',
 etc. that are generated as titles of these sections.  I have tried
 putting in the preamble commands of the type:
 
 \renewcommand{\contentsname}{Table of Contents}
 
 But nothing works.  I am typing in English without the babel package.


Hi ddiedrichs,

I reproduced your symptom in an article based document, putting
\renewcommand{\contentsname}{Table of Contents} in the document
preamble, as you would expect it should be. Like you, my document
continued to print the table of contents title as Contents. So then I
exported to LaTeX, fooled around with it, and discovered it works only
if \renewcommand{\contentsname}{Table of Contents} is in the document
itself, not the document header.

So I went back into LyX, removed \renewcommand{\contentsname}{Table of
Contents} from the document preamble, and put it in an ERT before the
Table of Contents, and it did the right thing.

I'm attaching a 1.8K example LyX file that properly changes the
contents name.

If this solves your problem, please reply and mark the subject as
SOLVED so others who follow you know what to do. I found this to be
very surprising behavior.

Thanks

SteveT

Steve Litt*  http://www.troubleshooters.com/
  *  http://twitter.com/stevelitt
Troubleshooting Training  *  Human Performance



test.lyx
Description: application/lyx