Tag Info

Hot answers tagged

6

memoir provides the condition \if@mainmatter which you can use to condition on whether or not you're in the \mainmatter section of your document: \documentclass[a4paper,11pt,titlepage,oneside,openany]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{kantlipsum} % empty style for the first page of every chapter, except in \frontmatter ...


5

As mentioned in the comments, it is sufficient to place the colorchange (done via \chaptercolor) after calling the chapter command. \documentclass{scrbook} \usepackage{blindtext} \usepackage[automark]{scrlayer-scrpage} \usepackage{xcolor} \clearscrheadfoot \ihead[\leftmark]{\leftmark} \ohead[\rightmark]{\rightmark} \cfoot[\pagemark]{\pagemark} %Now ...


5

The \@title container is discarded by the article class after it has been used by \maketitle. You could jump the gun and redefine \title to have also an optional argument for the footer: \documentclass{article} \usepackage{lipsum} % just for the example \makeatletter \def\title{\@dblarg\niekas@title} \def\niekas@title[#1]#2{% \gdef\@title{#2}% for ...


4

The default footline theme with Madrid has the last block right-aligned. Thus the date there is not centered and will be slightly shifted when page numbers change (e.g. when going from single digit to double digits). To have the the date centered in the last block and unaffected by the changes in the page count, one may define a new footline theme as in ...


4

immediately following the line \chapter*{acknowledgements} insert this command: \markboth{Acknowledgements}{Acknowledgements} you may have to input this in all caps to match the running head style for the rest of your document. some document classes don't make proper running heads from the titles when entered with \chapter*, and it appears that you're ...


4

Set the header inside a tabular, as line-breaking (using \newline) does not work as expected inside the header boxes: \documentclass{article} \usepackage{geometry,fancyhdr} \pagestyle{fancy} \fancyhf{}% Clear header/footer \chead{\begin{tabular}{c} My very important and long title that is not being centered as I would like to \\ Very Myself ...


4

Use \\ and not \newline. The behavior is easily reproducible: \fbox{\parbox{5cm}{\centering A centered\\ text}} \medskip \fbox{\parbox{5cm}{\centering A centered\newline text}} gives Here's the code for you \documentclass{article} \usepackage{geometry,fancyhdr} \pagestyle{fancy} \fancyhf{}% Clear header/footer \chead{% My very important and long ...


4

I think you're making it a lot more complicated than needed, \cleardoublepage is already generating the page: you just need to add text, no need for hooking into the output routine shipout. \documentclass[a4paper,titlepage,11pt,twoside,openright]{report} \usepackage{lipsum} \def\lmargin{3.5cm} \def\rmargin{1.5cm} \def\blanknote{This page intentionally left ...


4

\pagestyle applies the page style locally, so you ought to put it before the group for \setstretch, or maybe better invoke \clearpage just before the end of the group. \documentclass[11pt,a4paper]{article} \usepackage{fancyhdr} \usepackage{setspace} \lhead{} \rhead{} \chead{Very title\\ Very myself} \cfoot{\thepage} \begin{document} \pagestyle{empty} ...


3

The titlesec package provides the \assignpagestyle{\chapter}{<style>} command, which can be used just like \pagestyle but changes only the first page of each chapter. It's the same you are doing with \thispagestyle{}, but without explicitly renewing \chapter.


3

I think that you want to reduce the space between the text and the horizontal lines at the top and the bottom of the page, so that you have something like this: If this is what you are trying to do then you just need to specify the value of footskip and headsep when you load the geometry package. For the page above I used: ...


3

The page where \maketitle has effect uses the plain page style. Redefine it. \documentclass[12pt]{article} \usepackage{fullpage} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyfoot[R]{Page \thepage} % redefine the plain page style \fancypagestyle{plain}{% \renewcommand{\headrulewidth}{0pt}% no rule above! \fancyhf{}\fancyfoot[R]{Page ...


3

\maketitle defines the current page style as plain. Hence you have to define the plain page style. \fancypagestyle{plain}{% \fancyhf{} \lhead{ \Mundus\enspace \href{http://sites.google.com/site/}{http://sites.google.com/site/} } \rhead{ \MVAt\enspace \href{mailto:e@gmail.com}{e@gmail.com} } \cfoot{\thepage/2} } Full code: \documentclass{article} ...


3

The first page in an article document is set with the pagestyle plain. That means no header, but a page number by default. The same applies for your posted minimal example. Since an article document only has the first page using pagestyle plain you can use the optional argument. You shouldn't use fancyhdr with KOMA-script. KOMA comes along with an own very ...


3

You should probably use \thispagestyle{empty} rather than \pagestyle. To overprint the header space you can use \vspace*{-20pt}% \enlargethispage{40pt}% where the first line moves everything up overprinting the top, and the second line increases the page body. Choose lengths to suit your requirements.


2

I'm not entirely sure that I understand what you want. The main thing that is do not understand is why you are using \chapter* if you don't want a chapter. Why not just use \newpage, for example? The second thing that I am unsure of is whether you would just to know how to redefine all instances of \chapter*, so that it never leaves such a large gap, or ...


2

textcase is your friend here. I would not hardcode the uppercasing in the titles itself for several reasons. The main reason is that uppercasing them makes it impossible to have no uppercased titles in the header - what you try to achieve. Unfortunately you can't use titlsec because you need to uppercase in the redefinition of the chapter-head (when you ...


2

\part seems somewhat exclusive in terms of titlesec. As such, here's a rudimentary patch (via etoolbox) that stores the last-used \part title in \parttitle: \documentclass[twoside]{article} \usepackage{titletoc,etoolbox} \usepackage[pagestyles]{titlesec} \newpagestyle{myfancy}[]{\headrule\setheadrule{0.5mm}\footrule\setfootrule{0.5mm}} ...


2

The book class provides \frontmatter and \mainmatter to separate these two chunks. If you use them as in \documentclass[11pt]{book} \usepackage{lipsum} \usepackage[demo]{graphicx} \begin{document} \frontmatter \tableofcontents \listoffigures \listoftables \chapter{Unumbered Chapter} \lipsum[1-2] \mainmatter \part{First part} \chapter{First Chapter} ...


2

I would design the frametitle from scratch, because in the Madrid theme the template is very simple. So: \documentclass{beamer} \usepackage{lmodern} \usetheme{Madrid} \setbeamertemplate{frametitle}{% \nointerlineskip \begin{beamercolorbox}[sep=.1ex,wd=\paperwidth,leftskip=.5cm,rightskip=0cm]{frametitle}% ...


2

A couple of things: You need to remove the \subsectionmark functionality as well; Using \#1 is incorrect, since it literally translates to printing #1 in the header. \documentclass[twoside]{article} \usepackage{fancyhdr,lipsum} \pagestyle{fancy} \fancyhead{} \fancyhead[LO, LE]{\small\emph{My book}} \fancyhead[RO, RE]{\small\rightmark} \fancyfoot[CO, ...


1

In the article class with the twoside option, \section sets the leftmark and \subsection the rightmark. You thus need to change this default behavior or just use \leftmark. In this case, however, the header will reflect the section starting on a given page. It's up to you to decide what behavior you prefer. The input can also be simplified as shown below. ...


1

Here is a suggestion using the package scrlayer-scrpage \documentclass{scrbook} \usepackage{lipsum} \usepackage[manualmark]{scrlayer-scrpage} \clearpairofpagestyles %%% alternatively: %\usepackage[manualmark]{scrpage2} %\clearscrheadfoot %\pagestyle{scrheadings} \chead{\pagemark} \lehead[\rightmark]{\rightmark}\rohead[\leftmark]{\leftmark} ...


1

Use the package fancyhdr. The minimal example is below. \documentclass{article} \usepackage{fancyhdr} \usepackage{graphicx} \renewcommand{\headrulewidth}{0pt} % this is the line thickness under the header - 0pt for no line \renewcommand{\footrulewidth}{0pt} % and above the footer \pagestyle{fancy} % to apply your fancy header and footer ...


1

There are options to use hooks for the pagestyles. To ensure that all headers and footers are one half spaced insert \KOMAoptions{onpsinit=\onehalfspacing} after loading the scrlayer-scrpage package. \documentclass[BCOR=10mm,DIV=11]{scrreprt} \usepackage{setspace} \usepackage{microtype} \usepackage{blindtext} \usepackage[ automark, ...


1

This is an answer to the modified question in the comments - not to your original question. I think the original question would be far from straightforward, if it can be done at all. I think this is right but I'm not sure. You need to set \ulength to half of the value you want for the dimension you mentioned. geometry is then used to set the headsep and ...


1

Define a new command wich executes \cleardoublepage and changes the color: \newcommand{\changechaptercolor}[1]{% \cleardoublepage% \renewcommand\chaptercolor{#1}% } Then you can use \documentclass[fontsize=12pt]{scrbook} \usepackage[ngerman]{babel} \usepackage{blindtext} \usepackage{xcolor} \newcommand\chaptercolor{red} ...


1

This should work: \setbeamercolor{section in head/foot}{parent=palette tertiary,fg=red} \setbeamertemplate{section in head/foot shaded}{\color{blue}\usebeamertemplate{section in head/foot}} Explaination Look at the first line: It says that section in head/foot inherits colors from palette tertiary and redefine fg=red. Therefore palette tertiary remains ...


1

When you issue \fancyhf{} it clears both the header and the footer. So, in your redefinition of the plain style, you're clearing whatever header and footer exist(ed). Re-establish the footer by including \fancyfoot[C]{\thepage} as part of the redefinition: \documentclass{article} \usepackage{lipsum,fancyhdr} \pagestyle{fancy} ...


1

Without too much hassle it seems sufficient to add the following to the preamble: \renewcommand{\chaptermark}[1]{% \markboth{\spacedlowsmallcaps{\thechapter~#1}}{\spacedlowsmallcaps{\thechapter~#1}}} \renewcommand{\sectionmark}[1]{}% \chaptermark is updated to insert \thechapter before the chapter title as part of the header, while \sectionmark is made ...



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