TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

Chapter/Section Title
TUG logo

Main page

Search CTAN:


Google c.t.t.

Google d.c.t.t.



Chaptername |  Chaptertitle |  Chapterstart on left Side | 
Detecting if \chapter exists | 
Examples | 
Indentation of Sections | 
New Chapter on odd and even pages |  No "Chapter" | 
Pictures on Chapterpage | 
Renew the Chapter Definition | 
Start Chapter on left Side | 
Unnumbered Chapters/Sections into TOC | 
Vertical Space for Chapter Title | 

Detecting Chapter

If you want to know if your documentclass supports chapter then use the following code:
\ifx\csname chapter\endcsname\relax
	%%% \chapter is undefined or \relax
	%%% \chapter is defined and not \relax

Unnumbered Chapters/Sections into TOC
  • Some chapters into TOC is possible with
    \addcontentsline{toc}{chapter}{My unnumbered Chapter}
    just after the beginning of the chapter.

    If you want to use the chapternumber and/or title for a header/footer write into the preamble:
    % #1: toc entry
    % #2: main entry
    now you have the commands \thechapter for the number and \ChapName for the title, which you can place anywhere in the header/footer.
    You can get the same for section/subsection a.s.o.

    If you use babel than you can't change the name "Chapter" with a \renewcommand ... because babel overwrites this change. Write as very first command in your doc in TeX
    or write into the preamble f.ex. for the german language
         {insert your chaptername}%
    Look here if you do not want any leading name for the chapter.
    Start Chapter on Left Side
    In some cases it may be useful to start a new chapter on the left side instead the default right side. Put the following in the preamble:
    % Definition from latex.ltx modified
  • local time: Sun Apr 11 23:57:20 CEST 2021 ; file is: 658.550972222222 days old
    contact webmaster _at_ TeXnik.de