# Tag Info

8

This is possible with totcount package, for example! \regtotcounter{chapter} registers an existing counter name and stores the value at the end of the compilation to the .aux file, during the second compilation the total value can be obtained with \total{chapter}. There's no need to adjust a label to the last chapter then manually. \documentclass{book} ...

6

Well, this is a somewhat hidden feature, but minitoc provides for the \adjustmtc command, that is meant for starred chapters etc., i.e. for the case that the mtc counter is off by one. This command can be 'misused' to provide the minitoc for the following chapter. The \adjustmtc[n] command is documented on page 34 of the current manual of minitoc. The ...

5

You can use etoc for this, via its label/ref mechanism for tocs. \documentclass{book} \usepackage{etoc} \usepackage{blindtext} \makeatletter \newcommand*\cleartoevenpage {% \clearpage \if@twoside \ifodd \c@page \hbox {}\newpage \if@twocolumn \hbox {}\newpage \fi \fi \fi } \makeatother \begin{document} \tableofcontents % switch to ...

5

If you don't want to load hyperref, you can use refcount instead. You can use the lastpage package to get the length of the last chapter. \documentclass{report} \usepackage{hyperref}% defines \getpagerefnumber \begin{document} Chapter 1 has [\the\numexpr\getpagerefnumber{c2}-\getpagerefnumber{c1}\relax] pages in it. \chapter{Chapter 1}\label{c1} Text... ...

4

I don't recommend this code, but maybe somebody can improve it. \documentclass[ 11pt, ]{book} \usepackage[top=2cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,letterpaper]{geometry} \usepackage[english]{babel} \usepackage[babel=true]{csquotes} \usepackage[T1]{fontenc} \usepackage[explicit]{titlesec} \usepackage{xcolor} \usepackage{charter} ...

3

This is the definition of \chapter from report.cls \newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi \thispagestyle{plain}% \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter} \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne ...

3

The three memoir commands in question are: \chapnamefont \chapnumfont \chaptitlefont which, in the default settings, are set to \Huge and \bfseries. Thus it is a simple matter to redefine them: \documentclass[openany]{memoir} \usepackage{xcolor,lipsum}% lipsum.sty is just for this example \renewcommand{\chapnamefont}{\Huge\bfseries\color{blue}} ...

2

Since \chapter uses \thispagestyle{plain}, the \fancypagestyle{plain} redefinition must disable the \fancyhead[RO,LE]{...} from fancy style, i.e. say \fancyhead{} in \fancypagestyle{plain}{...}. \documentclass{book} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\sectionmark}[1]{\markboth{#1}{}} % set the \leftmark \fancyhf{} \fancyhead{} ...

2

As was suggested to you in the comments, load the titlesec package. Then add the following commands: \titleformat{\chapter}{\normalfont\bfseries\Large}{\thechapter.\quad}{0pt}{} \titlespacing{\chapter}{0pt}{-50pt}{40pt} The second one is what you're looking for. The values are respectively: left space space before (above) space after (below) So you ...

2

(I think this question is off-topic here, but I'm not sure.) You should either include all of ToC, LoF and List of Publications in the table of contents, or none of them. And (with my copy editor hat one) this order makes sense to me. Another option is to make the list of publications an unnumbered section in the Introduction, but one that is included in ...

2

This is largely what I said in the comments. I left a few things "in" but commented out along with meta-comments of my own trying to explain why. I hope all's clear. (If not, let me know.) \documentclass[12pt,a4paper,twoside]{report} \usepackage[top=2.54cm, bottom=2.54cm, left=2.54cm, right=2.54cm]{geometry} \usepackage{sectsty} % section font size ...

1

Such tasks tend to be really nasty, because there is a plethora of things that can go wrong. I suggest to use the search & replace functions of your editor: If you don't have more than 25 lines inside the preamble, I'd copy all files into one large file. How to do this depends on your OS, but google provides many answers. For Windows e.g. see here: ...

1

First of, since memoir has its own build in pagestyle system there is no reason to use fancyhdr with memoir. Second the chapter language does not have anything to do with fancyhdr or \@chapapp for that matter. The word current word for chapter is stored in \chaptername. \@chapapp is a special macro that returns \chaptername whenever appendix is not ...

1

I found a new workaround for the problem explained in the comment to the original question. Basically one needs to replace the old \makeatletter from @marco-daniel with this one: \usepackage{xcolor} \colorlet{chapterbackground}{red} \addtokomafont{chapter}{\color{white}} \makeatletter \renewcommand\chapterlinesformat[3]{% \colorbox{chapterbackground}{% ...

1

You can change the value of the counter tocdepth mid-document, writing it to the ToC at the appropriate spot. This allows you to vary what shows and what doesn't show. \documentclass{report} \begin{document} \tableofcontents \chapter{This chapter is listed in the contents page} \section{So are all its sections} \subsection{--- and subsections!} ...

1

Here is an improved solution to my previous solution in the abovementioned page. Now you have to declare a \chapterabstract[some text] before each chapter command to obtain an abstract: \documentclass[11pt,a4paper]{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage{cabin} \usepackage[nomarginpar]{geometry} ...

1

As David implied "It all depends". Depending on the particular LaTeX class there is a hierarchy of headings. The book and report classes provide part, chapter, section, subsection, subsubsection, paragraph and subparagraph. The article class has all of these except for chapter, while the memoir class adds book at the top of the book and report class ...

Only top voted, non community-wiki answers of a minimum length are eligible