Tag Info

Hot answers tagged

10

The documentation of the fancyhdr package will be extremely helpful to you. Essentially, you need to do the following: \documentclass{article} \usepackage{fancyhdr} \fancyfoot{} \lhead{Yourname, \thepage} \pagestyle{fancy} \usepackage{lipsum} \begin{document} \lipsum \end{document} Since your title page is the only one that's different, you ...


7

Here is a suggestion using scrlayer to define a new pagestyle. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{tikz}% loads also graphicx, xcolor \usepackage{lmodern} \usepackage[top=1.25in, bottom=1.25in, left=1.25in, right=1.25in]{geometry} ...


6

scrlayer-scrpage Here is a suggestion using scrlayer-scrpage. \documentclass[a5paper]{book} \setlength\headheight{13.1pt} \usepackage{xcolor} \colorlet{headbgcolor}{green!50!blue!70} \usepackage[markcase=noupper]{scrlayer-scrpage} \clearpairofpagestyles \automark[chapter]{chapter} \renewcommand\chaptermarkformat{\chaptername\ \thechapter:\enskip} ...


4

You can try something like this to fool titlesec: \let\orisectionmark\sectionmark \renewcommand\sectionmark[1]{}% \section[TOCtitle]{Fulltitle\orisectionmark{Headertitle}} \orisectionmark{Headertitle} \let\sectionmark\orisectionmark EDIT Some Remarks regarding the comments: You didn't provide a minimal example so most of it was guessing. titlesec calls ...


4

By considering the default setup for ps@plain found in the amsclass documentation, I was able to change the plain pages to use header numbering (with no running title) as follows: \makeatletter \def\ps@plain{\ps@empty \def\@evenhead{% \normalfont\scriptsize \rlap{\thepage}\hfil }% \def\@oddhead{% \normalfont\scriptsize \hfil ...


4

Both \sectionmark and \subsectionmark should take an argument: \renewcommand{\sectionmark}[1]{}%prevent rewriting \markright \renewcommand{\subsectionmark}[1]{}%prevent rewriting \markright The \section command produces \sectionmark{<title>} and if you redefine \sectionmark to have no argument, the tokens {<title>} are not removed.


4

This is actually due to an incorrect use of your timing in setting the \pagestyle. Since the ToC is set under the front page style, and the main document should be processed under main, you should use \chapter{Logical foundation} \pagestyle{main} rather than the other way around. That is, you chapter is first set (the heading; this actually includes a ...


3

You should define \chaptermark in a better way: \renewcommand{\chaptermark}[1]{% \markboth{% \ifnum\value{chapter}>0 \thechapter.\space \fi #1% }{}% } so “0.” will not be added when the chapter number is zero (that is, for the chapters before the first). For the conclusion, use \chapter*{Summary} ...


3

My first thought would be to use TikZ, but you don't need TikZ if you're willing to load the xcolor package. Here's my poor man's version: \documentclass{article} \usepackage{xcolor} \usepackage{fancyhdr} \fancyhf{} \pagestyle{fancy} \renewcommand{\sectionmark}[1]{\markboth{\thesection.\ #1}{}} \renewcommand{\headrulewidth}{0.3pt} ...


3

Because of you are using the KOMA-Script class scrartcl I would suggest to use scrlayer-scrpage instead fancyhdr. Then you can define and insert a new layer for the background of the pagenumber. \documentclass[12pt,numbers=enddot,parskip=full]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{blindtext} ...


3

Because you are loading scrlayer-scrpage: Remove the (unnecessary) redefinitions of \sectionmark and \subsectionmark and use the possibilities of scrlayer-scrpage. \usepackage{scrlayer-scrpage} \automark{chapter}% -> section does not rewrite \markright \clearpairofpagestyles \renewcommand{\chaptermarkformat}{} \addtokomafont{pagehead}{\small} ...


3

The problem is that the center environment adds spacing around itself, which is not wanted inside a header. You can see more details at When should we use \begin{center} instead of \centering? From texdoc memoir, we can look for the documentation of the \makeoddhead command, which says this: \makeoddhead{ <style> }{ <left> }{ <center> }{ ...


3

Define a new page style, say, bib like \fancypagestyle{bib}{ \fancyhf{} \fancyhead[LE,RO]{% % We want italics \itshape % The chapter title \leftmark} \fancyfoot[C]{\thepage} } without the section number and then just before \begin{thebibliography}{99} issue \pagestyle{bib} Code: \documentclass[]{article} \usepackage{fancyhdr} ...


3

\chaptername inserts the word Chapter. What you want is \renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}{}} Here is a minimal example: \documentclass{report} \usepackage{fancyhdr,lipsum} \pagestyle{fancy} \renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}{}} \fancyhf{}% Clear header/footer \fancyhead[L]{\bfseries\rightmark} ...


2

Since KOMA-Script version 3.17 (current version on CTAN) you have to redefine the commands \sectionformat, \subsectionformat etc. instead \othersectionlevelsformat. \documentclass{scrartcl}[2015/04/23] \renewcommand\sectionformat{\makebox[0pt][r]{\thesection\autodot\enskip}} \renewcommand\subsectionformat{\makebox[0pt][r]{\thesubsection\autodot\enskip}} ...


2

loading geometry befor fancyhdr will fix it \usepackage[margin=3.0cm]{geometry} \usepackage{fancyhdr} \pagestyle{fancy}


2

It sounds as if you would be happier with the standalone class: % arara: pdflatex \documentclass[border=1mm]{standalone} % a little border for easier screenshot trimming. You can leave this away or put whatever size pleases you. \usepackage{caption} % replace this by `capt-of` if you want to obtain the old (not beautiful) vertical spacing of the caption ...


2

beamer uses \insertslideintonotes to insert a frame thumbnail into notes page. This command is defined in beamerbasenotes.sty file: \newcommand{\insertslideintonotes}[1]{{% \begin{pgfpicture}{0cm}{0cm}{#1\paperwidth}{#1\paperheight} \begin{pgflowlevelscope}{\pgftransformscale{#1}}% \color{normal text.bg} ...


2

You should set \pagestyle{fancy} after having set the page parameters, because fancyhdr uses the current text width for preparing its headers and footers. I recommend using geometry, though: probably \usepackage[textwidth=7in,textheight=9.5in]{geometry} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[R]{header} ...


2

I got this code snippet many, many years ago from I don't remember where, so unfortunately I can't credit its originator; but it certainly isn't mine. \makeatletter \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else \hbox{} \vspace*{\fill} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi\fi\fi} \makeatother All this really does is ...


2

Using KOMA-script, there would be no problem :-) \documentclass[headings=optiontoheadandtoc]{scrartcl} \usepackage[automark]{scrlayer-scrpage} \usepackage{blindtext} \begin{document} \tableofcontents \section[tocentry={platypus dancing till morning},% head={dancing platypus}]% {The platypus went on dancing till the mornig sun rose over the hills} ...


1

You are doing something to change the defaults of scrbook (see the example below). To ensure that the blank pages after TOC and LOF are empty insert \KOMAoptions{cleardoublepage=empty} at the end of your preamble or at the very beginning of the document. Here is an example to show that with scrbook the blank page after TOC is in the default empty: ...


1

Another possibility is using scrlayer-scrpage. I guess that your document is oneside: \usepackage{scrlayer-scrpage} \clearpairofpagestyles \addtokomafont{pagehead}{\upshape} \ihead*{Yourname, \pagemark} With the article class you have to use \maketitle\thispagestyle{empty} to get an empty title page. Oneside article: \documentclass{article} ...


1

I managed to get this done by renewing the \chapter command which increments two counters. One counter for the current ChapterIndex and another for the NextChapterIndex. Every chapter creates a \label with the key ch:\theChapterIndex which can then be referenced when the head or foot is rendered. The chapter relative page number can be calculated using the ...


1

This could works ... (lipsum package and \lipsum command is for the text in pictures) \documentclass{article} \usepackage[utf8]{inputenc} \title{ccc} \author{Bernar} \date{May 2015} \usepackage{biblatex} \usepackage[british, french]{babel} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\sectionmark}[1]{% ...


1

Same question as keeping-header-on-top-in-landscape-mode? @touhami provided an excellent answer. Instead of using the landscape environment, change the geometry to landscape using: \paperwidth=\pdfpageheight \paperheight=\pdfpagewidth \pdfpageheight=\paperheight \pdfpagewidth=\paperwidth and then set the headwidth to the textheight: ...


1

The entire titlesec module discourages the use of starred version of sectional units. As such, their usage seems may cause unexpected/unwanted results anyway. In this case, however, you're better off issuing a manual \sectionmark{<title>} to update the display in the headers. The process can be automated with the help of xparse: ...


1

The following will do what you say you want. I am not sure it is what you want, but your mileage may vary. \pagestyle{fancy} \fancyhf{} \fancyhf[coh]{\rightmark} \fancyhf[ceh]{\leftmark} \fancyhf[cf]{\thepage} \renewcommand\chaptermark[1]{\markright{\MakeUppercase{\chaptername{} \thechapter: #1}}} \makeatletter \def\@part[#1]#2{% \ifnum \c@secnumdepth ...


1

You can try with \documentclass[11pt,a4paper]{book} \usepackage[utf8]{inputenc} %\usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{hyperref} \usepackage[head=15pt, top=1in, bottom=1in, left=1in, right=1in]{geometry} \usepackage{lipsum} \newcommand*\parttitle{} \let\origpart\part \renewcommand*{\part}[2][]{% \ifx\\#1\\% optional argument not ...


1

The background can be added by a beamercolorbox and the footline by a rule. \documentclass{beamer} \usepackage[size = custom, height = 110, width = 81]{beamerposter} \definecolor{darkred}{RGB}{175,1,1} \setbeamercolor{headline}{fg=black,bg=gray!30} \setbeamertemplate{headline}{ \leavevmode \begin{beamercolorbox}[wd=\paperwidth]{headline}% ...



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