Tag Info

Hot answers tagged

8

One option using TikZ and the tikzpagenodes package (adjust the settings according to your needs). According to comments, the first page of each chapter should also have the new page style, so \aliaspagestyle{chapter}{solid} was used: The code: \documentclass{memoir} \usepackage[hmargin=3cm]{geometry} \usepackage{xcolor} \usepackage{lmodern} ...


5

Nice question! Here is one way of doing this. I have hijacked the \paragraph command so that it prints the argument that it is given using \textbf{#1} and it then sets paragraph counters, \firstpara and \lastpara, by calling the command \setparagraph with #1-0-| as the argument. The \setparagraph macro is a little tricky as it needs to accept arguments ...


5

\usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \lfoot{\hfill Specific Arms \hfill Page \thepage\hfill} or \lfoot{\makebox[0.5\linewidth]{Specific Arms}\makebox[0.5\linewidth]{Page \thepage}}


5

Here is a very primitive way with \colorbox{red}{\textbf{\textcolor{white}{...}}} \documentclass{article} \usepackage{xcolor} \usepackage{fancyhdr} \addtolength{\headheight}{2\fboxsep} % minimal increase \fancyhead[R]{} \fancyhead[C]{\colorbox{red}{\textbf{\textcolor{white}{\leftmark}}}} \begin{document} \tableofcontents \clearpage \pagestyle{fancy} ...


5

One way: Use the fancyhdr package and kick out all footers/headers first with \fancyhf{} and then enable \cfoot{\thepage} for a bottom page number, centered. Use \pagestyle{fancy} then. \documentclass[12pt]{book} \usepackage{blindtext} \usepackage{fancyhdr} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \cfoot{\thepage} \begin{document} ...


5

The book document class uses the headings page style for all pages except those that contain chapter headings (which use the plain page style). If I understand your requirements correctly, you want all pages to use the plain page style. This objective may be achieved by adding the following instruction to the document's preamble: \pagestyle{plain}


5

You have two main options. Starting with the simpler one: Use the \chapter[short title]{long title} device. E.g., in your case, you might write \chapter[Cauchy's Integral Formula]{Cauchy's Integral Formula and Consequences} I've noticed that you've commented that you would prefer not use use this device and, instead, to reduce the running header's ...


5

Depends a bit on the document and how "general" the solution should be. In your example a simple bottom float would work: \documentclass{article} \usepackage{geometry,blindtext} \geometry{showframe} \newcommand\specialcommand[1]{\begin{figure}[b] \rule{3cm}{0.4pt}\\ #1 \end{figure}} \begin{document} \blindtext[9] \clearpage This is a special ...


4

This translates your page layout into KOMA's terms. It may not make the requested changes because I don't know what they are meant to be. Your example does not include any chapters, let alone chapter titles, and it is impossible to guess which distance you are talking about or what is meant to align with what. Note that, as originally configured, your ...


4

Here is another suggestion using scrlayer. Then you can redeclare plain as a layer pagestyle with only one layer containing the centred page number. \documentclass[12pt]{report} \usepackage{geometry} \geometry{a4paper, margin=1in, left=2.5in,% enlarged in this example showframe} \usepackage{fancyhdr} \pagestyle{fancy} ...


4

The template you're using is this one: https://www.overleaf.com/latex/templates/sps-computing-template/gsxvykcjvpyn. First of all, you have to open the file pagesettings.tex (click on the button "PROJECT" on Overleaf to show that file) and comment the line \renewcommand{\thispagestyle}[1]{} After that, in main.tex, delete the line \pagestyle{fancy} ...


4

That a-way? I replaced fancyhdr with titleps from the titlesec bundle, defined a weird page style, and redefined the plain style. \documentclass[12pt]{report} \usepackage{titlesec} \usepackage{geometry} \geometry{a4paper, left=1.5in, right=1in,top=1in, bottom=1in, showframe, nomarginpar} \setcounter{page}{900} \usepackage{titleps} \newpagestyle{weird}{% ...


3

Your computation would be right, weren't for the fact that fancyhdr adds a strut at the end of the code in the header. I changed the code into \fancyhead[C] {% \fontsize{12.0pt}{4.0pt}% \selectfont% \setlength{\lineskip}{20pt}% fjord% \\ \rule{\textwidth}{1.0pt}% \showthe\ht\strutbox } and the message on the console showed > ...


3

Does this work? \documentclass[12pt]{report} \usepackage{geometry} \geometry{a4paper, left=1.5in, right=1in,top=1in, bottom=1in, showframe} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancyhead{} \fancyhead[RE, RO]{\thepage} \fancyfoot{} \fancypagestyle{plain}{% \fancyhf{}% ...


2

for example: \language [en] \definepapersize[Book] [width=14cm,height=21cm] \setuppapersize [Book] [A4] \setuppagenumbering [alternative=doublesided, location={footer,marginedge}, way=bytext, sectionnumber=no, partnumber=no] \setuplayout [width=11cm, height=16.5cm, header=14pt, headerdistance=10pt, footer=24pt, ...


2

You need a redefinition of the beamer@barshade shading used by the smoothbars outer theme (original definition can be found in beamerouterthemesmoothbars.sty): \documentclass[ ]{beamer} \usetheme{Frankfurt} \useoutertheme{smoothbars} \makeatletter \AtBeginDocument{ \pgfdeclareverticalshading{beamer@barshade}{\the\paperwidth}{% color(0ex)=(black);% ...


2

If you want to remove the page number from just one page, the easiest way is to add \thispagestyle{empty} in the proper position (somewhere in that page). This will remove headers too. On the other hand, you may use \resizebox from graphicx package, height option to \includegraphics with proper value, or use adjustbox package for limiting the size of the ...


2

If you want to use both \leftmark and \rightmark in a one-sided document with package scrlayer-scrpage you have to set the option autooneside=false \documentclass[twoside=false]{scrbook} \usepackage{blindtext} \usepackage[ automark, autooneside=false % <- ]{scrlayer-scrpage} \clearpairofpagestyles \ihead{\leftmark} \ohead{\rightmark} ...


2

Use a \raisebox and hide the height and depth of the image. Schematically: \documentclass{article} \usepackage{showframe} \usepackage{graphicx} \usepackage{fancyhdr} \usepackage{lipsum} \pagestyle{fancy} \fancyhf{} \fancyfoot[R]{\raisebox{-\height}[0pt][0pt]{\includegraphics[scale=0.10]{example-image-a}}} \begin{document} \lipsum[1-20] \end{document} ...


2

Not sure if it is ‘TURN OVER’ only that has to be pushed into the margin, but here is a solution: \documentclass[12pt]{exam} \usepackage{amsmath} \usepackage[a4paper]{geometry} \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=0.8in,rmargin=1.2in} \setlength{\parskip}{\smallskipamount} \setlength{\parindent}{0pt} \usepackage{mathtools} ...


2

You can redefine your \footnote command so the marker is printed first in the text in one style via \footnotemarker, and the footnote is printed afterwards in the default style via \footnotetext. Using etoolbox you can use \AtBeginEnvironment to make such a change apply to specific environments. Here is an example changing the behaviour in quotations, with ...


2

If you switch to titleps, you can use your current code and it seems to work. Better would probably be to use the package's extended support for additional sets of marks, avoiding the need for a workaround. Or, since you are using titlesec, you could probably just set the sectioning command up to avoid the need for special measures. However, without seeing ...


2

Here is a suggestion but I am not sure if I understand what the desired result is \documentclass{report} \usepackage{setspace} \usepackage{fancyhdr} \pagestyle{fancy}% before redefining \chaptermark \renewcommand{\chaptermark}[1]{% \markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{\MakeUppercase{\chaptername\ \thechapter.\ #1}}% } \lhead{} ...


2

\documentclass{book} \usepackage[a6paper]{geometry}% just for the example \usepackage{fancyhdr} \usepackage{lipsum} \pagestyle{fancy} \renewcommand\chaptermark[1]{\markboth{\thechapter\ #1}{}} \fancyhf{} \fancyhead[L]{\bfseries\leftmark} \fancyhead[R]{\bfseries\thepage} \renewcommand\headrulewidth{0pt}% suppress the header rule \begin{document} \chapter{A ...


2

The formatting for the section tiles was done using titlesec with its explicit option; the formatting for the page numbers was done using a \fcolorbox, and its placement was done using fancyhdr. Only provission for the page numbers was done. The other elements in the header were not provided since they were not requested, but they can be easily done using ...


2

The following should work after the second compilation (first time around), regardless of the margin dimensions. The principle is to set two markers (using eso-pic) on the first page to capture the x and y coordinates needed on the page (stored using zref's savepos module. Subsequently, the page number for "special pages" (in this case, the plain page style ...


2

I am not sure this is really what the the OP wants to have, but the chapter title is contained in \leftmark (if I remember correctly) \documentclass[12pt,a4paper,twoside]{report} \usepackage{fancyhdr} \usepackage[head=1.5cm]{geometry} \rhead{} \chead{} \lhead{\leftmark} \cfoot{\thepage} \renewcommand{\headrulewidth}{0.4pt} ...


2

You can add this to your preamble : \makeatletter \def\partrunhead#1#2#3{% \@ifnotempty{#2}{{\@ifnotempty{#1}{#1 }}\@ifnotempty{#3}{}}#3} \let\chapterrunhead\partrunhead \let\sectionrunhead\partrunhead \makeatother (Short) Explanation : I searched into gsm-l.cls which commands were responsible for the page headers, and found that it was \partrunhead. ...


2

\documentclass[final,twoside,BCOR=0.7cm,DIV=calc,openright]{scrreprt} \usepackage{showframe} \begin{document} \pagenumbering{Roman} \begin{titlepage} \thispagestyle{headings} \markboth{I want this part in the header}{I want this part in the header} \def\thepage{} I want this part in the header This in the body ...


1

I think the answer of @Herbert solves your problem in a simple and good way. If want a command that sets only a header on the current page you could load package scrlayer which is part of the KOMA-Script bundle and define a layer page style. But IMHO this is some kind of overkill to your problem. ...



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