\NeedsTeXFormat{LaTeX2e}%
\ProvidesFile{%
  utiyama%
  .sty%
}%
\def\@makechapterhead#1{
  {\parindent=0pt \normalfont\Huge\headfont
    {\color [gray]{0.5}\rule[-0.5zw]{2zw}{1.8zw}}
    \if@mainmatter
    \hspace {-2zw}\raisebox{0.1zw}{
      \makebox [2zw]{\color[gray]{1}\huge\headfont\thechapter}}
    \fi
    \hspace {0.5zw}#1\par\nobreak
    \vskip 15mm}}
\renewcommand{\section}{
  \@startsection{section}{1}{0mm}
  {5mm plus 2mm minus 1mm}
  {3mm plus 1mm}
  {\normalfont\Large\headfont
    \begin{tikzpicture}
      \useasboundingbox (0,0) rectangle (0,0);
      \fill [black!50] (0,-4pt) rectangle (8pt,12pt);
      \draw [black!50,line width=1pt] (0,-4pt) -- (\linewidth,-4pt);
    \end{tikzpicture}
    \hspace{1zw}}}

\newlength{\MyLen}
\setlength{\MyLen}{-\headsep}
\addtolength{\MyLen}{-\textheight}

\renewcommand\ps@plain{
  \let\ps@jpl@in\ps@plain
  \let\@mkboth\@gobbletwo
  \renewcommand{\@oddhead}{
    \rlap{
      \raisebox{\MyLen}[0pt][0pt]
      {\parbox[c]{\textwidth}
        {\centering \scalebox{5}{\textcolor[gray]{.7}{\textgt{緊急事態}}} }
      }
    }
    \hfill
  }
}
%\pagestyle{plain}
\AtEndDocument{\label{lastpage}}
\newcommand\ps@total{
  \let\@mkboth\@gobbletwo
  \def\@oddfoot{\normalfont\hfil--\thepage/\pageref{lastpage}--\hfil}
  \let\@evenfoot\@oddfoot}
%\pagestyle{total}
