Skip to content

Commit

Permalink
Fix heading bug. Add some annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenti-D committed Feb 20, 2022
1 parent d6e61d8 commit 65525b7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions missing.sty
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,27 @@
\renewcommand\thefootnote{\arabic{footnote}}%
}

%
% 部分、章节的标题
%

% 修复 \chapter* 的页眉问题

\renewcommand{\@schapter}[1]{%
\CTEX@ifnamefalse
\CTEX@makeanchor@schapter{\Hy@chapapp*}%
\CTEX@gettitle{#1}%
\chaptermark{#1}%
\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi
}

% 「部分」的格式

\newcommand{\partformat}[1]{
\raggedright
\tikz[remember picture,overlay] \node at (current page.center) {\includegraphics{assets/missing-parts-bg.pdf}};
Expand All @@ -111,6 +131,8 @@
}
}

% 自定义图标的格式

\newcounter{noheadchap}
\def\noheadsymb#1{\expandafter\@noheadsymb\csname c@#1\endcsname}
\def\@noheadsymb#1{%
Expand Down Expand Up @@ -140,6 +162,8 @@
\fi
}

% 「章节」的格式

\newcommand{\chapterformat}[1]{
\CTEXifname{
\bfseries\raggedright
Expand Down

0 comments on commit 65525b7

Please sign in to comment.