[Tex/LaTex] Changing the title of table of contents in lyx

lyxtable of contents

I've already tried to follow the answer here:
How to change the title of ToC?

by using \renewcommand{\contentsname}{Whatever}

However, it does not seem to work with lyx, neither in the preamble nor as ERT
The package being used is babel.

Please help me solve this problem

Minimum working example of .lyx file:




1. Innledning



Best Answer

  1. Document > Settings... > Language > Language package: None

  2. Document > Settings... > LaTeX Preamble >



The result must be the equivalent to this plain LaTeX:



If doing this you got a Package babel Error: Unknown languagexxxxx'`:


Then, go to View Complete Log ...


As you can see, this is because there are an \select@language {english} in the .aux file of the previous run. You can remove it manually (in the case of the screenshot in a Linux system it was /tmp/lyx_tmpdir.T23297/lyx_tmpbuf6/newfile6.aux) but you can just click on Close and LyX will clean the auxiliary files for you (at least if there are only this error). In next run it should work.

Related Question