代码拉取完成,页面将自动刷新
考虑到在书籍实际出版时封面和封底需要专门设计和制作,因此可以不考虑封面和封底的设计,但却需要设计扉页、封面内页和版权页。为此,我在你原代码的基础上增加了设置书籍要素的key-value设置命令\entityset
及排版扉页、封面内页和版权页的\flypage
、\makeintertitle
和\copyrightpage
三个命令。
由于没有找到该仓库的PR链接,因此,无法直接提交PR,在此直接给出我在dtx文件中添加的代码:
% \subsection{特殊页面排版命令}
% \label{subsec:document command}
% \begin{function}[added = 2021-04-24,updated = 2021-04-24]{\flypage,\makeinertitle,\copyrightpage}
% \begin{syntax}
% \tn{flypage*}\oarg{扉页抬头|(献给)}
% \tn{makeinertitle*}
% \tn{copyrightpage*}
% \end{syntax}
% \tn{flaypage}为扉页排版命令,无页眉页脚,致辞垂直方向居中排版,致辞抬头可根据需要设置,默认为\opt{献给}。\tn{makeinertitle}为标题内页排版命令,\tn{copyrightpage}为版权页排版命令。其中如果命令带有\opt{*},则表示 排版该页后不使用清双页命令。
% \end{function}
% \midrule
% \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \hyperref[subsec:book entity]{书籍要素}\\
% thmset & geoset & hdrset & tocset & entityset\\
% \label{subsec:book entity}
% \begin{function}[EXP,added = 2021-04-24,updated = 2021-04-24]{author,title,subtitle,intro,cipiii,cipiv,cipyear,cipnum,planeditor,exeeditor,publisher,pubdate,pubcity,pubaddr,pubtel,pubzip,pubweb,pubemail,dealer,printer,editiondate,edition,printdate,printno,pages,words,copys,price,dedicatedto,bookseries}
% \begin{syntax}
% author = <作者列表>
% title = <书名>
% subtitle = <书名子标题>
% intro = <内容简介>
% cipiii = <CIP数据第III项>
% cipiv = <CIP数据第IV项>
% cipyear = <CIP数据年份>
% cipnum = <CIP数据编号>
% planeditor = <策划编辑>
% exeeditor = <责任编辑>
% publisher = <出版社>
% pubdate = <出版时间>
% pubcity = <出版城市>
% pubaddr = <出版社地址>
% pubtel = <出版社电话>
% pubzip = <出版社邮编>
% pubweb = <出版社网址>
% pubemail = <出版社电子邮箱>
% dealer = <经销商>
% printer = <印刷单位>
% editiondate = <版次年月>
% edition = <版次>
% printdate = <印刷年月>
% printno = <印次>
% pages = <印张>
% words = <字数>
% copys = <印数>
% price = <定价>
% dedicatedto = <扉页致辞>
% bookseries = <书籍系列>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{entityset/...}
% \end{function}
%
% \begin{optdesc}
% \item[author] \opt{author} 是逗号分隔的作者列表,在此没有使用\tn{author}命令的原因是在图书在版编目(CIP)数据中需要提取第一个作者的第一个字,因此使用了clist类型变量保存作者列表。
% \item[title] \opt{title}是书籍题目,在此没有使用\tn{title}命令的原因是在图书在版编目(CIP)数据中要提取书名的第一个字。
% \item[subtitle] \opt{subtitle}是书籍的子标题。
% \item[intro] \opt{intro}是书籍的内容简介。
% \item[cipiii] \opt{cipiii}是图书在版编目(CIP)数据的第III项。
% \item[cipiv] \opt{cipiv}是图书在版编目(CIP)数据的第IV项。
% \item[cipyear] \opt{cipyear}是图书在版编目(CIP)数据核字年份。
% \item[cipnum] \opt{cipnum}是图书在版编目(CIP)数据核字编号。
% \item[planeditor] \opt{planeditor}是策划编辑。
% \item[exeeditor] \opt{exeeditor}是逗号分隔的责任编辑列表。
% \item[publisher] \opt{publisher}是出版社名称。
% \item[pubdate] \opt{pubdate}是出版年月(用于CIP)。
% \item[pubcity] \opt{pubcity}是出版地(用于CIP)。
% \item[pubaddr] \opt{pubaddr}是出版社地址。
% \item[pubtel] \opt{pubtel}是出版社联系电话。
% \item[pubzip] \opt{pubzip}是出版社邮编。
% \item[pubweb] \opt{pubweb}是出版社网址。
% \item[pubemail] \opt{pubemail}是出版社电子邮箱。
% \item[dealer] \opt{dealer}是经销书店。
% \item[printer] \opt{printer}是印刷单位。
% \item[editiondate] \opt{editiondate}是版次年月。
% \item[edition] \opt{edition}是版次。
% \item[printdate] \opt{printdate}是印刷年月。
% \item[printno] \opt{printno}是印次。
% \item[pages] \opt{pages}是印张。
% \item[words] \opt{words}是字数。
% \item[copys] \opt{copys}是印数。
% \item[price] \opt{price}是定价。
% \item[isbn] \opt{isbn}是ISBN号。
% \item[dedicatedto] \opt{dedicatedto}是扉页中的致辞。
% \item[bookseries] \opt{bookseries}是``丛书''名称。
% \begin{ctexexam}
% \tocset
% {
% title = {用easybook \LaTeX{}模板写作指南},
% author = {瞿毅, \LaTeX{}er},
% intro = {
% 本书针对目前国内出版社缺乏\LaTeX{}书稿模板的问题,
% 设计并开发了一个\LaTeX{}书稿排版模板,并对其使用宏包选项、
% 自定义环境和命令等进行了详细说明。以期方便大家进行书稿排版。
%
% 本书图文并茂,实例丰富,语言活泼,为深入学习和掌握\LaTeX{}排版的
% 读者提供指导和帮助,为出版社的\LaTeX{}模板开发供参考和启发。
% },
% dedicatedto = {那些喜欢\LaTeX{}的人,把\LaTeX{}当作乐趣的人。},
% bookseries = {\LaTeX{}学习丛书},
% }
% \end{ctexexam}
% \end{optdesc}
\clist_new:N \l__eb_entity_author_clist
\tl_new:N \l__eb_entity_title_tl
\tl_new:N \l__eb_entity_subtitle_tl
\tl_new:N \l__eb_entity_intro_tl
\tl_new:N \l__eb_entity_cipiii_tl
\tl_new:N \l__eb_entity_cipiv_tl
\tl_new:N \l__eb_entity_cipyear_tl
\tl_new:N \l__eb_entity_cipnum_tl
\tl_new:N \l__eb_entity_planeditor_tl
\clist_new:N \l__eb_entity_exeeditor_clist
\tl_new:N \l__eb_entity_publisher_tl
\tl_new:N \l__eb_entity_pubdate_tl
\tl_new:N \l__eb_entity_pubcity_tl
\tl_new:N \l__eb_entity_pubaddr_tl
\tl_new:N \l__eb_entity_pubtel_tl
\tl_new:N \l__eb_entity_pubzip_tl
\tl_new:N \l__eb_entity_pubweb_tl
\tl_new:N \l__eb_entity_pubemail_tl
\tl_new:N \l__eb_entity_dealer_tl
\tl_new:N \l__eb_entity_printer_tl
\tl_new:N \l__eb_entity_editdate_tl
\tl_new:N \l__eb_entity_edition_tl
\tl_new:N \l__eb_entity_printdate_tl
\tl_new:N \l__eb_entity_printno_tl
\tl_new:N \l__eb_entity_pages_tl
\tl_new:N \l__eb_entity_words_tl
\tl_new:N \l__eb_entity_copys_tl
\tl_new:N \l__eb_entity_price_tl
\tl_new:N \l__eb_entity_isbn_tl
\tl_new:N \l__eb_entity_dedicatedto_tl
\tl_new:N \l__eb_entity_bookseries_tl
\__ctex_define:nn {entityset}
{
author .clist_set:N = \l__eb_entity_author_clist,
author .initial:n = {张三,李四,王五,马六},
title .tl_set:N = \l__eb_entity_title_tl,
title .initial:n = {简明书籍编写\LaTeX{}模板},
subtitle .tl_set:N = \l__eb_entity_subtitle_tl,
subtitle .initial:n = {基于\LaTeX{}3实现},
intro .tl_set:N = \l__eb_entity_intro_tl,
intro .initial:n = {一个用\LaTeX{}3实现的简单书籍编写\LaTeX{}模板},
cipiii .tl_set:N = \l__eb_entity_cipiii_tl,
cipiii .initial:n = {\LaTeX{}--书籍模板},
cipiv .tl_set:N = \l__eb_entity_cipiv_tl,
cipiv .initial:n = {TPxxx.x},
cipyear .tl_set:N = \l__eb_entity_cipyear_tl,
cipyear .initial:n = {2021},
cipnum .tl_set:N = \l__eb_entity_cipnum_tl,
cipnum .initial:n = {888888},
planeditor .tl_set:N = \l__eb_entity_planeditor_tl,
planeditor .initial:n = {赵七},
exeeditor .clist_set:N = \l__eb_entity_exeeditor_clist,
exeeditor .initial:n = {刘八,赵七},
publisher .tl_set:N = \l__eb_entity_publisher_tl,
publisher .initial:n = {\LaTeX{}工作室},
pubdate .tl_set:N = \l__eb_entity_pubdate_tl,
pubdate .initial:n = {2021.5},
pubcity .tl_set:N = \l__eb_entity_pubcity_tl,
pubcity .initial:n = {杭州},
pubaddr .tl_set:N = \l__eb_entity_pubaddr_tl,
pubaddr .initial:n = {浙江省杭州市萧山区宁围街道港汇中心2-816A},
pubtel .tl_set:N = \l__eb_entity_pubtel_tl,
pubtel .initial:n = {13336175901},
pubzip .tl_set:N = \l__eb_entity_pubzip_tl,
pubzip .initial:n = {000000},
pubweb .tl_set:N = \l__eb_entity_pubweb_tl,
pubweb .initial:n = {latexstudio.net},
pubemail .tl_set:N = \l__eb_entity_pubemail_tl,
pubemail .initial:n = {latexstudio@qq.com},
dealer .tl_set:N = \l__eb_entity_dealer_tl,
dealer .initial:n = {XXXX书店},
printer .tl_set:N = \l__eb_entity_printer_tl,
printer .initial:n = {XXXX印务有限责任公司},
editiondate .tl_set:N = \l__eb_entity_editiondate_tl,
editiondate .initial:n = {2021年5月},
edition .tl_set:N = \l__eb_entity_edition_tl,
edition .initial:n = {1},
printdate .tl_set:N = \l__eb_entity_printdate_tl,
printdate .initial:n = {2021年5月},
printno .tl_set:N = \l__eb_entity_printno_tl,
printno .initial:n = {1},
pages .tl_set:N = \l__eb_entity_pages_tl,
pages .initial:n = {19.75},
words .tl_set:N = \l__eb_entity_words_tl,
words .initial:n = {800},
copys .tl_set:N = \l__eb_entity_copys_tl,
copys .initial:n = {1$\sim$3000},
price .tl_set:N = \l__eb_entity_price_tl,
price .initial:n = {49.00},
isbn .tl_set:N = \l__eb_entity_isbn_tl,
isbn .initial:n = {888-8-8888-8888-8},
dedicatedto .tl_set:N = \l__eb_entity_dedicatedto_tl,
dedicatedto .initial:n = {那些喜欢\LaTeX{}的人,把\LaTeX{}当作乐趣的人。},
bookseries .tl_set:N = \l__eb_entity_bookseries_tl,
bookseries .initial:n = {\LaTeX{}学习丛书},
}
\NewDocumentCommand{\flypage}{sO{献给}}
{
\begingroup
\thispagestyle{empty}
\vspace*{\stretch{1}}
\IfNoValueTF{#2}{
\mbox{}
}
{
\Large\textbf{#2}:
}
\tl_use:N \l__eb_entity_dedicatedto_tl
\vspace*{\stretch{1}}
% \cleardoublepage
\IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
\endgroup
}
% \RenewDocumentCommand{\maketitle}{s}
\NewDocumentCommand{\makeinertitle}{s}
% \renewcommand{\maketitle}
{
\begingroup
\thispagestyle{empty}
\noindent{}\large\songti\rmfamily \tl_use:N \l__eb_entity_bookseries_tl
\vspace*{10ex}
\begin{center}
{\Huge\bfseries \tl_use:N \l__eb_entity_title_tl}\\
\vspace{1cm}
{\itshape\large\clist_use:Nn \l__eb_entity_author_clist {\hspace*{1\ccwd}}\hspace*{0.5\ccwd}著}
\end{center}
\vfill
\begin{center}
\tl_use:N \l__eb_entity_publisher_tl
\end{center}
% \clearpage
\IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
\endgroup
}
\NewDocumentCommand{\copyrightpage}{s}
% \newcommand{\copyrightpage}
{
\begingroup
\thispagestyle{empty}
\vspace{\stretch{1}}
\centerline{\heiti {内 \hspace{0.25em}容 \hspace{0.25em}简 \hspace{0.25em}介}}\vspace{1em}
\small
\tl_use:N \l__eb_entity_intro_tl
\vfill
\begin{flushleft}
{\zihao{5}\heiti 图书在版编目\bfseries{(CIP)}数据}\\
\bigskip
\zihao{5}
\tl_use:N \l__eb_entity_title_tl/
\int_set:Nn \l_tmpa_int {\clist_count:N \l__eb_entity_author_clist}
\int_compare:nNnTF {\l_tmpa_int} > {1} {
\clist_item:Nn \l__eb_entity_author_clist {1}等著.
}{
\clist_item:Nn \l__eb_entity_author_clist {1}著.
}
---\tl_use:N \l__eb_entity_pubcity_tl :~
\tl_use:N \l__eb_entity_publisher_tl,~
\tl_use:N \l__eb_entity_pubdate_tl\\
ISBN~
\tl_use:N \l__eb_entity_isbn_tl\\
\bigskip
\int_to_Roman:n {1}. \ding{172}\str_item:Nn \l__eb_entity_title_tl {1}$\cdots$\hspace*{10.5bp}
\int_to_Roman:n {2}. \ding{172}\str_item:Nn \l__eb_entity_author_clist {1}$\cdots$\hspace*{10.5bp}
\int_to_Roman:n {3}. \ding{172}\tl_use:N \l__eb_entity_cipiii_tl \hspace*{10.5bp}
\int_to_Roman:n {4}. \ding{172}\tl_use:N \l__eb_entity_cipiv_tl\\
\bigskip
中国版本图书馆CIP数据核字(\tl_use:N \l__eb_entity_cipyear_tl)
第\tl_use:N \l__eb_entity_cipnum_tl 号\\
\bigskip
\bigskip
\bigskip
\begingroup
\zihao{-5}
\begin{tabular}{@{}llll@{}}
\renewcommand\arraystretch{1.5} \\
策划编辑 & \multicolumn{3}{l}{\l__eb_entity_planeditor_tl}\\
责任编辑 & \multicolumn{3}{l}{\clist_use:Nn \l__eb_entity_exeeditor_clist{\hspace*{1\ccwd}}}\\
出版发行 & \multicolumn{3}{l}{\l__eb_entity_publisher_tl(\l__eb_entity_pubaddr_tl)}\\
电\hspace*{2\ccwd}话 & \l__eb_entity_pubtel_tl & 邮\hspace*{2\ccwd}编 & \l__eb_entity_pubzip_tl\\
网\hspace*{2\ccwd}址 & \l__eb_entity_pubweb_tl & 电子邮箱 & \l__eb_entity_pubemail_tl\\
经\hspace*{2\ccwd}销 & \multicolumn{3}{l}{\l__eb_entity_dealer_tl}\\
印刷单位 & \multicolumn{3}{l}{\l__eb_entity_printer_tl}\\
版\hspace*{2\ccwd}次 & \l__eb_entity_editdate_tl 第\l__eb_entity_edition_tl 版 & \multicolumn{2}{l}{\l__eb_entity_printdate_tl 第\l__eb_entity_printno_tl 次印刷}\\
开\hspace*{2\ccwd}本 & 787毫米×1092毫米 1/16 & 印\hspace*{1.4\ccwd}张 & \l__eb_entity_pages_tl\\
字\hspace*{2\ccwd}数 & \multicolumn{3}{l}{\l__eb_entity_words_tl 千字}\\
印\hspace*{2\ccwd}数 & \multicolumn{3}{l}{\l__eb_entity_copys_tl 册}\\
定\hspace*{2\ccwd}价 & \multicolumn{3}{l}{\l__eb_entity_price_tl 元}\\
\multicolumn{4}{@{}l@{}}{ISBN\ \l__eb_entity_isbn_tl\ /\ TP}\\
\multicolumn{4}{@{}l@{}}{\bfseries XDUP 5880001-1}\\
\multicolumn{4}{@{}l@{}}{\heiti\bfseries ***如有印装问题可调换***}
\end{tabular}
\endgroup
\end{flushleft}
\IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
\endgroup
}
排版的三个页面的样例为:
不妥之处,敬请批评指正。