mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 04:14:35 +08:00
remove pagestyles from titlesec pkg and set parindent for lang=cn
This commit is contained in:
28
ceshi.tex
Normal file
28
ceshi.tex
Normal file
@@ -0,0 +1,28 @@
|
||||
\documentclass[cn,11pt,onecol,color=black]{elegantbook}
|
||||
% \usepackage{titlesec}
|
||||
\usepackage{float}
|
||||
\makeatletter
|
||||
\@addtoreset{chapter}{part}
|
||||
\makeatother
|
||||
\renewcommand{\thetable}{\arabic{table}}
|
||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||
\subtitle{Elegant\LaTeX{} 经典之作}
|
||||
\author{Ethan Deng \& Liam Huang}
|
||||
\institute{Elegant\LaTeX{} Program}
|
||||
\date{\today}
|
||||
\version{3.09}
|
||||
\extrainfo{Victory won\rq t come to us unless we go to it. --- M. Moore}
|
||||
\logo{logo.png}
|
||||
\cover{cover.jpg}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\tableofcontents
|
||||
\mainmatter
|
||||
\hypersetup{pageanchor=true}
|
||||
\part{1部分}
|
||||
\chapter{章1}
|
||||
\chapter{章2}
|
||||
\part{2部分}
|
||||
\chapter{章3}
|
||||
\chapter{章1}
|
||||
\end{document}
|
||||
@@ -1,4 +1,4 @@
|
||||
\documentclass[cn,11pt,twocol]{elegantbook}
|
||||
\documentclass[cn,11pt]{elegantbook}
|
||||
|
||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||
\subtitle{Elegant\LaTeX{} 经典之作}
|
||||
@@ -18,7 +18,7 @@
|
||||
\maketitle
|
||||
|
||||
\tableofcontents
|
||||
|
||||
% \thispagestyle{empty}
|
||||
|
||||
\mainmatter
|
||||
\hypersetup{pageanchor=true}
|
||||
@@ -431,6 +431,15 @@ The content of introduction.
|
||||
\item exercise 1
|
||||
\item exercise 2
|
||||
\item exercise 3
|
||||
\item 测试数学公式
|
||||
\begin{equation}
|
||||
a^2+b^2=c^2
|
||||
\end{equation}
|
||||
\item 测试插图
|
||||
\begin{figure}[htp]
|
||||
\centering
|
||||
\includegraphics[width=0.2\textwidth]{logo.png}
|
||||
\end{figure}
|
||||
\end{problemset}
|
||||
|
||||
\begin{remark}
|
||||
@@ -513,6 +522,7 @@ LaTeX Error:
|
||||
|
||||
|
||||
|
||||
|
||||
\chapter{ElegantBook 写作示例}
|
||||
|
||||
\begin{introduction}
|
||||
@@ -586,6 +596,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
\label{eq:461}
|
||||
\int_{\mathcal{R}^p\times\mathcal{R}^q} f(x,y) dxdy=\int_{\mathcal{R}^p}\left(\int_{\mathcal{R}^q}f(x,y)dy\right)dx.
|
||||
\end{equation}
|
||||
|
||||
(2)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的可积函数,则对几乎处处的 $x\in\mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的可积函数,并且 $g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的可积函数。而且~\ref{eq:461} 成立。
|
||||
\end{theorem}
|
||||
|
||||
|
||||
@@ -77,8 +77,6 @@
|
||||
\LoadClass[a4paper,oneside]{book}
|
||||
|
||||
\RequirePackage{indentfirst,comment}
|
||||
\setlength\parindent{2em}
|
||||
|
||||
% fontsetting
|
||||
\ifdefstring{\ELEGANT@math}{mtpro2}{
|
||||
\let\Bbbk\relax
|
||||
@@ -93,7 +91,10 @@
|
||||
|
||||
\RequirePackage{ifxetex}
|
||||
|
||||
|
||||
% \AtBeginDocument{%
|
||||
% \addtocontents{toc}{\protect\pagestyle{empty}}%
|
||||
% \addtocontents{lof}{\protect\thispagestyle{empty}}%
|
||||
% }
|
||||
|
||||
\RequirePackage{newtxtext}
|
||||
\RequirePackage{anyfontsize}
|
||||
@@ -254,6 +255,7 @@
|
||||
|
||||
%%中文结构名字
|
||||
\ifdefstring{\ELEGANT@lang}{cn}{
|
||||
\setlength\parindent{2\ccwd}
|
||||
\renewcommand{\contentsname}{目\hspace{2em}录}
|
||||
\renewcommand{\figurename}{图}
|
||||
\renewcommand{\tablename}{表}
|
||||
@@ -278,10 +280,11 @@
|
||||
}{\relax}
|
||||
}{\relax}
|
||||
\ifdefstring{\ELEGANT@lang}{en}{
|
||||
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
|
||||
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
|
||||
\renewcommand{\chaptername}{Chapter \thechapter}
|
||||
\bibliographystyle{aer}
|
||||
\setlength\parindent{2em}
|
||||
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
|
||||
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
|
||||
\renewcommand{\chaptername}{Chapter \thechapter}
|
||||
\bibliographystyle{aer}
|
||||
}{\relax}
|
||||
|
||||
\RequirePackage{xpatch}
|
||||
@@ -357,7 +360,7 @@
|
||||
\newcommand\email[1]{\href{mailto:#1}{\nolinkurl{#1}}}
|
||||
|
||||
%% 章节设置
|
||||
\RequirePackage[center,pagestyles]{titlesec}
|
||||
\RequirePackage[center]{titlesec}
|
||||
\RequirePackage{apptools}
|
||||
\RequirePackage[toc,page]{appendix}
|
||||
|
||||
@@ -369,8 +372,8 @@
|
||||
\titleformat{\section}[hang]{\bfseries}
|
||||
{\Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{\color{structurecolor}\Large\bfseries\filright}
|
||||
|
||||
\titleformat{\subsection}[hang]{\bfseries}
|
||||
{\large\bfseries\color{structurecolor}\thesubsection\enspace}{1pt}{\color{structurecolor}\large\bfseries\filright}
|
||||
\titleformat{\subsection}[hang]{\bfseries}{
|
||||
\large\bfseries\color{structurecolor}\thesubsection\enspace}{1pt}{\color{structurecolor}\large\bfseries\filright}
|
||||
|
||||
\titleformat{\subsubsection}[hang]{\bfseries}
|
||||
{\large\bfseries\color{structurecolor}\thesubsubsection\enspace}{1pt}{\color{structurecolor}\large\bfseries\filright}
|
||||
@@ -389,11 +392,16 @@
|
||||
|
||||
|
||||
\RequirePackage[many]{tcolorbox}
|
||||
|
||||
% \newlength{\normalparindent}
|
||||
% \setlength{\normalparindent}{\parindent}
|
||||
|
||||
\ifdefstring{\ELEGANT@mode}{fancy}{
|
||||
\tcbset{
|
||||
common/.style={
|
||||
fontupper=\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\upshape\kaishu},
|
||||
lower separated=false,
|
||||
% before upper={\setlength{\parindent}{\normalparindent}},
|
||||
coltitle=white,
|
||||
colback=gray!5,
|
||||
boxrule=0.5pt,
|
||||
|
||||
Reference in New Issue
Block a user