乳胶制品分类

乳胶制品分类

我正在使用特定类在 Latex 中开发文章模板。我在编译时遇到问题,显示 4 个错误。将预定义类与 tex 源文件一起附加。

我很感激任何帮助,提前致谢!主 tex 文件“文件.tex

\documentclass[templateart,PDF]{templateart} 
\usepackage{layout}

\title{Title }

\articletype{Article} 

\author{First~Author\inst{1}\email{[email protected]},
        Second~Author\inst{2}\email{[email protected]}
       }

\shortauthor{F. Author, S. Author}

\institute{\inst{1}
           Department of Mathematics, University Full Name, Street, Postal code, City, Country
           \inst{2}
           Institute of Mathematics, Research Institution, Street, Postal code, City, Country
          }

\abstract{abstract abstractabstract abstractabstractabstract abstractabstract abstract abstract abstract abstract abstract abstract
}

\keywords{Keywords}

\msc{XXXXX, YYYYY}



\begin{document}
\maketitle
%\baselinestretch{2}


\vspace{5mm}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section}

\end{document}
  

cls 文件名为“templateart.cls“:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{templateart}
\newif\iftemplateart@twocolumns\templateart@twocolumnstrue
\newif\iftemplateart@printpagenumbers\templateart@printpagenumberstrue
\newif\iftemplateart@printlinenumbers\templateart@printlinenumbersfalse
\newif\iftemplateart@printpagerange\templateart@printpagerangetrue
\newif\iftemplateart@printbox\templateart@printboxfalse
\newif\iftemplateart@printabstract\templateart@printabstracttrue
\newif\iftemplateart@printkeywords\templateart@printkeywordstrue
\newif\iftemplateart@printpacs\templateart@printpacstrue
\newif\iftemplateart@printmsc\templateart@printmsctrue
\newif\iftemplateart@final\templateart@finaltrue
\newif\iftemplateart@pdf
\templateart@pdftrue
\pdfoutput=1
\newif\iftemplateart@firstaffiliation
\templateart@firstaffiliationtrue
\newdimen\templateart@tempdimen
\newcount\templateart@tempcount
\def\templateart@journalname{[{\tt templateart}]}

\def\templateart@shortjournalname{[ {\tt templateart}]}



\def\templateart@title{[Put the title here using command {\tt\char`\\title\char"7B text~of~title\char"7D}.]}
\let\templateart@shorttitle=\empty
\def\templateart@author{[Put the names of authors here using command {\tt\char`\\author\char"7B names of authors\char"7D}.]}

\let\templateart@shortauthor=\empty
\def\templateart@articletype{[Put the type of article here using command {\tt\char`\\articletype\char"7B type of article\char"7D}.]}

\def\templateart@year{[Put the year here using command {\tt\char`\\year\char"7B YYYY\char"7D}.]}

\def\templateart@issue{[Put the issue here using command {\tt\char`\\issue\char"7B NN\char"7D}.]}
\def\templateart@institute{[Put the names of institutes here using command {\tt\char`\\institute\char"7B names of institutes\char"7D}.]}
\let\templateart@msc=\empty
\let\templateart@pacs=\empty



\DeclareOption{templateart}{
  \def\templateart@journalname{Journal {\bfseries Name}}
  \def\templateart@shortjournalname{Journal Nmae}
  \def\templateart@type{templateart}
  \templateart@twocolumnsfalse
}

\DeclareOption{PDF}{\templateart@pdftrue\pdfoutput=1\relax}
\DeclareOption{DVI}{\templateart@pdffalse\pdfoutput=0\relax}

\ProcessOptions
\iftemplateart@printabstract   \templateart@printboxtrue \fi
\iftemplateart@printkeywords  \templateart@printboxtrue  \fi
\iftemplateart@printpacs   \ifx\templateart@pacs\empty   \else     \templateart@printboxtrue   \fi \fi
\iftemplateart@printmsc   \ifx\templateart@msc\empty   \else     \templateart@printboxtrue   \fi \fi
\LoadClass[10pt,twoside,pre,nofootinbib,secnumarabic,balancelastpage,superscriptaddress,showpacs,showkeys]{revtex4}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \pagestyle{myheadings}
  \def\contentsname{Contents}
  \def\listfigurename{List of Figures}
  \def\listtablename{List of Tables}
  \def\refname{References}
  \def\indexname{Index}
  \def\figurename{Figure}
  \def\tablename{Table}
  \def\partname{Part}
  \def\appendixname{Appendix}
  \def\abstractname{Abstract}

  \renewcommand*\email[1][E-mail: ]{\begingroup\sanitize@url\@email{#1}}%
  \chardef\*180
  \def\author#1{\expandafter\gdef\csname templateart@author\endcsname{#1}}
  \def\shortauthor#1{\expandafter\gdef\csname templateart@shortauthor\endcsname{#1}}
  \def\title#1{\expandafter\gdef\csname templateart@title\endcsname{#1}}
  \def\shorttitle#1{\expandafter\gdef\csname templateart@shorttitle\endcsname{#1}}
  \def\articletype#1{\expandafter\gdef\csname templateart@articletype\endcsname{#1}}
  \def\year#1{\expandafter\gdef\csname templateart@year\endcsname{#1}}
  \def\issue#1{\expandafter\gdef\csname templateart@issue\endcsname{#1}}
  \def\institute#1{\expandafter\gdef\csname templateart@institute\endcsname{#1}}
  \def\msc#1{\expandafter\gdef\csname templateart@msc\endcsname{#1}}
  \def\pacs#1{\expandafter\gdef\csname templateart@pacs\endcsname{#1}}
  \long\def\abstract#1{\expandafter\gdef\csname templateart@abstract\endcsname{#1}}
  \def\keywords#1{\expandafter\gdef\csname templateart@keywords\endcsname{#1}
  }
  \def\firstpage{\setcounter{page}}
  \def\lastpage#1{\expandafter\gdef\csname templateart@lastpage\endcsname{#1}}
  \def\titleblock@produce{%
    \def\thefootnote{\@fnsymbol\c@footnote}%
    \begingroup
    \null
    \vskip-\baselineskip
    \vskip-12mm
      \vbox to0pt{\vskip-12mm
      }
      \vskip-\baselineskip
      \vbox to0pt{\vskip19mm \vskip\textheight
      }
    \vskip-\baselineskip
    
   
   
%% Top Header:    
    \vbox to0pt{\vskip-5mm \fontsize{7pt}{8.4pt}\selectfont    
      \templateart@shortjournalname\\
      \footnotesize{v. xx no.  xx, }\iftemplateart@printpagerange\;\thepage-\templateart@lastpage\fi , (2022)\\
       doi:00.0000/00000000000000\\
        \templatearthref[templateart@color]{https://www.website.com/journals}{https://www.website.com/journals}%
    }
    
    

    \vskip0.5mm
  
%%line at the header 
    \leftline{\hskip-2mm\color{templateart@color}\vrule width\@rulewidth height.5pt}
    %\vskip2pt


%% Journal Logo:   
\pretitle{
   \begin{flushright}
   \vskip -5.2em
   \includegraphics[width=30mm]{picture.jpg}  
  % \hspace{0.3em} \qquad\\
  \end{flushright}
}
 \vskip -1.2em 
 \hspace{5.35in}\scriptsize{This is a Logo}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    \newdimen\@rulewidth
    \@rulewidth=\textwidth
    \advance\@rulewidth by4mm
    \vskip2.5mm
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \begin{flushleft}
      \sloppy\fontsize{19pt}{22.8pt}\selectfont\color{templateart@color}\textbf{\templateart@title}
    \end{flushleft}
    \vskip-\baselineskip
    \vskip6mm
    \begin{flushright}
       \fontsize{9pt}{8pt}\selectfont\textbf{\templateart@articletype}
    \end{flushright}%
   \vskip-\baselineskip
    \leftline{\hskip-2mm\color{templateart@color}\vrule width\@rulewidth height.5pt}
    \vskip-1.5\baselineskip
    \vskip2mm
    \null
    
    
    \begin{flushleft}
      \def\inst##1{$^\text{##1}$}%
      \def\email##1{\footnote{E-mail: ##1}}%
      \fontsize{10pt}{12pt}\selectfont\textbf{\templateart@author}
    \end{flushleft}
    \null
    \vskip-2.5\baselineskip
    \vskip2mm
    \null
    \begin{flushleft}
     $\null$%
     \def\inst##1{\parindent=10pt%
       \iftemplateart@firstaffiliation%
         \vskip-\baselineskip
         \templateart@firstaffiliationfalse
       \else
         \vskip2mm
       \fi%
       $\null$\llap{\hbox to\parindent{##1\hss}}\ignorespaces}%
       \fontsize{8pt}{9.5pt}\selectfont\color{grey}%
      \vskip-1\baselineskip\indent$\null$\templateart@institute
    \end{flushleft}
    \vskip-1.5\baselineskip
    \vskip10mm
     \iftemplateart@printbox%
        \vskip-\baselineskip
        \vskip1.5mm
        \leftline{\hskip-2mm\color{templateart@color}\vrule width\@rulewidth height.5pt}
        \vskip-.5pt
        \fontsize{8pt}{10pt}\selectfont
        \settowidth\templateart@tempdimen{\textbf{MSC:}\kern.5em}%
        \iftemplateart@printabstract%
          \settowidth\templateart@tempdimen{\textbf{Abstract:}\kern.5em}%
        \fi%
        \iftemplateart@printkeywords%
          \settowidth\templateart@tempdimen{\textbf{Keywords:}\kern.5em}%
        \fi%
        \iftemplateart@printpacs%
            \ifx\templateart@pacs\empty%
            \else%
              \settowidth\templateart@tempdimen{\textbf{PACS (2008):}\kern.5em}%
            \fi%
          \fi%
          
%abstract box:
        \leftline{%
          \hskip-2mm\colorbox{abs}{%
            \hskip1mm\vbox{%
              \iftemplateart@printabstract%
                  \vskip2.6mm\hangindent\templateart@tempdimen
                   \fontsize{8pt}{10pt}\selectfont
                    $\null$\rlap{\textbf{Abstract:}}\kern\templateart@tempdimen%
                    \selectfont\templateart@abstract
                    \vskip1mm
                \fi%
              \iftemplateart@printmsc%
                  \ifx\templateart@msc\empty\else
                    \vskip1mm\hangindent\templateart@tempdimen
                     \fontsize{8pt}{10pt}\selectfont
                      $\null$\rlap{\textbf{MSC:}}\kern\templateart@tempdimen%
                      \selectfont\templateart@msc
                    \vskip1mm
                  \fi%
                \fi%
                \iftemplateart@printpacs%
                  \ifx\templateart@pacs\empty\else
                    \vskip1mm\hangindent\templateart@tempdimen
                      \fontsize{8pt}{10pt}\selectfont
                      $\null$\rlap{\textbf{PACS (2008):}}\kern\templateart@tempdimen%
                      \selectfont\templateart@pacs
                    \vskip1mm
                  \fi%
                \fi%
                \iftemplateart@printkeywords%
                  \vskip1mm\hangindent\templateart@tempdimen
                  \fontsize{8pt}{10pt}\selectfont
                    $\null$\rlap{\textbf{Keywords:}}\kern\templateart@tempdimen%
                    \selectfont\templateart@keywords\\[1mm]%
                  \vskip1mm
                \fi%
            \vskip1.6mm
            }%
          \hskip1mm}%
        }%
      \fi%
    \vskip-2mm
    \leftline{\hskip-2mm\color{templateart@color}\vrule width\@rulewidth height.5pt}
    \vskip10mm
    \endgroup
    \gdef\thefootnote{\@arabic\c@footnote}
    \global\c@footnote=0
  }%

  \def\@hangfrom@section#1#2#3{\@hangfrom{#1#2}{#3}}%
  \def\section{\@startsection{section}{1}{\z@}{19\p@}{12\p@}
    {\noindent\fontsize{15pt}{17pt} \bfseries \selectfont$\null$\color{templateart@color}}}
  \def\subsection{\@startsection{subsection}{2}{\z@}{14\p@}{8\p@}
   {\noindent\fontsize{12\p@}{14\p@} \bfseries \selectfont$\null$\color{templateart@color}}}
  \def\subsubsection{\@startsection {subsubsection}{3}{\z@}{8\p@}{4\p@}
    {\noindent\fontsize{10pt}{12pt} \bfseries \selectfont$\null$\color{templateart@color}}}
  \def\paragraph{\@startsection{paragraph}{4}{\z@}{12\p@}{2\p@}
    {\noindent\fontsize{9pt}{12pt}  \bfseries \itshape \selectfont$\null$\color{templateart@color}}}
  \def\subparagraph{\@startsection{subparagraph}{5}{\z@}{6\p@}{\z@}%
    {\normalfont\normalsize\bfseries}}
  \c@tocdepth=1
  \c@secnumdepth=3

  \def\footnoterule{\kern-7.5mm {\color{templateart@color}\hbox{\hskip-2mm\vrule width79.8mm height.5pt}}\kern2mm}
  \renewcommand\@makefntext[1]{\parindent0\p@\relax\indent%
    \rmfamily\it\fontsize{9}{10.8}\selectfont%
    \@makefnmark\enspace#1}
  \def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
    \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
    \or \ddagger\ddagger \else\@ctrerr\fi}}
  \def\thefootnote{\@arabic\c@footnote}
  \footnotesep=2mm
  \gdef\@reinserts{%
    \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
    \ifvbox\@kludgeins\insert\@kludgeins
                        {\unvbox\@kludgeins}\fi
  }
  
  
  \def\thetable{\@arabic\c@table}
  \abovecaptionskip=5.5mm
  \belowcaptionskip2mm
  \long\def\@makecaption#1#2{%
    \par
    \vskip\abovecaptionskip
    \begingroup
    \small\rmfamily
    \sbox\@tempboxa{%
      \let\\\heading@cr
        \fontsize{9pt}{8.4pt} \bfseries \selectfont%
      \settowidth\templateart@tempdimen{#1.\enspace}%
      \hangindent\templateart@tempdimen{\color{templateart@color}#1.\enspace}%
    \fontsize{7pt}{8.4pt} \selectfont%
      #2\par
    }%
    
    \@ifdim{\wd\@tempboxa >\hsize}{%
      \begingroup
      \samepage
      \flushing
      \let\footnote\@footnotemark@gobble
      \fontsize{9pt}{8.4pt}  \selectfont%
      \settowidth\templateart@tempdimen{#1.\enspace}%
      \hangindent\templateart@tempdimen{\color{templateart@color}#1.\enspace}%
       \fontsize{7pt}{8.4pt}\selectfont%
      #2\par
      \endgroup
    }{%
      \global \@minipagefalse
      \hb@xt@\hsize{\unhbox\@tempboxa\hfil}%
    }%
    \endgroup
    \vskip\belowcaptionskip
  }%

  \renewenvironment{widetext@grid}{%
    \par\ignorespaces
    \setbox\widetext@top\vbox{%
    \vskip10\p@
    \hb@xt@\hsize{%
      \leaders\hrule\hfil
      \vrule\@height6\p@
    }%
    \vskip6\p@
    }%
    \setbox\widetext@bot\hb@xt@\hsize{%
      \vrule\@depth6\p@
      \leaders\hrule\hfil
    }%
    \onecolumngrid
    \dimen@\ht\widetext@top\advance\dimen@\dp\widetext@top
    \cleaders\box\widetext@top\vskip\dimen@
    \let\set@footnotewidth\set@footnotewidth@ii
  }{%
    \vskip6\p@
    \setbox\widetext@bot\vbox{%
    \hb@xt@\hsize{\hfil\box\widetext@bot}%
    \vskip10\p@
    }%
    \dimen@\ht\widetext@bot\advance\dimen@\dp\widetext@bot
    \cleaders\box\widetext@bot\vskip\dimen@
    \twocolumngrid\global\@ignoretrue
    \@endpetrue
  }%



  \def\bibfont{\normalsize}
    \def\bibsection{%
      \def\section{\@startsection{section}{1}{\z@}{5.5mm}{5mm}
        {\noindent\fontsize{11pt}{11pt}\selectfont$\null$\color{templateart@color}\vskip6mm \hbox{\hskip-2mm\color{templateart@color}\vrule width79.8mm height.5pt}\vskip-10mm }}
      \let\@hangfroms@section\@hang@froms
      \section*{\refname}%
      \iftemplateart@twocolumns
      \else
        \vskip-\baselineskip
        \vskip4mm
        \null
      \fi
      \@nobreaktrue
    }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \def\tiny{\fontsize{5pt}{6pt}\selectfont}
  \def\scriptsize{\fontsize{6pt}{7pt}\selectfont}
  \def\footnotesize{\fontsize{7pt}{8pt}\selectfont}
  \def\small{\fontsize{8pt}{10pt}\selectfont}
  \def\normalsize{\fontsize{9pt}{18pt}\selectfont}
  \def\large{\fontsize{10pt}{12pt}\selectfont}
  \def\Large{\fontsize{12pt}{14pt}\selectfont}
  \def\LARGE{\fontsize{15pt}{16pt}\selectfont}
  \def\huge{\fontsize{17pt}{20pt}\selectfont}
  \def\Huge{\fontsize{20pt}{24pt}\selectfont}
  \def\*{$\bullet$ \relax}

\RequirePackage{amsmath}
  \abovedisplayskip=16ptplus4ptminus8pt
  \abovedisplayshortskip=1ptplus4pt
  \belowdisplayskip=16ptplus4ptminus8pt
  \belowdisplayshortskip=8ptplus6ptminus5pt

\RequirePackage{amsthm, amscd, amsfonts, amssymb}
  \newtheoremstyle{itstyle}
    {16pt plus6pt}
    {16pt plus6pt}
    {\rmfamily\it\fontsize{9}{11}\selectfont}
    {0pt}
    {\fontsize{10}{11} \bfseries \selectfont\color{templateart@color}$\null$}
    {\newline\nobreak}
    {0pt}
    {\indent#1\hbox{ }#2\thmnote{\hbox{ }(#3)}. \ }
  \newtheoremstyle{rmstyle}
    {16pt plus6pt}
    {16pt plus6pt}
    {\rmfamily\fontsize{9}{11}\selectfont}
    {0pt}
    {\fontsize{10}{11}\bfseries \selectfont\color{templateart@color}$\null$}
    {\newline\nobreak}
    {0pt}
    {\indent#1\hbox{ }#2\thmnote{\hbox{ }(#3)}. \ }
    
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
  \theoremstyle{itstyle}
  \newtheorem{theorem}{Theorem}[section]
  \newtheorem{lemma}{Lemma}[section]
  \newtheorem{proposition}{Proposition}[section]
  \newtheorem{claim}{Claim}[section]
  \newtheorem{fact}{Fact}[section]
  \newtheorem{corollary}{Corollary}[section]
  \newtheorem{assumption}{Assumption}[section] %???
  \newtheorem{algoritheorem}{Algoritheorem}[section] %???
  \theoremstyle{rmstyle}
  \newtheorem{remark}{Remark}[section]
  \newtheorem{example}{Example}[section]
  \newtheorem{question}{Question}[section]
  \newtheorem{problem}{Problem}[section]
  \newtheorem{definition}{Definition}[section]
  \newtheorem{axiom}{Axiom}[section] %???
  \def\proofname{{\fontsize{10}{11}\selectfont\color{templateart@color}$\null$Proof. \ }}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\iftemplateart@pdf
  \RequirePackage[pdftex]{graphicx}
\else
  \RequirePackage[dvips]{graphicx}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\RequirePackage{color}
  \definecolor{templateart@color}{rgb}{1,0,0}
    \definecolor{abs}{rgb}{1,.9,.9}
  \definecolor{grey}{rgb}{.3,.3,.3}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\templateart{templateart}
\ifx\templateart@type\templateart
  \definecolor{abs}{rgb}{1,.9,.9}
  \definecolor{grey}{rgb}{.3,.3,.3}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\iftemplateart@pdf
  \iftemplateart@final
    \RequirePackage[pdftex,colorlinks=true,citecolor=blue,linkcolor=blue,final]{hyperref}
  \else
    \RequirePackage[pdftex,colorlinks=true,citecolor=blue,linkcolor=blue,draft]{hyperref}
  \fi
  
\else
  \iftemplateart@final
    \RequirePackage[ps2pdf,colorlinks=true,citecolor=blue,linkcolor=blue,final]{hyperref}
  \else
    \RequirePackage[ps2pdf,colorlinks=true,citecolor=blue,linkcolor=blue,draft]{hyperref}
  \fi
\fi

\usepackage{hypernat}

%%%
%\usepackage[colorlinks = true,
%            linkcolor = blue,
%            urlcolor  = blue,
%            citecolor = blue,
%            anchorcolor = blue]{hyperref}
\newcommand{\templatearthref}[3][blue]{\href{#2}{\color{#1}{#3}}}%
%%%          
            
\paperwidth=210mm
\paperheight=277mm

\iftemplateart@pdf
  \pdfpagewidth=\paperwidth
  \pdfpageheight=\paperheight
\fi

\textwidth=159.95mm
\textheight=222.5mm

\newdimen\templateart@textwidth
\templateart@textwidth=\textwidth

\hoffset=-1in
\advance\hoffset by.5\paperwidth
\advance\hoffset by-.5\textwidth

\voffset=-1in
\advance\voffset by.5\paperheight
\advance\voffset by-.5\textheight
\advance\voffset by-15mm

\evensidemargin=0mm
\oddsidemargin=0mm

\topmargin=0pt

\headheight=40pt
\headsep=0pt

\marginparsep=0pt
\marginparwidth=0pt
\marginparpush=0pt

\parindent=0pt

\baselineskip=12pt

\footskip=30pt

\def\templateart@linenumbers{}
\def\templateart@titlehead{\vbox to40pt{\hsize=.5\templateart@textwidth \advance\hsize by.5\columnsep
  \templateart@linenumbers%
}}

\def\templateart@oddhead{\vbox to40pt{%
  \iftemplateart@twocolumns
      \hsize=.5\templateart@textwidth
      \advance\hsize by.5\columnsep
  \else
    \hsize=\templateart@textwidth
  \fi
  \templateart@linenumbers%
  \def\email##1{}\def\inst##1{}%
  \vbox to20pt{%
    \raggedright%
    \fontsize{7pt}{8.4pt}\selectfont\color{grey}%
    \ifx\templateart@shortauthor\empty%
      \templateart@author%
    \else%
      \templateart@shortauthor%
    \fi%
    \vss%
  }%
  \hbox to\templateart@textwidth{\hskip-2mm\color{templateart@color}\vrule width\textwidth height.5pt\hss}%
  \vskip1mm
  \hskip.5\templateart@textwidth\hbox to.5\templateart@textwidth{\hskip.5\columnsep\color{white}\vrule width\textwidth height2.962mm\hss}%
  \vss%
}}

\def\templateart@evenhead{\vbox to40pt{\hsize=\templateart@textwidth
  \templateart@linenumbers%
  \def\email##1{}\def\inst##1{}%
  \vbox to20pt{%
    \raggedleft%
    \fontsize{7pt}{8.4pt}\selectfont\color{grey}%
    \ifx\templateart@shorttitle\empty%
      \templateart@title%
    \else%
      \templateart@shorttitle%
    \fi%
    \vss%
  }%
  \hbox to\templateart@textwidth{\hss\color{templateart@color}\vrule width\textwidth height.5pt\hskip 0mm}%
  \vskip1mm
  \hbox to.5\templateart@textwidth{\hss\color{white}\vrule width\textwidth height2.962mm\hskip.5\columnsep}%
  \vss%
}}

    
    
\def\templateart@oddfoot{\iftemplateart@printpagenumbers%
    \hfill\rlap{\hskip.7cm{\colorbox{white}{\hbox to1.7cm{%
    \hss\usefont{T1}{square721exeu}{m}{n}\fontsize{7pt}{8.4pt}\selectfont\color{black}\thepage\hss}}}}%
  \fi}

\def\templateart@evenfoot{\iftemplateart@printpagenumbers%
    \llap{{\colorbox{white}{\hbox to1.7cm{%
    \hss\fontsize{7pt}{8.4pt}\selectfont\color{black}\thepage\hss}}\hskip.7cm}}%
  \fi}

\def\ps@myheadings{
  \let\@oddhead=\templateart@oddhead
  \let\@oddfoot=\templateart@oddfoot
  \let\@evenhead=\templateart@evenhead
  \let\@evenfoot=\templateart@evenfoot
}

\def\ps@titlepage{
  \let\@oddhead=\templateart@titlehead
  \let\@oddfoot=\templateart@oddfoot
  \let\@evenhead=\templateart@titlehead
  \let\@evenfoot=\templateart@evenfoot
}

\ps@myheadings

\AtBeginDocument{%
  \renewcommand{\familydefault}{\rmdefault}
  \fontfamily{\familydefault}

  \thispagestyle{titlepage}
  \def\templateart@lastpage{{\color{red}[Compile the document one more time to update number of the last page!]}}

  \newread\templateart
  \openin\templateart=\jobname.templateart
  \ifeof\templateart \else\input\jobname.templateart \fi

  \newwrite\templateart
  \immediate\openout\templateart=\jobname.templateart

  \rm\normalsize
}

\AtEndDocument{
  \immediate\write\templateart{\string\lastpage{\thepage}}
  \immediate\closeout\templateart
}
\endinput

我修改了班级名称 *使用 Overleaf 可以轻松通过将两个文件与图片一起上传来进行编译

相关内容