Hi,
I use the "section*" type to get titles without numbers. But i want them to be in the index, do you know how to do?
LyX ⇒ Title without number but in the index
Title without number but in the index
New on Latex using Lyx ang Jabref
System: Linux Ubuntu 7.10
System: Linux Ubuntu 7.10
NEW: TikZ book now 40% off at Amazon.com for a short time.
Title without number but in the index
Use the \addcontentsline command just after the \section* command as the following example shows
Code: Select all
\documentclass{article}
\begin{document}
\tableofcontents
\section*{First section}
\addcontentsline{toc}{section}{First section}
Some text.
\section*{Second section}
\addcontentsline{toc}{section}{Second section}
Some more text.
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Title without number but in the index
Thank you but i'm totally new on Latex and Lyx, so i don't know where to add the code you gave me.
In the code view, i can't edit the Latex code.
In the code view, i can't edit the Latex code.
New on Latex using Lyx ang Jabref
System: Linux Ubuntu 7.10
System: Linux Ubuntu 7.10
Re: Title without number but in the index
In LyX, LaTeX code is always inserted via ERT (which stands for Evil Red Text). So, make a section* and then click on the ERT butten and then type the \addtocontentsline-command as written above.
A Humanities user of LaTeX 

- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
Title without number but in the index
Hi Gabriel,
do you want every section without number? I'm asking because you mentioned several titles.
In that case you can use \section and decrease the secnumdepth-counter:
Stefan
do you want every section without number? I'm asking because you mentioned several titles.
In that case you can use \section and decrease the secnumdepth-counter:
Code: Select all
\setcounter{secnumdepth}{0}
Re: Title without number but in the index
hey! i tried using the \addcontentsline{toc}{section}{First section}
there was no number infront of the section, however it did have a number in the contentlist:
The index should have been
nomenclature
1 introduction
2 methodology
what i now have is however
1 nomenclature
2 introduction
even though the introductionsection is numbered 1 in the actual text..
any tips on this?
there was no number infront of the section, however it did have a number in the contentlist:
The index should have been
nomenclature
1 introduction
2 methodology
what i now have is however
1 nomenclature
2 introduction
even though the introductionsection is numbered 1 in the actual text..
any tips on this?