Hello, all!
I am writing a lab report, so I select "Report" in the document class provided by LyX. The problem is that I want to remove the name "Chapter" on each chapter.
For example, on the attachment below, the form I want is "1. Introduction", rather than "Chapter 1 Introduction". How can erase "Chapter" please?
On thing I want to emphasize is that I don't want to use environment Chapter*, because it is unnumbered, and is not shown on the table of content, maybe not on the head of each page as well.
Thank you!
LyX ⇒ Remove "Chapter" from Chapter Headings
-
- Posts: 42
- Joined: Fri Jul 22, 2011 12:26 am
Remove "Chapter" from Chapter Headings
- Attachments
-
- chapter.png (23.1 KiB) Viewed 19637 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 42
- Joined: Fri Jul 22, 2011 12:26 am
Remove "Chapter" from Chapter Headings
Now I have successfully changed my chapter name and also the chapter number in roman by using
Note these two command should NOT put in the preamble in LyX, otherwise, it does not work properly. It must be put below the table of content in ERT, for example.
Now I have another problem. How can I move the chapter number "I" and name "Introduction" on the same line, instead of two lines, please?
Code: Select all
\renewcommand{\chaptername}{}
\renewcommand{\thechapter}{\Roman{chapter}}
Now I have another problem. How can I move the chapter number "I" and name "Introduction" on the same line, instead of two lines, please?
- Attachments
-
- chapter.png (9.39 KiB) Viewed 19634 times
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Remove "Chapter" from Chapter Headings
This line makes the chapter name empty, but the layout of the chapter heading is still reserved.EigenGoofy wrote:Code: Select all
\renewcommand{\chaptername}{}
You could
- change the document class from report to scrreprt, i.e. the KOMA-Script report class, which has such chapter headings by default. This would be my choice, since KOMA-Script classes offer much more features.
- You could use the titlesec package for customizing the headings. The
titlesec manual contains example heading settings of the standard classes in the appendix, this is a nice start for understanding and redefining.
- You could redefine internal report class macros.
That's because you are using the babel package, which defines such names depending on the document language. You could use a babel command for this, in the preamble, such asEigenGoofy wrote: Note these two command should NOT put in the preamble in LyX, otherwise, it does not work properly. It must be put below the table of content in ERT, for example.
Code: Select all
\addto{\captionsenglish}{\renewcommand{\chaptername}{Newname}}
LaTeX.org admin
-
- Posts: 42
- Joined: Fri Jul 22, 2011 12:26 am
Re: Remove "Chapter" from Chapter Headings
I am sorry that I recently really didn't have time to look at your message, Stefan_K!
The KOMA-Script report class does not help that much, since it changes somewhere else which I don't like.
I'll try to use titlesec package.
Thank you very much, Stefan_K! Your book is wonderful - despite of the fact that I want you put more detailed instruction and more examples on those advanced chapter, such as chapter 7, 9, 10, etc.
The KOMA-Script report class does not help that much, since it changes somewhere else which I don't like.
I'll try to use titlesec package.
Thank you very much, Stefan_K! Your book is wonderful - despite of the fact that I want you put more detailed instruction and more examples on those advanced chapter, such as chapter 7, 9, 10, etc.
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Remove "Chapter" from Chapter Headings
Very nice to read that you like the book!
Yes, the KOMA-Script classes have some different defaults, but they can easily be changed. In the long run, one can benefit from the many more features those classes offer.
Stefan
Yes, the KOMA-Script classes have some different defaults, but they can easily be changed. In the long run, one can benefit from the many more features those classes offer.
Stefan
LaTeX.org admin