New answers tagged

1

The following example updates \mychapter by doing the following: Store the second argument #2 in a command called \chaptoc. Use regexpatch's \xpatchcmd* to replace all occurrences of \\ with nothing (effectively removing them) Use \chaptoc as the addition to the ToC, while printing the original chapter title as part of \chapter*. \documentclass{report} \...


0

I put some of the instructions into the MWE itself. BTW, etoolkit is just an code editor. \patchcmd replaces some of the existing code with something else. \documentclass{book} \usepackage{needspace} \def\chapterspace{184.87657pt}% reserving a length register seemed a bit wasteful \usepackage{etoolbox} \makeatletter \patchcmd{\chapter}{\if@openright\...


0

Here is an example for report class. \documentclass[11pt]{report} \usepackage[utf8]{inputenc} \usepackage{pdfpages} \usepackage[toc,page]{appendix} \begin{document} \tableofcontents \begin{appendices} \chapter[Title for TOC and header]{} bla bla bla bla bla bla bla bla \clearpage \refstepcounter{chapter}% \thispagestyle{plain}% \...


1

You ask too many questions in one submission. In answer to your quotations question: %\documentclass... \usepackage{epigraph} % ... \begin{document} \chapter{A chapter} \epigraph{The will ...}{Martin Luther} % ... \end{document}


1

If you activate the klasse option headings=optiontohead|optiontotoc|optiontoheadandtoc*, you can use the options head={…} and tocentry={…} in the optional argument of sectioning macros. \documentclass[12pt,a4paper,headings=optiontohead]{scrreprt} \usepackage[automark,headsepline]{scrlayer-scrpage} \automark[chapter]{chapter} \usepackage{lipsum}% only for ...


2

You can redefine \chapterlineswithprefixformat: \documentclass[chapterprefix=true]{scrreprt} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{lipsum} \newcommand*{\originalchapterlineswithprefixformat}{} \let\originalchapterlineswithprefixformat\chapterlineswithprefixformat \renewcommand\chapterlineswithprefixformat[3]...


0

I figured out how to manipulate how to manipulate the Style of KOMA Script, as well as TOC, LOT and LOF, generated text, to a .ttf font. Additionally, the style of package acronym generated acronym lists. First you need to add your font with fontspec. You need to use LuLaTex or XeTeX to use this package: \usepackage(fontspec) \newfontfamily{\fontarial}{...


0

As you can easily see, my problem is created by a Typo in front of \chapter. The / is easily missed.


0

With a KOMA-Script class, it is not recommended to redefine internal commands. Here is a suggestion redefining the documented macro \chapterlinesformat: \documentclass[ %paper=a4, pagesize=auto,% default fontsize = 12pt ]{scrbook} \usepackage[T1]{fontenc} %\usepackage[utf8]{inputenc}% needed for older TeX distributions \usepackage[lf, p, sflf, sfp]{...


2

You can test for the current value of secnumdepth: \documentclass[paper=a4, pagesize=auto, fontsize = 12pt]{scrbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[lf, p, sflf, sfp]{libertine} \usepackage{biblatex} \KOMAoptions{% listof=totoc, bibliography=totoc } \makeatletter \def\thickhrulefill{\leavevmode \leaders \hrule ...


0

This should work in every documentclass and it is based on my answer here \documentclass[a4paper,11pt]{scrreprt} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} %\graphicspath{{img/}} \usepackage{fancyhdr} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{caption} \usepackage{...


4

If sections, subsections etc. should not get a dot after the number, use option numbers=noenddot. One possibility to add the dot after chapter number is \usepackage{xpatch} \xpatchcmd\chapterformat{\autodot}{.}{}{\PatchFailed} \DeclareTOCStyleEntry[ entrynumberformat=\entrynumberwithdot ]{chapter}{chapter} \newcommand*\entrynumberwithdot[1]{\def\autodot{....


1

you can use the koma option numbers=enddot so the first line will be \documentclass[a4paper,11pt,numbers=enddot]{scrreprt} Edit: This will set points also after section numbers. You may want to go with: Remove last dot in title numbering This is a solution specifically for KOMA-Script


3

It's not hard with titlesec: \documentclass[12pt, a4paper]{book}% \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{lipsum} \usepackage{titlesec}% \titleformat{\chapter}[display]{\sffamily\huge\bfseries}{\filleft\chaptername \thechapter}{4ex}{}[{\titlerule[1.5pt]}] \begin{document} \chapter{Introduction} \sffamily \...


1

Nesting the additional chapter in an additional environment does it: \documentclass{book} \newenvironment{additional} {\addtocounter{chapter}{-1}\renewcommand{\thechapter}{ \arabic{chapter}A}} {} \begin{document} \chapter{First original chapter} \begin{additional} \chapter{Added chapter} % I want this chapter to be Chapter 1A or 1a etc. \end{additional} \...


0

Unfortunaly there is no MWE in the question. And I am not sure, if I have understood, what you want to do. With the KOMA-Script class scrreprt you can use \addchap to get an unnumbered chapter with TOC and header entries: \documentclass[numbers=enddot]{scrreprt} \usepackage{blindtext}% only for dummy text \usepackage{fancyhdr} \pagestyle{fancy}% use this ...


0

You can use a combination of the tocloft and appendix packages. The following works with English names but the packages allow you to use any names you wish; read the documentation. % tocnameprob.tex % put Chapter/Appendix before the number \documentclass{book} % or any other class that provides \chapter \usepackage{lipsum} \usepackage{tocloft} \...


1

To do that you should use the \appendix command before your appendices. Note that it will affect each \chapter{} you will use after it. \appendix will change "Kapitel" to "Anhang". If you want to have "Appendix" instead you should give the following command in your preamble, where *appendix name* is the word you want to have: \addto\captionsgerman{\...


0

If I understand correctly you want a chapter mark in the margin of every page, but no marks after a certain chapter. The following MWE uses the tikzpagenodes package to draw the chapter marks and not the chapterthumbs package, because tikzpagenodes seems more robust and easy to use. The solution builds on Positioning of the chapter number in the margin note ...


Top 50 recent answers are included