Tag Info

Hot answers tagged

6

Both header and footer are changed Changing the margin for both the header and footer lines can be done easily with fancyhdr since version 3.0 via the new command \fancyhfoffset: \fancyhfoffset[l]{\dimexpr3.14in-.75in\relax} Second page: Changing footer margins only Moving the footer line to the left can be done with a negative \kern: ...


4

If you want the same footskip as ​used by the standard class article then change it to 30pt: \documentclass[12pt,a4paper]{scrartcl} \usepackage[margin=2cm, footskip=30pt% <- added ]{geometry} \begin{document} A test document: \the\footskip \end{document} Explanation: With a KOMA-Script class the \footskip is set to 3.5\baselineskip. The standard ...


4

The following example writes for each odd page \gdef\lastoddpage{<page number>} into the .aux file. In the next LaTeX run, \lastoddpage will be set to the page number of the last odd page of the previous run. \documentclass[twoside]{article} \makeatletter \newcommand*{\lastoddcheck}{% \ifodd\value{page}% \if@filesw ...


4

Something like this? The pagestyle is patched into the \chapter command, however, this must be done after \tableofcontents has been issued, otherwise, this would be applied there too. \documentclass[twoside]{report} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{blindtext} \usepackage{xpatch} \fancypagestyle{mystyle}{% \fancyhf{}% ...


3

You should use twoside in the options: \documentclass[a4paper,11pt,twoside]{book} Use the provided mechanism by fancyhdr: \fancyfoot[RO]{\ding{43} Next Page} %Odd Pages \fancyfoot[LE]{\ding{43} Side Page} % Even Pages Your ifoddpage is executed just once in the preamble, so it is basically run with the page number set to 1 and executes the ...


3

In the first LaTeX run, the number of pages is usually not yet known. You have already loaded package lastpage. It sets a reference LastPage, which can be used in the following LaTeX runs to get the page number of the last page, when setting the page footer. Package refcount helps to get the page number of the reference LastPage as number. Full example: ...


3

This is actually similar to the style I'm using in my thesis. I'm not sure I understood what you mean with "switch margins", but Latex should arrange the margins in a twoside document automatically. If you want to add further space, you can use the option bindingoffset of the geometry package (you only need to change the 0mm in the code below). To change ...


3

\thispagestyle{plain} sets a page number for just this page. Adding \pagestyle{plain} will set it for subsequent pages as well (indefinitely i.e. until you change it again). \thispagestyle{plain}\pagestyle{plain} Probably you need an adjustment later but it is impossible to tell without a more complete example.


3

The following solution patches the output routine using everyshi to check whether you're on the page where the "special float" resides or not. And, accordingly, change the page style to "something special". The user interface is the following: Use a \label{<label>} in your "special float"; In the preamble, use \specialpagelabel{<label>} to ...


3

You should use the \newgeometry for changing the geometry in the middle of the document. \newgeometry also causes a pagebreak. I also had to include the header and footer because geometry would count margins for the text and the header/foot would be inside the margins itself, maybe that's why your page numbering was getting plotted in the wrong height. Page ...


3

Not yet finished, but done so far are Times --> \usepackage{mathptmx} Footer with the page progress --> clear the fields with \fancyhf{} first, otherwise it's messed up. \twocolumn stuff for the first two pages Somehow correct name header I have no clue for the desired reference and word count (at the moment) %Nam scripta a cursus ad philosophíæ ...


3

\runningheadrule puts a rule under the header for all pages from the second on. To have the rule on the first page also, you need \firstpageheadrule. A complete example: \documentclass{exam} \pagestyle{head} \firstpageheadrule% rule on first page header \runningheadrule% rule on other pages' header \header{xxx\\ xxx\\ xxx}{} {xxx\\ xxx\\ Seite \thepage\ ...


3

Please see if following solves your purpose: \documentclass[14pt,a4paper,twoside]{article} % document class \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\subsectionmark}[1]{\markboth{#1}{}} % MAKE IT 'subsectionmark' INSTEAD OF 'sectionmark' \fancyhf{} \fancyhead[R]{\leftmark} %%%%%%%%%CHANGE 'L' TO 'R' HERE %%%%%% \fancyfoot[C]{\thepage} ...


3

I think you are simply looking for the following. \documentclass{report} \usepackage{blindtext} \usepackage{fancyhdr} \fancyhf{} \lhead{\leftmark} %\lhead{\tiny\nouppercase{\leftmark}}% if not to be in all caps and very small \rhead{\thepage} \pagestyle{fancy} \begin{document} \chapter{Introduction} \pagenumbering{arabic} \blindtext[20] \end{document} ...


3

If you want to use \raggedchapter - it is predefined as \raggedright use a \parbox contents={\vfill\parbox{\layerwidth}{\raggedchapter\usekomafont{chapter}\leftmark\strut}} \documentclass[% openany ]{scrbook} \usepackage[% a4paper ,inner=26mm ,outer=7mm ,top=81.5mm ,bottom=31.5mm ,headheight=32pt ,headsep=54mm ,showframe ...


3

Here is a suggestion using scrlayer-scrpage instead fancyhdr. Then you can define two new layers: one for odd and one for even pages. These layers can be added to the pagestyle scrheadings. So the images will not be on chapter pages because they are using the page style plain. \documentclass[a4paper,twoside]{report} \usepackage[T1]{fontenc} ...


2

Is this what you want? \documentclass[12pt, a4paper, twoside]{book} \usepackage{fancyhdr} \cfoot{\thepage} \lhead[\leftmark]{} \rhead[]{\leftmark} \usepackage{lipsum} \begin{document}\pagestyle{fancy} \chapter{introduction} \section{description} \lipsum[1-20] \end{document}


2

You can use something like \renewcommand\sectionmark[1]{} \newcommand\Category[1]{\markboth{\MakeUppercase{#1}}{} Code: \documentclass[a4paper,10pt,twoside]{article} \usepackage{fancyhdr} % Needed to define custom headers/footers \pagestyle{fancy} % Enables the custom headers/footers \fancyhf{} \fancyhead[LE]{\thepage~$\mid$~\leftmark} ...


2

memoir pagestyles are quite easy to create. Use \makepagestyle{foo} and the commands \makeevenhead{foo}{left stuff}{center stuff}{right stuff} and \makeoddhead{foo}{left stuff}{center stuff}{right stuff} (and the similar commands \makeevenfoot and \makeoddfoot) To provide the pagestyle for the chapter start page, I kicked the \thispagestyle{chapter} out ...


2

Use the left field with \hfill in between the two parts. \documentclass[a4paper]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{fancyhdr} \usepackage{kantlipsum} % mock text \pagestyle{fancy} %clears header & footer \fancyhf{} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} ...


2

Analternative approach using package typearea to switch to landscape-mode mid-document. Though it is really strange to do that. \documentclass[usegeometry,paper=a5,pagesize,headinclude]{book} \usepackage{typearea} \usepackage{lipsum} \begin{document} \chapter{One} \lipsum[1] \section{One One} \lipsum[2] \storeareas\normalsetting ...


2

With package floatpag you could use \rotfloatpagestyle{<pagestyle>} Example: \documentclass{book} \usepackage{blindtext} \usepackage{rotating} \usepackage{floatpag} \rotfloatpagestyle{empty} \begin{document} \blinddocument \blindtext \begin{sidewaysfigure} \centering \fbox{\parbox[c][.5\textwidth][c]{.5\textwidth}{\centering\Huge Figure}} ...


2

The repository shown seems to be a university template. Documented code is in a language i don't speak, but doing the regular algorithm of making a minimal working example, it boils down to /textual which is the mainmatter in abntex2. The pagestyle is set to abntheadings along with \makeheadrule{abntheadings}{\textwidth}{\normalrulethickness}. We can see, ...


2

Don't do this the hard way. Using \newgeometry like this is not going to work - not, at least, without an awful lot more gymnastics than you are using at the moment. (How are you planning to restore the original geometry given that the command to do so will start another new page?) You are using titlesec already, it seems. [It has been removed from the MWE ...


2

I think, this is available by using the fancy pagestyle and setting the page headers at will, by using the wrapper command \SomeCommand \documentclass[twoside]{article} \usepackage{blindtext} \usepackage{fancyhdr} \fancyhead[LE,RO]{\thepage} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{2pt} \newcommand{\SomeCommand}[1]{% {\noindent\LARGE ...


2

If there are no special layout requirements you can use the pagestyle myheadings. Then \SomeCommand has to set \markright{<text>} or maybe better \markboth{<text>}{<text>}. The second works also if your document is twoside. \documentclass{article} \pagestyle{myheadings} \newcommand*\SomeCommand[1]{\markboth{#1}{#1}} \usepackage{lipsum}% ...


2

This kind of thing seems to work. Not sure if it's the best way. \documentclass[a4paper,12pt]{book} \usepackage{fancyhdr} \usepackage{floatpag} \pagestyle{fancy} \begin{document} \begin{figure}[p] \rule{14cm}{14cm} \caption{Figure without jiggered pagestyle} \end{figure} \begin{figure}[p] \rule{14cm}{14cm} \caption{Figure without jiggered pagestyle} ...


2

In artcile.cls without the titlepage option, the definition of \maketitle contains \thispagestyle{plain} You can discover this by issuing \show\maketitle and looking the .log file, but the output is quite long. This means that either you need to change the plain layout, or much simpler, you need to issue \thispagestyle{empty} after \maketitle has had ...


2

You need to switch to the sans-serif font using \sffamily. In the example below, i have choosen TeX Gyre Adventor (available through tgadventor), mainly because it was the first coming to mind. Using \raggedright, we get text that is flushed to the left. \documentclass[fontsize=13pt,a4paper,headlines=1,headinclude=true,headsepline,footsepline]{scrartcl} ...


1

The contents of \footline is used as argument to \line, which is \hbox to \hsize: restricted horizontal mode is in force, so \par has no effect. You want to use \vtop or \vbox; here's the example with the former: \input plipsum \footline={\vtop{\hrule\smallskip\centerline{\folio}}} \lipsum{1-20} \bye If you instead prefer to have 24pt from the last ...



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