Page Layout ⇒ [AMSART], Getting rid of the header but keeping the footer on the first page?
[AMSART], Getting rid of the header but keeping the footer on the first page?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
[AMSART], Getting rid of the header but keeping the footer on the first page?
You could place this patch where it suits, such as on the first or second page:
Code: Select all
\makeatletter
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
\let\@evenhead\@empty
\makeatother[AMSART], Getting rid of the header but keeping the footer on the first page?
ThanksStefan Kottwitz wrote:Welcome to the forum!
You could place this patch where it suits, such as on the first or second page:
StefanCode: Select all
\makeatletter \let\@mkboth\@gobbletwo \let\@oddhead\@empty \let\@evenhead\@empty \makeatother
I tried the code and it didn't do anything? Nothing changed regarding the header. I placed it in the first page BTW.
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
[AMSART], Getting rid of the header but keeping the footer on the first page?
Stefan
[AMSART], Getting rid of the header but keeping the footer on the first page?
Code: Select all
\mag=1700
\documentclass[11pt, onecolumn, reqno, a4paper]{amsart}
\usepackage[left=80pt,right=80pt,top=0.75in]{geometry}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{lipsum}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{etoolbox}
\usepackage{hologo}
\usepackage{kantlipsum}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{atbegshi}
\usepackage{marvosym}
\usepackage{mathrsfs}
\usepackage{upgreek}
\usepackage{etoc}
\etocsettocstyle{\noindent\textbf{\contentsname}\par}{}
\DeclareRobustCommand{\subtitle}[1]{\\#1}
\makeatletter
\renewcommand{\tocsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\bfseries\ignorespaces#1 #2\quad}}\bfseries#3}
% Remove . after numbers in \subsection
\renewcommand{\tocsubsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2\quad}}#3}
%\let\tocsubsubsection\tocsubsection% Update for \subsubsection
%...
\newcommand\@dotsep{4.5}
\def\@tocline#1#2#3#4#5#6#7{\relax
\ifnum #1>\c@tocdepth % then omit
\else
\par \addpenalty\@secpenalty\addvspace{#2}%
\begingroup \hyphenpenalty\@M
\@ifempty{#4}{%
\@tempdima\csname r@tocindent\number#1\endcsname\relax
}{%
\@tempdima#4\relax
}%
\parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
\rightskip\@pnumwidth plus1em \parfillskip-\@pnumwidth
#5\leavevmode\hskip-\@tempdima{#6}\nobreak
\leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
\nobreak
\hbox to\@pnumwidth{\@tocpagenum{\ifnum#1=1\bfseries\fi#7}}\par% <-- \bfseries for \section page
\nobreak
\endgroup
\fi}
\AtBeginDocument{%
\expandafter\renewcommand\csname r@tocindent0\endcsname{0pt}
}
\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
\renewcommand{\contentsnamefont}{\bfseries}
\patchcmd{\section}{\scshape}{\bfseries}{}{}
\renewcommand{\@secnumfont}{\bfseries}
\patchcmd{\l@section}% <cmd>
{#1}% <search>
{\S#1}% <replace>
{}{}% <search><replace>
\makeatother
\renewcommand{\contentsname}{Table of contents}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesection}{\ZeroRoman{section}}
\setcounter{section}{-1}
\newcommand{\ZeroRoman}[1]{
\ifcase\value{#1}\relax 0\else
\Roman{#1}\fi}
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
\makeatletter
\patchcmd{\@maketitle}
{\ifx\@empty\@dedicatory}
{\ifx\@empty\@date \else {\vskip3ex \centering\footnotesize\@date\par\vskip1ex}\fi
\ifx\@empty\@dedicatory}
{}{}
\patchcmd{\@adminfootnotes}
{\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi}
{}{}{}
\makeatother
\makeatletter
%% See pp. 26f. of 'The LaTeX Companion,' 2nd. ed.
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
{\csname the#1\endcsname\quad}% default
{\csname #1@cntformat\endcsname}}% individual control
\newcommand{\section@cntformat}{\S\thesection\quad}
\newcommand{\subsection@cntformat}{\S\thesubsection\quad}
%\newcommand{\subsubsection@cntformat}{\S\thesubsubsection\quad}
%\newcommand{\paragraph@cntformat}{\S\theparagraph\quad}
%\newcommand{\subparagraph@cntformat}{\S\thesubparagraph\quad}
\makeatletter
\usepackage [autostyle, english = american]{csquotes}
\MakeOuterQuote{"}
\setlength{\headheight}{15.2pt}
\rfoot{Typeset by \hologo{AmSTeX}}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{xca}[theorem]{Exercise}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{equation}{section}
\renewcommand{\qedsymbol}{\star}
\setcounter{tocdepth}{1}
\makeatletter
\renewcommand\@dotsep{200}
\makeatother
\makeatletter
\renewcommand{\l@section}{\@tocline{1}{0pt}{0pc}{}{}}
\renewcommand{\l@subsection}{\@tocline{2}{0pt}{0pc}{}{}}
\renewcommand{\tocsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\makebox[2.5em][l]{\ignorespaces#1 #2.}}}#3%
}
\let\tocsubsection\tocsection
\makeatother
\makeatletter
\patchcmd{\l@section}% <cmd>
{#1}% <search>
{\S#1}% <replace>
{}{}% <search><replace>
\makeatother
\pagenumbering{Roman}
\begin{document}
\title{Title}
\author{Name}
\date{\normalsize{\today}}
\begin{abstract}\hspace{32pt}
Abstract here
\end{abstract}
\maketitle
\thispagestyle{fancy}
\makeatletter
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
\let\@evenhead\@empty
\makeatother
\renewcommand{\subtitle}[1]{}
\etocsettocstyle{\noindent\large{\textbf{{Contents}}}:\par}{}
\tableofcontents
\section*{Introduction}
\etocsettocstyle{\noindent\textbf{Contents}:\par}{}
\localtableofcontents
\subsection{Our Results}
\subsection{Structure of the Paper}
\end{document}[AMSART], Getting rid of the header but keeping the footer on the first page?
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
[AMSART], Getting rid of the header but keeping the footer on the first page?
amsart is for publishing with AMS, with their macros and settings, with AMS someone has to follow that style without changes. When it's not for AMS, one could use a different and more capable class.Anyway, heres a way.
Code: Select all
...
\makeatletter
\def\AmSTeX{{\the\textfont\tw@ A\kern-.1667em%
\lower.5ex\hbox{M}\kern-.125emS}-\TeX\spacefactor1000 }
\makeatother
\fancyfoot[r]{Typeset by \AmSTeX}
\pagestyle{fancy}
\makeatother
\begin{document}
\title{Title}
\author{Name}
\date{\normalsize{\today}}
\begin{abstract}\hspace{32pt}
Abstract here
\end{abstract}
\maketitle
\thispagestyle{fancy}
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
\let\@evenhead\@empty
\makeatother