-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Putting the styles into cls file called inkbook.cls (#4)
* Putting the styles into cls file called inkbook.cls * The custom titlepage nullified footnotes, fixed
- Loading branch information
1 parent
56387a3
commit be5984b
Showing
7 changed files
with
408 additions
and
309 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
\documentclass[UTF8,a4paper,openany]{ctexbook} | ||
\usepackage{zhnumber} | ||
% \usepackage[draft]{graphicx} | ||
\usepackage{graphicx} | ||
\usepackage{subfigure} | ||
|
||
\usepackage{latexsym, amsmath, amssymb, amsfonts, mathrsfs, amsthm} | ||
\usepackage{siunitx} | ||
|
||
\usepackage{cases} | ||
|
||
\usepackage{multirow} | ||
\usepackage{textcomp} | ||
\usepackage[top=2.54cm, bottom=2.54cm, left=3.18cm, right=3.18cm]{geometry} | ||
\usepackage[toc,lof]{multitoc} | ||
|
||
\documentclass{inkbook} | ||
\usepackage{asymptote} | ||
|
||
\usepackage{hyperref} | ||
\hypersetup{colorlinks, | ||
linkcolor=black, | ||
filecolor=black, | ||
|
@@ -29,24 +13,6 @@ | |
pdfproducer={XeLaTeX}, | ||
pdfborder=0 0 1} | ||
|
||
\setcounter{secnumdepth}{3} %使subsubsection也有编号 | ||
|
||
\usepackage{fancyhdr} %页眉页脚 | ||
|
||
\usepackage[inline]{enumitem} | ||
\setlist[enumerate,1]{leftmargin=0pt,itemindent=2em,itemsep=0ex,listparindent=2em,parsep = 0ex,topsep = 1ex} | ||
\setlist[enumerate,2]{leftmargin=1em,itemsep=0ex,itemindent=2em,listparindent=2em,parsep = 0ex,topsep = 1ex} | ||
\setlist[enumerate,3]{leftmargin=1em,itemsep=0ex,itemindent=2em,listparindent=2em,parsep = 0ex,topsep = 1ex} | ||
\setlist[itemize,1]{itemsep = 0ex, parsep = 0ex, topsep = 1ex} | ||
\setlist[description]{listparindent=2em, itemsep=0ex, parsep = 0ex,topsep = 1ex} | ||
|
||
\ctexset{ | ||
figurename={\kaishu 图}, | ||
tablename={表}, | ||
contentsname={目\quad 录}, | ||
listfigurename={插图目录} | ||
} | ||
|
||
\newcommand{\ds}{\displaystyle} | ||
\newcommand{\eps}{\varepsilon} | ||
\newcommand{\mbf}{\boldsymbol} | ||
|
@@ -75,234 +41,17 @@ | |
\renewcommand{\Re}{\mathrm{Re}\,} | ||
\renewcommand{\Im}{\mathrm{Im}\,} | ||
|
||
\newtheoremstyle{theoremwithoutdot}% 类型名 | ||
{}% Space above, empty = `usual value' | ||
{}% Space below | ||
{\kaishu}% Body font | ||
{}% Indent amount (empty = no indent, \parindent = para indent) | ||
{\heiti}% Thm head font | ||
{}% Punctuation after thm head | ||
{1em}% Space after thm head | ||
{\thmname{#1}\thmnumber{~#2}\thmnote{~(#3)}}% Thm head spec | ||
|
||
\newtheoremstyle{solutionstyle}% 类型名 | ||
{}% Space above, empty = `usual value' | ||
{}% Space below | ||
{}% Body font | ||
{}% Indent amount (empty = no indent, \parindent = para indent) | ||
{\heiti}% Thm head font | ||
{}% Punctuation after thm head | ||
{1em}% Space after thm head | ||
{\thmname{#1}\thmnumber{~#2}\thmnote{~(#3)}}% Thm head spec | ||
|
||
\theoremstyle{theoremwithoutdot} | ||
\newtheorem{example}{例}[chapter] | ||
\newtheorem{question}{题}[section] | ||
\newtheorem*{solution}{解} | ||
%去掉证明后面的点 | ||
\makeatletter | ||
\renewenvironment{proof}[1][\proofname]{\par% | ||
\pushQED{\qed}% | ||
\normalfont \topsep6\p@\@plus6\p@\relax% | ||
\trivlist% | ||
\item[\hskip\labelsep% | ||
#1]\ignorespaces% | ||
}{% | ||
\popQED\endtrivlist\@endpefalse% | ||
} | ||
\makeatother | ||
\renewcommand{\proofname}{{\heiti 证明}} | ||
|
||
%\renewcommand{\thefootnote}{\fnsymbol{footnote}} | ||
%带圈脚注 | ||
\usepackage{pifont} | ||
\usepackage[perpage,stable]{footmisc} %每页脚注重新编号 | ||
\renewcommand{\thefootnote}{\ding{\numexpr191+\value{footnote}}} | ||
% 脚注中的脚注序号不用上标,正文中的脚注号保持不变 | ||
\makeatletter | ||
\def\my@makefnmark{\hbox{\normalfont\@thefnmark\space}} | ||
\let\my@save@makefntext\@makefntext | ||
\long\def\@makefntext#1{{% | ||
\let\@makefnmark\my@makefnmark | ||
\my@save@makefntext{#1}}} | ||
|
||
% Blocked theorem environment | ||
\usepackage[framemethod=TikZ]{mdframed} | ||
\newcommand{\newblocktheorem}[3][]{% | ||
\ifstrempty{#1}% | ||
{\newcounter{#2}\setcounter{#2}{0}% | ||
}% | ||
{\newcounter{#2}[#1]\setcounter{#2}{0}% | ||
\expandafter\renewcommand\csname the#2\endcsname{\csname the#1\endcsname.\arabic{#2}}% | ||
} | ||
\newenvironment{#2}[1][]{% | ||
\refstepcounter{#2}% | ||
\ifstrempty{##1}% | ||
{\mdfsetup{% with title | ||
frametitle={% | ||
\tikz[baseline=(current bounding box.east),outer sep=0pt] | ||
\node[anchor=east,rectangle,fill=blue!20] | ||
{\strut\heiti #3~\csname the#2\endcsname};}} | ||
}% | ||
{\mdfsetup{% without title | ||
frametitle={% | ||
\tikz[baseline=(current bounding box.east),outer sep=0pt] | ||
\node[anchor=east,rectangle,fill=blue!20] | ||
{\strut\heiti #3~\csname the#2\endcsname~(##1)};}}% | ||
}% | ||
\mdfsetup{innertopmargin=10pt,linecolor=blue!20,% | ||
linewidth=2pt,topline=true,% | ||
frametitleaboveskip=\dimexpr-\ht\strutbox\relax | ||
} | ||
\begin{mdframed}[]\relax\kaishu% | ||
}{\end{mdframed}} | ||
} | ||
\newblocktheorem[section]{theorem}{定理} | ||
\newblocktheorem{law}{定律} | ||
|
||
\allowdisplaybreaks[3] | ||
\renewcommand*{\proofname}{\normalfont\heiti\color{black}证明} | ||
|
||
\title{《经典力学》讲义} | ||
\author{整理:张大鹏\thanks{基于徐晓华2010年的《经典力学》讲义整理,有修改和删节。所有插图均为重新绘制。}\\ Email:\url{[email protected]}} | ||
%\date{} | ||
|
||
\makeatletter | ||
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else | ||
\hbox{} | ||
\vspace*{\fill} | ||
|
||
\vspace{\fill} | ||
\thispagestyle{empty} | ||
\newpage | ||
\if@twocolumn\hbox{}\newpage\fi\fi\fi} | ||
\makeatother | ||
|
||
%在插图目录图编号前加上“图” | ||
%\usepackage{titletoc} | ||
%\titlecontents{figure}[0.5cm]{\songti}{\figurename~\thecontentslabel\quad}{\hspace*{-1.5cm}}{\titlerule*[0.12cm]{.}\contentspage}[\addvspace{6pt}] | ||
|
||
%样式定义 | ||
\usepackage{titlesec} | ||
\usepackage{xcolor,colortbl} | ||
\usepackage{tgpagella} | ||
\usepackage[T1]{fontenc} | ||
|
||
\definecolor{partcolor}{RGB}{255,0,128} | ||
\definecolor{titlecolor}{RGB}{129,129,188} | ||
\definecolor{contentcolor}{RGB}{129,188,129} | ||
\definecolor{backcolor}{RGB}{129,188,129} | ||
|
||
\newcommand{\mypart}[1]{ | ||
\begin{tabular}{p{0.01\textwidth}p{0.99\textwidth}} | ||
\arrayrulewidth=0.4pt | ||
\cellcolor{black} & \cellcolor{partcolor} \textcolor{white} | ||
{\newline\heiti\Huge 第\thepart 部分} \\ | ||
\hline | ||
\cellcolor{black} & \multicolumn{1}{r}{\cellcolor{partcolor} \textcolor{white} | ||
{\huge #1}} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
} | ||
|
||
\newcommand{\mytitle}[1]{ | ||
\begin{tabular}{p{0.01\textwidth}p{0.98\textwidth}} | ||
\cellcolor{black} &\cellcolor{titlecolor} \textcolor{white} | ||
{\newline\heiti\LARGE 第\zhnumber{\thechapter}章 \ \ #1} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
} | ||
|
||
\newcommand{\mycont}[1]{ | ||
\vspace{-0.5cm} | ||
\begin{tabular}{p{0.01\textwidth}p{0.98\textwidth}} | ||
\cellcolor{black} &\cellcolor{contentcolor} \textcolor{white} | ||
{\newline\heiti\LARGE #1} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-1.5cm} | ||
} | ||
|
||
\newcommand{\mysection}[1]{ | ||
\setlength\arrayrulewidth{1pt}\arrayrulecolor{titlecolor} | ||
\begin{tabular}{p{0.01\textwidth}p{0.98\textwidth}} | ||
\hline | ||
\cellcolor{titlecolor} & \textcolor{black}{\heiti\LARGE \thesection ~ #1} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-0.7cm} | ||
} | ||
|
||
\newcommand{\mysubsection}[1]{ | ||
\setlength\arrayrulewidth{1pt}\arrayrulecolor{titlecolor} | ||
\begin{tabular}{p{0.01\textwidth}p{0.98\textwidth}} | ||
\hline | ||
\cellcolor{titlecolor} & \textcolor{black}{\heiti\Large \thesubsection ~ #1} \\ | ||
\hline | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-0.5cm} | ||
} | ||
|
||
\newcommand{\mysubsubsection}[1]{ | ||
\setlength\arrayrulewidth{1pt}\arrayrulecolor{titlecolor} | ||
\begin{tabular}{p{0.01\textwidth}p{0.975\textwidth}p{0.01\textwidth}} | ||
\hline | ||
\cellcolor{titlecolor} & \textcolor{black}{\heiti\large \thesubsubsection ~ #1} & \cellcolor{titlecolor} \\ | ||
\hline | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-0.5cm} | ||
} | ||
|
||
\newcommand{\myappendix}[1]{ | ||
\begin{tabular}{p{0.01\textwidth}p{0.98\textwidth}} | ||
\cellcolor{black} &\cellcolor{backcolor} \textcolor{white} | ||
{\newline\heiti\LARGE 附录\thechapter \ \ #1} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
} | ||
|
||
|
||
\newcommand{\appendixsection}[1]{ | ||
\setlength\arrayrulewidth{1pt}\arrayrulecolor{backcolor} | ||
\begin{tabular}{p{0.01\textwidth}p{0.99\textwidth}} | ||
\hline | ||
\cellcolor{backcolor} & \textcolor{black}{\heiti\LARGE \thesection ~ #1} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-0.7cm} | ||
} | ||
|
||
\newcommand{\appendixsubsection}[1]{ | ||
\setlength\arrayrulewidth{1pt}\arrayrulecolor{backcolor} | ||
\begin{tabular}{p{0.01\textwidth}p{0.99\textwidth}} | ||
\hline | ||
\cellcolor{backcolor} & \textcolor{black}{\heiti\Large \thesubsection ~ #1} \\ | ||
\hline | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-0.5cm} | ||
} | ||
|
||
\newcommand{\appendixsubsubsection}[1]{ | ||
\setlength\arrayrulewidth{1pt}\arrayrulecolor{backcolor} | ||
\begin{tabular}{p{0.01\textwidth}p{0.95\textwidth}p{0.01\textwidth}} | ||
\hline | ||
\cellcolor{backcolor} & \textcolor{black}{\heiti\large \thesubsubsection ~ #1} & \cellcolor{backcolor} \\ | ||
\hline | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
\vspace{-0.5cm} | ||
} | ||
|
||
\newcommand{\mybackmatter}[1]{ | ||
\begin{tabular}{p{0.01\textwidth}p{0.99\textwidth}} | ||
\cellcolor{black} &\cellcolor{backcolor} \textcolor{white} | ||
{\newline\heiti\LARGE #1} | ||
\end{tabular} | ||
\arrayrulewidth=0.4pt | ||
} | ||
|
||
\begin{document} | ||
|
||
\begin{asydef} | ||
|
@@ -319,42 +68,11 @@ | |
|
||
\frontmatter | ||
|
||
\pagestyle{fancy} | ||
\renewcommand{\chaptermark}[1]{\markboth{第\zhnumber{\thechapter}章\ \ #1}{}} | ||
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \ \rm #1}{}} %这两个命令第一次必须出现在\pagestyle{fancy}之后,否则\pagestyle{fancy}会覆盖掉其效果 | ||
\markboth{\leftmark}{\rightmark} | ||
\fancyhf{} | ||
\fancyhead[CO]{\rightmark} | ||
\fancyhead[LE,RO]{$\cdot$\, \thepage\, $\cdot$} | ||
\fancyhead[CE]{\leftmark} | ||
\renewcommand{\headrulewidth}{0.4pt} | ||
|
||
\titleformat{\chapter}[hang]{\heiti\LARGE} | ||
{}{0mm}{\hspace{-0.4cm}\mycont} | ||
|
||
\tableofcontents | ||
\cleardoublepage | ||
|
||
\mainmatter | ||
|
||
\titleformat{\part}[hang]{\heiti\Huge} | ||
{}{0mm}{\hspace{-0.4cm}\mypart} | ||
|
||
\titleformat{\chapter}[hang]{\heiti\LARGE} | ||
{}{0mm}{\hspace{-0.4cm}\mytitle} | ||
|
||
\titleformat{\section}[hang]{\heiti\LARGE} | ||
{}{0mm}{\hspace{-0.5cm}\mysection} | ||
|
||
\titleformat{\subsection}[hang]{\heiti\large} | ||
{}{0mm}{\hspace{-0.5cm}\mysubsection} | ||
|
||
\titleformat{\subsubsection}[hang]{\heiti\large} | ||
{}{0mm}{\hspace{-0.5cm}\mysubsubsection} | ||
|
||
\titlespacing{\chapter} | ||
{0pc}{1.5ex plus .1ex minus .2ex}{.2pc} | ||
|
||
\part[矢量力学]{矢量力学\ (Vectorial Mechanics)} | ||
|
||
\input{chapter/vectorial-mechanics/Kinematics.tex}%第一章——牛顿力学 | ||
|
@@ -385,22 +103,6 @@ | |
|
||
\appendix | ||
|
||
\titleformat{\chapter}[hang]{\heiti\LARGE} | ||
{}{0mm}{\hspace{-0.4cm}\myappendix} | ||
|
||
\titleformat{\section}[hang]{\heiti\LARGE} | ||
{}{0mm}{\hspace{-0.5cm}\appendixsection} | ||
|
||
\titleformat{\subsection}[hang]{\heiti\large} | ||
{}{0mm}{\hspace{-0.5cm}\appendixsubsection} | ||
|
||
\titleformat{\subsubsection}[hang]{\heiti\large} | ||
{}{0mm}{\hspace{-0.5cm}\appendixsubsubsection} | ||
|
||
\renewcommand{\chaptermark}[1]{\markboth{附录\ \ #1}{}} | ||
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \ \rm #1}{}} %这两个命令第一次必须出现在\pagestyle{fancy}之后,否则\pagestyle{fancy}会覆盖掉其效果 | ||
\markboth{\leftmark}{\rightmark} | ||
|
||
\input{chapter/exercise}%附录——金尚年《经典力学》 | ||
|
||
\input{chapter/exercise2}%附录——理论力学习题集 | ||
|
@@ -409,8 +111,7 @@ | |
|
||
\backmatter | ||
|
||
\titleformat{\chapter}[hang]{\heiti\LARGE} | ||
{}{0mm}{\hspace{-0.4cm}\mybackmatter} | ||
\titleformat{\chapter}[hang]{\heiti\LARGE}{}{0mm}{\hspace{-0.4cm}\mybackmatter} | ||
|
||
\addcontentsline{toc}{chapter}{\listfigurename}{% | ||
\let\oldnumberline\numberline% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.