diff options
author | Norbert Preining <norbert@preining.info> | 2023-06-28 03:01:13 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-06-28 03:01:13 +0000 |
commit | b5165768775a2cbc0577b7f8c532cc33d301c28f (patch) | |
tree | cbd889d0de6f6224cb5485c03afde29a2f5eaf89 /macros/latex/contrib/beautybook/Beautybook-EN.cls | |
parent | a0b68c12d9e67182560eb31f202f3e86f0e4a5de (diff) |
CTAN sync 202306280301
Diffstat (limited to 'macros/latex/contrib/beautybook/Beautybook-EN.cls')
-rw-r--r-- | macros/latex/contrib/beautybook/Beautybook-EN.cls | 67 |
1 files changed, 48 insertions, 19 deletions
diff --git a/macros/latex/contrib/beautybook/Beautybook-EN.cls b/macros/latex/contrib/beautybook/Beautybook-EN.cls index 5f2652d753..2ecb36b488 100644 --- a/macros/latex/contrib/beautybook/Beautybook-EN.cls +++ b/macros/latex/contrib/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}} |