Tag Info

Hot answers tagged header-footer

13

The package zref-totpages can deliver the total number of pages and with expl3 we have a powerful number crunching system. \documentclass[12pt,paper=a4]{scrbook} \usepackage{scrpage2} \usepackage{blindtext} \usepackage{zref-totpages} \usepackage{xparse} \usepackage{xcolor} \ExplSyntaxOn \NewDocumentCommand{\percentage}{} { \int_compare:nTF { \ztotpages ...

11

\documentclass{scrartcl} \usepackage{xparse} \usepackage{scrlayer-scrpage} \cfoot{\percentpagemark} \AtEndDocument{\label{last-page}} \ExplSyntaxOn \NewDocumentCommand \percentpagemark { } { \int_set:NV \l_tmpa_int { \value{page} } \int_set:NV \l_tmpb_int { \pageref{last-page} } \fp_eval:n { round( 100*\l_tmpa_int/\l_tmpb_int , 2 ) } \, \% ...

8

LaTeX's standard classes use \MakeUppercase to convert the letters of section titles to uppercase. The conversion does not know about arguments, math, ... Workarounds: The letter "g" can be hidden inside a macro, e.g.: \documentclass{article} \usepackage{amssymb} \DeclareRobustCommand{\mathfrakg}{\mathfrak{g}} \pagestyle{headings} \begin{document} ...

8

Package fancyhdr puts the elements of the footer into a \parbox[t]. At the beginning You are using \color{...}. It does not start a new paragraph, thus the first top element of the \parbox[t] is the color whatsit (\special). It is aligned with the base line of the other entries. A then goes below the color whatsit. Solution: The color whatsit should go into ...

7

Another approach, with page counters and usage of calculator package. The percentage is calculated via \CalculatePercentage[]{}{}, where the first optional argument contains the number of digits for round off, the 2nd argument is the designed for the current page number and the 3rd argument holds the total number of pages. I used a different approach, ...

5

I'd say that you could use \thispagestyle{plain}. Using \thispagestyle{empty} would remove the page number.

4

LaTeX puts the skip registers \@fptop and \@fpbot at the top and bottom of float columns/pages and \@fpsep between them. The default values are: \setlength\@fptop{0\p@ \@plus 1fil}% = 0pt plus 1fil \setlength\@fpsep{8\p@ \@plus 2fil}% = 8pt plus 2fil \setlength\@fpbot{0\p@ \@plus 1fil}% = 0pt plus 1fil That means, the floats are vertically centered on ...

4

Use the textcase package: \documentclass{article} \usepackage{amssymb} \usepackage[overload]{textcase} \pagestyle{headings} \begin{document} \section{Test $\mathfrak{g}_2$} \end{document} However, the best is to avoid the dreaded automatic uppercasing done by the standard classes, which is, in my opinion, the biggest flaw in their design. When headers ...

4


2

It seems you're using biblatex, so I removed the call to natbib from classicthesis-config.tex and added some commands to the preamble: \documentclass[ twoside, openright, titlepage, numbers=noenddot, headinclude, footinclude=true, cleardoublepage=empty, fontsize=11pt, ngerman, american, ]{scrbook} \input{classicthesis-config} ...

2

The contents of \leftmark and \rightmark is determined by the commands \markboth and \markright, that usually are issued by sectioning commands such as \chapter or \section. There is an additional level, though. When you do \chapter{Title}, among other things LaTeX issues \chaptermark{Title}; similarly \section{Title} and \subsectiontitle issue ...

2

Put into the preamble (Document->Preferences->Preamble) \let\ps@plain\ps@headings if you are using the pagestyle fancy then write \let\ps@plain\ps@fancy or define \fancypagestyle{plain}{<settings>} See documentation of package fancyhdr. The pagestyle for the first page of a chapter is preset to plain.

2

As you are using a starred chapter command \chapter*{} no header mark gets set. Therefore, LaTeX does not know, what to write and uses the previous header text. You will have to tell the starred chapter or section the header-title as follows. % arara: pdflatex \documentclass[french ]{report} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{babel} ...

2

If you define a short title for your section or chapter, the classicthesis format takes this as your header text as well. With the command \sectionmark{} (and similarly \chaptermark{}) you are able to define a custom header version of your title. In this case, you are forced to use it in order to restore the original title writing. % arara: pdflatex % ...

2

In the right hand pages, the header shows the section name, which is empty. You can change the behavior inside the appendices environment with \appendixpage \begin{appendices} \fancyhead[RO]{\slshape \leftmark}

1

classicthesis loads scrpage2. You can use \automark[chapter]{part} \renewcommand{\partmark}[1]{\markboth{\spacedlowsmallcaps{#1}}{}} Code: \documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude, footinclude=true,cleardoublepage=empty, BCOR=5mm,paper=a4,fontsize=10pt]{scrbook} \usepackage{lipsum} ...

1

You can define two different page styles: one for the TOC, LOF and LOT and another for the main text. \documentclass{report} \usepackage{fancyhdr} \fancypagestyle{front}{% style for TOC, LOF, LOT \fancyhf{} \renewcommand{\headrulewidth}{0pt} \cfoot{\thepage} } \fancypagestyle{main}{% style for the mainmatter \fancyhf{} ...

1


1

I tried phfaist's answer and it worked. But for future record, I also happened to find a fast way of doing it: In order to change the color of the Contents section, one can also do the following: \renewcommand\contentsname{\textcolor[cmyk]{1,0,0,0}{Contents}}\tableofcontents Apparently, I use the babel package and it did not clash with the ...

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