New answers tagged

2

The rule is removed by setting  \headrulewidth to 0pt. As to the rules at the top and bottom of the paper sheet, it is simpler to do that with eso-pic: \documentclass[9pt, legalpaper]{article} \usepackage[legalpaper,margin=0.5in]{geometry} \usepackage{lipsum} \usepackage[svgnames]{xcolor} \colorlet{highlight_colour}{SteelBlue} % ============================...


1

Few things to know first \pagestyle{<style>} is a LaTeX native command that sets the current style to <style>. LaTeX has four predefined styles: plain, empty, headings, and myheadings. Several packages extended the number of predefined styles, such as fancyhdr, and titleps. Further info in this thread. If not set by the class/package, the ...


1

You can change the definition of command \makeheading to use three parameters like \newcommand{\makeheading}[3][]% {\hspace*{-\marginparsep minus \marginparwidth}% \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}% {\large \bfseries #2 \hfill #1}\\ % <============================ {#3}\\[-0.15\...


0

This should do the job: \documentclass[pdftex,10pt,b5paper,twoside]{book} \usepackage{lipsum} \usepackage[automark,markcase=lower]{scrlayer-scrpage} \KOMAoptions{headsepline=0.2pt } \pagestyle{scrheadings} \renewcommand\chaptermarkformat{~} \automark[chapter]{chapter} \begin{document} \chapter{ch 1} \section{Sec 1.1} \lipsum[1-10] \chapter{Ch 2} \section{...


0

JPi's answer works but adds extra space. This extra space is expected and accounted for in the standard definitions of \headrule and \footrule in fancyhdr.sty as follows. \def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi \hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}} \def\footrule{{\if@fancyplain\let\...


1

You have to use a scalable font, eg. lmodern. The following suggestion bases on your second link: \documentclass[12pt,openright,titlepage=firstiscover]{scrbook} \usepackage{blindtext} \usepackage{lmodern}% use a scalable font \RedeclareSectionCommand[ beforeskip=0pt, afterindent=false, afterskip=2.5\baselineskip, font=\normalfont\Huge ]{chapter} \...


0

Just ran into this problem with the new ACM template and tried (unsuccessfully) a number of possible solutions. Then ran across this solution while carefully reading the class documentation. Pass the nonacm option to the \documentclass command. See Table 2 in the acmart class documentation. Example: \documentclass[manuscript,screen,timestamp,authordraft,...


0

If you want to go old school: The 1in top and side margin is built into the TeX engine itself. \setlength{\topmargin}{\dimexpr 1.25cm-1in} \setlength}\headsep}{\dimexpr 3cm-1in-\topmargin-\headheight} \setlength{\textheight}{\dimexpr \paperheight-3cm-1in-\topmargin-\headheight-\headsep} \setlength{\footskip}{\paperheight-1.25cm-1in-\topmargin-\headheight-\...


1

This works (precision better than 0.1mm): demo with a4 paper: \documentclass[a4paper, 12pt]{article} \usepackage[showframe]{geometry} \geometry{margin=2.5cm, top=3cm, headsep=1.75cm, footskip=1.25cm} \usepackage{lipsum} \begin{document} \lipsum[1-3] \end{document}


0

For the algorithm2e package, a much simpler solution (than the accepted answer) has been provided here. To sum up, just add the following line to the preamble - \renewcommand{\listalgorithmcfname}{LIST OF ALGORITHMS}


0

If you are using a custom footline with \setbeamertemplate you can actually exclude footline generation right in the template by using the following LaTeX condition structure: \setbeamertemplate{footline}{ \ifnum \theframenumber=1 % This is the title frame, do nothing \else % These would be all the following frames % <<...


2

Class moderncv uses moderncvcollection.sty to create a printable information of the different versions of telefon available. That means that your used command is defined in another way you expect: % compatibility with versions <= 1.4.0 \newcommand*{\mobile}[1]{\collectionadd[mobile]{phones}{#1}} or \collectionfindbykey {phones}{mobile} if you ...


1

Is this what you want? \documentclass{article} \usepackage{xcolor} \usepackage{fancyhdr} \usepackage{lipsum} \fancypagestyle{plain}{% \fancyhf{} % Clear all headers/footers \fancyfoot[L]{% \makebox[\dimexpr0.5\textwidth-20pt][r]{\color{red}\thepage}} % Left footer page number \fancyfoot[R]{\colorbox{green}{\makebox[\dimexpr0.5\textwidth-6pt][l]...


1

You don't really need al this plethora of \makecells: \documentclass[10pt, german]{scrbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{rotating} \usepackage{newpxtext} \linespread{1.05} \usepackage[left=32.5mm, right=25mm, top=25mm, bottom=20mm]{geometry} \usepackage{multirow} \usepackage{makecell} \usepackage[...


3

You can also use \fancypagestyle to create new page styles if empty and plain are not quite what you wanted. \documentclass[openright]{book} \usepackage[utf8x]{inputenc} \usepackage{reledmac} \usepackage{reledpar} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhf[CFE,CFO]{\thepage} \fancyhead[CE]{\itshape\ Heading Left } \fancyhead[CO]{\itshape\ ...


0

In the book, and other standard classes the divisional commands, like \chapter take one optional argument. \chapter[title for Toc and header]{Main title} It seems that you want a short title in the header but long ones in the ToC and body. The memoir class (a superset of book and report) offers two optional arguments like: \chapter[toc-title][head-title]{...


0

Here is an option with textpos, you are free to change page geometry without worrying about manually adjusting the positions % !TEX encoding = UTF-8 Unicode % !TEX TS-program = xelatex \documentclass[UTF8]{article} \usepackage{lipsum} \usepackage[a4paper, twoside]{geometry} \usepackage{pgf} \usepackage[absolute, overlay]{textpos} \setlength{\...


0

This is a very interesting question and I would like to provide a comprehensive solution for document class article. This solution uses the packages geometry, fancyhdr, pgf, scrextend and textpos, it looks complicated at the beginning, but trust me, it is nice and clean and do not require adjustment even when you change page geometry. The usage of the ...


0

This seems to work, I am not convinced this is the best approach though. The .tex \documentclass[aspectratio=169]{beamer} \usetheme{test} \author{whoami} \title{title} \begin{document} \newmaketitle \section{abc} \begin{frame}{abc} cde \end{frame} \section{def} \begin{frame}{def} fgf \end{frame} \end{document} The .sty \mode<presentation> %% ...


1

Can you tried this, putting LinuxLibertineT-LF (for lining numbers) instead of LinuxLibertineT-OsF? \documentclass[a4paper,12pt]{article} \usepackage{lipsum} \usepackage{mathptmx} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \lhead{{\fontfamily{LinuxLibertineT-LF}\selectfont Left HEADER 1234567890}} \rhead{{\fontfamily{LinuxLibertineT-OsF}\selectfont ...


1

In general \chapter[short]{main} will use short in the ToC and header and main as the title on the chapter page. In case you need more flexibility the memoir class (a superset of book and report) provides two optional arguments: \chapter[toc-title][head-title]{title} % three different texts \chapter[toc-and-head-title]{title} % two different texts \...


4

It can be done with fancyhdr by redefining \headrule. \documentclass{article} \usepackage{fancyhdr} \usepackage{xcolor} \makeatletter \def\thickhrulefill#1{\leavevmode\leaders\hrule height#1\hfill\kern\z@} \makeatother \pagestyle{fancy} \fancyhead[R]{e-ISSN} \renewcommand{\headrule}{% \color{red!33!black}\vspace{-8pt}% \thickhrulefill{.6pt} \...


0

Instead of fancyhdr, you can use \pagestyle{plain} and \makeatletter \def\ps@plain{% \let\@oddhead\@empty \let\@evenhead\@empty \def\@oddfoot{\normalfont\hfil\thepage}% \def\@evenfoot{\normalfont\hfil\thepage}} \makeatother


0

If you want page numbers on the right of the pages use \cfoot{} \fancyfoot[RE]{\thepage} \fancyfoot[RO]{\thepage} and if you want to make the front and back matter use arabic numbers then just toggle \pagenumbering as shown: \documentclass[a4paper,20pt]{book} \usepackage{fancyhdr} \usepackage{lipsum} \usepackage{etoolbox} \patchcmd{\chapter}{plain}{...


1

Based on this answer here is how you can hack the framenumber. \documentclass{beamer} \setbeamertemplate{footline}[page number]{} \setbeamertemplate{footline}{% \hfill% \usebeamercolor[fg]{page number in head/foot}% \usebeamerfont{page number in head/foot}% \fcolorbox{red}{red}{\insertframenumber% \,/\,\inserttotalframenumber}% \kern1em\...


0

Edit: Found the solution here in a thread that I somehow had missed: Header and footer for a book using: part on even page and chapter on odd page This solves my problem: \documentclass[a4paper]{book} \usepackage{fancyhdr} \usepackage{emptypage} \usepackage{lipsum} \newcommand*\parttitle{} \let\origpart\part \renewcommand*{\part}[2][]{% \ifx\\#1\\% ...


Top 50 recent answers are included