mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 04:14:35 +08:00
change the titlepage
This commit is contained in:
108
elegantbook.cls
108
elegantbook.cls
@@ -108,6 +108,20 @@
|
|||||||
\definecolor{third}{RGB}{7,127,128}%
|
\definecolor{third}{RGB}{7,127,128}%
|
||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
|
%green color
|
||||||
|
\definecolor{main1}{RGB}{0,120,2}
|
||||||
|
\definecolor{second1}{RGB}{230,90,7}
|
||||||
|
\definecolor{third1}{RGB}{0,160,152}
|
||||||
|
%cyan color
|
||||||
|
\definecolor{main2}{RGB}{0,175,152}
|
||||||
|
\definecolor{second2}{RGB}{239,126,30}
|
||||||
|
\definecolor{third2}{RGB}{120,8,13}
|
||||||
|
%blue color
|
||||||
|
\definecolor{main3}{RGB}{20,50,104}
|
||||||
|
\definecolor{second3}{RGB}{180,50,131}
|
||||||
|
\definecolor{third3}{RGB}{7,127,128}
|
||||||
|
|
||||||
|
|
||||||
% corlor definition
|
% corlor definition
|
||||||
\definecolor{winered}{rgb}{0.5,0,0}
|
\definecolor{winered}{rgb}{0.5,0,0}
|
||||||
\definecolor{bule}{RGB}{18,29,57}
|
\definecolor{bule}{RGB}{18,29,57}
|
||||||
@@ -133,12 +147,12 @@
|
|||||||
\ifdefstring{\ELEGANT@titlestyle}{hang}{\def\style{hang}}{\relax}
|
\ifdefstring{\ELEGANT@titlestyle}{hang}{\def\style{hang}}{\relax}
|
||||||
\ifdefstring{\ELEGANT@titlestyle}{display}{\def\style{display}}{\relax}
|
\ifdefstring{\ELEGANT@titlestyle}{display}{\def\style{display}}{\relax}
|
||||||
|
|
||||||
\newtoks\zhtitle
|
|
||||||
\newtoks\entitle
|
|
||||||
\newtoks\email
|
\newtoks\email
|
||||||
\newtoks\version
|
\newtoks\version
|
||||||
\newtoks\enend
|
\newtoks\institute
|
||||||
\newtoks\zhend
|
\newtoks\subtitle
|
||||||
|
|
||||||
|
|
||||||
\RequirePackage{enumerate}
|
\RequirePackage{enumerate}
|
||||||
% list/itemize/enumerate setting
|
% list/itemize/enumerate setting
|
||||||
@@ -167,9 +181,14 @@
|
|||||||
\RequirePackage{multicol}
|
\RequirePackage{multicol}
|
||||||
\RequirePackage{xcolor}
|
\RequirePackage{xcolor}
|
||||||
\RequirePackage{fancyvrb}
|
\RequirePackage{fancyvrb}
|
||||||
|
\RequirePackage{makecell,lipsum,texnames,setspace}
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
|
||||||
|
|
||||||
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
|
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
|
||||||
|
|
||||||
|
\usetikzlibrary{backgrounds,calc}
|
||||||
|
|
||||||
|
|
||||||
\RequirePackage{natbib}
|
\RequirePackage{natbib}
|
||||||
\setlength{\bibsep}{0.0pt}
|
\setlength{\bibsep}{0.0pt}
|
||||||
@@ -331,54 +350,53 @@
|
|||||||
\renewcommand{\chaptermark}[1]{\markboth{\chaptername \; #1\;}{}}
|
\renewcommand{\chaptermark}[1]{\markboth{\chaptername \; #1\;}{}}
|
||||||
|
|
||||||
%%封面
|
%%封面
|
||||||
\newcommand*{\myquote}[1]{\def\@myquote{#1}}
|
\newcommand*{\equote}[1]{\def\@equote{#1}}
|
||||||
|
|
||||||
\newcommand*{\logo}[1]{
|
\newcommand*{\logo}[1]{
|
||||||
\def\@logo{\includegraphics[width=0.3\textwidth]{#1}
|
\def\@logo{\includegraphics[width=0.3\textwidth]{#1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
\newcommand*{\cover}[1]{
|
||||||
%% 水印壁纸
|
\def\@logo{\includegraphics[width=\linewidth]{cover.jpg}
|
||||||
\RequirePackage{wallpaper}
|
|
||||||
\newcommand*{\cover}[1]{\def\@cover{
|
|
||||||
\ThisTileWallPaper{\paperwidth}{\paperheight}{#1}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
\def\maketitle{%
|
\renewcommand*{\maketitle}{%
|
||||||
\thispagestyle{empty}
|
\begin{titlepage}
|
||||||
% \@cover
|
\newpage
|
||||||
\vfill
|
\newgeometry{margin = 0in}
|
||||||
\vspace*{2cm}
|
\parindent=0pt
|
||||||
\begin{center}
|
\renewcommand\baselinestretch{2.5}
|
||||||
\color{second}
|
\includegraphics[width=\linewidth]{cover.jpg}
|
||||||
\rule{0.8\textwidth}{2pt}\\
|
\setlength{\fboxsep}{0pt}
|
||||||
\Huge {\color{main} \bfseries \the\entitle } {\color{second} \bfseries \the\enend}\\
|
\colorbox{second}{\makebox[\linewidth][c]{\shortstack[c]{\vspace{0.5in}}}}
|
||||||
{\Huge \bfseries{\color{main} \the\zhtitle } \the\zhend}\\
|
\vfill
|
||||||
\rule{0.8\textwidth}{2pt}
|
\hfill
|
||||||
\end{center}
|
\begin{minipage}[c]{0.618\linewidth}
|
||||||
\vfill
|
{\bfseries\Huge \@title\\}
|
||||||
\vskip5ex
|
{\bfseries\huge \the\subtitle\\[1ex]}
|
||||||
\centerline{\@logo}
|
\color{gray}\kaishu\normalsize
|
||||||
\begin{center}
|
{\renewcommand{\arraystretch}{0.618}
|
||||||
\begin{minipage}{0.65\textwidth}
|
\begin{tabular}{l}
|
||||||
\indent\centering\color{bule}\@myquote
|
作者:\@author \\
|
||||||
\end{minipage}
|
版本:\the\version \\
|
||||||
\end{center}
|
组织:\the\institute\\
|
||||||
\vfill
|
更新:\@date
|
||||||
\begin{flushright}
|
\end{tabular}}
|
||||||
\color{second}
|
\end{minipage}
|
||||||
\rule{0.45\textwidth}{1pt}\\
|
\hspace{2em}
|
||||||
作者:{\color{main}\@author}\\
|
\begin{minipage}[c]{0.26\linewidth}
|
||||||
时间:{\color{main}\@date}\\
|
\begin{tikzpicture}[remember picture,overlay]
|
||||||
邮箱: \hyperlink{\the\email}{\the\email}\\
|
\begin{pgfonlayer}{background}
|
||||||
\rule{0.45\textwidth}{1pt}
|
\node[opacity=0.8,anchor=south east,outer sep=0pt,inner sep=0pt] at ($(current page.south east) +(-0.8in,1.5in)$) {\includegraphics[width=0.7\textwidth]{logo.png}};
|
||||||
\end{flushright}
|
\end{pgfonlayer}
|
||||||
\vfill
|
\end{tikzpicture}
|
||||||
\begin{center}
|
\end{minipage}
|
||||||
\color{second} 版本: \the\version
|
\vfill
|
||||||
\end{center}
|
\centerline{\itshape \@equote}
|
||||||
\vfil\eject
|
\vfill
|
||||||
}
|
\restoregeometry
|
||||||
|
\end{titlepage}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
elegantbook.pdf
BIN
elegantbook.pdf
Binary file not shown.
@@ -1,37 +1,20 @@
|
|||||||
\documentclass{elegantbook}
|
\documentclass{elegantbook}
|
||||||
|
|
||||||
|
\title{\mbox{ElegantBook:优美的 \LaTeX{} 书籍模板}}
|
||||||
|
\subtitle{An Elegant Book Template}
|
||||||
|
|
||||||
\author{ddswhu \& Liam Huang}
|
\author{ddswhu \& Liam Huang}
|
||||||
\date{January 22, 2019}
|
\institute{Elegant\LaTeX{} Program}
|
||||||
\email{elegantlatex2e@gmail.com}
|
\date{\today}
|
||||||
\usepackage{ntheorem}
|
|
||||||
\zhtitle{优美的 \LaTeX{} 书籍}
|
|
||||||
\zhend{模板}
|
|
||||||
\entitle{Elegant\LaTeX{} Book}
|
|
||||||
\enend{Template}
|
|
||||||
\version{3.05}
|
|
||||||
\myquote{Victory won\rq t come to us unless we go to it.}
|
|
||||||
\logo{logo.pdf}
|
|
||||||
\cover{cover.pdf}
|
|
||||||
|
|
||||||
%green color
|
\version{3.06}
|
||||||
\definecolor{main1}{RGB}{0,120,2}
|
\equote{Victory won\rq t come to us unless we go to it. --- M. Moore}
|
||||||
\definecolor{second1}{RGB}{230,90,7}
|
\logo{logo.png}
|
||||||
\definecolor{third1}{RGB}{0,160,152}
|
\cover{cover.jpg}
|
||||||
%cyan color
|
|
||||||
\definecolor{main2}{RGB}{0,175,152}
|
|
||||||
\definecolor{second2}{RGB}{239,126,30}
|
|
||||||
\definecolor{third2}{RGB}{120,8,13}
|
|
||||||
%blue color
|
|
||||||
\definecolor{main3}{RGB}{20,50,104}
|
|
||||||
\definecolor{second3}{RGB}{180,50,131}
|
|
||||||
\definecolor{third3}{RGB}{7,127,128}
|
|
||||||
|
|
||||||
\usepackage{makecell}
|
|
||||||
\usepackage{lipsum}
|
|
||||||
\usepackage{texnames}
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
\mainmatter
|
\mainmatter
|
||||||
\chapter{Elegant\LaTeX{} 系列模板介绍}
|
\chapter{Elegant\LaTeX{} 系列模板介绍}
|
||||||
|
|||||||
BIN
figure/cover.jpg
Normal file
BIN
figure/cover.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 790 KiB |
BIN
figure/cover.pdf
BIN
figure/cover.pdf
Binary file not shown.
3702
figure/logo.pdf
3702
figure/logo.pdf
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user