A quick question: Is it possible to change the name of a part/chapter/section with some sort of command?
For example, I have a chapter called "Important Things". I created this chapter with the command \chapter{Important Things}. This prints the title of the chapter and adds an entry in the ToC.
I guess that the information about the chapter name is stored and can somehow be accessed by a command like \chaptername or \chaptertitle or something similar. So let's assume that "Important Things" is the current "value" of the chapter-name. What if I now want to change this "value" into "Unimportant Things". For this I cannot use \chapter{Unimportant Things}, because if I use that, then I change the value of the chapter-name but I also print a chapter heading.
Maybe I could also ask the following: Can I create a part/chapter/section without printing a heading and without having an entry in the ToC?
I am not sure if I made myself clear.
I've been asked for a MWE. There you see that the page headers after the new part continue to bear the section title and chapter title of the previous part.
%!TEX TS-program = lualatexmk
\documentclass{scrbook}
\usepackage{fmtcount}
\usepackage[noindentafter]{titlesec}
\addtokomafont{part}{\thispagestyle{empty}\Huge\textsc}
\addtokomafont{partnumber}{\Huge\textsc}
\renewcommand*{\partformat}{\partname~\numberstring{part}}
\titleformat{\chapter}[display]{\fillast}{\Large\textsc{\chaptertitlename~\numberstring{chapter}}}{1ex minus .1ex}{\LARGE\emph}
\titlespacing{\chapter}{1pc}{*3}{*20}[1pc]
\titleformat{\section}[block]{\fillast\large}{\thesection}{.5em}{\large\textsc}
\titlespacing{\section}{1pc}{*6}{*2}[1pc]
\titleformat{\subsection}[block]{\fillast\itshape}{\thesubsection}{.5em}{}
\titlespacing{\subsection}{1pc}{*3}{*2}[1pc]
\titleformat{\subsubsection}[block]{\fillast}{}{0pt}{}
\titlespacing{\subsubsection}{1pc}{*3}{*2}[1pc]
\usepackage{titleps}
\newpagestyle{chapter_and_section}{
\sethead[\thepage][\emph{\chaptertitle}][]{}{\emph{\sectiontitle}}{\thepage}
\setfoot[][][]{}{}{}
}
\pagestyle{chapter_and_section}
\newpagestyle{first_page_of_chapter}{ % here is the definition of the first page of a chapter
\sethead[][][]{}{}{}
\setfoot[][\thepage][]{}{\thepage}{}
}
\assignpagestyle{\chapter}{first_page_of_chapter}
\begin{document}
\addpart{Some Things}
\chapter{Some Stuff}
\section{More Stuff}
Text.\newpage
Text.\newpage
Text.\newpage
Text.\newpage
\addpart{Important Things}
Text.\newpage
Text.\newpage
Text.\newpage
Text.\newpage
\end{document}
\chapter[Important Things]{Unimportant Things}printsUnimportant Thingsas title chapter butImportant Thingsin table of contents and headings. Does it works for you? – Ignasi Jan 22 '15 at 07:53Important Thingsin the ToC and as the heading of the Chapter. I just want to change afterwards the name of the chapter intoUnimportant Things. – ClintEastwood Jan 22 '15 at 07:55\markboth{whatever you want}{something else}? – Johannes_B Jan 22 '15 at 08:01titlepsdoes not like\markboth, as I heard (http://tex.stackexchange.com/a/89911/12277) – ClintEastwood Jan 22 '15 at 08:03titlepswith KOMA-script. KOMA comes with its very ownscrlayer-scrpagethat is designed to be compatible. – Johannes_B Jan 22 '15 at 08:33\sethead[\thepage][][]{}{}{\thepage}immediately after\addpartto clear the headers of\chaptertitleand\sectiontitle. However, heed @Johannes_B's suggestion of the class-specific header/footer options... – Werner Jan 22 '15 at 08:34titleps. – ClintEastwood Jan 22 '15 at 08:34titlepsis for extending the generic standard classes and doesn't take account for all the features and special stuff by KOMA. – Johannes_B Jan 22 '15 at 08:34\addpartsomething like\clearsectionnameor\sectionname{}. – ClintEastwood Jan 22 '15 at 08:38