New answers tagged

0 votes

Changing the Header

Warning: Do not use package titlesec together with a KOMA-Script class. It breaks several features of these classes. Remark: I do not know, if there are unnumbered sections and what the header should ...
user avatar
  • 81.3k
0 votes

Problem formatting header and footer with fancyhdr

It is not recommended to use titleps (as implied by the pagestyles option) and fancyhdr together. With some caution it is possible, however. But then fancyhdr should not be loaded before \usepackage[...
user avatar
0 votes
Accepted

Even and odd headers without fancyhdr

As @Tom mentions in the comments, you can use \color{DarkBlue} if you pass the svgnames option when loading xcolor: \usepackage[dvipsnames,svgnames]{xcolor} Of course there are other ways of defining ...
user avatar
  • 35.7k
1 vote
Accepted

Text header with background

\documentclass{article} \usepackage{xcolor} \usepackage{multicol} \begin{document} \noindent \colorbox{lightgray}{\makebox[\textwidth][l]{\textbf{Research Interests}}} \begin{multicols}{2} \begin{...
user avatar
1 vote

Set page numbering on specific pages

You can define another pagestyle, or redefine plain, with \fancypagestyle, and then use \thispagestyle{otherpagestyle}. For example (not tested): \fancypagestyle{plain}{ \renewcommand{\headrulewidth}...
user avatar
1 vote
Accepted

Koma Classes: Add to Header

You can use the geometry package in koma-script, but you should specify the usegeometry option to make it work together nicely. The parameters that are relevant are tmargin (or top) that specify the ...
user avatar
0 votes

change the position of the beamer page numbering

You can configure the footline using three beamercolorbox. \begin{beamercolorbox}[wd=<width>,ht=<height>,dp=<depth>,<right, left or center>,rightskip= <space>, leftskip =...
user avatar
  • 24.5k
1 vote
Accepted

Running Headers Too Long

Section-like commands have an optional argument for such cases. \documentclass[twocolumn,a4paper,10pt]{book} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{lipsum} \begin{document} \...
user avatar
0 votes

Section names in the header

Base on your requirements, this can be achieved without the fancyhdr package. Here is a the example code: \documentclass[12pt,a4paper]{article} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{3} ...
user avatar
  • 1,538
0 votes

Section names in the header

You could use fancyhdr and define your own pagestyles and use \pagestyle{...} at the end of the definitions for \mainmatter and \frontmatter. Setup of pagestyles % Page Layout \setlength{\headheight}{...
user avatar
2 votes
Accepted

\@abspage@last fails to typeset number in header

You need \makeatletter around \rhead{...}, not inside it, but you can do better. There is no “official” interface for using \@abspage@last in the document, mainly because it's not meant to save the ...
user avatar
  • 984k
7 votes
Accepted

How to center lines of text using fancyhdr

Use a tabular in the head. \documentclass{article} \usepackage{fancyhdr} \pagestyle{fancy} \lhead{\begin{tabular}[b]{@{}c@{}} Short Name \\ Really long Name \end{tabular}} \chead{Title} \rhead{Date} \...
user avatar
  • 35.7k
2 votes

Headers not aligned with the text frame

In the MWE the KOMA-Script class scrbook is used. Therefore you can replace \addto\extrasenglish{...} by \renewcaptionname{english}{\chapterautorefname}{Chapter} \renewcaptionname{english}{\...
user avatar
  • 81.3k
0 votes

Footer spacing inconsistency with fancyhdr

It seems the \color command pushes the page number down. This seems like a bug in fancyhdr to me. One of my TODO items says that I must check the color handling in fancyhdr. Your example shows that it ...
user avatar
1 vote
Accepted

Formatting headers with LaTeX

Here is a suggestion for a KOMA-Script class using package scrlayer-scrpage: \documentclass[headings=optiontoheadandtoc]{scrbook} \usepackage{xcolor} \usepackage{lipsum} \usepackage[letterspace=200]{...
user avatar
  • 81.3k
3 votes
Accepted

Headers not aligned with the text frame

Actually, the spaces are introduced by the \addto\extrasenglish command. Add % to the end of the lines that don't end with a macro. \addto\extrasenglish{% \renewcommand{\chapterautorefname}{...
user avatar
3 votes
Accepted

Formatting \pagemark with LaTeX

Here is a suggestion using \addtokomafont and \setkomafont for the font settings in page header and footer. \documentclass[twoside]{scrbook} \usepackage{xcolor} \usepackage{graphicx} \usepackage{...
user avatar
  • 81.3k
1 vote
Accepted

Why changing page footer content draws a line to the top of the page

Add \renewcommand{\headrulewidth}{0pt} to the preamble of your document.
user avatar
0 votes

Headers for specific pages of the document and footers the same for all pages

As the package documentation for fancyhdr points out the command \chapter issues \thispagestyle{plain}. I believe \tableofcontents does this too. Therefore a redefinition for the pagestyle plain might ...
user avatar
0 votes
Accepted

Format full header with figure and plain background

One among many possible solutions is the use of eso-pic to draw your style. Notice you may editing the measures or make them automatic to any page geometry your are using. This solution applies the ...
user avatar
  • 2,877
0 votes

TOC not compatible with automark on two-sided document

Sections in a twoside scrartcl document with option automark sets the left mark and cleans the right mark. So the first right mark on that pages in your document is empty and therefore \headmark is ...
user avatar
  • 81.3k
1 vote
Accepted

Elegant way of creating a document class that changes between styles back and forth

Here is a MWE whitch implements, I think, all your requirements: \documentclass[14pt, a4paper]{extbook} \usepackage[T1]{fontenc} % << added for a better result \usepackage{lmodern} % <&...
user avatar
  • 3,779
2 votes
Accepted

Customising Overleaf Template

EDIT: more specific footer settings, see below. The template use the memoir document class, which has a lot of customizability. You can make these changes in preamble/general.tex: line 166, change \...
user avatar
0 votes

Page number always centered in automatically generated TOC

It would have been most helpful if you had provided an MWE (from \documentclass... to \end{document}) that we could compile that showed your problem. In the book/report classes the ToC is typeset as a ...
user avatar
  • 25.2k
0 votes
Accepted

Header width is smaller than longtable width

The problem is solved by adding \\ after the caption code line. The final code would be: \begin{longtable}{lcc} \caption {Tabla de frecuencias de Distrito} \\ \hline \textbf{Distrito} & \textbf{...
user avatar

Top 50 recent answers are included