diff options
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/ChinaMainland.pdf | bin | 0 -> 120996 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/Dongguan.pdf | bin | 0 -> 41396 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/README.md | 37 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.pdf | bin | 0 -> 179032 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.tex | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.pdf | bin | 0 -> 377571 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.tex | 262 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/nanicolle/point.pdf | bin | 0 -> 973 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/nanicolle/nanicolle.cls | 461 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/nanicolle.tlpsrc | 0 |
12 files changed, 771 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/ChinaMainland.pdf b/Master/texmf-dist/doc/xelatex/nanicolle/ChinaMainland.pdf Binary files differnew file mode 100644 index 00000000000..3a70432499d --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/ChinaMainland.pdf diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/Dongguan.pdf b/Master/texmf-dist/doc/xelatex/nanicolle/Dongguan.pdf Binary files differnew file mode 100644 index 00000000000..e7015380fad --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/Dongguan.pdf diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/README.md b/Master/texmf-dist/doc/xelatex/nanicolle/README.md new file mode 100644 index 00000000000..4829ea97bcf --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/README.md @@ -0,0 +1,37 @@ +nanicolle +======= + +`nanicolle` is a LaTeX package providing class `nanicolle.cls` for typesetting labels of collection and of identification in Chinese for plant herbarium specimens. + +Documents using class `nanicolle` can only be compiled with XeLaTeX by far. + +Contributing +------------ + +This package is developed and maintained by Yuchang Yang < yang.yc.allium@gmail.com >. + +Discussions and questions are welcome. + +Copyright and Licence +--------------------- + + Copyright (C) 2016--2019 Yuchang Yang < yang.yc.allium@gmail.com > + ---------------------------------------------------------------------- + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either version 1.3c + of this license or (at your option) any later version. + The latest version of this license is in + http://www.latex-project.org/lppl.txt + and version 1.3c or later is part of all distributions of LaTeX + version 2005/12/01 or later. + + This work has the LPPL maintenance status `maintained'. + + The Current Maintainer of this work is Yuchang Yang. + + This work consists of: + - the class file: [nanicolle.cls]; + - the illustration files: [point.pdf, ChinaMainland.pdf, Dongguan.pdf]; + - the manual files: [nanicolle.tex, nanicolle.pdf, README.md]; + - the example files: [nanicolle-example.tex, nanicolle-example.pdf]. diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.pdf b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.pdf Binary files differnew file mode 100644 index 00000000000..07d4c95e04f --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.pdf diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.tex b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.tex new file mode 100644 index 00000000000..5d5620c570f --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle-example.tex @@ -0,0 +1,9 @@ +\documentclass[autoduplicate]{nanicolle} +\begin{document} +\Collect 2912 杨宇昌 6159 2018.9.24 莎草科 褐穗莎草 Cyperus fuscus 7038 1 北京市怀柔区琉璃庙镇双文铺村白河湾湿地生态公园 116.678772 40.655164 214 河边荒草地 披散草本 0.2 须根甚浅,不过2--3 cm;花的鳞片两侧紫褐色,中间绿色。 +\Collect 1997 杨宇昌 5731 2018.5.8 忍冬科 苦糖果 Lonicera fragrantissima subsp. standishii 7609 2 河北省邯郸市武安市管陶乡董家门村西至洞垴途中 1356.0 山坡灌草丛 灌木 3 果实橙红色,味甜微苦。 +\Identify 392 Allium atrosanguineum var. tibeticum (Regel) G. H. Zhu & Turland 藏葱 杨宇昌 2018.10.7 +\Identify 176 Acer davidii subsp. grosseri (Pax) P. C. de Jong 葛萝槭 杨宇昌 2018.4.19 +\Identify 230 Erysimum ×cheiri (L.) Crantz 桂竹香 杨宇昌 2018.5.17 +\Identify 590 Koenigia alpina (All.) T. M. Schust. & Reveal 高山神血宁 杨宇昌 2019.4.13 +\end{document} diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.pdf b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.pdf Binary files differnew file mode 100644 index 00000000000..81ac650d425 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.pdf diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.tex b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.tex new file mode 100644 index 00000000000..3695fbd7c6d --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/nanicolle.tex @@ -0,0 +1,262 @@ +%% nanicolle.tex +%% Copyright 2016--2019 Yuchang Yang < yang.yc.allium@gmail.com > +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Yuchang Yang. +% +% This work consists of: +% - the class file: [nanicolle.cls]; +% - the illustration files: [point.pdf, ChinaMainland.pdf, Dongguan.pdf]; +% - the manual files: [nanicolle.tex, nanicolle.pdf, README.md]; +% - the example files: [nanicolle-example.tex, nanicolle-example.pdf]. + +% arara: xelatex +% arara: xelatex + +\documentclass[a4paper]{ctexart} + \CTEXsetup[format={\Large\bfseries}]{section} + +\usepackage[margin=35mm]{geometry} +\usepackage{marvosym} +\usepackage{metalogo} +\usepackage{rulerbox} +% \usepackage{url} +\usepackage{color} + \definecolor{darkmiku}{RGB}{19, 149, 139} +\usepackage{array} + \newcolumntype{+}{>{\global\let\currentrowstyle\relax}} + \newcolumntype{^}{>{\currentrowstyle}} + \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}#1\ignorespaces} + +\makeatletter +\let\url\texttt +\let\emph\textbf +\let\pkgname\textsf +\let\uppercase\relax +\def\@fnsymbol#1{\ifcase#1\or*\or\Letter\fi} +\def\qtimes{\ensuremath{\times}} +\def\tab{\penalty-\@ne\ensuremath{\rightarrow}} +\def\uspace{\textvisiblespace\allowbreak} +\def\@lan{\raisebox{.2ex}{\ensuremath{\langle}}} +\def\@ran{\raisebox{.2ex}{\ensuremath{\rangle}}} +\def\param#1{\textrm{\@lan\textit{#1}\@ran}} +\def\stopurl{\rlap{\char00}} % WHY URL IS TO GRAB EVERYTHING IT SEES? +\long\def\cmd#1{{\ttfamily\color{darkmiku}#1}} +\long\def\pbox#1{\leavevmode\parbox{.86\linewidth}{\cmd{#1}}\kern-.03\linewidth} +\long\edef\[#1\]{$$\noexpand\pbox{\noexpand\raggedright#1\par}$$} +\catcode`\$=\active +\def\check@nextchar{% + \if\@nextchar、\unskip\fi + \if\@nextchar,\unskip\fi + \if\@nextchar:\unskip\fi + \if\@nextchar;\unskip\fi + \if\@nextchar。\unskip\fi} +\def$#1${\CJKecglue\cmd{#1}\CJKecglue + \futurelet\@nextchar\check@nextchar} +\newcount\itemcnt + \def\clearcnt{\itemcnt\z@} + \def\@black#1{{\color{black}\rmfamily#1}} + \def\@theitem{\advance\itemcnt\@ne\@black{\romannumeral\the\itemcnt.\space}} + \def\@blackperiod{\@black{。}\@gobble} + \def\@blackcolon{\@black{;}\penalty-\@ne} + \def\ritem#1{\@theitem#1\@ifnextchar*\@blackperiod\@blackcolon} +\makeatother + +\title{植物标本标签文档类\pkgname{nanicolle}% + \footnote{本项目的Github仓库地址为\url{https://github.com/Mikumikunisiteageru/nanicolle}\stopurl 。}} +\author{杨宇昌% + \footnote{电子邮箱为\url{yang.yc.allium@gmail.com}\stopurl 。}% + \quad〔\textsc{Negimoriya}〕} +\date{2019年4月28日\qquad ver.~2.00} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{document} + +\maketitle + +\parskip=1ex\relax + +植物标本是经处理能够长期保存的植物材料。它们是植物居群的样本,通过标本可以了解植物居群。由于植物材料本身并不能完整地反映居群的重要信息,标本采集者需要作出补充并记录成\emph{采集标签},与标本一同保存。植物分类学者经研究可以判定标本对应居群所属的物种,其意见则以\emph{鉴定标签}的形式,附在标本上。 + +本文介绍的\LaTeX{}文档类\pkgname{nanicolle}可用于植物标本中文采集标签和鉴定标签的排版。两种标签分别用$\string\Collect$命令和$\string\Identify$名称产生。排好的标签可直接打印。 + +\pkgname{nanicolle}依赖\pkgname{ctex}宏集和\pkgname{graphicx}、\pkgname{geometry}、\pkgname{multicol}、\pkgname{calc}、\pkgname{listofitems}等宏包。目前,\pkgname{nanicolle}文档类仅支持\XeLaTeX{}编译方式。 + +\pkgname{nanicolle}按 The \LaTeX{} Project Public License (LPPL) 1.3c 协议\footnote{LPPL 1.3c 协议的详细内容见\url{http://www.latex-project.org/lppl.txt}\stopurl 。}授权。 + +\parskip=0ex\relax + +\vfill\tableofcontents\vfill + +\clearpage + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\pkgname{nanicolle}类文档的结构}\label{usage} + +一份使用\pkgname{nanicolle}类的文档应是包含以下5部分、以后缀 \texttt{.tex} 结尾的纯文本: +\begin{enumerate} + \item 载入\pkgname{nanicolle}文档类,即$\string\documentclass[\param{选项}]\{nanicolle\}$。 + 其中,$\param{选项}$控制文档类的行为,例如$nomap$可抑制采集标签中的地图,$autoduplicate$则能按标本份数重复采集标签;选项超过一个时,其间要用$,$分隔。不需要加载选项时,可写$\string\documentclass\{nanicolle\}$。 + \item 在导言区使用$\string\heading$和$\string\subheading$命令定义个性化内容。要在采集标签上方添加统一的标题,可写$\string\heading\{\param{标题}\}$;副标题如需要则可由$\string\subheading\{\param{副标题}\}$命令产生。若跳过此部分,则采集标签上方无标题。 + \item 正文开始,即$\string\begin\{document\}$。 + \item 在正文中使用$\string\Collect$和$\string\Identify$两种命令分别产生采集标签和鉴定标签,每个命令占一行。两种命令的格式参见第 \ref{collect} 和第 \ref{identify} 节。 + \item 正文结束,即$\string\end\{document\}$。 +\end{enumerate} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{用\hbox{}$\textbackslash Collect$命令生成采集标签}\label{collect} + +$\string\Collect$命令的格式为 +\[% + \hangindent=2em\relax + \string\Collect + \tab\param{记录号}\tab\param{采集人}\tab\param{采集号}% + \tab\param{采集日期}\tab\param{科名}\tab\param{中文名}% + \tab\param{学名}\tab\param{照片号}\tab\param{标本份数}% + \tab\param{产地}\tab\param{经度}\tab\param{纬度}% + \tab\param{海拔}\tab\param{生境}\tab\param{生活型}% + \tab\param{体高}\tab\param{胸径}\tab\param{附注}% +\] +当中$\tab$表示水平制表符(U+0009,可按键盘Tab键输入)。每行最多能有一个$\string\Collect$命令;每个$\string\Collect$命令须出现在一行开始处,其所有参数必须出现在同一行中。 +某些参数可以为空,但$\tab$都须保留。 +以下就诸参数分别说明。 + +\begin{enumerate} + \item $\param{记录号}$:仅为数据组织方便而设,不在采集标签上出现。 + \item $\param{采集人}$:标本的采集者的姓名。如有多个采集者,应尽量列举姓名,其间可以用顿号分隔;不建议填写不包含人名的采集团队的名称。此参数不得为空。 + \item $\param{采集号}$:属于$\param{采集人}$中第一个采集者的记录标本采集的序列号码。建议为简单的整数,从1开始递增。 + \item $\param{采集日期}$:采集植物材料的日期,可使用$\param{年}.\param{月}.\param{日}$的阿拉伯数字表示。此参数不得为空。 + \item $\param{科名}$:临时鉴定的科的名称,建议使用中文表示。 + \item $\param{中文名}$:临时鉴定的植物中文名。 + \item $\param{学名}$:临时鉴定的植物学名,不带命名人引证。当非空时,可用通式$\param{属级部分}\param{种级部分}\param{种下等级部分}$表示。 + 其中,$\param{属级部分}$有2类结构: + \[\clearcnt + \ritem{\param{属名}}% + \ritem{\qtimes\param{属名}}*\] + $\param{种级部分}$有9类结构: + \[\clearcnt + \ritem{\uspace sp.}% + \ritem{\uspace sp.\uspace nov.}% + \ritem{\uspace\param{种加词}}% + \ritem{\uspace\qtimes\param{种加词}}% + \ritem{\uspace aff.\uspace\param{种加词}}% + \ritem{\uspace aff.\uspace\qtimes\param{种加词}}% + \ritem{\uspace cf.\uspace\param{种加词}}% + \ritem{\uspace cf.\uspace\qtimes\param{种加词}}% + \ritem{\uspace '\param{栽培种名}'}*\] + 当中的$\uspace$表示一个空格(U+0020)。$\param{种下等级部分}$仅当$\param{种级部分}$为结构iii或结构iv时可以非空,此时它有4类结构: + \[\clearcnt + \ritem{\uspace subsp.\uspace\param{亚种加词}}% + \ritem{\uspace var.\uspace\param{变种加词}}% + \ritem{\uspace f.\uspace\param{变型加词}}% + \ritem{\uspace '\param{栽培品种名}'}*\] + \item $\param{照片号}$:仅为数据组织方便而设,不在采集标签上出现。 + \item $\param{标本份数}$:标本的同号复份数目,用正整数表示。不在采集标签上出现。当文档类的$\param{选项}$包含$autoduplicate$时,每个$\string\Collect$命令将输出$\param{标本份数}$张重复的采集标签。 + \item $\param{产地}$:植物材料的采集地的自然语言表述,要包含完整的省级、县级、乡级行政单元序列和小地点,小地点可参照地标表示,以便考证与回访。此参数不得为空。 + \item $\param{经度}$:植物材料采集地的经度坐标,用十进制的浮点数表示,以角度为单位,不带单位符号,正数为东经,负数为西经。不接受度分秒表示。 + \item $\param{纬度}$:植物材料采集地的纬度坐标,用十进制的浮点数表示,以角度为单位,不带单位符号,正数为北纬,负数为南纬。不接受度分秒表示。 + \item $\param{海拔}$:植物材料采集地的海拔高度,用浮点数表示,以米为单位,不带单位符号,可以为负数。 + \item $\param{生境}$:植物居群的野外生活环境,如$山地$、$林缘$、$溪边$等,但对于栽培的植物,应填写$栽培$而非具体的生活环境。 + \item $\param{生活型}$:植物居群的生活型,如$乔木$、$灌木$、$藤本$等。 + \item $\param{体高}$:植物居群中个体的典型高度,用浮点数表示,以米为单位,不带单位符号。 + \item $\param{胸径}$:植物居群中个体的典型胸径,用浮点数表示,以厘米为单位,不带单位符号。 + \item $\param{附注}$:包含其他在植物标本上无法观察的有价值的信息,如各部的颜色、气味,树皮的纹理,传粉者,植物在当地的俗名、用途、常见程度等。 +\end{enumerate} + +\pkgname{nanicolle}文档类默认在经纬度均非空且经度在东经73--136度间、纬度在北纬17--54度间时在采集标签下方输出地图,以标明该坐标的位置。要抑制这个功能,可以在载入文档类时使用$nomap$选项,见第 \ref{usage} 节。 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{用\hbox{}$\textbackslash Identify$命令生成鉴定标签}\label{identify} + +$\string\Identify$命令的格式为 +\[% + \hangindent=2em\relax + \string\Identify + \tab\param{记录号}\tab\param{学名}\tab\param{中文名}% + \tab\param{鉴定人}\tab\param{鉴定人标准形式}% + \tab\param{鉴定日期}\tab\param{批注}% +\] +和$\string\Collect$一样,每个$\string\Identify$命令及其所有参数需独占一行。以下就诸参数分别说明。 + +\begin{enumerate} + \item $\param{记录号}$:仅为数据组织方便而设,不在采集标签上出现。 + \item $\param{学名}$:正式鉴定的植物学名,须带有命名人引证,可用通式$\param{属级部分}\param{种级部分}\param{种下等级部分}\param{命名人引证}$表示。此参数不得为空。 + \item $\param{中文名}$:与$\param{学名}$相关联的中文种名。 + \item $\param{鉴定人}$:标本鉴定者的姓名。 + \item $\param{鉴定人标准形式}$:标本鉴定者的姓名在分类学上约定的标准形式。此参数与$\param{鉴定人}$不得同时为空。 + \item $\param{鉴定日期}$:鉴定标本的日期,格式同$\param{采集日期}$。此参数不得为空。 + \item $\param{批注}$:需另外表明的分类学意见。 +\end{enumerate} + +不同于$\string\Collect$命令,$\string\Identify$命令不带$\param{标本份数}$参数,故每个$\string\Identify$命令固定地输出一张鉴定标签。要输出重复的鉴定标签,只能手动复制命令所在的行。 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{其他问题} + +\subsection{用工作表软件储存原始数据} + +$\string\Collect$与$\string\Identify$之所以不遵照\LaTeX{}惯例而用制表符$\tab$作为参数的定界符,其本意是使得原始数据可以储存工作表(Spreadsheet)软件\footnote{常见的工作表软件如 Microsoft Office Excel。}中。当纯文本粘贴到工作表中时,换行符分隔各行,制表符分隔行内各列。当工作表的内容粘贴为纯文本时,各行由换行符分隔,行内各列由制表符分隔(形成TSV格式)。事实上,这种机制允许储存于工作表中的原始数据可以直接为\XeLaTeX{}引擎所读取。具体来说,可以建立一个形如表 \ref{table} 的工作表来储存原始数据。 +\begin{table}[htbp] + \centering + \begin{tabular}{|+c|*{8}{^c|}} + \hline + \rowstyle{\bfseries} 命令 & 记录号 & 采集人 & 采集号 & 采集日期 & 科名 & 中文名 & 学名 & \ensuremath{\cdots} \\\hline + \string\Collect & 1 & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} \\\hline + \string\Collect & 2 & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} \\\hline + \string\Collect & 3 & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} & \ensuremath{\cdots} \\\hline + \end{tabular} + \caption{储存采集标签原始数据的工作表示例}\label{table} +\end{table} +这样,工作表中的若干行被选中并复制到纯文本环境下后便直接转换成了$\string\Collect$或$\string\Identify$命令要求的格式。而工作表中的原始数据库在这些命令所要求的参数外还能储存更丰富的信息,这些额外信息会被$\string\Collect$或$\string\Identify$命令忽略,不影响标签的内容。 + +\subsection{PDF文件的打印设置} + +编译得到的PDF文件最终要用打印机打印并裁剪,成为可实际使用的标签。打印机的可打印范围一般比纸面小,为保留文件完整性,打印程序通常默认将文件缩小并布局在纸面中心。这样,按印出来的线条裁切,便会出现两侧的标签宽、中间的标签窄的现象。为避免这种问题,打印PDF文件时应选中“使用原始页面大小”选项。 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{完整实例} + +% \widowpenalty=10000\relax + +以下是一份符合\pkgname{nanicolle}规范的文档实例,保存为 \texttt{nanicolle-example.tex}。 +\[% + \clearcnt + \everypar={\hangindent=2em\relax\advance\itemcnt1\relax% + \leavevmode\llap{\number\itemcnt\quad}} + \xeCJKsetup{CJKecglue={}} + \string\documentclass[autoduplicate]\string{nanicolle\string}\par + \string\begin\string{document\string}\par + \string\Collect\tab 2912\tab 杨宇昌\tab 6159\tab 2018.9.24\tab 莎草科\tab 褐穗莎草\tab Cyperus\uspace fuscus\tab 7038\tab 1\tab 北京市怀柔区琉璃庙镇双文铺村白河湾湿地生态公园\tab 116.678772\tab 40.655164\tab 214\tab 河边荒草地\tab 披散草本\tab 0.2\tab \tab 须根甚浅,不过2--3\uspace cm;花的鳞片两侧紫褐色,中间绿色。\par + \string\Collect\tab 1997\tab 杨宇昌\tab 5731\tab 2018.5.8\tab 忍冬科\tab 苦糖果\tab Lonicera\uspace fragrantissima\uspace subsp.\uspace standishii\tab 7609\tab 2\tab 河北省邯郸市武安市管陶乡董家门村西至洞垴途中\tab \tab \tab 1356.0\tab 山坡灌草丛\tab 灌木\tab 3\tab \tab 果实橙红色,味甜微苦。\par + \string\Identify\tab 392\tab Allium\uspace atrosanguineum\uspace var.\uspace tibeticum\uspace (Regel)\uspace G.\uspace H.\uspace Zhu\uspace \string&\uspace Turland\tab 藏葱\tab 杨宇昌\tab \tab 2018.10.7\tab \par + \string\Identify\tab 176\tab Acer\uspace davidii\uspace subsp.\uspace grosseri\uspace (Pax)\uspace P.\uspace C.\uspace de\uspace Jong\tab 葛萝槭\tab 杨宇昌\tab \tab 2018.4.19\tab \par + \string\Identify\tab 230\tab Erysimum\uspace \qtimes cheiri\uspace (L.)\uspace Crantz\tab 桂竹香\tab 杨宇昌\tab \tab 2018.5.17\tab \par + \string\Identify\tab 590\tab Koenigia\uspace alpina\uspace (All.)\uspace T.\uspace M.\uspace Schust.\uspace \string&\uspace Reveal\tab 高山神血宁\tab 杨宇昌\tab \tab 2019.4.13\tab \par + \string\end\string{document\string}\par +\] +注意,每个$\string\Collect$或$\string\Identify$命令及其所有参数实际上均位于同一行中,换行只是便于展示。将此文档放置在 \texttt{nanicolle.cls} 所在的目录下,命令行中运行 \texttt{xelatex nanicolle-example},即可在同一目录中得到 \texttt{nanicolle-example.pdf},其效果见图 \ref{example}。 +% \clearpage + +\begin{figure}[htbp] + \centering + \fboxsep=-.2pt\relax + \hbox{}\hidewidth\rulerbox{\vbox{\kern-.2pt\hbox{\kern-.2pt\fbox{\includegraphics*[bb=0cm 0cm 14.85cm 21cm]{nanicolle-example.pdf}}\kern-.2pt}\kern-.2pt}}\hidewidth\hbox{}\par + \caption{样例PDF文件 \texttt{nanicolle-example.pdf} 的前2栏(左半页)}\label{example} +\end{figure} + +\end{document} diff --git a/Master/texmf-dist/doc/xelatex/nanicolle/point.pdf b/Master/texmf-dist/doc/xelatex/nanicolle/point.pdf Binary files differnew file mode 100644 index 00000000000..77bb53bd656 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/nanicolle/point.pdf diff --git a/Master/texmf-dist/tex/xelatex/nanicolle/nanicolle.cls b/Master/texmf-dist/tex/xelatex/nanicolle/nanicolle.cls new file mode 100644 index 00000000000..2f3d72bff49 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/nanicolle/nanicolle.cls @@ -0,0 +1,461 @@ +%% nanicolle.cls +%% Copyright 2016--2019 Yuchang Yang < yang.yc.allium@gmail.com > +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Yuchang Yang. +% +% This work consists of: +% - the class file: [nanicolle.cls]; +% - the illustration files: [point.pdf, ChinaMainland.pdf, Dongguan.pdf]; +% - the manual files: [nanicolle.tex, nanicolle.pdf, README.md]; +% - the example files: [nanicolle-example.tex, nanicolle-example.pdf]. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{nanicolle}[2019/04/28 v2.00 class nanicolle] +% CATCODE PART I +\makeatletter +% CLASS OPTIONS +\newif\if@rulerhead + \@rulerheadfalse +\newif\if@col@barcode + \@col@barcodefalse +\newif\if@det@barcode + \@det@barcodefalse +\newif\if@auto@duplicate + \@auto@duplicatefalse +\newif\ifmap + \maptrue +\newif\if@internal + \@internalfalse +\DeclareOption{rulerhead}{\@rulerheadtrue} +\DeclareOption{colbarcode}{\@col@barcodetrue} +\DeclareOption{detbarcode}{\@det@barcodetrue} +\DeclareOption{nomap}{\mapfalse} +\DeclareOption{autoduplicate}{\@auto@duplicatetrue} +\DeclareOption{internal}{\@internaltrue} +\ProcessOptions +\LoadClass[UTF8,oneside]{ctexart} +% CONSTANT INTEGERS +\chardef\@ne=1 +\chardef\tw@=2 +\chardef\thr@@=3 +\chardef\f@ur=4 +\chardef\@other=12 +\chardef\Identify@len=8 +\chardef\Collect@len=19 +% CONSTANT CHARACTER AND STRINGS +\def\space{ } +\def\@unit{pt} +\def\vb@xt@{\vbox to} +% CATCODE PART II +\catcode`\^^@\@other +% CONDITIONS +\newif\if@param@enough@ +\newif\if@drew@map@ +\newif\if@barcodeprepared@ +\newif\if@identifying@ + \@identifying@false +% KERNING AND SPACING +\def\!{\kern-.0889em\relax} +\def\:{\kern+.0667em\relax} +\def\,{\kern+.1667em\relax} +\def\;{\kern+.2777em\relax} +\frenchspacing +% DIMENSIONS +\newdimen\NC@margin + \setlength\NC@margin{21.0757pt} +\newdimen\NC@seprule + \setlength\NC@seprule{0.14pt} +\newdimen\NC@fontsize + \setlength\NC@fontsize{9.3939pt} + \renewcommand\normalsize{\fontsize\NC@fontsize\NC@fontsize\selectfont} +\newdimen\map@x +\newdimen\map@y +\setlength\parskip\z@ +\setlength\parindent\z@ +\setlength\linewidth{169.1102pt} +% PAGE LAYOUT +\RequirePackage{graphicx} +\RequirePackage{geometry} + \geometry{paperwidth=297mm, paperheight=210mm, + left=\NC@margin, right=\NC@margin, top=\z@, bottom=\z@} +\RequirePackage{multicol} + \setlength\columnsep{2\NC@margin} + \setlength\columnseprule{\NC@seprule} +% COUNTS +\newcount\repeat@cnt +\newcount\word@cnt +% BOXES +\newbox\header@box +\newbox\temp@box +\newbox\pin@point + \setbox\pin@point=\vb@xt@\z@{\vss\hb@xt@\z@{% + \hss\includegraphics{point.pdf}\hss}\vss} +% UNIT EXPRESSIONS +\def\degree{\ensuremath{^\circ}} +\def\gobble@char#1{\relax} +\def\plus@one@degree#1#2#3{% + \if\relax#1\relax\else + \ifdim#1\@unit>\z@ + #1\:\ensuremath{^\circ}\!#2% + \else + \expandafter\gobble@char#1\:\degree\!#3% + \fi + \fi} +\def\plus@one@long#1{\plus@one@degree{#1}EW} +\def\plus@one@lat#1{\plus@one@degree{#1}NS} +\def\plus@one@second#1#2{% + \if\relax#1\relax\else + #1\,#2% + \fi} +\def\plus@one@cm#1{\plus@one@second{#1}{cm}} +\def\plus@one@m#1{\plus@one@second{#1}{m}} +% PARSING +\RequirePackage{calc} +\RequirePackage{listofitems} + \reademptyitems +\def\get@argin#1{% + \ifnum#1>\temp@arginlen\relax + \else\temp@argin[#1]\fi} +\def\col@parse@params#1{% + \edef\temp@list{#1} + \setsepchar{^^@} + \readlist\temp@argin{\temp@list} + \@param@enough@true + \edef\RecordNo{\get@argin{2}} + \edef\Collector{\get@argin{3}} + \edef\CollectionNo{\get@argin{4}} + \edef\DateCollection{\get@argin{5}} + \edef\Family{\get@argin{6}} + \edef\ChineseName{\get@argin{7}} + \edef\ScientificName{\get@argin{8}} + \edef\PhotoNo{\get@argin{9}} + \edef\NoDuplication{\get@argin{10}} + \edef\Location{\get@argin{11}} + \edef\Longitude{\get@argin{12}} + \edef\Latitude{\get@argin{13}} + \edef\Altitude{\get@argin{14}} + \edef\Habitat{\get@argin{15}} + \edef\LifeForm{\get@argin{16}} + \edef\Height{\get@argin{17}} + \edef\DBH{\get@argin{18}} + \edef\Description{\get@argin{19}} + \repeat@cnt\@ne + \if@auto@duplicate\if\relax\NoDuplication\relax\else + \repeat@cnt\NoDuplication\relax + \fi\fi + \if\relax\Collector\relax\@param@enough@false\fi + \if\relax\DateCollection\relax\@param@enough@false\fi + \if\relax\Location\relax\@param@enough@false\fi + } +\def\det@parse@params#1{% + \edef\temp@list{#1} + \setsepchar{^^@} + \readlist\temp@argin{\temp@list} + \@param@enough@true + \edef\RecordNo{\get@argin{2}} + \edef\ScientificName{\get@argin{3}} + \edef\ChineseName{\get@argin{4}} + \edef\Identifier{\get@argin{5}} + \edef\IdentifierStd{\get@argin{6}} + \edef\DateIdentification{\get@argin{7}} + \edef\Remark{\get@argin{8}} + \edef\temp@name{\Identifier\IdentifierStd} + \if\relax\ScientificName\relax\@param@enough@false\fi + \if\relax\temp@name\relax\@param@enough@false\fi + \if\relax\DateIdentification\relax\@param@enough@false\fi + } +% LATIN PARSING +\def\col@latin@break{\hfill\penalty-\@ne + \hskip -3em plus -1fill\relax\hbox{}\hskip3em\relax} +\def\col@latin@prefix{=-=} +\def\col@latin@mark#1#2{% + \expandafter\gdef\csname\col@latin@prefix#1\endcsname{#2}} + \col@latin@mark{subsp.}{\col@latin@break{\upshape subsp\@.}\itshape\space} + \col@latin@mark{var.}{\col@latin@break{\upshape var\@.}\itshape\space} + \col@latin@mark{f.}{\col@latin@break{\upshape f\@.}\itshape\space} + \col@latin@mark{cf.}{{\upshape cf\@.}\space} + \col@latin@mark{aff.}{{\upshape aff\@.}\space} + \col@latin@mark{sp.}{\upshape sp\@.\space} + \col@latin@mark{@bquote}{\upshape\string`} + \col@latin@mark{@equote}{\unskip\string'} + \col@latin@mark{@times}{\ensuremath{\times}} + \col@latin@mark{@end}{\global\let\@iterator\relax} +\def\col@latin#1{% + \itshape + \gdef\@iterator##1 {% + \@ifundefined{\col@latin@prefix##1}% + {##1\space}% + {\csname\col@latin@prefix##1\endcsname}% + \@iterator}% + \@iterator#1 @end +} +\def\inter@taxon@skip{\hskip .1667em minus .1667em\relax} +\def\det@latin@prefix{^_^} +\def\det@latin@mark#1#2{% + \expandafter\gdef\csname\det@latin@prefix#1\endcsname{#2}} + \det@latin@mark{subsp.}{{\upshape subsp\@.}\word@cnt\tw@\space} + \det@latin@mark{var.}{{\upshape var\@.}\word@cnt\tw@\space} + \det@latin@mark{f.}{{\upshape f\@.}\advance\word@cnt\tw@\space} + \det@latin@mark{cf.}{{\upshape cf\@.}\word@cnt\tw@\space} + \det@latin@mark{aff.}{{\upshape aff\@.}\word@cnt\tw@\space} + \det@latin@mark{sp.}{\upshape sp\@.\word@cnt\z@\space} + \det@latin@mark{@bquote}{\upshape\string`} + \det@latin@mark{@equote}{\unskip\string'} + \det@latin@mark{@times}{\ensuremath{\mathsf\times}\advance\word@cnt\@ne} + \det@latin@mark{et}{\penalty-\@ne et\penalty-\@ne\space} + \det@latin@mark{ex}{\penalty-\tw@ et\penalty-\tw@\space} + \det@latin@mark{@lparen}{\penalty-\thr@@\lparen} + \det@latin@mark{@rparen}{\unskip\rparen\penalty-\thr@@} + \det@latin@mark{@end}{\global\let\@iterator\relax} +\def\det@latin#1{% + \itshape + \word@cnt\tw@ + \leavevmode + \gdef\@iterator##1 {% + \@ifundefined{\det@latin@prefix##1}% + {##1\space}% + {\csname\det@latin@prefix##1\endcsname}% + \advance\word@cnt-\@ne + \ifcase\word@cnt\penalty-\f@ur\upshape\inter@taxon@skip\or\itshape\fi + \@iterator}% + \@iterator#1 @end +} +% FONT STYLE +\def\headerstyle{\bfseries} +\def\headingstyle{\scshape} +\def\detlatinstyle{\sffamily\bfseries} +\def\detchinesestyle{\bfseries} +\def\identifierstyle{\itshape} +% INDIVIDUALIZATION +\def\@herbariumcode{} +\def\@heading{} +\def\@subheading{} +\def\herbariumcode#1{\def\@herbariumcode{#1}} +\def\heading#1{\def\@heading{#1}} +\def\subheading#1{\def\@subheading{#1}} +% MAP DEFINITION +\def\mapdef#1#2#3#4#5#6{% + \expandafter\newbox\csname#1@map\endcsname + \setbox\csname#1@map\endcsname=\hbox{% + \includegraphics[width=\linewidth]{#2}}% + \expandafter\def\csname#1@longmin\endcsname{#3}% + \expandafter\def\csname#1@longmax\endcsname{#4}% + \expandafter\def\csname#1@latmin\endcsname{#5}% + \expandafter\def\csname#1@latmax\endcsname{#6}% +} +% MAP DEFINITIONS +\mapdef{ChinaMainland}{ChinaMainland.pdf}{73}{136}{17}{54} +% \mapdef{Dongguan}{Dongguan.pdf}{113.5}{114.26667}{22.63333}{23.16667} +% FULL LINE COMMAND TRICK +\begingroup + \catcode`\^^M\@other% + \gdef\def@to@eol#1#2{% + \gdef#1{\begingroup\catcode`\^^M\@other\csname\string#1\endcsname}% + \expandafter\gdef\csname\string#1\endcsname##1^^M{#2{##1}\endgroup}}% +\endgroup +% COMPONENTS IN COMMON +\def\cutting@line{% + \nointerlineskip + \centerline{\hss\rule{.25\paperwidth}{\NC@seprule}\hss}} +% COMPONENTS OF COLLECTION LABELS +\def\form@line#1#2{% + \par\hangindent=1em% + \leavevmode + \setbox\header@box=\hbox{\headerstyle#1}% + \setbox\temp@box=\hbox{\copy\header@box\quad#2}% + \def\glue@begin{\quad\hfill}% + \def\glue@end{\hfill\hfill\hbox{}}% + \ifdim\wd\temp@box>\linewidth + \def\glue@begin{\CJKglue\quad\CJKglue}\fi + \box\header@box + \uline{\glue@begin#2\glue@end}\par} +\def\form@cell#1#2{% + \leavevmode + \hbox{\headerstyle#1}\nobreak + \uline{\;\hfill#2\hfill\;}\hbox{}\penalty-1\relax} +\def\heading@line#1{% + \setbox\temp@box=\hbox{#1}% + \ifdim\wd\temp@box>\linewidth + \centerline{\resizebox{\linewidth}{\height}{\box\temp@box}}% + \else + \centerline{\box\temp@box}% + \fi} +\if@rulerhead + \RequirePackage{rulerbox} + \setlength\rulersep{-.2pt} + \setlength\rulerwidth{1mm} +\fi +\def\printheadings{% + \if\relax\@heading\relax\else + \heading@line{\headingstyle\@heading} + \if\relax\@subheading\relax\else + \vskip-2pt\relax + \heading@line{\headingstyle\@subheading}\fi + \if@rulerhead + \nointerlineskip\vskip2pt\relax + \centerline{\hbox{}\hss + \rulerbox[tb]{\kern-.9mm\rule{6.18cm}{.4pt}\kern-.9mm}% + \hss\hbox{}}% + \vskip5pt\relax + \else + \hrule\@height\NC@seprule + \vskip9pt\relax + \fi + \fi} +\def\printform{% + \form@line{采集人}{\Collector}% + \form@cell{采集号}{\CollectionNo}% + \if@internal\form@cell{照片号}{\PhotoNo}\par\fi + \form@cell{采集日期}{\DateCollection}% + \if@internal\form@cell{标本份数}{\NoDuplication}\fi\par + \form@line{产地}{\Location}% + \form@cell{经度}{\plus@one@long\Longitude}% + \form@cell{纬度}{\plus@one@lat\Latitude}\par + \form@cell{海拔}{\plus@one@m\Altitude}% + \form@cell{生境}{\Habitat}\par + \form@cell{生活型}{\LifeForm}\penalty-2\relax% + \form@cell{体高}{\plus@one@m\Height}% + \form@cell{胸径}{\plus@one@cm\DBH}\par + \form@cell{科名}{\Family}% + \form@cell{中文名}{\ChineseName}\par + \form@line{学名}{\expandafter\col@latin\expandafter{\ScientificName}} + \form@line{附注}{\Description} + \nointerlineskip} +\if@col@barcode + \RequirePackage[code=Code39,X=.5mm,H=4mm]{makebarcode} +\fi +\def\printbarcode{% + \let\if@barcodeprepared@\if@col@barcode + \if\relax\RecordNo\relax\@barcodeprepared@false\fi + \if\relax\@herbariumcode\relax\@barcodeprepared@false\fi + \if@barcodeprepared@ + \vskip6.6pt\relax + \resizebox{\columnwidth}{4mm}{\barcode{\@herbariumcode-\RecordNo}}\par + \nointerlineskip\vskip13.9pt\relax + \else + \vskip\NC@margin + \fi + \cutting@line} +\def\makemap#1{% + \unless\if@drew@map@ + \if\relax\Longitude\relax\else + \if\relax\Latitude\relax\else + \ifdim\Longitude\@unit>\csname#1@longmin\endcsname\@unit + \ifdim\Longitude\@unit<\csname#1@longmax\endcsname\@unit + \ifdim\Latitude\@unit>\csname#1@latmin\endcsname\@unit + \ifdim\Latitude\@unit<\csname#1@latmax\endcsname\@unit + \setlength\map@x{\wd\csname#1@map\endcsname*% + \ratio{\Longitude\@unit-\csname#1@longmin\endcsname\@unit}% + {\csname#1@longmax\endcsname\@unit-\csname#1@longmin\endcsname\@unit}} + \setlength\map@y{\ht\csname#1@map\endcsname*% + \ratio{\Latitude\@unit-\csname#1@latmin\endcsname\@unit}% + {\csname#1@latmax\endcsname\@unit-\csname#1@latmin\endcsname\@unit}} + \vskip3.5mm\relax + \begingroup\ooalign{% + \copy\csname#1@map\endcsname\cr + \hb@xt@\map@x{\hss\vb@xt@\map@y{\copy\pin@point\vss}}\cr} + \endgroup + \vskip\NC@margin + \cutting@line + \@drew@map@true + \fi\fi\fi\fi\fi\fi + \fi} +% \def\map@series{Dongguan,ChinaMainland} +\def\map@series{ChinaMainland} +\def\mapseries#1{\def\map@series{#1}} +\def\@Collect#1{% + \@drew@map@false + \col@parse@params{#1}% + \if@param@enough@ + \loop\ifnum\repeat@cnt>\z@ + \nointerlineskip + \begin{minipage}[c]{\linewidth}% + \vskip\NC@margin + \printheadings + \printform + \printbarcode + \ifmap\@for\@tmp:=\map@series\do{\makemap{\@tmp}}\fi + \end{minipage}% + \filbreak + \advance\repeat@cnt-\@ne\repeat + \fi} +\def@to@eol\Collect\@Collect +% COMPONENTS OF IDENTIFICATION LABELS +\if@det@barcode + \RequirePackage{qrcode} +\fi +\def\printqrcode{% + \let\if@barcodeprepared@\if@det@barcode + \if\relax\RecordNo\relax\@barcodeprepared@false\fi + \if\relax\@herbariumcode\relax\@barcodeprepared@false\fi + \if@barcodeprepared@ + \vb@xt@\z@{\vss\hbox{\qrcode[height=1cm]{\@herbariumcode.\RecordNo}}\kern-5pt}\fi} +\def\identifier@skip{\hskip12mm minus 12mm} +\def\@Identify#1{% + \@identifying@true + \det@parse@params{#1}% + \if@param@enough@ + \par + \begin{minipage}[c]{\columnwidth}% + \vskip\NC@margin + \begingroup + \centering + {\detlatinstyle\expandafter\det@latin\expandafter{\ScientificName}\par}% + {\detchinesestyle\leavevmode\ChineseName\par}% + \endgroup + \vskip7pt\relax + \hb@xt@\linewidth{% + \sfcode`\.=390\relax + \printqrcode\identifier@skip\identifier@skip\identifier@skip + {\identifierstyle\Identifier}\identifier@skip + {\identifierstyle\IdentifierStd}\identifier@skip\identifier@skip + \DateIdentification}\par + \if\relax\Remark\relax\else + \vskip3pt + \hskip44pt\Remark\par\fi + \vskip\NC@margin + \cutting@line + \end{minipage}% + \filbreak + \fi + \@identifying@false} +\def@to@eol\Identify\@Identify +% CATCODES PART III +\def\markdown{\catcode`\*\active\catcode`\'\active} +\def\endmarkdown{\catcode`\*\@other\catcode`\'\@other} +\markdown +\def*#1*{{\noexpand\noexpand\noexpand\itshape#1}} +\def'#1'{@bquote #1 @equote } +\endmarkdown +\catcode`\×\active + \def×{@times } +\catcode`\&\active + \def&{et} +\let\lparen(%) +\let\rparen)%( +\catcode`\(\active%\) +\def(#1){% + \if@identifying@ + @lparen\space #1 @rparen\space + \else + \lparen#1\rparen + \fi} +\catcode`\^^@\@other +\catcode`\^^I\active + \def^^I{^^@} +\makeatother +% HOOKS +\AtBeginDocument{\begin{multicols*}{4}\markdown} +\AtEndDocument{\endmarkdown\end{multicols*}} +\endinput +% END OF FILE nanicolle.cls diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 8f83b106423..a99ca4ca2ea 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -474,7 +474,7 @@ my @TLP_working = qw( musixtex musixtex-fonts musixtnt musuos muthesis mversion mwcls mwe mweights mxedruli mychemistry mycv mylatexformat mynsfc - na-box na-position nag nameauth namespc nanumtype1 nar + na-box na-position nag nameauth namespc nanicolle nanumtype1 nar natbib natded nath nature navigator navydocs ncclatex ncctools ncntrsbk diff --git a/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc b/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc index 80b89edefd5..e045668386e 100644 --- a/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc @@ -18,6 +18,7 @@ depend hyphen-chinese depend impatient-cn depend latex-notes-zh-cn depend lshort-chinese +depend nanicolle depend njurepo depend pgfornament-han depend texlive-zh-cn diff --git a/Master/tlpkg/tlpsrc/nanicolle.tlpsrc b/Master/tlpkg/tlpsrc/nanicolle.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/nanicolle.tlpsrc |