commit 5265ec5ec991a9b56b21c476cdf5f6c56ee3a0af Author: zhaojinghao Date: Mon Aug 1 09:50:09 2022 +0800 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..44b690c --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ + +.texpadtmp/chapter/c3.aux +*.aux +*.log +*.gz +.DS_Store +*.toc diff --git a/CJK_xe_font.sty b/CJK_xe_font.sty new file mode 100644 index 0000000..22e97bd --- /dev/null +++ b/CJK_xe_font.sty @@ -0,0 +1,36 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{CJK_xe_font} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\usepackage[BoldFont, SlantFont, CJKnumber, CJKchecksingle]{xeCJK} + +%---------------------------- 英文字体 ----------------------------------% +% 衬线字体,是文档的默认字体 +%\setmainfont{DejaVu Serif} +% 同setmainfont,由fontspec宠包提供 +%\setromanfont{DejaVu Serif} +% 无衬线字体,比衬线字体更醒目,常用作标题 +%\setsansfont{DejaVu Sans} +% 等宽字体 +%\setmonofont{DejaVu Sans Mono} +%\setmonofont{Consolas} +%---------------------------- 中文字体 ----------------------------------% +\setCJKmainfont[BoldFont={黑体}]{宋体} +\setCJKsansfont[BoldFont={黑体}]{楷体} + +\setCJKfamilyfont{zhsong}{宋体} +\setCJKfamilyfont{zhhei}{黑体} +\setCJKfamilyfont{zhkai}{楷体} +\setCJKfamilyfont{zhfs}{仿宋} +\setCJKfamilyfont{zhli}{隶书} +\setCJKfamilyfont{zhyou}{幼圆} +\setCJKfamilyfont{yahei}{微软雅黑} + +\newcommand*{\yahei}{\CJKfamily{yahei}} % 微软雅黑 +\newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体 +\newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体 +\newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书 +\newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋 +\newcommand*{\lishu}{\CJKfamily{zhli}} % 隶书 +\newcommand*{\youyuan}{\CJKfamily{zhyou}} % 幼圆 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/README.md b/README.md new file mode 100644 index 0000000..209c5cb --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# hpcl_document_latex_template +高性能计算实验室文档模板 diff --git a/chapter/appendix.tex b/chapter/appendix.tex new file mode 100644 index 0000000..1d7675e --- /dev/null +++ b/chapter/appendix.tex @@ -0,0 +1,2 @@ +\appendix +\section{各模块模型服务接口文档} \ No newline at end of file diff --git a/chapter/c1.tex b/chapter/c1.tex new file mode 100644 index 0000000..8b6f15b --- /dev/null +++ b/chapter/c1.tex @@ -0,0 +1,26 @@ +\chapter{开源机器学习平台概述} + +\section{平台介绍} +随着人工智能(artificial intelligent,AI)技术的不断发展,各种AI产品已经逐步进入了我们的生活。但是局限专业知识,非AI开发人士无法快速、简单地了解AI知识、使用AI产品。 +AI平台以深度学习技术研究和业务应用为基础,集深度学习核心框架、基础模型库、端到端开发套件、工具组件和服务平台于一体, 是全面开源开放、技术领先、功能完备的产业级深度学习平台。AI平台源于产业实践,始终致力于与产业深入融合。 + +\section{功能介绍} +本平台主要包含\textbf{开发平台}、\textbf{开放能力}、\textbf{知识学习}三个模块。其中开发平台集成了主流深度学习工具的开发接口,开放能力集成了多领域的端到端的模型训练和预测服务,知识学习模块包含了当下主流的机器学习算法的介绍,例如:算法描述、优点、缺点、适用范围、实现方法、应用场景等。 +\subsection{开发平台} +集成了主流工具的API介绍,包括TensorFlow、PyTorch、Sklearn等,用户通过点击查阅即可了解相关API的知识。 +\subsection{开放能力} +平台开放的能力包含了当下主流的可供学习使用的机器学习任务,涉及智能图像处理、自然语言处理、智能语音等多领域多方面的服务,可以让用户根据自身需要,依据自己的数据获得端到端的AI模型服务。\\ +\indent 用户可以依据当前的进行该任务所选择的机器学习算法进行自主调节参数,用户在选择完参数之后可以自主决定是否选择上传本地的训练数据文件,如果选择上传,则会依据上传的数据文件训练模型,如果不选择上传,则会使用平台默认的数据文件进行训练。在参数和文件全部输入完毕后,用户点击“训练开始”即可开始训练模型。在模型训练完毕后,则会给出模型相应的性能指标。 +各模块集成的模型如下: +\subsubsection{回归预测模块} +回归预测模块包含海浪高度预测、波士顿房价预测、碳排放预测和股票预测四个基础功能,并提供端到端的训练功能。 +\subsubsection{智能图像模块} +智能图像模块包含MNIST手写体分类、汽车目标检测、智能图像分割、人体关键点检测、智能图像生成、图片文字识别等基础模型,用户可以在相应模块下上传图片,获得预测结果。 +\subsubsection{自然语言处理模块} +自然语言处理模块(Natural Language Process,NLP)深度整合了顶级的NLP技术,包括文本情感分类、机器翻译、智能阅读理解、语义匹配、对话系统、文本生成、句法分析等模块,主要利用Transformer模型建模,提供端到端的预测服务。 +\subsubsection{智能语音模块} +智能语音模块包含智能语音合成(Text To Speech, TTS)和智能语音识别(Automatic Speech Recognition,ASR)功能,智能语音合成将用户输入的文本合成成音频,智能语音识别则可以将用户上传的语音中的文字识别出来。 +\subsubsection{其他模块} +本模块包括了鸢尾花识别等基础分类任务的训练和预测功能。 +\subsection{知识学习} +知识学习模块主要包含了对主流的监督学习、无监督学习、半监督学习、强化学习等不同机器学习、深度学习方法的讲解。用户可以在该模块了解传统机器学习和前沿模型的建模思路和特点,以便于在自己建模时选择合适的模型。 diff --git a/chapter/c2.tex b/chapter/c2.tex new file mode 100644 index 0000000..ef58ac6 --- /dev/null +++ b/chapter/c2.tex @@ -0,0 +1,10 @@ +\chapter{开发平台} + +%%%%%% 目录结构 +%%%这里的用处不明,建议后期把这一模块砍去,或者改成带有代码的教程 +\section{Tensorflow} +\section{PyTorch} +\section{Sklearn} +\section{其他经典开源模型} + + diff --git a/chapter/c3.tex b/chapter/c3.tex new file mode 100644 index 0000000..8e7b53a --- /dev/null +++ b/chapter/c3.tex @@ -0,0 +1,387 @@ +\chapter{开放能力} +本章节将详细讲述每个模块模型实现方法以及用户自主训练、预测的方法。 +\section{回归预测} +回归是一种通过建模和分析变量之间关系的的方法,其目的是通过模型来计算得出一个具体的值。\\ +\indent 回归预测在很多的方面得到应用,例如:天气预测、机械寿命预测、商品价格预测、股价预测等都有广泛的应用。本平台的回归预测模块选取了海浪高度预测、波士顿房价预测、碳排放预测和股票价格预测等四个典型预测问题,并提供多种不同类型的建模方法,方便使用者充分利用本平台构建自己的模型。 +\subsection{海浪高度预测} +\subsubsection{模型构建} +海浪高度预测属于简单的回归预测,其样本的结构如表\ref{ocean_wave_data}所示: +\begin{table}[htb] + \centering + \resizebox{\textwidth}{15mm}{ + \begin{tabular}{|c|c|c|c|c|c|c|c|} + \hline\hline + \textbf{列名} & \textbf{WVHT\_1} & \textbf{WDIR\_1} & \textbf{WSPD\_1} & \textbf{WDIR\_2} &\textbf{WSPD\_2} & \textbf{WDIR} & \textbf{WSPD} \\ + \hline + \textbf{含义}&\textbf{t-1时刻高度}&\textbf{t-1时刻风向}&\textbf{t-1时刻风速}& + \textbf{t-2时刻风向}&\textbf{t-2时刻风速}&\textbf{当前风向}&\textbf{当前风速} \\ + \hline + \textbf{数据类型}&\textbf{float}&\textbf{float}&\textbf{float}&\textbf{float}&\textbf{float}&\textbf{float}&\textbf{float}\\ + \hline\hline + \end{tabular}} + \caption{海浪高度预测模型的数据特征及说明} + \label{ocean_wave_data} +\end{table} +因此,建模时采用简单的多层感知机(Multi-Layer Perceptron, MLP)即可快速完成任务,模型构造如图\ref{MLP}所示,输入数据通过z-score(式\ref{z_score})进行归一化,然后输入到感知机中,最后输出得到预测值,并与真实值进行比较,计算损失值进行迭代。 +\begin{equation} + z(x) = \frac{x-\mu}{\sigma} + \label{z_score} +\end{equation} +\begin{figure}[htb] + \centering + \includegraphics[width=0.75\textwidth]{images/ch03/regression/MLP.png} + \caption{支持用户自定义的多层感知机} + \label{MLP} +\end{figure} +\indent 用户可以将自己的数据输入进模型,根据自定义的超参数进行训练,得到符合自己数据的专有模型;也可以直接输入特征数据进行预测。 +\subsubsection{模型训练} +训练界面如图\ref{oceantrain}所示,该模型支持自定义神经元数量、学习率、训练轮数、激活函数、损失函数等超参数。 +\begin{figure}[!htb] + \centering + \includegraphics[width=0.6\textwidth]{images/ch03/regression/oceanwave_train.png} + \caption{海浪高度模型训练界面} + \label{oceantrain} +\end{figure} +用户通过输入上述超参数,可以选择上传本地数据进行训练,若不上传,则默认使用线上数据。等待训练完成后,系统将返回该模型在验证集数据上的指标,如图\ref{ocean_train_result}所示。此时,用户就得到了一个基于自设超参数和本地数据的模型。 +\begin{figure}[htb] + \centering + \includegraphics[width=0.8\textwidth]{images/ch03/regression/ocean_train_result.png} + \caption{海浪高度模型训练指标} + \label{ocean_train_result} +\end{figure} +\subsubsection{模型预测} +平台支持使用用户自定义和模型进行预测和使用平台预先训练好的模型进行训练,以用户自训练模型预测(图\ref{ocean_prediction})为例 +\begin{figure}[htb] + \centering + \includegraphics[width=0.55\textwidth]{images/ch03/regression/ocean_prediction.png} + \caption{使用自训练模型预测} + \label{ocean_prediction} +\end{figure} +用户输入一条特征数据,点击\textbf{预测浪高}按钮,等待模型预测完成后,即可获得海浪高度的预测值。 +\newpage +\subsection{波士顿房价预测} +波士顿房价预测属于经典的机器学习回归问题之一,该任务需要对79个与房价有关的特征进行处理和建模,最终得到能够预测房价的回归模型。该任务的评价指标是均方根误差(Root Mean Square Error, RMSE) +\begin{equation} + RMSE(y) = \sqrt{\sum_{i=1}^{n}(y_i-\hat{y_i})^2} + \label{rmse} +\end{equation} +\subsubsection{模型构建} +由于特征维度较多,而且有很多的缺失值、部分特征存在异常值,因此首先进行特征分析和数据预处理。包括异常点检测、缺失值处理和数据填充、特征独热编码等。 +\begin{enumerate} + \item \textbf{异常点检测}。异常点的分析以特征"GrLivArea"为例,打印其与房屋售价"SalePrice"的分布如图\ref{annopoint}所示, + \begin{figure}[H] + \centering + \includegraphics[width=0.75\textwidth]{images/ch03/regression/annopoint.png} + \caption{GrLivArea与SalePrice分布图} + \label{annopoint} + \end{figure} + 清晰可见右上角有两个离群点,在训练时,可以考虑将这两条样本删除。同理,其他特征上包含异常值的样本,在数据预处理阶段也同时予以删除。 + \item \textbf{缺失值处理}。对训练数据的缺失值进行分析,得到较高缺失比例的特征如图\ref{miss_rate}所示,高缺失率的特征将影响模型的泛化能力,因此将缺失率>30\%的特征(PoolQC, MiscFeature, Alley, Fence, FireplaceQu)删去,不参与后续训练。 + \begin{figure}[H] + \centering + \includegraphics[width=0.5\textwidth]{images/ch03/regression/boston_miss_rate.png} + \caption{特征缺失比例} + \label{miss_rate} + \end{figure} + \item \textbf{缺失值填充}。对于剩余包含较少缺失值的特征列,分别采取填充None值、填充众数、填充平均数等方式,将缺失的部分填充上。 + \item \textbf{正态性分析}。对于目标值SalePrice,构建其直方图和正态概率分布图\ref{non_normal_house_price},可见其呈明显正偏态分布,不利于回归建模。 + \begin{figure}[H] + \centering + \includegraphics[scale=0.4]{images/ch03/regression/non_normal_dist.png} + \includegraphics[scale=0.4]{images/ch03/regression/non_normal_prob.png} + \caption{SalePrice的直方图和正态概率分布图} + \label{non_normal_house_price} + \end{figure} + 因此,对价格列进行对数化处理,处理后的数据分布如图\ref{normal_house_price},可见其基本符合正态分布。 + \begin{figure}[H] + \centering + \includegraphics[scale=0.4]{images/ch03/regression/normal_dist.png} + \includegraphics[scale=0.4]{images/ch03/regression/normal_prob.png} + \caption{对数化后SalePrice的直方图和正态概率分布图} + \label{normal_house_price} + \end{figure} + \item \textbf{特征独热编码} 对于离散型的特征,需要将其进行独热编码(one-hot),才能转变为机器可以识别的特征。 +\end{enumerate} +经过数据预处理后,平台采用xgboost模型进行回归建模。xgboost(eXtreme Gradient Boosting)是一种基于GBDT的算法,具有高效、灵活和轻便的特点,在数据挖掘、推荐系统等领域得到广泛的应用。通过预设的超参数集合,将训练样本输入xgboost模型中,经过数轮迭代后得到训练好的模型。 +\subsubsection{模型训练} +平台提供了用户上传数据和自定义超参数训练模型的功能。用户可定义的超参数如表\ref{hyperparams_xgb}所示 +\begin{table}[htb] + \centering + \begin{tabular}{|c|c|c|} + \hline\hline + \textbf{名称} & \textbf{含义} & \textbf{默认值} \\ + \hline + \textbf{eta}&\textbf{学习率}&\textbf{0.05} \\ + \hline + \textbf{max\_depth}&\textbf{树的最大深度}&\textbf{10}\\ + \hline + \textbf{subsample}&\textbf{随机采样比例}&\textbf{0.7}\\ + \hline + \textbf{colsample\_bytree}&\textbf{随机采样列数}&\textbf{0.8}\\ + \hline + \textbf{num\_boost\_round}&\textbf{迭代轮数}&\textbf{1000}\\ + \hline + \textbf{early\_stopping\_rounds}&\textbf{提前终止训练}&\textbf{200}\\ + \hline\hline + \end{tabular} + \caption{海浪高度预测模型的数据特征及说明} + \label{hyperparams_xgb} +\end{table} +\subsubsection{模型预测} +用户可以选择使用自训练模型进行预测,也可以选择使用平台已经训练好的模型进行预测。预测时需要按照波士顿房价预测问题官方给出的数据集格式准备好自己的数据,并将数据在指定界面上传,平台将返回符合官方要求的数据格式的文件。 +\subsection{碳排放预测} +\subsection{股票预测} + +\section{智能图像} +机器视觉(Machine Vision)是人工智能领域中发展迅速的一个重要分支,目前正处于不断突破、走向成熟的阶段。智能图像处理是指一类基于计算机的自适应于各种应用场合的图像处理和分析技术,本身是一个独立的理论和技术领域,但同时又是机器视觉中的一项十分重要的技术支撑。\\ +\indent 智能图像处理的主要技术包括图像预处理、图像分割、目标识别和分类、目标检测和跟踪等主要研究方向。近年来,随着深度学习技术的不断发展,利用深度神经网络完成相关任务成为智能图像处理领域的主流方法。\\ +\indent 在本模块中,平台基于深度神经网络技术,实现了综合性的图像智能处理功能。包括基础问题建模(MNIST手写体分类、图片文字识别),智能目标检测、智能图像分割、人体关键点检测、智能图像生成(通过文字描述生成图像)等应用,可以快速根据需求生成所需的结果。 +\subsection{MNIST手写体分类} +MNIST手写体数据集来自美国国家标准与技术研究所(National Institute of Standards and Technology, NIST). 训练集有60000个样本,测试集有10000个样本。样本经过归一化后,每张图片的大小是相同的。该数据集由Yann LeCun等人维护。其中部分数据如图\ref{MNIST_sample}所示 +\begin{figure}[H] + \centering + \includegraphics[width=0.2\textwidth]{images/ch03/vision/1.jpg} + \includegraphics[width=0.2\textwidth]{images/ch03/vision/2.jpg} + \includegraphics[width=0.2\textwidth]{images/ch03/vision/7.jpg} + \caption{MNIST数据集示例} + \label{MNIST_sample} +\end{figure} +\subsubsection{模型构建} +由于任务相对简单,我们以经典的LeNet-5来完成MNIST手写体识别任务。LeNet-5网络结构如图\ref{LeNet}所示 +\begin{figure}[htb] + \centering + \includegraphics[width=0.8\textwidth]{images/ch03/vision/LeNet-5.png} + \caption{LeNet-5网络结构} + \label{LeNet} +\end{figure} +\subsubsection{模型训练} +用户可以上传数据并自设学习率和迭代轮数进行模型自训练。 +\subsubsection{模型预测} +用户可以使用自训练的模型进行预测,也可以上传数据,使用平台预先训练好的模型进行预测。预测界面如图\ref{mnist_pred}所示 +\begin{figure}[H] + \centering + \includegraphics[width=0.9\textwidth]{images/ch03/vision/mnist_predict.png} + \caption{MNIST预测界面} + \label{mnist_pred} +\end{figure} +\subsection{图片文字识别} +光学字符识别(Optical Character Recognition, OCR)是指对文本资料的图像文件进行分析识别处理,获取文字及版面信息的过程。亦即将图像中的文字进行识别,并以文本的形式返回。 +\subsubsection{模型构建} +平台集成了开源离线OCR工具tr,用户只需要上传图片,就可以得到图片中的文字。 +\subsubsection{模型训练} +暂不支持自训练。 +\subsubsection{模型预测} +用户上传带有文字的图片,平台经过计算后,返回图片中的文字,效果如图\ref{ocr_pred}所示 +\begin{figure}[H] + \centering + \includegraphics[width=0.9\textwidth]{images/ch03/vision/ocr_result.png} + \caption{OCR识别效果} + \label{ocr_pred} +\end{figure} +\subsection{目标检测} +YOLO(You Only Look Once)系列算法采用单个神经网络直接预测物品边界和类别概率,实现端到端的物品检测。该方法的特点是将目标检测任务看作目标区域预测和类别预测的回归问题,实现快速检测的同时还达到较高的准确率。平台采用YOLOv5框架作为目标检测模型的基础框架。 +\subsubsection{模型构建} +YOLOv5的网络结构如图\ref{yolov5}所示, +\begin{figure}[H] + \centering + \includegraphics[width=0.9\textwidth]{images/ch03/vision/yolov5.png} + \caption{YOLOv5网络结构图} + \label{yolov5} +\end{figure} +由于模型代码已经开源(\href{https://github.com/ultralytics/yolov5}{https://github.com/ultralytics/yolov5}),平台直接利用了其开源代码搭建模型。 +\subsubsection{模型训练} +通过YOLOv5的开源代码,我们可以利用预训练好的代码和权重进行训练。通过以下指令,就完成了基于yolov5n的网络结构和COCO数据集,BATCH大小为128的模型的训练。 +\begin{Verbatim}[h] + python train.py --data coco.yaml --cfg yolov5n.yaml --weights '' --batch-size 128 +\end{Verbatim} +该模型训练耗时和算力消耗都比较大,因此平台不提供自主数据训练。 +\subsubsection{模型预测} +平台支持使用不同参数量的YOLOv5模型进行预测,用户通过上传本地的图片,选择YOLOv5模型的版本,进行目标检测模型的预测。具体版本类型如表\ref{yolov5_version}所示:\\ +\begin{table}[H] + \centering + \begin{tabular}{|c|c|c|c|c|} + \hline\hline + \textbf{Model} & \textbf{size(pixels)} & \textbf{Speed(ms)}&\textbf{params(M)} & \textbf{FLOPs@640 (B)} \\ + \hline + \textbf{YOLOv5n}&640&45&1.9&4.5 \\ + \hline + \textbf{YOLOv5s}&640&98&7.2&16.5 \\ + \hline + \textbf{YOLOv5m}&640&224&21.2&49.0 \\ + \hline + \textbf{YOLOv5l}&640&430&46.5&109.1 \\ + \hline + \textbf{YOLOv5x}&640&766&86.7&205.7\\ + \hline\hline + \end{tabular} + \caption{YOLOv5可选版本及其部分参数} + \label{yolov5_version} +\end{table} +\newpage +\indent 使用YOLOv5x对图片进行分割的结果如图\ref{yolov5x_rst}所示 + \begin{figure}[H] + \centering + \includegraphics[width=0.45\textwidth]{images/ch03/vision/yolov5x_in.jpg} + \hspace{3mm} + \includegraphics[width=0.45\textwidth]{images/ch03/vision/yolov5x_out.jpg} + \caption{YOLOv5x检测结果} + \label{yolov5x_rst} +\end{figure} +\subsection{智能图像分割} +图像分割技术是目前计算机视觉领域最热门的技术之一,许多应用了计算机视觉的场景都需要对图像进行智能分割,以充分理解图像中的内容,以便于机器分析图像中各个部分之间的关系。图像分割技术主要分为语义分割和实例分割等。\\ +\indent 光伏发电站,是指一种特殊材料电子元件(诸如晶硅板、逆变器等)组成的利用太阳能发电的体系,与电网相连并向电网输送电力。利用遥感图像和图像分割技术,可以对光伏发电站的空间分布进行精准确定。因此,本平台以光伏发电站的遥感图像为例,提供了光伏板智能图像分割服务。 +\subsubsection{模型构建} +U-Net是一种U型的类Encoder-Decoder卷积神经网络,最初被应用于医疗图像分割,后来实验证明其在其他领域的图像分割也有较好的效果,是实现语义分割或实例分割的较为基础的模型,其网络结构如图\ref{unet}所示:\\ +\begin{figure}[H] + \centering + \includegraphics[scale=0.53]{images/ch03/vision/unet.png} + \caption{U-Net的网络结构图} + \label{unet} +\end{figure} +\indent 模型首先通过卷积操作进行特征融合,通过池化层进行降维,然后再通过卷积层进行上采样,最后通过$1\times 1$的卷积进行结果的输出。 +\subsubsection{模型训练} +\begin{enumerate} + \item \textbf{数据准备}。 U-Net模型训练需要同时准备原图像和标注图像,其示例如图\ref{unet-data}所示,标注图像需标注出光伏板的位置 + \begin{figure}[H] + \centering + \includegraphics[scale=0.4]{images/ch03/vision/unet-ori.jpg} + \hspace{5mm} + \includegraphics[scale=0.43]{images/ch03/vision/unet-label.jpg} + \caption{U-Net数据集示例} + \label{unet-data} + \end{figure} + \item \textbf{模型训练}。首先将原始图像进行数据增强,例如随机限制对比度、随机增加白噪声、随机锐化和模糊等,然后调整分表了使得图像像素长宽能被32整除,最后将图像规范化成为神经网络模型可接受的输入。训练时以DiceLoss作为损失函数,使用交并比作为训练时更新模型的指标。 +\end{enumerate} +\subsubsection{模型预测} +模型预测支持单张图片预测,也支持批量预测,用户通过平台上传本地图片,模型运行完成后会返回分割后的结果。最终分割的效果如图\ref{unet-out}所示 +\begin{figure}[H] + \centering + \includegraphics[scale=0.4]{images/ch03/vision/unet_photovoltaic.png} + \caption{U-Net分割光伏图像} + \label{unet-out} +\end{figure} +\subsection{人体关键点检测} +人体关键点检测,Human Pose Estimation,指通过识别一些人体关键点,如头部、肩膀、关节等,描述人体骨骼信息。人体关键点检测是计算机视觉的重要应用之一,以人体关键点检测为基础,可以进行行为识别、人物跟踪、步态识别等相关研究。按照检测目标的维度,人体关键点检测一般可以分为二维关键点检测和三维关键点检测。 +\begin{figure}[H] + \centering + \includegraphics[scale=0.6]{images/ch03/vision/pose_esti.jpg} + \caption{二维人体关键点检测} + \label{pose_esti} +\end{figure} +\subsubsection{模型构建} +MMPose是一个基于PyTorch的开源姿态估计工具箱。基于MMPose的开源框架,我们可以简单的搭建一个人体关键点检测的建模、训练和预测服务。 +\subsubsection{模型训练} +平台选择了MMPose自带的预训练模型搭建服务,MMPose框架也支持使用者基于自有数据进行模型微调或者重新训练,指令如下 +\begin{Verbatim}[H] + python tools/train.py ${CONFIG_FILE}$ [optional arguments] +\end{Verbatim} +\subsubsection{模型预测} +用户可以直接上传本地图片进行预测,模型预测的效果如图\ref{pose_out}所示 +\begin{figure}[H] + \centering + \includegraphics[width=0.4\textwidth]{images/ch03/vision/pose_in.jpg} + \hspace{5mm} + \includegraphics[width=0.4\textwidth]{images/ch03/vision/pose_out.jpg} + \caption{预测结果示例} + \label{pose_out} +\end{figure} +\subsection{图像生成} +根据文本生成对应的图像是多模态任务之一。解决这一问题的主流方法有VAE(Variational Auto-Encoder),DRAW(Deep Recurrent Attention Writer)以及生成对抗网络(Generative Adversarial Networks, GAN)等。 +\subsubsection{模型构建} +FuseDream是一个结合CLIP(Connecting Text and Images)和GAN的开源文本生成图像模型 +\begin{enumerate} + \item \textbf{生成对抗网络模块}。GAN模块的结构如下图\ref{gan}所示 + \begin{figure}[H] + \centering + \includegraphics[width=0.8\textwidth]{images/ch03/vision/GAN.jpg} + \caption{生成对抗网络结构图} + \label{gan} + \end{figure} + 生成对抗网络模型由两部分组成,一个是生成模型(Generator),一个是判别模型(Discriminator Network)。生成模型的任务是尽力模仿输入的数据生成类似的数据。判别模型的任务是判断给定的实例是否是由生成器伪造的。 + \item \textbf{CLIP}。CLIP的英文全称是Contrastive Language-Image Pre-training,即一种基于对比学习的文本-图像对的预训练模型。如下图\ref{clip}所示,CLIP包括两个模型:Text Encoder和Image Encoder,其中Text Encoder用来提取文本的特征,可以采用transformer模型;而Image Encoder用来提取图像的特征,可采用CNN模型。 + \begin{figure}[H] + \centering + \includegraphics[width=0.6\textwidth]{images/ch03/vision/CLIP.jpg} + \caption{CLIP结构图} + \label{clip} + \end{figure} +\end{enumerate} +\subsubsection{模型训练} +训练时按照如下步骤进行 +\begin{enumerate} + \item 通过对数据集随机扰动,进行数据增强。 + \item 使用CLIP模型计算文本与图像的相似度,依靠增强的数据,增加CLIP的鲁棒性。 + \item 将CLIP模型计算得分较高的一部分数据送入GAN模型,进行训练。 +该模型利用了预训练的BIG-GAN权重,在使用时无需重复训练,根据用户输入的文本进行微调即可。 +\end{enumerate} +\subsubsection{模型预测} +用户输入文字,模型经过生成后,输出对应的图片。示例如下 +\begin{figure}[H] + \centering + \subfigure[A photo of a blue dog.]{\includegraphics[width=0.3\textwidth]{images/ch03/vision/blue_dog.png}} + \hfill + \subfigure[Sun rises from sea.]{\includegraphics[width=0.3\textwidth]{images/ch03/vision/sunrise.png}} + \hfill + \subfigure[A small flower blooms on the cliff.]{\includegraphics[width=0.3\textwidth]{images/ch03/vision/flower_blooms.png}} + \caption{生成图像示例} + \label{text2gan} +\end{figure} +\section{自然语言处理} +自然语言处理(Natural Language Processing, NLP)是计算机科学与人工智能领域中的一个重要研究方向。它是关于如何使计算机理解人所使用的自然语言的研究,是融合计算机科学、语言学、数学等学科于一体的科学。 +自然语言处理任务通常包括句法分析、文本分类、机器翻译、阅读理解、人机对话等多种任务,在舆情分析、智能机器人等研究上扮演了重要的角色。平台以将这些任务为例,结合最新预训练模型技术进行建模。 +\subsection{文本情感分类} +文本分类任务是NLP任务中较为基础的应用。文本情感分类一般是指按照文本内容,将文本情感分为两类(积极、消极)或三类(积极、中性、消极)。\\ +\indent 传统文本情感分类任务一般是基于中文分词、词向量结合TextCNN等神经网络模型实现的,近年来,随着各种Transformer预训练模型的出现,基于预训练模型进行微调(Fine-Tune)的文本分类模型逐渐成为主流。本平台的文本分类模型即采用了这种方式。 +\subsubsection{模型构建} +使用Bert等Transformer模型进行微调预测的网络结构如下图\ref{bert_cls}所示,中文文本一般不再需要分词,而是经过在词表中的位置映射,转换为机器能够理解的编码。对于文本分类任务,BERT模型在文本前插入一个[CLS]符号,经过训练和,该符号可以学习到整段文本的语义表示,并将该符号对应的向量输出得到最后的分类结果。 +\begin{figure}[H] + \centering + \includegraphics[scale=0.6]{images/ch03/nlp/bert_classify.png} + \caption{Bert文本分类} + \label{bert_cls} +\end{figure} +构建模型时,采用 RoBERTa 作为基础的预训练模型,相比于Bert,RoBERTa基于更大的训练数据和更长的预训练时间进行预训练。 +\subsubsection{模型训练} +平台支持文本分类任务的自主训练,用户同时上传训练数据集和测试数据集,平台建模完成后,会提供预测的结果文件,可供用户下载。 +\subsubsection{模型预测} +用户也可以只提交测试文件,平台基于线上模型进行预测,同时返回预测结果。 +%\subsection{机器翻译} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\subsection{阅读理解} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\subsection{语义匹配} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\subsection{对话系统} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\subsection{文本生成} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\subsection{词法分析} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\section{智能语音} +%\subsection{语音识别} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\subsection{语音生成} +%\subsubsection{模型构建} +%\subsubsection{模型训练} +%\subsubsection{模型预测} +%\section{其他任务} + \begin{subappendices}%%!!!!!!! + \section{各模块模型服务接口文档} + \subsection{回归预测} + \subsubsection{海浪高度预测} +\end{subappendices} + diff --git a/chapter/latex模板·使用说明.tex b/chapter/latex模板·使用说明.tex new file mode 100644 index 0000000..9ceef4e --- /dev/null +++ b/chapter/latex模板·使用说明.tex @@ -0,0 +1,159 @@ +\chapter{通用样式} + +%%%%%% 目录结构 +\section{目录结构} + +本文档支持到三级目录,即:章(chapter)、节(section)、子节(subsection)、子子节(subsubsection)。使用方法如下: + +\begin{Verbatim}[] +章: +\chapter{此处输入章的标题} + +节: +\section{此处输入节标题} + +子节: +\section{此处输入子节标题} + +子子节: +\section{此处输入子子节标题} +\end{Verbatim} + +%%%%%% 文字类 +\section{文字类} +\subsection{字体} +本文档提供多种字体以供选择。使用方法如下: +\begin{Verbatim}[] +\kaishu{这是楷体}。\songti{这是宋体}。\yahei{这是微软雅黑}。\heiti{这是黑体}。\fangsong{这是仿宋}。\lishu{这是隶书}。\youyuan{这是幼圆}。 +\end{Verbatim} + +所有字体在windows系统中均可用,但仅\textbf{楷体、宋体和仿宋}在mac系统和linux系统可用。 + +\subsection{文字下划线} +通过uline命令为指定的文字添加下划线: +\begin{Verbatim}[] +这是一段文字,\uline{现在这几个字要加下划线,而且这个下划线是可以跨行显示的,可以通过该命令来实现在文档中标注重要的内容}。 +\end{Verbatim} + +效果如下: + +这是一段文字,\uline{现在这几个字要加下划线,而且这个下划线是可以跨行显示的,可以通过该命令来实现在文档中标注重要的内容}。 + + +\section{注解} +可通过以下方法添加注解: + +\begin{Verbatim}[] +\begin{quote} +\kaishu +\textbf{注意:}此处可以输入注解,注解可以用来进一步描述图像、图表等文档对象。 +\end{quote} +\end{Verbatim} + +该注解的效果如下所示: +\begin{quote} +\kaishu +\textbf{注意:}此处可以输入注解,注解可以用来进一步描述图像、图表等文档对象。 +\end{quote} + + +\section{图表} +\subsection{插入图片} +在文档中使用到的所有的图片均放置在pic目录下,图片的插入方法如下: +\begin{Verbatim}[] +\begin{figure}[h] + \centering + \label{structure} + \includegraphics[width=0.8\textwidth]{pic/example.png} + \caption{此处输入插入图片的描述文字} +\end{figure} +\end{Verbatim} + +效果如下图\ref{example}所示。 + +\begin{figure}[h] + \centering + \label{example} + \includegraphics[width=0.8\textwidth]{pic/example.png} + \caption{此处输入插入图片的描述文} +\end{figure} + +\begin{quote} +\kaishu +\textbf{注意:}h(here)表示图片的插入位置,即在当前处插入图片,可选的参数包括b(bottom)、t(top)。0.8定义了图片的宽度,即图片宽度为当前文档宽度的80\%,图片通过label定义的标签名进行引用。 +\end{quote} + +\subsection{表格} +插入表格的代码如下所示: + +\begin{Verbatim}[] +\begin{table}[htb] +\centering +\label{tableExample} +\begin{tabular}{p{3cm}|p{9cm}} +\hline\hline + +\textbf{硬件} & \textbf{配置要求} \\ +\hline\hline + +硬盘 & 所有节点至少包含2块SATA硬盘,每块硬盘大小为1TB,单个节点硬盘之间通过RAID1组成磁盘阵列 \\ +\hline + +内存 & 每个节点每个CPU建议配置至少2GB内存 \\ +\hline + +网卡 & 每个节点至少拥有2个前兆网卡 \\ +\hline + +\hline\hline +\end{tabular} +\caption{各节点硬件配置要求} +\end{table} +\end{Verbatim} + + +各节点的硬件配置如表\ref{tableExample}所示。 + +\begin{table}[htb] +\centering +\label{tableExample} +\begin{tabular}{p{3cm}|p{9cm}} +\hline\hline + +\textbf{硬件} & \textbf{配置要求} \\ +\hline\hline + +硬盘 & 所有节点至少包含2块SATA硬盘,每块硬盘大小为1TB,单个节点硬盘之间通过RAID1组成磁盘阵列 \\ +\hline + +内存 & 每个节点每个CPU建议配置至少2GB内存 \\ +\hline + +网卡 & 每个节点至少拥有2个前兆网卡 \\ +\hline + +\hline\hline +\end{tabular} +\caption{各节点硬件配置要求} +\end{table} + + +\section{源码} +在文档中输入源码、shell操作等效果如下所示: + +\begin{Verbatim}[] +\kaishu shell操作 +export JAVA_HOME=/usr/java/jdk1.8.0_112 +export HBASE_MANAGES_ZK=false +export HBASE_LOG_DIR=/home/hadoop/hbase-1.2.4/logs +export HBASE_PID_DIR=/home/hadoop/hbase-1.2.4/pids + +\kaishu 源码 +#include +int main(){ + printf("Hello Wolrd.\n"); + return 0; +} +\end{Verbatim} + + diff --git a/chapter/titlepage.tex b/chapter/titlepage.tex new file mode 100644 index 0000000..2806a8f --- /dev/null +++ b/chapter/titlepage.tex @@ -0,0 +1,31 @@ +\thispagestyle{empty} + +\vspace*{\stretch{1}} +\noindent\begin{minipage}{\textwidth} +\raggedleft +{\huge \bfseries AI学习与算法集成平台技术报告} +\noindent\rule[-1ex]{\textwidth}{5pt}\\[2.5ex] +\hfill\emph{\Large 泛能源大数据与战略研究中心} +\end{minipage} + +\vspace{\stretch{1}} +%\noindent\rlap{% +% \begin{minipage}{\textwidth} +% \linespread{1.67}\selectfont\raggedleft +% {\bfseries 文件编号:} 此处输入文档编号\\ +% {\bfseries 当前版本:} 此处输入版本号\\ +% {\bfseries 编 制:} 此处输入文档作者姓名 \\ +% {\bfseries 审 核:} 此处输入文档审核人姓名 \\ +% {\bfseries 批 准:} 此处输入文档批准人姓名 \\ +% {\bfseries 完成日期:} \today +% \end{minipage}% +%} + +\vspace{\stretch{2}} + +%\newpage\thispagestyle{empty} +\begin{quote}\footnotesize +% \textbf{(内部文档,未得许可,禁止外传)}\\ + 本文档版权归中国科学院青岛生物能源与过程研究所泛能源大数据与战略研究中心所有。\\ + Copyright \copyright{} 2022 Extended Energy Big Data and Strategy Research Center, Qingdao Institute of Bioenergy and Bioprocess Technology, Chinese Academy of Sciences. \\ +\end{quote} \ No newline at end of file diff --git a/chapter/version.tex b/chapter/version.tex new file mode 100644 index 0000000..899213a --- /dev/null +++ b/chapter/version.tex @@ -0,0 +1,26 @@ +\chapter*{文件修改控制} + +本章记录文档修改历史。 + +\begin{quote} +\kaishu +\textbf{版本号说明:}本文档采用的版本号格式为a.b.c,其中a代表重大的版本变迁,b代表在a版本下的重要内容更新,c代表关键性的bug修复。 + +\end{quote} + +\begin{table}[ht] +\centering + +\begin{tabular}{p{1cm}|p{1.5cm}|p{1.0cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.5cm}|p{3cm}} +\hline\hline + +编号 & 文件状态 & 版本 & 修改人 & 审核人 & 批准人 & 修改日期 & 备注 \\ +\hline +1 & 新建 & 1.0 & 张三 & & & 2017.6.15 & 创建文档架构、更新文档初稿\\ + + +\hline\hline + +\end{tabular} + +\end{table} diff --git a/document.out b/document.out new file mode 100644 index 0000000..5bf21bc --- /dev/null +++ b/document.out @@ -0,0 +1,28 @@ +\BOOKMARK [0][-]{chapter.1}{\376\377\137\000\156\220\147\072\126\150\133\146\116\140\136\163\123\360\151\202\217\360}{}% 1 +\BOOKMARK [1][-]{section.1.1}{\376\377\136\163\123\360\116\313\176\315}{chapter.1}% 2 +\BOOKMARK [1][-]{section.1.2}{\376\377\122\237\200\375\116\313\176\315}{chapter.1}% 3 +\BOOKMARK [2][-]{subsection.1.2.1}{\376\377\137\000\123\321\136\163\123\360}{section.1.2}% 4 +\BOOKMARK [2][-]{subsection.1.2.2}{\376\377\137\000\145\076\200\375\122\233}{section.1.2}% 5 +\BOOKMARK [2][-]{subsection.1.2.3}{\376\377\167\345\213\306\133\146\116\140}{section.1.2}% 6 +\BOOKMARK [0][-]{chapter.2}{\376\377\137\000\123\321\136\163\123\360}{}% 7 +\BOOKMARK [1][-]{section.2.1}{\376\377\000T\000e\000n\000s\000o\000r\000f\000l\000o\000w}{chapter.2}% 8 +\BOOKMARK [1][-]{section.2.2}{\376\377\000P\000y\000T\000o\000r\000c\000h}{chapter.2}% 9 +\BOOKMARK [1][-]{section.2.3}{\376\377\000S\000k\000l\000e\000a\000r\000n}{chapter.2}% 10 +\BOOKMARK [1][-]{section.2.4}{\376\377\121\166\116\326\176\317\121\170\137\000\156\220\152\041\127\213}{chapter.2}% 11 +\BOOKMARK [0][-]{chapter.3}{\376\377\137\000\145\076\200\375\122\233}{}% 12 +\BOOKMARK [1][-]{section.3.1}{\376\377\126\336\137\122\230\204\155\113}{chapter.3}% 13 +\BOOKMARK [2][-]{subsection.3.1.1}{\376\377\155\167\155\152\232\330\136\246\230\204\155\113}{section.3.1}% 14 +\BOOKMARK [2][-]{subsection.3.1.2}{\376\377\154\342\130\353\230\177\142\077\116\367\230\204\155\113}{section.3.1}% 15 +\BOOKMARK [2][-]{subsection.3.1.3}{\376\377\170\263\143\222\145\076\230\204\155\113}{section.3.1}% 16 +\BOOKMARK [2][-]{subsection.3.1.4}{\376\377\200\241\171\150\230\204\155\113}{section.3.1}% 17 +\BOOKMARK [1][-]{section.3.2}{\376\377\146\172\200\375\126\376\120\317}{chapter.3}% 18 +\BOOKMARK [2][-]{subsection.3.2.1}{\376\377\000M\000N\000I\000S\000T\142\113\121\231\117\123\122\006\174\173}{section.3.2}% 19 +\BOOKMARK [2][-]{subsection.3.2.2}{\376\377\126\376\162\107\145\207\133\127\213\306\122\053}{section.3.2}% 20 +\BOOKMARK [2][-]{subsection.3.2.3}{\376\377\166\356\150\007\150\300\155\113}{section.3.2}% 21 +\BOOKMARK [2][-]{subsection.3.2.4}{\376\377\146\172\200\375\126\376\120\317\122\006\122\162}{section.3.2}% 22 +\BOOKMARK [2][-]{subsection.3.2.5}{\376\377\116\272\117\123\121\163\225\056\160\271\150\300\155\113}{section.3.2}% 23 +\BOOKMARK [2][-]{subsection.3.2.6}{\376\377\126\376\120\317\165\037\142\020}{section.3.2}% 24 +\BOOKMARK [1][-]{section.3.3}{\376\377\201\352\161\066\213\355\212\000\131\004\164\006}{chapter.3}% 25 +\BOOKMARK [2][-]{subsection.3.3.1}{\376\377\145\207\147\054\140\305\141\037\122\006\174\173}{section.3.3}% 26 +\BOOKMARK [1][-]{section.1.3.A}{\376\377\124\004\152\041\127\127\152\041\127\213\147\015\122\241\143\245\123\343\145\207\150\143}{chapter.3}% 27 +\BOOKMARK [2][-]{subsection.1.3.A.1}{\376\377\126\336\137\122\230\204\155\113}{section.1.3.A}% 28 diff --git a/document.pdf b/document.pdf new file mode 100644 index 0000000..8410b5b Binary files /dev/null and b/document.pdf differ diff --git a/document.tex b/document.tex new file mode 100644 index 0000000..983ea24 --- /dev/null +++ b/document.tex @@ -0,0 +1,48 @@ +% !Mode:: "TeX:UT\left( F-8" +%\documentclass[a4paper, 12pt]{article} + +\documentclass[twoside]{linux_thesis} +\usepackage{latexsym,bm} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{graphicx} +\usepackage{enumitem} +\usepackage{setspace} +\usepackage{fontspec} +\usepackage{supertabular} +\usepackage{multirow} +\usepackage{ulem} +\usepackage{float} +\usepackage{hyperref} +\usepackage{appendix} %%!!!!!!!! +\usepackage{subfigure} +%\linespread{1.3} + +\definecolor{VerbatimColor}{rgb}{0.9,0.9,0.9} + +\begin{document} + +\newcommand{\shell}[1]{\noindent\texttt{\$: #1}} + +%\begin{titlepage} +%\titleLY +%\end{titlepage} + +\include{chapter/titlepage} + +%\include{chapter/version} + +\tableofcontents + +% 文档介绍 +\include{chapter/c1} + +% 通用样式 +\include{chapter/c2} + +% 通用样式 +\include{chapter/c3} + +%\include{chapter/appendix} + +\end{document} diff --git a/images/ch03/nlp/bert_classify.png b/images/ch03/nlp/bert_classify.png new file mode 100644 index 0000000..792e6b1 Binary files /dev/null and b/images/ch03/nlp/bert_classify.png differ diff --git a/images/ch03/regression/MLP.png b/images/ch03/regression/MLP.png new file mode 100644 index 0000000..0183db7 Binary files /dev/null and b/images/ch03/regression/MLP.png differ diff --git a/images/ch03/regression/annopoint.png b/images/ch03/regression/annopoint.png new file mode 100644 index 0000000..1abd713 Binary files /dev/null and b/images/ch03/regression/annopoint.png differ diff --git a/images/ch03/regression/boston_miss_rate.png b/images/ch03/regression/boston_miss_rate.png new file mode 100644 index 0000000..cb14966 Binary files /dev/null and b/images/ch03/regression/boston_miss_rate.png differ diff --git a/images/ch03/regression/non_normal_dist.png b/images/ch03/regression/non_normal_dist.png new file mode 100644 index 0000000..1ed9187 Binary files /dev/null and b/images/ch03/regression/non_normal_dist.png differ diff --git a/images/ch03/regression/non_normal_prob.png b/images/ch03/regression/non_normal_prob.png new file mode 100644 index 0000000..4db268c Binary files /dev/null and b/images/ch03/regression/non_normal_prob.png differ diff --git a/images/ch03/regression/normal_dist.png b/images/ch03/regression/normal_dist.png new file mode 100644 index 0000000..e7ca571 Binary files /dev/null and b/images/ch03/regression/normal_dist.png differ diff --git a/images/ch03/regression/normal_prob.png b/images/ch03/regression/normal_prob.png new file mode 100644 index 0000000..1dc0812 Binary files /dev/null and b/images/ch03/regression/normal_prob.png differ diff --git a/images/ch03/regression/ocean_prediction.png b/images/ch03/regression/ocean_prediction.png new file mode 100644 index 0000000..cc3ff19 Binary files /dev/null and b/images/ch03/regression/ocean_prediction.png differ diff --git a/images/ch03/regression/ocean_train_result.png b/images/ch03/regression/ocean_train_result.png new file mode 100644 index 0000000..625c161 Binary files /dev/null and b/images/ch03/regression/ocean_train_result.png differ diff --git a/images/ch03/regression/oceanwave_train.png b/images/ch03/regression/oceanwave_train.png new file mode 100644 index 0000000..0f94f84 Binary files /dev/null and b/images/ch03/regression/oceanwave_train.png differ diff --git a/images/ch03/vision/1.jpg b/images/ch03/vision/1.jpg new file mode 100644 index 0000000..879f393 Binary files /dev/null and b/images/ch03/vision/1.jpg differ diff --git a/images/ch03/vision/2.jpg b/images/ch03/vision/2.jpg new file mode 100644 index 0000000..4d53f28 Binary files /dev/null and b/images/ch03/vision/2.jpg differ diff --git a/images/ch03/vision/7.jpg b/images/ch03/vision/7.jpg new file mode 100644 index 0000000..21b5ecb Binary files /dev/null and b/images/ch03/vision/7.jpg differ diff --git a/images/ch03/vision/CLIP.jpg b/images/ch03/vision/CLIP.jpg new file mode 100644 index 0000000..4d13723 Binary files /dev/null and b/images/ch03/vision/CLIP.jpg differ diff --git a/images/ch03/vision/GAN.jpg b/images/ch03/vision/GAN.jpg new file mode 100644 index 0000000..d4c268f Binary files /dev/null and b/images/ch03/vision/GAN.jpg differ diff --git a/images/ch03/vision/LeNet-5.png b/images/ch03/vision/LeNet-5.png new file mode 100644 index 0000000..7dc6d19 Binary files /dev/null and b/images/ch03/vision/LeNet-5.png differ diff --git a/images/ch03/vision/blue_dog.png b/images/ch03/vision/blue_dog.png new file mode 100644 index 0000000..bd0961f Binary files /dev/null and b/images/ch03/vision/blue_dog.png differ diff --git a/images/ch03/vision/flower_blooms.png b/images/ch03/vision/flower_blooms.png new file mode 100644 index 0000000..18cf74f Binary files /dev/null and b/images/ch03/vision/flower_blooms.png differ diff --git a/images/ch03/vision/mnist_predict.png b/images/ch03/vision/mnist_predict.png new file mode 100644 index 0000000..6da5f37 Binary files /dev/null and b/images/ch03/vision/mnist_predict.png differ diff --git a/images/ch03/vision/ocr_result.png b/images/ch03/vision/ocr_result.png new file mode 100644 index 0000000..824207e Binary files /dev/null and b/images/ch03/vision/ocr_result.png differ diff --git a/images/ch03/vision/pose_esti.jpg b/images/ch03/vision/pose_esti.jpg new file mode 100644 index 0000000..4d53048 Binary files /dev/null and b/images/ch03/vision/pose_esti.jpg differ diff --git a/images/ch03/vision/pose_in.jpg b/images/ch03/vision/pose_in.jpg new file mode 100644 index 0000000..9f09038 Binary files /dev/null and b/images/ch03/vision/pose_in.jpg differ diff --git a/images/ch03/vision/pose_out.jpg b/images/ch03/vision/pose_out.jpg new file mode 100644 index 0000000..12c01c5 Binary files /dev/null and b/images/ch03/vision/pose_out.jpg differ diff --git a/images/ch03/vision/sunrise.png b/images/ch03/vision/sunrise.png new file mode 100644 index 0000000..3aec7b1 Binary files /dev/null and b/images/ch03/vision/sunrise.png differ diff --git a/images/ch03/vision/text2img.png b/images/ch03/vision/text2img.png new file mode 100644 index 0000000..134d044 Binary files /dev/null and b/images/ch03/vision/text2img.png differ diff --git a/images/ch03/vision/unet-label.jpg b/images/ch03/vision/unet-label.jpg new file mode 100644 index 0000000..f851cf0 Binary files /dev/null and b/images/ch03/vision/unet-label.jpg differ diff --git a/images/ch03/vision/unet-ori.jpg b/images/ch03/vision/unet-ori.jpg new file mode 100644 index 0000000..9b13c84 Binary files /dev/null and b/images/ch03/vision/unet-ori.jpg differ diff --git a/images/ch03/vision/unet.png b/images/ch03/vision/unet.png new file mode 100644 index 0000000..b60f7e0 Binary files /dev/null and b/images/ch03/vision/unet.png differ diff --git a/images/ch03/vision/unet_photovoltaic.png b/images/ch03/vision/unet_photovoltaic.png new file mode 100644 index 0000000..c281b9d Binary files /dev/null and b/images/ch03/vision/unet_photovoltaic.png differ diff --git a/images/ch03/vision/yolov5.png b/images/ch03/vision/yolov5.png new file mode 100644 index 0000000..81bad80 Binary files /dev/null and b/images/ch03/vision/yolov5.png differ diff --git a/images/ch03/vision/yolov5x_in.jpg b/images/ch03/vision/yolov5x_in.jpg new file mode 100644 index 0000000..6a78608 Binary files /dev/null and b/images/ch03/vision/yolov5x_in.jpg differ diff --git a/images/ch03/vision/yolov5x_out.jpg b/images/ch03/vision/yolov5x_out.jpg new file mode 100644 index 0000000..0b630a5 Binary files /dev/null and b/images/ch03/vision/yolov5x_out.jpg differ diff --git a/linux_thesis.cls b/linux_thesis.cls new file mode 100644 index 0000000..95e4c29 --- /dev/null +++ b/linux_thesis.cls @@ -0,0 +1,214 @@ +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{linux_thesis}[] + + + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}} +\ProcessOptions + +%Minimum xeCJK version:3.2.10, date:2014/03/01 +\PassOptionsToPackage{CJKchecksingle}{xeCJK} + +%采用5号字体 +\LoadClass[c5size,a4paper,fancyhdr,fntef]{ctexbook} + +%Chinese font size +\newcommand{\chuhao} {\fontsize{42pt} {\baselineskip}\selectfont} +\newcommand{\xiaochu} {\fontsize{36pt} {\baselineskip}\selectfont} +\newcommand{\xiaochuhao}{\fontsize{36pt} {\baselineskip}\selectfont} +\newcommand{\yihao} {\fontsize{28pt} {\baselineskip}\selectfont} +\newcommand{\erhao} {\fontsize{21pt} {\baselineskip}\selectfont} +\newcommand{\xiaoer} {\fontsize{18pt} {\baselineskip}\selectfont} +\newcommand{\xiaoerhao} {\fontsize{18pt} {\baselineskip}\selectfont} +\newcommand{\sanhao} {\fontsize{15.75pt}{\baselineskip}\selectfont} +\newcommand{\xiaosan} {\fontsize{15pt} {\baselineskip}\selectfont} +\newcommand{\xiaosanhao}{\fontsize{15pt} {\baselineskip}\selectfont} +\newcommand{\sihao} {\fontsize{14pt} {\baselineskip}\selectfont} +\newcommand{\xiaosi} {\fontsize{12pt} {\baselineskip}\selectfont} +\newcommand{\xiaosihao} {\fontsize{12pt} {\baselineskip}\selectfont} +\newcommand{\wuhao} {\fontsize{10.5pt} {\baselineskip}\selectfont} +\newcommand{\xiaowu} {\fontsize{9pt} {\baselineskip}\selectfont} +\newcommand{\xiaowuhao} {\fontsize{9pt} {\baselineskip}\selectfont} +\newcommand{\liuhao} {\fontsize{7.875pt}{\baselineskip}\selectfont} +\newcommand{\qihao} {\fontsize{5.25pt} {\baselineskip}\selectfont} + +%=================================================================== +%版面细节设置 +%=================================================================== +\RequirePackage{geometry} %控制版面大小 +\geometry{left=25.4mm, right=25.4mm, top=25.4mm, bottom=25.4mm} + +%调整段间距 +%\setlength{\parskip}{1.5ex plus0.5ex minus 0.5ex} +\setlength{\parskip}{0ex} + +%设置页眉页脚 +\pagestyle{fancy} +\fancyhf{} +\fancyhead[EL,OR]{\thepage} +\fancyhead[OC]{\nouppercase{\fangsong\rightmark}} +\fancyhead[EC]{\nouppercase{\fangsong\leftmark}} +%=================================================================== + + +%=================================================================== +%定义章节标题格式(ps:参考ctex宏包使用) +%=================================================================== +\RequirePackage{titletoc} +\RequirePackage{titlesec} + +\CTEXsetup[number={\arabic{chapter}}]{chapter} + +\titleformat{\chapter}[display] +{\bfseries\Large} +{\filleft \Huge 第 {\thechapter} 章} +{4ex} +{\titlerule +\vspace{2ex}% +\filright} +[\vspace{2ex}% +\titlerule] + +\CTEXsetup[name={\S\,,}]{section} +\CTEXsetup[name={\S\,,}]{subsection}%在序号前面添加 \S 符号 +%\CTEXsetup[name={\S\,,}]{subsubsection}%在序号前面添加 \S 符号 +\CTEXsetup[format={\large\bfseries\flushleft}]{section} +\CTEXsetup[format={\bfseries\flushleft}]{subsection} +%=================================================================== + +%=================================================================== +%设置目录格式 +%=================================================================== +\CTEXoptions[contentsname={\hfill 目\rule{\ccwd}{0pt}录 \hfill}] % 设置目录格式 + +\titlecontents{chapter}[0em] + {\vspace{6bp}\sihao\bfseries}%14pt,如果希望美观一些,可以无视章节标题用宋体的规定,自行添加\bfseries + {\thecontentslabel\hspace*{0.5em}} + {} + {\titlerule*[0.5pc]{$\cdot$}\contentspage} +\titlecontents{section}[1.1\ccwd] + {\vspace{1bp} \xiaosi} + {\thecontentslabel\hspace*{0.5em}} + {} + {\titlerule*[0.5pc]{$\cdot$}\contentspage} +\titlecontents{subsection}[2.5\ccwd]%原来是2.3 + {\vspace{1bp} \wuhao}%规定三级标题是10.5pt + {\thecontentslabel\hspace*{0.5em}} + {} + {\titlerule*[0.5pc]{$\cdot$}\contentspage} +%================================================================ + + + +%设置图片、表格标题的格式 +\RequirePackage[oneline]{caption2} +\renewcommand{\captionlabeldelim}{\rule{\ccwd}{0pt}} %设置标题的分隔符,默认为 : +\captionsetup{labelfont+={bf}} %作用和以下三句相同 +%\DeclareCaptionFont{cs4size}{\xiaosi} +%\captionsetup{labelfont={cs4size,bf}} +%\captionsetup{textfont=cs4size} +\makeatletter +\renewcommand{\thefigure}{\thesection-\@arabic\c@figure} +\renewcommand{\thetable}{\thesection-\@arabic\c@table} +\makeatother + +\RequirePackage{enumitem} %控制罗列环境需要的包 +\setitemize{topsep=0pt} %设置 itemize 罗列环境顶端距离 + +\RequirePackage{mdwlist} %与正文等行距的罗列环境 + +%=================================================================== +%长表格环境设置 +%=================================================================== +\RequirePackage{longtable} %长表格 +%\setlength{\LTpre}{0pt} %设置 longtable 与上文的距离 +%\setlength{\LTpost}{0pt} %设置 longtable 与下文的距离 +\renewcommand{\arraystretch}{1.3} %设置 longtable 行距的基本拉伸值 +\RequirePackage{booktabs} %制作表格粗框线 +%=================================================================== + +%\renewcommand{\thefootnote}{\fnsymbol{footnote}} + +\RequirePackage{fancyvrb} +\fvset{listparameters=\setlength\topsep{0pt}} + +%=================================================================== +%设置一个源码输入环境 +%=================================================================== +\RequirePackage{fancybox} +\RequirePackage{framed} +\usepackage{color} +% Redefine these colors to your liking in the preamble. +\definecolor{TitleColor}{rgb}{0.126,0.263,0.361} +\definecolor{InnerLinkColor}{rgb}{0.208,0.374,0.486} +\definecolor{OuterLinkColor}{rgb}{0.216,0.439,0.388} +% Redefine these colors to something if you want to have colored +% background and border for code examples. +\definecolor{VerbatimColor}{rgb}{0.933,0.933,0.933} +\definecolor{VerbatimBorderColor}{rgb}{1,1,1} + +% Redefine the Verbatim environment to allow border and background colors. +% The original environment is still used for verbatims within tables. +\let\OriginalVerbatim=\Verbatim +\let\endOriginalVerbatim=\endVerbatim + +\makeatletter +% Play with vspace to be able to keep the indentation. +\newlength\distancetoright +\def\mycolorbox#1{% + \setlength\distancetoright{\linewidth}% + \advance\distancetoright -\@totalleftmargin % + \fcolorbox{VerbatimBorderColor}{VerbatimColor}{% + \begin{minipage}{\distancetoright}% + #1 + \end{minipage}% + }% +} +\def\FrameCommand{\mycolorbox} +\makeatother + +\renewcommand{\Verbatim}[1][1]{% + \vspace{-1ex} %引入设置,减小与上下文之间的空白 + % list starts new par, but we don't want it to be set apart vertically + \bgroup\parskip=0pt% + %\smallskip% + % The list environement is needed to control perfectly the vertical + % space. + \list{}{% + \setlength\parskip{0pt}% + \setlength\itemsep{0ex}% + \setlength\topsep{0ex}% + \setlength\partopsep{0pt}% + \setlength\leftmargin{0pt}% + }% + \item\MakeFramed {\FrameRestore}% + \small% + \OriginalVerbatim[#1]% +} +\renewcommand{\endVerbatim}{% + \endOriginalVerbatim% + \endMakeFramed% + \endlist% + % close group to restore \parskip + \egroup% +} +%=================================================================== + + +\RequirePackage{wrapfig} +\RequirePackage{makecell} + +%表格中插入图片居中 +\newcommand\mgape[1]{\gape{$\vcenter{\hbox{#1}}$}} +%表格中换行 +%\tabincell{c}{haha// heihei//zeze} +%\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} +%\makecell[c]{haha \\ hehe} +\renewcommand\cellalign{tc} + +%加载各种预设值的封面 +\RequirePackage{titlepage/ManyTitlePage} + +\RequirePackage{metalogo} + +\endinput diff --git a/pic/example.png b/pic/example.png new file mode 100644 index 0000000..8be3acb Binary files /dev/null and b/pic/example.png differ diff --git a/titlepage/ManyTitlePage.orig.sty b/titlepage/ManyTitlePage.orig.sty new file mode 100644 index 0000000..daac712 --- /dev/null +++ b/titlepage/ManyTitlePage.orig.sty @@ -0,0 +1,1015 @@ + + +%\usepackage{pst-text} + +%%%% Additional font macros +\makeatletter +%%%% light series +%% e.g., s:12 +\DeclareRobustCommand\ltseries + {\not@math@alphabet\ltseries\relax + \fontseries\ltdefault\selectfont} +%% e.g., t:32 +\newcommand{\ltdefault}{l} +%% e.g., v:19 +\DeclareTextFontCommand{\textlt}{\ltseries} + +% heavy(bold) series +\DeclareRobustCommand\hbseries + {\not@math@alphabet\hbseries\relax + \fontseries\hbdefault\selectfont} +%% e.g., t:32 +\newcommand{\hbdefault}{hb} +%% e.g., v:19 +\DeclareTextFontCommand{\texthb}{\hbseries} +\makeatother + +\newcommand*{\isbn}{{\small\textsc{ISBN}}} + +%%% for the Web-O-Mints fonts +\newcommand*{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}} +%\renewcommand*{\wb}[2]{}% probably kills Web-O-Mints (and some layouts?) +%%% for the Fontsite 500 fonts +\newcommand*{\FSfont}[1]{% + \fontencoding{T1}\fontfamily{#1}\selectfont} +%\renewcommand*{\FSfont}[1]{}% kills special font selections + +\newcommand*{\labelit}[1]{\phantomsection\label{#1}} +\newcommand*{\refit}[1]{(graphic on page~\pageref{#1})} + +\newcommand*{\plogo}{GNU} + +\makeatother + +\DeclareRobustCommand{\cs}[1]{\texttt{\char`\\#1}} +\newlength{\tpheight}\setlength{\tpheight}{0.9\textheight} +\newlength{\txtheight}\setlength{\txtheight}{0.9\tpheight} +\newlength{\tpwidth}\setlength{\tpwidth}{0.9\textwidth} +\newlength{\txtwidth}\setlength{\txtwidth}{0.9\tpwidth} +\newlength{\drop} + +\newenvironment{showtitle}{% + \begin{boxminipage}[c][\tpheight]{\tpwidth} + \centering\begin{vplace}\begin{minipage}[c][\txtheight]{\txtwidth}}% +{\end{minipage}\end{vplace}\end{boxminipage}} + +\definecolor{Dark}{gray}{.2} +\definecolor{MedDark}{gray}{.4} +\definecolor{Medium}{gray}{.6} +\definecolor{Light}{gray}{.8} + +\newcommand*{\titleJT}{\begingroup% Jan Tschichold: typographer +\FSfont{5gm}% Garamond +\drop = 0.08\txtheight +\vspace*{\drop} +\hspace*{0.3\txtwidth} +{\Large The Author}\\[2\drop] +\hspace*{0.3\txtwidth}{\Huge\itshape The Big Book of}\par +{\raggedleft\Huge\itshape Conundrums\par} +\vfill +\hspace*{0.3\txtwidth}{\Large \plogo} \\[0.5\baselineskip] +\hspace*{0.3\txtwidth}{\Large The Publisher} +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleTH}{\begingroup% T&H Typography +\raggedleft +\vspace*{\baselineskip} +{\Large The Author}\\[0.167\txtheight] +{\bfseries The Big Book of}\\[\baselineskip] +{\textcolor{Red}{\Huge CONUNDRUMS}}\\[\baselineskip] +{\small With 123 illustrations}\par +\vfill +{\Large The Publisher \plogo}\par +\vspace*{3\baselineskip} +\endgroup} + +\newcommand*{\titleM}{\begingroup% Misericords, T&H p 153 +\drop = 0.08\txtheight +\centering +\vspace*{\drop} +{\Huge\bfseries Conundrums}\\[\baselineskip] +{\scshape puzzles for the mind}\\[\baselineskip] +{\scshape by}\\[\baselineskip] +{\large\scshape the author}\par +\vfill +{\plogo}\\[0.5\baselineskip] +{\scshape the publisher}\par +\vspace*{2\drop}\endgroup} + +\newcommand*{\titleS}{\begingroup% Scripts, T&H p 151 +\drop = 0.1\txtheight +\centering +\vspace*{\drop} +{\Huge Conundrums}\\[\baselineskip] +{\large\itshape by The Author}\\[\baselineskip] +\vfill +\rule{0.4\txtwidth}{0.4pt}\\[\baselineskip] +{\large\itshape The Publisher}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleHGP}{\begingroup% Handy Guide to Papermaking +\drop=0.1\txtheight +\begin{minipage}[t]{0.05\txtwidth} + \color{Red} + \rule{6pt}{\txtheight} +\end{minipage} +\hspace{0.05\txtwidth} +\begin{minipage}[t]{0.6\txtwidth} + \vspace*{\drop} + {\Large THE AUTHOR} \\ + \rule{0.9\txtwidth}{1pt} \par + \vspace{3\baselineskip} + {\noindent\Huge\bfseries CONUNDRUMS} \par + \vspace{2\baselineskip} + {\Large\itshape A Handy Guide to Puzzles and Enigmas} \par + \vspace{6.5\baselineskip} + {\scshape after the foreign edition of year \\ + translated by} \par +\vspace{0.1\baselineskip} + {\Large THE TRANSLATOR} \par + \vspace{\baselineskip} + \rule{0.9\txtwidth}{1pt} \par + \vspace{\baselineskip} + {\Large THE PUBLISHER} +\end{minipage} +\hfill +\begin{minipage}[t]{0.15\txtwidth} + {\color{Red} + \FSfont{5fh}% FontSite Fette Gotisch + \HUGE + \vspace{3.3\baselineskip} + H \\[1.15\baselineskip] + G \\[1.15\baselineskip] + P \\[1.15\baselineskip] + E +}\par + \vspace{4\baselineskip} + {\Large YEAR} +\end{minipage} +\endgroup} + + +\newcommand*{\titleRF}{\begingroup% Robert Frost, T&H p 149 +\FSfont{5bo}% Bembo/Bergamo +\drop = 0.2\txtheight +\centering +\vfill +{\Huge The Big Book of}\\[\baselineskip] +{\Huge CONUNDRUMS}\\[\baselineskip] +{\large Edited by The Editor}\\[0.5\drop] +{\Large \plogo}\\[0.5\baselineskip] +{\Large The Publisher}\par +{\large\scshape year}\par +\vfill\null +\endgroup} + +\newcommand*{\titleDB}{\begingroup% Design of Books, by Adrian Wilson +\FSfont{5pl}% Palatino/Palladio +\drop = 0.14\txtheight +\centering +\vspace*{\drop} +{\Large THE}\\[\baselineskip] +{\Huge BIG BOOK}\\[\baselineskip] +{\Huge OF}\\[\baselineskip] +{\Huge CONUNDRUMS}\\[1.5\baselineskip] +{\LARGE BY}\\[\baselineskip] +{\LARGE THE AUTHOR}\par +%\begin{vplace} +\vfill +{FOREWORD BY AN OTHER}\\[8\baselineskip] +%\end{vplace} +\vfill +{\small\sffamily THE PUBLISHER}\par +\endgroup} + +\newcommand*{\titleAM}{\begingroup% Ancient Mariner, AW fig 11-20, p. 151 +\FSfont{5bo}% Bembo/Bergamo +\drop = 0.12\txtheight +\centering +\vspace*{\drop} +{\large The Author}\\[\baselineskip] +{\Huge THE BIG BOOK}\\[\baselineskip] +{\Large OF}\\[\baselineskip] +{\Huge CONUNDRUMS}\\[\baselineskip] +{\scshape with ten engravings}\\ +{\scshape and with a foreword by}\\ +{\large\scshape an other}\\[\drop] +{\plogo}\\[0.5\baselineskip] +{\small\scshape the publisher}\par +{\small\scshape year}\par +\vfill\null +\endgroup} + +\newcommand*{\titleP}{\begingroup% The Pyramids, AW fig 6-15, p. 81 +\FSfont{5bo}% Bembo/Bergamo +\drop = 0.12\txtheight +\vspace*{\drop} +\hspace*{0.3\txtwidth} +{\Huge SOME}\\[\baselineskip] +\hspace*{0.3\txtwidth} +{\Huge CONUNDRUMS}\par +\vspace*{3\drop} +{\large By THE AUTHOR} +\vfill +{\scshape the publisher} +\vspace*{0.5\drop} +\endgroup} + +\newcommand*{\titleHL}{\begingroup% Horizontal Line +\drop = 0.4\txtheight +\vspace*{\drop} +\hfill{\large The Author} \\ +\rule{\txtwidth}{0.4pt} + +\vspace*{\baselineskip} +{\Huge CONUNDRUMS}\par +\vfill +{\centering The Publisher\par} +\vspace*{\baselineskip} +\endgroup} + +\newcommand*{\titleVL}{\begingroup% Vertical Line +\drop = 0.1\txtheight +\vspace*{\drop} + \hbox{% + \hspace*{0.2\txtwidth}% + \vrule depth 0.6\txtheight% + \hspace*{2em}% + \vbox{% + \vspace{\drop} + {\noindent\large The Author}\\[3\baselineskip] + {\Huge Conundrums}\par + \vfil + }% end of vbox + }% end of hbox +\begin{center} +The Publisher +\end{center} +\null +\endgroup} + +\newcommand*{\titleGM}{\begingroup% Gentle Madness +\drop = 0.1\txtheight +\vspace*{\baselineskip} +\vfill + \hbox{% + \hspace*{0.2\txtwidth}% + \rule{1pt}{\txtheight} + \hspace*{0.05\txtwidth}% +%\fbox{% +\parbox[b]{0.75\txtwidth}{ + \vbox{% + \vspace{\drop} + {\noindent\HUGE\bfseries Some\\[0.5\baselineskip] Conundrums}\\[2\baselineskip] + {\Large\itshape Puzzles for the Mind}\\[4\baselineskip] + {\Large THE AUTHOR}\par + \vspace{0.5\txtheight} + {\noindent The Publisher}\\[\baselineskip] + }% end of vbox +}% end of parbox +%}% end of fbox + }% end of hbox +\vfill +\null +\endgroup} + +\newcommand*{\titlePM}{\begingroup% Gentle Madness with Printers' Ornaments +\drop = 0.1\txtheight +\vspace*{\baselineskip} +\vfill + \hbox{% + \hspace*{0.1\txtwidth}% + {\wb{18pt}{18pt} + \begin{picture}(0,0) + \multiput(0,0)(0,20){22}{\textcolor{Medium}{Q}} + \end{picture} + } +% \rule{1pt}{\txtheight} + \hspace*{0.15\txtwidth}% +\parbox[b]{0.75\txtwidth}{ + \vbox{% + \vspace{\drop} + {\noindent\HUGE\bfseries Some\\[0.5\baselineskip] Conundrums}\\[2\baselineskip] + {\Large\itshape Puzzles for the Mind}\\[4\baselineskip] + {\Large THE AUTHOR}\par + \vspace{0.5\txtheight} + {\noindent The Publisher}\\[\baselineskip] + }% end of vbox +}% end of parbox + }% end of hbox +\vfill +\null +\endgroup} + +\newcommand*{\titleAT}{\begingroup% Anatomy of a Typeface +%\FSfont{5gr}% Galliard/Gareth +\FSfont{5bo}% Bergamo/Bembo +\drop=0.1\txtheight +\vspace*{\drop} +\rule{\txtwidth}{1pt}\par +\vspace{2pt}\vspace{-\baselineskip} +\rule{\txtwidth}{0.4pt}\par +\vspace{0.5\drop} +\centering +\textcolor{Red}{%\FSfont{5cz}% Chisel +{\FSfont{5ml}\Huge THE BOOK}\\[0.5\baselineskip] +{\FSfont{5ml}\Large OF}\\[0.75\baselineskip]% Delphian (5dp) +{\FSfont{5ml}\Huge CONUNDRUMS}}% Mona Lisa +\par +\vspace{0.25\drop} +\rule{0.3\txtwidth}{0.4pt}\par +\vspace{\drop} +{\Large \scshape The Author}\par +\vfill +{\large \textcolor{Red}{\plogo}}\\[0.5\baselineskip] +{\large\scshape the publisher}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleLL}{\begingroup% Lost Languages +\drop=0.1\txtheight +\fboxsep 0.5\baselineskip +\sffamily +\vspace*{\drop} +\centering +{\textcolor{SkyBlue}{\HUGE CONUNDRUMS}}\par +\vspace{0.5\drop} +\colorbox{Dark}{\textcolor{white}{\normalfont\itshape\Large Puzzles for the Mind}}\par +\vspace{\drop} +{\Large The Author}\par +\vfill +{\footnotesize THE PUBLISHER}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleCC}{\begingroup% City of Cambridge +\drop=0.1\txtheight +\vspace*{\drop} +\centering +{\Large\itshape THE BIG BOOK OF}\\[0.5\drop] +{\textcolor{Red}{\HUGE\bfseries CONUNDRUMS}}\par +\vspace{\drop} +{\LARGE\itshape VOLUME 1: SOCIAL AND MORAL}\par +\vfill +{\Large THE AUTHOR}\par +\vfill +{\plogo}\\[0.5\baselineskip] +{\itshape THE PUBLISHER}\par +{\scshape year}\par +%\vfill +\vspace*{\drop} +\endgroup} + + +\newcommand*{\titleDS}{\begingroup% DS Thesis +\drop=0.1\txtheight +%\vspace*{\drop} +\centering +{\Large\bfseries CONUNDRUMS CONSIDERED AS PUZZLES FOR THE MIND}\par +\vspace{0.6\baselineskip} +{By}\\[0.6\baselineskip] +{The Candidate\\[0.6\baselineskip] +A Thesis Submitted to the Graduate\\[0.5\baselineskip] +Faculty of The University\\[0.5\baselineskip] +in Partial Fulfillment of the\\[0.5\baselineskip] +Requirements for the Degree of\\[0.5\baselineskip] +DEGREE\\[0.5\baselineskip] +Major Subject: Logic}\par + +\flushleft +{Approved by the \\ + Examining Committee:}\par +\vspace{1.5\baselineskip} +\rule{15em}{0.4pt}\\ +A Professor, Thesis Advisor \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +Another Professor, Thesis Advisor \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +A Faculty, Member \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +Another Faculty, Member \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +A Third Faculty, Member\par +\centering +\vspace{1\baselineskip} +The University \\ +The Address \\[\baselineskip] +The Date\par +\vfill +\endgroup} + +\newcommand*{\titleMS}{\begingroup% MS Thesis +\drop=0.1\txtheight +\vspace*{\drop} +\centering +{\LARGE THE UNIVERSITY}\\[2\baselineskip] +{\LARGE\sffamily Conundrums: \\ puzzles for the mind\par} +\vfill +{\LARGE THESIS}\par +\vspace{\drop} +{\large some remarks concerning the supervisor \\ + and the time and place of the examination \\ + and other administrative details\par} +\vfill +{\large\bfseries The Candidate}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titlePW}{\begingroup% PW Thesis +\ttfamily +\drop=0.1\txtheight +\vspace*{\drop} +\centering +{\Large%\bfseries + SOME REMARKS \\ ON CONUNDRUMS \\ AS PUZZLES FOR THE MIND\par} +\vspace*{\drop} +{\large by}\par +\vspace*{\drop} +{\Large THE CANDIDATE}\par +\vfill +\raggedright +{\Large + Thesis submitted to The University for the degree of + DEGREE, Month year.\par} +\vfill +\null +\endgroup} + +\newcommand*{\titleUL}{\begingroup% University of Liege +\drop=0.1\txtheight +\vspace*{\drop} +\begin{center} +{\LARGE\textsc{THE UNIVERSITY}}\\[\drop] +% University logo +{\LARGE \plogo}\\[\drop] + +\rule{\txtwidth}{1pt}\par +\vspace{0.5\baselineskip} +{\huge\bfseries Conundrums: An Investigation of Mind Puzzles\\ + \large --- in N pages, with T tables ---}\\[0.5\baselineskip] +\rule{\txtwidth}{1pt}\par + +\vfill + +% fake a footnote reference here +{\Large\textsc{The\textsuperscript{1} Candidate}} + +\vfill + +City, Country + +\vfill + +{\large The Date} +\end{center} + +% faked footnote +\vspace{-0.5\baselineskip} +\noindent\rule{0.4\txtwidth}{0.4pt} \\ +\textsuperscript{1} \url{email.address} +\endgroup} + + +\newcommand*{\titleASU}{% +\begingroup +\FSfont{ptm}% Times +\begin{center} +CONTINUING CONONDRUMS IN THE TYPOGRAPHIC REQUIREMENTS FOR THESIS \\ +by \\ +Im A. Student + +\vfill + +A Polemic Presented in Partial Fulfillment \\ +of the Requirements for the Degree \\ +Name of Degree + +\vfill + +THE UNIVERSITY + +The Date +\end{center} +\endgroup} + +\newcommand*{\titleSW}{\begingroup% Story of Writing +\raggedleft +\vspace*{\baselineskip} +{\Huge\itshape The Book \\ of Conundrums}\\[\baselineskip] +{\large\itshape With over 120 illustrations, 50 in color}\\[0.2\textheight] +{\Large The Author}\par +\vfill +{\Large \plogo{} \sffamily The Publisher} +\vspace*{\baselineskip} +\endgroup} + +\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat +\drop=0.1\txtheight +\centering +\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS} +\vspace*{\baselineskip} +{\large\scshape the author}\\[\baselineskip] +\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} +\rule{\unitlength}{0.4pt}\\[\baselineskip] +{\LARGE THE BOOK OF CONUNDRUMS}\\[\baselineskip] +{\itshape puzzles for the mind}\\[0.2\baselineskip] +\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} +\rule{\unitlength}{1.6pt}\\[\baselineskip] +{\large\scshape drawings by the artist}\par +\vfill +{\large\scshape the publisher}\\[\baselineskip] +{\small\scshape year}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleFT}{\begingroup% John Fell Types +\ifxetex + \fontspec[Alternate=0]{IM_FELL_Double_Pica_PRO_Roman} +\else + \FSfont{fxlj}% Libertine +\fi +\begin{center} +\vfill +{\HUGE \textcolor{Red}{JOHN FELL} \\} +\vfill +{\Huge THE UNIVERSITY PRESS AND +THE `FELL TYPES' \\} +\vfill +{\Large THE PUNCHES AND MATRICES DESIGNED FOR PRINTING + IN THE GREEK, LATIN, ENGLISH, AND ORIENTAL LANGUAGES + BEQUETHED IN 1686 TO \\} +\vfill +{\LARGE THE UNIVERSITY OF OXFORD + BY JOHN FELL, D.D.\\} +\vfill +{DELEGATE OF THE PRESS, DEAN OF CHRISTCHURCH + VICE-CHANCELLOR OF THE UNIVERSITY +AND BISHOP OF OXFORD \\} +\vfill +{\Large BY\\} +{\LARGE STANLEY MORISON \\} +{WITH THE ASSISTANCE OF\\} +{\large HARRY CARTER\\} +\vfill +\plogo +\vfill +{\LARGE THE PUBLISHER \\} +{\large YEAR} +\vfill +\end{center} +\endgroup} + +\renewcommand*{\titleFT}{\begingroup% John Fell Types +\ifxetex + \fontspec[Alternate=0]{IM_FELL_Double_Pica_PRO_Roman} +\else + \FSfont{fxlj}% Libertine +\fi +\begin{center} +\vfill +{\HUGE \textcolor{Red}{THE DONOR} \\} +\vfill +{\Huge THE UNIVERSITY AND +THE `DONOR' CONUNDRUMS \\} +\vfill +{\Large THE PUZZLES \& ENIGMAS \\ PRESENTED IN 1768 TO \\} +%\vfill +{\LARGE THE UNIVERSITY OF CITY \\ + BY THE DONOR\\} +%\vfill +{\footnotesize WHO HAS ACHIEVED A VARIETY OF ACADEMIC \\ + AND OTHER DISTINCTIONS \\} +\vfill +{\large BY\\} +{\LARGE THE AUTHOR \\} +{\footnotesize WITH THE ASSISTANCE OF\\} +{\large THE ASSISTANT\\} +\vfill +\plogo +\vfill +{\LARGE THE PUBLISHER \\} +{\large YEAR} +\vfill +\end{center} +\endgroup} + +\newcommand*{\titleJE}{\begingroup% Jane Eyre +%\FSfont{5cd}% Clarendon +\FSfont{5cu}% Century Old Style +\vspace*{2\baselineskip} +{\Large\bfseries The Author}\\[2\baselineskip] +\begin{center} +{\Huge\bfseries CONUNDRUMS} +\end{center} +\vspace*{4\baselineskip} +{\Large\bfseries Illustrations by The Artist}\par +\vfill +\begin{center} +{\Large{\bfseries The Publisher $\bullet$} \scshape year} +\end{center} +\vspace*{2\baselineskip} +\endgroup} + +\newcommand*{\cdiam}{\prec\kern-2pt\succ} +\newcommand*{\titleZD}{\begingroup% Zuleika Dobson +\vspace*{2\baselineskip} +\centering +\begin{picture}(240,0) + \multiput(0,0)(24,0){10}{{\wb{10}{12}4}} + \multiput(-5,-21)(0,-24){15}{\rotatebox{90}{{\wb{10}{12}4}}} + \multiput(0,-360)(24,0){10}{{\wb{10}{12}4}} + \multiput(235,-21)(0,-24){15}{\rotatebox{90}{{\wb{10}{12}4}}} + \put(0,0){\begin{minipage}[t]{240pt} + \centering + \vspace*{2\baselineskip} + {\Huge Selected Conundrums}\\ + {\large\itshape --- puzzles for the mind ---} \\[0.5\baselineskip] + {\large WITH ILLUSTRATIONS BY} \\[0.5\baselineskip] + {\large THE AUTHOR } \\[0.5\baselineskip] + {\LARGE T. H. E. AUTHOR} \par + \vspace*{5\baselineskip} + $\cdiam$\\[0.25\baselineskip] + $\cdiam\cdiam\cdiam$\\[0.25\baselineskip] + $\cdiam\cdiam\cdiam\cdiam\cdiam$\\[0.25\baselineskip] + $\cdiam\cdiam\cdiam$\\[0.25\baselineskip] + $\cdiam$\par + \vspace*{5\baselineskip} + {\Large THE PUBLISHER}\\ + {\Large\scshape year}\par + \vspace*{2\baselineskip} + \end{minipage}} +\end{picture} +\vfill +\null +\endgroup} + +\newcommand*{\titleWH}{\begingroup% Words in their Hands +\drop = 2\baselineskip +\centering +\vspace*{\drop} +{\Huge SOME CONUNDRUMS}\\[\drop] +\scalebox{8}[1]{{\wb{10}{12}4}}\\[\drop] +{\Large\itshape A Collection of Puzzles by}\\[\baselineskip] +{\Large THE AUTHOR}\\[\baselineskip] +{\wb{10}{12}4}\\[\baselineskip] +{\Large\itshape with a Commentary by}\\[\baselineskip] +{\Large A N OTHER}\par +\vfill +\scalebox{8}[1]{{\wb{10}{12}4}}\\[\drop] +{\Large THE PUBLISHER}\\ +{\scshape year}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleBWF}{\begingroup% Beowulf +\drop = 0.1\txtheight +\parindent=0pt +\vspace*{\drop} +{\Huge\bfseries Conundrums}\\[\baselineskip] +{\Large {\itshape Translated by} {\scshape the translator}}\par +\vfill +\plogo\\[0.2\baselineskip] +{\Large\itshape The Publisher} +\vspace*{\drop} +\endgroup} + + +\newcommand*{\titleSI}{\begingroup% Sagas +\drop = 0.13\txtheight +\centering +\vspace*{\drop} +{\Huge CONUNDRUMS FOR}\\[\baselineskip] +{\Huge THE MIND}\\[\baselineskip] +{\Huge\itshape A Selection}\\[3\baselineskip] +{\Large \textit{Preface by} \textsc{famous person}}\\ +{\Large \textit{Introduction by} \textsc{an other}}\par +\vfill +{\Large THE PUBLISHER}\par +\vspace*{\drop} +\endgroup} + + + +\newcommand*{\titleGP}{\begingroup% Geometric Modeling +\drop=0.1\txtheight +\centering +\vspace*{\baselineskip} +\rule{\txtwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} +\rule{\txtwidth}{0.4pt}\\[\baselineskip] +{\LARGE CONUNDRUMS\\ AND \\[0.3\baselineskip] PUZZLES}\\[0.2\baselineskip] +\rule{\txtwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} +\rule{\txtwidth}{1.6pt}\\[\baselineskip] +\scshape +Selected and Expanded Papers from the Organisation Working Conference +on \\ Enigmas \\ +Location, date from--to\par +\vspace*{2\baselineskip} +Edited by \\[\baselineskip] +{\Large FIRST EDITOR \\ SECOND EDITOR \\ THIRD EDITOR\par} +{\itshape Organisation \\ Address\par} +\vfill +\plogo\\ +{\scshape year} \\ +{\large THE PUBLISHER}\par +\endgroup} + +\newcommand*{\rotrt}[1]{\rotatebox{90}{#1}} +\newcommand*{\rotlft}[1]{\rotatebox{-90}{#1}} +\newcommand*{\topb}{% + \resizebox*{\unitlength}{\baselineskip}{\rotrt{$\}$}}} +\newcommand*{\botb}{% + \resizebox*{\unitlength}{\baselineskip}{\rotlft{$\}$}}} +\newcommand*{\titleBC}{\begingroup% Bookbinding & Conservation +\FSfont{5jr}% Jenson Recut (Centaur) +\begin{center} +\def\CP{\textit{\HUGE Conundrums \& Puzzles}} +\settowidth{\unitlength}{\CP} +%{\color{LightGoldenrod}\( \overbrace{\hspace{\unitlength}} \)} \\[\baselineskip] +{\color{LightGoldenrod}\topb} \\[\baselineskip] +\textcolor{Sienna}{\CP} \\[\baselineskip] +{\color{RosyBrown}\LARGE A SIXTY-YEAR STUDY} \\ +%{\color{LightGoldenrod}\( \underbrace{\hspace{\unitlength}} \)} +{\color{LightGoldenrod}\botb} +\end{center} +\vfill +\begin{center} +{\LARGE\textbf{The Author}}\\ +\vfill +\plogo\\[0.5\baselineskip] +YEAR +\end{center} +\endgroup} + +\newcommand*{\titleHC}{\begingroup% Harry Carter +\FSfont{fxlj}% Libertine +\setlength{\drop}{0.1\txtheight} +\vspace*{\drop} +\begin{flushleft} +{\FSfont{5eb}% Erbar Deco +\HUGE +{C\,O\,N\,U\,N\,D\,R\,U\,M\,S\,,}\\ +{P\,U\,Z\,Z\,L\,E\,S\,, \&} \\ +{E\,N\,I\,G\,M\,A\,S}\\ +} +\vfill +\Large +A. N. AUTHOR \\ +A. N. OTHER \\ +Y. E. TANOTHER +\vfill +THE PUBLISHER {\normalsize YEAR} +\end{flushleft} +\endgroup} + +%%%%%%%%%%%%%%%% + +%% draw an oval using tikz +\newcommand*{\anoval}[2]{% +\begin{tikzpicture} +\draw[very thick] (0,0) ellipse (#1 and #2); +\end{tikzpicture}} + +%% a zero-sized picture of an oval +\newcommand*{\putoval}{\begingroup +\setlength{\unitlength}{1in} +\begin{picture}(0,0) + \put(-1.25,0){\anoval{1.25in}{1.75in}} +\end{picture} +\endgroup} + +%% rectangular frame +\newcommand*{\fframe}{\begingroup + \wb{10pt}{10pt} + \setlength{\unitlength}{1pt} + \begin{picture}(0,0) +\multiput(11,0)(24,0){11}{e}% bottom +\multiput(23,0)(24,0){10}{f}% bottom +\multiput(11,384)(24,0){11}{e}% top +\multiput(23,384)(24,0){10}{f}% top +\put(0,0){O}% bl +\put(0,382){R}% tl +\put(262,0){M}% br +\put(262,382){P}% tr +\multiput(0,11)(0,24){16}{i}% left +\multiput(0,23)(0,24){15}{j}% left +\multiput(264,11)(0,24){16}{i}% right +\multiput(264,23)(0,24){15}{j}% right + \end{picture} +\endgroup} + +\newcommand*{\titleRMMH}{\begingroup +\FSfont{5ve}% Vendome +\Large +\begin{center} +The \\ +Puzzle \\ +of \\ +Conundrums\\[2\baselineskip] +by \\ +The Authoress\\[3\baselineskip] +\plogo\\[2\baselineskip] +\putoval + +\vspace{2\baselineskip} +The Publisher \\ +{\normalsize YEAR} +\end{center} +\vspace{\baselineskip} +\fframe +\endgroup} + +%%%%%%%%%%%%%%%%%%%%%% + +\newcommand*{\leaf}{{\wb{8pt}{8pt}K}} +\newcommand*{\titleWM}{\begingroup% William Morris +\FSfont{5bo}% Bergamo (Bembo) +\huge +\scshape +\noindent +{\color{Red} +conundrum \leaf\ +essays on puzzles, enigmas and the mind by the author \leaf\ +edited by the editor +} +\vfill +\begin{center} +{\normalfont\fontsize{256pt}{256pt}\selectfont ?} +\end{center} +\vfill +\noindent +the publisher \\ +\hspace*{1pt}% +\leaf\ year +\vspace*{3\baselineskip} +\endgroup} + + +\newcommand*{\titleEI}{\begingroup% Editions & Impressions +\FSfont{5gl}% Glytus (Glypha) +\drop = 0.3\txtheight +\vspace*{\drop} +\raggedright +{\LARGE {\huge C}ONUNDRUMS \textit{and} \\ +\hspace*{30pt} {\huge E}NIGMAS\par} +\vspace{2\baselineskip} +{\large\ltseries\hspace*{15pt} {\LARGE T}WENTY {\LARGE Y}EARS \\[.1\baselineskip] + \hspace*{15pt} OF {\LARGE P}UZZLEMENTS}\par +\vspace{2\baselineskip} +\hspace*{15pt}{\ltseries \textit{\large {\footnotesize BY} The Author}}\par +\vfill +The Publisher {\footnotesize YEAR} +\endgroup} + + +\newcommand*{\titleJA}{\begingroup% Jost Amman +\FSfont{5bl}% FontSite Belwe +\begin{center} +\drop=0.2\txtheight +\vspace*{0.5\drop} +\Large THE AUTHOR'S \\[\baselineskip] +{\FSfont{5at}% FontSite Abbot Old Style +\huge\textcolor{Red}{Some Conundrums}}\\[2\baselineskip] +\large \textit{with an intruction by} \\ + SOMEONE ELSE\par +\vfill +YEAR \\ +{\color{Red} \rule{\txtwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3pt} + \rule{\txtwidth}{0.4pt}} \\[\baselineskip] +\Large THE PUBLISHER +\end{center} +\vspace*{\drop} +\mbox{} +\endgroup} + +\newcommand*{\titlePP}{\begingroup% Printing Poetry +\FSfont{5jr}% FontSite Jenson Recut (Centaur) +\drop=0.1\txtheight +\vspace*{\drop} +\begin{raggedleft} +%{\HUGE\color{Navy} PUZZLING}\\[\baselineskip] +{\HUGE\color{MidnightBlue} PUZZLING}\\[\baselineskip] +{A WORKBOOK FOR RESOLUTIONS}\\[1.1\baselineskip] +{\HUGE\color{MidnightBlue} CONUNDRUMS} \\[\baselineskip] +{\Large BY THE AUTHOR}\par +\end{raggedleft} +\vfill +\begin{center} +{\large THE PUBLISHER YEAR} +\end{center} +\vspace*{\drop} +%\mbox{} +\endgroup} + + +\newcommand*{\titleGWP}{\begingroup% Gawain Poet +\FSfont{5gm}% FontSite Garamond +\drop=0.1\txtheight +\vspace*{\drop} +\begin{center} +\FSfont{5ci}% FontSite Cipollini +\Huge\color{Red} +THE COMPLETE WORKS OF THE CONUNDRUM POSER +\end{center} +\vfill +\begin{center} +{\normalfont\fontsize{256pt}{256pt}\selectfont ?} +\end{center} +\vfill +\begin{center} +\large +{\itshape In a Readable Version with a Critical Introduction \\ +by The Critic \\ +\normalsize +Woodcuts by The Artist} \\ +{\color{Red} \rule{\txtwidth}{0.4pt}} +THE PUBLISHER +\end{center} +\vspace*{0.5\drop} + +\endgroup} + +\newcommand*{\lqm}[1]{{\HUGE\fontsize{#1}{#1}\selectfont ?}} +\newcommand*{\titleCM}{\begingroup% Christopher Marlowe +\FSfont{5ci}% FontSite Cipollini +\drop=0.05\txtheight +\vspace*{\drop} +\begin{center} +{\color{Red}\HUGE T\, H\, E\ \ \ O\, R\, I\, G\, I\, N\, A\, L \\ + A\, U\, T\, H\, O\, R\par} +\vspace{2\baselineskip} +{\huge FOUR CONUNDRUMS\par} +\vspace{\baselineskip} +\FSfont{5lb}% FontSite Lanston Bell +\Large +{\itshape Edited with an Introduction by The Editor \\ + Engravings by The Engraver} +\vfill +\setlength{\unitlength}{3pt} +\begin{picture}(0,40) + \thicklines + {\color{Red} + \put(-20,0){\framebox(40,40){}} + \put(0,0){\line(0,1){40}} + \put(-20,20){\line(1,0){40}}} + \put(-10,10){\makebox(0,0){\lqm{60pt}}} + \put(-10,30){\makebox(0,0){\lqm{60pt}}} + \put(10,10){\makebox(0,0){\lqm{60pt}}} + \put(10,30){\makebox(0,0){\lqm{60pt}}} +\end{picture} +\vfill +THE PUBLISHER +\end{center} +\vspace*{\drop} +\endgroup} + + +\newcommand*{\titleIP}{\begingroup% Into Print +\FSfont{5pl}% FontSite Palladio (Palatino) +\drop=0.1\txtheight +\vspace*{0.5\drop} +\begin{center} +{\Huge CONUNDRUMS}\\[\baselineskip] +\Large +\dingline{49} +\vspace{\baselineskip} +{\itshape Selected writings on Puzzles, \\ Enigmas, and Other Attempts at \\ Bafflement} + +\vspace{\baselineskip} + +THE AUTHOR + +\vfill +\plogo \\[\baselineskip] + +\large +THE PUBLISHER +\end{center} +\vspace*{0.5\drop} +\endgroup} + + +\newcommand*{\titleAAT}{\begingroup% An Approach to Type +\FSfont{5bd}% FontSite Bodoni +\drop=0.1\txtwidth +\vspace*{0.5\drop} +{\huge THE AUTHOR} + +\begin{vplace}[2] +\begin{raggedleft} +\LARGE AN APPROACH TO\\[0.2\baselineskip] +{\FSfont{5cd}\HUGE\texthb{Conundrums}}\par +\end{raggedleft} +\end{vplace} + +\large{THE PUBLISHER} +\vspace*{0.5\drop} +\endgroup} + + +\newcommand*{\titleXX}{\begingroup% +\FSfont{5pl}% FontSite +\begin{center} +\end{center} +\endgroup} diff --git a/titlepage/ManyTitlePage.sty b/titlepage/ManyTitlePage.sty new file mode 100644 index 0000000..ee9f9f9 --- /dev/null +++ b/titlepage/ManyTitlePage.sty @@ -0,0 +1,1043 @@ + + +%\usepackage{pst-text} + +%%%% Additional font macros +\makeatletter +%%%% light series +%% e.g., s:12 +\DeclareRobustCommand\ltseries + {\not@math@alphabet\ltseries\relax + \fontseries\ltdefault\selectfont} +%% e.g., t:32 +\newcommand{\ltdefault}{l} +%% e.g., v:19 +\DeclareTextFontCommand{\textlt}{\ltseries} + +% heavy(bold) series +\DeclareRobustCommand\hbseries + {\not@math@alphabet\hbseries\relax + \fontseries\hbdefault\selectfont} +%% e.g., t:32 +\newcommand{\hbdefault}{hb} +%% e.g., v:19 +\DeclareTextFontCommand{\texthb}{\hbseries} +\makeatother + +\newcommand*{\isbn}{{\small\textsc{ISBN}}} + +%%% for the Web-O-Mints fonts +\newcommand*{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}} +%\renewcommand*{\wb}[2]{}% probably kills Web-O-Mints (and some layouts?) +%%% for the Fontsite 500 fonts +\newcommand*{\FSfont}[1]{% + \fontencoding{T1}\fontfamily{#1}\selectfont} +%\renewcommand*{\FSfont}[1]{}% kills special font selections + +\newcommand*{\labelit}[1]{\phantomsection\label{#1}} +\newcommand*{\refit}[1]{(graphic on page~\pageref{#1})} + +\newcommand*{\plogo}{GNU} + +\makeatother + +\DeclareRobustCommand{\cs}[1]{\texttt{\char`\\#1}} +\newlength{\tpheight}\setlength{\tpheight}{0.9\textheight} +\newlength{\txtheight}\setlength{\txtheight}{0.9\tpheight} +\newlength{\tpwidth}\setlength{\tpwidth}{0.9\textwidth} +\newlength{\txtwidth}\setlength{\txtwidth}{0.9\tpwidth} +\newlength{\drop} + +\newenvironment{showtitle}{% + \begin{boxminipage}[c][\tpheight]{\tpwidth} + \centering\begin{vplace}\begin{minipage}[c][\txtheight]{\txtwidth}}% +{\end{minipage}\end{vplace}\end{boxminipage}} + +\definecolor{Dark}{gray}{.2} +\definecolor{MedDark}{gray}{.4} +\definecolor{Medium}{gray}{.6} +\definecolor{Light}{gray}{.8} + +\newcommand*{\titleJT}{\begingroup% Jan Tschichold: typographer +\FSfont{5gm}% Garamond +\drop = 0.08\txtheight +\vspace*{\drop} +\hspace*{0.3\txtwidth} +{\Large The Author}\\[2\drop] +\hspace*{0.3\txtwidth}{\Huge\itshape The Big Book of}\par +{\raggedleft\Huge\itshape Conundrums\par} +\vfill +\hspace*{0.3\txtwidth}{\Large \plogo} \\[0.5\baselineskip] +\hspace*{0.3\txtwidth}{\Large The Publisher} +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleTH}{\begingroup% T&H Typography +\raggedleft +\vspace*{\baselineskip} +{\Large The Author}\\[0.167\txtheight] +{\bfseries The Big Book of}\\[\baselineskip] +{\textcolor{Red}{\Huge CONUNDRUMS}}\\[\baselineskip] +{\small With 123 illustrations}\par +\vfill +{\Large The Publisher \plogo}\par +\vspace*{3\baselineskip} +\endgroup} + +\newcommand*{\titleLY}{\begingroup% Words in their Hands +\drop = 2\baselineskip +\centering +\vspace*{\drop} +%{\Huge \hspace{-13em}鸟哥的}\\[1em] +{\zihao{0}{\bfseries Wonderful Server}}\\[4em] +%{\huge \hfill——Verion 3.8}\\[2em] +%\scalebox{18}[1]{{\wb{10}{12}4}}\\[\drop] +%{\Large\itshape From}\\[\baselineskip] +%{ http://linux.vbird.org/}\\[\baselineskip] +%{\wb{10}{12}4}\\[\baselineskip] +%{\Large 徐海兵\hspace{1em}译}\\[\baselineskip] + + +{\includegraphics[width=0.4\textwidth]{pic/FengMian.png}}\\[2em] + +{\Large \kaishu \textbf{L.Y.}\hspace{1em}编 } + +%{\Large L.Y.}\par +\vfill +%\scalebox{6}[1]{{\wb{10}{12}4}}\\[1em] +{\Large Created by \XeLaTeX}\\[0.5em] +{ \today}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleM}{\begingroup% Misericords, T&H p 153 +\drop = 0.08\txtheight +\centering +\vspace*{\drop} +{\Huge\bfseries Conundrums}\\[\baselineskip] +{\scshape puzzles for the mind}\\[\baselineskip] +{\scshape by}\\[\baselineskip] +{\large\scshape the author}\par +\vfill +{\plogo}\\[0.5\baselineskip] +{\scshape the publisher}\par +\vspace*{2\drop}\endgroup} + +\newcommand*{\titleS}{\begingroup% Scripts, T&H p 151 +\drop = 0.1\txtheight +\centering +\vspace*{\drop} +{\Huge Conundrums}\\[\baselineskip] +{\large\itshape by The Author}\\[\baselineskip] +\vfill +\rule{0.4\txtwidth}{0.4pt}\\[\baselineskip] +{\large\itshape The Publisher}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleHGP}{\begingroup% Handy Guide to Papermaking +\drop=0.1\txtheight +\begin{minipage}[t]{0.05\txtwidth} + \color{Red} + \rule{6pt}{\txtheight} +\end{minipage} +\hspace{0.05\txtwidth} +\begin{minipage}[t]{0.6\txtwidth} + \vspace*{\drop} + {\Large THE AUTHOR} \\ + \rule{0.9\txtwidth}{1pt} \par + \vspace{3\baselineskip} + {\noindent\Huge\bfseries CONUNDRUMS} \par + \vspace{2\baselineskip} + {\Large\itshape A Handy Guide to Puzzles and Enigmas} \par + \vspace{6.5\baselineskip} + {\scshape after the foreign edition of year \\ + translated by} \par +\vspace{0.1\baselineskip} + {\Large THE TRANSLATOR} \par + \vspace{\baselineskip} + \rule{0.9\txtwidth}{1pt} \par + \vspace{\baselineskip} + {\Large THE PUBLISHER} +\end{minipage} +\hfill +\begin{minipage}[t]{0.15\txtwidth} + {\color{Red} + \FSfont{5fh}% FontSite Fette Gotisch + \HUGE + \vspace{3.3\baselineskip} + H \\[1.15\baselineskip] + G \\[1.15\baselineskip] + P \\[1.15\baselineskip] + E +}\par + \vspace{4\baselineskip} + {\Large YEAR} +\end{minipage} +\endgroup} + + +\newcommand*{\titleRF}{\begingroup% Robert Frost, T&H p 149 +\FSfont{5bo}% Bembo/Bergamo +\drop = 0.2\txtheight +\centering +\vfill +{\Huge The Big Book of}\\[\baselineskip] +{\Huge CONUNDRUMS}\\[\baselineskip] +{\large Edited by The Editor}\\[0.5\drop] +{\Large \plogo}\\[0.5\baselineskip] +{\Large The Publisher}\par +{\large\scshape year}\par +\vfill\null +\endgroup} + +\newcommand*{\titleDB}{\begingroup% Design of Books, by Adrian Wilson +\FSfont{5pl}% Palatino/Palladio +\drop = 0.14\txtheight +\centering +\vspace*{\drop} +{\Large THE}\\[\baselineskip] +{\Huge BIG BOOK}\\[\baselineskip] +{\Huge OF}\\[\baselineskip] +{\Huge CONUNDRUMS}\\[1.5\baselineskip] +{\LARGE BY}\\[\baselineskip] +{\LARGE THE AUTHOR}\par +%\begin{vplace} +\vfill +{FOREWORD BY AN OTHER}\\[8\baselineskip] +%\end{vplace} +\vfill +{\small\sffamily THE PUBLISHER}\par +\endgroup} + +\newcommand*{\titleAM}{\begingroup% Ancient Mariner, AW fig 11-20, p. 151 +\FSfont{5bo}% Bembo/Bergamo +\drop = 0.12\txtheight +\centering +\vspace*{\drop} +{\large The Author}\\[\baselineskip] +{\Huge THE BIG BOOK}\\[\baselineskip] +{\Large OF}\\[\baselineskip] +{\Huge CONUNDRUMS}\\[\baselineskip] +{\scshape with ten engravings}\\ +{\scshape and with a foreword by}\\ +{\large\scshape an other}\\[\drop] +{\plogo}\\[0.5\baselineskip] +{\small\scshape the publisher}\par +{\small\scshape year}\par +\vfill\null +\endgroup} + +\newcommand*{\titleP}{\begingroup% The Pyramids, AW fig 6-15, p. 81 +\FSfont{5bo}% Bembo/Bergamo +\drop = 0.12\txtheight +\vspace*{\drop} +\hspace*{0.3\txtwidth} +{\Huge SOME}\\[\baselineskip] +\hspace*{0.3\txtwidth} +{\Huge CONUNDRUMS}\par +\vspace*{3\drop} +{\large By THE AUTHOR} +\vfill +{\scshape the publisher} +\vspace*{0.5\drop} +\endgroup} + +\newcommand*{\titleHL}{\begingroup% Horizontal Line +\drop = 0.4\txtheight +\vspace*{\drop} +\hfill{\large The Author} \\ +\rule{\txtwidth}{0.4pt} + +\vspace*{\baselineskip} +{\Huge CONUNDRUMS}\par +\vfill +{\centering The Publisher\par} +\vspace*{\baselineskip} +\endgroup} + +\newcommand*{\titleVL}{\begingroup% Vertical Line +\drop = 0.1\txtheight +\vspace*{\drop} + \hbox{% + \hspace*{0.2\txtwidth}% + \vrule depth 0.6\txtheight% + \hspace*{2em}% + \vbox{% + \vspace{\drop} + {\noindent\large The Author}\\[3\baselineskip] + {\Huge Conundrums}\par + \vfil + }% end of vbox + }% end of hbox +\begin{center} +The Publisher +\end{center} +\null +\endgroup} + +\newcommand*{\titleGM}{\begingroup% Gentle Madness +\drop = 0.1\txtheight +\vspace*{\baselineskip} +\vfill + \hbox{% + \hspace*{0.2\txtwidth}% + \rule{1pt}{\txtheight} + \hspace*{0.05\txtwidth}% +%\fbox{% +\parbox[b]{0.75\txtwidth}{ + \vbox{% + \vspace{\drop} + {\noindent\HUGE\bfseries Some\\[0.5\baselineskip] Conundrums}\\[2\baselineskip] + {\Large\itshape Puzzles for the Mind}\\[4\baselineskip] + {\Large THE AUTHOR}\par + \vspace{0.5\txtheight} + {\noindent The Publisher}\\[\baselineskip] + }% end of vbox +}% end of parbox +%}% end of fbox + }% end of hbox +\vfill +\null +\endgroup} + +\newcommand*{\titlePM}{\begingroup% Gentle Madness with Printers' Ornaments +\drop = 0.1\txtheight +\vspace*{\baselineskip} +\vfill + \hbox{% + \hspace*{0.1\txtwidth}% + {\wb{18pt}{18pt} + \begin{picture}(0,0) + \multiput(0,0)(0,20){22}{\textcolor{Medium}{Q}} + \end{picture} + } +% \rule{1pt}{\txtheight} + \hspace*{0.15\txtwidth}% +\parbox[b]{0.75\txtwidth}{ + \vbox{% + \vspace{\drop} + {\noindent\HUGE\bfseries Some\\[0.5\baselineskip] Conundrums}\\[2\baselineskip] + {\Large\itshape Puzzles for the Mind}\\[4\baselineskip] + {\Large THE AUTHOR}\par + \vspace{0.5\txtheight} + {\noindent The Publisher}\\[\baselineskip] + }% end of vbox +}% end of parbox + }% end of hbox +\vfill +\null +\endgroup} + +\newcommand*{\titleAT}{\begingroup% Anatomy of a Typeface +%\FSfont{5gr}% Galliard/Gareth +\FSfont{5bo}% Bergamo/Bembo +\drop=0.1\txtheight +\vspace*{\drop} +\rule{\txtwidth}{1pt}\par +\vspace{2pt}\vspace{-\baselineskip} +\rule{\txtwidth}{0.4pt}\par +\vspace{0.5\drop} +\centering +\textcolor{Red}{%\FSfont{5cz}% Chisel +{\FSfont{5ml}\Huge THE BOOK}\\[0.5\baselineskip] +{\FSfont{5ml}\Large OF}\\[0.75\baselineskip]% Delphian (5dp) +{\FSfont{5ml}\Huge CONUNDRUMS}}% Mona Lisa +\par +\vspace{0.25\drop} +\rule{0.3\txtwidth}{0.4pt}\par +\vspace{\drop} +{\Large \scshape The Author}\par +\vfill +{\large \textcolor{Red}{\plogo}}\\[0.5\baselineskip] +{\large\scshape the publisher}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleLL}{\begingroup% Lost Languages +\drop=0.1\txtheight +\fboxsep 0.5\baselineskip +\sffamily +\vspace*{\drop} +\centering +{\textcolor{SkyBlue}{\HUGE CONUNDRUMS}}\par +\vspace{0.5\drop} +\colorbox{Dark}{\textcolor{white}{\normalfont\itshape\Large Puzzles for the Mind}}\par +\vspace{\drop} +{\Large The Author}\par +\vfill +{\footnotesize THE PUBLISHER}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleCC}{\begingroup% City of Cambridge +\drop=0.1\txtheight +\vspace*{\drop} +\centering +{\Large\itshape THE BIG BOOK OF}\\[0.5\drop] +{\textcolor{Red}{\HUGE\bfseries CONUNDRUMS}}\par +\vspace{\drop} +{\LARGE\itshape VOLUME 1: SOCIAL AND MORAL}\par +\vfill +{\Large THE AUTHOR}\par +\vfill +{\plogo}\\[0.5\baselineskip] +{\itshape THE PUBLISHER}\par +{\scshape year}\par +%\vfill +\vspace*{\drop} +\endgroup} + + +\newcommand*{\titleDS}{\begingroup% DS Thesis +\drop=0.1\txtheight +%\vspace*{\drop} +\centering +{\Large\bfseries CONUNDRUMS CONSIDERED AS PUZZLES FOR THE MIND}\par +\vspace{0.6\baselineskip} +{By}\\[0.6\baselineskip] +{The Candidate\\[0.6\baselineskip] +A Thesis Submitted to the Graduate\\[0.5\baselineskip] +Faculty of The University\\[0.5\baselineskip] +in Partial Fulfillment of the\\[0.5\baselineskip] +Requirements for the Degree of\\[0.5\baselineskip] +DEGREE\\[0.5\baselineskip] +Major Subject: Logic}\par + +\flushleft +{Approved by the \\ + Examining Committee:}\par +\vspace{1.5\baselineskip} +\rule{15em}{0.4pt}\\ +A Professor, Thesis Advisor \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +Another Professor, Thesis Advisor \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +A Faculty, Member \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +Another Faculty, Member \\[1\baselineskip] +\rule{15em}{0.4pt}\\ +A Third Faculty, Member\par +\centering +\vspace{1\baselineskip} +The University \\ +The Address \\[\baselineskip] +The Date\par +\vfill +\endgroup} + +\newcommand*{\titleMS}{\begingroup% MS Thesis +\drop=0.1\txtheight +\vspace*{\drop} +\centering +{\LARGE THE UNIVERSITY}\\[2\baselineskip] +{\LARGE\sffamily Conundrums: \\ puzzles for the mind\par} +\vfill +{\LARGE THESIS}\par +\vspace{\drop} +{\large some remarks concerning the supervisor \\ + and the time and place of the examination \\ + and other administrative details\par} +\vfill +{\large\bfseries The Candidate}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titlePW}{\begingroup% PW Thesis +\ttfamily +\drop=0.1\txtheight +\vspace*{\drop} +\centering +{\Large%\bfseries + SOME REMARKS \\ ON CONUNDRUMS \\ AS PUZZLES FOR THE MIND\par} +\vspace*{\drop} +{\large by}\par +\vspace*{\drop} +{\Large THE CANDIDATE}\par +\vfill +\raggedright +{\Large + Thesis submitted to The University for the degree of + DEGREE, Month year.\par} +\vfill +\null +\endgroup} + +\newcommand*{\titleUL}{\begingroup% University of Liege +\drop=0.1\txtheight +\vspace*{\drop} +\begin{center} +{\LARGE\textsc{THE UNIVERSITY}}\\[\drop] +% University logo +{\LARGE \plogo}\\[\drop] + +\rule{\txtwidth}{1pt}\par +\vspace{0.5\baselineskip} +{\huge\bfseries Conundrums: An Investigation of Mind Puzzles\\ + \large --- in N pages, with T tables ---}\\[0.5\baselineskip] +\rule{\txtwidth}{1pt}\par + +\vfill + +% fake a footnote reference here +{\Large\textsc{The\textsuperscript{1} Candidate}} + +\vfill + +City, Country + +\vfill + +{\large The Date} +\end{center} + +% faked footnote +\vspace{-0.5\baselineskip} +\noindent\rule{0.4\txtwidth}{0.4pt} \\ +\textsuperscript{1} \url{email.address} +\endgroup} + + +\newcommand*{\titleASU}{% +\begingroup +\FSfont{ptm}% Times +\begin{center} +CONTINUING CONONDRUMS IN THE TYPOGRAPHIC REQUIREMENTS FOR THESIS \\ +by \\ +Im A. Student + +\vfill + +A Polemic Presented in Partial Fulfillment \\ +of the Requirements for the Degree \\ +Name of Degree + +\vfill + +THE UNIVERSITY + +The Date +\end{center} +\endgroup} + +\newcommand*{\titleSW}{\begingroup% Story of Writing +\raggedleft +\vspace*{\baselineskip} +{\Huge\itshape The Book \\ of Conundrums}\\[\baselineskip] +{\large\itshape With over 120 illustrations, 50 in color}\\[0.2\textheight] +{\Large The Author}\par +\vfill +{\Large \plogo{} \sffamily The Publisher} +\vspace*{\baselineskip} +\endgroup} + +\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat +\drop=0.1\txtheight +\centering +\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS} +\vspace*{\baselineskip} +{\large\scshape the author}\\[\baselineskip] +\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} +\rule{\unitlength}{0.4pt}\\[\baselineskip] +{\LARGE THE BOOK OF CONUNDRUMS}\\[\baselineskip] +{\itshape puzzles for the mind}\\[0.2\baselineskip] +\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} +\rule{\unitlength}{1.6pt}\\[\baselineskip] +{\large\scshape drawings by the artist}\par +\vfill +{\large\scshape the publisher}\\[\baselineskip] +{\small\scshape year}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleFT}{\begingroup% John Fell Types +\ifxetex + \fontspec[Alternate=0]{IM_FELL_Double_Pica_PRO_Roman} +\else + \FSfont{fxlj}% Libertine +\fi +\begin{center} +\vfill +{\HUGE \textcolor{Red}{JOHN FELL} \\} +\vfill +{\Huge THE UNIVERSITY PRESS AND +THE `FELL TYPES' \\} +\vfill +{\Large THE PUNCHES AND MATRICES DESIGNED FOR PRINTING + IN THE GREEK, LATIN, ENGLISH, AND ORIENTAL LANGUAGES + BEQUETHED IN 1686 TO \\} +\vfill +{\LARGE THE UNIVERSITY OF OXFORD + BY JOHN FELL, D.D.\\} +\vfill +{DELEGATE OF THE PRESS, DEAN OF CHRISTCHURCH + VICE-CHANCELLOR OF THE UNIVERSITY +AND BISHOP OF OXFORD \\} +\vfill +{\Large BY\\} +{\LARGE STANLEY MORISON \\} +{WITH THE ASSISTANCE OF\\} +{\large HARRY CARTER\\} +\vfill +\plogo +\vfill +{\LARGE THE PUBLISHER \\} +{\large YEAR} +\vfill +\end{center} +\endgroup} + +\renewcommand*{\titleFT}{\begingroup% John Fell Types +\ifxetex + \fontspec[Alternate=0]{IM_FELL_Double_Pica_PRO_Roman} +\else + \FSfont{fxlj}% Libertine +\fi +\begin{center} +\vfill +{\HUGE \textcolor{Red}{THE DONOR} \\} +\vfill +{\Huge THE UNIVERSITY AND +THE `DONOR' CONUNDRUMS \\} +\vfill +{\Large THE PUZZLES \& ENIGMAS \\ PRESENTED IN 1768 TO \\} +%\vfill +{\LARGE THE UNIVERSITY OF CITY \\ + BY THE DONOR\\} +%\vfill +{\footnotesize WHO HAS ACHIEVED A VARIETY OF ACADEMIC \\ + AND OTHER DISTINCTIONS \\} +\vfill +{\large BY\\} +{\LARGE THE AUTHOR \\} +{\footnotesize WITH THE ASSISTANCE OF\\} +{\large THE ASSISTANT\\} +\vfill +\plogo +\vfill +{\LARGE THE PUBLISHER \\} +{\large YEAR} +\vfill +\end{center} +\endgroup} + +\newcommand*{\titleJE}{\begingroup% Jane Eyre +%\FSfont{5cd}% Clarendon +\FSfont{5cu}% Century Old Style +\vspace*{2\baselineskip} +{\Large\bfseries The Author}\\[2\baselineskip] +\begin{center} +{\Huge\bfseries CONUNDRUMS} +\end{center} +\vspace*{4\baselineskip} +{\Large\bfseries Illustrations by The Artist}\par +\vfill +\begin{center} +{\Large{\bfseries The Publisher $\bullet$} \scshape year} +\end{center} +\vspace*{2\baselineskip} +\endgroup} + +\newcommand*{\cdiam}{\prec\kern-2pt\succ} +\newcommand*{\titleZD}{\begingroup% Zuleika Dobson +\vspace*{2\baselineskip} +\centering +\begin{picture}(240,0) + \multiput(0,0)(24,0){10}{{\wb{10}{12}4}} + \multiput(-5,-21)(0,-24){15}{\rotatebox{90}{{\wb{10}{12}4}}} + \multiput(0,-360)(24,0){10}{{\wb{10}{12}4}} + \multiput(235,-21)(0,-24){15}{\rotatebox{90}{{\wb{10}{12}4}}} + \put(0,0){\begin{minipage}[t]{240pt} + \centering + \vspace*{2\baselineskip} + {\Huge Selected Conundrums}\\ + {\large\itshape --- puzzles for the mind ---} \\[0.5\baselineskip] + {\large WITH ILLUSTRATIONS BY} \\[0.5\baselineskip] + {\large THE AUTHOR } \\[0.5\baselineskip] + {\LARGE T. H. E. AUTHOR} \par + \vspace*{5\baselineskip} + $\cdiam$\\[0.25\baselineskip] + $\cdiam\cdiam\cdiam$\\[0.25\baselineskip] + $\cdiam\cdiam\cdiam\cdiam\cdiam$\\[0.25\baselineskip] + $\cdiam\cdiam\cdiam$\\[0.25\baselineskip] + $\cdiam$\par + \vspace*{5\baselineskip} + {\Large THE PUBLISHER}\\ + {\Large\scshape year}\par + \vspace*{2\baselineskip} + \end{minipage}} +\end{picture} +\vfill +\null +\endgroup} + +\newcommand*{\titleWH}{\begingroup% Words in their Hands +\drop = 2\baselineskip +\centering +\vspace*{\drop} +{\Huge \hspace{-13em}鸟哥的}\\[1em] +{\zihao{0}{\bfseries Linux私房菜}}\\[1em] +{\Huge \hspace{13em}基础篇}\\[2em] +%\scalebox{18}[1]{{}}\\[\drop] +{\Large\itshape From}\\[\baselineskip] +{ http://linux.vbird.org/}\\[\baselineskip] +{\wb{10}{12}4}\\[\baselineskip] +{\Large\itshape 搜集、整理、排版 by}\\[\baselineskip] +{\Large L.Y.}\par +\vfill +%\scalebox{6}[1]{{\wb{10}{12}4}}\\[1em] +{\Large Created by \XeLaTeX}\\[0.5em] +{ \today}\par +\vspace*{\drop} +\endgroup} + +\newcommand*{\titleBWF}{\begingroup% Beowulf +\drop = 0.1\txtheight +\parindent=0pt +\vspace*{\drop} +{\Huge\bfseries Conundrums}\\[\baselineskip] +{\Large {\itshape Translated by} {\scshape the translator}}\par +\vfill +\plogo\\[0.2\baselineskip] +{\Large\itshape The Publisher} +\vspace*{\drop} +\endgroup} + + +\newcommand*{\titleSI}{\begingroup% Sagas +\drop = 0.13\txtheight +\centering +\vspace*{\drop} +{\Huge CONUNDRUMS FOR}\\[\baselineskip] +{\Huge THE MIND}\\[\baselineskip] +{\Huge\itshape A Selection}\\[3\baselineskip] +{\Large \textit{Preface by} \textsc{famous person}}\\ +{\Large \textit{Introduction by} \textsc{an other}}\par +\vfill +{\Large THE PUBLISHER}\par +\vspace*{\drop} +\endgroup} + + + +\newcommand*{\titleGP}{\begingroup% Geometric Modeling +\drop=0.1\txtheight +\centering +\vspace*{\baselineskip} +\rule{\txtwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} +\rule{\txtwidth}{0.4pt}\\[\baselineskip] +{\LARGE CONUNDRUMS\\ AND \\[0.3\baselineskip] PUZZLES}\\[0.2\baselineskip] +\rule{\txtwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} +\rule{\txtwidth}{1.6pt}\\[\baselineskip] +\scshape +Selected and Expanded Papers from the Organisation Working Conference +on \\ Enigmas \\ +Location, date from--to\par +\vspace*{2\baselineskip} +Edited by \\[\baselineskip] +{\Large FIRST EDITOR \\ SECOND EDITOR \\ THIRD EDITOR\par} +{\itshape Organisation \\ Address\par} +\vfill +\plogo\\ +{\scshape year} \\ +{\large THE PUBLISHER}\par +\endgroup} + +\newcommand*{\rotrt}[1]{\rotatebox{90}{#1}} +\newcommand*{\rotlft}[1]{\rotatebox{-90}{#1}} +\newcommand*{\topb}{% + \resizebox*{\unitlength}{\baselineskip}{\rotrt{$\}$}}} +\newcommand*{\botb}{% + \resizebox*{\unitlength}{\baselineskip}{\rotlft{$\}$}}} +\newcommand*{\titleBC}{\begingroup% Bookbinding & Conservation +\FSfont{5jr}% Jenson Recut (Centaur) +\begin{center} +\def\CP{\textit{\HUGE Conundrums \& Puzzles}} +\settowidth{\unitlength}{\CP} +%{\color{LightGoldenrod}\( \overbrace{\hspace{\unitlength}} \)} \\[\baselineskip] +{\color{LightGoldenrod}\topb} \\[\baselineskip] +\textcolor{Sienna}{\CP} \\[\baselineskip] +{\color{RosyBrown}\LARGE A SIXTY-YEAR STUDY} \\ +%{\color{LightGoldenrod}\( \underbrace{\hspace{\unitlength}} \)} +{\color{LightGoldenrod}\botb} +\end{center} +\vfill +\begin{center} +{\LARGE\textbf{The Author}}\\ +\vfill +\plogo\\[0.5\baselineskip] +YEAR +\end{center} +\endgroup} + +\newcommand*{\titleHC}{\begingroup% Harry Carter +\FSfont{fxlj}% Libertine +\setlength{\drop}{0.1\txtheight} +\vspace*{\drop} +\begin{flushleft} +{\FSfont{5eb}% Erbar Deco +\HUGE +{C\,O\,N\,U\,N\,D\,R\,U\,M\,S\,,}\\ +{P\,U\,Z\,Z\,L\,E\,S\,, \&} \\ +{E\,N\,I\,G\,M\,A\,S}\\ +} +\vfill +\Large +A. N. AUTHOR \\ +A. N. OTHER \\ +Y. E. TANOTHER +\vfill +THE PUBLISHER {\normalsize YEAR} +\end{flushleft} +\endgroup} + +%%%%%%%%%%%%%%%% + +%% draw an oval using tikz +\newcommand*{\anoval}[2]{% +\begin{tikzpicture} +\draw[very thick] (0,0) ellipse (#1 and #2); +\end{tikzpicture}} + +%% a zero-sized picture of an oval +\newcommand*{\putoval}{\begingroup +\setlength{\unitlength}{1in} +\begin{picture}(0,0) + \put(-1.25,0){\anoval{1.25in}{1.75in}} +\end{picture} +\endgroup} + +%% rectangular frame +\newcommand*{\fframe}{\begingroup + \wb{10pt}{10pt} + \setlength{\unitlength}{1pt} + \begin{picture}(0,0) +\multiput(11,0)(24,0){11}{e}% bottom +\multiput(23,0)(24,0){10}{f}% bottom +\multiput(11,384)(24,0){11}{e}% top +\multiput(23,384)(24,0){10}{f}% top +\put(0,0){O}% bl +\put(0,382){R}% tl +\put(262,0){M}% br +\put(262,382){P}% tr +\multiput(0,11)(0,24){16}{i}% left +\multiput(0,23)(0,24){15}{j}% left +\multiput(264,11)(0,24){16}{i}% right +\multiput(264,23)(0,24){15}{j}% right + \end{picture} +\endgroup} + +\newcommand*{\titleRMMH}{\begingroup +\FSfont{5ve}% Vendome +\Large +\begin{center} +The \\ +Puzzle \\ +of \\ +Conundrums\\[2\baselineskip] +by \\ +The Authoress\\[3\baselineskip] +\plogo\\[2\baselineskip] +\putoval + +\vspace{2\baselineskip} +The Publisher \\ +{\normalsize YEAR} +\end{center} +\vspace{\baselineskip} +\fframe +\endgroup} + +%%%%%%%%%%%%%%%%%%%%%% + +\newcommand*{\leaf}{{\wb{8pt}{8pt}K}} +\newcommand*{\titleWM}{\begingroup% William Morris +\FSfont{5bo}% Bergamo (Bembo) +\huge +\scshape +\noindent +{\color{Red} +conundrum \leaf\ +essays on puzzles, enigmas and the mind by the author \leaf\ +edited by the editor +} +\vfill +\begin{center} +{\normalfont\fontsize{256pt}{256pt}\selectfont ?} +\end{center} +\vfill +\noindent +the publisher \\ +\hspace*{1pt}% +\leaf\ year +\vspace*{3\baselineskip} +\endgroup} + + +\newcommand*{\titleEI}{\begingroup% Editions & Impressions +\FSfont{5gl}% Glytus (Glypha) +\drop = 0.3\txtheight +\vspace*{\drop} +\raggedright +{\LARGE {\huge C}ONUNDRUMS \textit{and} \\ +\hspace*{30pt} {\huge E}NIGMAS\par} +\vspace{2\baselineskip} +{\large\ltseries\hspace*{15pt} {\LARGE T}WENTY {\LARGE Y}EARS \\[.1\baselineskip] + \hspace*{15pt} OF {\LARGE P}UZZLEMENTS}\par +\vspace{2\baselineskip} +\hspace*{15pt}{\ltseries \textit{\large {\footnotesize BY} The Author}}\par +\vfill +The Publisher {\footnotesize YEAR} +\endgroup} + + +\newcommand*{\titleJA}{\begingroup% Jost Amman +\FSfont{5bl}% FontSite Belwe +\begin{center} +\drop=0.2\txtheight +\vspace*{0.5\drop} +\Large THE AUTHOR'S \\[\baselineskip] +{\FSfont{5at}% FontSite Abbot Old Style +\huge\textcolor{Red}{Some Conundrums}}\\[2\baselineskip] +\large \textit{with an intruction by} \\ + SOMEONE ELSE\par +\vfill +YEAR \\ +{\color{Red} \rule{\txtwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3pt} + \rule{\txtwidth}{0.4pt}} \\[\baselineskip] +\Large THE PUBLISHER +\end{center} +\vspace*{\drop} +\mbox{} +\endgroup} + +\newcommand*{\titlePP}{\begingroup% Printing Poetry +\FSfont{5jr}% FontSite Jenson Recut (Centaur) +\drop=0.1\txtheight +\vspace*{\drop} +\begin{raggedleft} +%{\HUGE\color{Navy} PUZZLING}\\[\baselineskip] +{\HUGE\color{MidnightBlue} PUZZLING}\\[\baselineskip] +{A WORKBOOK FOR RESOLUTIONS}\\[1.1\baselineskip] +{\HUGE\color{MidnightBlue} CONUNDRUMS} \\[\baselineskip] +{\Large BY THE AUTHOR}\par +\end{raggedleft} +\vfill +\begin{center} +{\large THE PUBLISHER YEAR} +\end{center} +\vspace*{\drop} +%\mbox{} +\endgroup} + + +\newcommand*{\titleGWP}{\begingroup% Gawain Poet +\FSfont{5gm}% FontSite Garamond +\drop=0.1\txtheight +\vspace*{\drop} +\begin{center} +\FSfont{5ci}% FontSite Cipollini +\Huge\color{Red} +THE COMPLETE WORKS OF THE CONUNDRUM POSER +\end{center} +\vfill +\begin{center} +{\normalfont\fontsize{256pt}{256pt}\selectfont ?} +\end{center} +\vfill +\begin{center} +\large +{\itshape In a Readable Version with a Critical Introduction \\ +by The Critic \\ +\normalsize +Woodcuts by The Artist} \\ +{\color{Red} \rule{\txtwidth}{0.4pt}} +THE PUBLISHER +\end{center} +\vspace*{0.5\drop} + +\endgroup} + +\newcommand*{\lqm}[1]{{\HUGE\fontsize{#1}{#1}\selectfont ?}} +\newcommand*{\titleCM}{\begingroup% Christopher Marlowe +\FSfont{5ci}% FontSite Cipollini +\drop=0.05\txtheight +\vspace*{\drop} +\begin{center} +{\color{Red}\HUGE T\, H\, E\ \ \ O\, R\, I\, G\, I\, N\, A\, L \\ + A\, U\, T\, H\, O\, R\par} +\vspace{2\baselineskip} +{\huge FOUR CONUNDRUMS\par} +\vspace{\baselineskip} +\FSfont{5lb}% FontSite Lanston Bell +\Large +{\itshape Edited with an Introduction by The Editor \\ + Engravings by The Engraver} +\vfill +\setlength{\unitlength}{3pt} +\begin{picture}(0,40) + \thicklines + {\color{Red} + \put(-20,0){\framebox(40,40){}} + \put(0,0){\line(0,1){40}} + \put(-20,20){\line(1,0){40}}} + \put(-10,10){\makebox(0,0){\lqm{60pt}}} + \put(-10,30){\makebox(0,0){\lqm{60pt}}} + \put(10,10){\makebox(0,0){\lqm{60pt}}} + \put(10,30){\makebox(0,0){\lqm{60pt}}} +\end{picture} +\vfill +THE PUBLISHER +\end{center} +\vspace*{\drop} +\endgroup} + + +\newcommand*{\titleIP}{\begingroup% Into Print +\FSfont{5pl}% FontSite Palladio (Palatino) +\drop=0.1\txtheight +\vspace*{0.5\drop} +\begin{center} +{\Huge CONUNDRUMS}\\[\baselineskip] +\Large +\dingline{49} +\vspace{\baselineskip} +{\itshape Selected writings on Puzzles, \\ Enigmas, and Other Attempts at \\ Bafflement} + +\vspace{\baselineskip} + +THE AUTHOR + +\vfill +\plogo \\[\baselineskip] + +\large +THE PUBLISHER +\end{center} +\vspace*{0.5\drop} +\endgroup} + + +\newcommand*{\titleAAT}{\begingroup% An Approach to Type +\FSfont{5bd}% FontSite Bodoni +\drop=0.1\txtwidth +\vspace*{0.5\drop} +{\huge THE AUTHOR} + +\begin{vplace}[2] +\begin{raggedleft} +\LARGE AN APPROACH TO\\[0.2\baselineskip] +{\FSfont{5cd}\HUGE\texthb{Conundrums}}\par +\end{raggedleft} +\end{vplace} + +\large{THE PUBLISHER} +\vspace*{0.5\drop} +\endgroup} + + +\newcommand*{\titleXX}{\begingroup% +\FSfont{5pl}% FontSite +\begin{center} +\end{center} +\endgroup} diff --git a/titlepage/titlepages.pdf b/titlepage/titlepages.pdf new file mode 100644 index 0000000..96626d7 Binary files /dev/null and b/titlepage/titlepages.pdf differ