# Tag Info

4

Not very different from Harish's solution, but more modular. \documentclass{book} \usepackage{xcolor} \usepackage{fancyhdr} \usepackage{lipsum} \pagestyle{fancy} \renewcommand{\headrulewidth}{0pt} \setlength{\headheight}{16.5pt}% fancyhdr tells you the length \fancyhf{} \fancyhead[LE]{% \small \makebox[0pt][r]{\balajipage{1cm}}% ...

3

There are different ways of doing it (like using background, eso-pic packages) but you asked fancyhdr. \documentclass{book} \usepackage{fancyhdr} \usepackage{tikz,lipsum} \pagestyle{fancy} \fancyhf{} \fancyhead[LE]{\hspace*{-0.2\headwidth}\colorbox{green!20}{\makebox[\dimexpr0.2\headwidth-2\fboxsep][c]{\strut\thepage}}% ...

3

You can put groups of three consecutive entries on the same row without too much change to the markup. \documentclass[a4paper,fleqn,openbib,11pt]{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{array} \usepackage{appendix} \usepackage{booktabs} \usepackage{caption} \usepackage{dcolumn} \usepackage{float} \usepackage{graphicx} ...

3

memoir uses the chapter page style for the first page of every chapter. The chapter page style is considered a alias of the plain page style. In order to modify an alias page style, you first have to make a true copy of the page style: \copypagestyle{chapter}{plain} The above makes a true copy of the plain page style and calls it the chapter page style. ...

3

It is not a good idea to have long headers. You can use the optional argument of \chapter macro. \chapter[optional]{mandatory} The optional is used for running content like toc and headers, \chapter[The city of Carthage]{The city of Carthage was the centre of the ancient Carthaginian civilization} gives Further, it is always better to use microtype ...

3

Since you're using custom headers and footers (mystyle), you could just define a similar footer-only style called mytitlestyle and tell the first page to use that style with the command \thispagestyle{mytitlestyle}. Code: \documentclass[12pt,a4paper,oneside, twocolumn]{memoir} \usepackage{lastpage} \usepackage[utf8]{inputenc} \usepackage[danish]{babel} ...

2

Try with the following: \includepdf[pages=-,pagecommand={}]{addedPdfHere} You can also define what command should be executed inside pagecommand. From package documentation: pagecommand Declares LaTeX commands, which are executed on each sheet of paper. (Default: pagecommand={\thispagestyle{empty}}) Credits to these answers.

2

You may make \rightmark use \topmark instead of \firstmark, but things will go wrong if a section starts at the top of a page. You can fix this (not guaranteed to work in any situation, though) by emitting a mark als before the section: \documentclass[12pt,a4paper,onecolumn,oneside,final]{memoir} \usepackage[textwidth=10cm,textheight=22cm]{geometry} ...

2


2

The line \let\ps@plain\ps@fancy is responsible for the behavior you obtain. Whoever advised you to use it didn't do you a favor: it makes the plain page style, used by default on chapter starting pages, equivalent to the fancy page style. Just remove the line.

2

Change the line \fancyfoot[LE,RO]{\thepage} to \fancyfoot[C]{\thepage}

2

(Converting my comment into an answer.) You can set the page style as appropriate in the glossary preamble by redefining \glossarypreamble somewhere before \printglossaries. For example: \renewcommand{\glossarypreamble}{\thispagestyle{myheadings}}

2

With your current setup, it's sufficient to patch \chaptermark At the Beginning of the Document to call \@mkboth with only the left mark used; keeping the right mark empty: \usepackage{etoolbox} \makeatletter \AtBeginDocument{% \patchcmd{\chaptermark}% <cmd> {\@mkboth}% <search> {\chaptermkboth}% <replace> {}{}% ...

2

Note that scrpage2 is depreciated. The successor is scrlayer-scrpage. You can use \ifstr from the scrbase package: \ohead{\ifstr{\leftmark}{\rightmark}{}{\rightmark}} The package scrbase is loaded by the KOMA-Script class and the command is explained in the KOMA-Script documentation scrguien.pdf: \ifstr{<string>}{<string>}{<then ...

2

This uses tcolorbox boxes and the \pagemarkwidth length to change the widths of the boxes. The tcolorbox approach requires more setup, but is quite configurable too... \documentclass{book} \usepackage{fancyhdr} \usepackage{tcolorbox}% \usepackage{tikz,lipsum} \pagestyle{fancy} \usepackage{calc}% \newlength{\pagemarkwidth} ...

2

ConTeXt has two notions of page numbers: The real page number (accessed using \pagenumber) and the user page number (accessed using \userpagenumber). The userpagenumber is meant for what you are looking for (different page numbering in frontpart and bodypart. In the code you posted, in the sectionblock environment you are resetting the userpage counter; ...

2

When you define the footer: % Define footer \setbeamertemplate{footline}{bg=primary} \makeatother \setbeamertemplate{footline} { \leavevmode% \hbox{% \begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% \usebeamerfont{author in head/foot}\insertshortauthor\ (IRE PW) \end{beamercolorbox}% ...

1

1

It seems that it was a plain oversight on my side. As Harish Kumar and John Kormylo point out I just have to remove the [t] parameter in the minipage definition inside the lrbox. [...] \newsavebox{\eheaderbox} \begin{lrbox}{\eheaderbox}% \begin{minipage}{.5\textwidth} % remove HERE \begin{flushleft} [...]

1


1


1

As Barbara mentioned in a comment, running headers aren't cleared automatically. You need to issue a \cleardoublepage and after that use \markboth{}{} You seem to be setting sectioning commands by hand, which is never a good idea. Using the KOMA-built in commands, you can achieve your goals in a much easier way. You can read more about it at Correct use of ...

1

If you don't set a proper head height, fancyhdr reports the following: Package Fancyhdr Warning: \headheight is too small (XX.Xpt): Make it at least YY.YYYYpt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however. As such, the newly-set \headheight will be the same throughout the document. ...

1

memoir provides it own facilities to place headers and footers. Using fancyhdr will only break stuff. Please be aware of that. If you really want to use fancyhdr, you need to use \pagestyle{fancy}, but since this package (fancyhdr) uses commands, that are obsolete for 20 years now, you need to enable the memoir option oldfontcommands. Here is the proper way ...

1

If you use a standard class, and use the \maketitle-command to create a title on the first page, this happens automatically. Just put \pagestyle{headings} in the preamble, and \maketitle after \begin{document}. \documentclass{article} \pagestyle{headings} % \AtBeginDocument{\thispagestyle{plain}} % uncomment this line if you do not ...

1

I cannot reproduce the effect you describe (making the black box disappear). However, if you look at the output, you will see why the gap is left on all pages: Package Fancyhdr Warning: \headheight is too small (12.0pt): Make it at least 84.35004pt. We now make it that large for the rest of the document. This is telling you how large the header needs ...

1


1

This sets things up to use semantic markup in the document e.g. \title, \chapter etc. It patches \chapter so that it does not start a new page and uses the report class with no title page. Note that your title is off-centre. Assuming that is deliberate, I've emulated it here. I've substituted pagelts for lastpage since lastpage has been issuing warnings ...

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