LaTeX forum ⇒ Page Layout[AMSART], Getting rid of the header but keeping the footer on the first page?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Veknovias
Posts: 5
Joined: Sat Mar 31, 2018 10:54 pm

[AMSART], Getting rid of the header but keeping the footer on the first page?

Postby Veknovias » Sat Mar 31, 2018 11:28 pm

Hello, I am trying to remove the header but keep the footer (typeset by ams-tex) in amsart. Anyone know how to go about this. Using fancyhdr, I can't find any particular page-style that can keep the Typeset footer and remove the heading with it. Also note, I only decided to keep the header and footer on the first page.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8733
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sun Apr 01, 2018 6:15 pm

Welcome to the forum!

You could place this patch where it suits, such as on the first or second page:

  1. \makeatletter
  2. \let\@mkboth\@gobbletwo
  3. \let\@oddhead\@empty
  4. \let\@evenhead\@empty
  5. \makeatother


Stefan
Site admin

Veknovias
Posts: 5
Joined: Sat Mar 31, 2018 10:54 pm

Postby Veknovias » Sun Apr 01, 2018 6:54 pm

Stefan Kottwitz wrote:Welcome to the forum!

You could place this patch where it suits, such as on the first or second page:

  1. \makeatletter
  2. \let\@mkboth\@gobbletwo
  3. \let\@oddhead\@empty
  4. \let\@evenhead\@empty
  5. \makeatother


Stefan

Thanks

I tried the code and it didn't do anything? Nothing changed regarding the header. I placed it in the first page BTW.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8733
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sun Apr 01, 2018 8:36 pm

It changes it with my test code. Perhaps your code is different. Do you want to post it, with just some filler text?

Stefan
Site admin

Veknovias
Posts: 5
Joined: Sat Mar 31, 2018 10:54 pm

Postby Veknovias » Sun Apr 01, 2018 11:48 pm

I am using Sharelatex in case that helps

  1. \mag=1700
  2. \documentclass[11pt, onecolumn, reqno, a4paper]{amsart}
  3. \usepackage[left=80pt,right=80pt,top=0.75in]{geometry}
  4. \usepackage{fancyhdr}
  5. \usepackage{amsmath}
  6. \usepackage{amsfonts}
  7. \usepackage{lipsum}
  8. \usepackage[english]{babel}
  9. \usepackage[utf8]{inputenc}
  10. \usepackage{xcolor}
  11. \usepackage{etoolbox}
  12. \usepackage{hologo}
  13. \usepackage{kantlipsum}
  14. \usepackage{dsfont}
  15. \usepackage{amssymb}
  16. \usepackage{atbegshi}
  17. \usepackage{marvosym}
  18. \usepackage{mathrsfs}
  19. \usepackage{upgreek}
  20. \usepackage{etoc}
  21. \etocsettocstyle{\noindent\textbf{\contentsname}\par}{}
  22. \DeclareRobustCommand{\subtitle}[1]{\\#1}
  23. \makeatletter
  24. \renewcommand{\tocsection}[3]{%
  25. \indentlabel{\@ifnotempty{#2}{\bfseries\ignorespaces#1 #2\quad}}\bfseries#3}
  26. % Remove . after numbers in \subsection
  27. \renewcommand{\tocsubsection}[3]{%
  28. \indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2\quad}}#3}
  29. %\let\tocsubsubsection\tocsubsection% Update for \subsubsection
  30. %...
  31.  
  32. \newcommand\@dotsep{4.5}
  33. \def\@tocline#1#2#3#4#5#6#7{\relax
  34. \ifnum #1>\c@tocdepth % then omit
  35. \else
  36. \par \addpenalty\@secpenalty\addvspace{#2}%
  37. \begingroup \hyphenpenalty\@M
  38. \@ifempty{#4}{%
  39. \@tempdima\csname r@tocindent\number#1\endcsname\relax
  40. }{%
  41. \@tempdima#4\relax
  42. }%
  43. \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
  44. \rightskip\@pnumwidth plus1em \parfillskip-\@pnumwidth
  45. #5\leavevmode\hskip-\@tempdima{#6}\nobreak
  46. \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
  47. \nobreak
  48. \hbox to\@pnumwidth{\@tocpagenum{\ifnum#1=1\bfseries\fi#7}}\par% <-- \bfseries for \section page
  49. \nobreak
  50. \endgroup
  51. \fi}
  52. \AtBeginDocument{%
  53. \expandafter\renewcommand\csname r@tocindent0\endcsname{0pt}
  54. }
  55. \def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
  56. \renewcommand{\contentsnamefont}{\bfseries}
  57. \patchcmd{\section}{\scshape}{\bfseries}{}{}
  58. \renewcommand{\@secnumfont}{\bfseries}
  59. \patchcmd{\l@section}% <cmd>
  60. {#1}% <search>
  61. {\S#1}% <replace>
  62. {}{}% <search><replace>
  63. \makeatother
  64. \renewcommand{\contentsname}{Table of contents}
  65. \renewcommand{\thesection}{\Roman{section}}
  66. \renewcommand{\thesection}{\ZeroRoman{section}}
  67. \setcounter{section}{-1}
  68. \newcommand{\ZeroRoman}[1]{
  69. \ifcase\value{#1}\relax 0\else
  70. \Roman{#1}\fi}
  71. \renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
  72. \makeatletter
  73. \patchcmd{\@maketitle}
  74. {\ifx\@empty\@dedicatory}
  75. {\ifx\@empty\@date \else {\vskip3ex \centering\footnotesize\@date\par\vskip1ex}\fi
  76. \ifx\@empty\@dedicatory}
  77. {}{}
  78. \patchcmd{\@adminfootnotes}
  79. {\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi}
  80. {}{}{}
  81. \makeatother
  82. \makeatletter
  83. %% See pp. 26f. of 'The LaTeX Companion,' 2nd. ed.
  84. \def\@seccntformat#1{\@ifundefined{#1@cntformat}%
  85. {\csname the#1\endcsname\quad}% default
  86. {\csname #1@cntformat\endcsname}}% individual control
  87. \newcommand{\section@cntformat}{\S\thesection\quad}
  88. \newcommand{\subsection@cntformat}{\S\thesubsection\quad}
  89. %\newcommand{\subsubsection@cntformat}{\S\thesubsubsection\quad}
  90. %\newcommand{\paragraph@cntformat}{\S\theparagraph\quad}
  91. %\newcommand{\subparagraph@cntformat}{\S\thesubparagraph\quad}
  92. \makeatletter
  93. \usepackage [autostyle, english = american]{csquotes}
  94. \MakeOuterQuote{"}
  95. \setlength{\headheight}{15.2pt}
  96. \rfoot{Typeset by \hologo{AmSTeX}}
  97. \newtheorem{theorem}{Theorem}[section]
  98. \newtheorem{lemma}[theorem]{Lemma}
  99. \theoremstyle{definition}
  100. \newtheorem{definition}[theorem]{Definition}
  101. \newtheorem{example}[theorem]{Example}
  102. \newtheorem{xca}[theorem]{Exercise}
  103. \theoremstyle{remark}
  104. \newtheorem{remark}[theorem]{Remark}
  105. \numberwithin{equation}{section}
  106. \renewcommand{\qedsymbol}{\star}
  107. \setcounter{tocdepth}{1}
  108. \makeatletter
  109. \renewcommand\@dotsep{200}
  110. \makeatother
  111. \makeatletter
  112. \renewcommand{\l@section}{\@tocline{1}{0pt}{0pc}{}{}}
  113. \renewcommand{\l@subsection}{\@tocline{2}{0pt}{0pc}{}{}}
  114. \renewcommand{\tocsection}[3]{%
  115. \indentlabel{\@ifnotempty{#2}{\makebox[2.5em][l]{\ignorespaces#1 #2.}}}#3%
  116. }
  117. \let\tocsubsection\tocsection
  118. \makeatother
  119. \makeatletter
  120. \patchcmd{\l@section}% <cmd>
  121. {#1}% <search>
  122. {\S#1}% <replace>
  123. {}{}% <search><replace>
  124. \makeatother
  125. \pagenumbering{Roman}
  126. \begin{document}
  127. \title{Title}
  128. \author{Name}
  129. \date{\normalsize{\today}}
  130.  
  131. \begin{abstract}\hspace{32pt}
  132. Abstract here
  133. \end{abstract}
  134. \maketitle
  135. \thispagestyle{fancy}
  136. \makeatletter
  137. \let\@mkboth\@gobbletwo
  138. \let\@oddhead\@empty
  139. \let\@evenhead\@empty
  140. \makeatother
  141. \renewcommand{\subtitle}[1]{}
  142. \etocsettocstyle{\noindent\large{\textbf{{Contents}}}:\par}{}
  143. \tableofcontents
  144. \section*{Introduction}
  145. \etocsettocstyle{\noindent\textbf{Contents}:\par}{}
  146. \localtableofcontents
  147. \subsection{Our Results}
  148. \subsection{Structure of the Paper}
  149. \end{document}

Veknovias
Posts: 5
Joined: Sat Mar 31, 2018 10:54 pm

Postby Veknovias » Mon Apr 02, 2018 3:47 am

Also I noticed that the only thing that legitimately happens is the removal of page numbers

User avatar
Stefan Kottwitz
Site Admin
Posts: 8733
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Apr 02, 2018 10:24 am

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.

  1. ...
  2. \makeatletter
  3. \def\AmSTeX{{\the\textfont\tw@ A\kern-.1667em%
  4. \lower.5ex\hbox{M}\kern-.125emS}-\TeX\spacefactor1000 }
  5. \makeatother
  6. \fancyfoot[r]{Typeset by \AmSTeX}
  7. \pagestyle{fancy}
  8. \makeatother
  9. \begin{document}
  10. \title{Title}
  11. \author{Name}
  12. \date{\normalsize{\today}}
  13.  
  14. \begin{abstract}\hspace{32pt}
  15. Abstract here
  16. \end{abstract}
  17. \maketitle
  18. \thispagestyle{fancy}
  19. \let\@mkboth\@gobbletwo
  20. \let\@oddhead\@empty
  21. \let\@evenhead\@empty
  22. \makeatother


Stefan
Site admin

Veknovias
Posts: 5
Joined: Sat Mar 31, 2018 10:54 pm

Postby Veknovias » Tue Apr 03, 2018 4:25 am

Edit: Got it working.


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 9 guests