我正在编排一本编辑过的书(显然是许多书中的第一本,所以我正在建立一个基于回忆录的课程),其中每一章都有不同的作者。
我希望在标题页上分别列出编辑者和贡献者,并在前言中按章节顺序列出贡献者列表及其简历/所属机构和联系信息。此外,每个章节标题(及其目录条目)都需要有作者和脚注所属机构(仅限章节)。
我正在考虑创建一个新的列表(类似于图形列表),其中包含每个贡献作者块,并将乳胶的标准作者指向“编辑”?
不幸的是,这超出了我的乳胶技能范围。任何关于如何进行的建议都会有所帮助。
编辑:我无法在工作中使用图像或云访问,因此我只能粗略地描述一下我所谈论的内容:
对于标题页:
TITLE
Edited by:
A.N. Editor
with contributions by:
One Author
Second Author
Third Author
前言部分如下:
**List of Contributors**
One Author, Professor Emeritus
Miscatonic University, 123 Main Street, Salem NY 12345
email: [email protected]
Second Author, Chief Engineer
Big Enviro Firm, Inc., 123 Main Street, Anywhere CA 67890
email: [email protected]
Third Author, Random Expert of Miscellany
DeepThought Consultants, LLC., 21b Baker Street, Washington D.C.
答案1
根据以上评论,这里有一种方法可以做到这一点。我依靠很少使用的yax
包,因为看起来您的键值需求非常简单,并且它提供了轻量级的标记语法。
主要的宏是
\printcontributor{<parameter>}
这将打印每个贡献者的完整信息。下面显示了如何进行一些简单的条件格式设置的示例。
另一个宏是
\maketitlepage{<title>}{<editor>}{<list of contributors, separated by commas>}
这是通过重用 中的信息来创建标题页的一种方法\setparameter
。唯一的小技巧是使用 的etoolbox
列表循环函数,这样您就可以通过使用参数名称来访问每个贡献者的信息。
在这两种情况下,您可能都希望更改格式以满足您的需要。
\documentclass[12pt]{memoir}
\usepackage{etoolbox}
\usepackage{yax}
\usepackage{hyperref}
\setparameter Smith:
firstname = John
lastname = Smith
job = {Professor Emeritus}
univ = {Miscatonic University}
address = {123 Main Street}
city = Salem
region = NY
postcode = 12345
email = {\href{mailto:[email protected]}{[email protected]}}
\setparameter Doe:
firstname = Jane
lastname = Doe
job = {Chief Engineer}
firm = {Big Enviro Firm, Inc.}
address = {123 Main Street}
city = Anywhere
region = CA
postcode = 67890
email = [email protected]
\setparameter Author:
firstname = Third
lastname = Author
job = {Random Expert of Miscellany}
firm = {Deep Thought Consultants, LLC.}
address = {123 Main Street}
city = Elsewhere
region = ZZ
postcode = 55555
\newcommand{\printcontributor}[1]{%
\begingroup
\parindent 0pt
\usevalue #1: firstname
\space
\usevalue #1: lastname
\ifattribute #1: job {,\space}{\relax}
\usevalue #1: job
\newline
\usevalue #1: univ
\usevalue #1: firm
,\space
\usevalue #1: address
,\space
\usevalue #1: city
\space
\usevalue #1: region
\space
\usevalue #1: postcode
\ifattribute #1: email {\newline} {\relax}
\usevalue #1: email
\endgroup
}
% #1 = title of book
% #2 = editor
% #3 = comma-separated list of contributors from above \setparameter
\newcommand{\maketitlepage}[3]{%
\begingroup
\centering
\begingroup
\Large \bfseries
#1
\endgroup
\vspace*{2\baselineskip}
Edited by:\par
#2
\vspace*{2\baselineskip}
with contributions by:
\renewcommand\do[1]{%
{\itshape
\usevalue ##1:firstname \space \usevalue ##1:lastname \par}%
}
% \docsvlist{Smith, Doe, Author}
\docsvlist{#3}
\endgroup
}
\begin{document}
% print custom title page
\maketitlepage
{Title of the Book}%
{A. N. Author}%
{Smith, Doe, Author}
\bigskip
% Contributors
\begingroup
\parindent 0pt
\parskip 12pt
\textbf{Contributors}
\printcontributor{Smith}
\printcontributor{Doe}
\printcontributor{Author}
\endgroup
\end{document}
未受\tableofcontents
影响。虽然您提到了类memoir
,但不清楚各个条目应如何出现在目录中。(并且memoir
的手册解释了如何摆弄您的 TOC 设置。)