diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-27 20:11:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-27 20:11:12 +0000 |
commit | 864e85293737bb20a499ac03561d3d5c7f93e90e (patch) | |
tree | 3cd1c3c770e669b6d493e27df54dcdde34c7891d /Master/texmf-dist | |
parent | 9393761f01fe8a038520e100a9fbeb351c8c6824 (diff) |
beautybook (27jun23)
git-svn-id: svn://tug.org/texlive/trunk@67496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
10 files changed, 377 insertions, 219 deletions
diff --git a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.pdf b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.pdf Binary files differindex 5555dcddf77..9ca04761a90 100644 --- a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.pdf +++ b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.pdf diff --git a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.tex b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.tex index dc2e3d7af59..6c6fa3b7149 100644 --- a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.tex +++ b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-chinese.tex @@ -8,29 +8,6 @@ \mathstyle={ % 数学字体键值列表 math-font=plain, %plain (默认数学字体); mtpro2 } -\usepackage{rotating} -\tikzset{>=Stealth} -\setlist{nosep,font=\upshape} % 取消所有列表默认距离 -% 浮动环境设置 -% 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境, -% 而这通常不是我们想要的, 我们将这个要求降低到 5%. -\renewcommand*{\textfraction}{0.05} -% 有时如果多个浮动环境连续放在一起, -% 会将它们分在几个不同页,即使它们可在同一页放 -% 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮 -% 动环境的最大比例. -\renewcommand*{\topfraction}{0.9} -\renewcommand*{\bottomfraction}{0.8} -% 有时\LaTeX{}会把一个浮动环境单独放在一页, -% 我们要求这个环境至少要占据 85% 才能单独放在一页. -% 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|. -\renewcommand*{\floatpagefraction}{0.85} -% 关于图片 graphicx -% 如果图片没有指定后缀, 依次按下列顺序搜索 -\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} -% 设置图表搜索路径, 可以给图表文件夹取如下名字 -\graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}} -\usepackage{amsfonts} %% 定义第一种定理 \mynewtheorem{ defi={\textbf{定义}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, @@ -151,12 +128,12 @@ }, } \makeatother -\newenvironment{note}[1][\bf 笔记:]{\Line\uuline{#1} }{\Line} -\renewcommand{\Line}{\noindent\\\tikz\draw[line width=0.65pt,gray!80,dashed] (0,0)--++(.99\linewidth,0);\par} -\newenvironment{key}[1][]{\begin{fancybox}{#1}}{\end{fancybox}} -\newcommand{\Diff}[2][]{\frac{\partial #1}{\partial #2}} -\newcommand{\Dif}[2]{\frac{\dd #1}{\dd #2}} -\newcommand{\pr}{^\prime} +% \newenvironment{note}[1][\bf 笔记:]{\Line\uuline{#1} }{\Line} +% \renewcommand{\Line}{\noindent\\\tikz\draw[line width=0.65pt,gray!80,dashed] (0,0)--++(.99\linewidth,0);\par} +% \newenvironment{key}[1][]{\begin{fancybox}{#1}}{\end{fancybox}} +% \newcommand{\Diff}[2][]{\frac{\partial #1}{\partial #2}} +% \newcommand{\Dif}[2]{\frac{\dd #1}{\dd #2}} +% \newcommand{\pr}{^\prime} \usepackage{extarrows} \usetikzlibrary{tikzmark} % \arrowname{super-script} @@ -222,6 +199,8 @@ \colorlet{outermarginfgcolor}{fg} \colorlet{framegolden}{fg} \colorlet{framegray}{黛绿!5} +\chapoddimage{inner_pics/songodd.png} +\chapevenimage{inner_pics/songeven.png} % \thispagestyle{empty}\newpage % left blank % @@ -240,10 +219,6 @@ &2023年 01月 11日 \end{tabular} -\begin{center} - \vfill - \thepage -\end{center} \let\cleardoublepage\clearpage % \thispagestyle{empty} @@ -256,7 +231,7 @@ \part{\textbf{Beautybook} 模板使用说明} \chapter{Beautybook模板的简要介绍} -Beauty\LaTeX{} 系列模板是由我--一位名不见经传的小人物所做的书籍模板系列,说是系列其实就两个, 一个是致力于清新淡雅风格的自定义较少的书籍模板 \textbf{Fancybook} (这个已经永久停更, 原因是本人审美观问题,更钟爱"美人",见谅!), 另一个则是我主打的旗舰级产品----\textbf{Beautybook}! 关于为何起这么奇怪的名字? 我的答案是, 本来我是想起名elegantboook的,但是奈何已经有了大名鼎鼎的elegantbook系列, 所以鄙人只能退而求其次,命名为同样是美丽意思的名词与书籍相组合,古人云:书中自有颜如玉,这不, 美女配书籍,岂不美哉! 故而,这就是 \textbf{Beautybook} 的由来! +Beauty\LaTeX{} 系列模板是由我所做的书籍模板系列, 名叫\textbf{Beautybook}! 关于为何起这么奇怪的名字? 我的答案是, 本来我是想起名elegantboook的,但是奈何已经有了大名鼎鼎的elegantbook系列, 所以鄙人只能退而求其次,命名为同样是美丽意思的名词与书籍相组合,古人云:书中自有颜如玉,这不, 美女配书籍,岂不美哉! 故而,这就是 \textbf{Beautybook} 的由来! 本人致力于打造一系列美观、优雅、简便的模板以方便用户和我自己 (主要是服务于自己的,但是耐不住大伙的赏识,遂毛遂自荐一番,望谅解!) 使用。版本经常有所更迭,请关注版本信息,在未开始使用模板前,建议直接选择最新正式版本!最新测试版通常会发布在QQ群内,诸君可自取, 取完后是留是去随意. @@ -266,6 +241,7 @@ Beauty\LaTeX{} 系列模板是由我--一位名不见经传的小人物所做的 \item GitHub 地址:\href{https://github.com/BeautyLaTeX/latex-template}{https://github.com/BeautyLaTeX/latex-template} \item 下载地址:\href{https://github.com/BeautyLaTeX/latex-template/releases}{正式发行版} \item 用户 QQ 群:809237593 + \item 我的outlook邮箱:\href{https://h1479840692@outlook.com}{Outlook Email} \end{itemize} \textbf{This work is released under the LaTeX Project Public License, v1.3c or later.} @@ -274,72 +250,208 @@ Beauty\LaTeX{} 系列模板是由我--一位名不见经传的小人物所做的 你需要通过下载然后编译的方式使用本模板,仅有本地(文件夹内)使用一种方式。 \subsection{在线使用模板} -本模板可以直接上传到overleaf上使用,但需要注意的是, 需要注释掉 \textbf{mtpro2}宏包和使用xelatex引擎或者lualatex引擎编译! +本模板可以直接上传到overleaf上使用,但需要注意的是, 需要使用 math-font=plain 键值, 并使用XeLaTeX或者lualatex编译! \subsection{本地安装使用} -\textbf{本地安装}使用方法如下:从 GitHub 或者 QQ群下载最新版,严格意义上只需要类文件 \lstinline{cls}。然后将模板文件放在你的工作目录下并且同步复制这几个文件夹: fonts,stys,figures以及\lstinline{preface.tex},\lstinline{titlpage.tex}, 即可使用。这样使用的好处是,相比在线使用,可以通过自行安装mtpro2字体实现更加精美的效果,当然如何选择交给用户本身,此处不作评价. +\textbf{本地安装}使用方法如下:从 GitHub 或者 QQ群下载最新版, 然后将模板文件放在你的工作目录下并且同步复制这几个文件夹: \textit{chinesefonts}, \textit{fonts}, \textit{stys}, \textit{inner\_pics}, 即可使用。这样使用的好处是,相比在线使用,可以通过自行安装mtpro2字体实现更加精美的效果,当然如何选择交给用户本身,此处不作评价. 以下是最小工作示例: \begin{lstlisting} - \documentclass[zihao=-4,fontset=none]{Beautybook-V6.1-CN} % 不想用自定义字体,记得改为fontset=windows/mac/ubuntu,并注释掉stys/settings-CN.sty中最后面的中文字体设定相关内容!如果想学习使用第三方字体,也可以参考着自己配置! + \documentclass[zihao=-4,fontset=windows]{Beautybook-CN} \coverstyle={ % 封面键值列表 cover-choose=cn, % cn (需新增项\entitle{#}); en ; enfig ; birkar } \mathstyle={ % 数学字体键值列表 - math-font=mtpro2, %plain (默认数学字体); mtpro2 % !! 没安装mtpro2字体的不要使用该键值!! + math-font=plain, %plain (默认数学字体); mtpro2 } - \usepackage{stys/settings-CN} + \graphicspath{{E:/texlive/2023/texmf-dist/doc/latex/beautybook/}} % 这里改为您的texlive安装位置,记住 + %% 定义第一种定理 + \mynewtheorem{ + defi={\textbf{定义}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, + thm={\textbf{定理}}[section]{interior style={left color=CyaN!80!black!20,right color=CyaN!80!black!15!CyaN!50}, borderline west={1.5mm}{0mm}{CyaN!80!black}}, + lem={\textbf{引理}}[section]{interior style={left color=BluE!8,right color=BluE!5!CyaN!50}, borderline west={1.5mm}{0mm}{BluE}}, + prop={\textbf{命题}}[section]{interior style={left color=OrangE!8,right color=OrangE!5!CyaN!50}, borderline west={1.5mm}{0mm}{OrangE}}, + exam={\textbf{题}}[chapter]{interior style={left color=DarkGreen!8,right color=DarkGreen!5!CyaN!50}, borderline west={1.5mm}{0mm}{DarkGreen}}, + cor={\textbf{推论}}[chapter]{interior style={left color=violet!8,right color=violet!5!CyaN!50}, borderline west={1.5mm}{0mm}{violet}}, + } + \newtheorem*{remark}{\textbf{注}} + %% 定义第二种定理 + % overlay unbroken=\my@theorem@overlay@unbroken{\theorem@name\ \thetcbthm}{额外的选项} + % overlay first=\my@theorem@overlay@first{\theorem@name\ \thetcbthm}{额外的选项} + %% 用户接口区 + \definecolor{examback}{HTML}{e3e6e8} + \makeatletter + \mynewtcbtheorem{ + % 这个 theorem 是环境名 + theorem={ + counter=tcbthm, + the counter=\thesection.\arabic{tcbthm}, + name=定理, % 它保存到 \theorem@name 里 + thmcolor=高粱红, + autoref name=\bfseries 定理, + style={ + arc=3pt,breakable,enhanced,interior style={top color=高粱红!12 ,middle color=高粱红!9, bottom color=高粱红!6},boxrule=0pt,top=8mm, + fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 + fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 + opacityframe=0, opacityback=0.98, + fontupper=\itshape, step={tcbthm}, + before pre=\smallskip, after app=\smallskip, + overlay unbroken=\my@theorem@overlay@unbroken{\theorem@name\ \thetcbthm}{\theorem@thmcolor}, + overlay first=\my@theorem@overlay@first{\theorem@name\ \thetcbthm}{\theorem@thmcolor}, + overlay last=\my@theorem@overlay@last{\theorem@thmcolor}, + } + }, + proposition={ + counter=tcbprop, + the counter=\thesection.\arabic{tcbprop}, + autoref name=\bfseries 命题, + style={ + arc=3pt,breakable,enhanced,interior style={top color=高粱红!12 ,middle color=高粱红!9, bottom color=高粱红!6},boxrule=0pt,top=8mm, + fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 + fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 + opacityframe=0, opacityback=0.98, + fontupper=\itshape, step={tcbprop}, + before pre=\smallskip, after app=\smallskip, + overlay unbroken=\my@theorem@overlay@unbroken{命题\ \thetcbprop}{高粱红}, + overlay first=\my@theorem@overlay@first{命题\ \thetcbprop}{高粱红}, + overlay last=\my@theorem@overlay@last{高粱红}, + } + }, + definition={ + counter=tcbdefi, + the counter=\thesection.\arabic{tcbdefi}, + autoref name=\bfseries 定义, + style={ + arc=3pt,breakable,enhanced,interior style={top color=紫棠!12 ,middle color=紫棠!9, bottom color=紫棠!6},boxrule=0pt,top=8mm, + fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 + fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 + opacityframe=0, opacityback=0.98, + fontupper=\itshape, step={tcbdefi}, + before pre=\smallskip, after app=\smallskip, + overlay unbroken=\my@theorem@overlay@unbroken{定义\ \thetcbdefi}{紫棠}, + overlay first=\my@theorem@overlay@first{定义\ \thetcbdefi}{紫棠}, + overlay last=\my@theorem@overlay@last{紫棠}, + } + }, + lemma={ + counter=tcblem, + the counter=\thesection.\arabic{tcblem}, + name=引理, + lemcolor=靛蓝, + autoref name=\bfseries 引理, + style={ + arc=0mm,breakable,enhanced,interior style={top color=靛蓝!12 ,middle color=靛蓝!9, bottom color=靛蓝!6},arc=3pt,boxrule=0pt,top=7mm,bottom=5mm, + fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 + fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 + opacityframe=0, opacityback=0.98, + fontupper=\normalsize,step={tcblem}, + before pre=\smallskip, after app=\smallskip, + overlay unbroken=\my@lemma@overlay@unbroken{\lemma@name\ \thetcblem}{\lemma@lemcolor}, + overlay first=\my@lemma@overlay@first{\lemma@name\ \thetcblem}{\lemma@lemcolor}, + overlay last=\my@lemma@overlay@last{\lemma@lemcolor}, + } + }, + corollary={ + counter=tcbcor, + the counter=\thesection.\arabic{tcbcor}, + autoref name=\bfseries 推论, + style={ + arc=0mm,breakable,enhanced,interior style={top color=茶色!12 ,middle color=茶色!9, bottom color=茶色!6},arc=3pt,boxrule=0pt,top=7mm,bottom=5mm, + fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 + fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 + opacityframe=0, opacityback=0.98, + fontupper=\normalsize,step={tcbcor}, + before pre=\smallskip, after app=\smallskip, + overlay unbroken=\my@lemma@overlay@unbroken{推论\ \thetcbcor}{茶色}, + overlay first=\my@lemma@overlay@first{推论\ \thetcbcor}{茶色}, + overlay last=\my@lemma@overlay@last{茶色}, + } + }, + example={ + counter=tcbexam, + the counter=\thesection.\arabic{tcbexam}, + autoref name=\bfseries 例题, + style={ + arc=0mm,breakable,enhanced,interior style={top color=黛绿!12 ,middle color=黛绿!9, bottom color=黛绿!6},arc=3pt,boxrule=0pt,top=7mm,bottom=5mm, + fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 + fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 + opacityframe=0, opacityback=0.98, + fontupper=\normalsize,step={tcbexam}, + before pre=\smallskip, after app=\smallskip, + overlay unbroken=\my@lemma@overlay@unbroken{例题\ \thetcbexam}{黛绿}, + overlay first=\my@lemma@overlay@first{例题\ \thetcbexam}{黛绿}, + overlay last=\my@lemma@overlay@last{黛绿}, + } + }, + } + \makeatother \begin{document} \thispagestyle{empty} - \entitle{entitle,only when you use cncover} % cncover专用 - \title{Title here} - \subtitle{XX} + \entitle{The introduction to Beautybook Template} % cncover专用 + \title{Beautybook 说明文档} + \subtitle{Beautybook 说明文档} \edition{First Edition} - \bookseries{Series} - \author{your name here} - \pressname{press name} - \presslogo{inner_pics/Springer-logo.png} + \bookseries{Illustrated by Ethan Lu} + \author{Ethan Lu} + \pressname{logo} + \presslogo{inner_pics/logo.png} \coverimage{inner_pics/coverimage.jpg} % cncover专用 %\coverimage{inner_pics/ivy-ge998908f8_1280.jpg} \makecover % 封面生成命令 - + % 主题色调 \definecolor{bg}{HTML}{e0e0e0} \definecolor{fg}{HTML}{203A43} \colorlet{outermarginbgcolor}{bg} \colorlet{outermarginfgcolor}{fg} \colorlet{framegolden}{fg} - \colorlet{framegray}{高粱红!15} + \colorlet{framegray}{黛绿!5} + \chapoddimage{inner_pics/songodd.png} + \chapevenimage{inner_pics/songeven.png} % - \input{frontmatter/titlepage-cn} % 内封面页 + \thispagestyle{empty}\newpage % left blank % \frontmatter % 前置材料 \pagenumbering{Roman} - \input{frontmatter/preface-cn} % 前言 + % preface + \thispagestyle{empty} + \addcontentsline{toc}{chapter}{前言} + \chapter*{前言} + 怀着复杂的心情写下了这本不算是笔记的笔记,大差不离就是抄写本吧! + + + \hfill + \begin{tabular}{lr} + &----- 作者\\ + &2023年 01月 11日 + \end{tabular} + + \let\cleardoublepage\clearpage + % \thispagestyle{empty} \tableofcontents\let\cleardoublepage\clearpage % 目录 - + \mainmatter % 正文 - \pagenumbering{arabic} % 阿拉伯数字页码 - \partimage{inner_pics/part.png} % part图片,必须有,只需要写一次即可,后续只需要写简介和标题 - \partabstract{\hspace{2em} XX} % Part简介,没有可以不写 - \part{XX} - % \input{XX} - \backmatter - \appendix % 附录章节 - % + \pagenumbering{arabic} + \partimage{inner_pics/part.png} + \partabstract{\hspace*{2em} \textbf{Beautybook} 模板的使用说明,这里是每一个部分 (Part) 的简介区域, 您可以在此处书写下您对该部分的一个简明扼要的概述, 当然,倘若无话可说,此处可以留空.} + \part{\textbf{Beautybook} 模板使用说明} + + \chapter{Beautybook模板的简要介绍} - \normalem + + {\normalem \printbibliography[ heading=bibintoc, title={参考文献} ] \printindex - \thispagestyle{empty} + \thispagestyle{empty}} + %------------ 封底 ----------------% \bottomimage{inner_pics/ivy-ge998908f8_1280.jpg} - \ISBNcode{\EANisbn[ISBN=您的书对应的ISBN号]} % + %\ISBNcode{\EANisbn[ISBN=您的书对应的ISBN号]} % \summary{封底信息} \makebottomcover \end{document} @@ -374,10 +486,10 @@ tlmgr update --self --all --reinstall-forcibly-removed 本模板英文版基于基础的 book 文类, 中文版则基于ctexbook文类,所以 book或者ctexbook 的选项对于本模板也是有效的。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。 \section{语言模式} -本模板内含两套基础语言环境, 分别为 中文的\lstinline{Beautybook-V6.1.cls}、英文的\lstinline{Beautybook-V6.1-EN.cls}。改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: +本模板内含两套基础语言环境, 分别为 中文的\lstinline{Beautybook-CN.cls}、英文的\lstinline{Beautybook-EN.cls}。改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: \begin{lstlisting} -\documentclass{Beautybook-V6.1-CN} % 中文 -\documentclass{Beautybook-V6.1-EN} % 英文 +\documentclass{Beautybook-CN} % 中文 +\documentclass{Beautybook-EN} % 英文 \end{lstlisting} 除模板自带的两套语言设定之外,如果您需要使用其他语言, 可以通过更改cls文件中这几处解决, 分别为 @@ -386,7 +498,7 @@ tlmgr update --self --all --reinstall-forcibly-removed \item 更改 part环境的名称 \lstinline{Part \thepart}为 \lstinline{(你的语言中part的翻译) \thepart} \item 主文件,即当前文件导言区中的定理引导词 \item 更改chapter环境中的part名称如第一条所示 - \item 记住, 仅有亚洲语言环境可以使用ctexbook文类, 即基于\lstinline{Beautybook-V6.1.cls}更改, 其他西语环境需要基于\lstinline{Beautybook-V6.1-EN.cls}更改. + \item 记住, 仅有亚洲语言环境可以使用ctexbook文类, 即基于\lstinline{Beautybook-CN.cls}更改, 其他西语环境需要基于\lstinline{Beautybook-EN.cls}更改. \end{enumerate} @@ -683,21 +795,16 @@ sorting=nty 本模板使用的是mtpro2字体,需要用户自行安装,安装教程见\href{https://www.latexstudio.net/archives/51742.html}{mtpro2字体安装教程}。当然也可以删除本文件导言区的mtpro2字体换回默认数学字体,诸君随意。 -\appendix % 附录章节 -% -\chapter{封面效果展示} -\section{封面cn如本文件所示} -\section{其他封面见文件夹内附件} - -\normalem +{\normalem \printbibliography[ heading=bibintoc, title={参考文献} ] \printindex -\thispagestyle{empty} +\thispagestyle{empty}} +%-------------------封底 ---------------% \bottomimage{inner_pics/ivy-ge998908f8_1280.jpg} \ISBNcode{\EANisbn[ISBN=978-80-7340-097-2]} % -\summary{本书是复分析学的结课期考复习资料总结,主要包括了考试的证明题型以及各类的识记知识点,如黎曼映射定理、广义Schwarz引理等等.本书由本人期末写成, 仅用于复习. 本书是复分析学的结课期考复习资料总结,主要包括了考试的证明题型以及各类的识记知识点,如黎曼映射定理、广义Schwarz引理等等.本书由本人期末写成, 仅用于复习. 本书是复分析学的结课期考复习资料总结,主要包括了考试的证明题型以及各类的识记知识点,如黎曼映射定理、广义Schwarz引理等等.本书由本人期末写成, 仅用于复习.} +\summary{封底信息.} \makebottomcover \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.pdf b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.pdf Binary files differindex 3d159d085d8..70f45601b57 100644 --- a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.pdf +++ b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.pdf diff --git a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.tex b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.tex index 65367f3a78b..3cead1ad388 100644 --- a/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.tex +++ b/Master/texmf-dist/doc/latex/beautybook/Beautybook-introduction-english.tex @@ -8,16 +8,7 @@ \mathstyle={ math-font=plain, % plain; mtpro2 } -\usepackage{rotating} -\tikzset{>=Stealth} -\setlist{nosep,font=\upshape} -\renewcommand*{\textfraction}{0.05} -\renewcommand*{\topfraction}{0.9} -\renewcommand*{\bottomfraction}{0.8} -\renewcommand*{\floatpagefraction}{0.85} -\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} -\graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}} -\usepackage{amsfonts} +% \mynewtheorem{ defi={\textbf{Definition}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, thm={\textbf{Theorem}}[section]{interior style={left color=CyaN!80!black!20,right color=CyaN!80!black!15!CyaN!50}, borderline west={1.5mm}{0mm}{CyaN!80!black}}, @@ -148,13 +139,13 @@ } \makeatother % -\newenvironment{note}[1][\bf Note:]{\par\Line\uuline{#1} }{\par\Line} -\renewcommand{\Line}{\noindent\tikz\draw[line width=0.65pt,gray!80,dashed] (0,0)--++(.99\linewidth,0);\par} -% \newcommand{\Wedge}[1][]{\tikz\path [draw,line width=1pt] (0,0)--++(4pt,12pt) node[right,font=\scriptsize] {#1} --++(4pt,-12pt);} -\newenvironment{key}[1]{\begin{fancybox}{#1}\ }{\end{fancybox}} -\newcommand{\pr}{^\prime} -\newcommand{\prr}{^{\prime\prime}} -\newcommand{\itbf}[1]{\textit{\textbf{#1}}} +% \newenvironment{note}[1][\bf Note:]{\par\Line\uuline{#1} }{\par\Line} +% \renewcommand{\Line}{\noindent\tikz\draw[line width=0.65pt,gray!80,dashed] (0,0)--++(.99\linewidth,0);\par} +% % \newcommand{\Wedge}[1][]{\tikz\path [draw,line width=1pt] (0,0)--++(4pt,12pt) node[right,font=\scriptsize] {#1} --++(4pt,-12pt);} +% \newenvironment{key}[1]{\begin{fancybox}{#1}\ }{\end{fancybox}} +% \newcommand{\pr}{^\prime} +% \newcommand{\prr}{^{\prime\prime}} +% \newcommand{\itbf}[1]{\textit{\textbf{#1}}} \usepackage{listings} \lstset{ basicstyle=\small\ttfamily, @@ -192,7 +183,9 @@ texcl=true, fontadjust }% + \begin{document} +%------------ Cover ----------------% \thispagestyle{empty} \title{An Introduction to Beautybook template} \subtitle{} @@ -203,13 +196,15 @@ \presslogo{inner_pics/logo.png} \coverimage{inner_pics/ivy-ge998908f8_1280.jpg} \makecover - +% Theme color \definecolor{bg}{HTML}{e0e0e0} \definecolor{fg}{HTML}{203A43} \colorlet{outermarginbgcolor}{bg} \colorlet{outermarginfgcolor}{fg} \colorlet{framegolden}{fg} \colorlet{framegray}{bg!50} +\chapoddimage{inner_pics/songodd.png} +\chapevenimage{inner_pics/songeven.png} % \thispagestyle{empty}\newpage % left blank \frontmatter @@ -226,10 +221,6 @@ As my first english book, i'm happy. &2023-01-11 \end{tabular} -\begin{center} - \vfill - \thepage -\end{center} \let\cleardoublepage\clearpage % \thispagestyle{empty} @@ -277,22 +268,16 @@ To install locally, follow these steps: download the latest version from GitHub, The following is an example of a minimal work: \begin{lstlisting} - \documentclass[zihao=-4,fontset=none]{Beautybook-CN} %If english, change it to Beautybook-EN%Instead of using a custom font, change it to fontset = Windows/Mac/Ubuntu and comment out stys/Settings-CN. Chinese font settings at the end of this sty! If you want to learn to use third-party fonts, you can also refer to their own configuration! - \coverstyle={ % List of covers key values - cover-choose=cn, % cn (A new entry is required \entitle{#}); en ; enfig ; birkar + \documentclass{Beautybook-EN} + \coverstyle={ + cover-choose=en, % cn (Need \entitle{#}); en ; enfig ; birkar } - \mathstyle={ % List of math fonts key values - math-font=mtpro2, %plain (Default mathematical font); mtpro2 % !! Do not use the key value if the mtpro2 font isn't installed! + \mathstyle={ + math-font=plain, % plain; mtpro2 } - % Some commands to control the layout of floating elements. - \renewcommand*{\textfraction}{0.05} - \renewcommand*{\topfraction}{0.9} - \renewcommand*{\bottomfraction}{0.8} - \renewcommand*{\floatpagefraction}{0.85} - \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} - \graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}} - %=======================Theorem Setting Area===============================% - \mynewtheorem{ % The amsthm package offers theorem environments, and a tcolorbox is utilized on the exterior. % +\graphicspath{{E:/texlive/2023/texmf-dist/doc/latex/beautybook/}} % You must change it to your texlive installation address!! +% + \mynewtheorem{ defi={\textbf{Definition}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, thm={\textbf{Theorem}}[section]{interior style={left color=CyaN!80!black!20,right color=CyaN!80!black!15!CyaN!50}, borderline west={1.5mm}{0mm}{CyaN!80!black}}, lem={\textbf{Lemma}}[section]{interior style={left color=BluE!8,right color=BluE!5!CyaN!50}, borderline west={1.5mm}{0mm}{BluE}}, @@ -301,10 +286,9 @@ The following is an example of a minimal work: cor={\textbf{Corollary}}[chapter]{interior style={left color=violet!8,right color=violet!5!CyaN!50}, borderline west={1.5mm}{0mm}{violet}}, } \newtheorem*{remark}{\textbf{Remark}} - % Two exquisite theorem boxes crafted by the author! \makeatletter \mynewtcbtheorem{ - theorem={ % Christmas gift box style + theorem={ counter=tcbthm, the counter=\thesection.\arabic{tcbthm}, name=Theorem, @@ -322,7 +306,7 @@ The following is an example of a minimal work: overlay last=\my@theorem@overlay@last, } }, - proposition={ % same as above. + proposition={ counter=tcbprop, the counter=\thesection.\arabic{tcbprop}, autoref name=\bfseries Proposition, @@ -354,8 +338,7 @@ The following is an example of a minimal work: overlay last=\my@theorem@overlay@last{blue}, } }, - % Another box style. - lemma={ % Silk ribbon style. + lemma={ counter=tcblem, the counter=\thesection.\arabic{tcblem}, name=Lemma, @@ -373,7 +356,7 @@ The following is an example of a minimal work: overlay last=\my@lemma@overlay@last{\lemma@lemcolor}, } }, - corollary={ % same as above. + corollary={ counter=tcbcor, the counter=\thesection.\arabic{tcbcor}, autoref name=\bfseries Corollary, @@ -424,79 +407,75 @@ The following is an example of a minimal work: } \makeatother % - \begin{document} - \thispagestyle{empty} - %\entitle{entitle,only when you use cncover} % Use only in "cn". - \title{Title here} - \subtitle{Subtitle here} - \edition{First Edition} - \bookseries{Series here} - \author{your name here} - \pressname{press name} - \presslogo{inner_pics/logo.png} - %\coverimage{inner_pics/coverimage.jpg} % Use only in "cn". - \coverimage{inner_pics/ivy-ge998908f8_1280.jpg} - \makecover % - % Theme color - \definecolor{bg}{HTML}{e0e0e0} - \definecolor{fg}{HTML}{203A43} - \colorlet{outermarginbgcolor}{bg} - \colorlet{outermarginfgcolor}{fg} - \colorlet{framegolden}{fg} - \colorlet{framegray}{red!15} - % - %\input{frontmatter/titlepage-cn} % Titlepage % If you are download from CTAN, it is no use. - % - \frontmatter - \pagenumbering{Roman} - %\input{frontmatter/preface-cn} % preface % If you are download from CTAN, it is no use. - % preface - \thispagestyle{empty} - \addcontentsline{toc}{chapter}{Preface} - \chapter*{Preface} - As my first english book, i'm happy. - - \hfill - \begin{tabular}{lr} - &----- Ethan Lu\\ - &2023-01-11 - \end{tabular} - - \begin{center} - \vfill - \thepage - \end{center} - \let\cleardoublepage\clearpage - % - \thispagestyle{empty} - \tableofcontents\let\cleardoublepage\clearpage - - \mainmatter - \pagenumbering{arabic} - \partimage{inner_pics/part.png} % Part Pictures is needed, which is only need to write once. - \partabstract{\hspace{2em} Part introduction.} % If you don't want to write, it can be left blank. - \part{Part title} - % \input{<filename>} +\begin{document} +%------------ Cover ----------------% +\thispagestyle{empty} +\title{An Introduction to Beautybook template} +\subtitle{} +\edition{First Edition} +\bookseries{Illustrated by Ethan Lu} +\author{Ethan Lu} +\pressname{logo} +\presslogo{inner_pics/logo.png} +\coverimage{inner_pics/ivy-ge998908f8_1280.jpg} +\makecover +% Theme color +\definecolor{bg}{HTML}{e0e0e0} +\definecolor{fg}{HTML}{203A43} +\colorlet{outermarginbgcolor}{bg} +\colorlet{outermarginfgcolor}{fg} +\colorlet{framegolden}{fg} +\colorlet{framegray}{bg!50} +\chapoddimage{inner_pics/songodd.png} +\chapevenimage{inner_pics/songeven.png} +% +\thispagestyle{empty}\newpage % left blank +\frontmatter +\pagenumbering{Roman} +% preface +\thispagestyle{empty} +\addcontentsline{toc}{chapter}{Preface} +\chapter*{Preface} +As my first english book, i'm happy. +\hfill +\begin{tabular}{lr} + &----- Ethan Lu\\ + &2023-01-11 +\end{tabular} +\begin{center} + \vfill + \thepage +\end{center} +\let\cleardoublepage\clearpage +% +\thispagestyle{empty} +\tableofcontents\let\cleardoublepage\clearpage - \appendix % Appendix here - % - - - \normalem % It is needed in XeLaTeX! - \printbibliography[ - heading=bibintoc, - title={Reference} - ] - \printindex - \thispagestyle{empty} - \bottomimage{inner_pics/ivy-ge998908f8_1280.jpg} - \ISBNcode{\EANisbn[ISBN=ISBN Number here]} % It can be left blank or just delete it! - \summary{Bottom Information} - \makebottomcover - \end{document} + +\mainmatter +\pagenumbering{arabic} + +\partimage{inner_pics/part.png} +\partabstract{\hspace*{2em} Here is the introduction area of each part, where you can write a concise overview of the part, of course, if there is nothing to say, you can leave it blank.} +\part{part title} +\chapter{chap title} +% your main contents here! + +{\printbibliography[ +heading=bibintoc, +title={References} +] +\printindex +\thispagestyle{empty}} +%--------- Bottom page -------% +\bottomimage{inner_pics/ivy-ge998908f8_1280.jpg} +\ISBNcode{\EANisbn[ISBN=978-80-7340-097-2]} %If no use, delete this line! +\summary{This is the area of the bottom information!} +\makebottomcover +\end{document} \end{lstlisting} \subsection{Release installation and updates} @@ -847,13 +826,12 @@ This template uses ctexbook class, so the fontset is consistent with it. The def -\normalem -\printbibliography[ +{\printbibliography[ heading=bibintoc, title={References} ] \printindex -\thispagestyle{empty} +\thispagestyle{empty}} \bottomimage{inner_pics/ivy-ge998908f8_1280.jpg} \ISBNcode{\EANisbn[ISBN=978-80-7340-097-2]} % \summary{This is the area of the bottom information!} diff --git a/Master/texmf-dist/doc/latex/beautybook/README.md b/Master/texmf-dist/doc/latex/beautybook/README.md index d610d61877d..212f066dc60 100644 --- a/Master/texmf-dist/doc/latex/beautybook/README.md +++ b/Master/texmf-dist/doc/latex/beautybook/README.md @@ -1,7 +1,7 @@ <!-- Author : Ethan Lu--> <!-- Program Email: h1479840692@outlook.com --> - | [Github](https://github.com/BeautyLaTeX/latex-template) | + | [Github](https://github.com/BeautyLaTeX/latex-template) | [Email](https://h1479840692@outlook.com)| ------- @@ -14,10 +14,12 @@ Beautybook is designed for writing books, created by [Ethan Lu](https://github.c If you are an English user, then please use a cls file with the "-EN" suffix and compile the english tex file with pdfLaTeX, and conversely, if you are a Chinese user, then remember, use a cls file with the "-CN" suffix and compile the chinese tex file with the XeLaTeX engine! +--- ## Version -Release 2023-06-17. +Release 2023-06-27. +--- ## License This work is released under the LaTeX Project Public License, v1.3c or later. diff --git a/Master/texmf-dist/doc/latex/beautybook/inner_pics/flower.png b/Master/texmf-dist/doc/latex/beautybook/inner_pics/flower.png Binary files differdeleted file mode 100644 index 92675d0a56b..00000000000 --- a/Master/texmf-dist/doc/latex/beautybook/inner_pics/flower.png +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/beautybook/inner_pics/song.png b/Master/texmf-dist/doc/latex/beautybook/inner_pics/songeven.png Binary files differindex b9a46ab0d78..b9a46ab0d78 100644 --- a/Master/texmf-dist/doc/latex/beautybook/inner_pics/song.png +++ b/Master/texmf-dist/doc/latex/beautybook/inner_pics/songeven.png diff --git a/Master/texmf-dist/doc/latex/beautybook/inner_pics/song2.png b/Master/texmf-dist/doc/latex/beautybook/inner_pics/songodd.png Binary files differindex a3a1129384f..a3a1129384f 100644 --- a/Master/texmf-dist/doc/latex/beautybook/inner_pics/song2.png +++ b/Master/texmf-dist/doc/latex/beautybook/inner_pics/songodd.png diff --git a/Master/texmf-dist/tex/latex/beautybook/Beautybook-CN.cls b/Master/texmf-dist/tex/latex/beautybook/Beautybook-CN.cls index 22bdb8248cc..9bc0666170d 100644 --- a/Master/texmf-dist/tex/latex/beautybook/Beautybook-CN.cls +++ b/Master/texmf-dist/tex/latex/beautybook/Beautybook-CN.cls @@ -78,6 +78,28 @@ % \usepackage{stys/Beautybook-bottompage} % 封底 % +\usepackage{rotating} +\tikzset{>=Stealth} +\setlist{nosep,font=\upshape} % 取消所有列表默认距离 +% 浮动环境设置 +% 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境, +% 而这通常不是我们想要的, 我们将这个要求降低到 5%. +\renewcommand*{\textfraction}{0.05} +% 有时如果多个浮动环境连续放在一起, +% 会将它们分在几个不同页,即使它们可在同一页放 +% 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮 +% 动环境的最大比例. +\renewcommand*{\topfraction}{0.9} +\renewcommand*{\bottomfraction}{0.8} +% 有时\LaTeX{}会把一个浮动环境单独放在一页, +% 我们要求这个环境至少要占据 85% 才能单独放在一页. +% 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|. +\renewcommand*{\floatpagefraction}{0.85} +% 关于图片 graphicx +% 如果图片没有指定后缀, 依次按下列顺序搜索 +\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} +% 设置图表搜索路径, 可以给图表文件夹取如下名字 +\graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}} \usepackage{amssymb,amsfonts} \usepackage{makeidx} \usepackage{etoolbox} % 判断函数 @@ -112,6 +134,8 @@ citecolor = purple, %%修改此处为你想要的颜色 \newcommand\presslogo[1]{\def\@presslogo{#1}} \newcommand\pressname[1]{\def\@pressname{#1}} \newcommand\coverimage[1]{\def\@coverimage{#1}} +\newcommand\chapoddimage[1]{\def\@chapoddimage{#1}} +\newcommand\chapevenimage[1]{\def\@chapevenimage{#1}} %%----------------------------------封面信息定义--------------------------------------------------------%% \makeatother \usepackage{indentfirst} @@ -216,6 +240,7 @@ citecolor = purple, %%修改此处为你想要的颜色 \everymath{\displaystyle} %% -------- 章节样式 +\makeatletter \titleformat{\chapter}{\huge\bfseries\filcenter}{}{1em}{ \makebox[0pt][l]{\def\rad{7pt}% \begin{tikzpicture}[remember picture, overlay]% @@ -239,7 +264,7 @@ citecolor = purple, %%修改此处为你想要的颜色 \node[above left,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north east) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; \end{pgfonlayer} \begin{pgfonlayer}{bottom} - \node[right] (image) at ([shift={(-0.5cm,-2.8cm)}]current page.north west) {\includegraphics[width=7cm]{inner_pics/song2.png}}; + \node[right] (image) at ([shift={(-0.5cm,-2.8cm)}]current page.north west) {\includegraphics[width=7cm]{\@chapoddimage}}; \end{pgfonlayer} \node[above left,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(-5mm,5mm)}]current page.south east) {\thepage}; \else @@ -252,7 +277,7 @@ citecolor = purple, %%修改此处为你想要的颜色 \node[above right,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north west) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; \end{pgfonlayer} \begin{pgfonlayer}{background} - \node[left] (image) at ([shift={(0.5cm,-2.8cm)}]current page.north east) {\includegraphics[width=7cm]{inner_pics/song.png}}; + \node[left] (image) at ([shift={(0.5cm,-2.8cm)}]current page.north east) {\includegraphics[width=7cm]{\@chapevenimage}}; \end{pgfonlayer} \node[above right,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(5mm,5mm)}]current page.south west) {\thepage}; \fi @@ -261,18 +286,35 @@ citecolor = purple, %%修改此处为你想要的颜色 \end{tikzpicture}} } \titleformat{name=\chapter,numberless}{\bfseries\huge\filcenter}{}{1em}{ - \begin{tikzpicture}[remember picture, overlay]% + \makebox[0pt][l]{\def\rad{7pt}% + \begin{tikzpicture}[remember picture, overlay]% \begin{pgfonlayer}{bottom} - \shade[left color=outermarginbgcolor!10,middle color=outermarginbgcolor!50,right color=outermarginfgcolor!20] (current page.north west) rectangle ++(\paperwidth,-.2\paperheight); - \fill[outermarginfgcolor,opacity=.5]([shift={(0,-4.25cm)}]current page.north west) rectangle ++(\paperwidth,-2mm); + \shade[left color=outermarginbgcolor!20,middle color=outermarginbgcolor!50,right color=outermarginfgcolor!20] (current page.north west) rectangle ++(\paperwidth,-.2\paperheight); % background + \fill[outermarginfgcolor,opacity=.5]([shift={(0,-4.45cm)}]current page.north west) rectangle ++(\paperwidth,-2mm); % line \end{pgfonlayer} - \node[left,font=\huge\bfseries] (contents name) at ([shift={(0cm,-3cm)}]current page.north east) {\begin{varwidth}{.9\linewidth}\baselineskip=2.6ex #1\end{varwidth}}; - \begin{pgfonlayer}{background} - \node[right] (image) at ([shift={(0,-2.2cm)}]current page.north west) {\includegraphics[width=3cm,angle =45]{inner_pics/flower.png}}; + \ifodd\value{page} + \begin{pgfonlayer}{top} + \node[above left,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north east) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; + \end{pgfonlayer} + \begin{pgfonlayer}{bottom} + \node[right] (image) at ([shift={(-0.5cm,-2.8cm)}]current page.north west) {\includegraphics[width=7cm]{\@chapoddimage}}; \end{pgfonlayer} - \end{tikzpicture} + \node[above left,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(-5mm,5mm)}]current page.south east) {\thepage}; + \else + \begin{pgfonlayer}{top} + \node[above right,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north west) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; + \end{pgfonlayer} + \begin{pgfonlayer}{background} + \node[left] (image) at ([shift={(0.5cm,-2.8cm)}]current page.north east) {\includegraphics[width=7cm]{\@chapevenimage}}; + \end{pgfonlayer} + \node[above right,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(5mm,5mm)}]current page.south west) {\thepage}; + \fi + \fill[outermarginfgcolor,rounded corners=2pt] + (current page.south west) -- ++(1.5mm,1.5mm) --++(\paperwidth-3mm,0mm)--++(1.5mm,-1.5mm)--cycle; + \end{tikzpicture}} } \titlespacing{\chapter}{0pt}{0pt}{65pt} +\makeatother % -------- Part定制 \makeatletter \newcommand\partabstract[1]{\def\@partabstract{#1}} diff --git a/Master/texmf-dist/tex/latex/beautybook/Beautybook-EN.cls b/Master/texmf-dist/tex/latex/beautybook/Beautybook-EN.cls index 5f2652d7533..2ecb36b4888 100644 --- a/Master/texmf-dist/tex/latex/beautybook/Beautybook-EN.cls +++ b/Master/texmf-dist/tex/latex/beautybook/Beautybook-EN.cls @@ -76,6 +76,15 @@ % \RequirePackage{stys/Beautybook-bottompage} % +\usepackage{rotating} +\tikzset{>=Stealth} +\setlist{nosep,font=\upshape} +\renewcommand*{\textfraction}{0.05} +\renewcommand*{\topfraction}{0.9} +\renewcommand*{\bottomfraction}{0.8} +\renewcommand*{\floatpagefraction}{0.85} +\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} +\graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}} \RequirePackage{amssymb,amsfonts} \RequirePackage{makeidx} \RequirePackage{etoolbox} @@ -108,6 +117,8 @@ citecolor = purple, \newcommand\presslogo[1]{\def\@presslogo{#1}} \newcommand\pressname[1]{\def\@pressname{#1}} \newcommand\coverimage[1]{\def\@coverimage{#1}} +\newcommand\chapoddimage[1]{\def\@chapoddimage{#1}} +\newcommand\chapevenimage[1]{\def\@chapevenimage{#1}} \makeatother \RequirePackage{indentfirst} \RequirePackage{physics} @@ -211,6 +222,7 @@ citecolor = purple, % \everymath{\displaystyle} %% -------- 章节样式 +\makeatletter \titleformat{\chapter}{\huge\bfseries\filcenter}{}{1em}{ \makebox[0pt][l]{\def\rad{7pt}% \begin{tikzpicture}[remember picture, overlay]% @@ -231,23 +243,23 @@ citecolor = purple, % ([yshift=2cm]chapnum.north west) rectangle (chapnum.south east); \fill [outermarginfgcolor,path fading=fade up,rounded corners=5pt]% ([yshift=2cm]chapnum.north west) rectangle (chapnum.south east); - \node[above left,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north east) {\begin{varwidth}{.7\linewidth}\baselineskip=2.3ex #1\end{varwidth}}; + \node[above left,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north east) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; \end{pgfonlayer} \begin{pgfonlayer}{bottom} - \node[right] (image) at ([shift={(-0.5cm,-2.8cm)}]current page.north west) {\includegraphics[width=7cm]{inner_pics/song2.png}}; + \node[right] (image) at ([shift={(-0.5cm,-2.8cm)}]current page.north west) {\includegraphics[width=7cm]{\@chapoddimage}}; \end{pgfonlayer} \node[above left,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(-5mm,5mm)}]current page.south east) {\thepage}; \else - \begin{pgfonlayer}{top} - \fill[outermarginfgcolor,opacity=0.8,rounded corners=5pt]node[append after command={([yshift=2cm]chapnum.north west) rectangle (chapnum.south east)},left,text=white,minimum width=2cm,align=center,font=\bf] (chapnum) at ([shift={(-2.0cm,-2.5cm)}]current page.north east) {\scalebox{3}{\thechapter}}; - % \pattern[pattern=sixpointed stars,pattern color=outermarginfgcolor!50,opacity=0.8] - % ([yshift=2cm]chapnum.north west) rectangle (chapnum.south east); - \fill [outermarginfgcolor,path fading=fade up,rounded corners=5pt]% - ([yshift=2cm]chapnum.north west) rectangle (chapnum.south east); - \node[above right,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north west) {\begin{varwidth}{.7\linewidth}\baselineskip=2.3ex #1\end{varwidth}}; - \end{pgfonlayer} - \begin{pgfonlayer}{bottom} - \node[left] (image) at ([shift={(0.5cm,-2.8cm)}]current page.north east) {\includegraphics[width=7cm]{inner_pics/song.png}}; + \begin{pgfonlayer}{top} + \fill[outermarginfgcolor,opacity=0.8,rounded corners=5pt]node[append after command={([yshift=2cm]chapnum.north west) rectangle (chapnum.south east)},left,text=white,minimum width=2cm,align=center,font=\bf] (chapnum) at ([shift={(-2.0cm,-2.5cm)}]current page.north east) {\scalebox{3}{\thechapter}}; + % \pattern[pattern=sixpointed stars,pattern color=outermarginfgcolor!50,opacity=0.8] + % ([yshift=2cm]chapnum.north west) rectangle (chapnum.south east); + \fill [outermarginfgcolor,path fading=fade up,rounded corners=5pt]% + ([yshift=2cm]chapnum.north west) rectangle (chapnum.south east); + \node[above right,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north west) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; + \end{pgfonlayer} + \begin{pgfonlayer}{background} + \node[left] (image) at ([shift={(0.5cm,-2.8cm)}]current page.north east) {\includegraphics[width=7cm]{\@chapevenimage}}; \end{pgfonlayer} \node[above right,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(5mm,5mm)}]current page.south west) {\thepage}; \fi @@ -256,18 +268,35 @@ citecolor = purple, \end{tikzpicture}} } \titleformat{name=\chapter,numberless}{\bfseries\huge\filcenter}{}{1em}{ - \begin{tikzpicture}[remember picture, overlay]% + \makebox[0pt][l]{\def\rad{7pt}% + \begin{tikzpicture}[remember picture, overlay]% \begin{pgfonlayer}{bottom} - \shade[left color=outermarginbgcolor!10,middle color=outermarginbgcolor!50,right color=outermarginfgcolor!20] (current page.north west) rectangle ++(\paperwidth,-.2\paperheight); - \fill[outermarginfgcolor,opacity=.5]([shift={(0,-4.25cm)}]current page.north west) rectangle ++(\paperwidth,-2mm); + \shade[left color=outermarginbgcolor!20,middle color=outermarginbgcolor!50,right color=outermarginfgcolor!20] (current page.north west) rectangle ++(\paperwidth,-.2\paperheight); % background + \fill[outermarginfgcolor,opacity=.5]([shift={(0,-4.45cm)}]current page.north west) rectangle ++(\paperwidth,-2mm); % line \end{pgfonlayer} - \node[left,font=\huge\bfseries] (contents name) at ([shift={(0cm,-3cm)}]current page.north east) {\begin{varwidth}{.9\linewidth}\baselineskip=2.6ex #1\end{varwidth}}; - \begin{pgfonlayer}{background} - \node[right] (image) at ([shift={(0,-2.2cm)}]current page.north west) {\includegraphics[width=3cm,angle =45]{inner_pics/flower.png}}; + \ifodd\value{page} + \begin{pgfonlayer}{top} + \node[above left,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north east) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; + \end{pgfonlayer} + \begin{pgfonlayer}{bottom} + \node[right] (image) at ([shift={(-0.5cm,-2.8cm)}]current page.north west) {\includegraphics[width=7cm]{\@chapoddimage}}; \end{pgfonlayer} - \end{tikzpicture} + \node[above left,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(-5mm,5mm)}]current page.south east) {\thepage}; + \else + \begin{pgfonlayer}{top} + \node[above right,font=\fontsize{25}{25}\selectfont\bfseries,align=center] (contents name) at ([shift={(0cm,-4.45cm)}]current page.north west) {\begin{varwidth}{.7\linewidth}\baselineskip=2ex #1\end{varwidth}}; + \end{pgfonlayer} + \begin{pgfonlayer}{background} + \node[left] (image) at ([shift={(0.5cm,-2.8cm)}]current page.north east) {\includegraphics[width=7cm]{\@chapevenimage}}; + \end{pgfonlayer} + \node[above right,font=\fontsize{15}{15}\selectfont,circle,fill=outermarginfgcolor,text=white,inner sep=1mm] (pagenumber) at ([shift={(5mm,5mm)}]current page.south west) {\thepage}; + \fi + \fill[outermarginfgcolor,rounded corners=2pt] + (current page.south west) -- ++(1.5mm,1.5mm) --++(\paperwidth-3mm,0mm)--++(1.5mm,-1.5mm)--cycle; + \end{tikzpicture}} } \titlespacing{\chapter}{0pt}{0pt}{65pt} +\makeatother % -------- Part定制 \makeatletter \newcommand\partabstract[1]{\def\@partabstract{#1}} |