2022 Developer Survey is open! Take survey.
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
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.4k
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.4k
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
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
  • 985k
2 votes

Formula with superscript cut from header in Beamer

I found this addition to the preamble that can be helpful: \setbeamertemplate{headline} {% \leavevmode% \hbox{% \begin{beamercolorbox}[wd=.5\paperwidth,ht=3.05ex,dp=1.5ex,right]{section in head/...
user avatar
  • 51
1 vote

Header not displayed for table of contents

The problem is probably that \tableofcontents uses \thispagestyle{plain}. My standard solution for this would be something like this: \newpage \phantomsection %Needed for hyperref \addcontentsline{toc}...
user avatar
1 vote

Remove the heading of the page where the figure is?

Your figure is typeset on a "page of floats", and unfortunately, LaTeX uses the headers/footers definition of the previous "normal" page for these. However, fancyhdr has a special ...
user avatar
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
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
1 vote

First page of bibliography doesn't display page number

For biblatex : do NOT use \renewcommand{\bibsetup}{\thispagestyle{headings}} as it will overwrite valuable setup lines. Instead, patch the command if you can, or restore the whole original ...
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.4k
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
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,778

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