summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-18 03:01:43 +0000
committerNorbert Preining <norbert@preining.info>2021-03-18 03:01:43 +0000
commitca17f652236af2ce3a16cb0125fb6e190d59cc17 (patch)
tree1664d8d4a3ba38eacabed5fe0e3d4ff7f2dd966c /macros
parentbb51b61cfc3fcb367f52d31948039a1468fbcf80 (diff)
CTAN sync 202103180301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin287470 -> 287472 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex2
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin254673 -> 254660 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex698
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx (renamed from macros/latex/contrib/easybook/easybook.cls)782
-rw-r--r--macros/latex/contrib/intopdf/intopdf.dtx60
-rw-r--r--macros/latex/contrib/intopdf/intopdf.pdfbin396617 -> 378812 bytes
-rw-r--r--macros/latex/contrib/langsci-affiliations/README.md32
-rw-r--r--macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx493
-rw-r--r--macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdfbin64385 -> 0 bytes
-rw-r--r--macros/latex/contrib/mindflow/README.md11
-rw-r--r--macros/latex/contrib/mindflow/mindflow.dtx153
-rw-r--r--macros/latex/contrib/mindflow/mindflow.pdfbin168685 -> 198276 bytes
-rw-r--r--macros/xetex/latex/langsci/README.md10
-rw-r--r--macros/xetex/latex/langsci/documentation/langsci-doc.pdfbin84611 -> 77325 bytes
-rw-r--r--macros/xetex/latex/langsci/documentation/langsci-doc.tex39
-rw-r--r--macros/xetex/latex/langsci/examples/samplemonograph.tex2
-rw-r--r--macros/xetex/latex/langsci/examples/samplepaper.tex37
-rw-r--r--macros/xetex/latex/langsci/examples/samplevolume.tex4
-rw-r--r--macros/xetex/latex/langsci/langsci-affiliations.sty306
-rw-r--r--macros/xetex/latex/langsci/langsci-basic.sty32
-rw-r--r--macros/xetex/latex/langsci/langsci-forest-setup.sty131
-rw-r--r--macros/xetex/latex/langsci/langsci-gb4e.sty13
-rw-r--r--macros/xetex/latex/langsci/langsci-lgr.sty29
-rw-r--r--macros/xetex/latex/langsci/langsci-optional.sty34
-rw-r--r--macros/xetex/latex/langsci/langsci-plots.sty67
-rw-r--r--macros/xetex/latex/langsci/langsci-pod.sty104
-rw-r--r--macros/xetex/latex/langsci/langsci-series.def208
-rw-r--r--macros/xetex/latex/langsci/langsci-tbls.sty491
-rw-r--r--macros/xetex/latex/langsci/langsci-textipa.sty208
-rw-r--r--macros/xetex/latex/langsci/langsci-unified.bbx26
-rw-r--r--macros/xetex/latex/langsci/langsci-unified.cbx108
-rw-r--r--macros/xetex/latex/langsci/langscibook.cls2149
33 files changed, 3423 insertions, 2806 deletions
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index b4c9858e55..8354c965ff 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index a8a4d2e0e9..234e9dd482 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -98,7 +98,7 @@
\url{https://latexstudio.net} \\
\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/03/16\hskip\ccwd\relax v1.23s}
+\date{2021/03/17\hskip\ccwd\relax v1.23t}
\frontmatter[roman]
\maketitle
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 7ff104be61..ae23b7ad64 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
deleted file mode 100644
index bd6c66ebc8..0000000000
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ /dev/null
@@ -1,698 +0,0 @@
-\documentclass{ctxdoc}
-
-\title{\sffamily easybook书籍文档类}
-\author{瞿毅}
-\date{2021/03/16\hskip\ccwd\relax v1.23s\thanks{\url{https://gitee.com/texl3/easybook}}}
-
-\begin{document}
-\maketitle
-\changes{v1.20}{2021/01/09}{修改和完善用户文档。}
-\changes{v1.20}{2021/01/09}{模板更改为使用CC-BY许可协议。}
-\begin{abstract}
- \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
-\end{abstract}
-\tableofcontents
-
-\section{编译方式}
-模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
-\begin{itemize}
- \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
- \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
- \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
-\end{itemize}
-
-\subsection{编译步骤}
-\begin{frameverb}
- xelatex -shell-escape easybook-demo
- bibtex easybook-demo
- makeindex easybook-demo
- xelatex -shell-escape easybook-demo
- xelatex -shell-escape easybook-demo
-\end{frameverb}
-
-需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
-\begin{frameverb}
- LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
-\end{frameverb}
-
-\subsection{字体设置}
-\label{subsec:font settings}
-默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
-
-如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
-\begin{ctexexam}
- \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
- \setCJKsansfont{SimHei}
- \setCJKmonofont{FangSong}
-\end{ctexexam}
-
-\section{文档类选项}
-\label{sec:document class options}
-标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
-\begin{itemize}
- \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
- \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
-\end{itemize}
-
-\begin{function}[rEXP,added = 2021-01-05]{draft}
-开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05]{newline}
-章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
-\begin{flushleft}\sffamily\LARGE
- Chapter 1\vskip 1.3pc
- This is a title
-\end{flushleft}
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05]{entitle}
-部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
-\end{function}
-\begin{function}[rEXP,added = 2021-01-05]{english}
-使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
-\end{function}
-\begin{function}[rEXP,added = 2021-01-05]{enstyle}
-同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
-\begin{syntax}
- font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
-\end{syntax}
-传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
-\changes{v1.21}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
-\begin{syntax}
- paper = <(a4paper)|b5paper|letterpaper|...>
-\end{syntax}
-设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
-\end{function}
-
-\subsection{article 风格}
-\begin{function}[rEXP,added = 2021-03-16]{class}
-\begin{syntax}
- class = <(book)|article>
-\end{syntax}
-设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
-\changes{v1.23s}{2021/03/16}{增加 article 文章风格,可用于短篇幅的文章。}
-\end{function}
-
-\subsection{文档命令}
-\label{subsec:document command}
-\begin{function}[added = 2021-02-20,updated = 2021-03-15]{\frontmatter,\mainmatter,\backmatter,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
-\begin{syntax}
- \tn{frontmatter*}\oarg{编号格式|(Roman)}
- \tn{mainmatter*}
- \tn{backmatter}
- \tn{tableofcontents}\oarg{键值列表}
- \tn{listoffigures*}\oarg{键值列表}
- \tn{listoftables*}\oarg{键值列表}
- \tn{listoflistings*}\oarg{键值列表}
-\end{syntax}
-\tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
-\changes{v1.23s}{2021/02/20}{重新定义文档结构划分命令。}
-\end{function}
-
-\begin{function}{multoc,book,article}
-\begin{syntax}
- multoc = <true|(false)>
-\end{syntax}
-\opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
-\changes{v1.23s}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
-\end{function}
-
-\section{接口选项}
-\begin{function}[added = 2021-01-05]{\ctexset}
-\begin{syntax}
- \tn{ctexset}\marg{键值列表}
-\end{syntax}
-\cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
-\end{function}
-
-\begin{function}[EXP,added = 2021-01-08]{config}
-\begin{syntax}
- config = <配置文件名>
-\end{syntax}
-\opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
-\changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
-\end{function}
-
-\subsection{风格}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-03-15]{style/...,color,multoc,withpart,perpart,perpage,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{style/...}
- color = <(none)|seaside|energy|cyberpunk>
- multoc = <true|(false)>
- withpart = <true|(false)>
- perpart = <true|(false)>
- perpage = <true|(false)>
- notomath = <(true)|false>
- rulewidth = <(0.75pt)>
- uppercase = <(true)|false>
- figure-sep = <(.)>
- table-sep = <(.)>
- listing-sep = <(.)>
- equation-sep = <(.)>
- number-sep = <(.)>
-\end{syntax}
-\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-\changes{v1.23s}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-\changes{v1.23s}{2021/02/09}{增加控制页面横线粗细的选项。}
-\changes{v1.23s}{2021/03/15}{增加控制编号连接符的选项。}
-\end{function}
-
-\begin{optdesc}
- \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
- \begin{function}{ctex@frame,ctex@emph,ctex@verb}
- \begin{syntax}
- \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
- \end{syntax}
- 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
- \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
- \end{function}
- \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
- \item[withpart] 使章跟随每一部分编号,默认不跟随。
- \item[perpart] 使脚注跟随每一部分编号,默认不跟随。
- \item[perpage] 使脚注跟随每一页编号,默认不跟随。
- \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
- \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
- \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
- \item[figure-sep] 图片标题编号的连接符。
- \item[table-sep] 表格标题编号的连接符。
- \item[listing-sep] 代码标题编号的连接符。
- \item[equation-sep] 公式编号的连接符。
- \item[number-sep] 统一设置所有编号的连接符。
-\end{optdesc}
-
-\subsection{超链接}
-\label{subsec:hyperlinks}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/...,hyperlink,linkcolor,linktopage}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{link/...}
- hyperlink = <(edge)|various|none>
- linkcolor = <(fresh)|cutepink|skyblue|crimson>
- linktopage = <true|(false)>
-\end{syntax}
-\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-\end{function}
-
-\begin{optdesc}
- \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
- \item[linkcolor] 超链接颜色样式。
- \begin{function}{ctex@link,ctex@url,ctex@cite}
- \begin{syntax}
- \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
- \end{syntax}
- 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
- \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
- \end{function}
- \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
-\end{optdesc}
-
-\subsection{行距}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{spread/...,line,table,math,caption,footnote}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{link/...}
- line = <(1.3)>
- table = <(1.05)>
- math = <(1.05)>
- caption = <(1)>
- footnote = <(1)>
-\end{syntax}
-行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
-\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-\changes{v1.23s}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
-\end{function}
-
-\begin{optdesc}
- \item[line] 正文行距。
- \item[table] 表格行距。
- \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
- \item[caption] 图表代码标题行距。
- \item[footnote] 脚注行距。
-\end{optdesc}
-
-\subsection{其它字体}
-\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{elsefont/...,table-cap,figure-cap,listing-cap,footnote,marginpart}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{elsefont/...}
- table-cap = <\tn{sffamily}\tn{small}>
- figure-cap = <\tn{sffamily}\tn{small}>
- listing-cap = <\tn{sffamily}\tn{small}>
- footnote = <\tn{rmfamily}>
- marginpart = <\tn{rmfamily}\tn{footnotesize}>
-\end{syntax}
-\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-\changes{v1.23s}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-\end{function}
-
-\begin{optdesc}
- \item[table-cap] 表格标题的字体设置。
- \item[figure-cap] 图片标题的字体设置。
- \item[listing-cap] 代码标题的字体设置。
- \item[footnote] 脚注的字体设置,请不要使用字号命令。
- \item[marginpar] 边注的字体设置。
-\end{optdesc}
-
-\subsection{参考文献}
-\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{bibset/...,backend,bib-style,cite-style,bibfile}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{bibset/...}
- backend = <(bibtex)|biblatex>
- bib-style = <(numerical)|authoryear|其它格式>
- cite-style = <标注风格>
- bibfile = <refs.bib>
-\end{syntax}
-\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-\changes{v1.23s}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
-\end{function}
-
-\begin{optdesc}
- \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
- \item[bib-style] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
- \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
- \item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个以 \opt{refs.bib} 命名的文件。
-\end{optdesc}
-
-\begin{function}[added = 2021-01-11,updated = 2021-03-15]{\printbibliography}
-\begin{syntax}
- \tn{printbibliography}\oarg{键值列表}
-\end{syntax}
-两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
-\end{function}
-
-\begin{function}{heading,title}
-\begin{syntax}
- heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
- title = <参考文献标题名>
-\end{syntax}
-\opt{heading} 为参考文献标题的处理方式,\opt{bibliography} 选项以 \opt{chapter} 级别输出参考文献,不加进目录,\opt{subbibliography} 选项以 \opt{section} 级别输出参考文献,不加进目录,\opt{bibintoc} 选项以 \opt{chapter} 级别输出参考文献,加进目录,\opt{subbibintoc} 选项以 \opt{section} 级别输出参考文献,加进目录。\opt{title} 选项覆盖由 \opt{heading} 选项提供的缺省标题名。除此之外其他支持选项可见 \pkg{biblatex} 宏包说明文档。
-\end{function}
-
-\subsection{定理样式}
-\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/...,thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{thmset/...}
- thmbox = <true|(false)>
- numberwith = <(chapter)|section|其它环境|空置>
- headpunct = <(未设置)>
- bodyfont = <(未设置)>
- notefont = <(未设置)>
- headfont = <(\tn{color}\marg{ctex@emph}\tn{sffamily})>
- headindent = <(0\tn{ccwd})>
- spaceabove = <(0.75ex plus .1ex)>
- spacebelow = <(0.75ex plus .1ex)>
- spacepost = <(\tn{ccwd})>
-\end{syntax}
-\changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-\end{function}
-
-\begin{optdesc}
- \item[thmbox] 开启定理及习题环境的盒子边框。
- \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
- \item[headpunct] 定理标题后的标记。
- \item[bodyfont] 定理内容部分的字体。
- \item[notefont] 定理标题内容的字体。
- \item[headfont] 定理类型标题名的字体。
- \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
- \item[spaceabove] 定理环境前的间距。
- \item[spacebelow] 定理环境后的间距。
- \item[spacepost] 定理标题后与内容的间距。
-\end{optdesc}
-
-\begin{function}[added = 2021-01-12,updated = 2021-03-13]{\newtheorem, \declaretheoremstyle}
-\begin{syntax}
- \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
- \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
-\end{syntax}
-\changes{v1.23s}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-\end{function}
-
-\begin{optdesc}
- \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令 \tn{declaretheorem} 的参数一致。常用的选项如下
- \begin{description}
- \item[name] 定理的标题。默认值是环境的名称,并且首字母大写(英文标题)。
- \item[numbered] 值为 \opt{no}、\opt{yes} 或 \opt{unless unique}。定理将被编号,而不是编号,或者只有在文档中多次出现时才被编号。
- \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
- \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
- \end{description}
- \item[\tn{declaretheoremstyle}] 定义新的定理样式,可选参数中除了包括上述定理样式选项,还包括 \tn{newtheorem} 的选项。
-\end{optdesc}
-
-\subsubsection{新的定理样式}
-定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
-\begin{ctexexam}
- \newtheorem[style = mythm,name = 定理名]{定理环境名}
-\end{ctexexam}
-若要给定理环境增加边框,可以如下进行设置
-\begin{ctexexam}
- \tcolorboxenvironment{定理环境名}{thmsty}
-\end{ctexexam}
-定义一个新的定理样式可用于 \tn{newtheorem} 的 \opt{style} 选项。
-\begin{ctexexam}
- \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
-\end{ctexexam}
-
-\subsection{页面边距}
-\begin{function}[EXP,added = 2021-01-13]{geoset/...,left,top,hmargin,textwidth,includehead,...}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{geoset/...}
- left = <长度>
- top = <长度>
- hmargin = \marg{左边距,右边距}
- textwidth = <长度>
- includehead = <true|(false)>
-\end{syntax}
-\opt{geoset} 将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
-\begin{ctexexam}
- \ctexset
- {
- geoset =
- {
- top = 2.5cm,
- bottom = 2.5cm,
- left = 3.2cm,
- right = 3.2cm
- }
- }
-\end{ctexexam}
-\changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
-\end{function}
-
-\subsection{页眉页脚}
-\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/...,head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{hdrset/...}
- head-foot = <页眉页脚中的内容>
- chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
- sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
- headrule = <页眉横线格式>
- footrule = <页脚横线格式>
- footnoterule = <脚注横线格式>
-\end{syntax}
-\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
-\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
-\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-\changes{v1.23s}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-\changes{v1.23s}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
-\end{function}
-
-\begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
-\begin{syntax}
- \tn{easyhead}\oarg{位置}\marg{内容}
- \tn{easyfoot}\oarg{位置}\marg{内容}
-\end{syntax}
-命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,它们用于 \opt{head-foot} 选项中,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
-\begin{ctexexam}
- \ctexset
- {
- hdrset =
- {
- head-foot =
- {
- \easyhead[ER]{\leftmark}
- \easyhead[OL]{\rightmark}
- \easyhead[EL,OR]{\textbf{\thepage}}
- },
- sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
- headrule = {\hrule width \textwidth height 1pt}
- }
- }
-\end{ctexexam}
-\end{function}
-
-\subsection{目录样式}
-\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{tocset/.../format,tocset/.../indent,tocset/.../rule,lists/lolskip,lists/belowoffset,tocset/belowoffset}
-\begin{syntax}
- format = <目录标题格式>
- indent = <目录标题左边缩进>
- rule = <目录引导线样式>
- lolskip = <(0.8pc)>
- lists/belowoffset = <(0pc)>
- belowoffset = <(-1pc)>
-\end{syntax}
-\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。
-
-\opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8pc。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。\opt{lists} 中的 \opt{belowoffset} 意义类似,但是一般为正值,在 \opt{lolskip = 0pc} 时使用。建议 \opt{lolskip+lists/format/addvspace = -belowoffset}。
-\changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
-\end{function}
-
-\begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
-\begin{syntax}
- \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
-\end{syntax}
-\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
-\begin{ctexexam}
- \ctexset
- {
- tocset =
- {
- chapter =
- {
- format = \addvspace{8pt}\large,
- indent = 1.5\ccwd,
- rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
- }
- }
- }
-\end{ctexexam}
-\end{function}
-
-\section{常用环境}
-
-\subsection{公式}
-\begin{function}[added = 2021-01-05]{equation,multline,gather,align}
-\begin{syntax}
- \tn{begin}\marg{环境名}
- \tn{item} <行间公式>
- \tn{end}\marg{环境名}
-\end{syntax}
-\opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
-\end{function}
-
-\subsection{列表}
-\begin{function}[added = 2021-01-05]{enumerate,itemize,description}
-\begin{syntax}
- \tn{begin}\marg{环境名}\oarg{键值列表}
- \tn{item} <列表内容>
- \tn{end}\marg{环境名}
-\end{syntax}
-\pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
-\begin{ctexexam}
- \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
- \begin{itemize}[label = \textbullet]
- \begin{description}[font = \sffamily\bfseries,style = nextline]
-\end{ctexexam}
-\end{function}
-
-\subsubsection{排序列表}
-\label{subsec:sort list}
-使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
-\begin{ctexexam}
- \begin{enumerate*}[(a)]
- \begin{enumerate}[\bfseries{Item} I]
-\end{ctexexam}
-
-\subsubsection{常规列表}
-使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
-
-用$\star$取代默认的符号
-\begin{ctexexam}
- \begin{itemize*}[$\star$]
- \begin{itemize}[$\star$]
-\end{ctexexam}
-
-\subsubsection{主题列表}
-使用 \opt{description} 环境可创建带有主题词的列表。
-\begin{ctexexam}
- \begin{description}
- \item[主题一] 内容一
- \item[主题二] 内容二
- \end{description}
-\end{ctexexam}
-
-\subsection{定理}
-\begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
-\begin{syntax}
- \tn{begin}\marg{环境名}
- <定理内容>
- \tn{end}\marg{环境名}
-\end{syntax}
-这些是预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。
-\end{function}
-
-\subsection{习题}
-\label{subsec:exercise}
-\begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
-\begin{syntax}
- \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
- \tn{item} <习题内容>
- \tn{end}\marg{exercise}
-\end{syntax}
-习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
-\begin{ctexexam}
- \begin{exercise}[LightYellow][1.][习题]
- \item 习题内容
- \item 习题内容
- \end{exercise}
-\end{ctexexam}
-\changes{v1.23s}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
-\end{function}
-
-\subsection{盒子}
-盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
-
-\subsubsection{摘要盒子}
-\begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
-\begin{syntax}
- \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
- \tn{item} <摘要内容>
- \tn{end}\marg{outline}
-\end{syntax}
-摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
-\begin{ctexexam}
- \begin{outline}[标题名称]
- \item 摘要内容
- \item 摘要内容
- \end{outline}
-\end{ctexexam}
-\end{function}
-
-\subsubsection{段落盒子}
-\begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
-\begin{syntax}
- \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
- <盒子内容>
- \tn{end}\marg{mybox}
-\end{syntax}
-环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
-\begin{ctexexam}
- \begin{mybox}*[段落标题][MintCream]
- 盒子内容
- \tcblower % 盒子上下部分分界线
- 盒子内容
- \end{mybox}
-\end{ctexexam}
-\end{function}
-
-\subsubsection{行内盒子}
-\begin{function}[added = 2021-03-13]{\concise,\fuzzy}
-\begin{syntax}
- \tn{concise}\oarg{颜色名}\marg{内容}\oarg{配置选项}
- \tn{fuzzy}\oarg{颜色名}\marg{内容}\oarg{配置选项}
-\end{syntax}
-设置了两个参数选项相同的行内盒子,盒子 \opt{concise} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{fuzzy} 也是抄录盒子,具有模糊边缘类似高亮的效果。
-\end{function}
-
-\section{其它用法}
-
-\subsection{代码}
-\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
-\begin{syntax}
- \tn{lstinline}\oarg{键值列表}\marg{行内代码}
- \tn{begin}\marg{lstlisting}\oarg{键值列表}
- <行间代码>
- \tn{end}\marg{lstlisting}
-\end{syntax}
-加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。
-\end{function}
-
-\subsection{物理量}
-\begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
-\begin{syntax}
- \tn{num}\oarg{选项}\marg{数字}
- \tn{si}\oarg{选项}\marg{单位}
- \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
- \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
-\end{syntax}
-\pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
-\begin{ctexexam}
- \num{-21x.3e5}
- \si{mL.min^{-1}}
- \SI{5}{\mole}
- \SIrange[unit-color = green]{1.5}{4}{kg}
-\end{ctexexam}
-\end{function}
-
-\subsection{化学式}
-\begin{function}[added = 2021-01-05]{\ch,\chemfig}
-\begin{syntax}
- \tn{ch}\oarg{选项}\marg{输入}
- \tn{chemfig}\oarg{键值列表}\marg{分子代码}
-\end{syntax}
-除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
-\end{function}
-
-\subsection{引用}
-\begin{function}[added = 2021-01-05]{\cref}
- \begin{syntax}
- \tn{cref}\marg{标签}
- \end{syntax}
-使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
-\end{function}
-
-\subsubsection{索引}
-\begin{function}[added = 2021-01-05]{\index,\printindex}
-\begin{syntax}
- \tn{index}\marg{标签}
- \tn{printindex}\oarg{索引名}
-\end{syntax}
-使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
-\end{function}
-
-\subsubsection{自定义脚注}
-\begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
-\begin{syntax}
- \tn{Footnote}\marg{标记}\marg{插入文本}
- \tn{Footnotetext}\marg{标记}\marg{插入文本}
- \tn{Footnotemark}\marg{标记}
-\end{syntax}
-自定义标记且不影响正常编号的脚注命令。
-\begin{ctexexam}
- \Footnote{*}{这是可以自定义标记的脚注。}
-\end{ctexexam}
-\end{function}
-
-\subsubsection{边注}
-\begin{function}[added = 2021-01-05]{\marginnote}
-\begin{syntax}
- \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
-\end{syntax}
-命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
-\end{function}
-
-\subsection{插入文档}
-\begin{function}[added = 2021-03-14]{\includepdf}
-\begin{syntax}
- \tn{includepdf}\oarg{键值列表}\marg{文档名}
-\end{syntax}
-该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
-\end{function}
-
-\subsection{横向页面}
-\begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
-\begin{syntax}
- \tn{begin}\marg{环境名}\oarg{位置}
- <插入图片或表格>
- \tn{end}\marg{环境名}
-\end{syntax}
-该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
-\end{function}
-
-\subsection{指定行距的段落}
-\begin{function}[added = 2021-03-14]{spacing}
-\begin{syntax}
- \tn{begin}\marg{spacing}\marg{浮点数}
- <段落内容>
- \tn{end}\marg{spacing}
-\end{syntax}
-该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
-\end{function}
-
-\IndexLayout
-\PrintChanges
-\PrintIndex
-\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.dtx
index 97f532796f..d11b30abfc 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -1,15 +1,770 @@
-%%
-%% This is file `easybook.cls'.
-%%
-%% Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the CC-BY 4.0 License.
-%% The latest version of this license is in
-%% https://creativecommons.org/licenses/by/4.0/legalcode
+%\iffalse meta-comment
+%
+%Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+%
+%This work may be distributed and/or modified under the
+%conditions of the CC-BY 4.0 License.
+%The latest version of this license is in
+% https://creativecommons.org/licenses/by/4.0/legalcode
+%<*driver>
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%<*install>
+\input ctxdocstrip
+\keepsilent
+\askforoverwritefalse
+%
+\preamble
+Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+
+This work may be distributed and/or modified under the
+conditions of the CC-BY 4.0 License.
+The latest version of this license is in
+ https://creativecommons.org/licenses/by/4.0/legalcode
+\endpreamble
+%
+\generate
+ {
+ \usedir{tex/latex/\jobname}
+ \file{\jobname.cls}{\from{\jobname.dtx}{class}}
+ }
+%</install>
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</driver>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+%<*driver>
+\documentclass{ctxdoc}
+\OnlyDescription
+\begin{document}
+ \DocInput{\jobname.dtx}
+ \IndexLayout
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+%\fi
+%
+%\changes{v1.20}{2021/01/09}{修改和完善用户文档。}
+%\changes{v1.20}{2021/01/09}{模板更改为使用CC-BY许可协议。}
+%
+%\CheckSum{0}
+%
+%\CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%\title{\sffamily easybook书籍文档类}
+%\author{瞿毅}
+%\date{2021/03/17\hskip\ccwd\relax v1.23t\thanks{\url{https://gitee.com/texl3/easybook}}}
+%\maketitle
+%\begin{abstract}
+% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
+%\end{abstract}
+%\tableofcontents
+%
+%\begin{documentation}
+%\section{编译方式}
+%模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
+%\begin{itemize}
+% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
+% \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
+% \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
+%\end{itemize}
+%
+%\subsection{编译步骤}
+%\begin{frameverb}
+% xelatex -shell-escape easybook-demo
+% bibtex easybook-demo
+% makeindex easybook-demo
+% xelatex -shell-escape easybook-demo
+% xelatex -shell-escape easybook-demo
+%\end{frameverb}
+%
+%需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
+%\begin{frameverb}
+% LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
+%\end{frameverb}
+%
+%\subsection{字体设置}
+%\label{subsec:font settings}
+%默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
+%
+%如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
+%\begin{ctexexam}
+% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
+% \setCJKsansfont{SimHei}
+% \setCJKmonofont{FangSong}
+%\end{ctexexam}
+%
+%\section{文档类选项}
+%\label{sec:document class options}
+%标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
+%\begin{itemize}
+% \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
+% \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
+%\end{itemize}
+%
+%\begin{function}[rEXP,added = 2021-01-05]{draft}
+%开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05]{newline}
+%章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
+%\begin{flushleft}\sffamily\LARGE
+% Chapter 1\vskip 1.3pc
+% This is a title
+%\end{flushleft}
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05]{entitle}
+%部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
+%\end{function}
+%\begin{function}[rEXP,added = 2021-01-05]{english}
+%使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
+%\end{function}
+%\begin{function}[rEXP,added = 2021-01-05]{enstyle}
+%同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
+%\begin{syntax}
+% font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
+%\end{syntax}
+%传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
+%\changes{v1.21}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
+%\begin{syntax}
+% paper = <(a4paper)|b5paper|letterpaper|...>
+%\end{syntax}
+%设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
+%\end{function}
+%
+%\subsection{article 风格}
+%\begin{function}[rEXP,added = 2021-03-16]{class}
+%\begin{syntax}
+% class = <(book)|article>
+%\end{syntax}
+%设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
+%\changes{v1.23t}{2021/03/16}{增加 article 文章风格,可用于短篇幅的文章。}
+%\end{function}
+%
+%\subsection{文档命令}
+%\label{subsec:document command}
+%\begin{function}[added = 2021-02-20,updated = 2021-03-15]{\frontmatter,\mainmatter,\backmatter,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
+%\begin{syntax}
+% \tn{frontmatter*}\oarg{编号格式|(Roman)}
+% \tn{mainmatter*}
+% \tn{backmatter}
+% \tn{tableofcontents}\oarg{键值列表}
+% \tn{listoffigures*}\oarg{键值列表}
+% \tn{listoftables*}\oarg{键值列表}
+% \tn{listoflistings*}\oarg{键值列表}
+%\end{syntax}
+%\tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
+%\changes{v1.23t}{2021/02/20}{重新定义文档结构划分命令。}
+%\end{function}
+%
+%\begin{function}{multoc,book,article}
+%\begin{syntax}
+% multoc = <true|(false)>
+%\end{syntax}
+%\opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
+%\changes{v1.23t}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
+%\end{function}
+%
+%\section{接口选项}
+%\begin{function}[added = 2021-01-05]{\ctexset}
+%\begin{syntax}
+% \tn{ctexset}\marg{键值列表}
+%\end{syntax}
+%\cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
+%\end{function}
+%
+%\begin{function}[EXP,added = 2021-01-08]{config}
+%\begin{syntax}
+% config = <配置文件名>
+%\end{syntax}
+%\opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
+%\changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
+%\end{function}
+%
+%\subsection{风格}
+%\begin{function}[EXP,added = 2021-01-05,updated = 2021-03-15]{style/...,color,multoc,withpart,perpart,perpage,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{style/...}
+% color = <(none)|seaside|energy|cyberpunk>
+% multoc = <true|(false)>
+% withpart = <true|(false)>
+% perpart = <true|(false)>
+% perpage = <true|(false)>
+% notomath = <(true)|false>
+% rulewidth = <(0.75pt)>
+% uppercase = <(true)|false>
+% figure-sep = <(.)>
+% table-sep = <(.)>
+% listing-sep = <(.)>
+% equation-sep = <(.)>
+% number-sep = <(.)>
+%\end{syntax}
+%\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
+%\changes{v1.23t}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+%\changes{v1.23t}{2021/02/09}{增加控制页面横线粗细的选项。}
+%\changes{v1.23t}{2021/03/15}{增加控制编号连接符的选项。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
+% \begin{function}{ctex@frame,ctex@emph,ctex@verb}
+% \begin{syntax}
+% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
+% \end{syntax}
+% 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
+% \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
+% \end{function}
+% \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
+% \item[withpart] 使章跟随每一部分编号,默认不跟随。
+% \item[perpart] 使脚注跟随每一部分编号,默认不跟随。
+% \item[perpage] 使脚注跟随每一页编号,默认不跟随。
+% \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
+% \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
+% \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
+% \item[figure-sep] 图片标题编号的连接符。
+% \item[table-sep] 表格标题编号的连接符。
+% \item[listing-sep] 代码标题编号的连接符。
+% \item[equation-sep] 公式编号的连接符。
+% \item[number-sep] 统一设置所有编号的连接符。
+%\end{optdesc}
+%
+%\subsection{超链接}
+%\label{subsec:hyperlinks}
+%\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/...,hyperlink,linkcolor,linktopage}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{link/...}
+% hyperlink = <(edge)|various|none>
+% linkcolor = <(fresh)|cutepink|skyblue|crimson>
+% linktopage = <true|(false)>
+%\end{syntax}
+%\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
+% \item[linkcolor] 超链接颜色样式。
+% \begin{function}{ctex@link,ctex@url,ctex@cite}
+% \begin{syntax}
+% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
+% \end{syntax}
+% 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
+% \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
+% \end{function}
+% \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
+%\end{optdesc}
+%
+%\subsection{行距}
+%\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{spread/...,line,table,math,caption,footnote}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{link/...}
+% line = <(1.3)>
+% table = <(1.05)>
+% math = <(1.05)>
+% caption = <(1)>
+% footnote = <(1)>
+%\end{syntax}
+%行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
+%\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
+%\changes{v1.23t}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[line] 正文行距。
+% \item[table] 表格行距。
+% \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
+% \item[caption] 图表代码标题行距。
+% \item[footnote] 脚注行距。
+%\end{optdesc}
+%
+%\subsection{其它字体}
+%\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{elsefont/...,table-cap,figure-cap,listing-cap,footnote,marginpart}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{elsefont/...}
+% table-cap = <\tn{sffamily}\tn{small}>
+% figure-cap = <\tn{sffamily}\tn{small}>
+% listing-cap = <\tn{sffamily}\tn{small}>
+% footnote = <\tn{rmfamily}>
+% marginpart = <\tn{rmfamily}\tn{footnotesize}>
+%\end{syntax}
+%\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
+%\changes{v1.23t}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[table-cap] 表格标题的字体设置。
+% \item[figure-cap] 图片标题的字体设置。
+% \item[listing-cap] 代码标题的字体设置。
+% \item[footnote] 脚注的字体设置,请不要使用字号命令。
+% \item[marginpar] 边注的字体设置。
+%\end{optdesc}
+%
+%\subsection{参考文献}
+%\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{bibset/...,backend,bib-style,cite-style,bibfile}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{bibset/...}
+% backend = <(bibtex)|biblatex>
+% bib-style = <(numerical)|authoryear|其它格式>
+% cite-style = <标注风格>
+% bibfile = <refs.bib>
+%\end{syntax}
+%\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
+%\changes{v1.23t}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
+% \item[bib-style] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
+% \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
+% \item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个以 \opt{refs.bib} 命名的文件。
+%\end{optdesc}
+%
+%\begin{function}[added = 2021-01-11,updated = 2021-03-15]{\printbibliography}
+%\begin{syntax}
+% \tn{printbibliography}\oarg{键值列表}
+%\end{syntax}
+%两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
+%\end{function}
+%
+%\begin{function}{heading,title}
+%\begin{syntax}
+% heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
+% title = <参考文献标题名>
+%\end{syntax}
+%\opt{heading} 为参考文献标题的处理方式,\opt{bibliography} 选项以 \opt{chapter} 级别输出参考文献,不加进目录,\opt{subbibliography} 选项以 \opt{section} 级别输出参考文献,不加进目录,\opt{bibintoc} 选项以 \opt{chapter} 级别输出参考文献,加进目录,\opt{subbibintoc} 选项以 \opt{section} 级别输出参考文献,加进目录。\opt{title} 选项覆盖由 \opt{heading} 选项提供的缺省标题名。除此之外其他支持选项可见 \pkg{biblatex} 宏包说明文档。
+%\end{function}
+%
+%\subsection{定理样式}
+%\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/...,thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{thmset/...}
+% thmbox = <true|(false)>
+% numberwith = <(chapter)|section|其它环境|空置>
+% headpunct = <(未设置)>
+% bodyfont = <(未设置)>
+% notefont = <(未设置)>
+% headfont = <(\tn{color}\marg{ctex@emph}\tn{sffamily})>
+% headindent = <(0\tn{ccwd})>
+% spaceabove = <(0.75ex plus .1ex)>
+% spacebelow = <(0.75ex plus .1ex)>
+% spacepost = <(\tn{ccwd})>
+%\end{syntax}
+%\changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[thmbox] 开启定理及习题环境的盒子边框。
+% \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
+% \item[headpunct] 定理标题后的标记。
+% \item[bodyfont] 定理内容部分的字体。
+% \item[notefont] 定理标题内容的字体。
+% \item[headfont] 定理类型标题名的字体。
+% \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
+% \item[spaceabove] 定理环境前的间距。
+% \item[spacebelow] 定理环境后的间距。
+% \item[spacepost] 定理标题后与内容的间距。
+%\end{optdesc}
+%
+%\begin{function}[added = 2021-01-12,updated = 2021-03-13]{\newtheorem, \declaretheoremstyle}
+%\begin{syntax}
+% \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
+% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
+%\end{syntax}
+%\changes{v1.23t}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令 \tn{declaretheorem} 的参数一致。常用的选项如下
+% \begin{description}
+% \item[name] 定理的标题。默认值是环境的名称,并且首字母大写(英文标题)。
+% \item[numbered] 值为 \opt{no}、\opt{yes} 或 \opt{unless unique}。定理将被编号,而不是编号,或者只有在文档中多次出现时才被编号。
+% \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
+% \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
+% \end{description}
+% \item[\tn{declaretheoremstyle}] 定义新的定理样式,可选参数中除了包括上述定理样式选项,还包括 \tn{newtheorem} 的选项。
+%\end{optdesc}
+%
+%\subsubsection{新的定理样式}
+%定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
+%\begin{ctexexam}
+% \newtheorem[style = mythm,name = 定理名]{定理环境名}
+%\end{ctexexam}
+%若要给定理环境增加边框,可以如下进行设置
+%\begin{ctexexam}
+% \tcolorboxenvironment{定理环境名}{thmsty}
+%\end{ctexexam}
+%定义一个新的定理样式可用于 \tn{newtheorem} 的 \opt{style} 选项。
+%\begin{ctexexam}
+% \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
+%\end{ctexexam}
+%
+%\subsection{页面边距}
+%\begin{function}[EXP,added = 2021-01-13]{geoset/...,left,top,hmargin,textwidth,includehead,...}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{geoset/...}
+% left = <长度>
+% top = <长度>
+% hmargin = \marg{左边距,右边距}
+% textwidth = <长度>
+% includehead = <true|(false)>
+%\end{syntax}
+%\opt{geoset} 将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
+%\begin{ctexexam}
+% \ctexset
+% {
+% geoset =
+% {
+% top = 2.5cm,
+% bottom = 2.5cm,
+% left = 3.2cm,
+% right = 3.2cm
+% }
+% }
+%\end{ctexexam}
+%\changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
+%\end{function}
+%
+%\subsection{页眉页脚}
+%\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/...,head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{hdrset/...}
+% head-foot = <页眉页脚中的内容>
+% chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
+% sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
+% headrule = <页眉横线格式>
+% footrule = <页脚横线格式>
+% footnoterule = <脚注横线格式>
+%\end{syntax}
+%\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
+%\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
+%\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
+%\changes{v1.23t}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+%\changes{v1.23t}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+%\end{function}
+%
+%\begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
+%\begin{syntax}
+% \tn{easyhead}\oarg{位置}\marg{内容}
+% \tn{easyfoot}\oarg{位置}\marg{内容}
+%\end{syntax}
+%命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,它们用于 \opt{head-foot} 选项中,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
+%\begin{ctexexam}
+% \ctexset
+% {
+% hdrset =
+% {
+% head-foot =
+% {
+% \easyhead[ER]{\leftmark}
+% \easyhead[OL]{\rightmark}
+% \easyhead[EL,OR]{\textbf{\thepage}}
+% },
+% sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
+% headrule = {\hrule width \textwidth height 1pt}
+% }
+% }
+%\end{ctexexam}
+%\end{function}
+%
+%\subsection{目录样式}
+%\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{tocset/.../format,tocset/.../indent,tocset/.../rule,lists/lolskip,lists/belowoffset,tocset/belowoffset}
+%\begin{syntax}
+% format = <目录标题格式>
+% indent = <目录标题左边缩进>
+% rule = <目录引导线样式>
+% lolskip = <(0.8pc)>
+% lists/belowoffset = <(0pc)>
+% belowoffset = <(-1pc)>
+%\end{syntax}
+%\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。
+%
+%\opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8pc。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。\opt{lists} 中的 \opt{belowoffset} 意义类似,但是一般为正值,在 \opt{lolskip = 0pc} 时使用。建议 \opt{lolskip + lists/format/addvspace = -belowoffset}。
+%\changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
+%\end{function}
+%
+%\begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
+%\begin{syntax}
+% \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
+%\end{syntax}
+%\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
+%\begin{ctexexam}
+% \ctexset
+% {
+% tocset =
+% {
+% chapter =
+% {
+% format = \addvspace{8pt}\large,
+% indent = 1.5\ccwd,
+% rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
+% }
+% }
+% }
+%\end{ctexexam}
+%\end{function}
+%
+%\section{常用环境}
+%
+%\subsection{公式}
+%\begin{function}[added = 2021-01-05]{equation,multline,gather,align}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}
+% \tn{item} <行间公式>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%\opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
+%\end{function}
+%
+%\subsection{列表}
+%\begin{function}[added = 2021-01-05]{enumerate,itemize,description}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}\oarg{键值列表}
+% \tn{item} <列表内容>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%\pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
+%\begin{ctexexam}
+% \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
+% \begin{itemize}[label = \textbullet]
+% \begin{description}[font = \sffamily\bfseries,style = nextline]
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{排序列表}
+%\label{subsec:sort list}
+%使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
+%\begin{ctexexam}
+% \begin{enumerate*}[(a)]
+% \begin{enumerate}[\bfseries{Item} I]
+%\end{ctexexam}
+%
+%\subsubsection{常规列表}
+%使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
+%
+%用$\star$取代默认的符号
+%\begin{ctexexam}
+% \begin{itemize*}[$\star$]
+% \begin{itemize}[$\star$]
+%\end{ctexexam}
+%
+%\subsubsection{主题列表}
+%使用 \opt{description} 环境可创建带有主题词的列表。
+%\begin{ctexexam}
+% \begin{description}
+% \item[主题一] 内容一
+% \item[主题二] 内容二
+% \end{description}
+%\end{ctexexam}
+%
+%\subsection{定理}
+%\begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}
+% <定理内容>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%这些是预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。
+%\end{function}
+%
+%\subsection{习题}
+%\label{subsec:exercise}
+%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
+%\begin{syntax}
+% \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
+% \tn{item} <习题内容>
+% \tn{end}\marg{exercise}
+%\end{syntax}
+%习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
+%\begin{ctexexam}
+% \begin{exercise}[LightYellow][1.][习题]
+% \item 习题内容
+% \item 习题内容
+% \end{exercise}
+%\end{ctexexam}
+%\changes{v1.23t}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+%\end{function}
+%
+%\subsection{盒子}
+%盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
+%
+%\subsubsection{摘要盒子}
+%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
+%\begin{syntax}
+% \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
+% \tn{item} <摘要内容>
+% \tn{end}\marg{outline}
+%\end{syntax}
+%摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
+%\begin{ctexexam}
+% \begin{outline}[标题名称]
+% \item 摘要内容
+% \item 摘要内容
+% \end{outline}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{段落盒子}
+%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
+%\begin{syntax}
+% \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
+% <盒子内容>
+% \tn{end}\marg{mybox}
+%\end{syntax}
+%环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
+%\begin{ctexexam}
+% \begin{mybox}*[段落标题][MintCream]
+% 盒子内容
+% \tcblower % 盒子上下部分分界线
+% 盒子内容
+% \end{mybox}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{行内盒子}
+%\begin{function}[added = 2021-03-13]{\concise,\fuzzy}
+%\begin{syntax}
+% \tn{concise}\oarg{颜色名}\marg{内容}\oarg{配置选项}
+% \tn{fuzzy}\oarg{颜色名}\marg{内容}\oarg{配置选项}
+%\end{syntax}
+%设置了两个参数选项相同的行内盒子,盒子 \opt{concise} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{fuzzy} 也是抄录盒子,具有模糊边缘类似高亮的效果。
+%\end{function}
+%
+%\section{其它用法}
+%
+%\subsection{代码}
+%\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
+%\begin{syntax}
+% \tn{lstinline}\oarg{键值列表}\marg{行内代码}
+% \tn{begin}\marg{lstlisting}\oarg{键值列表}
+% <行间代码>
+% \tn{end}\marg{lstlisting}
+%\end{syntax}
+%加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。
+%\end{function}
+%
+%\subsection{物理量}
+%\begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
+%\begin{syntax}
+% \tn{num}\oarg{选项}\marg{数字}
+% \tn{si}\oarg{选项}\marg{单位}
+% \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
+% \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
+%\end{syntax}
+%\pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
+%\begin{ctexexam}
+% \num{-21x.3e5}
+% \si{mL.min^{-1}}
+% \SI{5}{\mole}
+% \SIrange[unit-color = green]{1.5}{4}{kg}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsection{化学式}
+%\begin{function}[added = 2021-01-05]{\ch,\chemfig}
+%\begin{syntax}
+% \tn{ch}\oarg{选项}\marg{输入}
+% \tn{chemfig}\oarg{键值列表}\marg{分子代码}
+%\end{syntax}
+%除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
+%\end{function}
+%
+%\subsection{引用}
+%\begin{function}[added = 2021-01-05]{\cref}
+% \begin{syntax}
+% \tn{cref}\marg{标签}
+% \end{syntax}
+%使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
+%\end{function}
+%
+%\subsubsection{索引}
+%\begin{function}[added = 2021-01-05]{\index,\printindex}
+%\begin{syntax}
+% \tn{index}\marg{标签}
+% \tn{printindex}\oarg{索引名}
+%\end{syntax}
+%使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
+%\end{function}
+%
+%\subsubsection{自定义脚注}
+%\begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
+%\begin{syntax}
+% \tn{Footnote}\marg{标记}\marg{插入文本}
+% \tn{Footnotetext}\marg{标记}\marg{插入文本}
+% \tn{Footnotemark}\marg{标记}
+%\end{syntax}
+%自定义标记且不影响正常编号的脚注命令。
+%\begin{ctexexam}
+% \Footnote{*}{这是可以自定义标记的脚注。}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{边注}
+%\begin{function}[added = 2021-01-05]{\marginnote}
+%\begin{syntax}
+% \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
+%\end{syntax}
+%命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
+%\end{function}
+%
+%\subsection{插入文档}
+%\begin{function}[added = 2021-03-14]{\includepdf}
+%\begin{syntax}
+% \tn{includepdf}\oarg{键值列表}\marg{文档名}
+%\end{syntax}
+%该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
+%\end{function}
+%
+%\subsection{横向页面}
+%\begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}\oarg{位置}
+% <插入图片或表格>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
+%\end{function}
+%
+%\subsection{指定行距的段落}
+%\begin{function}[added = 2021-03-14]{spacing}
+%\begin{syntax}
+% \tn{begin}\marg{spacing}\marg{浮点数}
+% <段落内容>
+% \tn{end}\marg{spacing}
+%\end{syntax}
+%该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
+%\end{function}
+%\end{documentation}
+%
+%\StopEventually{}
+%<*class>
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/16}{1.23s}{}
+\ProvidesExplClass{easybook}{2021/03/17}{1.23t}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -454,7 +1209,7 @@
section/format .tl_set:N = \l__toc_section_format_tl,
section/format .initial:n = \addvspace{0.35pc},
section/indent .tl_set:N = \l__toc_section_indent_tl,
- section/indent .initial:n = 1.5\ccwd,
+ section/indent .initial:n = 1.5\ccwd,
section/rule .tl_set:N = \l__toc_section_rule_tl,
section/rule .initial:n = \tocrule{$\cdot$},
@@ -1508,5 +2263,6 @@
chapter/hang = true
}
}
-%%
-%% End of file `easybook.cls'. \ No newline at end of file
+%</class>
+%\Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/intopdf/intopdf.dtx b/macros/latex/contrib/intopdf/intopdf.dtx
index 2cd472f0db..86d1454acc 100644
--- a/macros/latex/contrib/intopdf/intopdf.dtx
+++ b/macros/latex/contrib/intopdf/intopdf.dtx
@@ -46,14 +46,14 @@
%
% \GetFileInfo{intopdf.dtx}
% \title{The \pkg{intopdf} package\thanks{This document
-% corresponds to \pkg{intopdf}~0.3.0, dated~2020/03/13.}}
+% corresponds to \pkg{intopdf}~0.4.0, dated~2021/02/26.}}
% \author{Marcel Kr\"uger \\ \href{mailto:tex@2krueger.de}{tex@2krueger.de}}
%
% \maketitle
%
% \begin{documentation}
% This package defines a command \cmd\attachandlink{} which allows to attach an arbitrary file to your PDF document and linking to it from the main text.
-% It is inspired by the \TeX Stack Exchange question \href{https://tex.stackexchange.com/questions/418606/embed-non-pdf-files-e-g-bibtex-into-pdf-with-hyperlink-in-the-pdf/418827#418827}{Embed non-PDF files (e.g., BibTex) into PDF with hyperlink in the PDF}. The engines pdf\LaTeX\ and \LuaLaTeX\ are supported.
+% It is inspired by the \TeX Stack Exchange question \href{https://tex.stackexchange.com/questions/418606/embed-non-pdf-files-e-g-bibtex-into-pdf-with-hyperlink-in-the-pdf/418827#418827}{Embed non-PDF files (e.g., BibTex) into PDF with hyperlink in the PDF}.
%
% \section{Usage}
% \begin{function}{\attachandlink}
@@ -89,52 +89,36 @@
\RequirePackage{expl3,xparse}
\ProvidesExplPackage
{intopdf}
- {2020/03/13}
- {0.3.0}
+ {2021/02/26}
+ {0.4.0}
{Embed non-PDF files into PDF with hyperlink}
-\RequirePackage{l3pdf,hyperref}
+\RequirePackage{hyperref}
%</package>
% \fi
-% \changes{v0.1.0}{2018/03/15}{Added \LuaLaTeX\ support}
-% Only \pdfTeX{} and \LuaLaTeX{} are supported.
-% For other engines we show an error.
-% \begin{macrocode}
-\msg_new:nnnn{intopdf}{engine-unsupported}
- {Your~TeX~engine~is~not~supported~by~intopdf.}
- {To~use~intopdf,~you~have~to~use~pdfLaTeX~or~LuaLaTeX.}
-% \end{macrocode}
-% Then we define some wrappers for the primitives.
-% \begin{macrocode}
-\cs_generate_variant:Nn\str_case:nnF{VnF}
-\str_case:VnF\c_sys_engine_str{
- {pdftex}{
- \cs_new:Nn\__intopdf_escape_name:n{\pdfescapename{#1}}
- \cs_new:Nn\__intopdf_escape_string:n{(\pdfescapestring{#1})}
- }
- {luatex}{
- \RequirePackage{pdftexcmds}
- \cs_new:Nn\__intopdf_escape_name:n{\pdf@escapename{#1}}
- \cs_new:Nn\__intopdf_escape_string:n{(\pdf@escapestring{#1})}
- }
-}{
- \msg_critical:nn{intopdf}{engine-unsupported}
-}
-% \end{macrocode}
% \begin{macro}{\attachandlink,\intopdf_attach_link:nnnnn,\intopdf_attach_link:nnnn}
% \changes{v0.2.0}{2019/05/21}{Added filespec support. (The first optional argument) Added \cs{intopdf_attach_link:nnnnn}.}
% \changes{v0.3.0}{2020/03/13}{Switched to \texttt{l3pdf} instead of using primitives directly. Currently some internal functions from \texttt{l3backend} are needed too for handling links.}
+% \changes{v0.4.0}{2021/02/26}{Update to new \texttt{l3pdf} names and support more engines.}
% The main functionality.
% \begin{macrocode}
+\str_new:N \l__intopdf_mime_str
+\str_new:N \l__intopdf_filename_str
+\str_new:N \l__intopdf_description_str
+
\cs_new_protected:Nn\intopdf_attach_link:nnnnn{
- \pdf_object_now:nx {fstream} { {
- /Subtype /\__intopdf_escape_name:n { #3 }
+ \leavevmode
+ \str_set_convert:Nnnn \l__intopdf_mime_str { #3 } { default } { utf8/name }
+ \pdf_object_unnamed_write:nx {fstream} { {
+ /Subtype /\l__intopdf_mime_str
} { #2 } }
- \pdf_object_now:nx {dict} {
+ \str_set_convert:Nnnn \l__intopdf_filename_str { #1 } { default } { utf16/string }
+ \str_set_convert:Nnnn \l__intopdf_description_str { #4 } { default } { utf16/string }
+ \pdf_object_unnamed_write:nx {dict} {
/Type /Filespec
- /F \__intopdf_escape_string:n { #1 }
- /EF << /F~\pdf_object_last: >>
- /Desc \__intopdf_escape_string:n { #4 }
+ /F (\l__intopdf_filename_str)
+ /EF << /F~\pdf_object_ref_last: >>
+ /Desc (\l__intopdf_description_str)
}
\__pdf_backend_link_begin_user:nnw {
\Hy@setpdfborder
@@ -149,10 +133,10 @@
}
\__pdf_backend_link_begin_user:nnw { } {
/Subtype /FileAttachment
- /FS~\pdf_object_last:
+ /FS~\pdf_object_ref_last:
/F~416
/CA~0
- /Contents \__intopdf_escape_string:n{#4}
+ /Contents (\l__intopdf_description_str)
}
#5
\__pdf_backend_link_end:
diff --git a/macros/latex/contrib/intopdf/intopdf.pdf b/macros/latex/contrib/intopdf/intopdf.pdf
index e569531492..99a5f4338f 100644
--- a/macros/latex/contrib/intopdf/intopdf.pdf
+++ b/macros/latex/contrib/intopdf/intopdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/langsci-affiliations/README.md b/macros/latex/contrib/langsci-affiliations/README.md
deleted file mode 100644
index 4ee26be641..0000000000
--- a/macros/latex/contrib/langsci-affiliations/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-langsci-affiliations collects, orders, and outputs author-affiliation pairs.
-It makes use of data types from LaTeX3.
-
-The package is aimed to be helpful to class authors, i.e. those who design
-and maintain document templates in publishing houses, universities, etc. The
-package is probably of only limited use to document authors/end users.
-
-langsci-affiliations was developed at Language Science Press to help in the
-production of scientific texts in linguistics.
-
-Copyright (C) 2021 by Felix Kopecky, Language Science Press
-
-This work consists of the file langsci-affiliations.dtx
- and the derived file langsci-affiliations.pdf.
-
-It may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), either version 1.3c of this
-license or (at your option) any later version. The latest version
-of this license is at <http://www.latex-project.org/lppl.txt>.
-
-This work is ``maintained'' (per LPPL maintenance status) by
-Felix Kopecky <felix.kopecky@langsci-press.org>.
-
-The development version can be found at
-
- https://github.com/langsci/langsci-affiliations
-
-for those who are interested. Pull requests are welcome.
-
-Please report any bugs or feature requests to
-
- https://github.com/langsci/langsci-affiliations/issues
diff --git a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx b/macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx
deleted file mode 100644
index 7126f830cc..0000000000
--- a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx
+++ /dev/null
@@ -1,493 +0,0 @@
-% \iffalse meta-comment
-% !TeX program = xelatex
-% !TeX encoding = utf-8
-%<*internal>
-\begingroup
-%</internal>
-%<*install>
-\input{l3docstrip.tex}
-\keepsilent
-\askforoverwritefalse
-\preamble
-------------------------------------------------------------------------------
-
-langsci-affiliations collects, orders, and outputs author-affiliation pairs.
-It makes use of data types from LaTeX3.
-
-The package is aimed to be helpful to class authors, i.e. those who design
-and maintain document templates in publishing houses, universities, etc. The
-package is probably of only limited use to document authors/end users.
-
-langsci-affiliations was developed at Language Science Press to help in the
-production of scientific texts in linguistics.
-
-Copyright (C) 2021 by Felix Kopecky, Language Science Press
-
-This work consists of the file langsci-affiliations.dtx
- and the derived files langsci-affiliations.ins,
- langsci-affiliations.pdf.
-
-It may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), either version 1.3c of this
-license or (at your option) any later version. The latest version
-of this license is at <http://www.latex-project.org/lppl.txt>.
-
-This work is ``maintained'' (per LPPL maintenance status) by
-Felix Kopecky <felix.kopecky@langsci-press.org>.
-
-The development version can be found at
-
- https://github.com/langsci/langsci-affiliations
-
-for those who are interested. Pull requests are welcome.
-
-Please report any bugs or feature requests to
-
- https://github.com/langsci/langsci-affiliations/issues
-
-------------------------------------------------------------------------------
-\endpreamble
-\declarepreamble\minimalpreamble
-\endpreamble
-\postamble
-\endpostamble
-\usedir{tex/latex/langsci-affiliations}
-\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
-%</install>
-%<install>\endbatchfile
-%<*internal>
-\usepreamble\minimalpreamble
-\usepostamble\defaultpostamble
-\usedir{source/latex/langsci-affiliations}
-\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}}
-\endgroup
-%</internal>
-%<*driver>
-\documentclass{l3doc}
-\usepackage{langsci-affiliations}
-\usepackage[british]{babel}
-\usepackage{tikz}
- \usetikzlibrary{arrows, arrows.meta, positioning}
-\usepackage{enumitem}
- \setlist[description]{font=\normalfont}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-% \fi
-% \title{\pkg{langsci-affiliations}}
-% \author{Felix Kopecky\thanks{\protect\url{mailto:felix.kopecky@langsci-press.org}.
-% Please submit bug reports and feature requests to
-% \protect\url{https://github.com/langsci/langsci-affiliations/issues}.
-% }}
-% \date{Version 1.0.1 -- \today}
-% \maketitle
-% \frenchspacing
-% \begin{documentation}
-% \section{User guide}
-% This package provides a command \cmd{\ResolveAffiliations}, which collects author--affiliation pairs and outputs them according to the user configuration. It is aimed at class authors, i.e. maintainers of document templates in publishing houses, universities, etc. It is probably not that useful to document authors.
-
-% \begin{function}{\ResolveAffiliations}
-% \begin{syntax}
-% \cs{ResolveAffiliations} \oarg{options} \marg{pairs of authors and affiliations}
-% \end{syntax}
-% Takes the \marg{pairs of authors and affiliations}, orders them internally and outputs them according to the \oarg{options}.
-%
-% \marg{Pairs of authors and affiliations} is a list of authors and affiliations, where authors are separated by \verb+and+ and affiliations by \verb+;+. Affiliations are given within a phantom command \cs{affiliation} within the \marg{pairs} argument -- i.e. the command is not defined by this package and possibly existing definitions are left unchanged.
-%
-% For example:
-%
-% \begin{verbatim}
-% \ResolveAffiliations{
-% A. U. Thor\affiliation{University of the Moon; University of Mars}
-% and B. U. Thor\affiliation{University of Mars}
-% }
-% \end{verbatim}
-% results in:\\
-%
-% \noindent\ResolveAffiliations[output authors font=\normalsize]{
-% A. U. Thor\affiliation{University of the Moon; University of Mars}
-% and B. U. Thor\affiliation{University of Mars}
-% }\\
-%
-% The output can be customised using the \oarg{options}. They are described below.
-% \end{function}
-
-% \begin{function}{\SetupAffiliations}
-% \begin{syntax}
-% \cs{SetupAffiliations} \marg{options}
-% \end{syntax}
-% Options can be set either globally or locally. With \cs{SetupAffiliations}\marg{options}, they apply globally. If they are set with \cs{ResolveAffiliations}\oarg{options}, they apply locally.
-%
-% \begin{description}[style=nextline]
-% \item[|mark style =| \meta{style}\hfill (initially |alphabetic|)] Controls which markers should be used in the indexes of affiliations. Can be a either of \{|alphabetic|, |numeric|, |circled|, |none|\}.
-% \item[|output affiliation =| \meta{boolean}\hfill (initially |true|)] Affiliations are output if true, otherwise not.
-% \item[|output in groups =| \meta{boolean}\hfill (initially |true|)] If |true|, authors and affiliations are output in the same line. When |false| each author and affiliation gets its own line.
-% \item[|output authors font =| \meta{font commands}\hfill (initially |\cs{Large}|)] Stores the font settings for the ouput of authors.
-% \item[|output affiliation font =| \meta{font commands}\hfill (initially |\cs{normalsize}|)] Stores the font settings for outputting affiliations.
-% \end{description}
-%
-% \noindent Output separators between authors and affiliations are customisable as well:
-%
-% \begin{description}[style=nextline]
-% \item[|separator between two =| \meta{tokens}\hfill (initially |\char`~\&\char`~|)]
-% If there are only two authors, use these \meta{tokens} to separate them.
-% \item[|separator between multiple =| \meta{tokens}\hfill (initially |,\char`~|)]
-% If there are more than two authors, use these \meta{tokens} to separate every pair except the last one.
-% \item[|separator between final two =| \meta{tokens}\hfill (initially |\char`~\&\char`~|)]
-% Use these \meta{tokens} to separate the last pair of authors if ther are more than two.
-% \item[|separator between affiliations =| \meta{tokens}\hfill (initially |,|)]
-% Use these to separate affiliations after each authors. The affiliations in the affiliation line are always separated by a space ().
-% \end{description}
-%
-% \noindent The way the input is digested can be customised with these two settings:
-%
-% \begin{description}[style=nextline]
-% \item[|input names separator =| \meta{tokens}\hfill (initially |\char`~and\char`~|)]
-% Separates the author names in the input.
-% \item[|input affiliation separator =| \meta{tokens}\hfill (intially |;|)]
-% Separates the affiliations in the input, within dummy command \cs{affiliation}.
-% \end{description}
-%
-% \end{function}
-% \end{documentation}
-%
-% \newpage
-%
-% \begin{implementation}
-% \section{Implementation}
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-% \begin{macrocode}
-%<@@=affiliations>
-% \end{macrocode}
-% \begin{macrocode}
-\RequirePackage{xparse}
-\ProvidesExplPackage {langsci-affiliations}
-{2021-02-24} {1.0.1}
-{A LaTeX3 package to collect and order authors and affiliations}
-% \end{macrocode}
-
-% \begin{macro}{\ResolveAffiliations}
-% The top-level document command. It is grouped to keep assignments local.
-% \begin{macrocode}
-\NewDocumentCommand{\ResolveAffiliations}{ O{} +m }
- {%
- \group_begin:
- \keys_set:nn { affiliations } { #1 }%
- \exp_args:No \affiliations_resolve:n { #2 }%
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\SetupAffiliations}
-% A command to define options.
-% \begin{macrocode}
-\NewDocumentCommand{\SetupAffiliations}{ m }
- {%
- \keys_set:nn { affiliations } { #1 }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\keys_define:nn { affiliations }
- {
- mark~style .tl_set:N
- = \l__affiliations_style_tl,
- mark~style .initial:n
- = { alphabetic },
- output~affiliation .bool_set:N
- = \l__affiliations_output_affiliation_bool,
- output~affiliation .initial:n
- = { true },
- output~in~groups .bool_set:N
- = \l__affiliations_output_grouped_bool,
- output~in~groups .initial:n
- = { true },
- separator~between~two .tl_set:N
- = \l__affiliations_separator_between_two_tl,
- separator~between~two .initial:n
- = {~\&~},
- separator~between~multiple .tl_set:N
- = \l__affiliations_separator_between_mult_tl,
- separator~between~multiple .initial:n
- = {,~},
- separator~between~final~two .tl_set:N
- = \l__affiliations_separator_between_last_two_tl,
- separator~between~final~two .initial:n
- = {~\&~},
- separator~between~affiliations .tl_set:N
- = \l__affiliations_afil_separator_tl,
- separator~between~affiliations .initial:n
- = {,},
- output~authors~font .cs_set:Np
- = \__affiliations_output_authors_font:,
- output~authors~font .initial:n
- = {\Large},
- output~affiliation~font .cs_set:Np
- = \__affiliations_output_affiliation_font:,
- output~affiliation~font .initial:n
- = {\normalsize},
- input~names~separator .tl_set:N
- = \l__affiliations_input_names_sep_tl,
- input~names~separator .initial:n
- = {~and~},
- input~affiliation~separator .tl_set:N
- = \l_affiliations_input_afil_sep_tl,
- input~affiliation~separator .initial:n
- = {;}
- }
-% \end{macrocode}
-% \begin{variable}[int]{
-% \prop_put:Nxx,
-% \prop_put:Nnx,
-% \seq_set_split:Nvn,
-% \l__affiliations_tmpa_clist,
-% \l__affiliations_tmpa_int,
-% \l__affiliations_affiliations_seq,
-% \l__affiliations_authors_seq,
-% \l__affiliations_names_seq,
-% \l__affiliations_tmpa_seq,
-% \l__affiliations_tmpb_seq,
-% \l__affiliations_tmpa_tl,
-% \l__affiliations_tmpb_tl,
-% \l__affiliations_output_prop,
-% \l__affiliations_affiliations_prop}
-% Internal variants and variables
-% \begin{macrocode}
-
-\cs_generate_variant:Nn \prop_put:Nnn { Nxx }
-\cs_generate_variant:Nn \prop_put:Nnn { Nnx }
-\cs_generate_variant:Nn \seq_set_split:Nnn { NVn }
-\clist_new:N \l__affiliations_tmpa_clist
-\int_new:N \l__affiliations_tmpa_int
-\prop_new:N \l__affiliations_tmpa_prop
-\seq_new:N \l__affiliations_affiliations_seq
-\seq_new:N \l__affiliations_authors_seq
-\seq_new:N \l__affiliations_names_seq
-\seq_new:N \l__affiliations_tmpa_seq
-\seq_new:N \l__affiliations_tmpb_seq
-\tl_new:N \l__affiliations_tmpa_tl
-\tl_new:N \l__affiliations_tmpb_tl
-\prop_new:N \l__affiliations_output_prop
-\prop_new:N \l__affiliations_affiliations_prop
-% \end{macrocode}
-% \end{variable}
-% \begin{variable}[int]{\l__affiliations_icons_prop}
-% The data for the |circled| mark style. Since this uses the \cs{char}, it is
-% only available in XeLaTeX.
-% \begin{macrocode}
-\prop_const_from_keyval:Nn \l__affiliations_icons_prop
- {
- 0 = \char"2460, 1 = \char"2461, 2 = \char"2462, 3 = \char"2463,
- 4 = \char"2464, 5 = \char"2465, 6 = \char"2466, 7 = \char"2467,
- 8 = \char"2468, 9 = \char"2469, 10 = \char"246A, 11 = \char"246B,
- 12 = \char"246C, 13 = \char"246D, 14 = \char"246E, 15 = \char"246F,
- 16 = \char"2470, 17 = \char"2471, 18 = \char"2472, 19 = \char"2473
- }
-% \end{macrocode}
-% \end{variable}
-% \begin{macro}[int]{\__affiliations_resolve_affiliations:}
-% A helper macro to order affiliations. Is called by
-% \cs{affiliations_resolve:n}.
-% \begin{macrocode}
-\cs_new:Npn \__affiliations_resolve_affiliations: #1#2
- {
- \clist_clear:N \l__affiliations_tmpa_clist
- \tl_if_empty:nTF {#2}
- {
- \prop_put:Nnn \l__affiliations_output_prop {#1} {}
- }
- {
- \seq_set_split:NVn \l__affiliations_tmpa_seq
- \l_affiliations_input_afil_sep_tl
- { #2 }
- \seq_map_inline:Nn \l__affiliations_tmpa_seq
- {
- \prop_get:NnNTF \l__affiliations_affiliations_prop
- {##1}
- \l__affiliations_tmpa_tl
- {
- \clist_put_right:NV \l__affiliations_tmpa_clist
- \l__affiliations_tmpa_tl
- }
- {
- %Not yet present
- \clist_put_right:Nx \l__affiliations_tmpa_clist
- {
- \prop_count:N \l__affiliations_affiliations_prop
- }
- \prop_put:Nnx \l__affiliations_affiliations_prop {##1}
- { \prop_count:N \l__affiliations_affiliations_prop }
- }
- }
- \prop_put:NnV \l__affiliations_output_prop
- {#1}
- \l__affiliations_tmpa_clist
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}[int]{\__affiliations_output_affiliations:}
-% A helper macro that outputs the list of affiliations, usually below
-% the list of authors.
-% \begin{macrocode}
-\cs_new:Nn \__affiliations_output_affiliations:
- {
- \prop_map_inline:Nn \l__affiliations_affiliations_prop
- {
- \int_set:Nn \l__affiliations_tmpa_int { ##2 }
- \str_case_e:nn { \l__affiliations_style_tl }
- {
- {alphabetic}
- {
- \textsuperscript{\int_to_alph:n{ \int_eval:n
- { \l__affiliations_tmpa_int + 1 }
- } }
- }
- {numeric}
- { \textsuperscript{\int_eval:n {\l__affiliations_tmpa_int + 1} } }
- {circled}
- {
- \prop_item:Nn \l__affiliations_icons_prop
- {\l__affiliations_tmpa_int}
- }
- {none} { }
- }
- ##1 ~
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}[int]{\__affiliations_return_afil_text:n}
-% A helper macro that returns the affiliation marks.
-% \begin{macrocode}
-\cs_new:Npn \__affiliations_return_afil_text:n #1
- {
- \int_set:Nn \l__affiliations_tmpa_int { #1 }
- \str_case_e:nn { \l__affiliations_style_tl }
- {
- {alphabetic}
- {
- \seq_put_right:Nx \l__affiliations_tmpb_seq
- { \int_to_alph:n{ \int_eval:n {#1 + 1} } }
- }
- {numeric}
- {
- \seq_put_right:Nx \l__affiliations_tmpb_seq
- { \int_eval:n {\l__affiliations_tmpa_int + 1} }
- }
- {circled}
- {
- \seq_put_right:Nx \l__affiliations_tmpb_seq
- { \prop_item:Nn \l__affiliations_icons_prop
- { \l__affiliations_tmpa_int} }
- }
- {none} { }
- }
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}[int]{\__affiliations_output_authors:}
-% A helper macro to output the list of authors, with affiliation marks (if any).
-% \begin{macrocode}
-\cs_new:Nn \__affiliations_output_authors:
- {
- \seq_clear:N \l__affiliations_tmpa_seq
- \prop_map_inline:Nn \l__affiliations_output_prop
- {
- \seq_clear:N \l__affiliations_tmpb_seq
- \clist_map_function:nN {##2} \__affiliations_return_afil_text:n
- \tl_set:Nn \l__affiliations_tmpb_tl
- {
- \seq_use:Nn \l__affiliations_tmpb_seq
- {\l__affiliations_afil_separator_tl}
- }
- \seq_put_right:Nx \l__affiliations_tmpa_seq
- {
- \tl_rescan:nn {} {##1}
- \exp_not:N \textsuperscript{\tl_use:N \l__affiliations_tmpb_tl}
- }
- }
- \seq_use:Nnnn \l__affiliations_tmpa_seq
- {\l__affiliations_separator_between_two_tl}
- {\l__affiliations_separator_between_mult_tl}
- {\l__affiliations_separator_between_last_two_tl}
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}[int]{\affiliations_resolve:n}
-% The main macro.
-% \begin{macrocode}
-\cs_new:Npn \affiliations_resolve:n #1
- {
- \seq_set_split:NVn \l__affiliations_names_seq
- \l__affiliations_input_names_sep_tl
- { #1 }
- \seq_map_inline:Nn \l__affiliations_names_seq
- {
- \seq_clear_new:N \l__affiliations_names_tmp_seq
- \seq_set_split:Nnn \l__affiliations_names_tmp_seq { \affiliation }
- { ##1 }
- \prop_put:Nxx \l__affiliations_tmpa_prop
- { \seq_item:Nn \l__affiliations_names_tmp_seq {1} }
- { \seq_item:Nn \l__affiliations_names_tmp_seq {2} }
- }
- \bool_if:NTF \l__affiliations_output_affiliation_bool
- {
- \bool_if:NTF \l__affiliations_output_grouped_bool
- {
- \prop_map_function:NN \l__affiliations_tmpa_prop
- \__affiliations_resolve_affiliations:
- \group_begin:
- \__affiliations_output_authors_font:
- \__affiliations_output_authors:
- \group_end:\\[0.5ex]
- \group_begin:
- \__affiliations_output_affiliation_font:
- \__affiliations_output_affiliations:
- \group_end:
- }
- {
- \prop_map_inline:Nn \l__affiliations_tmpa_prop
- {
- \__affiliations_output_authors_font:
- \tl_rescan:nn {} {##1}\\[0.5ex]
- \group_begin:
- \__affiliations_output_affiliation_font:
- \tl_rescan:nn {} {##2}
- \group_end:
- \medskip\\
- }
- \vspace*{-\baselineskip}
- }
- }
- {
- \group_begin:
- \__affiliations_output_authors_font:
- \seq_clear:N \l__affiliations_tmpa_seq
- \prop_map_inline:Nn \l__affiliations_tmpa_prop
- {
- \seq_put_right:Nx \l__affiliations_tmpa_seq
- {\tl_rescan:nn {} {##1} }
- }
- \seq_use:Nnnn \l__affiliations_tmpa_seq
- {\l__affiliations_separator_between_two_tl}
- {\l__affiliations_separator_between_mult_tl}
- {\l__affiliations_separator_between_last_two_tl}
- \group_end:
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \end{implementation}
-
-% \PrintIndex
diff --git a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdf b/macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdf
deleted file mode 100644
index c74e18a734..0000000000
--- a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/mindflow/README.md b/macros/latex/contrib/mindflow/README.md
index 728aa95efd..5b8f135fb0 100644
--- a/macros/latex/contrib/mindflow/README.md
+++ b/macros/latex/contrib/mindflow/README.md
@@ -1,15 +1,10 @@
<!-- Copyright (C) 2021 by Jinwen XU -->
-[Github](https://github.com/Jinwen-XU/mindflow) | [CTAN](https://ctan.org/pkg/mindflow) | [Download](https://github.com/Jinwen-XU/mindflow/releases)
-
-![License](https://img.shields.io/ctan/l/mindflow.svg) ![CTAN Version](https://img.shields.io/ctan/v/mindflow.svg) ![Github Version](https://img.shields.io/github/release/Jinwen-XU/mindflow.svg) ![Repo Size](https://img.shields.io/github/repo-size/Jinwen-XU/mindflow.svg)
-
----
-
# The mindflow package
-This package provides an environment that is separated from the main text and
-has its own line numbers, for writing ideas or annotations.
+`mindflow` is a LaTeX package that allows you to write your ideas and annotations in a clear way.
+
+More specifically, it provides a LaTeX environment with its own line numbers or markers, which can be well distinguished from the main text.
# License
diff --git a/macros/latex/contrib/mindflow/mindflow.dtx b/macros/latex/contrib/mindflow/mindflow.dtx
index 43fadef53e..8fa703d938 100644
--- a/macros/latex/contrib/mindflow/mindflow.dtx
+++ b/macros/latex/contrib/mindflow/mindflow.dtx
@@ -18,15 +18,16 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mindflow}
%<*package>
- [2021/03/12 Mindflow environment]
+ [2021/03/17 Mindflow environment]
%</package>
%
%<*driver>
\documentclass{article}
\usepackage{doc}
-\usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.5in,right=1.2in]{geometry}
+\usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.6in,right=1.2in]{geometry}
\usepackage{titling}
\setlength{\droptitle}{-.5in}
+\PassOptionsToPackage{mathlines}{lineno}
\usepackage[linenumber,rightmarker]{mindflow}
\usepackage{enumitem}
\setlist{noitemsep}
@@ -42,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{125}
+% \CheckSum{186}
%
% \GetFileInfo{mindflow.dtx}
%
@@ -55,11 +56,9 @@
%
% \section{Introduction}
%
-% The \textsf{mindflow} package provides you a way to write your ideas,
-% annotations or writing plans.
-
-% For example (with option
-% \verb|linenumber| and \verb|rightmarker|):
+% The \textsf{mindflow} package provides you a way to write your ideas
+% and annotations clearly. For exmaple, with the options
+% \verb|linenumber| and \verb|rightmarker|, you will get:
% \begin{mindflow}
% What to write next:
% \begin{itemize}
@@ -69,14 +68,15 @@
% \item the complete code.
% \end{itemize}
% \end{mindflow}
-% You can also add line numbers to the other part of your document in the usual way.
-% Line numbers within the \textsf{mindflow} environments are independent from
-% those of the main text.
%
% \section{Usage}
%
-% Simply load the package with \verb|\usepackage{mindflow}|. By default
-% it has no line numbers or markers. You can use the following options:
+% Simply load the package with
+% \begin{verbatim}
+% \usepackage{mindflow}
+% \end{verbatim}
+% \vspace{-.5\baselineskip}
+% By default, it has no line numbers or markers. You can use the following options:
%
% \begin{tabular}{ll}
% \verb|linenumber| & Enable line numbers\\
@@ -87,58 +87,106 @@
% \end{tabular}
%
% \DescribeEnv{mindflow}
-% Then you can use the mindflow environment as
+% Then you can use the \verb|mindflow| environment as
% \begin{verbatim}
% \begin{mindflow}
% ...
% \end{mindflow}
% \end{verbatim}
%
-% \section{Some technical details}
+% \linenumbers
+%
+% You can also add line numbers to the other part of your document in the usual
+% way. For example, line numbers have been turned on for this paragraph with
+% \verb|\linenumbers|.
+%
+% \begin{mindflow}
+% Line numbers within the \textsf{mindflow} environments are independent from
+% those of the main text.
+% \end{mindflow}
+% (\emph{I recommend that you put an empty line before and after the mindflow
+% environments. This way, your paragraph structure won't get changed when you
+% use the }\verb|off|\emph{ option.})
+%
+% \nolinenumbers
+%
+% The feature of line numbering is provided by the package \textsf{lineno}. You
+% can read its documentation to learn more about it. Notice that, by default,
+% displayed equations are not numbered. You can add the following line before
+% \verb|\usepackage{mindflow}|:\\[.5\baselineskip]
+% \null\hspace{1.5em}{\small\verb|\PassOptionsToPackage{mathlines}{lineno}|}\\[.5\baselineskip]
+% to enable the line numbers for displayed equations.
+%
+% \begin{mindflow}\vspace{-\baselineskip}
+% \begin{align*}
+% (a + b)^2 &= a^2 + 2ab + b^2\\
+% (a + b)^3 &= a^3 + 3a^2b + 3ab^2 + b^3
+% \end{align*}
+% \end{mindflow}
+%
+%
+% \section{Some \TeX{}nical details}
%
% \DescribeMacro{\mindflowTextFont}
% \DescribeMacro{\mindflowNumFont}
-% The font for texts and line numbers within the \verb|mindflow|
-% environments can be specified by redefining \verb|\mindflowTextFont| and
-% \verb|\mindflowNumFont|. By default they are defined as:
+% The font for text, line numbers and markers within the \verb|mindflow|
+% environments can be specified by redefining \verb|\mindflowTextFont|,
+% \verb|\mindflowNumFont| and \verb|\mindflowMarkerFont|. By default,
+% they are defined as:
% \begin{verbatim}
% \newcommand{\mindflowTextFont}{\normalfont\footnotesize}
% \newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily}
+% \newcommand{\mindflowMarkerFont}{\normalfont\scriptsize\ttfamily}
% \end{verbatim}
+% \vspace{-.5\baselineskip}
+%
% \DescribeMacro{\mindflowLeft}
% \DescribeMacro{\mindflowRight}
-% The left and right marker can be changed by redefining
+% The left and right markers can be changed by redefining
% \verb|\mindflowLeft| and \verb|\mindflowRight|. Both have the default
% value as ``\verb|*|''.
%
% \DescribeMacro{\mindflowLineHeight}
-% The height of the separation line is a length macro named \verb|\mindflowLineHeight|,
+% The height of the separation lines is a length macro named \verb|\mindflowLineHeight|,
% with default value \verb|0.4pt|. You can change this with \verb|\setlength|.
%
-% And finally, the color for texts and line numbers within the \verb|mindflow|
-% environments are called \verb|mindflowText| and \verb|mindflowNum|,
-% respectively. By default, they have the same color as the context, with
-% opacity 30\% and 8\%, respectively.
-
+% \DescribeMacro{mindflowLine}
+% \DescribeMacro{mindflowText}
+% \DescribeMacro{mindflowNum}
+% \DescribeMacro{mindflowMarker}
+% And finally, the colors for the separation lines, text, line numbers and
+% markers within the \verb|mindflow| environments are called
+% \verb|mindflowLine|, \verb|mindflowText|, \verb|mindflowNum| and
+% \verb|mindflowMarker|, respectively. By default, they have the same color as
+% the context, with opacity 30\% for the separation lines, text and markers, and
+% 8\% for the line numbers.
+%
% \section{An example}
% With option \verb|linenumber, leftmarker, rightmarker| and the following settings:
% \begin{verbatim}
-% \colorlet{mindflowText}{blue!50!cyan!80}
-% \colorlet{mindflowNum}{blue!50!cyan!80}
+% \colorlet{mindflowLine}{green!50!black}
+% \colorlet{mindflowText}{blue!50!cyan}
+% \colorlet{mindflowNum}{red!50!orange}
+% \colorlet{mindflowMarker}{orange}
% \renewcommand{\mindflowTextFont}{\normalfont\footnotesize\sffamily\itshape}
-% \renewcommand{\mindflowNumFont}{\normalfont\footnotesize\sffamily}
+% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\sffamily}
+% \renewcommand{\mindflowMarkerFont}{\normalfont\footnotesize\sffamily}
% \renewcommand{\mindflowLeft}{\hspace{1em}\(\succ\)}
% \renewcommand{\mindflowRight}{\(\prec\)}
% \setlength{\mindflowLineHeight}{1pt}
% \end{verbatim}
+% \vspace{-.5\baselineskip}
% One gets:
% \makeatletter
% \@mindflow@leftmarkertrue
% \makeatother
-% \colorlet{mindflowText}{blue!50!cyan!80}
-% \colorlet{mindflowNum}{blue!50!cyan!80}
+% \colorlet{mindflowLine}{green!50!black}
+% \colorlet{mindflowText}{blue!50!cyan}
+% \colorlet{mindflowNum}{red!50!orange}
+% \colorlet{mindflowMarker}{orange}
% \renewcommand{\mindflowTextFont}{\normalfont\footnotesize\sffamily\itshape}
-% \renewcommand{\mindflowNumFont}{\normalfont\footnotesize\sffamily}
+% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\sffamily}
+% \renewcommand{\mindflowMarkerFont}{\normalfont\footnotesize\sffamily}
% \renewcommand{\mindflowLeft}{\hspace{1em}\(\succ\)}
% \renewcommand{\mindflowRight}{\(\prec\)}
% \setlength{\mindflowLineHeight}{1pt}
@@ -177,11 +225,14 @@
\RequirePackage{xcolor}
\colorlet{mfSavedColor}{.}
+\colorlet{mindflowLine}{mfSavedColor!30}
\colorlet{mindflowText}{mfSavedColor!30}
+\colorlet{mindflowMarker}{mfSavedColor!30}
\colorlet{mindflowNum}{mfSavedColor!8}
\newcommand{\mindflowTextFont}{\normalfont\footnotesize}
\newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily}
+\newcommand{\mindflowMarkerFont}{\normalfont\scriptsize\ttfamily}
\newcommand{\mindflowLeft}{*}
\newcommand{\mindflowRight}{*}
\newlength{\mindflowLineHeight}
@@ -221,16 +272,17 @@
\setcounter{linenumber}{\value{mfLN}}%
\LNturnsONfalse%
\ifLineNumbers\LNturnsONtrue\fi\nolinenumbers%
+ \color{mindflowLine}\mfSepLine%
\mindflowTextFont\color{mindflowText}%
- \mfSepLine%
\linenumbers%
\renewcommand\makeLineNumber{%
- \hss\color{mindflowNum}%
+ \hss%
\if@mindflow@linenumber%
- \mindflowNumFont\LineNumber~%
+ \mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}%
\fi%
+ \color{mindflowMarker}%
\if@mindflow@leftmarker%
- \mindflowLeft\hspace{1em}%
+ \mindflowMarkerFont\mindflowLeft\hspace{1em}%
\fi%
\if@mindflow@rightmarker%
\rlap{\hskip\textwidth\hspace{1em}\mindflowRight}%
@@ -239,12 +291,41 @@
}
{%
\par%
- \vspace{-.5\baselineskip}\mfSepLine%
+ \vspace{-.5\baselineskip}\color{mindflowLine}\mfSepLine%
\ifLNturnsON\linenumbers\fi%
\setcounter{mfLN}{\value{linenumber}}%
\setcounter{linenumber}{\value{recordLN}}%
}
\fi
+
+\ifdefined\linenomathpatch\else
+ \RequirePackage{amsmath}
+ \RequirePackage{etoolbox}
+ \newcommand*\linenomathpatch[1]{%
+ \cspreto{#1}{\linenomath}%
+ \cspreto{#1*}{\linenomath}%
+ \cspreto{end#1}{\endlinenomath}%
+ \cspreto{end#1*}{\endlinenomath}%
+ }
+ \newcommand*\linenomathpatchAMS[1]{%
+ \cspreto{#1}{\linenomathAMS}%
+ \cspreto{#1*}{\linenomathAMS}%
+ \csappto{end#1}{\endlinenomath}%
+ \csappto{end#1*}{\endlinenomath}%
+ }
+ \expandafter\ifx\linenomath\linenomathWithnumbers
+ \let\linenomathAMS\linenomathWithnumbers
+ \patchcmd\linenomathAMS{\advance\postdisplaypenalty\linenopenalty}{}{}{}
+ \else
+ \let\linenomathAMS\linenomathNonumbers
+ \fi
+ \linenomathpatch{equation}
+ \linenomathpatchAMS{gather}
+ \linenomathpatchAMS{multline}
+ \linenomathpatchAMS{align}
+ \linenomathpatchAMS{alignat}
+ \linenomathpatchAMS{flalign}
+\fi
% \end{macrocode}
%
% \Finale
diff --git a/macros/latex/contrib/mindflow/mindflow.pdf b/macros/latex/contrib/mindflow/mindflow.pdf
index b9448dbd48..753bb68053 100644
--- a/macros/latex/contrib/mindflow/mindflow.pdf
+++ b/macros/latex/contrib/mindflow/mindflow.pdf
Binary files differ
diff --git a/macros/xetex/latex/langsci/README.md b/macros/xetex/latex/langsci/README.md
index b59c1eea55..11daef3b04 100644
--- a/macros/xetex/latex/langsci/README.md
+++ b/macros/xetex/latex/langsci/README.md
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Project: langsci
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2020-03-17 11:11:11 UTC
+%% Date: 2021-03-17 11:11:11 UTC
%% Purpose: publishing boks with Language Science Press.
%% Languages: LaTeX, tikz, eps
%% Copyright 2012- Language Science Press
@@ -27,9 +27,9 @@
%% tbls-pencil.pdf, tbls-people.pdf, tbls-plus.pdf, tbls-receipt.pdf,
%% tbls-refresh.pdf, tbls-report.pdf, tbls-r.pdf, tbls-test.pdf, tbls-tree.pdf,
%% tbls-book.eps tbls-bulb.eps tbls-glass.eps tbls-law.eps
+%% - langsci-affiliations.sty: Parse author affiliations
%% - langsci-basic.sty for commands required by the standard template
%% - langsci-bidi.sty: bidirectional text
-%% - langsci-forest-setup.sty: definitions for linguistic trees
%% - langsci-gb4e.sty and langsci-cgloss.sty: typeset linguistic examples
%% - langsci-lgr.sty: shortcuts for the Leipzig Glossing Rules
%% - langsci-linguex.sty: a version of linguex which does not break gb4e
@@ -37,8 +37,6 @@
%% - langsci-subparts.sty: adds an additional sectioning level between part and chapter
%% - langsci-tbls.sty: macros for the textbook series Textbooks in Language Sciences
%% - langsci-textipa.sty: provide some Unicode replacements for TIPA phonetic commands
-%% - langsci-tikz.sty: provide some custom commands
-%% - langsci-tobi.sty: provide commands for Tone and Break indices (ToBI)
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -48,20 +46,20 @@ Here you find files to produce books for Language Science Press
The main file is the file langscibook.cls. This defines the basic structure of the book. It makes reference to the following auxiliary files:
langsci-series.def: metadata for series
- langsci-basic.sty for commands required by the standard template
bib style definitions
eps and pdf files for the logos used in the textbook series Textbooks in Language Sciences
The following optional packages are also provided, but have to be included manually if desired:
+ langsci-basic.sty to set the branding to Language Science Press
langsci-optional.sty: additional useful commands
langsci-gb4e.sty and langsci-cgloss.sty typeset linguistic examples
langsci-linguex.sty: a version of linguex which does not break gb4e
langsci-lgr.sty: the Leipzig glossing rule definitions
- langsci-forest-setup.sty: definitions for linguistic trees
langsci-bidi.sty: bidirectional text
langsci-tbls.sty: macros for the textbook series Textbooks in Language Sciences
langsci-subparts.sty: adds an additional sectioning level between part and chapter
+ langsci-textipa.sty: provide some Unicode replacements for TIPA phonetic commands
Documentation is found in the folder documentation/.
diff --git a/macros/xetex/latex/langsci/documentation/langsci-doc.pdf b/macros/xetex/latex/langsci/documentation/langsci-doc.pdf
index fb37f4beb4..9a804344d8 100644
--- a/macros/xetex/latex/langsci/documentation/langsci-doc.pdf
+++ b/macros/xetex/latex/langsci/documentation/langsci-doc.pdf
Binary files differ
diff --git a/macros/xetex/latex/langsci/documentation/langsci-doc.tex b/macros/xetex/latex/langsci/documentation/langsci-doc.tex
index fb56271f88..1da97e8bfa 100644
--- a/macros/xetex/latex/langsci/documentation/langsci-doc.tex
+++ b/macros/xetex/latex/langsci/documentation/langsci-doc.tex
@@ -1,5 +1,5 @@
\documentclass[%
-output=guidelines]{../langscibook}
+output=guidelines,guidelines]{langscibook}
\author{Sebastian Nordhoff}
\title{The \texttt{langscibook} {\LaTeX} class}
\subtitle{}
@@ -37,9 +37,10 @@ This document describes the {\LaTeX} class langscibook.cls. This class is used f
\chapter{The class}
-The class is loaded via \verb+\documentclass{langscibook}+. The standard use case is the creation of a book. If used without an \texttt{output=} option, the option \texttt{output=book} is loaded. The class can also be used to create dust jackets for books with different measurements via the output option values
-\texttt{covercreatespace} (for \url{http://www.createspace.com}) and
-\texttt{coverbodsc/coverbodhc} (for \url{http://www.bod.de}).
+The class is loaded via \verb+\documentclass{langscibook}+. The standard use case is the creation of a book. If used without an \texttt{output=} option, the option \texttt{output=book} is loaded.
+% The class can also be used to create dust jackets for books with different measurements via the output option values
+% \texttt{covercreatespace} (for \url{http://www.createspace.com}) and
+% \texttt{coverbodsc/coverbodhc} (for \url{http://www.bod.de}).
The class provides for the following:
\begin{itemize}
@@ -56,7 +57,7 @@ The class provides for the following:
\item DOI (per book and per chapter)
\end{itemize}
-When used to create dust jackets, the class will produce a large pdf with a collation of backcover, spine and frontcover, from left to right, surrounded by bleed.
+% When used to create dust jackets, the class will produce a large pdf with a collation of backcover, spine and frontcover, from left to right, surrounded by bleed.
\chapter{Requirements}
@@ -68,15 +69,17 @@ A couple of additional style files come with the class. Documents using this cla
\begin{itemize}
\item \texttt{langsci-basic.sty}: Commands used in all Language Science Press books
+ \item \texttt{langsci-affiliations.sty}: Parse author affiliations
\item \texttt{langsci-bidi.sty}: Package for typesetting right-to-left text
\item \texttt{langsci-optional.sty}: Further commands useful for some typical books
\item \texttt{langsci-cgloss.sty}: Helper package for \texttt{langsci-gb4e}
\item \texttt{langsci-gb4e.sty}: Package for linguistic examples
- \item \texttt{langsci-forest-setup.sty}: Set up the forest package for linguistic trees
-% \item \texttt{langsci-lgr.sty}:
- \item \texttt{langsci-tbls.sty}: Package for the textbook series Textbooks in Language Sciences
% \item \texttt{langsci-glyphs.sty}: some shortcuts for font workarounds
+% \item \texttt{langsci-forest-setup.sty}: Set up the forest package for linguistic trees
+ \item \texttt{langsci-lgr.sty}: The glosses defined in the Leipzig Glossing Rules
\item \texttt{langsci-subparts.sty}: adds an additional sectioning level between part and chapter
+ \item \texttt{langsci-tbls.sty}: Package for the textbook series Textbooks in Language Sciences
+ \item \texttt{langsci-textipa.sty}: Unicode renderings of some common TIPA glyphs
\end{itemize}
@@ -116,7 +119,9 @@ Provide the following additional information if necessary:
\section{Creating an edited volume}
-Proceed as for a monograph, but use the option \texttt{collection}. Use \verb+\author+ for the editor(s). Use the option \texttt{multiauthors} if there is more than one editor. You may want to use the further options \texttt{collectionchapter} and \texttt{collectiontoclong}. Chapters are included via \verb+\includepaper{}+. Set the bibliography resource for all papers in the main file.
+Proceed as for a monograph, but use the option \texttt{collection}. Use \verb+\author+ for the editor(s). Use the option \texttt{multiauthors} if there is more than one editor.
+%You may want to use the further options \texttt{collectionchapter} and \texttt{collectiontoclong}.
+Chapters are included via \verb+\includepaper{}+. Set the bibliography resource for all papers in the main file.
\section{Creating a paper for an edited volume}
@@ -148,8 +153,8 @@ This will set your chapter number to 23 when compiled standalone (rather than 1)
-\chapter{Creating a dust jacket}
-Use the option \texttt{coverbodhc}, \texttt{coverbodsc} or \texttt{covercreatespace} and set the option \texttt{spinewidth}. Run {\XeLaTeX} twice. Upload to the respective websites to see whether the lengths were chosen correctly.
+% \chapter{Creating a dust jacket}
+% Use the option \texttt{coverbodhc}, \texttt{coverbodsc} or \texttt{covercreatespace} and set the option \texttt{spinewidth}. Run {\XeLaTeX} twice. Upload to the respective websites to see whether the lengths were chosen correctly.
\chapter{Options}
The class has flag options to toggle certain behaviour and string options to set metadata values.
@@ -167,7 +172,7 @@ The class has flag options to toggle certain behaviour and string options to set
% \option{biblatex}{Use Bib\LaTeX}{true}
% \option{bibtex}{Use Bibtex}{false}
\option{collection}{Make the book an edited volume}{false}
-\option{collectionchapter}{Add numeric chapter prefix to each contribution.}{false}
+% \option{collectionchapter}{Add numeric chapter prefix to each contribution.}{false}
% \option{collectiontoclong}{More detailed table of content in edited volumes}{false}
\option{draftmode}{Switch to draft mode (adds: draft stamp, indication of overlong lines, date)}{false}
\option{openreview}{Switch to open review mode}{false}
@@ -178,7 +183,7 @@ The class has flag options to toggle certain behaviour and string options to set
\option{nobabel}{Do not use the Babel package in the class}{false}
% \option{nonflat}{Use elaborate directory structure. If set to true, fonts, packages etc will be loaded from subfolders. If set to false, they will be loaded from the working directory}{false}
\option{showindex}{Show indexed terms in margin}{false}
-\option{smallfont}{Use a smaller font for books above 500 pages}{false}
+% \option{smallfont}{Use a smaller font for books above 500 pages}{false}
% \option{undecapitalize}{Do not decapitalize titles in the list of references}{false}
\option{chinesefont}{Load fonts for Chinese and update font info in colophon}{false}
\option{japanesefont}{Load fonts for Japanese and update font info in colophon}{false}
@@ -194,12 +199,12 @@ The class has flag options to toggle certain behaviour and string options to set
\item \texttt{paper}: Contribution to edited volume
\item \texttt{minimal}: Optimise for speed. Some features might not work. Useful for drafts.
\item \texttt{guidelines}: Choose color grey; condense frontmatter
-\item \texttt{coverbodhc}: Create a two-page wide cover (back-spine-front) for use with BoD hardcover books
-\item \texttt{coverbodsc}: Create a two-page wide cover (back-spine-front) for use with BoD softcover books
-\item \texttt{covercreatespace}: Create a two-page wide cover (back-spine-front) for use with CreateSpace
+% \item \texttt{coverbodhc}: Create a two-page wide cover (back-spine-front) for use with BoD hardcover books
+% \item \texttt{coverbodsc}: Create a two-page wide cover (back-spine-front) for use with BoD softcover books
+% \item \texttt{covercreatespace}: Create a two-page wide cover (back-spine-front) for use with CreateSpace
\end{itemize}
-\option{spinewidth}{The width of the spine (for cover creation)}{20mm}
+% \option{spinewidth}{The width of the spine (for cover creation)}{20mm}
\option{booklanguage}{Load babel for the specified language and change the custom headers for list of references and indexes}{english}
\option{copyright}{The license chosen}{"CC-BY"}
% \option{biblatexbackend}{The backend of BibLaTeX}{"biber"}
diff --git a/macros/xetex/latex/langsci/examples/samplemonograph.tex b/macros/xetex/latex/langsci/examples/samplemonograph.tex
index f1896c4ce0..6f8a937bf9 100644
--- a/macros/xetex/latex/langsci/examples/samplemonograph.tex
+++ b/macros/xetex/latex/langsci/examples/samplemonograph.tex
@@ -1,4 +1,4 @@
-\documentclass{./langscibook}
+\documentclass{langscibook}
\author{Pat Jaeung}
\title{Sample monograph}
\subtitle{}
diff --git a/macros/xetex/latex/langsci/examples/samplepaper.tex b/macros/xetex/latex/langsci/examples/samplepaper.tex
index f901301246..30da90509f 100644
--- a/macros/xetex/latex/langsci/examples/samplepaper.tex
+++ b/macros/xetex/latex/langsci/examples/samplepaper.tex
@@ -1,28 +1,29 @@
\documentclass[output=paper]{langscibook}
\title{Introduction}
\author{%
- Chap ter Author\affiliation{University of Eden}\and
- Noam Chimpsky\affiliation{University of Pluto}\lastand
+ Chap ter Author\affiliation{University of Eden} and
+ Noam Chimpsky\affiliation{University of Pluto} and
Jane Wilson\affiliation{National Institute for Language}
}
\abstract{
Abstract goes here
}
-\IfFileExists{../main.tex}{%adjust to name of your master file
- \bibliography{langsci-test}
- \papernote{\scriptsize\normalfont
- To appear in:
- Change Volume Editor.
- Change volume title.
- Berlin: Language Science Press. [preliminary page numbering]
- }
- \pagenumbering{roman}
- \setcounter{chapter}{23}%adjust the chapter number
- \addtocounter{chapter}{-1}
-}{}
-
-
+% \IfFileExists{../main.tex}{%adjust to name of your master file
+% \IfFileExists{samplevolume.tex}{
+% \bibliography{langsci-test}
+% \papernote{\scriptsize\normalfont
+% To appear in:
+% Change Volume Editor.
+% Change volume title.
+% Berlin: Language Science Press. [preliminary page numbering]
+% }
+% \pagenumbering{roman}
+% \setcounter{chapter}{23}%adjust the chapter number
+% \addtocounter{chapter}{-1}
+% }{}
+
+% \usepackage{langsci-optional}
\begin{document}
\maketitle
@@ -38,12 +39,12 @@ Sed nisi urna, dignissim sit amet posuere ut, luctus ac lectus. Fusce vel ornare
\caption{Frequencies of word classes}
\label{tab:1:frequencies}
\begin{tabular}{lrrrr}
- \lsptoprule
+% \lsptoprule
& nouns & verbs & adjectives & adverbs\\
\midrule
absolute & 12 & 34 & 23 & 13\\
relative & 3.1 & 8.9 & 5.7 & 3.2\\
- \lspbottomrule
+% \lspbottomrule
\end{tabular}
\end{table}
diff --git a/macros/xetex/latex/langsci/examples/samplevolume.tex b/macros/xetex/latex/langsci/examples/samplevolume.tex
index 4132dff2a2..9a4e84e84e 100644
--- a/macros/xetex/latex/langsci/examples/samplevolume.tex
+++ b/macros/xetex/latex/langsci/examples/samplevolume.tex
@@ -1,7 +1,6 @@
\documentclass[output=book
,collection
- ,collectionchapter
- ]{./langscibook}
+ ]{langscibook}
\author{Jane Doe}
\title{Sample edited volume}
@@ -38,7 +37,6 @@
\mainmatter
-\mainmatter
\includepaper{samplepaper}
\backmatter
diff --git a/macros/xetex/latex/langsci/langsci-affiliations.sty b/macros/xetex/latex/langsci/langsci-affiliations.sty
new file mode 100644
index 0000000000..0f08eed2e6
--- /dev/null
+++ b/macros/xetex/latex/langsci/langsci-affiliations.sty
@@ -0,0 +1,306 @@
+%%
+%% This is file `langsci-affiliations.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% langsci-affiliations.dtx (with options: `package')
+%% ------------------------------------------------------------------------------
+%%
+%% langsci-affiliations collects, orders, and outputs author-affiliation pairs.
+%% It makes use of data types from LaTeX3.
+%%
+%% The package is aimed to be helpful to class authors, i.e. those who design
+%% and maintain document templates in publishing houses, universities, etc. The
+%% package is probably of only limited use to document authors/end users.
+%%
+%% langsci-affiliations was developed at Language Science Press to help in the
+%% production of scientific texts in linguistics.
+%%
+%% Copyright (C) 2021 by Felix Kopecky, Language Science Press
+%%
+%% This work consists of the file langsci-affiliations.dtx
+%% and the derived files langsci-affiliations.ins,
+%% langsci-affiliations.pdf.
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is at <http://www.latex-project.org/lppl.txt>.
+%%
+%% This work is ``maintained'' (per LPPL maintenance status) by
+%% Felix Kopecky <felix.kopecky@langsci-press.org>.
+%%
+%% The development version can be found at
+%%
+%% https://github.com/langsci/langsci-affiliations
+%%
+%% for those who are interested. Pull requests are welcome.
+%%
+%% Please report any bugs or feature requests to
+%%
+%% https://github.com/langsci/langsci-affiliations/issues
+%%
+%% ------------------------------------------------------------------------------
+
+
+\RequirePackage{xparse}
+\ProvidesExplPackage {langsci-affiliations}
+{2021-02-17} {1.0.1}
+{A LaTeX3 package to collect and order authors and affiliations}
+
+\NewDocumentCommand{\ResolveAffiliations}{ O{} +m }
+ {%
+ \group_begin:
+ \keys_set:nn { affiliations } { #1 }%
+ \exp_args:No \affiliations_resolve:n { #2 }%
+ \group_end:
+ }
+
+\NewDocumentCommand{\SetupAffiliations}{ m }
+ {%
+ \keys_set:nn { affiliations } { #1 }
+ }
+\keys_define:nn { affiliations }
+ {
+ mark~style .tl_set:N
+ = \l__affiliations_style_tl,
+ mark~style .initial:n
+ = { alphabetic },
+ output~affiliation .bool_set:N
+ = \l__affiliations_output_affiliation_bool,
+ output~affiliation .initial:n
+ = { true },
+ output~in~groups .bool_set:N
+ = \l__affiliations_output_grouped_bool,
+ output~in~groups .initial:n
+ = { true },
+ separator~between~two .tl_set:N
+ = \l__affiliations_separator_between_two_tl,
+ separator~between~two .initial:n
+ = {~\&~},
+ separator~between~multiple .tl_set:N
+ = \l__affiliations_separator_between_mult_tl,
+ separator~between~multiple .initial:n
+ = {,~},
+ separator~between~final~two .tl_set:N
+ = \l__affiliations_separator_between_last_two_tl,
+ separator~between~final~two .initial:n
+ = {~\&~},
+ separator~between~affiliations .tl_set:N
+ = \l__affiliations_afil_separator_tl,
+ separator~between~affiliations .initial:n
+ = {,},
+ output~authors~font .cs_set:Np
+ = \__affiliations_output_authors_font:,
+ output~authors~font .initial:n
+ = {\Large},
+ output~affiliation~font .cs_set:Np
+ = \__affiliations_output_affiliation_font:,
+ output~affiliation~font .initial:n
+ = {\normalsize},
+ input~names~separator .tl_set:N
+ = \l__affiliations_input_names_sep_tl,
+ input~names~separator .initial:n
+ = {~and~},
+ input~affiliation~separator .tl_set:N
+ = \l_affiliations_input_afil_sep_tl,
+ input~affiliation~separator .initial:n
+ = {;}
+ }
+
+\cs_generate_variant:Nn \prop_put:Nnn { Nxx }
+\cs_generate_variant:Nn \prop_put:Nnn { Nnx }
+\cs_generate_variant:Nn \seq_set_split:Nnn { NVn }
+\clist_new:N \l__affiliations_tmpa_clist
+\int_new:N \l__affiliations_tmpa_int
+\prop_new:N \l__affiliations_tmpa_prop
+\seq_new:N \l__affiliations_affiliations_seq
+\seq_new:N \l__affiliations_authors_seq
+\seq_new:N \l__affiliations_names_seq
+\seq_new:N \l__affiliations_tmpa_seq
+\seq_new:N \l__affiliations_tmpb_seq
+\tl_new:N \l__affiliations_tmpa_tl
+\tl_new:N \l__affiliations_tmpb_tl
+\prop_new:N \l__affiliations_output_prop
+\prop_new:N \l__affiliations_affiliations_prop
+\prop_const_from_keyval:Nn \l__affiliations_icons_prop
+ {
+ 0 = \char"2460, 1 = \char"2461, 2 = \char"2462, 3 = \char"2463,
+ 4 = \char"2464, 5 = \char"2465, 6 = \char"2466, 7 = \char"2467,
+ 8 = \char"2468, 9 = \char"2469, 10 = \char"246A, 11 = \char"246B,
+ 12 = \char"246C, 13 = \char"246D, 14 = \char"246E, 15 = \char"246F,
+ 16 = \char"2470, 17 = \char"2471, 18 = \char"2472, 19 = \char"2473
+ }
+\cs_new:Npn \__affiliations_resolve_affiliations: #1#2
+ {
+ \clist_clear:N \l__affiliations_tmpa_clist
+ \tl_if_empty:nTF {#2}
+ {
+ \prop_put:Nnn \l__affiliations_output_prop {#1} {}
+ }
+ {
+ \seq_set_split:NVn \l__affiliations_tmpa_seq
+ \l_affiliations_input_afil_sep_tl
+ { #2 }
+ \seq_map_inline:Nn \l__affiliations_tmpa_seq
+ {
+ \prop_get:NnNTF \l__affiliations_affiliations_prop
+ {##1}
+ \l__affiliations_tmpa_tl
+ {
+ \clist_put_right:NV \l__affiliations_tmpa_clist
+ \l__affiliations_tmpa_tl
+ }
+ {
+ %Not yet present
+ \clist_put_right:Nx \l__affiliations_tmpa_clist
+ {
+ \prop_count:N \l__affiliations_affiliations_prop
+ }
+ \prop_put:Nnx \l__affiliations_affiliations_prop {##1}
+ { \prop_count:N \l__affiliations_affiliations_prop }
+ }
+ }
+ \prop_put:NnV \l__affiliations_output_prop
+ {#1}
+ \l__affiliations_tmpa_clist
+ }
+ }
+\cs_new:Nn \__affiliations_output_affiliations:
+ {
+ \prop_map_inline:Nn \l__affiliations_affiliations_prop
+ {
+ \int_set:Nn \l__affiliations_tmpa_int { ##2 }
+ \str_case_e:nn { \l__affiliations_style_tl }
+ {
+ {alphabetic}
+ {
+ \textsuperscript{\int_to_alph:n{ \int_eval:n
+ { \l__affiliations_tmpa_int + 1 }
+ } }
+ }
+ {numeric}
+ { \textsuperscript{\int_eval:n {\l__affiliations_tmpa_int + 1} } }
+ {circled}
+ {
+ \prop_item:Nn \l__affiliations_icons_prop
+ {\l__affiliations_tmpa_int}
+ }
+ {none} { }
+ }
+ ##1 ~
+ }
+ }
+\cs_new:Npn \__affiliations_return_afil_text:n #1
+ {
+ \int_set:Nn \l__affiliations_tmpa_int { #1 }
+ \str_case_e:nn { \l__affiliations_style_tl }
+ {
+ {alphabetic}
+ {
+ \seq_put_right:Nx \l__affiliations_tmpb_seq
+ { \int_to_alph:n{ \int_eval:n {#1 + 1} } }
+ }
+ {numeric}
+ {
+ \seq_put_right:Nx \l__affiliations_tmpb_seq
+ { \int_eval:n {\l__affiliations_tmpa_int + 1} }
+ }
+ {circled}
+ {
+ \seq_put_right:Nx \l__affiliations_tmpb_seq
+ { \prop_item:Nn \l__affiliations_icons_prop
+ { \l__affiliations_tmpa_int} }
+ }
+ {none} { }
+ }
+ }
+
+\cs_new:Nn \__affiliations_output_authors:
+ {
+ \seq_clear:N \l__affiliations_tmpa_seq
+ \prop_map_inline:Nn \l__affiliations_output_prop
+ {
+ \seq_clear:N \l__affiliations_tmpb_seq
+ \clist_map_function:nN {##2} \__affiliations_return_afil_text:n
+ \tl_set:Nn \l__affiliations_tmpb_tl
+ {
+ \seq_use:Nn \l__affiliations_tmpb_seq
+ {\l__affiliations_afil_separator_tl}
+ }
+ \seq_put_right:Nx \l__affiliations_tmpa_seq
+ {
+ \tl_rescan:nn {} {##1}
+ \exp_not:N \textsuperscript{\tl_use:N \l__affiliations_tmpb_tl}
+ }
+ }
+ \seq_use:Nnnn \l__affiliations_tmpa_seq
+ {\l__affiliations_separator_between_two_tl}
+ {\l__affiliations_separator_between_mult_tl}
+ {\l__affiliations_separator_between_last_two_tl}
+ }
+
+\cs_new:Npn \affiliations_resolve:n #1
+ {
+ \seq_set_split:NVn \l__affiliations_names_seq
+ \l__affiliations_input_names_sep_tl
+ { #1 }
+ \seq_map_inline:Nn \l__affiliations_names_seq
+ {
+ \seq_clear_new:N \l__affiliations_names_tmp_seq
+ \seq_set_split:Nnn \l__affiliations_names_tmp_seq { \affiliation }
+ { ##1 }
+ \prop_put:Nxx \l__affiliations_tmpa_prop
+ { \seq_item:Nn \l__affiliations_names_tmp_seq {1} }
+ { \seq_item:Nn \l__affiliations_names_tmp_seq {2} }
+ }
+ \bool_if:NTF \l__affiliations_output_affiliation_bool
+ {
+ \bool_if:NTF \l__affiliations_output_grouped_bool
+ {
+ \prop_map_function:NN \l__affiliations_tmpa_prop
+ \__affiliations_resolve_affiliations:
+ \group_begin:
+ \__affiliations_output_authors_font:
+ \__affiliations_output_authors:
+ \group_end:\\[0.5ex]
+ \group_begin:
+ \__affiliations_output_affiliation_font:
+ \__affiliations_output_affiliations:
+ \group_end:
+ }
+ {
+ \prop_map_inline:Nn \l__affiliations_tmpa_prop
+ {
+ \__affiliations_output_authors_font:
+ \tl_rescan:nn {} {##1}\\[0.5ex]
+ \group_begin:
+ \__affiliations_output_affiliation_font:
+ \tl_rescan:nn {} {##2}
+ \group_end:
+ \medskip\\
+ }
+ \vspace*{-\baselineskip-\medskipamount}
+ }
+ }
+ {
+ \group_begin:
+ \__affiliations_output_authors_font:
+ \seq_clear:N \l__affiliations_tmpa_seq
+ \prop_map_inline:Nn \l__affiliations_tmpa_prop
+ {
+ \seq_put_right:Nx \l__affiliations_tmpa_seq
+ {\tl_rescan:nn {} {##1} }
+ }
+ \seq_use:Nnnn \l__affiliations_tmpa_seq
+ {\l__affiliations_separator_between_two_tl}
+ {\l__affiliations_separator_between_mult_tl}
+ {\l__affiliations_separator_between_last_two_tl}
+ \group_end:
+ }
+ }
+
+%%
+%%
+%% End of file `langsci-affiliations.sty'.
diff --git a/macros/xetex/latex/langsci/langsci-basic.sty b/macros/xetex/latex/langsci/langsci-basic.sty
index 13a8050d4c..5f1e3477b2 100644
--- a/macros/xetex/latex/langsci/langsci-basic.sty
+++ b/macros/xetex/latex/langsci/langsci-basic.sty
@@ -1,31 +1,19 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: langsci-basic.sty
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2020-03-17 13:12 UTC
+%% Date: 2016-01-16 16:47:43 UTC
%% Purpose: This file contains essential macros and is included
%% into langscibook.cls
%% Language: LaTeX
%% Licence:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\lsptoprule}{\midrule\toprule}
-\newcommand{\lspbottomrule}{\bottomrule\midrule}
-\newcommand{\REF}[1]{(\ref{#1})}
-
-\newcommand{\ob}{{\upshape [}} %opening bracket
-\newcommand{\cb}{{\upshape ]}} %closing bracket
-\newcommand{\op}{{\upshape (}} %opening paren
-\newcommand{\cp}{{\upshape )}} %closing paren
-\newcommand{\db}{\hspaceThis{[}} %dummy space for [ in IMT line
-% \newcommand{\rmfnm}{{\upshape\footnotemark}} %romanfootnotemark
-
-\newcommand{\citegen}[2][]{\citeauthor{#2}'s (\citeyear*[#1]{#2})}
-\newcommand{\citeapo}[2][]{\citeauthor{#2}' (\citeyear*[#1]{#2})}
-
-\newcommand{\protectedex}[1]{\noindent\parbox{\linewidth}{#1}}
-
-\newcommand{\largerpage}[1][1]{\enlargethispage{#1\baselineskip}}
+\providecommand{\ob}{{\upshape [}} %opening bracket
+\providecommand{\cb}{{\upshape ]}} %closing bracket
+\providecommand{\op}{{\upshape (}} %opening paren
+\providecommand{\cp}{{\upshape )}} %closing paren
+\providecommand{\db}{\hphantom{[}} %dummy space for [ in IMT line
% old font commands
\renewcommand{\it}{\itshape}
@@ -33,7 +21,9 @@
\renewcommand{\sc}{\scshape}
\renewcommand{\rm}{\upshape}
-% vertical space to structure tables
-\newcommand{\tablevspace}{\\[-.5em]}
-\newcommand{\biberror}[1]{{\color{red}#1}}
+% Default commands for loaded graphics
+\renewcommand{\includespinelogo}{\includegraphics{langsci_spinelogo_nocolor}}
+\renewcommand{\includestoragelogo}{\includegraphics[width=5cm]{storagelogo}}
+\renewcommand{\includepublisherlogo}{\includegraphics{langsci_logo_nocolor}}
+\renewcommand{\includechapterfooterlogo}{\includegraphics{langsci_spinelogo_nocolor}}
diff --git a/macros/xetex/latex/langsci/langsci-forest-setup.sty b/macros/xetex/latex/langsci/langsci-forest-setup.sty
index 7a9f3e4ef6..07af8fc910 100644
--- a/macros/xetex/latex/langsci/langsci-forest-setup.sty
+++ b/macros/xetex/latex/langsci/langsci-forest-setup.sty
@@ -23,7 +23,8 @@
% http://en.wikibooks.org/wiki/LaTeX/Linguistics#Syntactic_trees
\usepackage{tikz-dependency}
-\usetikzlibrary{tikzmark} % saves positions in tikz pictures, allows to connect arbitrary text
+% dangerous, use at own risk
+%\usetikzlibrary{tikzmark} % saves positions in tikz pictures, allows to connect arbitrary text
% http://tex.stackexchange.com/questions/256280/drawing-complex-dependency-diagrams-with-tikz-forest
@@ -32,23 +33,19 @@
\tikzset{deparrow/.style={-Latex}}%,blue}}
-% does not work with forest v1.05 did not check later versions
+% externalization works with package memoize
\usepackage[linguistics]{forest}
-%\usepackage[external,linguistics]{forest}
-%\tikzset{external/up to date check=simple}
-% for texlive: -shell-escape, for miktex -enable-write18
-% All externalized graphics go go the \externaldirectory
-%\tikzexternalize[prefix=external-figures/,shell escape=-shell-escape]
-%\tikzset{external/system call={xelatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}
%\usepackage{morewrites}
-
% specification for all trees, "default preamble" appends to existing specification.
% The version with apostrophe replaces it.
\forestset{default preamble'={
- for tree={align=center,parent anchor=south, child anchor=north,anchor=north,base=bottom},
+ for tree={align=center,parent anchor=south, child anchor=north,anchor=north,base=bottom},
+% anchor=north was introduced to get alignments of AVMs right.
+% used to be anchor=north but this fails on trees in \ea \z examples, St. Mü. 02.05.2020 or may be not
+%
% This would align trees to the baseline. We do not want this for TAG
% where several trees have to be aligned with respect to their center.
% before drawing tree={
@@ -268,12 +265,6 @@ no word baseline/.style={for tree={parent anchor=south, child anchor=north,align
substitution/.style={edge={<-,dashed},l+=\baselineskip},
%
%
-%
-typehierarchy/.style={for tree={parent anchor=south, child
- anchor=north,align=center,base=top,font=\itshape,fit=rectangle}},
-% if there are instances as leaves in the hiarchy
-instance/.style={edge=dotted},
-%
% auxiliary nodes without node label
%empty nodes/.style={
% delay={where content={}{shape=coordinate,for parent={for children={anchor=north}}}{}}}
@@ -294,4 +285,112 @@ instance/.style={edge=dotted},
empty nodes/.style={
delay={where content={}{shape=coordinate,for siblings={anchor=north}}{}}
}
+ }
+
+\forestset{
+ % Easy extra edges
+ edge to'/.style 2 args={
+ tikz+={\path[#2](#1.parent anchor)--(.child anchor);}
+ },
+ edge to/.style={
+ edge to'/.expanded={\unexpanded{#1}}{\forestoption{edge}},
+ },
+ edge from'/.style 2 args={
+ tikz+={\path[#2](.parent anchor)--(#1.child anchor);}
+ },
+ edge from/.style={
+ edge from'/.process=_O{#1}{#1.edge},
+ },
+ % Identify two (adjacent, vertically aligned) nodes
+ forget@node@boundary/.code={%
+ \forestolet{positive@edge@#1}\relax
+ \forestolet{negative@edge@#1}\relax
+ },
+ identify/.style={
+ phantom,
+ temptoksa/.option=#1.name,
+ before typesetting nodes/.process=Rw1{temptoksa}{
+ content/.option=##1.content,
+ content format/.option=##1.content format,
+ node format/.option=##1.node format,
+ },
+ for parent/.process=Ow1{n}{
+ after packing node={
+ for ##1={
+ ignore,ignore edge,forget@node@boundary/.option=grow,
+ },
+ },
+ },
+ for nodewalk/.process=Rw1Ow1{temptoksa}{name=##1}{!u.name}{edge to={##1}},
+ },
+ % Uniformly spread any sequence of nodes
+ spread/.style n args=4{
+ % #1 = coordinate (x,y,s,l)
+ % #2 = nodewalk to spread
+ % #3 = relative node name of the node with the final coordinate
+ % #4 = final coordinate shift
+ for nodewalk={
+ tempcounta'=-1,
+ #2,
+ tempdima/.pgfmath={(#1("#3")+#4-#1(""))/tempcounta()}
+ }{tempcounta'+=1},
+ tempdimb'=0pt,
+ for nodewalk={#2}{
+ #1'+/.register=tempdimb,
+ tempdimb'+/.register=tempdima,
+ },
+ },
}
+
+% The old type hierarchy style
+\forestset{
+typehierarchy/.style={for tree={parent anchor=south, child
+% old version:
+% anchor=north,align=center,base=top,font=\itshape,fit=rectangle}},
+% to get parallel lines:
+ anchor=north,align=center,base=top,font=\itshape,calign=fixed angles}},
+% if there are instances as leaves in the hiarchy
+instance/.style={edge=dotted}
+}
+
+% Type hierarchy (Saso 2020)
+\forestset{
+ type hierarchy/.style={
+ for tree={
+ anchor=base,
+%anchor=north,
+ content format={\noexpand\type{\unexpanded{#1}\forestoption{content}}},
+ },
+ },
+ partition/.style={
+ content format={\noexpand\textsc{\forestoption{content}}},
+ draw,
+ },
+ instance/.style={
+ gray,edge={gray,dashed}
+ },
+ % if all leaves in the hierarchy are instances, we can declare this as follows:
+ % nodes which do not have children (n children=0) are drawn in gray and edges leading to them are dashed
+ instances/.style={
+ for tree={
+ s sep=0,
+ if n children=0{
+ gray,
+ edge={dashed,gray},
+ }{},
+ }},
+}
+
+% AVM helper
+\forestset{
+ avm/.style={
+ content format={%
+ \noexpand\avmoptions{#1}%
+ \noexpand\begin{avm}%
+ \forestoption{content}%
+ \noexpand\end{avm}%
+ },
+ },
+}
+
+
diff --git a/macros/xetex/latex/langsci/langsci-gb4e.sty b/macros/xetex/latex/langsci/langsci-gb4e.sty
index 54bceb4db1..b16072ddff 100644
--- a/macros/xetex/latex/langsci/langsci-gb4e.sty
+++ b/macros/xetex/latex/langsci/langsci-gb4e.sty
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: langsci-gb4e.sty
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2020-03-17 13:12 UTC
+%% Date: 2016-01-16 16:47:43 UTC
%% Purpose: This file contains an adapted version of the gb4e package
%% for typetting linguistic examples. It also includes
%% adapted versions of the cgloss and jambox packages
@@ -19,7 +19,7 @@
\toggletrue{jambox}
\DeclareOption{nocgloss}{\togglefalse{cgloss}}
\DeclareOption{nojambox}{\togglefalse{jambox}}
-\DeclareOption*{\PackageWarning{examplepackage}{Unknown option ‘\CurrentOption’}}
+\DeclareOption*{\PackageWarning{langsci-gb4e}{Unknown option ‘\CurrentOption’}}
\ProcessOptions\relax
% \def\gbVersion{4e}
@@ -79,7 +79,7 @@
-\@ifundefined{new@fontshape}{\def\reset@font{}\let\mathrm\rm\let\mathit\mit}{}
+% \@ifundefined{new@fontshape}{\def\reset@font{}\let\mathrm\rm\let\mathit\mit}{} %%deprecate this
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -242,7 +242,7 @@
\def\exe{%
%\ifnum\value{equation}>9 \exewidth{(23)}\else\fi%
%inserted by LangSci, for large example numbers
- \ifnum\value{equation}>98 \exewidth{(235)}\else\fi%
+ \ifnum\value{equation}>998 \exewidth{(1235)}\else\ifnum\value{equation}>98 \exewidth{(235)}\fi\fi%
\@ifnextchar [{\@exe}{\@exe[\@exwidth]}}
\def\@exe[#1]{\ifnum \@xnumdepth >0%
@@ -255,8 +255,7 @@
\if@noftnote%
\begin{list}{(\thexnumi)}%
{\usecounter{xnumi}\@subex{#1}{\@gblabelsep}{0em}%
- \setcounter{xnumi}{\value{equation}}
- \nopagebreak}%
+ \setcounter{xnumi}{\value{equation}}}%
\else%
\begin{list}{(\roman{xnumi})}%
{\usecounter{xnumi}\@subex{(iiv)}{\@gblabelsep}{\footexindent}%
@@ -313,7 +312,7 @@
%%% the example-items
\def\ex{\@ifnextchar [{\@ex}{\item}}
\def\@ex[#1]#2{\item\@exj[#1]{#2}}
-\def\@exj[#1]#2{\@exjbg{#1} #2 \end{list}\nopagebreak}
+\def\@exj[#1]#2{\@exjbg{#1} #2 \end{list}}
\def\exi#1{\item[#1]\@ifnextchar [{\@exj}{}}
\def\judgewidth#1{\def\@jwidth{#1}}
\judgewidth{??}
diff --git a/macros/xetex/latex/langsci/langsci-lgr.sty b/macros/xetex/latex/langsci/langsci-lgr.sty
index e74f4d57be..cad5a49a59 100644
--- a/macros/xetex/latex/langsci/langsci-lgr.sty
+++ b/macros/xetex/latex/langsci/langsci-lgr.sty
@@ -1,13 +1,23 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: langsci-lgr.sty
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2020-03-17 13:12 UTC
+%% Date: 2020-08-31 16:47:43 UTC
%% Purpose: This file contains shortcuts for the Leipzig Glossing
%% Rules.
%% Language: LaTeX
%% Licence:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\usepackage{etoolbox}
+
+\newtoggle{danger}
+\togglefalse{danger}
+\DeclareOption{danger}{\toggletrue{danger}}
+\DeclareOption*{\PackageWarning{langsci-lgr}{Unknown option ‘\CurrentOption’}}
+\ProcessOptions\relax
+
+\iftoggle{danger}{\newcommand{\A}{\textsc{a}\xspace}}{}
\newcommand{\ABL}{\textsc{abl}{}\xspace} %ablative
\newcommand{\ABS}{\textsc{abs}{}\xspace} %absolutive
\newcommand{\ACC}{\textsc{acc}{}\xspace} %accusative
@@ -31,15 +41,15 @@
\newcommand{\DAT}{\textsc{dat}{}\xspace} %dative
\newcommand{\DECL}{\textsc{decl}{}\xspace} %declarative
\newcommand{\DEM}{\textsc{dem}{}\xspace} %demonstrative
-\newcommand{\DEF}{\textsc{det}{}\xspace}
-\newcommand{\DET}{\textsc{def}{}\xspace}
+\newcommand{\DEF}{\textsc{def}{}\xspace}
+\newcommand{\DET}{\textsc{det}{}\xspace}
\newcommand{\DIST}{\textsc{dist}{}\xspace} %distal
\newcommand{\DISTR}{\textsc{distr}{}\xspace} %distributive
\newcommand{\DU}{\textsc{du}{}\xspace} %dual
\newcommand{\DUR}{\textsc{dur}{}\xspace} %durative
\newcommand{\ERG}{\textsc{erg}{}\xspace} %ergative
\newcommand{\EXCL}{\textsc{excl}{}\xspace} %exclusive
-\newcommand{\F}{\textsc{f}{}\xspace}
+\iftoggle{danger}{\newcommand{\F}{\textsc{f}\xspace}}{}
\newcommand{\FOC}{\textsc{foc}{}\xspace} %focus
\newcommand{\FUT}{\textsc{fut}{}\xspace} %future
\newcommand{\GEN}{\textsc{gen}{}\xspace} %genitive
@@ -47,19 +57,20 @@
\newcommand{\INCL}{\textsc{incl}{}\xspace} %inclusive
\newcommand{\IND}{\textsc{ind}{}\xspace} %indicative
\newcommand{\INDF}{\textsc{indf}{}\xspace} %indefinite
+\newcommand{\INF}{\textsc{indf}{}\xspace} %indefinite
\newcommand{\INS}{\textsc{ins}{}\xspace} %instrumental
\newcommand{\INTR}{\textsc{intr}{}\xspace} %intransitive
\newcommand{\IPFV}{\textsc{ipfv}{}\xspace} %imperfective
\newcommand{\IRR}{\textsc{irr}{}\xspace} %irrealis
\newcommand{\LOC}{\textsc{loc}{}\xspace} %locative
-% \renewcommand{\M}{\textsc{m}{}\xspace} % use at own risk
-\newcommand{\N}{\textsc{n}{}\xspace}
+\iftoggle{danger}{\newcommand{\M}{\textsc{m}\xspace}}{}
+\iftoggle{danger}{\newcommand{\N}{\textsc{n}\xspace}}{}
\newcommand{\NEG}{\textsc{neg}{}\xspace}
\newcommand{\NMLZ}{\textsc{nmlz}{}\xspace} %nominalizer/nominalization
\newcommand{\NOM}{\textsc{nom}{}\xspace} %nominative
\newcommand{\OBJ}{\textsc{obj}{}\xspace} %object
\newcommand{\OBL}{\textsc{obl}{}\xspace} %oblique
-% \renewcommand{\P}{\textsc{p}{}\xspace} %%originally pilcrow, use at own risk
+\iftoggle{danger}{\renewcommand{\P}{\textsc{p}\xspace}}{} %originally pilcrow
\newcommand{\PASS}{\textsc{pass}{}\xspace} %passive
\newcommand{\PFV}{\textsc{pfv}{}\xspace} %perfective
\newcommand{\PL}{\textsc{pl}{}\xspace} %plural
@@ -73,13 +84,13 @@
\newcommand{\PST}{\textsc{pst}{}\xspace} %past
\newcommand{\PTCP}{\textsc{ptcp}{}\xspace} %participle
\newcommand{\PURP}{\textsc{purp}{}\xspace} %purposive
-\newcommand{\Q}{\textsc{q}{}\xspace}
+\iftoggle{danger}{\newcommand{\Q}{\textsc{q}\xspace}}{}
\newcommand{\QUOT}{\textsc{quot}{}\xspace} %quotative
\newcommand{\RECP}{\textsc{recp}{}\xspace} %reciprocal
\newcommand{\REFL}{\textsc{refl}{}\xspace} %reflexive
\newcommand{\REL}{\textsc{rel}{}\xspace} %relative
\newcommand{\RES}{\textsc{res}{}\xspace} %resultative
-% \renewcommand{\S}{\textsc{s}{}\xspace} %originally § , use at own risk
+\iftoggle{danger}{\renewcommand{\S}{\textsc{s}\xspace}}{}
\newcommand{\SBJ}{\textsc{sbj}{}\xspace} %subject
\newcommand{\SBJV}{\textsc{sbjv}{}\xspace} %subjunctive
\newcommand{\SG}{\textsc{sg}{}\xspace} %singular
diff --git a/macros/xetex/latex/langsci/langsci-optional.sty b/macros/xetex/latex/langsci/langsci-optional.sty
index c70f7e35f7..4edfa8672c 100644
--- a/macros/xetex/latex/langsci/langsci-optional.sty
+++ b/macros/xetex/latex/langsci/langsci-optional.sty
@@ -8,6 +8,7 @@
%% Licence:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{pbox} % boxes with maximum width
% Heiko Oberdiek
% http://tex.stackexchange.com/questions/136644/vertical-space-in-interaction-with-figure-center-environment
\newcommand{\oneline}[1]{%
@@ -109,7 +110,6 @@
}
\newcommand{\fittable}[1]{\resizebox{\textwidth}{!}{#1}}
-\usepackage{tabularx}
\usepackage{array}
\newenvironment{widetabular}[1][1]
{\tabularx{#1\textwidth}}
@@ -134,6 +134,7 @@
\node at (2.25,1) (O) {ɔ};
}
+\usepackage{tabularx}
%no hyphenation left alingned
\newcolumntype{Q}{>{\raggedright\arraybackslash}X}
%no hyphenation right aligned
@@ -147,9 +148,6 @@
%no hyphenation right aligned fixed width
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
-\newcolumntype{d}[1]{D{.}{.}{#1}}
-
-
% Underlining in gb4e-example Environments. Usual underlining commands that span multiple words do not work, because gb4e would parse it as one word.
% Example: \underline{My example phrase} should become \ulp{My}{~~~~~} \ulp{example}{~~~~~} \ule{phrase}
% Note: The 2nd Argument of the \ulp command is filled in by experience - if you are not familiar with the command, you should experiment a bit. Usually, five tildes are enough, but be sure to check the outcome.
@@ -216,8 +214,8 @@
% \def\blx@maxline{77}
% \makeatother
+\usepackage{todonotes}
\newcommand{\rephrase}[2]{{\color{yellow!30!black}#2}\todo{replaced `#1'}}
-
\newcommand{\missref}[2][]{\todo[#1]{missing reference #2}}
\newenvironment{indentquote}[1]%
@@ -269,7 +267,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for chapters without abstract
-\newcommand{\noabstract}{\vspace*{-2\baselineskip}}
+\newcommand{\noabstract}{\relax}
%%%%%%%%%%%%%%%%%%%%
%%%% %%%%%
@@ -277,10 +275,8 @@
%%%% %%%%%
%%%%%%%%%%%%%%%%%%%%
-
\newcommand{\LSfrac}[1]{{\addfontfeature{Fractions=On}#1}}% Use the fraction glyphs shipped with Libertine. The argument is n/m, where n and m are integers
-
% Provide a raised tie bar for diphthongs and affricates with ascenders
\newcommand{\hitie}[2]{%
\mbox{#1}%
@@ -333,3 +329,25 @@
\usepackage{pifont}
\newcommand*{\langscicheckmark}{\ding{51}}
\newcommand*{\langscicross}{\ding{55}}
+
+
+\providecommand{\citegen}[2][]{\citeauthor{#2}'s (\citeyear*[#1]{#2})}
+\providecommand{\citeapo}[2][]{\citeauthor{#2}' (\citeyear*[#1]{#2})}
+
+\providecommand{\protectedex}[1]{\noindent\parbox{\linewidth}{#1}}
+
+\providecommand{\largerpage}[1][1]{\enlargethispage{#1\baselineskip}}
+
+% vertical space to structure tables
+\providecommand{\tablevspace}{\\[-.5em]}
+
+\providecommand{\biberror}[1]{{\color{red}#1}}
+
+\providecommand{\lsptoprule}{\midrule\toprule}
+\providecommand{\lspbottomrule}{\bottomrule\midrule}
+
+\providecommand{\REF}[1]{(\ref{#1})}
+
+
+\newcommand{\glottocodes}[1]{}
+\newcommand{\keywords}[1]{}
diff --git a/macros/xetex/latex/langsci/langsci-plots.sty b/macros/xetex/latex/langsci/langsci-plots.sty
new file mode 100644
index 0000000000..f8f73128af
--- /dev/null
+++ b/macros/xetex/latex/langsci/langsci-plots.sty
@@ -0,0 +1,67 @@
+\newcommand{\barplot}[5][]{%
+ \begin{tikzpicture}
+ \begin{axis}[
+ xlabel={#2},
+ ylabel={#3},
+ axis lines*=left,
+ width = \textwidth,
+ height = .3\textheight,
+ nodes near coords,
+ xtick=data,
+ x tick label style={},
+ ymin=0,
+ symbolic x coords={#4},#1 %any additional parameters for the axis can be given in the optional argument
+ ]
+ \addplot+[ybar,lsRichGreen!80!black,fill=lsRichGreen] plot coordinates {
+ #5
+ };
+ \end{axis}
+ \end{tikzpicture}
+}
+
+
+
+\usepackage{pgfmath,pgfplotstable}
+\newcommand{\langsciplot}[2]{%% experimental
+ \pgfplotstablegetcolsof{#1.csv}
+ \pgfmathsetmacro{\langscicsvlength}{\pgfplotsretval-1}
+ \begin{tikzpicture}[trim axis right,trim axis left]
+ \begin{axis}[
+ xtick=data,
+ axis lines*=left,
+ nodes near coords,
+ ymin=0,
+ width=\textwidth,
+ #2
+ ]
+ \foreach \i in {0,...,\langscicsvlength} {
+ \addplot[
+ /pgf/number format/read comma as period
+ ] table [x index={0},y index={\i}] {#1.csv};
+ }
+ \end{axis}
+ \end{tikzpicture}
+}
+
+\colorlet{tmnlpone}{lsDarkBlue}
+\colorlet{tmnlptwo}{lsMidDarkBlue}
+\colorlet{tmnlpthree}{lsMidBlue}
+\colorlet{tmnlpfour}{lsLightBlue}
+
+\colorlet{sidlone}{lsDarkGreenTwo}
+\colorlet{sidltwo}{lsRichGreen}
+\colorlet{sidlthree}{lsMidGreen}
+\colorlet{sidlfour}{lsSoftGreen}
+
+\colorlet{lvone}{lsDarkWine}
+\colorlet{lvtwo}{lsMidWine}
+\colorlet{lvthree}{lsLightWine}
+\colorlet{lvfour}{lsRed}
+
+\colorlet{silpone}{lsRed}
+\colorlet{silptwo}{lsDarkOrange}
+\colorlet{silpthree}{lsMidOrange}
+\colorlet{silpfour}{lsLightOrange}
+
+
+
diff --git a/macros/xetex/latex/langsci/langsci-pod.sty b/macros/xetex/latex/langsci/langsci-pod.sty
new file mode 100644
index 0000000000..a5855d411b
--- /dev/null
+++ b/macros/xetex/latex/langsci/langsci-pod.sty
@@ -0,0 +1,104 @@
+\newcommand{\csgeometry}{
+ \setlength{\bleed}{3.175mm}
+ \setlength{\seitenbreite}{169.9mm}
+ \setlength{\seitenhoehe}{244.1mm}
+ \setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite+\bleed+\bleed}
+ \setlength{\totalheight}{\seitenhoehe+\bleed+\bleed}
+ \usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
+ \hyphenpenalty 750
+}
+
+\newcommand{\bodscgeometry}{
+ \newlength{\totalspine}
+ \setlength{\seitenbreite}{170mm}
+ \setlength{\seitenhoehe}{240mm} % For BOD: Softcover, papier 80g/m², weiß, Papier 17x24cm
+ \setlength{\bleed}{5mm}
+ \setlength{\totalspine}{\spinewidth}
+ \setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite+\bleed+\bleed}
+ \setlength{\totalheight}{\seitenhoehe+\bleed+\bleed}
+ \usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
+ \hyphenpenalty 750
+}
+
+\newcommand{\bodhcgeometry}{
+ \newlength{\bodfold}
+ \newlength{\totalspine}
+ \setlength{\bodfold}{8mm}
+ \setlength{\seitenbreite}{192mm}
+ \setlength{\seitenhoehe}{280mm} % For BOD: Hardcover, Runder Rücken, Kaschiert, papier 80g/m², weiß, Papier 17x24cm
+ \setlength{\totalspine}{\spinewidth}
+ \setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite}
+ \setlength{\totalheight}{\seitenhoehe}
+ \usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
+ \hyphenpenalty 750
+}
+
+
+% Content creation for the spine. Including Logo, author, title, and volume number on spine.
+\newcommand{\podspine}{
+ \renewcommand{\newlineCover}{}
+ \renewcommand{\and}{, }
+ \renewcommand{\lastand}{ \& }
+ \node [above = 0mm of CoverSpine.south, anchor=base] (lspcls_spinelogo) {\color{\lsSeriesColor}\includespinelogo};
+ \node [below = 0mm of CoverSpine.north, anchor=north] (lspcls_splinenumber) {\color{\lsSeriesColor}
+ {\parbox{.47cm}{
+ \centering
+ \sffamily
+ \huge
+ \lsSeriesNumber
+ }}
+ };
+
+ \node [font=\fontsize{18pt}{14pt}\selectfont, above left = 15mm and 4mm of lspcls_spinelogo.north, rotate=270] (lspcls_spinetitle) {\color{\lsSeriesColor} \lsSpineAuthorFont{\lsSpineAuthor\xspace\lsEditorSuffix} \hspace{13mm} \lsSpineTitleFont{\lsSpineTitle}};
+ \renewcommand{\newlineCover}{\\}
+}
+
+\newcommand{\bodHCcover}{
+ \begin{titlepage}
+ \thispagestyle{empty}
+ \coversetup
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \covergeometry{24.2mm}{23.1cm}{15.5cm}
+ \podspine
+ \frontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
+ \coverbottomtext
+ \newcommand{\lsISBNcover}{\lsISBNhardcover}
+ \backcover{137mm}
+ \end{tikzpicture}
+ %exit the document right here
+ \end{titlepage}
+}
+
+
+\newcommand{\bodSCcover}{
+ \begin{titlepage}
+ \thispagestyle{empty}
+ \coversetup
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \covergeometry{13.75mm}{23.1cm}{15.5cm}
+ \podspine
+ \frontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
+ \coverbottomtext
+ \newcommand{\lsISBNcover}{\lsISBNsoftcover}
+ \backcover{137mm}
+ \end{tikzpicture}
+ %exit the document right here
+ \end{titlepage}
+ }
+
+\newcommand{\amazonKindleCover}{
+ \begin{titlepage}
+ \thispagestyle{empty}
+ \coversetup
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \covergeometry{10.675mm}{22.5cm}{15.5cm}
+ \podspine
+ \frontcovertoptext{140mm}{52pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
+ \coverbottomtext
+ \newcommand{\lsISBNcover}{ }
+ \backcover{140mm}
+ \end{tikzpicture}
+ %exit the document right here
+ \end{titlepage}
+ \end{document}
+ }
diff --git a/macros/xetex/latex/langsci/langsci-series.def b/macros/xetex/latex/langsci/langsci-series.def
index 60d24f88d1..77d7997311 100644
--- a/macros/xetex/latex/langsci/langsci-series.def
+++ b/macros/xetex/latex/langsci/langsci-series.def
@@ -10,6 +10,7 @@
\newcommand{\cam}{cam}
\newcommand{\cib}{cib}
\newcommand{\cfls}{cfls} %Conceptual Foundation of the Language Sciences
+\newcommand{\cgl}{cgl} %SIDL-CGL
\newcommand{\classics}{classics}
\newcommand{\cmle}{cmle} %Computational Models of Language Evolution
\newcommand{\eotms}{eotms}
@@ -23,12 +24,14 @@
\newcommand{\ogs}{ogs} %Open Generative Syntax
\newcommand{\osl}{osl} %Open Slavic Linguistics
\newcommand{\pmwe}{pmwe} %Phraseology and Multi-Word Expressions
+\newcommand{\rcg}{rcg} %
\newcommand{\scl}{scl}
\newcommand{\sidl}{sidl}
\newcommand{\silp}{silp} %Studies in Laboratory Phonology
\newcommand{\tbls}{tbls} %Textbooks in Language Sciences
\newcommand{\tgdi}{tgdi} %Topics at the Grammar-Discourse Interface
\newcommand{\tmnlp}{tmnlp}
+\newcommand{\tpd}{tpd}
\newcommand{\dummyseries}{dummyseries}
\newcommand{\guidelines}{guidelines}
@@ -38,6 +41,22 @@
\ifx\lsSeries\algad
\newcommand{\lsSeriesTitle}{African Language Grammars \newlineCover and Dictionaries}
\newcommand{\lsSeriesColor}{lsLightOrange}
+ \renewcommand{\lsISSN}{2512-4862}
+ \renewcommand{\lsSeriesText}{
+ Chief Editor: Adams Bodomo \\
+ Editor: Firmin Ahoua
+
+ \bigskip
+
+ In this series:
+
+ \begin{enumerate}
+ \item Schrock, Terrill B. The Ik language: Dictionary and grammar sketch.
+ \item Brindle, Jonathan. A dictionary and grammatical outline of Chakali.
+ \item Friesen, Dianne. A grammar of Moloko.
+ \item Ali, Mark, Scott Grimm \& Adams Bodomo. A dictionary and grammatical sketch of Dagaare.
+ \end{enumerate}
+ }
\fi
\ifx\lsSeries\calseries %\cal is already taken as a command
\newcommand{\lsSeriesTitle}{Contemporary African Linguistics}
@@ -66,14 +85,53 @@
\fi
\ifx\lsSeries\cam
\newcommand{\lsSeriesTitle}{Contact and Multilingualism}
- \newcommand{\lsSeriesColor}{lsRed}
- \renewcommand{\lsISSN}{}
+ \newcommand{\lsSeriesColor}{lsRed}
+ \renewcommand{\lsISSNelectronic}{2700-855X}
+ \renewcommand{\lsISSNprint}{2700-8541}
+ \renewcommand{\lsSeriesText}{
+ {\large Contact and Multilingualism}
+
+ \bigskip
+
+ Editors: Isabelle Léglise (CNRS SeDyL), Stefano Manfredi (CNRS SeDyL)
+
+ \bigskip
+
+ In this series:
+
+ \begin{enumerate}
+ \item Lucas, Christopher \& Stefano Manfredi (eds.). Arabic and contact-induced change.
+ \item Pinto, Jorge \& Nélia Alexandre (eds.). Multilingualism and third language acquisition: Learning and teaching trends.
+ % % \item Hamikov.
+ % % \item Sánchez Moreano, Santiago \& Élodie Blestel. Prácticas lingüísticas heterogéneas: Nuevas perspectivas para el estudio del español en contacto con lenguas amerindias.
+ \end{enumerate}
+ }
\fi
\ifx\lsSeries\cib
\newcommand{\lsSeriesTitle}{Current Issues in Bilingualism}
\newcommand{\lsSeriesColor}{lsLightGreen}
% \renewcommand{\lsISSN}{}
+ \renewcommand{\lsSeriesText}{
+ {\large Current Issues in Bilingualism}
+
+ \bigskip
+
+ Editors: Andrea C. Schalley (Karlstad University, Sweden) [editor-in-chief],\\
+ M Carmen Parafita Couto (Leiden University, Netherlands) [editor-in-chief],\\
+ Susana Eisenchlas (Griffith University, Australia),\\
+ Galina Putjata (Europa-Universität Flensburg, Germany),\\
+ Jorge Valdés Kroff (University of Florida, USA).
+
+
+ \bigskip
+
+ In this series:
+
+ \begin{enumerate}
+ \item Shim, Ji Young. OV and VO variation in code-switching.
+ \end{enumerate}
+ }
\fi
\ifx\lsSeries\cfls
\newcommand{\lsSeriesTitle}{Conceptual Foundations of \newlineCover Language Science}
@@ -127,10 +185,46 @@
\item Müller, Stefan. {A lexicalist account of argument structure: Template-based phrasal LFG approaches and a lexical HPSG alternative}.
\item Schmidtke-Bode, Karsten, Natalia Levshina, Susanne Maria Michaelis \& Ilja A. Seržant (eds.). Explanation in typology: Diachronic sources, functional motivations and the nature of the evidence.
\item Morley, Rebecca L. Sound structure and sound change: A modeling approach.
+ \item Asoulin, Eran. Language and scientific explanation: Where does semantics fit in?
\end{enumerate}
}
\fi
+\ifx\lsSeries\cgl
+ \newcommand{\lsSeriesTitle}{Comprehensive Grammar Library}
+ \newcommand{\lsSeriesColor}{lsNightBlue}
+ \renewcommand{\lsSeriesText}{
+ {\large Comprehensive Grammar Library}
+
+ \bigskip
+ Editor: Martin Haspelmath
+
+ \bigskip
+ In this series:
+
+ \begin{enumerate}
+ \item Jacques, Guillaume. A grammar of Japhug.
+ \end{enumerate}
+
+
+ This series grew out of the grammars published in \textit{Studies in Diversity Linguistics}, which are proudly mentioned:
+
+ \begin{enumerate}
+ \item[4.] Berghäll, Liisa. A grammar of Mauwake.
+ \item[5.] Wilbur, Joshua. A grammar of Pite Saami.
+ \item[7.] Schackow, Diana. A grammar of Yakkha.
+ \item[8.] Liljegren, Henrik. A grammar of Palula.
+ \item[9.] Shimelman, Aviva. A grammar of Yauyos Quechua.
+ \item[11.] Kluge, Angela. A grammar of Papuan Malay.
+ \item[12.] Kieviet, Paulus. A grammar of Rapa Nui.
+ \item[22.] Döhler, Christian. A grammar of Komnzo.
+ \item[23.] Yakpo, Kofi. A grammar of Pichi.
+ \end{enumerate}
+
+
+ }
+% \renewcommand{\lsISSN}{}
+\fi
\ifx\lsSeries\classics
\newcommand{\lsSeriesTitle}{Classics in Linguistics}
\newcommand{\lsSeriesColor}{black}
@@ -153,6 +247,7 @@
\item von der Gabelentz, Georg. Die Sprachwissenschaft. Ihre Aufgaben, Methoden und bisherigen Ergebnisse.
\item Stefan Müller, Marga Reis \& Frank Richter (Hrsg.). Beiträge zur deutschen Grammatik: Gesammelte Schriften von Tilman N.\ Höhle.
\item Anderson, Stephen R.\ \& Louis de Saussure (eds.). René de Saussure and the theory of word formation.
+ \item Wackernagel, Jacob. On a law of Indo-European word order: Über ein Gesetz der indogermanischen Wortstellung.
\end{enumerate}
}
\fi
@@ -198,13 +293,14 @@
In this series:
\begin{enumerate}
- \item Lichte, Timm. Syntax und Valenz: Zur Modellierung kohärenter und elliptischer Strukturen mit Baumadjunktionsgrammatiken
- \item Bîlbîie, Gabriela. Grammaire des constructions elliptiques: Une étude comparative des phrases sans verbe en roumain et en français
- \item Bowern, Claire, Laurence Horn \& Raffaella Zanuttini (eds.). On looking into words (and beyond): Structures, Relations, Analyses
+ \item Lichte, Timm. Syntax und Valenz: Zur Modellierung kohärenter und elliptischer Strukturen mit Baumadjunktionsgrammatiken.
+ \item Bîlbîie, Gabriela. Grammaire des constructions elliptiques: Une étude comparative des phrases sans verbe en roumain et en français.
+ \item Bowern, Claire, Laurence Horn \& Raffaella Zanuttini (eds.). On looking into words (and beyond): Structures, Relations, Analyses.
\item Bonami, Olivier, Gilles Boyé, Georgette Dal, Hélène Giraudo \& Fiammetta Namer. The lexeme in descriptive and theoretical morphology.
\item Guzmán Naranjo, Matías. Analogical classification in formal grammar.
+ \item Flick, Johanna. Die Entwicklung des Definitartikels im Althochdeutschen: Eine kognitiv-linguistische Korpusuntersuchung.
+ \item Zinova, Yulia. Russian verbal prefixation: A frame semantic analysis.
\end{enumerate}
-
}
\fi
\ifx\lsSeries\eotmsig
@@ -215,6 +311,28 @@
\newcommand{\lsSeriesTitle}{Eurosla Studies}
\newcommand{\lsSeriesColor}{lsMidOrange}
\renewcommand{\lsISSN}{2626-2665}
+
+ \renewcommand{\lsSeriesText}{
+ {\large EuroSLA Studies}
+
+ \bigskip
+
+ Editor: Gabriele Pallotti\\
+ Associate editors:
+ Amanda Edmonds, Université de Montpellier;
+ Ineke Vedder, University of Amsterdam
+
+ \bigskip
+
+ In this series:
+
+ \begin{enumerate}
+ \item Pérez Vidal, Carmen, Sonia López-Serrano, Jennifer Ament \& Dakota J. Thomas-Wilhelm (eds.). Learning context effects: Study abroad, formal instruction and international immersion classrooms
+ \item Saturno, Jacopo. Utterance structure in initial L2 acquisition.
+ \item Bardel, Camilla \& Laura Sánchez (eds.). Third language acquisition: Age, proficiency and multilingualism.
+ \item Edmonds, Amanda, Pascale Leclercq \& Aarnes Gudmestad (eds.), Interpreting language-learning data.
+ \end{enumerate}
+ }
\fi
\ifx\lsSeries\hpls
\newcommand{\lsSeriesTitle}{History and Philosophy of the Language Sciences}
@@ -237,6 +355,7 @@
\begin{enumerate}
\item McElvenny, James (ed.). Form and formalism in linguistics.
\item Van Rooy, Raf. Greece’s labyrinth of language: A study in the early modern discovery of dialect diversity.
+ \item Aussant, Émilie \& Jean-Michel Fortis. Historical journey in a linguistic archipelago: Case studies on concepts, fields, and commitments.
\end{enumerate}
}
@@ -373,6 +492,11 @@
\item Franco, Ludovico, Mihaela Marchis Moreno \& Matthew Reeve (eds.). Agreement, case and locality in the nominal and verbal domains.
\item Bross, Fabian. The clausal syntax of German Sign Language: A cartographic approach.
\item Smith, Peter W., Johannes Mursell \& Katharina Hartmann (eds.). Agree to Agree: Agreement in the Minimalist Programme.
+ \item Pineda, Anna \& Jaume Mateu (eds.). Dative constructions in Romance and beyond.
+ \item Kastner, Itamar. Voice at the interfaces: The syntax, semantics, and morphology of the Hebrew verb.
+ \item Bárány, András, Theresa Biberauer, Jamie Douglas \& Sten Vikner (eds.). Syntactic architecture and its consequences I: Syntax inside the grammar.
+ \item Bárány, András, Theresa Biberauer, Jamie Douglas \& Sten Vikner (eds.). Syntactic architecture and its consequences II: Between syntax and morphology.
+ \item Bárány, András, Theresa Biberauer, Jamie Douglas \& Sten Vikner (eds.). Syntactic architecture and its consequences III: Inside syntax.
\end{enumerate}
}
\fi
@@ -437,6 +561,15 @@
}
\fi
+\ifx\lsSeries\rcg
+ \newcommand{\lsSeriesTitle}{Research on Comparative Grammar}
+ \newcommand{\lsSeriesColor}{lsDarkOrange}
+ \renewcommand{\lsISSNelectronic}{ } %online
+ \renewcommand{\lsISSNprint}{} %Print
+ \renewcommand{\lsSeriesText}{
+ {\large Research on Comparative Grammar }
+ }
+\fi
\ifx\lsSeries\scl
\newcommand{\lsSeriesTitle}{Studies in Caribbean Languages}
\newcommand{\lsSeriesColor}{lsDarkOrange}
@@ -515,6 +648,8 @@
\item Di Garbo, Francesca, Bruno Olsson \& Bernhard Wälchli (eds.). Grammatical gender and linguistic complexity: Volume II: World-wide comparative studies.
\item Unterladstetter, Volker. Multi-verb constructions in Eastern Indonesia.
\item Edwards, Owen. Metathesis and unmetathesis in Amarasi.
+ \item Bergqvist, Henrik \& Seppo Kittilä (eds). Evidentiality, egophoricity, and engagement.
+ \item Floyd, Simeon, Giovanni Rossi \& N. J. Enfield (eds.). Getting others to do things: A pragmatic typology of recruitments.
\end{enumerate}
\end{multicols}
@@ -525,7 +660,7 @@
\newcommand{\lsSeriesColor}{lsLightWine}
\renewcommand{\lsISSN}{2363-5576}
\renewcommand{\lsSeriesText}{
- {\raggedleft\IfFileExists{./langsci/seriesinfo/labphon-logo.pdf}{\includegraphics[width=5cm]{./langsci/seriesinfo/labphon-logo.pdf}}{LabPhon-Logo}}
+ {\raggedleft\IfFileExists{labphon-logo.pdf}{\includegraphics[width=5cm]{labphon-logo.pdf}}{LabPhon-Logo}}
\bigskip
@@ -552,6 +687,7 @@
\item Tilsen, Sam. Syntax with oscillators and energy levels.
\item Ben Hedia, Sonia. Gemination and degemination in English affixation: Investigating the interplay between morphology, phonology and phonetics.
\item Easterday, Shelece. Highly complex syllable structure: A typological and diachronic study.
+ \item Roessig, Simon. Categoriality and continuity in prosodic prominence.
\end{enumerate}
}
@@ -560,6 +696,29 @@
\newcommand{\lsSeriesTitle}{Textbooks in Language Sciences}
\newcommand{\lsSeriesColor}{lsYellow}
\renewcommand{\lsISSN}{2364-6209}
+ \renewcommand{\lsSeriesText}{%
+ {\large Textbooks in Language Sciences}
+
+ \bigskip
+
+ Editors: Stefan Müller, Martin Haspelmath\\
+ Editorial Board: Claude Hagège, Marianne Mithun, Anatol Stefanowitsch, Foong Ha Yap
+
+ \bigskip
+
+ In this series:
+
+ \begin{enumerate}
+ \item Müller, Stefan. Grammatical theory: From transformational grammar to constraint-based approaches.
+ \item Schäfer, Roland. Einführung in die grammatische Beschreibung des Deutschen.
+ \item Freitas, Maria João \& Ana Lúcia Santos (eds.). Aquisição de língua materna e não materna: Questões gerais e dados do português.
+ \item Roussarie, Laurent. Sémantique formelle: Introduction à la grammaire de Montague.
+ \item Kroeger, Paul. Analyzing meaning: An introduction to semantics and pragmatics.
+ \item Ferreira, Marcelo. Curso de semântica formal.
+ \item Stefanowitsch, Anatol. Corpus linguistics: A guide to the methodology.
+ \item Müller, Stefan. {\tblseight}.
+ \end{enumerate}
+ }
\fi
\ifx\lsSeries\tgdi
\newcommand{\lsSeriesTitle}{Topics at the Grammar-Discourse \newlineCover Interface}
@@ -583,8 +742,11 @@
\item Müller, Sonja. Distribution und Interpretation von Modalpartikel-Kombinationen.
\item Bueno Holle, Juan José. Information structure in Isthmus Zapotec narrative and conversation.
\item Parikh, Prashant. Communication and content.
+ \item Balogh, Kata, Anja Latrouite \& Robert D. Van Valin‚ Jr. (eds.) Nominal anchoring: Specificity, definiteness and article systems across languages.
+ \item Næss, Åshild, Anna Margetts \& Yvonne Treis (eds.). Demonstratives in discourse.
+ \item Gergel, Remus \& Jonathan Watkins (eds.). Quantification and scales in change.
+ \item Nakagawa, Natsuko. Information structure in spoken Japanese: Particles, word order, and intonation.
\end{enumerate}
-
}
\fi
\ifx\lsSeries\tmnlp
@@ -603,8 +765,7 @@
\bigskip
In this series:
-
- \begin{enumerate}
+ \begin{enumerate}\itemsep=0pt
\item Fantinuoli, Claudio \& Federico Zanettin (eds.). New directions in corpus-based translation studies.
\item Hansen-Schirra, Silvia \& Sambor Grucza (eds.). Eyetracking and Applied Linguistics.
\item Neumann, Stella, Oliver Čulo \& Silvia Hansen-Schirra (eds.). Annotation, exploitation and evaluation of parallel corpora: TC3\,I.
@@ -617,9 +778,34 @@
\item Moran, Steven \& Michael Cysouw. The Unicode cookbook for linguists: Managing writing systems using orthography profiles.
\item Fantinuoli, Claudio (ed.). Interpreting and technology.
\item Nitzke, Jean. Problem solving activities in post-editing and translation from scratch: A multi-method study.
- % \item LVDV
+ \item Vandevoorde, Lore. Semantic differences in translation.
+ \item Bisiada, Mario (ed.). Empirical studies in translation and discourse.
+ \item Tra\&Co Group (ed.). Translation, interpreting, cognition: The way out of the box.
+ \end{enumerate}
+ }
+\fi
+\ifx\lsSeries\tpd
+ \newcommand{\lsSeriesTitle}{Topics in Phonological Diversity}
+ \newcommand{\lsSeriesColor}{lsDarkBlue}
+ \renewcommand{\lsSeriesText}{
+ {\large {Topics in Phonological Diversity}
+
+ \bigskip
+
+ Editors: Natalia Kuznetsova (Università Cattolica del Sacro Cuore / Institute for Linguistic Studies, Russian Academy of Sciences)
+ Cormac Anderson (MPI-SHH, Jena)
+ Shelece Easterday (University of Hawai'i, Mānoa)
+
+
+ \bigskip
+
+ In this series:
+
+ \begin{enumerate}
+ \item ~
\end{enumerate}
}
+ }
\fi
\ifx\lsSeries\dummyseries
\newcommand{\lsSeriesTitle}{~}
diff --git a/macros/xetex/latex/langsci/langsci-tbls.sty b/macros/xetex/latex/langsci/langsci-tbls.sty
index 3254843840..c7badb20b1 100644
--- a/macros/xetex/latex/langsci/langsci-tbls.sty
+++ b/macros/xetex/latex/langsci/langsci-tbls.sty
@@ -1,207 +1,304 @@
-%%% MDFRAMED STYLES DEFS %%%
+\ProvidesPackage{langsci-tbls}[2021/01/06 langsci-tbls]
-\usepackage[framemethod=tikz]{mdframed}
-\mdfsetup{skipabove=2\baselineskip,skipbelow=2\baselineskip,frametitlefont=\sffamily\bfseries\Large, needspace=4\baselineskip, splittopskip=1.5\baselineskip}
-\mdfsetup{apptotikzsetting={\tikzset{mdfbackground/.append style={draw=none}}}}
-\AtEndPreamble{% Check if the external library from tikz has been loaded in the preamble. If so, skip externalising for all mdframed boxes.
- \ifcsname tikz@library@external@loaded\endcsname
- \mdfsetup{settings={\tikzexternaldisable},endcode={\tikzexternalenable}}
- \fi
-}
-\newcommand{\langscisymbol}{book}
-\newlength{\trennlinie}
-\setlength{\trennlinie}{.8mm}
-\newcommand{\tblsboxcolor}{black}
-\newcommand{\tblslinecolour}{lsYellow}
+\RequirePackage{etoolbox}
+\newbool{langsci@tbls@tcolorbox}
+\booltrue{langsci@tbls@tcolorbox}
-\mdfdefinestyle{yellowexercise}{%
- everyline=true,
- ignorelastdescenders=true,
- middlelinewidth=1.5pt,linecolor=\tblslinecolour,outerlinewidth=5mm,
- innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=0,
- frametitleaboveskip=15mm, frametitlebelowskip=10mm,frametitlerule=false, repeatframetitle=false,
- firstextra={\node[xshift=5mm,right,draw=\tblslinecolour, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblslinecolour}\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.pdf}};}, % if environment is on multiple pages, print this on the first page.
- singleextra={\node[xshift=5mm,right,draw=\tblslinecolour, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblslinecolour}\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.pdf}};} % if env. does not span multiple pages, print the same.
-}
+\DeclareOption{mdframed}{\boolfalse{langsci@tbls@tcolorbox}}
+\DeclareOption{tcolorbox}{\booltrue{langsci@tbls@tcolorbox}}
+
+\ProcessOptions\relax
-\mdfdefinestyle{greyexercise}{%
+\ifbool{langsci@tbls@tcolorbox}
+ {
+ \PackageInfo{langsci-tbls}
+ {
+ langsci-tbls loaded with option `tcolorbox`.
+ }
+ \RequirePackage{tcolorbox}
+ \tcbuselibrary{breakable, skins, xparse}
+ \tcbset
+ {
+ skin = empty,
+ width = \linewidth,
+ breakable = true,
+ fonttitle = \sffamily\bfseries\Large,
+ coltitle = black,
+ graphical environment = tikzpicture,
+ sharp corners = all,
+ no shadow,
+ before upper = {\parindent=10.95pt\@afterheading\@afterindentfalse},
+ before = {\par\vskip\baselineskip\pagebreak[0]},
+ after = {\par}
+ }
+ \DeclareTColorBox{tblslineshorizontal}{m O{0.8mm} O{\lsSeriesColor}}
+ {
+ graphical environment = tikzpicture,
+ title = #1,
+ boxsep = 0pt,
+ toptitle = 5mm,
+ top = 5mm,
+ bottom = 5mm,
+ left = 0mm,
+ right = 0mm,
+ borderline horizontal = {#2}{0pt}{#3},
+ beforeafter skip balanced = \baselineskip
+ }
+ \DeclareTColorBox{tblsfilled}{m O{black!12}}
+ {
+ graphical environment = tikzpicture,
+ title = #1,
+ boxsep = 0pt,
+ toptitle = 5mm,
+ top = 5mm,
+ bottom = 5mm,
+ left = 5mm,
+ right = 5mm,
+ frame engine = path,
+ frame style = {fill=#2},
+ sharp corners = all
+ }
+ \DeclareTColorBox{tblsframed}{m O{0.8mm} O{\lsSeriesColor}}
+ {
+ graphical environment = tikzpicture,
+ title = #1,
+ boxsep = 0pt,
+ toptitle = 5mm,
+ top = 5mm,
+ bottom = 5mm,
+ left = 5mm,
+ right = 5mm,
+ borderline = {#2}{0pt}{#3},
+ beforeafter skip balanced = \baselineskip
+ }
+ \DeclareTColorBox{tblsfilledsymbol}{m O{black!12} m}
+ {
+ skin = enhanced,
+ graphical environment = tikzpicture,
+ title = #1,
+ boxsep = 0pt,
+ toptitle = 10mm,
+ top = 5mm,
+ bottom = 5mm,
+ left = 5mm,
+ right = 5mm,
+ frame style = {fill=#2},
+ interior hidden,
+ sharp corners = all,
+ enlarge top initially by = 5mm,
+ underlay unbroken and first =
+ {
+ \node
+ [
+ anchor = base,
+ xshift = 11.3mm,
+ yshift = -5mm,
+ fill = white,
+ draw = #2,
+ inner sep = 1mm,
+ line width = 0.8mm
+ ] at (frame.north west)
+ {{\color{#2}\includegraphics[width=10mm]{tbls-#3.pdf}}};
+ }
+ }
+ \DeclareTColorBox{tblsframedsymbol}{m O{\lsSeriesColor} O{0.8mm} m}
+ {
+ graphical environment = tikzpicture,
+ title = #1,
+ boxsep = 0pt,
+ toptitle = 10mm,
+ top = 5mm,
+ bottom = 5mm,
+ left = 5mm,
+ right = 5mm,
+ borderline = {#3}{0pt}{#2},
+ interior hidden,
+ enlarge top initially by = 5mm,
+ underlay unbroken and first =
+ {
+ \node
+ [
+ anchor = base,
+ xshift = 11.3mm,
+ inner sep = 1mm,
+ yshift = -5mm,
+ fill = white,
+ draw = #2,
+ line width = #3
+ ] at (frame.north west)
+ {{\color{#2}\includegraphics[width=10mm]{tbls-#4.pdf}}};
+ }
+ }
+ }
+
+\notbool{langsci@tbls@tcolorbox}
+ {
+ \PackageInfo{langsci-tbls}
+ {
+ langsci-tbls loaded with option `mdframed`.
+ }
+ \usepackage[framemethod=tikz]{mdframed}
+ \mdfsetup
+ {
+ skipabove=2\baselineskip,
+ skipbelow=2\baselineskip,
+ frametitlefont=\sffamily\bfseries\Large,
+ needspace=4\baselineskip,
+ splittopskip=\baselineskip,
+ apptotikzsetting={\tikzset{mdfbackground/.append style={draw=none}}}
+ }
+
+ \AtEndPreamble{% Check if the external library from tikz has been loaded in the preamble. If so, skip externalising for all mdframed boxes.
+ \ifcsname tikz@library@external@loaded\endcsname
+ \mdfsetup{settings={\tikzexternaldisable},endcode={\tikzexternalenable}}
+ \fi
+ }
+
+ \newcommand{\langscisymbol}{book}
+ \newlength{\trennlinie}
+ \setlength{\trennlinie}{.8mm}
+ \newcommand{\tblsboxcolor}{black}
+ \newcommand{\tblslinecolour}{lsYellow}
+
+ \mdfdefinestyle{yellowexercise}{%
everyline=true,
ignorelastdescenders=true,
- middlelinewidth=0pt,linecolor=white,outerlinewidth=5mm,
- leftline=false,rightline=false,bottomline=false,
+ middlelinewidth=1.5pt,
+ linecolor=\tblslinecolour,
+ outerlinewidth=5mm,
+ innerleftmargin=5mm,
+ innerrightmargin=5mm,
+ innerbottommargin=5mm,
+ innertopmargin=5mm,
+ frametitleaboveskip=10mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ firstextra={\node[xshift=5mm,right,draw=\tblslinecolour, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblslinecolour}\includegraphics[width=10mm]{tbls-\langscisymbol.pdf}};}, % if environment is on multiple pages, print this on the first page.
+ singleextra={\node[xshift=5mm,right,draw=\tblslinecolour, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblslinecolour}\includegraphics[width=10mm]{tbls-\langscisymbol.pdf}};} % if env. does not span multiple pages, print the same.
+ }
+
+ \mdfdefinestyle{greyexercise}{%
+ ignorelastdescenders=true,
+ middlelinewidth=0pt,
+ linecolor=white,
+ outerlinewidth=5mm,
+ leftline=false,
+ rightline=false,
+ bottomline=false,
backgroundcolor=\tblsboxcolor,
- innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=5mm,
- frametitleaboveskip=15mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false,
- firstextra={\node[xshift=5mm,right,draw=\tblsboxcolor, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblsboxcolor}\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.pdf}
- };},
- singleextra={\node[xshift=5mm,right,draw=\tblsboxcolor, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblsboxcolor}\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.pdf}
-};}
-}
-
-
-\mdfdefinestyle{tblsbox}{%
- leftline=false, rightline=false, frametitleaboveskip=10mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false, linewidth=\trennlinie, linecolor=\tblslinecolour, innerbottommargin=5mm, innertopmargin=5mm,innerleftmargin=0mm,innerrightmargin=0
- }
-
-\mdfdefinestyle{tblsframedbox}{%
- frametitleaboveskip=5mm, frametitlebelowskip=0mm,frametitlerule=false, repeatframetitle=false, linewidth=\trennlinie, linecolor=\tblslinecolour, innerbottommargin=5mm, innertopmargin=5mm
-}
-
-\newcommand{\tblsfillcolour}{black!12}
-\mdfdefinestyle{tblsfilledbox}{%
- hidealllines=true, backgroundcolor=\tblsfillcolour, frametitleaboveskip=5mm, frametitlebelowskip=0mm,frametitlerule=false, repeatframetitle=false, innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=5mm
-}
-
-\mdfdefinestyle{tblsfilledcolumnbox}{% % Copy of tblsfilledbox with multicols
- hidealllines=true, backgroundcolor=\tblsfillcolour, frametitleaboveskip=5mm, frametitlebelowskip=0mm,frametitlerule=false, repeatframetitle=false, innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=5mm,startinnercode={\begin{multicols}{2}},endinnercode={\end{multicols}}
-}
-
-\mdfdefinestyle{tblsframedcolumnbox}{%
- frametitleaboveskip=10mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false, linewidth=\trennlinie, linecolor=\tblsboxcolor, innerbottommargin=5mm, innertopmargin=5mm, startinnercode={\begin{multicols}{2}},endinnercode={\end{multicols}}
-}
-
-%%% MDFRAMED COMMANDS %%%
-
-\newcommand{\tblssy}[4][black!12]{% Use like this \tblsfr[colour]{book|bulb|glass|law}{title}{text}, where [colour] is optional
- \renewcommand{\langscisymbol}{#2}\renewcommand{\tblsboxcolor}{#1}
- \begin{mdframed}[style=greyexercise,frametitle={#3}]
+ innerleftmargin=5mm,
+ innerrightmargin=5mm,
+ innerbottommargin=5mm,
+ innertopmargin=5mm,
+ frametitleaboveskip=10mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ firstextra={\node[xshift=5mm,right,draw=\tblsboxcolor, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblsboxcolor}\includegraphics[width=10mm]{tbls-\langscisymbol.pdf}};},
+ singleextra={\node[xshift=5mm,right,draw=\tblsboxcolor, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{\tblsboxcolor}\includegraphics[width=10mm]{tbls-\langscisymbol.pdf}};}
+ }
+
+
+ \mdfdefinestyle{tblsbox}{%
+ leftline=false,
+ rightline=false,
+ frametitleaboveskip=5mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ linewidth=\trennlinie,
+ linecolor=\tblslinecolour,
+ innerbottommargin=5mm,
+ innertopmargin=5mm,
+ innerleftmargin=0mm,
+ innerrightmargin=0mm
+ }
+
+ \mdfdefinestyle{tblsframedbox}{%
+ frametitleaboveskip=5mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ linewidth=\trennlinie,
+ linecolor=\tblslinecolour,
+ innerbottommargin=5mm,
+ innertopmargin=5mm
+ }
+
+ \newcommand{\tblsfillcolour}{black!12}
+
+ \mdfdefinestyle{tblsfilledbox}{%
+ hidealllines=true,
+ backgroundcolor=\tblsfillcolour,
+ frametitleaboveskip=5mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ innerleftmargin=5mm,
+ innerrightmargin=5mm,
+ innerbottommargin=5mm,
+ innertopmargin=5mm
+ }
+
+ \mdfdefinestyle{tblsfilledcolumnbox}{% % Copy of tblsfilledbox with multicols
+ hidealllines=true,
+ backgroundcolor=\tblsfillcolour,
+ frametitleaboveskip=5mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ innerleftmargin=5mm,
+ innerrightmargin=5mm,
+ innerbottommargin=5mm,
+ innertopmargin=5mm,
+ startinnercode={\begin{multicols}{2}},
+ endinnercode={\end{multicols}}
+ }
+
+ \mdfdefinestyle{tblsframedcolumnbox}{%
+ frametitleaboveskip=10mm,
+ frametitlebelowskip=0mm,
+ frametitlerule=false,
+ repeatframetitle=false,
+ linewidth=\trennlinie,
+ linecolor=\tblsboxcolor,
+ innerbottommargin=5mm,
+ innertopmargin=5mm,
+ startinnercode={\begin{multicols}{2}},
+ endinnercode={\end{multicols}}
+ }
+
+ %%% MDFRAMED DOCUMENT COMMANDS %%%
+
+ \newcommand{\tblssy}[4][black!12]{% Use like this \tblsfr[colour]{book|bulb|glass|law}{title}{text}, where [colour] is optional
+ \renewcommand{\langscisymbol}{#2}\renewcommand{\tblsboxcolor}{#1}
+ \begin{mdframed}[style=greyexercise,frametitle={#3}]
+ #4
+ \end{mdframed}
+ }
+ \newcommand{\tblsli}[4][black!20]{% Use like this \tblsli[colour]{line width}{title}{text}
+ \renewcommand{\tblsboxcolor}{#1}\setlength{\trennlinie}{#2mm}
+ \begin{mdframed}[style=tblsbox,frametitle={#3}]
#4
- \end{mdframed}
-}
-
-\newcommand{\tblsli}[4][black!20]{% Use like this \tblsli[colour]{line width}{title}{text}
-\renewcommand{\tblsboxcolor}{#1}\setlength{\trennlinie}{#2mm}
-\begin{mdframed}[style=tblsbox,frametitle={#3}]
-#4
-\end{mdframed}
-}
-
-\newcommand{\tblsfi}[3][black!12]{% Use like this \tblsfi[colour]{title}{text}, where [colour] is optional
-\renewcommand{\tblsfillcolour}{#1}
-\begin{mdframed}[style=tblsfilledbox,frametitle={#2}]
-#3
-\end{mdframed}
-}
-
-\newcommand{\tblsfr}[4][\lsSeriesColor]{% Use like this \tblsfr[colour]{book|bulb|glass|law}{title}{text}, where [colour] is optional
-\renewcommand{\tblslinecolour}{#1}\renewcommand{\langscisymbol}{#2}
-\begin{mdframed}[style=tblsbox,frametitle={#3}]
-#4
-\end{mdframed}
-}
-
-\newcommand{\tblsfd}[4]{ % Use like this: \tblsfd{colour}{line width}{title}{content}
-\renewcommand{\tblslinecolour}{#1}\setlength{\trennlinie}{#2mm}
-\begin{mdframed}[style=tblsframedbox,frametitle={#3}]
-#4
-\end{mdframed}
-}
-
-%%% MDFRAMED END %%%
-
-
-\newcommand{\tblsbwbox}[4][]{%
-\\
- \noindent
- \colorbox{#2}{
-\parbox{.97\textwidth}{
-\centering
-\parbox{.9\textwidth}{
-
- %add logo if requested
- \ifthenelse{\equal{#1}{}}{\bigskip}{
- \begin{flushleft}
- \hspace*{3.5mm} \raisebox{0mm}[0mm][0mm]{\color{white}\includegraphics[width=10mm]{langsci/graphics/#1.eps}}
- \end{flushleft}}
- %add header
- \boxheader{#3}
- \begin{multicols*}{2}
+ \end{mdframed}
+ }
+ \newcommand{\tblsfi}[3][black!12]{% Use like this \tblsfi[colour]{title}{text}, where [colour] is optional
+ \renewcommand{\tblsfillcolour}{#1}
+ \begin{mdframed}[style=tblsfilledbox,frametitle={#2}]
+ #3
+ \end{mdframed}
+ }
+ \newcommand{\tblsfr}[4][\lsSeriesColor]{% Use like this \tblsfr[colour]{book|bulb|glass|law}{title}{text}, where [colour] is optional
+ \renewcommand{\tblslinecolour}{#1}\renewcommand{\langscisymbol}{#2}
+ \begin{mdframed}[style=tblsbox,frametitle={#3}]
#4
- \end{multicols*}
- \bigskip
+ \end{mdframed}
}
-}
-}
-\\[1em]
-}
-
-
-
-\newcommand{\tblsbwboxdark}[3][]{%
- \noindent
- \tblsbwbox[#1]{gray}{#2}{#3}
-}
-
-\newcommand{\tblsbwboxlight}[3][]{%
- \noindent
- \tblsbwbox[#1]{lightgray}{#2}{#3}
-}
-
-\newcommand{\tblscolboxdark}[3][]{%
- \tblsbwboxdark[#1]{#2}{#3}
-}
-
-\newcommand{\tblscolboxlight}[3][]{%
- \tblsbwboxlight[#1]{#2}{#3}
-}
-
-
-\newcommand{\tblsthinline}{\rule{\textwidth}{.8mm}}
-\newcommand{\tblsthickline}{{\color{gray}\rule{\textwidth}{1.5mm}}}
-\newcommand{\tblsthickcolorline}{{\color{lsYellow}\rule{\textwidth}{1.5mm}}}
-
-\newcommand{\tblssandwich}[3]{
-% \\
-
-\medskip
-\noindent
-#1
-\\[2em]
-\boxheader{#2}
-\\[1em]
-\noindent%
-#3
-\smallskip
-\noindent
-#1
-\\[1em]
-}
-
-\newcommand{\tblsbwthinsandwich}[2]{
- \tblssandwich{\tblsthinline}{#1}{#2}
-}
-
-\newcommand{\tblsbwthicksandwich}[2]{
- \tblssandwich{\tblsthickline}{#1}{#2}
-}
-
-\newcommand{\tblscolthicksandwich}[2]{
- \tblssandwich{\tblsthickcolorline}{#1}{#2}
-}
-
-\newcommand{\tblscolthinsandwich}[2]{
- \tblssandwich{\tblsthinline}{#1}{#2}
-}
-
-\newcommand{\tblscolframebox}[3][]{
- \fboxrule.8mm
- \noindent
- \begin{figure}
- \begin{flushleft}
- \hspace*{3.5mm}
- \raisebox{-10mm}[0mm][0mm]{\ifthenelse{\equal{#1}{}}{}{\includegraphics[width=10mm]{langsci/graphics/#1.eps}}} \\
- \end{flushleft}
- \color{lsYellow}\framebox[\textwidth]{%
- \color{black}
- \parbox{.92\textwidth}{%
- \vspace*{.5cm}
- \boxheader{#2}
- \begin{multicols*}{2}
- #3
- \end{multicols*}
- }
+ \newcommand{\tblsfd}[4]{ % Use like this: \tblsfd{colour}{line width}{title}{content}
+ \renewcommand{\tblslinecolour}{#1}\setlength{\trennlinie}{#2mm}
+ \begin{mdframed}[style=tblsframedbox,frametitle={#3}]
+ #4
+ \end{mdframed}
}
- \end{figure}
-}
-
-\newcommand{\boxheader}[1]{\medskip{\Large\bfseries\sffamily #1}}
+ }{}
diff --git a/macros/xetex/latex/langsci/langsci-textipa.sty b/macros/xetex/latex/langsci/langsci-textipa.sty
index 90e2d97d27..f931fc8faa 100644
--- a/macros/xetex/latex/langsci/langsci-textipa.sty
+++ b/macros/xetex/latex/langsci/langsci-textipa.sty
@@ -1,12 +1,208 @@
%Unicode versions of the TIPA \text... commands
-
\renewcommand{\textltailn}{ɲ}
\renewcommand{\textbardotlessj}{ɟ}
\renewcommand{\textlengthmark}{ː}
-\renewcommand{\textrtaild}{ɖ}
+\renewcommand{\textbabygamma}{\textramshorns} %babygamma obsolete
+\newcommand{\textbarb}{b̵}
+\newcommand{\textbarc}{c̵}
+\newcommand{\textbard}{d̵}
+\newcommand{\textbarg}{g̵}
+\renewcommand{\textbarglotstop}{ʡ}
+\renewcommand{\textbari}{ɨ}
+\renewcommand{\textbarl}{ł}
+\renewcommand{\textbaro}{ɵ}
+\renewcommand{\textbarrevglotstop}{ʢ}
+\renewcommand{\textbaru}{ʉ}
+\renewcommand{\textbeltl}{ɬ}
+\renewcommand{\textcloseepsilon}{ʚ}
+\renewcommand{\textcloseomega}{ɷ}
+\renewcommand{\textcloserevepsilon}{ɞ}
+\renewcommand{\textcrb}{ƀ}
+\renewcommand{\textcrd}{đ}
+\newcommand{\textcrg}{ǥ}
+\newcommand{\textcrh}{ħ}
+\renewcommand{\textcrlambda}{ƛ}
+\renewcommand{\textctc}{ɕ}
+\renewcommand{\textctd}{ȡ}
+% \newcommand{\textctdctzlig}{}%Curly-tail D-Curly-tail Z ligature
+\renewcommand{\textctesh}{ʆ}
+\renewcommand{\textctj}{ʝ}
+\renewcommand{\textctn}{ȵ}
+\renewcommand{\textctt}{}
+% \newcommand{\textcttctclig}{}%Curly-tail T-Curly-tail C ligature
+\renewcommand{\textctyogh}{ʓ}
+\renewcommand{\textctz}{ʑ}
+\renewcommand{\textdctzlig}{ʥ}
+\newcommand{\textdoublebaresh}{ʃ =}
+\renewcommand{\textdoublebarpipe}{ǂ}
+\newcommand{\textdoublebarslash}{≠}%I just used the "not equal" sign.
+\renewcommand{\textdoublegrave}{̏}
+\renewcommand{\textdoublepipe}{ǁ}
+\newcommand{\textdoublevbaraccent}{̎}%Please check
+\newcommand{\textdoublevertline}{‖}
+% \newcommand{\textdownarrow}{↓}
+\renewcommand{\textdownstep}{ꜜ}
+\renewcommand{\textdyoghlig}{ʤ}
+\renewcommand{\textdzlig}{ʣ}
+\newcommand{\texteng}{ŋ}
+\renewcommand{\textepsilon}{ɛ}
+\renewcommand{\textesh}{ʃ}
+\newcommand{\texteth}{ð}
+\newcommand{\textezh}{ȝ}
+\newcommand{\textfallrise}{᷉}
+\renewcommand{\textfishhookr}{ɾ}
+\newcommand{\textg}{ɡ}
+\renewcommand{\textgamma}{ɣ}
+\newcommand{\textglobfall}{↘}
+\newcommand{\textglobrise}{↗}
+\renewcommand{\textglotstop}{ʔ}
+% \newcommand{\textgreek}{}
+\renewcommand{\texthalflength}{ˑ}
+% \newcommand{\texthighdropa}{}
+\newcommand{\texthighrise}{᷄}
+\newcommand{\texthighriseo}{o᷄}
+\newcommand{\texthighriseu}{u᷄}
+% \newcommand{\texthmlig}{}%H-M ligature
+\newcommand{\texthooktop}{̉}%Might be wrong, facing left.
+\renewcommand{\texthtb}{ɓ}
+\renewcommand{\texthtc}{ƈ}
+\renewcommand{\texthtd}{ɗ}
+\renewcommand{\texthtg}{ɠ}
+\renewcommand{\texthth}{ɦ}
+\renewcommand{\texththeng}{ɧ}
+\renewcommand{\texthtk}{ƙ}
+\renewcommand{\texthtp}{ƥ}
+\renewcommand{\texthtq}{ʠ}
+\renewcommand{\texthtrtaild}{ᶑ}
+\renewcommand{\texthtscg}{ʛ}
+\renewcommand{\texthtt}{ƭ}
+\renewcommand{\texthvlig}{ƕ}
+% \newcommand{\texti}{}%Plain i?
+\renewcommand{\textinvglotstop}{ʖ}
+\renewcommand{\textinvscr}{ʁ}
+% \newcommand{\textless}{}
+\renewcommand{\textlhookt}{ƫ}
+% \newcommand{\textlhtlongi}{}
+% \newcommand{\textlhtlongy}{}
+\renewcommand{\textlonglegr}{ɼ}
+\newcommand{\textlowering}{̞}
+\newcommand{\textlowrise}{᷅}
+% \newcommand{\textlowrisea}{}
+% \newcommand{\textlptr}{}
+\renewcommand{\textltailm}{ɱ}
+\renewcommand{\textltilde}{ɫ}
+\renewcommand{\textlyoghlig}{ɮ}
+% \newcommand{\textmidacute}{}%Same as texthighrise?
\renewcommand{\textopeno}{ɔ}
-\renewcommand{\textepsilon}{ɛ​}
+\newcommand{\textovercross}{̽}
+% \newcommand{\textoverw}{}
+\newcommand{\textpalhook}{̡}
+% \newcommand{\textpm}{±}
+\newcommand{\textpolhook}{̨}
+% \newcommand{\textpos}{}
+\renewcommand{\textprimstress}{ˈ}
+% \newcommand{\textr}{}
+\renewcommand{\textraiseglotstop}{ˀ}
+% \newcommand{\textraisevibyi}{}
+\newcommand{\textraising}{̝}
+\newcommand{\textramshorns}{ɤ}
+\newcommand{\textretracting}{̙}
+% \newcommand{\textrevapostrophe}{}
+\renewcommand{\textreve}{ɘ}
+\renewcommand{\textrevepsilon}{ɜ}
+\renewcommand{\textrevglotstop}{ʕ}
+\renewcommand{\textrevyogh}{ʢ}
+\renewcommand{\textrho}{ρ}
+\renewcommand{\textrhookrevepsilon}{ɝ}
+\renewcommand{\textrhookschwa}{ɚ}
+\newcommand{\textrhoticity}{˞}
+% \newcommand{\textrig}{}
+% \newcommand{\textrigh}{}
+\newcommand{\textringmacron}{̄̊}
+\newcommand{\textrisefall}{᷈}
+\newcommand{\textroundcap}{̑}
+\renewcommand{\textrptr}{͐}
+\renewcommand{\textrtaild}{ɖ}
+\renewcommand{\textrtaill}{ɭ}
+\renewcommand{\textrtailn}{ɳ}
+\renewcommand{\textrtailr}{ɽ}
+\renewcommand{\textrtails}{ʂ}
+\renewcommand{\textrtailt}{ʈ}
+\renewcommand{\textrtailz}{ʐ}
+\newcommand{\textrthook}{̢}%Please check!
+\renewcommand{\textsca}{ᴀ}
+\renewcommand{\textscb}{ʙ}
+\renewcommand{\textsce}{ᴇ}
+\renewcommand{\textscg}{ɢ}
+\renewcommand{\textsch}{ʜ}
\renewcommand{\textschwa}{ə}
-\renewcommand{\textdoublegrave}[1]{̏#1}
-
-
+\renewcommand{\textsci}{ɪ}
+\renewcommand{\textscj}{ᴊ}
+\renewcommand{\textscl}{ʟ}
+\renewcommand{\textscn}{ɴ}
+\renewcommand{\textscoelig}{ɶ}
+\newcommand{\textscomega}{ꭥ}
+\renewcommand{\textscr}{ʀ}
+\renewcommand{\textscripta}{ɑ}
+\renewcommand{\textscriptg}{ɡ}
+\renewcommand{\textscriptv}{ʋ}
+\newcommand{\textscs}{ꜱ}
+\newcommand{\textsct}{ᴛ}
+\renewcommand{\textscu}{ᴜ}
+\renewcommand{\textscy}{ʏ}
+\newcommand{\textseagull}{̼}
+\renewcommand{\textsecstress}{ˌ}
+\renewcommand{\textsigma}{}
+% \newcommand{\textstretchc}{}%\newcommand{\textstretchcvar}{ʗ}
+% \newcommand{\textsu}{}
+\newcommand{\textsubacute}{̗}
+\newcommand{\textsubarch}{̯}
+\newcommand{\textsubbar}{̠}
+\newcommand{\textsubbridge}{̪}
+\renewcommand{\textsubcircum}{̭}
+\newcommand{\textsubdot}{̣}
+\newcommand{\textsubgrave}{̖}
+\newcommand{\textsublhalfring}{̜}
+\newcommand{\textsubplus}{̟}
+\newcommand{\textsubrhalfring}{̹}
+\renewcommand{\textsubring}{̥}
+% \newcommand{\textsubsc}{}
+\newcommand{\textsubsquare}{̻}
+\renewcommand{\textsubtilde}{̰}
+\renewcommand{\textsubumlaut}{̤}
+\newcommand{\textsubw}{̫}
+\newcommand{\textsubwedge}{̬}
+% \newcommand{\textsup}{}
+\newcommand{\textsuperimposetilde}{̴}
+\newcommand{\textsyllabic}{̩}
+\renewcommand{\texttctclig}{ʨ}
+\renewcommand{\textteshlig}{ʧ}
+\renewcommand{\textthorn}{þ}
+\newcommand{\texttildedot}{̇̃}
+% \newcommand{\texttoneletterstem}{}%Vertical bar but which one?
+\newcommand{\texttoptiebar}{͡}
+\renewcommand{\texttslig}{ʦ}
+% \newcommand{\textttf}{}
+\renewcommand{\textturna}{ɐ}
+% \newcommand{\textturncelig}{}%Turned C (Open O)-E ligature
+\renewcommand{\textturnh}{ɥ}
+\renewcommand{\textturnk}{ʞ}
+\renewcommand{\textturnlonglegr}{ɼ}
+\renewcommand{\textturnm}{ɯ}
+\renewcommand{\textturnmrleg}{ɰ}
+\renewcommand{\textturnr}{ɹ}
+\renewcommand{\textturnrrtail}{ɻ}
+\renewcommand{\textturnscripta}{ɒ}
+\renewcommand{\textturnt}{ʇ}
+\renewcommand{\textturnv}{ʌ}
+\renewcommand{\textturnw}{ʍ}
+\renewcommand{\textturny}{ʎ}
+% \newcommand{\texttw}{}
+\renewcommand{\textupstep}{ꜛ}
+% \newcommand{\texture}{}
+\newcommand{\textvbaraccent}{̍}
+\newcommand{\textvertline}{|}
+\renewcommand{\textvibyi}{ʅ}
+% \newcommand{\textvibyy}{}%ʯ? Not sure.
+\renewcommand{\textwynn}{ƿ}
+\renewcommand{\textyogh}{ʒ}
diff --git a/macros/xetex/latex/langsci/langsci-unified.bbx b/macros/xetex/latex/langsci/langsci-unified.bbx
index d1de5302ee..576cf1d286 100644
--- a/macros/xetex/latex/langsci/langsci-unified.bbx
+++ b/macros/xetex/latex/langsci/langsci-unified.bbx
@@ -16,10 +16,9 @@
%%% The Current Maintainer of this work is Sebastian Nordhoff.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{biblatex-sp-unified.bbx}
+\ProvidesFile{langsci-unified.bbx}
% NB: The Unified Style Sheet wants abbreviated "ed(s)", "edn". But using the abbreviate option also abbreviates the names of months. But then dateabbrev=false restores the long names of months
-% biblatex has a "useprefix" option, which makes "von" count for alphabetization; the Unified Stylesheet does not want that, so it is important that this option be disabled (even if an author tries to set it to true)
% For backward compatibility: choose labeldate or labeldateparts depending on the biblatex version
\@ifpackagelater{biblatex}{2016/09/09}
@@ -31,7 +30,7 @@
\def\printlabeldateextra{\printdateextralabel}
}%
-\ExecuteBibliographyOptions{sorting=nyt,abbreviate,dateabbrev=false,useprefix=false}
+\ExecuteBibliographyOptions{sorting=nyt,abbreviate,dateabbrev=false,useprefix=true}
% biblatex by default calls biblatex.def, we add to this authoryear.bbx, which in turn loads standard.bbx. So, sp-biblatex.bbx is built on top of those styles; once authoryear.bbx is loaded, we tell it not to put in dashes for repeated authors (in accordance with the Unified Stylesheet)
@@ -64,7 +63,6 @@
% In biblatex v3.3 and onwards, the name formatting has changed in a big way. See for example: http://tex.stackexchange.com/questions/299036/biblatex-3-3-name-formatting, https://github.com/plk/biblatex/issues/372, and http://www.texdev.net/2016/03/13/biblatex-a-new-syntax-for-declarenameformat/. The name formats in biblatex.def are not called first-last etc. anymore but given-family etc. And while there are safeguard legacy aliases (\DeclareNameAlias{first-last}{given-family}, for example), the new formats then use macros like \usebibmacro{name:family-given}, which of course our old redefinitions didn't adjust. So, for newer biblatex, we need to do new versions of \renewbibmacro{name:...}.
%% Redefinitions of name:last and name:last-first for old biblatex
-
\renewbibmacro*{name:last}[4]{%
\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
@@ -150,7 +148,7 @@
% Various bibmacros used in producing the bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\renewbibmacro*{date+extrayear}{%
+\newbibmacro*{date+extradate}{%
\iffieldundef{labelyear}
{}
{\printtext{\printlabeldateextra}}}% Took out the parentheses around the year
@@ -175,7 +173,7 @@
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\newunit}% period instead of space
- \usebibmacro{date+extrayear}}
+ \usebibmacro{date+extradate}}
\renewbibmacro*{editor}{%
\usebibmacro{bbx:editor}{editorstrg}}
@@ -198,7 +196,7 @@
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\newunit}% period instead of space
- \usebibmacro{date+extrayear}}
+ \usebibmacro{date+extradate}}
\renewbibmacro*{translator}{%
\usebibmacro{bbx:translator}{translatorstrg}}
@@ -221,7 +219,7 @@
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\newunit}% period instead of space
- \usebibmacro{date+extrayear}}
+ \usebibmacro{date+extradate}}
\renewbibmacro*{journal}{%
\iffieldundef{journaltitle}
@@ -433,7 +431,7 @@
\renewcommand{\intitlepunct}{\addspace}
-\renewcommand{\subtitlepunct}{\addcolon\space}
+\renewcommand*{\subtitlepunct}{\addcolon\space}
\renewcommand*{\bibpagespunct}{\newunitpunct} % No comma before pages, just the usual new unit period
\DefineBibliographyStrings{english}{%
@@ -452,9 +450,10 @@
\DeclareFieldFormat{pages}{#1} % no pp. prefix, took \mkpageprefix out [kvf]
\DeclareFieldFormat{doi}{%
+ {\color{lsDOIGray}DOI\addcolon\space
\ifhyperref
- {\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}}
- {\nolinkurl{https://doi.org/#1}}}
+ {\href{https://doi.org/#1}{\nolinkurl{#1}}}
+ {\nolinkurl{#1}}}}
\DeclareFieldFormat{url}{\url{#1}}
% This is for printing the volume field of a proceedings with an ISSN as an article
@@ -729,8 +728,3 @@
\DeclareFieldFormat{postnote}{#1}% display pages without page prefix (p., pp.)
\DeclareBibliographyAlias{inbook}{incollection}% see https://github.com/semprag/biblatex-sp-unified/issues/35
\DeclareFieldFormat[techreport,report,misc]{titlecase}{\MakeSentenceCase*{#1}}% techreport/report and misc are not genuinely supported by biblatex-sp-unified
-%% The note field should appear at end of an entry just before the DOI, other than with the used bibliography style. It is therefore first removed, then again restored and included together with the DOI.
-\AtEveryBibitem{%
- \savefield*{note}{\lsnote}%
- \clearfield{note}%
-}
diff --git a/macros/xetex/latex/langsci/langsci-unified.cbx b/macros/xetex/latex/langsci/langsci-unified.cbx
index d944237795..2d569fc575 100644
--- a/macros/xetex/latex/langsci/langsci-unified.cbx
+++ b/macros/xetex/latex/langsci/langsci-unified.cbx
@@ -1,8 +1,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% File: langscibook.cls
-%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2020-03-17 13:12 UTC
-%% Purpose: An implementation of the Unified Style Sheet for Linguistics bibliographies (https://www.linguisticsociety.org/resource/unified-style-sheet).
-%% This work is based on the styles provided by Semantics \& Pragmatics
+%% Author: Language Science Press (http://langsci-press.org)
+%% Date: 2019-03-06 13:12 UTC
+%% Purpose: An implementation of the Unified Style Sheet for Linguistics bibliographies (https://www.linguisticsociety.org/resource/unified-style-sheet).
+%% This work is based on the styles provided by Semantics \& Pragmatics
%% Language: LaTeX
%% Copyright 2017- Language Science Press
%% Licence: This work may be distributed and/or modified under the
@@ -16,7 +16,7 @@
%%% The Current Maintainer of this work is Sebastian Nordhoff.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{sp-authoryear-comp.cbx}
+\ProvidesFile{langsci-unified.cbx}
% For backward compatibility: choose labeldate or labeldateparts depending on the biblatex version
\@ifpackagelater{biblatex}{2016/09/09}
@@ -52,9 +52,9 @@
\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
\(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
{\setunit{\addcomma}%
- \usebibmacro{cite:extrayear}}
+ \usebibmacro{cite:extradate}}
{\setunit{\compcitedelim}%
- \usebibmacro{cite:labelyear+extrayear}%
+ \usebibmacro{cite:labelyear+extradate}%
\savefield{labelyear}{\cbx@lastyear}}}
\newbibmacro*{cite}{% Based on cite bib macro from authoryear-comp.cbx
@@ -64,7 +64,7 @@
\DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
\usebibmacro{cite:label}%
\setunit{\addspace}%
- \usebibmacro{cite:labelyear+extrayear}}%
+ \usebibmacro{cite:labelyear+extradate}}%
\usebibmacro{cite:reinit}}
{\iffieldequals{namehash}{\cbx@lasthash}
{\usebibmacro{labelyearrepeat}}
@@ -72,7 +72,7 @@
\DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
\printnames{labelname}%
\setunit{\nameyeardelim}%
- \usebibmacro{cite:labelyear+extrayear}}%
+ \usebibmacro{cite:labelyear+extradate}}%
\savefield{namehash}{\cbx@lasthash}%
\savefield{labelyear}{\cbx@lastyear}}}}
{\usebibmacro{cite:shorthand}%
@@ -86,7 +86,7 @@
\usebibmacro{cite:reinit}}
{\iffieldequals{namehash}{\cbx@lasthash}
{\usebibmacro{labelyearrepeat}}
- {\usebibmacro{cite:labelyear+extrayear}%
+ {\usebibmacro{cite:labelyear+extradate}%
\savefield{namehash}{\cbx@lasthash}%
\savefield{labelyear}{\cbx@lastyear}}}}
{\usebibmacro{cite:shorthand}%
@@ -111,7 +111,7 @@
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
- \usebibmacro{cite:labelyear+extrayear}}
+ \usebibmacro{cite:labelyear+extradate}}
{\usebibmacro{cite:shorthand}}%
\ifthenelse{\iffieldundef{postnote}\AND
\(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
@@ -130,7 +130,7 @@
\iffieldundef{shorthand}
{\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
- {\usebibmacro{cite:labelyear+extrayear}}%
+ {\usebibmacro{cite:labelyear+extradate}}%
\savefield{labelyear}{\cbx@lastyear}}
{\usebibmacro{cite:shorthand}%
\global\undef\cbx@lastyear}%
@@ -164,7 +164,7 @@
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
- \usebibmacro{cite:labelyear+extrayear}}
+ \usebibmacro{cite:labelyear+extradate}}
{\usebibmacro{cite:shorthand}}%
\ifthenelse{\iffieldundef{postnote}\AND
\(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
@@ -183,7 +183,7 @@
\iffieldundef{shorthand}
{\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
- {\usebibmacro{cite:labelyear+extrayear}}%
+ {\usebibmacro{cite:labelyear+extradate}}%
\savefield{labelyear}{\cbx@lastyear}}
{\usebibmacro{cite:shorthand}%
\global\undef\cbx@lastyear}%
@@ -207,15 +207,15 @@
{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\printtext[bibhyperref]{\printfield{label}}}}
-\newbibmacro*{cite:labelyear+extrayear}{%
+\newbibmacro*{cite:labelyear+extradate}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{\printlabeldateextra}}}
-\newbibmacro*{cite:extrayear}{%
- \iffieldundef{extrayear}
+\newbibmacro*{cite:extradate}{%
+ \iffieldundef{extradate}
{}
- {\printtext[bibhyperref]{\printfield{extrayear}}}}
+ {\printtext[bibhyperref]{\printfield{extradate}}}}
\newbibmacro*{textcite:postnote}{%
\usebibmacro{postnote}%
@@ -293,7 +293,7 @@
\usebibmacro{textcite}}
{}
{\usebibmacro{textcite:postnote}}
-
+
% "This volume" citation commands
\DeclareCiteCommand{\citetv}
{\usebibmacro{prenote}}
@@ -303,7 +303,7 @@
\printtext[bibhyperref]{\printnames{labelname}\addspace\printfield{year}}}
{\multicitedelim}
{\printtext[bibhyperref]{\usebibmacro{postnote}\addspace[this volume]}}
-
+
\DeclareCiteCommand{\textcitetv}
{\usebibmacro{prenote}}
{\ifciteindex
@@ -312,7 +312,7 @@
\printtext[bibhyperref]{\printnames{labelname}\addspace\bibopenparen\printfield{year}}}
{\multicitedelim}
{\printtext[bibhyperref]{\usebibmacro{postnote}\addspace[this volume]\bibcloseparen}}
-
+
\DeclareCiteCommand{\parencitetv}
{\usebibmacro{prenote}}
{\ifciteindex
@@ -321,6 +321,38 @@
\printtext[bibhyperref]{\bibopenparen\printnames{labelname}\addspace\printfield{year}}}
{\multicitedelim}
{\printtext[bibhyperref]{\usebibmacro{postnote}\addspace[this volume]\bibcloseparen}}
+
+% A cite command to produce the full reference in the footer of the landing page of
+% a paper in an edited volume
+
+\DeclareCiteCommand{\fullciteFooter}
+ {\defcounter{maxnames}{\blx@maxbibnames}%
+ \usebibmacro{prenote}}
+ {\usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\fullciteImprint}
+ {\defcounter{maxnames}{\blx@maxbibnames}%
+ \usebibmacro{prenote}%
+ \DeclarePunctuationPairs{colon}{*}}
+ {\usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}\adddot}
+
+\DeclareCiteCommand{\CiteFullAuthorList}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \defcounter{maxnames}{\blx@maxbibnames}%
+ \usebibmacro{prenote}}
+ {\DeclareNameAlias{labelname}{first-last}%%
+ \printnames{labelname}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
@@ -330,26 +362,6 @@
{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\textcites}{\textcite}{}
-\renewcommand*{\nameyeardelim}{\addspace}
-
-\let\citealt\cite
-\let\citet\textcite
-\let\citep\parencite
-\let\citepv\parencitetv
-\let\Citet\Textcite
-\newcommand{\pgcitep}[2]{(\cite{#1}:~#2)}
-\newcommand{\pgcitealt}[2]{\cite{#1}:~#2}
-\newcommand{\pgcitet}[2]{\citeauthor{#1} (\citeyear{#1}:~#2)}
-\newcommand{\pgposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~#2)}
-\newcommand{\seccitealt}[2]{\cite{#1}:~$\S$#2}
-\newcommand{\seccitep}[2]{(\cite{#1}:~$\S$#2)}
-\newcommand{\seccitet}[2]{\citeauthor{#1} (\citeyear{#1}:~$\S$#2)}
-\newcommand{\secposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~$\S$#2)}
-
-\renewcommand*{\postnotedelim}{\addcolon\space}
-\DeclareFieldFormat{postnote}{#1}
-\DeclareFieldFormat{multipostnote}{#1}
-
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
@@ -365,7 +377,7 @@
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
- {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extrayear}}}
+ {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extradate}}}
{\multicitedelim}
{\usebibmacro{postnote}}
@@ -373,7 +385,7 @@
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
- {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extrayear}}}
+ {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extradate}}}
{\multicitedelim}
{\usebibmacro{postnote}}
@@ -387,7 +399,7 @@
\DeclareCiteCommand{\posscitealt}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}}
- {\printtext[bibhyperref]{\printnames{labelname}'s \iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extrayear}}}
+ {\printtext[bibhyperref]{\printnames{labelname}'s \iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extradate}}}
{}
{}
@@ -398,12 +410,12 @@
{}
{}
-\renewcommand*{\multicitedelim}{\addcomma\space}
-
%% changes of citestyle (cbx) (FIXME: documentation missing)
-\renewcommand{\postnotedelim}{: }%
+\renewcommand*{\nameyeardelim}{\addspace}
+\renewcommand*{\postnotedelim}{\addcolon\space}
+\DeclareFieldFormat{postnote}{#1}
+\DeclareFieldFormat{multipostnote}{#1}
\renewcommand{\multicitedelim}{\addsemicolon\space}%
\renewcommand{\compcitedelim}{\multicitedelim}
-% \renewcommand{\nameyeardelim}{ }%
\endinput
diff --git a/macros/xetex/latex/langsci/langscibook.cls b/macros/xetex/latex/langsci/langscibook.cls
index fc9a0dcd8e..3f051f1fcd 100644
--- a/macros/xetex/latex/langsci/langscibook.cls
+++ b/macros/xetex/latex/langsci/langscibook.cls
@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% File: langscibook.cls
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2018-08-29 13:12 UTC
+%% Date: 2021-03-17 18:00 CET
%% Purpose: This file defines the basic document class
%% for books published with Language Science Press.
%% Language: LaTeX
@@ -17,13 +17,13 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Structure of this file:
% \- Early load packages
-% \- Paths
% \- Default values of variables
% \- Definition of conditionals
% \- Option handling
+% \- Output variables
% \- MAIN CLASS
% \- General packages
-% \- print on demand macros
+% \- Covers
% \- Output types (book, draft, cover)
% \- Page geometry
% \- Fonts
@@ -48,7 +48,7 @@
% \_ Miscellaneous
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{langscibook}[2020/02/12 Language Science Press]
+\ProvidesClass{langscibook}[2021/03/17 Language Science Press]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Early load packages
@@ -56,25 +56,16 @@
\RequirePackage[]{silence}
\WarningsOff[hyperref]
-\WarningsOff[tocstyle]
\WarningsOff[microtype]
\WarningFilter{microtype}{Unknown slot}
\WarningFilter{scrbook}{package incompatibility}
-\typeout{Warnings are disabled in langscibook.cls for hyperref, tocstyle, microtype and scrbook package incompatibility}
+\WarningFilter{todonotes}{The length}
+\WarningFilter{biblatex}{'babel/polyglossia'}
+\hbadness=99999 % get rid of underfull box warnings
+\typeout{Warnings are disabled in langscibook.cls for underfull boxes, hyperref, microtype and scrbook package incompatibility, todonotes length and babel/polyglossia csquotes}
\usepackage{etoolbox}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Paths
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \newcommand{\fontpath}{}
-% \newcommand{\logopath}{}
-% \newcommand{\seriesinfopath}{}
-% \newcommand{\localepath}{}
-% \newcommand{\bibstylepath}{}
-% \newcommand{\bbxpath}{}
-% \newcommand{\cbxpath}{}
-% \newcommand{\stylepath}{}
-% Paths can be overwritten with option "nonflat"
+\RequirePackage{xparse}
+\usepackage{langsci-affiliations}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Default values
@@ -114,9 +105,14 @@
\newcommand{\newlineCover}{\\} % \newline only on cover
\newcommand{\newlineSpine}{\\} % \newline only on spine
\newcommand{\newlineTOC}{\\} % \newline only in TOC entry
+\newcommand{\affiliation}[1]{} % A dummy command to process the affiliation info.
\newcommand{\lsSpineTitle}{\@title}
-\newcommand{\lsSpineAuthor}{\@author}
+\newcommand{\lsSpineAuthor}
+ {%
+ \ResolveAffiliations[output affiliation=false,
+ output authors font=\lsSpineAuthorFont]{\@author}%
+ }
\newcommand{\SpineTitle}[1]{\renewcommand{\lsSpineTitle}{#1}}
\newcommand{\SpineAuthor}[1]{\renewcommand{\lsSpineAuthor}{#1}}
@@ -131,31 +127,31 @@
% Conditionals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\iflsDraft \lsDraftfalse
-\newif\iflsOpenReview \lsOpenReviewfalse
-\newif\iflsResetCapitals \lsResetCapitalsfalse
-\newif\iflsShowIndex \lsShowIndexfalse
-\newif\iflsBiblatex \lsBiblatextrue
-\newif\iflsCollection \lsCollectionfalse
-\newif\iflsCollectionChapter \lsCollectionChapterfalse
-\newif\iflsCollectionTOCLong \lsCollectionTOCLongfalse
-\newif\iflsNewtxmath \lsNewtxmathfalse
-\newif\iflsMinimal \lsMinimalfalse
-\newif\iflsCover \lsCoverfalse %output format is cover
-\newif\iflsNoBabel \lsNoBabelfalse
-\newif\iflsBabelShorthands \lsBabelShorthandsfalse
-\newif\iflsMultiauthors \lsMultiauthorsfalse
-\newif\iflsArseneau \lsArseneaufalse
-\newif\iflsOldStyleNumbers \lsOldStyleNumbersfalse
+\newbool{cover}
+\newbool{resetcapitals}
+\newbool{draft}
+\newbool{openreview}
+\newbool{babel}
+\newbool{babelshorthands}
+\newbool{multiauthors}
+\newbool{showindex}
+\newbool{biblatex}
+ \booltrue{biblatex}
+\newbool{newtxmath}
+\newbool{minimal}
+\newbool{collection}
+\newbool{collectiontoclong}
+\newbool{uniformtopskip}
+\newbool{oldstylenumbers}
+\newbool{tblseight}%for chinesefonts in tbls series page
+\newbool{lsISBNTwoDigitAddon}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Option handling
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage{kvoptions} % for key-value options
-\SetupKeyvalOptions{
- family=langscibook,
- prefix=langscibook@ }
+\RequirePackage{kvoptions}
+
\DeclareStringOption{output}[book]
\define@key{langscibook}{output}{%
\renewcommand{\lsOutput}{#1}}
@@ -171,113 +167,161 @@
\DeclareStringOption{spinewidth}[20mm]
\define@key{langscibook}{spinewidth}{%
\renewcommand{\lsSpinewidth}{#1}}
-\DeclareVoidOption{smallfont}{
- \renewcommand{\lsFontsize}{10pt}}
+\DeclareVoidOption{smallfont}{\renewcommand{\lsFontsize}{10pt}}
\DeclareVoidOption{decapbib}{
- \lsResetCapitalstrue }
-\DeclareVoidOption{draftmode}{ % 'draftmode' instead of 'draft' due to undesirable side efects
- \lsDrafttrue
- \overfullrule=5pt } % to indicate overfull hboxes
+ \booltrue{resetcapitals}
+% \lsResetCapitalstrue
+ }
+\DeclareVoidOption{draftmode}{% 'draftmode' instead of 'draft' due to undesirable side efects
+ \booltrue{draft}
+ \overfullrule=5pt
+ } % to indicate overfull hboxes
\DeclareVoidOption{openreview}{
- \lsOpenReviewtrue%
- \AtBeginDocument{\renewcommand{\lsISBNdigital}{000-0-000000-00-0}}}
-% \DeclareVoidOption{nonflat}{
-% \renewcommand{\fontpath}{./langsci/fonts/}
-% \renewcommand{\logopath}{./langsci/graphics/}
-% \renewcommand{\seriesinfopath}{./langsci/seriesinfo/}
-% \renewcommand{\localepath}{./langsci/locale/}
-% \renewcommand{\bibstylepath}{./langsci/}
-% \renewcommand{\stylepath}{./langsci/styles/}
-% }
-\DeclareVoidOption{nobabel}{
- \lsNoBabeltrue}
-\DeclareVoidOption{babelshorthands}{
- \lsBabelShorthandstrue}
-\DeclareVoidOption{multiauthors}{
- \lsMultiauthorstrue}
-\DeclareVoidOption{showindex}{
- \lsShowIndextrue}
-\DeclareVoidOption{biblatex}{
- \lsBiblatextrue}
-\DeclareVoidOption{bibtex}{
- \ClassWarningNoLine{langscibook}{BibTeX frontend deprecated. Please use BibLaTeX in the final version}
- \lsBiblatexfalse}
-\DeclareVoidOption{nonewtxmath}{
- \lsNewtxmathfalse}
-\DeclareVoidOption{newtxmath}{
- \lsNewtxmathtrue}
-\DeclareVoidOption{minimal}{
- \lsMinimaltrue}
-\DeclareVoidOption{collection}{
- \lsCollectiontrue}
-\DeclareVoidOption{collectionchapter}{
- \lsCollectiontrue%
- \lsCollectionChaptertrue}
-\DeclareVoidOption{collectiontoclong}{
- \lsCollectiontrue%
- \lsCollectionTOCLongtrue}
-\DeclareVoidOption{arseneau}{\lsArseneautrue}
-\DeclareVoidOption{oldstylenumbers}{\lsOldStyleNumberstrue}
+ \booltrue{openreview}
+ \AtBeginDocument{\renewcommand{\lsISBNdigital}{000-0-000000-00-0}}
+ }
+\DeclareVoidOption{nobabel}{\boolfalse{babel}}
+\DeclareVoidOption{babelshorthands}{\booltrue{babelshorthands}}
+\DeclareVoidOption{multiauthors}{\booltrue{multiauthors}}
+\DeclareVoidOption{showindex}{\booltrue{showindex}}
+\DeclareVoidOption{biblatex}{\booltrue{biblatex}}
+\DeclareVoidOption{nonewtxmath}{\boolfalse{newtxmath}}
+\DeclareVoidOption{newtxmath}{\booltrue{newtxmath}}
+\DeclareVoidOption{minimal}{\booltrue{minimal}}
+\DeclareVoidOption{collection}{\booltrue{collection}}
+\DeclareVoidOption{proofs}
+ {
+ \AtEndPreamble{\usepackage[switch, pagewise]{lineno}}
+ \AtBeginDocument{\linenumbers}
+ }
+\DeclareVoidOption{collectiontoclong}
+ {
+ \booltrue{collection}
+ \booltrue{collectiontoclong}
+ }
+\DeclareVoidOption{uniformtopskip}{\booltrue{uniformtopskip}}
+\DeclareVoidOption{oldstylenumbers}{\booltrue{oldstylenumbers}}
+
\DeclareVoidOption{chinesefont}{
- \newfontfamily\cn[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]{AR PL UMing CN}
-% \newcommand{\zh}[1]{{\cn #1}}
+ \AtEndPreamble{
+ \newfontfamily\cn
+ [
+ Scale=MatchLowercase,
+ BoldFont=SourceHanSerif-Bold.otf
+ ]
+ {SourceHanSerif-Regular.otf}
+ \AdditionalFontImprint{Source Han Serif ZH}
\XeTeXlinebreaklocale 'zh'
\XeTeXlinebreakskip = 0pt plus 1pt
- \AdditionalFontImprint{UMing}
+ }
}
+
\DeclareVoidOption{japanesefont}{
- \newfontfamily\jpn[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]{TakaoPGothic} %Japanese
-% \newcommand{\jp}[1]{{{\jpn #1}}}
- \XeTeXlinebreaklocale 'ja'
- \AdditionalFontImprint{TakaoPGothic}
+ \AtEndPreamble{
+ \newfontfamily\jpn
+ [
+ Scale=MatchLowercase,
+ BoldFont=SourceHanSerif-Bold.otf
+ ]
+ {SourceHanSerif-Regular.otf}
+ \AdditionalFontImprint{Source Han Serif JA}
+ \XeTeXlinebreaklocale 'ja'
+ }
+}
+
+\DeclareVoidOption{koreanfont}{
+ \AtEndPreamble{
+ \newfontfamily\krn
+ [
+ Scale=MatchLowercase,
+ BoldFont=SourceHanSerif-Bold.otf
+ ]
+ {SourceHanSerif-Regular.otf}
+ \AdditionalFontImprint{Source Han Serif KO}
+ \XeTeXlinebreaklocale 'ko'
+ }
}
-% \DeclareVoidOption{koreanfont}{
-% \newfontfamily\hangul[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]{./SourceHanSerifK.otf}
-% \newcommand{\kr}[1]{{\sffamily #1}}
-% \AdditionalFontImprint{Korean}}
-\DeclareVoidOption{arabicfont}{
+
+\DeclareVoidOption{arabicfont}
+ {
\newfontfamily\arabicfont[Script=Arabic,ItalicFont=*,Scale=1.4]{arabtype.ttf}
% \newcommand{\textarabic}[1]{{\arabicfont #1}}
\AdditionalFontImprint{Arabtype}
-}
-\DeclareVoidOption{hebrewfont}{
+ }
+
+\DeclareVoidOption{hebrewfont}
+ {
\newfontfamily\hebrewfont[Script=Hebrew,ItalicFont=*, Scale=0.9]{SBLHebrew.ttf}
% \newcommand{\texthebrew}[1]{{\hebrewfont #1}}
\AdditionalFontImprint{SBLHebrew}
-}
-\DeclareVoidOption{syriacfont}{
+ }
+
+\DeclareVoidOption{syriacfont}
+ {
\newfontfamily\syriacfont[Script=Syriac]{EstrangeloEdessa.ttf}
% \newcommand{\textsyriac}[1]{{\syriacfont #1}}
\AdditionalFontImprint{Estrangelo Edessa}
-}
+ }
+
+\DeclareVoidOption{tblseight}{\booltrue{tblseight}}
-\ProcessKeyvalOptions{langscibook}
+\ProcessKeyvalOptions*
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Output variables
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newbool{book}
+\newbool{paper}
+\newbool{guidelines}
+\newbool{coverBODhc}
+\newbool{coverBODsc}
+\newbool{coverCS}
+
+\newcommand{\lsOutputPaper}{paper}
+\newcommand{\lsOutputBook}{book}
+\newcommand{\lsOutputGuidelines}{guidelines}
+\newcommand{\lsOutputCoverBODhc}{coverbodhc}
+\newcommand{\lsOutputCoverBODsc}{coverbodsc}
+\newcommand{\lsOutputCoverCS}{amazoncover}
+
+\ifx\lsOutput\lsOutputPaper{\global\booltrue{paper}}\fi
+\ifx\lsOutput\lsOutputBook{\global\booltrue{book}}\fi
+\ifx\lsOutput\lsOutputGuidelines{\global\booltrue{guidelines}}\fi
+\ifx\lsOutput\lsOutputCoverBODhc{\global\booltrue{coverBODhc}}\fi
+\ifx\lsOutput\lsOutputCoverBODsc{\global\booltrue{coverBODsc}}\fi
+\ifx\lsOutput\lsOutputCoverCS{\global\booltrue{coverCS}}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Class
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\lsChapterPrefixString}{}
+% this conditional cannot be put
+% directly into the LoadClass, so we compute the value and store it in a command
+\ifbool{collection}
+ {\renewcommand{\lsChapterPrefixString}{chapterprefix=true,}}
+ {\ifbool{paper}{\renewcommand{\lsChapterPrefixString}{chapterprefix=true,}}{}}
+
\LoadClass[
- fontsize=\lsFontsize, % default is 11pt
- footnotes=multiple,
- numbers=noenddot, % no point after last number of chapters/sections
- toc=bibliography,
- index=totoc,
- headings=optiontohead,
- %chapterprefix=true,
- %draft=yes,
- %appendixprefix
- ]{scrbook}
+ fontsize=\lsFontsize,% default is 11pt
+ footnotes=multiple,
+ numbers=noenddot,% no point after last number of chapters/sections
+ toc=bibliography,
+ index=totoc,
+ headings=optiontohead,
+ \lsChapterPrefixString,
+ footnotes=multiple
+ ]{scrbook}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{morewrites} %more helper files to write to
-\usepackage{etex}
-\reserveinserts{18}
+% secret hook to insert package which want to be loaded before all other packages
+\IfFileExists{./langsci-earlyload.def}{\input{langsci-earlyload.def}}{}
+
\usepackage{xstring}
\usepackage{graphicx}
\usepackage{hyphenat}
@@ -286,301 +330,265 @@
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
-\usepackage{pbox} % boxes with maximum width
\usepackage[hyphens]{url}
\urlstyle{same}
-
%% standard commands
-\usepackage{langsci-basic}
-\usepackage{todonotes}
-
-
+% \usepackage{langsci-basic}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Print on demand macros
+% Covers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\iflsMinimal\else % The minimal mode skips cover generation
-% Basic cover commands, including PGF layers
-\newcommand{\podsetup}{
- \lsCovertrue
- \renewcommand{\maketitle}{} %no need for this
- \pagestyle{empty}
- \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
- \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
- \renewcommand{\affiliation}[1]{}
-}
-
-% Content creation for the spine. Including Logo, author, title, and volume number on spine.
-\newcommand{\podspine}{
- \renewcommand{\newlineCover}{}
- \renewcommand{\and}{, }
- \renewcommand{\lastand}{ \& }
- \node [above = 0mm of CoverSpine.south, anchor=base] (lspcls_spinelogo) {\color{\lsSeriesColor}\includespinelogo};
-\node [below = 0mm of CoverSpine.north, anchor=north] (lspcls_splinenumber) {\color{\lsSeriesColor}
- {\parbox{.47cm}{
- \centering
- \sffamily
- \huge
- \lsSeriesNumber
- }
- }
-};
+\notbool{minimal}{
+ % Basic cover commands, including PGF layers
+ \newcommand{\coversetup}{
+ \booltrue{cover}
+ \renewcommand{\maketitle}{} %no need for this
+ \pagestyle{empty}
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+ }
- \node [font=\fontsize{18pt}{14pt}\selectfont, above left = 15mm and 4mm of lspcls_spinelogo.north, rotate=270] (lspcls_spinetitle) {\color{\lsSeriesColor} \lsSpineAuthorFont{\lsSpineAuthor\xspace\lsEditorSuffix} \hspace{13mm} \lsSpineTitleFont{\lsSpineTitle}};
- \renewcommand{\newlineCover}{\\}
-}
+ % Fill the canvas for the cover with coloured areas on back and front cover
+ % Argument 1: White margin that encompasses the coloured title and backtitle form. Input: 12.34mm
+ % Argument 2: Height of the coloured title and backtitle form and of the spine. Input: 12.45cm
+ % Argument 3: Width of the coloured title and backtitle form. Input: 12.45cm
+ \newcommand{\covergeometry}[3]{%
+ \begin{pgfonlayer}{lspcls_bg} % Draw on the background layer
+ \node [ bg, % Draw the coloured background on the front cover
+ left = #1 of current page.east,
+ fill=\lsSeriesColor,
+ minimum height=#2,
+ minimum width=#3
+ ] (CoverColouredRectangleFront) {}; % Die können wir noch dynamisch bestimmen % 7.5mm -> 10.675mm for bleed
+ \node [ bg, % Draw the coloured background on the back cover
+ right = #1 of current page.west,
+ fill=\lsSeriesColor,
+ minimum height=#2,
+ minimum width=#3
+ ] (CoverColouredRectangleBack) {};
+ \node at (current page.center) [ % Create a reference node for the spine
+ bg,
+ minimum height=#2,
+ minimum width=\spinewidth,dashed
+ ] (CoverSpine) {}; % add [draw] option for preview mode
+ \end{pgfonlayer}
+ }
-% Fill the canvas for the cover with coloured areas on back and front cover
-% Argument 1: White margin that encompasses the coloured title and backtitle form. Input: 12.34mm
-% Argument 2: Height of the coloured title and backtitle form and of the spine. Input: 12.45cm
-% Argument 3: Width of the coloured title and backtitle form. Input: 12.45cm
-\newcommand{\podgeometry}[3]{
- \begin{pgfonlayer}{lspcls_bg} % Draw on the background layer
- \node [ bg, % Draw the coloured background on the front cover
- left = #1 of current page.east,
- fill=\lsSeriesColor,
- minimum height=#2,
- minimum width=#3
- ] (CoverColouredRectangleFront) {}; % Die können wir noch dynamisch bestimmen % 7.5mm -> 10.675mm for bleed
- \node [ bg, % Draw the coloured background on the back cover
- right = #1 of current page.west,
- fill=\lsSeriesColor,
- minimum height=#2,
- minimum width=#3
- ] (CoverColouredRectangleBack) {};
- \node at (current page.center) [ % Create a reference node for the spine
- bg,
- minimum height=#2,
- minimum width=\spinewidth,dashed
- ] (CoverSpine) {}; % add [draw] option for preview mode
- \end{pgfonlayer}
-}
+ % Generates the content of the back cover
+ % Argument 1: Text width, corresponding to Argument 1 of \frontcovertoptext
+ \newcommand{\backcover}[1]{%
+ \node [ font=\lsBackTitleFont,
+ right,
+ below right = 10mm and 7.5mm of CoverColouredRectangleBack.north west,
+ text width=#1
+ ] (lspcls_backtitle) {\color{white}\raggedright\lsBackTitle\par};
+ \node [ font=\lsBackBodyFont,
+ below = 10mm of lspcls_backtitle,
+ text width=#1,
+ align=justify
+ ] {\color{white}\parindent=15pt\lsBackBody};
+ \node [ above left = 10mm and 7.5mm of CoverColouredRectangleBack.south east ] {%
+ \colorbox{white}{%
+ \ifbool{lsISBNTwoDigitAddon}{%
+ \begin{pspicture}(0,0)(5.25,1in)
+ \psbarcode[transx=.4,transy=.3]{\lsISBNcover\ \lsISBNhardcoverTwoDigitAddon}{includetext guardwhitespace height=.7}{isbn}
+ \end{pspicture}%
+ }{%
+ \begin{pspicture}(0,0)(4.15,1in)
+ \psbarcode[transx=.4,transy=.3]{\lsISBNcover}{includetext height=.7}{isbn}%
+ \end{pspicture}%
+ }%
+ }%
+ };
+ }
-% Generates the content of the back cover
-% Argument 1: Text width, corresponding to Argument 1 of \podfrontcovertoptext
-\newcommand{\podbackcover}[1]{
- \node [ font=\fontsize{25pt}{10mm}\selectfont,
- right,
- below right = 10mm and 7.5mm of CoverColouredRectangleBack.north west,
- text width=#1
- ] (lspcls_backtitle) {\color{white}\lsBackTitleFont{\raggedright\lsBackTitle\par}};
- \node [ below = 10mm of lspcls_backtitle,
- text width=#1,
- align=justify
- ] {\color{white}\lsBackBodyFont{\parindent=15pt\lsBackBody}};
- \node [ below right = 192.5mm and 97.5mm of CoverColouredRectangleBack.north west,
- text width=4cm] {%
- \colorbox{white}{
- \begin{pspicture}(0,0)(4.1,1in)
- \psbarcode[transx=.4,transy=.3]{\lsISBNcover}{includetext height=.7}{isbn}%
- \end{pspicture}
- }
- };
-}
+ % Generates the content on the front cover, including title, author, subtitle. See below for remaining commands
+ % Argument 1: Text width on the front cover. Input: 12.34mm
+ % Argument 2: Font size on the front cover. Adjust to compensate varying text width. Input: 12.34pt
+ \newcommand{\frontcovertoptext}[3][white]{%
+ \renewcommand{\newlineCover}{\\}
+ \node [ font=\lsCoverTitleFont,
+ below right = 10mm and 7.5mm of CoverColouredRectangleFront.north west,
+ text width=#2,
+ align=left
+ ] (lspcls_covertitle) {\color{#1}\raggedright\@title\par};
+
+ \ifx\@subtitle\empty % Is there a subtitle? If no, just print the author.
+ \node [ font=\lsCoverAuthorFont,
+ right,
+ below = 11.2mm of lspcls_covertitle.south,
+ text width=#2
+ ] {\color{#1}\nohyphens{%
+ \lsEditorPrefix%
+ \ResolveAffiliations[output in groups=false,
+ output affiliation=false,
+ output authors font=\lsCoverAuthorFont,
+ separator between two=\\,
+ separator between multiple=\\,
+ separator between final two=\\]
+ {\@author}\par}};
+ \else % If yes, create a node for subtitle and author
+ \node [ font=\lsCoverSubTitleFont,
+ below = 8mm of lspcls_covertitle.south,
+ text width=#2,
+ align=left
+ ] (lspcls_coversubtitle) {\color{#1}\raggedright\@subtitle\par};
+ \node [
+ font=\lsCoverAuthorFont,
+ right,
+ below = 11.2mm of lspcls_coversubtitle.south,
+ text width=#2
+ ] {\color{#1}\nohyphens{%
+ \lsEditorPrefix%
+ \ResolveAffiliations[output in groups=false,
+ output affiliation=false,
+ output authors font=\lsCoverAuthorFont,
+ separator between two=\\,
+ separator between multiple=\\,
+ separator between final two=\\]
+ {\@author}\par}};
+ \fi
+ }
-% Generates the content on the front cover, including title, author, subtitle. See below for remaining commands
-% Argument 1: Text width on the front cover. Input: 12.34mm
-% Argument 2: Font size on the front cover. Adjust to compensate varying text width. Input: 12.34pt
-\newcommand{\podfrontcovertoptext}[3][white]{
- \renewcommand{\and}{\\}
- \renewcommand{\lastand}{\\}
- \renewcommand{\newlineCover}{\\}
-
- \node [ execute at begin node={},
- font=\fontsize{#3}{17.25mm}\selectfont,
- below right = 10mm and 7.5mm of CoverColouredRectangleFront.north west,
- text width=#2,
- align=left
- ] (lspcls_covertitle) {\color{#1}\lsCoverTitleFont{\raggedright\@title\par}};
-
- \ifx\@subtitle\empty % Is there a subtitle? If no, just print the author.
- \node [ font=\fontsize{25pt}{12.5mm}\selectfont,
- right,
- below = 11.2mm of lspcls_covertitle.south,
- text width=#2
- ] {\color{#1}\lsCoverAuthorFont\nohyphens{\lsEditorPrefix\@author\par}};
- \else % If yes, create a node for subtitle and author
- \node [ font=\fontsize{25pt}{10mm}\selectfont,
- below = 8mm of lspcls_covertitle.south,
- text width=#2,
- align=left
- ] (lspcls_coversubtitle) {\color{#1}\lsCoverSubTitleFont{\raggedright\@subtitle\par}};
- \node [
- font=\fontsize{25pt}{12.5mm}\selectfont,
- right,
- below = 11.2mm of lspcls_coversubtitle.south,
- text width=#2
- ] {\color{#1}\lsCoverAuthorFont{\nohyphens{\lsEditorPrefix\@author\par}}};
- \fi
-}
+ % Generates the bottom half of the front cover content: series, series number, logo.
+ \newcommand{\coverbottomtext}[1][white]{%
+ \node [ above right = 18.5mm and -.1mm of CoverColouredRectangleFront.south west,
+ rectangle,
+ fill=white,
+ minimum size=17pt] (lspcls_square) {}; % This is the white square at the bottom left of the front cover
+ \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{#1}\includepublisherlogo}; % Print the Language Science press Logo
+ \path let \p1 = (lspcls_square.north east), % Calculate the exact coordinates for the Series Title to print.
+ \p2 = (lspcls_covertitle.west)
+ in node at (\x2,\y1) (lspcls_seriesinfo) [
+ font=\lsCoverSeriesFont,
+ right,
+ text width=95mm,
+ anchor=north west]
+ {\color{#1}\lsSeriesTitle~\lsSeriesNumber\par};
+ }
+}{}
-% Generates the bottom half of the front cover content: series, series number, logo.
-\newcommand{\podcoverbottomtext}[1][white]{
- \node [ above right = 18.5mm and -.1mm of CoverColouredRectangleFront.south west,
- rectangle,
- fill=white,
- minimum size=17pt] (lspcls_square) {}; % This is the white square at the bottom left of the front cover
- \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{#1}\includepublisherlogo}; % Print the Language Science press Logo
- \path let \p1 = (lspcls_square.north east), % Calculate the exact coordinates for the Series Title to print.
- \p2 = (lspcls_covertitle.west)
- in node at (\x2,\y1) (lspcls_seriesinfo) [
- font=\fontsize{17pt}{7.5mm}\selectfont,
- right,
- text width=95mm,
- anchor=north west]
- {\color{#1}\lsCoverSeriesFont{\lsSeriesTitle\par}};
-}
-\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Output types
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-% \newcommand{\lsOutputLong}{long}
-\newcommand{\lsOutputBook}{book} % standard book
-\newcommand{\lsOutputPaper}{paper} % paper in edited volume
-\newcommand{\lsOutputGuidelines}{guidelines} % guidelines
-\newcommand{\lsOutputCoverBODsc}{coverbodsc} % cover with BoD measurements
-\newcommand{\lsOutputCoverBODhc}{coverbodhc} % cover with BoD measurements
-\newcommand{\lsOutputCoverCS}{covercreatespace} % cover with CreateSpace measurements
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Output types are defined with \newcommand above so they can be used with geometry.
-\AtBeginDocument{
-\iflsMinimal\renewcommand{\maketitle}{You are using the minimal mode.}\else % The minimal mode skips cover generation
-\ifx\lsOutput\lsOutputPaper % only if output==paper
- \usepackage{chngcntr}
- \counterwithout{figure}{chapter}
- \counterwithout{table}{chapter}
- \lsPaper
-\else % only if output!=paper
-\renewcommand{\maketitle}{
-\begin{titlepage}
- \thispagestyle{empty}
-\ifx\lsOutput\lsOutputBook % only if output==book
- \setcounter{page}{-1}
- %% First titlepage:
- {\lsFrontPage}
- %%%%%%%%%%%%%%%%%%%
- \pagenumbering{roman}\clearpage\thispagestyle{empty} % We use roman pagenumbering here instead of \frontmatter because scrbook's frontmatter command issues a \clear(double)page, which is unnec. in digital publications.
- %% Series information:
- {\lsSeriesHistory}
- %%%%%%%%%%%%%%%%%%%%%
- \clearpage%\thispagestyle{empty}
- %% Schmutztitel:
- {\renewcommand{\lsCoverBlockColor}{white}
- \renewcommand{\lsCoverFontColor}{\lsSeriesColor}
- \lsSchmutztitel}
- %%%%%%%%%%%%%%%%%%%%
- \AtEndDocument{
- \lsPageStyleEmpty
- \null\newpage\thispagestyle{empty} % add a final blank page
- }
-\fi
-
-\ifx\lsOutput\lsOutputGuidelines % only if output==guidelines
- {\setcounter{page}{-1}
- {\lsFrontPage}
- }
-
-\fi
-
-\ifx\lsOutput\lsOutputCoverBODhc % only if output==cover
- \podsetup
- \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
- \podgeometry{24.2mm}{23.1cm}{15.5cm}
- \podspine
- \podfrontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
- \podcoverbottomtext
- \newcommand{\lsISBNcover}{\lsISBNhardcover}
- \podbackcover{137mm}
- \end{tikzpicture}
- %exit the document right here
- \end{titlepage}
- \end{document}
- \fi
-
-
-\ifx\lsOutput\lsOutputCoverBODsc % only if output==cover
- \podsetup
- \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
- \podgeometry{13.75mm}{23.1cm}{15.5cm}
- \podspine
- \podfrontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
- \podcoverbottomtext
- \newcommand{\lsISBNcover}{\lsISBNsoftcover}
- \podbackcover{137mm}
- \end{tikzpicture}
- %exit the document right here
- \end{titlepage}
- \end{document}
- \fi
-
-
-\ifx\lsOutput\lsOutputCoverCS % only if output==covercs
- \podsetup
- \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
- \podgeometry{10.675mm}{22.5cm}{15.5cm}
- \podspine
- \podfrontcovertoptext{140mm}{52pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
- \podcoverbottomtext
-% \iflsUscover\newcommand{\lsISBNcover}{\lsISBNsoftcoverus}\else\newcommand{\lsISBNcover}{\lsISBNsoftcover}\fi
- \podbackcover{140mm}
- \end{tikzpicture}
- %exit the document right here
- \end{titlepage}
- \end{document}
-\fi
-\end{titlepage}
-
-% \null\newpage\thispagestyle{empty}
-\hypersetup{colorlinks=false, citecolor=brown, pdfborder={0 0 0}} % for hyperref
-\color{black}
-\lsInsideFont
-
-%% Imprint:
-\ifx\lsOutput\lsOutputGuidelines{}
-\else{\lsImpressum}
-\fi
-%%%%%%%%%%%%%
-
-% \null\newpage\thispagestyle{plain}
-%\pagenumbering{roman} % or \frontmatter
-
-%% Dedication:
-\ifx\@dedication\empty{}
-\else{\newpage\lsDedication}
-\fi
-%%%%%%%%%%%%%%%%
-
-} %% \maketitle
-\fi
-\fi
-%% for those who like the example in numbered example sentences to be typeset in italics
-%% this is possible for a complete series only.
-\ifx\lsSeries\sidl
- %\def\exfont{\normalsize\itshape}
- \renewcommand{\eachwordone}{\itshape} % only \gll
-
- \let\oldtable\table % footnotes in tables without horizontal line
- \let\endoldtable\endtable
- \renewenvironment{table}{\setfootnoterule{0pt}\oldtable}{\endoldtable}
-\fi
-
-\ifx\lsSeries\pmwe
- \renewcommand{\eachwordone}{\normalfont}
-\fi
-
-\ifx\lsSeries\nc
- \renewcommand{\eachwordone}{\itshape}
-\fi
-
-
-
-} %% \AtBeginDocument
+%we define a command to better encapsulate the logic
+\newcommand{\setuptitle}{%
+ \renewcommand{\maketitle}{%first we treat covers to get them out of the way
+ \ifbool{coverBODhc}{%
+ \bodHCcover
+ \end{document}
+ }{}
+
+ \ifbool{coverBODsc}{%
+ \bodSCcover
+ \end{document}
+ }{}
+
+ \ifbool{coverCS}{%
+ \amazonKindleCover
+ \end{document}
+ }{}
+
+ \ifbool{book}{
+ \begin{titlepage}
+ \thispagestyle{empty}
+ \setcounter{page}{-1}
+ %% First titlepage:
+ {\lsFrontPage}
+ %%%%%%%%%%%%%%%%%%%
+ \pagenumbering{roman}\clearpage\thispagestyle{empty} % We use roman pagenumbering here instead of \frontmatter because scrbook's frontmatter command issues a \clear(double)page, which is unnec. in digital publications.
+ %% Series information:
+ {\lsSeriesHistory}
+ %%%%%%%%%%%%%%%%%%%%%
+ \clearpage%\thispagestyle{empty}
+ %% Schmutztitel:
+ {\renewcommand{\lsCoverBlockColor}{white}
+ \renewcommand{\lsCoverFontColor}{\lsSeriesColor}
+ \lsSchmutztitel}
+ %%%%%%%%%%%%%%%%%%%%
+ \AtEndDocument{
+ \lsPageStyleEmpty
+ \null\newpage\thispagestyle{empty} % add a final blank page
+ %% Back page:
+ {\lsBackPage}
+ \null\newpage\thispagestyle{empty}
+ }
+ \end{titlepage}
+ % \fi
+ }{} %end book
+
+ \ifbool{guidelines}{%
+ \begin{titlepage}
+ \thispagestyle{empty}
+ {\setcounter{page}{-1}
+ {\lsFrontPage}
+ }
+ \end{titlepage}
+ }{} %end guidelines
+
+ % \null\newpage\thispagestyle{empty}
+ \hypersetup{colorlinks=false, citecolor=brown, pdfborder={0 0 0}} % for hyperref
+ \color{black}
+ \lsInsideFont
+
+ %% Imprint:
+ \notbool{guidelines}{
+ {\lsImpressum}
+ }{} %end guidlines
+ %%%%%%%%%%%%%
+
+ % \null\newpage\thispagestyle{plain}
+ %\pagenumbering{roman} % or \frontmatter
+
+ %% Dedication:
+ \ifx\@dedication\empty{}
+ \else{\newpage\lsDedication}
+ \fi
+ %%%%%%%%%%%%%%%%
+ } %% \maketitle
+} %\setuptitle
+
+
+\notbool{paper}{
+ % A paper differs in title generation from the other
+ % output types, and it needs more input to produce
+ % its title. This is why \maketitle for output==paper
+ % is deferred until later. See the call to \includepaper@body.
+ \AtBeginDocument{%
+ \ifbool{minimal}
+ {% The minimal mode skips cover generation
+ \renewcommand{\maketitle}{You are using the minimal mode.}
+ }
+ {% else minimal
+ \setuptitle
+ }
+
+ %% for those who like the example in numbered example sentences to be typeset in italics
+ %% this is possible for a complete series only.
+ \ifx\lsSeries\sidl
+ %\def\exfont{\normalsize\itshape}
+ \providecommand{\eachwordone}{\itshape} % only \gll
+
+ \let\oldtable\table % footnotes in tables without horizontal line
+ \let\endoldtable\endtable
+ \renewenvironment{table}{\setfootnoterule{0pt}\oldtable}{\endoldtable}
+ \fi
+
+ \ifx\lsSeries\pmwe
+ \providecommand{\eachwordone}{\normalfont}
+ \fi
+
+ \ifx\lsSeries\nc
+ \providecommand{\eachwordone}{\itshape}
+ \fi
+
+ } %% \AtBeginDocument
+}{} %notbool paper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -600,52 +608,28 @@
\setlength{\spinewidth}{\lsSpinewidth} % Create Space Version
\usepackage{calc}
- \ifx\lsOutput\lsOutputCoverCS % if output = cover; This is the CreateSpace Version
- \lsCovertrue
- \setlength{\bleed}{3.175mm}
- \setlength{\seitenbreite}{169.9mm}
- \setlength{\seitenhoehe}{244.1mm}
- \setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite+\bleed+\bleed}
- \setlength{\totalheight}{\seitenhoehe+\bleed+\bleed}
- \usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
- \hyphenpenalty 750
-\fi
-
-\ifx\lsOutput\lsOutputCoverBODhc
- \lsCovertrue
- \newlength{\bodfold}
- \newlength{\totalspine}
- \setlength{\bodfold}{8mm}
- \setlength{\seitenbreite}{192mm}
- \setlength{\seitenhoehe}{280mm} % For BOD: Hardcover, Runder Rücken, Kaschiert, papier 80g/m², weiß, Papier 17x24cm
-% \setlength{\spinewidth}{\bodspine}
-% \setlength{\totalspine}{\spinewidth+\bodfold+\bodfold}
- \setlength{\totalspine}{\spinewidth}
- \setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite}
- \setlength{\totalheight}{\seitenhoehe}
- \usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
- \hyphenpenalty 750
-\fi
+\ifbool{coverCS}{
+ \booltrue{cover}
+ \usepackage{langsci-pod}
+ \csgeometry
+} %end covercs
+\ifbool{coverBODhc}{
+ \booltrue{cover}
+ \usepackage{langsci-pod}
+ \bodhcgeometry
+}{}
-\ifx\lsOutput\lsOutputCoverBODsc
- \lsCovertrue
- \newlength{\totalspine}
- \setlength{\seitenbreite}{170mm}
- \setlength{\seitenhoehe}{240mm} % For BOD: Softcover, papier 80g/m², weiß, Papier 17x24cm
- \setlength{\bleed}{5mm}
- \setlength{\totalspine}{\spinewidth}
- \setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite+\bleed+\bleed}
- \setlength{\totalheight}{\seitenhoehe+\bleed+\bleed}
- \usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
- \hyphenpenalty 750
-\fi
+\ifbool{coverBODsc}{
+ \booltrue{cover}
+ \usepackage{langsci-pod}
+ \bodscgeometry
+}{}
%Page size and text area if not cover
-\iflsCover
+\notbool{cover}{
%output types cover have already been handled
-\else % output != cover
\usepackage[
papersize={170mm,240mm}
,top=27.4mm % TODO nachgemessen, nach Vermassung eigentlich 30mm-16pt = 25.8mm
@@ -654,53 +638,50 @@
%,showframe,pass
,marginparwidth=50pt
]{geometry}
-\fi
+}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{ifxetex}
-\ifxetex\else\ClassError{langsci/langscibook}{Please use XeLaTeX!}{}\fi
+\ifxetex\else\ClassError{langscibook}{Please use XeLaTeX!}{}\fi
%% Typesetting of mathematical formulas
\usepackage{amssymb} % has to be loaded before other stuff
\usepackage{amsmath} % has to be loaded before mathspec/unicode-math
-\iflsMinimal\else % The minimal mode skips font loading
- \iflsNewtxmath\else
+\notbool{minimal}{% The minimal mode skips font loading
+ \notbool{newtxmath}{
%% There is a known problem in the interplay between \binom, unicode-math, and OTF
%% https://tex.stackexchange.com/questions/269980/wrong-parentheses-size-in-binom-with-xelatex-and-unicode-math-in-displaystyle
\ifx\Umathcode\@undefined\else
-
- \DeclareRobustCommand{\genfrac}[6]{%
- \def\@tempa{#1#2}%
- \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
- % just \over or \above never withdelims versions
- \ifx @#3@\@@over\else\@@above\fi
- }%
- \ifx\@tempa\@empty \else
- \bgroup % so mathord not mathinner
- \left\ifx\relax#1\relax.\else#1\fi % assumes . is null delimiter
- % otherwise add specified delimiter
- \kern-\nulldelimiterspace % fractions add extra nulldelimiter space
- \fi
- \@tempb{#3}{\mathstrut{#5}}{\mathstrut{#6}}%
- \ifx\@tempa\@empty \else
- \kern-\nulldelimiterspace
- \right\ifx\relax#2\relax.\else#2\fi
- \egroup
- \fi
- }
- \fi
+ \DeclareRobustCommand{\genfrac}[6]{%
+ \def\@tempa{#1#2}%
+ \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
+ % just \over or \above never withdelims versions
+ \ifx @#3@\@@over\else\@@above\fi
+ }%
+ \ifx\@tempa\@empty \else
+ \bgroup % so mathord not mathinner
+ \left\ifx\relax#1\relax.\else#1\fi % assumes . is null delimiter
+ % otherwise add specified delimiter
+ \kern-\nulldelimiterspace % fractions add extra nulldelimiter space
+ \fi
+ \@tempb{#3}{\mathstrut{#5}}{\mathstrut{#6}}%
+ \ifx\@tempa\@empty \else
+ \kern-\nulldelimiterspace
+ \right\ifx\relax#2\relax.\else#2\fi
+ \egroup
+ \fi
+ }
+ \fi%umathcode
%% Provides \setmathfont
\usepackage{unicode-math}
- \fi
-
- \iflsNewtxmath
+ }{%else newtxmath
%% Deprecated:
\PassOptionsToPackage{no-math}{fontspec} % must appear before metalogo or any fontspec stuff; deactivates fontspec's math settings, which is necessary to let newtxmath do the job
- \fi
+ }
\usepackage{metalogo}\newcommand{\xelatex}{\XeLaTeX\xspace}
@@ -715,43 +696,38 @@
\setsansfont[
%Ligatures={TeX,Common},% not supported by ttf
Scale=MatchLowercase,
-% Path=\fontpath,
BoldFont = Arimo-Bold.ttf,
ItalicFont = Arimo-Italic.ttf,
BoldItalicFont = Arimo-BoldItalic.ttf
]{Arimo-Regular.ttf}
- \iflsNewtxmath\else
- \setmathfont[AutoFakeBold
-% ,Path=\fontpath
- ]{LibertinusMath-Regular.otf}
- \setmathfont[range={cal},StylisticSet=1%,Path=\fontpath
- ]{XITSMath-Regular.otf}
- \setmathfont[range={bfcal},StylisticSet=1%,Path=\fontpath
- ]{XITSMath-Bold.otf}
- \fi
+ \notbool{newtxmath}{
+ \setmathfont[AutoFakeBold]{LibertinusMath-Regular.otf}
+ \setmathfont[range={cal},StylisticSet=1]{XITSMath-Regular.otf}
+ \setmathfont[range={bfcal},StylisticSet=1]{XITSMath-Bold.otf}
+ }{}
- \iflsOldStyleNumbers
+ \ifbool{oldstylenumbers}{
\defaultfontfeatures[LibertinusSerif-Semibold.otf,LibertinusSerif-Italic.otf,LibertinusSerif-SemiboldItalic.otf,LibertinusSerif-Regular.otf]{SmallCapsFeatures={Numbers=OldStyle}}
- \fi
-
- \setmainfont[
- Ligatures={TeX,Common},
-% Path=\fontpath,
- PunctuationSpace=0,
- Numbers={Proportional},
- BoldFont = LibertinusSerif-Semibold.otf,
- ItalicFont = LibertinusSerif-Italic.otf,
- BoldItalicFont = LibertinusSerif-SemiboldItalic.otf,
- BoldSlantedFont = LibertinusSerif-Semibold.otf,
- SlantedFont = LibertinusSerif-Regular.otf,
- SlantedFeatures = {FakeSlant=0.25},
- BoldSlantedFeatures = {FakeSlant=0.25},
- SmallCapsFeatures = {FakeSlant=0},
- ]{LibertinusSerif-Regular.otf}
+ }{}
+ \setmainfont
+ [
+ Ligatures={TeX,Common},
+ PunctuationSpace=0,
+ Numbers={Proportional},
+ BoldFont = LibertinusSerif-Semibold.otf,
+ ItalicFont = LibertinusSerif-Italic.otf,
+ BoldItalicFont = LibertinusSerif-SemiboldItalic.otf,
+ BoldSlantedFont = LibertinusSerif-Semibold.otf,
+ SlantedFont = LibertinusSerif-Regular.otf,
+ SlantedFeatures = {FakeSlant=0.25},
+ BoldSlantedFeatures = {FakeSlant=0.25},
+ SmallCapsFeatures = {FakeSlant=0},
+ ]
+ {LibertinusSerif-Regular.otf}
%% Deprecated:
- \iflsNewtxmath % some users have problems when installing newtxmath
+ \ifbool{newtxmath}{
\usepackage[libertine]{newtxmath}
%% following http://tex.stackexchange.com/questions/297328/xelatex-does-not-load-newtxmath-with-linuxlibertine-sometimes
%% due to a bug in XeTeX. This also seems to fix an issue with \url in footnotes.
@@ -764,19 +740,54 @@
\DeclareSymbolFont{operators}{\encodingdefault}{\familydefault}{m}{n}%
\SetSymbolFont{operators}{bold}{\encodingdefault}{\familydefault}{b}{n}%
}
- \fi
-
- \let\oldtabular\tabular % number in tabulars
- \let\endoldtabular\endtabular
- \renewenvironment{tabular}{\normalfont\addfontfeatures{Numbers=Lining}\selectfont\oldtabular}{\endoldtabular}
-
+ }{}
+ % Improve the appearance of numbers in tables and the TOC
+ % In those places, they should come out monospaced, unlike in main text.
+ \AtBeginEnvironment{tabular}{\addfontfeatures{Numbers={Monospaced,Lining}}\selectfont}
+ \AtBeginEnvironment{tabularx}{\addfontfeatures{Numbers={Monospaced,Lining}}\selectfont}
+ \AtBeginEnvironment{longtable}{\addfontfeatures{Numbers={Monospaced,Lining}}\selectfont}
+
+ \DeclareTOCStyleEntry
+ [
+ entrynumberformat=\addfontfeature{Numbers={Monospaced,Lining}},
+ pagenumberformat=\addfontfeature{Numbers={Monospaced,Lining}}\bfseries,
+ raggedentrytext=true
+ ]
+ {tocline}
+ {chapter}
+
+ \DeclareTOCStyleEntries
+ [
+ entrynumberformat=\addfontfeature{Numbers={Monospaced,Lining}},
+ pagenumberformat=\addfontfeature{Numbers={Monospaced,Lining}},
+ raggedentrytext=true
+ ]
+ {tocline}
+ {section,subsection,subsubsection,paragraph,subparagraph}
+
+ % In collected volumes, adjust the spacing for unnumbered chapters
+ \ifbool{collection}{
+ \BeforeStartingTOC[toc]{\SetupAffiliations{output affiliation=false,
+ output authors font=\normalfont,
+ separator between two={~\&~},
+ separator between multiple={,~},
+ separator between final two={~\&~}}
+ }
+ \renewcommand{\addtocentrydefault}[3]{%
+ \Ifstr{#2}{}{%
+ \addcontentsline{toc}{#1}{\protect\numberline{~}#3}%
+ }{%
+ \addcontentsline{toc}{#1}{\protect\numberline{#2}#3}%
+ }%
+ }%
+ }{}
\frenchspacing %see https://en.wikipedia.org/wiki/Sentence_spacing#Typography
\usepackage[final]{microtype}
\newcommand{\lsCoverTitleFontSize}{52pt}
\newcommand{\lsCoverTitleFontBaselineskip}{17.25mm}
\newcommand{\lsCoverTitleSizes}[2]{\renewcommand{\lsCoverTitleFontSize}{#1}\renewcommand{\lsCoverTitleFontBaselineskip}{#2}}
- \newcommand{\lsCoverTitleFont}[1]{\sffamily\addfontfeatures{Scale=MatchUppercase}\fontsize{\lsCoverTitleFontSize}{17.25mm}\selectfont #1}
+ \newcommand{\lsCoverTitleFont}[1]{\sffamily\addfontfeatures{Scale=MatchUppercase}\fontsize{\lsCoverTitleFontSize}{\lsCoverTitleFontBaselineskip}\selectfont #1}
\newcommand{\lsCoverSubTitleFont}{\sffamily\addfontfeatures{Scale=MatchUppercase}\fontsize{25pt}{10mm}\selectfont}
\newcommand{\lsCoverAuthorFont}{\fontsize{25pt}{12.5mm}\selectfont}
\newcommand{\lsCoverSeriesFont}{\sffamily\fontsize{17pt}{7.5mm}\selectfont} % fontsize?
@@ -787,16 +798,15 @@
\newcommand{\lsBackBodyFont}{\lsInsideFont}
\newcommand{\lsSpineAuthorFont}{\bfseries\fontsize{16pt}{14pt}\selectfont}
\newcommand{\lsSpineTitleFont}{\sffamily\bfseries\fontsize{18pt}{14pt}\selectfont}
-\fi % end minimal mode switch from line ~677
+}{} %end else minimal
\setkomafont{sectioning}{\normalcolor\bfseries}
-
+\setkomafont{descriptionlabel}{\normalfont\itshape}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
\usepackage{xcolor}
\definecolor{lsLightBlue}{cmyk}{0.6,0.05,0.05,0}
@@ -850,7 +860,6 @@
\definecolor{langscicol19}{cmyk}{0.85,0.05,1,0.5}
\definecolor{langscicol20}{cmyk}{0.88,0.15,1,0.66}
-
% \newcommand{\lsptable}[2]{
% \resizebox{#1}{!}{
% \begin{tabularx}{\textwidth}{XXXXXXXXXXXXXXXXXXXX}
@@ -860,133 +869,130 @@
% }
% }
-
\input{langsci-series.def}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{pst-barcode} % for generating bar codes
+\usepackage{pst-barcode} % generates ISBN bar codes
\newcommand{\lsCoverFontColor}{white}
\newcommand{\lsCoverBlockColor}{\lsSeriesColor}
\newcommand{\lsEditorPrefix}{}
\newcommand{\lsEditorSuffix}{}
-\iflsCollection % for collections: set \lsEditorSuffix depending on \@author
+\ifbool{collection}{
\AtBeginDocument{
\renewcommand{\newlineCover}{}
\renewcommand{\newlineSpine}{}
\renewcommand{\lsEditorPrefix}{{\Large Edited by\\}}
\renewcommand{\lsEditorSuffix}{(ed.)}
- \iflsMultiauthors
+ \ifbool{multiauthors}{
\renewcommand{\lsEditorSuffix}{(eds.)}
- \fi
- }
-\else
-\fi
+ }{}
+ } %end AtBeginDocument
+}{} %end collection
\pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
\pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
\newcommand{\lsFrontPage}{% Front page
- \ifcsname tikz@library@external@loaded\endcsname\tikzexternaldisable\fi
- \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
- \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
- \thispagestyle{empty}
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
- \renewcommand{\affiliation}[1]{}
-\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
- \begin{pgfonlayer}{lspcls_bg}
- \node [ bg,
- left=7.5mm of current page.east,
- fill=\lsSeriesColor,
- minimum width=155mm,
- minimum height=225mm
- ] (CoverColouredRectangleFront) {};
- \end{pgfonlayer}
- \podfrontcovertoptext{140mm}{51pt}
- \podcoverbottomtext
- \iflsDraft \node [rotate=45,align=center,scale=3,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Draft\\of \today, \currenttime}; \fi
- \iflsOpenReview \node [rotate=45,align=center,scale=1.5,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Open Review\\Version of \today, \currenttime}; \fi
-% \iflsUndecapitalize \node [rotate=45,scale=1.5,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Undecapitalized}; \fi
-\end{tikzpicture}
-\ifcsname tikz@library@external@loaded\endcsname\tikzexternalenable\fi
-}
+ \ifcsname tikz@library@external@loaded\endcsname\tikzexternaldisable\fi
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+ \thispagestyle{empty}
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \begin{pgfonlayer}{lspcls_bg}
+ \node [ bg,
+ left=7.5mm of current page.east,
+ fill=\lsSeriesColor,
+ minimum width=155mm,
+ minimum height=225mm
+ ] (CoverColouredRectangleFront) {};
+ \end{pgfonlayer}
+ \frontcovertoptext{140mm}{51pt}
+ \coverbottomtext
+ \ifbool{draft}{\node [rotate=45,align=center,scale=3,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Draft\\of \today, \currenttime};}{}
+ \ifbool{openreview}{
+ \node [rotate=45,align=center,scale=1.5,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Open Review\\Version of \today, \currenttime};}{}
+ \end{tikzpicture}
+ \ifcsname tikz@library@external@loaded\endcsname\tikzexternalenable\fi
+} % end lsFrontPage
\newcommand{\lsSchmutztitel}{% Schmutztitel
- \ifcsname tikz@library@external@loaded\endcsname\tikzexternaldisable\fi
- \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
- \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
- \thispagestyle{empty}
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
- \renewcommand{\affiliation}[1]{}%
-\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
- \begin{pgfonlayer}{lspcls_bg}
- \node [ bg,
- left=7.5mm of current page.east,
- fill=white,
- minimum width=155mm,
- minimum height=225mm
- ] (CoverColouredRectangleFront) {};
- \end{pgfonlayer}
- \podfrontcovertoptext[\lsSeriesColor]{140mm}{51pt}
- \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{\lsSeriesColor}\includepublisherlogo}; % Print the Language Science press Logo
-\end{tikzpicture}
-\ifcsname tikz@library@external@loaded\endcsname\tikzexternalenable\fi
-}
-
-%\usepackage{pdfpages}
-% \newcommand{\lsAdvertisement}{%
-% \include{\logopath langsci-advertisement}
-% }
+ \ifcsname tikz@library@external@loaded\endcsname\tikzexternaldisable\fi
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+ \thispagestyle{empty}
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \begin{pgfonlayer}{lspcls_bg}
+ \node [ bg,
+ left=7.5mm of current page.east,
+ fill=white,
+ minimum width=155mm,
+ minimum height=225mm
+ ] (CoverColouredRectangleFront) {};
+ \end{pgfonlayer}
+ \frontcovertoptext[\lsSeriesColor]{140mm}{51pt}
+ \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{\lsSeriesColor}\includepublisherlogo}; % Print the Language Science press Logo
+ \end{tikzpicture}
+ \ifcsname tikz@library@external@loaded\endcsname\tikzexternalenable\fi
+} %end Schmutztitel
\newcommand{\lsBackPage}{%
- \ifcsname tikz@library@external@loaded\endcsname\tikzexternaldisable\fi
- \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
- \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
- \pagestyle{empty}
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
- \renewcommand{\affiliation}[1]{}
- \newcommand{\lsISBNcover}{\lsISBNdigital}
-\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
- \begin{pgfonlayer}{lspcls_bg}
- \node [ bg,
- right=7.5mm of current page.west,
- fill=\lsSeriesColor,
- minimum width=155mm,
- minimum height=225mm
- ] (CoverColouredRectangleBack) {};
- \end{pgfonlayer}
- \podbackcover{137mm}
- \end{tikzpicture}
+ \ifcsname tikz@library@external@loaded\endcsname\tikzexternaldisable\fi
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+ \pagestyle{empty}
+ \newcommand{\lsISBNcover}{\lsISBNdigital}
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \begin{pgfonlayer}{lspcls_bg}
+ \node [ bg,
+ right=7.5mm of current page.west,
+ fill=\lsSeriesColor,
+ minimum width=155mm,
+ minimum height=225mm
+ ] (CoverColouredRectangleBack) {};
+ \end{pgfonlayer}
+ \backcover{137mm}
+ \end{tikzpicture}
\ifcsname tikz@library@external@loaded\endcsname\tikzexternalenable\fi
}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Series history
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\lsSeriesHistory}{
-\color{black}
-\raggedright\lsCoverSeriesHistoryFont
+\newcommand{\tblseight}{{\color{red}Chinese fonts for TBLS 8 not loaded! Please set the option \textsc{tblseight} in main.tex for final production}}
-% \IfFileExists{./\lsSeries-info.tex}{\input{./\lsSeries-info}}{
-% Series information: \lsSeries-info.tex not found!}
+\ifbool{tblseight}
+ {
+ \newfontfamily\cn
+ [
+ Scale=MatchLowercase,
+ BoldFont=SourceHanSerifSC-Bold.otf
+ ]
+ {SourceHanSerifSC-Regular.otf}
-{\lsSeriesText}
-\IfStrEq{\lsISSNprint}{??} % \IfStrEq from xstring
- {}
- {\vfill\hfill ISSN (print): \lsISSNprint\\
- \hfill ISSN (electronic): \lsISSNelectronic\\}
-\IfStrEq{\lsISSN}{??} % \IfStrEq from xstring
- {}
- {\vfill\hfill ISSN: \lsISSN}
-}
+ \renewcommand{\tblseight}{{\cn 语法理论: 从转换语法到基于约束的理论}}
+ }{}
+
+\newcommand{\lsSeriesHistory}{
+ \color{black}
+ \raggedright\lsCoverSeriesHistoryFont
+
+ % \IfFileExists{./\lsSeries-info.tex}{\input{./\lsSeries-info}}{
+ % Series information: \lsSeries-info.tex not found!}
+
+ {\lsSeriesText}
+ \IfStrEq{\lsISSNprint}{??} % \IfStrEq from xstring
+ {}
+ {\vfill\hfill ISSN (print): \lsISSNprint\\
+ \hfill ISSN (electronic): \lsISSNelectronic\\}
+ \IfStrEq{\lsISSN}{??} % \IfStrEq from xstring
+ {}
+ {\vfill\hfill ISSN: \lsISSN}
+} %end lsSeriesHistory
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Imprint
@@ -1009,88 +1015,81 @@
\illustrator{}
\newcommand{\lsAdditionalFontsImprint}{}
-\newcommand{\AdditionalFontImprint}[1]{
- \edef\fontstemp{\lsAdditionalFontsImprint}
- \renewcommand{\lsAdditionalFontsImprint}{\fontstemp, #1}
-}
+\newcommand{\AdditionalFontImprint}[1]
+ {
+ \edef\fontstemp{\lsAdditionalFontsImprint}
+ \renewcommand{\lsAdditionalFontsImprint}{\fontstemp, #1}
+ }
%\def\@author{\@latex@warning@no@line{No \noexpand\author given}}
\newcommand{\ISBNdigital}[1]{\renewcommand{\lsISBNdigital}{#1}}
\newcommand{\ISBNsoftcover}[1]{\renewcommand{\lsISBNsoftcover}{#1}}
\newcommand{\ISBNsoftcoverus}[1]{\renewcommand{\lsISBNsoftcoverus}{#1}}
-\newcommand{\ISBNhardcover}[1]{\renewcommand{\lsISBNhardcover}{#1}}
+\NewDocumentCommand { \ISBNhardcover } { o m }
+ {%
+ \renewcommand{\lsISBNhardcover}{#2}%
+ \IfValueT{#1}
+ {%
+ \booltrue{lsISBNTwoDigitAddon}
+ \newcommand{\lsISBNhardcoverTwoDigitAddon}{#1}
+ }
+ }
\newcommand{\URL}[1]{\renewcommand{\lsURL}{#1}}
\newcommand{\Series}[1]{\renewcommand{\lsSeries}{#1}}
\newcommand{\SeriesNumber}[1]{\renewcommand{\lsSeriesNumber}{#1}}
\newcommand{\BookDOI}[1]{\renewcommand{\lsBookDOI}{#1}}
-
-%invert names of first author for citation on impressum page
-
-\newcommand{\lsFirstAuthorFullName}{}%temporary, will be overwritten
-\newcommand{\lsFirstAuthorFirstName}{}%temporary, will be overwritten
-\newcommand{\lsFirstAuthorLastName}{}%temporary, will be overwritten
-\newcommand{\lsFirstAuthorString}{\lsFirstAuthorLastName, \lsFirstAuthorFirstName} %can be customized in localmetadata.tex
-\newcommand{\lsNonFirstAuthorsString}{} %default, will be overwritten iff more than one author
-% \newcommand{\lsImpressionCitationAuthor}{\lsFirstAuthorString \lsNonFirstAuthorsString}
-
-
-\AtBeginDocument{
-\makeatletter
-\let\theauthor\@author
-\makeatother
-\ifdefempty{\lsFirstAuthorFirstName}{% Check if the \lsFirstAuthorFirstName is given in localmetadata.tex (or somewhere else).
-\renewcommand{\and}{NONLASTAND} %expand for easier checking. Might need to be undone later on
-\renewcommand{\lastand}{LASTAND} %expand for easier checking
-
-\IfSubStr{\theauthor}{NONLASTAND}{%2+authors
- \renewcommand{\lsFirstAuthorFullName}{\StrBefore{\theauthor}{\and }}
- \renewcommand{\lsFirstAuthorFirstName}{\StrBefore{\theauthor}{ }}
- \renewcommand{\lsFirstAuthorLastName}{\StrBetween{\theauthor}{ }{\and }}
- \renewcommand{\lsNonFirstAuthorsString}{\and\StrBehind{\theauthor}{\and }}
- }{%else
- \IfSubStr{\theauthor}{LASTAND}{%less than two authors, more than one
- \renewcommand{\lsFirstAuthorFullName}{\StrBefore{\theauthor}{\lastand }}
- \renewcommand{\lsFirstAuthorFirstName}{\StrBefore{\theauthor}{ }}
- \renewcommand{\lsFirstAuthorLastName}{\StrBetween{\theauthor}{ }{\lastand }}
- \renewcommand{\lsNonFirstAuthorsString}{\lastand\StrBehind{\theauthor}{\lastand }}
- }{%else exactly one author
- \renewcommand{\lsFirstAuthorFirstName}{\StrBefore{\theauthor}{ }}
- \renewcommand{\lsFirstAuthorLastName}{\StrBehind{\theauthor}{ }}
+\ifbool{paper}
+ {}
+ {%
+ \AtBeginDocument
+ {%
+ \newwrite\metadatafile
+ \immediate\openout\metadatafile=langscitmp.bib
+ \immediate\write\metadatafile{%
+ @book{langsci-current-book,
+ \ifbool{collection}
+ {editor = {\unexpanded\expandafter{\@author}},}
+ {author = {\unexpanded\expandafter{\@author}},}
+ title = {{\unexpanded\expandafter{\@title}}},
+ \if\@subtitle\empty\else subtitle = {{\unexpanded\expandafter{\@subtitle}}},\fi
+ year = {\lsYear},
+ series = {\lsSeriesTitle},
+ number = {\lsSeriesNumber},
+ location = {Berlin},
+ publisher = {Language Science Press},
+ options = {dataonly=true}
+ }
+ }
+ \immediate\closeout\metadatafile
+ \addbibresource{langscitmp.bib}
}
- }
- }{}
-}
-
+ }
-\newcommand{\lsImpressionCitationAuthor}{
-\lsFirstAuthorLastName, \lsFirstAuthorFirstName \lsNonFirstAuthorsString}
+\newcommand{\lsImpressumCitationText}
+ {%
+ \renewcommand{\newlineCover}{}%
+ \renewcommand{\newlineSpine}{}%
+ \fullciteImprint{langsci-current-book}
+ }
-\newcommand{\lsImpressumCitationText}{
- \onlyAuthor
- \renewcommand{\newlineCover}{}
- \renewcommand{\newlineSpine}{}
- {\lsImpressionCitationAuthor}\if\lsEditorSuffix\empty\else\ \lsEditorSuffix\fi. %
- {\lsYear}. %
- \textit{\@title}\if\@subtitle\empty\else: \textit{\@subtitle}\fi\ %
- (\lsSeriesTitle). %
- Berlin: Language Science Press.
-}
\newcommand{\lsImpressumExtra}{}%for legal notes required for revised theses ("... in fulfillment of ... ")
-\newcommand{\publisherstreetaddress}{%
-Language Science Press\\
-Xhain\\
-Grünberger Str. 16\\
-10243 Berlin, Germany}
+\newcommand{\publisherstreetaddress}
+ {%
+ Language Science Press\\
+ xHain\\
+ Grünberger Str. 16\\
+ 10243 Berlin, Germany
+ }
+
\newcommand{\publisherurl}{\href{http://langsci-press.org}{langsci-press.org}}
\newcommand{\storageinstitution}{FU Berlin}
\newcommand{\githubtext}{Source code available from \href{https://www.github.com/langsci/\lsID}{www.github.com/langsci/\lsID}}
\newcommand{\paperhivetext}{Collaborative~reading:~\href{https://paperhive.org/documents/remote?type=langsci&id=\lsID}{paperhive.org/documents/remote?type=langsci\&id=\lsID}}
-
-\newcommand{\lsImpressum}{
+\newcommand{\lsImpressum}{%
\thispagestyle{empty}
\raggedright
@@ -1101,31 +1100,56 @@ Grünberger Str. 16\\
This title can be downloaded at:\\
\url{\lsURL}
-© \lsYear, \iflsCollection the authors\else\@author\fi
+© \lsYear,
+\ifbool{collection}{%
+ the authors}{%
+ % \else
+ \CiteFullAuthorList{langsci-current-book}
+}
\newcommand{\ccby}{CC-BY}
+\newcommand{\ccbynd}{CC-BY-ND}
+
\ifx\lsCopyright\ccby
Published under the Creative Commons Attribution 4.0 Licence (CC BY 4.0):
-http://creativecommons.org/licenses/by/4.0/ \includegraphics[height=.75em]{ccby.pdf}
-\else
+http://creativecommons.org/licenses/by/4.0/
+\IfFileExists{./ccby.pdf}{
+ \includegraphics[height=.75em]{ccby.pdf}
+ }{🅭🅯}
+\fi
+
+
+\ifx\lsCopyright\ccbynd
Published under the Creative Commons Attribution-NoDerivatives 4.0 Licence (CC BY-ND 4.0):
-http://creativecommons.org/licenses/by-nd/4.0/ \includegraphics[height=.75em]{ccbynd.pdf}
+http://creativecommons.org/licenses/by-nd/4.0
+\IfFileExists{./ccbynd.pdf}{
+ \includegraphics[height=.75em]{ccbynd.pdf}
+ }{🅭🅯⊜}
+\fi
+
+\ifx\lsCopyright\ccbysa
+Published under the Creative Commons Attribution-ShareAlike 4.0 Licence (CC BY-SA 4.0):
+http://creativecommons.org/licenses/by-sa/4.0/
+\IfFileExists{./ccbysa.pdf}{
+ \includegraphics[height=.75em]{ccbysa.pdf}
+ }{🅭🅯🄎}
\fi
+
+
+
{\lsImpressumExtra}
\ifx\lsSeries\sidl
Indexed in EBSCO\smallskip
\fi
-
-
\begin{tabular}{@{}l@{~}l}
ISBN: &
\IfStrEq{\lsISBNdigital}{000-0-000000-00-0}{%no digital ISBN, issue warning
- \color{red}no digital ISBN
+ \color{red}no digital ISBN
}{%digital ISBN present, write ISBN
- \lsISBNdigital~(Digital)
+ \lsISBNdigital~(Digital)
}
\\
\IfStrEq{\lsISBNhardcover}{000-0-000000-00-0}{ %hardcover ISBN not present
@@ -1134,30 +1158,37 @@ ISBN: &
}
\IfStrEq{\lsISBNsoftcover}{000-0-000000-00-0}{ %softcover ISBN not present
- \IfStrEq{\lsISBNhardcover}{000-0-000000-00-0}{ %neither hardcover nor softcover, issue warning
- \color{red} no print ISBNs!
- }{%hardcover present, no warning
- }
+ \IfStrEq{\lsISBNhardcover}{000-0-000000-00-0}{ %neither hardcover nor softcover, issue warning
+ \color{red} no print ISBNs!
+ }{%hardcover present, no warning
+ }
}{%only softcover present, write ISBN
- &\lsISBNsoftcover~(Softcover)\\
+ &\lsISBNsoftcover~(Softcover)\\
}
\end{tabular}
\IfStrEq{\lsISSNprint}{??} % \IfStrEq from xstring
{}
- {ISSN (print): \lsISSNprint\\
- ISSN (electronic): \lsISSNelectronic\\}
+ {%else
+ ISSN (print): \lsISSNprint\\
+ ISSN (electronic): \lsISSNelectronic\\
+ }
\IfStrEq{\lsISSN}{??}
{}
- {ISSN: \lsISSN}
-
+ {%else
+ ISSN: \lsISSN
+ }
-\IfStrEq{\lsBookDOI}{??}
- {{\color{red} no DOI}}
- {\doi{\lsBookDOI}}\\
-\IfStrEq{\lsID}{000}{\color{red} ID not assigned!}{%
-\githubtext\\
-\paperhivetext
+\IfStrEq{\lsBookDOI}{??}{
+ {\color{red} no DOI}
+}{ %else
+ DOI: \href{https://doi.org/\lsBookDOI}{\nolinkurl{\lsBookDOI}}
+}\\
+\IfStrEq{\lsID}{000}{
+ \color{red} ID not assigned!
+}{%else
+ \githubtext\\
+ \paperhivetext
}%
\bigskip
@@ -1212,32 +1243,40 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
% Dedication
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\lsDedication}{\thispagestyle{empty}
+\newcommand{\lsDedication}
+ {%
+ \thispagestyle{empty}
\vspace*{\fill}
\begin{center}
{\lsDedicationFont
\@dedication\par}
\end{center}
\vspace*{\fill}
- \clearpage}
-
+ \clearpage
+ }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Header and footer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{datetime}
-\usepackage{scrpage2}
+\usepackage[autoenlargeheadfoot=off, draft=false]{scrlayer-scrpage}
+% This option explicitely increases the size of the footer in plain pages.
+% This ensures there is enough space to print the citation in collected vols.
+% This setting does not influence the composition of the typearea.
+\AddToLayerPageStyleOptions{plain.scrheadings}
+ {onselect={\setlength{\footheight}{3\baselineskip}}}
+
\ohead{\headmark}
\ihead{}
\cfoot{}
\ofoot[]{\pagemark}
-\iflsDraft
+\ifbool{draft}{
\ifoot{Draft of \today, \currenttime}
-\fi
-\iflsOpenReview
+}{}
+\ifbool{openreview}{
\ifoot{{\color{lsRed}Open review version}. Final version at \url{\lsURL}.}
-\fi
+}{}
\newcommand{\lsPageStyleEmpty}{
\ohead{}
@@ -1270,7 +1309,6 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
%% needed for hyperref
\def\toclevel@subsubsubsection{4}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Epigrams
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1280,45 +1318,30 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
\def\epigramsource#1{\gdef\@epigramsource{#1}}
\epigramsource{}
-
-%%% epigraph configuration
\usepackage{epigraph}
\setlength{\epigraphrule}{0pt}
\renewcommand{\textflush}{flushepinormal}
-%\setlength{\epigraphwidth}{.2\textwidth}
+\setlength{\epigraphwidth}{.618\textwidth}% Set to the longer part of golden ratio
\setlength{\afterepigraphskip}{0\baselineskip}
+\setlength{\beforeepigraphskip}{0\baselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Footnotes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifxetex\iflsMinimal\else
-\addtokomafont{footnote}{\addfontfeatures{Numbers=Lining}} % numbers in footnotes
-%\addtokomafont{footnotelabel}{\addfontfeatures{Numbers=Lining}} % numbers in footnote labels
-%\addtokomafont{footnotereference}{\addfontfeatures{Numbers=Lining}} % numbers in footnote references
-\fi\fi
+\ifxetex
+\notbool{minimal}{
+ \addtokomafont{footnote}{\addfontfeatures{Numbers=Lining}} % numbers in footnotes
+ %\addtokomafont{footnotelabel}{\addfontfeatures{Numbers=Lining}} % numbers in footnote labels
+ %\addtokomafont{footnotereference}{\addfontfeatures{Numbers=Lining}} % numbers in footnote references
+}{}
+\fi
\raggedbottom
\deffootnote[1.5em]{1.5em}{\normalparindent}{\textsuperscript{\thefootnotemark}} % putting a space after footnotemark has undesirable side effects with footnotes that start with an empty line; instead use \xspace in the footnote definition below
\newlength{\normalparindent}
\AtBeginDocument{\setlength{\normalparindent}{\parindent}}
-\KOMAoptions{footnotes=multiple}
-
-%% http://tex.stackexchange.com/questions/28465/multiple-footnotes-at-one-point/71015#71015
-\let\oldFootnote\footnote
-\newcommand\nextToken\relax
-
-% \renewcommand\footnote[1]{% breaks more footnotes than it fixes
-% \oldFootnote{\xspace#1}\futurelet\nextToken\isFootnote}
-
-\newcommand\isFootnote{%
-\ifx\footnote\nextToken\textsuperscript{,}\fi}
-
-
-\let\oldfootnotemark\footnotemark
-\renewcommand{\footnotemark}{\upshape\oldfootnotemark}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Quotes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1354,32 +1377,40 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
%% languages
\newcommand{\lsBookLanguageEnglish}{english}
\newcommand{\lsBookLanguageFrench}{french}
+% \newcommand{\lsBookLanguageSpanish}{spanish}
\newcommand{\lsBookLanguagePortuguese}{portuguese}
\newcommand{\lsBookLanguageGerman}{german}
\newcommand{\lsBookLanguageChinese}{chinese}
-\iflsNoBabel
+\notbool{babel}{
+ \ifx\lsBookLanguage\lsBookLanguageChinese
+ \usepackage{xeCJK}%Chinese doesn't load babel, but xeCJK.
\else
- \iflsBabelShorthands
- \ifx\lsBookLanguage\lsBookLanguageEnglish
- \usepackage[ngerman,\lsBookLanguage]{babel}
- \addto\extrasenglish{\languageshorthands{german}\useshorthands{"}}
- \fi
+ \ifbool{babelshorthands}{
+ \ifx\lsBookLanguage\lsBookLanguageEnglish
+ \usepackage[ngerman,main=\lsBookLanguage]{babel}
+ \addto\extrasenglish{\languageshorthands{german}\useshorthands{"}}
+ \fi
\ifx\lsBookLanguage\lsBookLanguageFrench
- \usepackage[ngerman,\lsBookLanguage]{babel}
- \addto\extrasfrench{\languageshorthands{german}\useshorthands{"}}
- \fi
- \ifx\lsBookLanguage\lsBookLanguageGerman
- \usepackage[ngerman]{babel}% ngerman provides better hyphenation than german.
- \fi
+ \usepackage[ngerman,main=\lsBookLanguage]{babel}
+ \addto\extrasfrench{\languageshorthands{german}\useshorthands{"}}
+ \fi
+% \ifx\lsBookLanguage\lsBookLanguageSpanish
+% \usepackage[ngerman,main=\lsBookLanguage]{babel}
+% \addto\extrasspanish{\languageshorthands{german}\useshorthands{"}}
+% \fi
+ \ifx\lsBookLanguage\lsBookLanguageGerman
+ \usepackage[ngerman]{babel}
+ \fi
\ifx\lsBookLanguage\lsBookLanguagePortuguese
- \usepackage[ngerman,\lsBookLanguage]{babel}
- \addto\extrasportuges{\languageshorthands{german}\useshorthands{"}}
- \fi
- \else
+ \usepackage[ngerman,main=\lsBookLanguage]{babel}
+ \addto\extrasportuges{\languageshorthands{german}\useshorthands{"}}
+ \fi
+ }{%else babelshorthands
\usepackage[\lsBookLanguage]{babel}
- \fi
-\fi
+ }
+ \fi%Close language=chinese
+}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1391,25 +1422,19 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
style=langsci-unified,
citestyle=langsci-unified,
datamodel=langsci, % add authauthor and autheditor as possible fields to bibtex entries
- useprefix = true, %sort von, van, de where they should appear
%refsection=chapter,
maxbibnames=99,
uniquename=false,
mincrossrefs=99,
maxcitenames=2,
isbn=false,
- doi=false,
- url=false,
- eprint=false,
autolang=hyphen,
- \iflsResetCapitals
- language=english,
- \fi
+ \ifbool{resetcapitals}{language=english,}{}
backend=\lsBiblatexBackend,
indexing=cite,
- \iflsCollection\else
+ \notbool{collection}{
toc=bib, % make bibliography appear in toc
- \fi
+ }{}
]{biblatex}
% If the user provided a shortauthor in the bibtex entry, we use the authentic author (as with the
@@ -1434,51 +1459,14 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
{\indexnames{labelname}}}}} % as a fallback we index on whatever biblatex used.
{}}
-
-
-
%% DOIs are handled after hyperref.
\defbibheading{references}{\chapter{References}\sloppy}
\defbibheading{french}{\chapter{Références bibliographiques}\sloppy}
+% \defbibheading{spanish}{\chapter{Referencias bibliográficas}\sloppy}
\defbibheading{german}{\chapter{Literaturverzeichnis}\sloppy}
\defbibheading{portuguese}{\chapter{Referências}\sloppy}
\defbibheading{chinese}{\chapter{参考文献}\sloppy}
-
-% fix \citep* et.al.
-% unclear why it was overwritten, these are the definitions from blx-natbib.def
-\renewrobustcmd*{\citet}{%
- \@ifstar
- {\AtNextCite{\AtEachCitekey{\defcounter{maxnames}{999}}}%
- \textcite}
- {\textcite}}
-
-\renewrobustcmd*{\citep}{%
- \@ifstar
- {\AtNextCite{\AtEachCitekey{\defcounter{maxnames}{999}}}%
- \parencite}
- {\parencite}}
-
-\renewrobustcmd*{\citealt}{%
- \@ifstar
- {\AtNextCite{%
- \def\nameyeardelim{\addspace}%
- \AtEachCitekey{\defcounter{maxnames}{999}}}%
- \orgcite}
- {\AtNextCite{\def\nameyeardelim{\addspace}}%
- \orgcite}}
-
-\renewrobustcmd*{\citealp}{%
- \@ifstar
- {\AtNextCite{\AtEachCitekey{\defcounter{maxnames}{999}}}%
- \orgcite}
- {\orgcite}}
-
-\let\citew\citet
-
-\let\orgcite=\cite
-\let\cite=\citet % in order to prevent inconsistencies between \cite and \citet
-
%% penalties against widows and orphans in bibliography
%% http://tex.stackexchange.com/questions/297705/atbeginenvironment-does-not-work-with-natbib/297721#297721
\apptocmd{\thebibliography}{%
@@ -1496,43 +1484,37 @@ Storage and cataloguing done by \storageinstitution\\[3ex]
\usepackage{floatrow} % For adjusting the position of the caption (default is below).
\floatsetup[table]{capposition=top} % As for tables, the caption appears above.
%% This sets the default for the positioning of floats
+\usepackage[figuresright]{rotating}
+\usepackage{booktabs} % for nicer lines
+
\renewcommand{\fps@figure}{htbp}
\renewcommand{\fps@table}{htbp}
-\usepackage{booktabs} % for nicer lines
-
%% floats
%% http://mintaka.sdsu.edu/GF/bibliog/latex/floats.html
%% Alter some LaTeX defaults for better treatment of figures:
%% See p.105 of "TeX Unbound" for suggested values.
%% See pp. 199-200 of Lamport's "LaTeX" book for details.
-%% General parameters, for ALL pages:
+%% General parameters, for ALL pages:
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
-%% Parameters for TEXT pages (not float pages):
+%% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
-\setcounter{totalnumber}{4} % 2 may work better
-\setcounter{dbltopnumber}{2} % for 2-column pages
+\setcounter{totalnumber}{4} % 2 may work better
+\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
-%% Parameters for FLOAT pages (not text pages):
+%% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
- %% N.B.: floatpagefraction MUST be less than topfraction !!
+%% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
\usepackage{setspace}
\usepackage{caption}
% \captionsetup{labelfont=bf}
-\captionsetup{%
-font={%
-stretch=.8%
-,small%
-},%
-width=.8\textwidth
-}
-
+\captionsetup{font={stretch=.8,small},width=.8\textwidth}
\setcapindent{0pt}
@@ -1547,7 +1529,7 @@ width=.8\textwidth
}
%% format of the TOC entry
\renewcommand{\addchaptertocentry}[2]{
- \ifstr{#1}{}{%
+ \Ifstr{#1}{}{%
\addtocentrydefault{chapter}{}{#2}%
}{%
\addtocentrydefault{chapter}{}{\chapapp~#1: #2}%
@@ -1556,22 +1538,17 @@ width=.8\textwidth
}
-% for papers that have appendices, a replacement for \appendix.
-% Usage: \begin{paperappendix} \section{Title} ... \end{paperappendix
-% Will result in "Appendix A: Title"
-%
-\newcounter{paperappendixsection}
+% For papers that have appendices, a replacement for \appendix.
+% Usage: \begin{paperappendix} \section{Title} ... \end{paperappendix}
\newenvironment{paperappendix}{%
- \let\oldthesection\thesection%
- \let\oldsectionformat\sectionformat%
- \setcounter{paperappendixsection}{0}%
- \def\thesection{\Alph{paperappendixsection}}%
- \def\sectionformat{\stepcounter{paperappendixsection}\appendixname\ \thesection:\enskip}%
- }{%
- \let\thesection\oldthesection%
- \let\sectionformat\oldsectionformat}
-
-
+ \newcommand*{\appendixmore}{%
+ \renewcommand*\thesection{\Alph{section}}
+ \renewcommand*{\sectionformat}{%
+ \appendixname~\thesection\autodot\enskip}%
+ \renewcommand*{\sectionmarkformat}{%
+ \appendixname~\thesection\autodot\enskip}}
+ \appendix
+}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Indexes
@@ -1668,14 +1645,14 @@ width=.8\textwidth
% \fi
%% this is required by authorindex
-\newif\ifshowindex \showindexfalse
+% \newif\ifshowindex \showindexfalse
\usepackage{authorindex}
\providecommand{\isi}[1]{\is{#1}#1}
\providecommand{\iai}[1]{\ia{#1}#1}
\providecommand{\ili}[1]{\il{#1}#1}
-\iflsShowIndex % shows index commands in text
+\ifbool{showindex}{
\RequirePackage{soul}
% \RequirePackage[noadjust]{marginnote}
\renewcommand{\marginpar}{\marginnote}
@@ -1688,7 +1665,7 @@ width=.8\textwidth
\renewcommand{\il}[1]{{\tikzstyle{notestyleraw} += [text width=1.5cm]\todo[color=yellow,size=\scriptsize]{\tiny#1}\ilold{#1}}}
\renewcommand{\iai}[1]{\sethlcolor{pink}\hl{#1}\iaold{#1}}
\renewcommand{\ia}[1]{{\tikzstyle{notestyleraw} += [text width=1.5cm]\todo[color=pink,size=\scriptsize]{\tiny#1}\iaold{#1}}}
-\fi
+}{}
% integrate see also in multiple indexes
\def\igobble#1 {}
@@ -1722,6 +1699,7 @@ width=.8\textwidth
pdfusetitle=true, % puts author and title in automatically, maybe only in final mode?
pdfkeywords={},
pdfpagelayout=TwoPageRight, % first page is separate
+ hyperfootnotes=false,
%ps2pdf=true
]{hyperref}
@@ -1730,19 +1708,6 @@ width=.8\textwidth
%% http://tex.stackexchange.com/questions/66722/tex-live-2012-xelatex-moderncv-error-failed-to-convert-input-string-to-utf1
\hypersetup{unicode,pdfencoding=auto,bookmarksopenlevel=0}
-%% add hyperlinks for DOIs in bibliography; must appear after hyperref
-\usepackage{doi}
-\renewcommand{\doitext}{DOI:}
-\iflsBiblatex
-\renewbibmacro*{finentry}{\finentry
- \iffieldundef{url}{}{ \url{\thefield{url}}\iffieldundef{urlday}{}{, accessed \thefield{urlyear}-\thefield{urlmonth}-\thefield{urlday}}.}
- \restorefield{note}{\lsnote}
- \iffieldundef{note}{}{\addspace{\thefield{note}\addperiod}}
- \iffieldundef{doi}{}{ {\color{lsDOIGray}\doi{\thefield{doi}}}}
-}
-%\DeclareFieldFormat{doi}{{\color{lsGuidelinesGray}\doi{#1}}}
-\fi
-
%% autoref (part of hyperref)
\ifx\lsBookLanguage\lsBookLanguageEnglish
\renewcommand{\partautorefname}{Part}%
@@ -1761,8 +1726,6 @@ width=.8\textwidth
\providecommand{\tabref}[1]{Table~\ref{#1}}
\providecommand{\figref}[1]{Figure~\ref{#1}}
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Collection (edited volume):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1772,12 +1735,6 @@ width=.8\textwidth
\newcommand{\abstract}[1]{\renewcommand{\lsCollectionPaperAbstract}{#1}}
\newcommand{\ChapterDOI}[1]{\renewcommand{\lsChapterDOI}{#1}}
-
-%% inside \author:
-\renewcommand{\and}{}
-\newcommand{\lastand}{}
-\newcommand{\affiliation}[1]{}
-
%% to be used below chapter titles
\newcommand{\chaptersubtitle}[1]{
\vspace*{-2ex}
@@ -1785,229 +1742,172 @@ width=.8\textwidth
\chapterheadendvskip
\@afterindentfalse
\@afterheading
- }
-
-
-\iflsCollection
- \iflsBiblatex\else
- \ClassError{langsci/langscibook}{Collection option not compatible with plain BibTeX. Please use biblatex option}{}
- \fi
-
-
-\AtBeginDocument{ % for the citation in the footer
- \onlyAuthor
- \renewcommand{\newlineCover}{}
- \renewcommand{\newlineSpine}{}
- \edef\lsCollectionTitle{\@title\ifx\@subtitle\empty\else{: \@subtitle}\fi} % \edef immediately expands \@title
- \edef\lsCollectionEditor{\@author}
- \addbibresource{collection_tmp.bib}
- \if@partsw\AfterEndDocument{\typeout{langscibook Warning: You are in includeonly mode.}\typeout{The bibliographical information for the chapters in this volume have not been updated}}\else% Check for \includeonly mode
- \newwrite\tempfile % open temporary bib file
- \immediate\openout\tempfile=collection_tmp.bib
- \fi
}
-% Only touch the \tempfile if we are NOT in \includeonly mode, prevent flushing of the file
-\AtEndDocument{\if@partsw\else\immediate\closeout\tempfile\fi}% close temporary bib file
-
-%% customize \tableofcontents
-\renewcommand{\@dotsep}{2.5} % space between dots
-\renewcommand{\@tocrmarg}{1.5em} % right margin for leader
-\renewcommand{\@pnumwidth}{1.5em} % width of page numbers
-\usepackage{tocstyle}
-\usetocstyle{standard} %\usetocstyle{allwithdot}
-\settocfeature[toc]{raggedhook}{\raggedright}
-\iflsCollectionTOCLong\else
- \setcounter{tocdepth}{0}\fi % show only parts and chapters
-\settocstylefeature[-1]{pagenumberbox}{\csname @gobble\endcsname} % parts without page number
-\settocstylefeature[-1]{leaders}{\hfill} % parts without dots#
-
-\usepackage{chngcntr}
-\counterwithout{figure}{chapter}
-\counterwithout{table}{chapter}
-
-%% Modified code from:
-%% http://pastcounts.wordpress.com/2010/12/20/how-to-construct-a-collection-of-articles-with-latex/
-\newenvironment{collectionpaper}{
- \renewcommand{\documentclass}[2][]{}%
- \renewcommand{\usepackage}[2][]{}%
- \renewenvironment{document}{\begingroup}{\endgroup}%
-
- \renewcommand{\title}[1]{\renewcommand{\@title}{##1}}
- \renewcommand{\author}[1]{\renewcommand{\@author}{##1}}
- %\renewcommand{\thanks}[1]{\symbolfootnote[1]{##1}}
- \lsPaper
- }
- {}
-
-\newcommand{\includepaper}[1]{
- \begin{collectionpaper}
- \begin{refsection}
-
- \DeclareCiteCommand{\fullciteFooter}
- {\defcounter{maxnames}{\blx@maxbibnames}%
- \usebibmacro{prenote}}
- {\usedriver
- {\DeclareNameAlias{sortname}{default}}
- {\thefield{entrytype}}}
- {\multicitedelim}
- {\usebibmacro{postnote}}
- \renewcommand{\lsCollectionPaperCitationText}{\fullciteFooter{#1footer}}
-
- \include{#1}%
- \if@partsw\relax\else% This switch controls whether the included chapter is in the range of \includeonly. It's from source2e.
- \addtocounter{page}{-1}
- \edef\lsCollectionPaperLastPage{\thepage} % \lsCollectionPaperFirstPage is defined in \lsPaper
- \addtocounter{page}{1}
-
- %%% for citation in footer
- %% preprocessing of author/editor names
- \onlyAuthor
- \renewcommand{\newlineCover}{}
- \renewcommand{\newlineSpine}{}
- \renewcommand{\newlineTOC}{}
- \StrSubstitute{\@author}{,}{ and }[\authorTemp]
- \StrSubstitute{\authorTemp}{\&}{ and }[\authorTemp]
- \StrSubstitute{\lsCollectionEditor}{,}{ and }[\editorTemp]
- \StrSubstitute{\editorTemp}{\&}{ and }[\editorTemp]
-
- %% write bib entry to file
- %% FIXME: the publisher field needs a final period, since this is not provided by \fullciteFooter together with DOIs.
- \immediate\write\tempfile{@incollection{#1,author={\authorTemp},title={{\lsCollectionPaperFooterTitle}},booktitle={{\lsCollectionTitle}},editor={\editorTemp},publisher={Language Science Press.},Address={Berlin},year={\lsYear},pages={\lsCollectionPaperFirstPage --\lsCollectionPaperLastPage},doi={\lsChapterDOI},keywords={withinvolume}}}
- \immediate\write\tempfile{@incollection{#1footer,author={\authorTemp},title={{\lsCollectionPaperFooterTitle}},booktitle={{\lsCollectionTitle}},editor={\editorTemp},publisher={Language Science Press.},Address={Berlin},year={\lsYear},pages={\lsCollectionPaperFirstPage --\lsCollectionPaperLastPage},doi={\lsChapterDOI},options={dataonly=true}}}
- \fi% If the paper is not within \includeonly, don't do anything.
- \end{refsection}
- \end{collectionpaper}}
-\fi
-
-\newcommand{\onlyAuthor}{% % collection paper
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
- \renewcommand{\affiliation}[1]{}
- }
-\newcommand{\AuthorAffiliation}{
- \renewcommand{\and}{\newline\newline}
- \renewcommand{\lastand}{\newline\newline}
- \renewcommand{\affiliation}[1]{\\[0.5ex]{\normalsize ##1}}}
+\ifbool{collection}{
+ \notbool{biblatex}{
+ \ClassError{langsci/langscibook}{Collection option not compatible with plain BibTeX. Please use biblatex option}{}
+ }{}
+
+ \AtBeginDocument{% for the citation in the footer
+ \renewcommand{\newlineCover}{}
+ \renewcommand{\newlineSpine}{}
+ \edef\lsCollectionTitle{\@title\ifx\@subtitle\empty\else{: \@subtitle}\fi}% \edef immediately expands \@title
+ \edef\lsCollectionEditor{\@author}
+ \addbibresource{collection_tmp.bib}
+ \if@partsw\AfterEndDocument{\typeout{langscibook Warning: You are in includeonly mode.}\typeout{The bibliographical information for the chapters in this volume have not been updated}}\else% Check for \includeonly mode
+ \newwrite\tempfile% open temporary bib file
+ \immediate\openout\tempfile=collection_tmp.bib
+ \fi
+ }%end AtBeginDocument
+ % Only touch the \tempfile if we are NOT in \includeonly mode, prevent flushing of the file
+ \AtEndDocument{\if@partsw\else\immediate\closeout\tempfile\fi}% close temporary bib file
+
+ %% customize \tableofcontents
+ \renewcommand{\@dotsep}{2.5} % space between dots
+ \renewcommand{\@tocrmarg}{1.5em} % right margin for leader
+ \renewcommand{\@pnumwidth}{1.5em} % width of page numbers
+ \ifbool{collectiontoclong}{}{\setcounter{tocdepth}{0}}
+ \DeclareTOCStyleEntry%Settings for parts in the TOC of collected volumes
+ [
+ pagenumberbox={\csname @gobble\endcsname},
+ raggedentrytext=true,
+ linefill={\hfill}
+ ]{tocline}{part}
+
+ \usepackage{chngcntr}
+ \counterwithin{figure}{chapter}
+ \counterwithin{table}{chapter}
+
+ \NewDocumentCommand{\includepaper}{m}{
+ \bgroup
+ \renewcommand{\newlineCover}{\\}
+ \renewcommand{\documentclass}[2][]{}%
+ \renewcommand{\usepackage}[2][]{}%
+ \renewenvironment{document}{\begingroup}{\endgroup}
+ \includepaper@body
+ \begin{refsection}
+ \renewcommand{\lsCollectionPaperCitationText}{\fullciteFooter{#1footer}}
+ \include{#1}%
+ \if@partsw\relax\else% This switch controls whether the included chapter is in the range of \includeonly. It's from source2e.
+ \addtocounter{page}{-1}
+ \edef\lsCollectionPaperLastPage{\thepage} % \lsCollectionPaperFirstPage is defined in \includepaper@body
+ \addtocounter{page}{1}
+ \lsCollectionMetadataToBibliography{#1}
+ \fi% If the paper is not within \includeonly, don't do anything.
+ \end{refsection}
+ \egroup
+ } %end NewDocumentCommand
+}{}
+
+\newcommand{\lsCollectionMetadataToBibliography}[1]{%
+ \renewcommand{\newlineCover}{}
+ \renewcommand{\newlineSpine}{}
+ \renewcommand{\newlineTOC}{}
+ %% write bib entry to file
+ \immediate\write\tempfile{@incollection{#1,author={\@author},title={{\expandonce{\titleTemp}}},booktitle={{\expandonce{\lsCollectionTitle}}},editor={\lsCollectionEditor},publisher={Language Science Press.},Address={Berlin},year={\lsYear},pages={\lsCollectionPaperFirstPage --\lsCollectionPaperLastPage},doi={\lsChapterDOI},keywords={withinvolume}}}
+ \immediate\write\tempfile{@incollection{#1footer,author={\@author},title={{\expandonce{\titleTemp}}},booktitle={{\expandonce{\lsCollectionTitle}}},editor={\lsCollectionEditor},publisher={Language Science Press.},Address={Berlin},year={\lsYear},pages={\lsCollectionPaperFirstPage --\lsCollectionPaperLastPage},doi={\lsChapterDOI},options={dataonly=true}}}
+}
-\newcommand{\lsCollectionPaperHeaderAuthor}{{%
- \renewcommand{\newlineCover}{}%
- \renewcommand{\newlineTOC}{}%
- \onlyAuthor\@author}}
+\newcommand{\titleToHead}{}
+\newcommand{\titleTemp}{}
+\newcommand{\titleToToC}{}
\newcommand{\lsCollectionPaperHeaderTitle}{%
\renewcommand{\newlineCover}{}
\renewcommand{\newlineTOC}{}
- \iflsCollectionChapter%
- \thechapter\hspace{0.5em}\fi
- \@title}
-
-\newcommand{\lsCollectionPaperTOC}{{%
- \iflsCollectionChapter%
- \protect\numberline{\thechapter}\fi
- \@title\ \newline{\normalfont\@author}}} % space between \@title and \newline is needed for bookmarks
-
-\newcommand{\localizedchaptestring}{Chapter}
-\newcommand{\lsCollectionPaperTitle}{{%
- \renewcommand{\newlineTOC}{}
- \renewcommand{\newlineCover}{\\}
- \renewcommand{\chapterheadstartvskip}{}
- {\LARGE \noindent \hspace*{-.7cm} \localizedchaptestring~\thechapter}\\ %there must be a better way to undo this length than a hard value
- \bigskip
- \@title}}
-
-\newcommand{\lsCollectionPaperFooterTitle}{\@title}
+ \if@mainmatter%Only send the chapter num to head if in mainmatter.
+ \thechapter\hspace{0.5em}\titleToHead\else\titleToHead
+ \fi
+}
-\newcommand{\lsCollectionPaperFrontmatterMode}{% %%% Sometimes, chapters like prefaces appear in edited volumes that need special treatment in their headers and TOC
- \renewcommand{\lsCollectionPaperTitle}{{%
- \renewcommand{\newlineTOC}{}
- \renewcommand{\newlineCover}{\\}
- \\[-1\baselineskip]
- \noindent{\LARGE ~}\\
- \bigskip
- \noindent\@title}}
-
- \renewcommand{\lsCollectionPaperTOC}{{%
- \iflsCollectionChapter%
- \protect\numberline{~}\fi
- \@title\ \newline{\normalfont\@author}}}
+\newcommand{\includepaper@body}{%
+ \RenewDocumentCommand{\title}{O{##2} m O{##2}}{
+ \renewcommand{\titleToHead}{##1}
+ \renewcommand{\titleTemp}{##2}
+ \renewcommand{\titleToToC}{##3}
+ }
+ \renewcommand{\author}[1]{\renewcommand{\@author}{##1}}
+ \renewcommand*{\thesection}{\arabic{section}}
+ \RedeclareSectionCommand
+ [afterskip=1.15\baselineskip plus .1\baselineskip minus .167\baselineskip]
+ {chapter}
+ \renewcommand{\maketitle}{%
+ % With \setchapterpreamble from scrbook, we ensure that the author(s)
+ % and their affiliation(s) are part of the \chapter block.
+ \setchapterpreamble[u]{\ResolveAffiliations{\@author}\\}
+ \chapter
+ [tocentry={\titleToToC~\newline{\normalfont\ResolveAffiliations{\@author}}}]
+ {\titleTemp}
+ \begin{quote}
+ \small\lsCollectionPaperAbstract
+ \end{quote}
+ % Save the current page for the bibliographical information in the
+ % chapter footer
+ \global\edef\lsCollectionPaperFirstPage{\thepage}
+ \renewcommand{\newlineCover}{}
+ \renewcommand{\newlineTOC}{\\}
+ \ifoot[\lsCollectionPaperCitation]{%
+ \ifbool{draft}{Draft of \today, \currenttime}{}
+ }
+ \ifx\@epigram\empty
+ \else {\epigraph{\@epigram\\[-2\baselineskip]}{\@epigramsource}
+ \epigram{}\epigramsource{}}
+ \fi
+ \enlargethispage{-1\baselineskip}
+ }
+ \ohead{}
+ \lehead{\ResolveAffiliations[output affiliation=false,
+ output authors font=\normalfont\slshape,
+ separator between two={~\&~},
+ separator between multiple={,~},
+ separator between final two={~\&~}
+ ]{\@author}}
+ \rohead{\lsCollectionPaperHeaderTitle}
+ % The following ensure that a chapter is treated as a heading, which
+ % controls page break penalties and indentation following the heading.
+ \@afterindentfalse\@afterheading
}
-\newcommand{\lsCollectionPaperMainmatterMode}{% %%% This resets the changes done by FrontmatterMode
- \renewcommand{\lsCollectionPaperTitle}{{%
- \renewcommand{\newlineTOC}{}
- \renewcommand{\newlineCover}{\\}
- \\[-1\baselineskip]
-% \vspace*{-2\baselineskip}
- \noindent{\LARGE Chapter \thechapter}\\
- \bigskip
- \@title}}
-
- \renewcommand{\lsCollectionPaperTOC}{{%
- \iflsCollectionChapter%
- \protect\numberline{\thechapter}\fi
- \@title\ \newline{\normalfont\@author}}}}
+\newcommand{\lsCollectionPaperFooterTitle}{\titleTemp}
\newcommand{\lsCollectionPaperAuthor}{{%
- \renewcommand{\newlineTOC}{}
- \renewcommand{\newlineCover}{\\[0.5ex]}
- \AuthorAffiliation\Large\@author}}
+ \renewcommand{\newlineTOC}{}
+ \renewcommand{\newlineCover}{\\[0.5ex]}
+ \AuthorAffiliation\Large\@author}
+}
\newcommand{\lsCollectionPaperCitation}{\scalebox{1.2}{%
- \includechapterfooterlogo}%
- % \hspace{0.8em}%
- \hfill%
- \parbox[b]{.87\textwidth}{\linespread{0.8}\lsChapterFooterSize\normalfont\lsCollectionPaperCitationText \includegraphics[height=.75em]{ccby.pdf}}}
-\ifx\lsOutput\lsOutputPaper % only if output==paper
+ \includechapterfooterlogo}%
+ % \hspace{0.8em}%
+ \hfill%
+ \parbox[b]{.87\textwidth}{\linespread{0.8}\lsChapterFooterSize\normalfont\lsCollectionPaperCitationText
+ \IfFileExists{./ccby.pdf}{
+ \includegraphics[height=.75em]{ccby.pdf}
+ }{🅭🅯}
+ }
+}
+
+\ifbool{paper}{
\renewcommand{\lsCollectionPaperCitation}{Change with \string\papernote}
-\fi
+}{} %end paper
\newcommand{\lsCollectionPaperCitationText}{\string\lsCollectionPaperCitationText.}
\newcommand{\papernote}[1]{
- \renewcommand{\lsCollectionPaperCitation}{#1}}
-
-\newcommand{\lsPaper}{
- \renewcommand{\maketitle}{
- \refstepcounter{chapter}
- \addchap*{\lsCollectionPaperTitle}
- \global\edef\lsCollectionPaperFirstPage{\thepage} % for citation in footer
- \onlyAuthor
- \renewcommand{\newlineCover}{}
- \renewcommand{\newlineTOC}{\\}
- \addcontentsline{toc}{chapter}{\lsCollectionPaperTOC}%
- \ifoot[\lsCollectionPaperCitation]{\iflsDraft Draft of \today, \currenttime \fi}
- \vspace*{-2ex}
- \lsCollectionPaperAuthor%
- \vspace*{\baselineskip}%
- \ifx\@epigram\empty%
- \else {\epigraph{\@epigram\\[-5ex]}{\@epigramsource}%
- \epigram{}\epigramsource{}}%
- \fi%
- \begin{quote}
- \small\lsCollectionPaperAbstract
- \end{quote}
- }
-
- \renewcommand*{\thesection}{\arabic{section}}
- \setcounter{section}{0}
- \setcounter{footnote}{0}
- \setcounter{figure}{0}
- \setcounter{table}{0}
- \setcounter{equation}{0} % for examples
- \ohead{}
- \lehead{\lsCollectionPaperHeaderAuthor}
- \rohead{\lsCollectionPaperHeaderTitle}
+ \renewcommand{\lsCollectionPaperCitation}{#1}
}
\providecommand\shorttitlerunninghead[1]{\rohead{\thechapter\hspace{.5em} #1}}
-\providecommand{\markuptitle}[2]{
- \title{\texorpdfstring{#1}{#2}}
- \shorttitlerunninghead{#2}
- \renewcommand{\lsChapterFooterSize}{\scriptsize}
- \renewcommand{\lsCollectionPaperFooterTitle}{Add\noexpand\texttt{\textbackslash renewcommand\{\textbackslash lsCollectionPaperFooterTitle\}\{A new theory of \textbackslash noexpand\textbackslash textit\{This\} and \textbackslash noexpand\textbackslash textit\{that\}\}} to preamble}
-}
+% In output==paper, the title is generated with the info
+% collected by the commands above.
+\ifbool{paper}{
+ \usepackage{chngcntr}
+ \counterwithout{figure}{chapter}
+ \counterwithout{table}{chapter}
+ \includepaper@body
+}{} %end paper
%writeout page numbers for separation of chapters
@@ -2026,28 +1926,61 @@ width=.8\textwidth
% Localisation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-
\ifx\lsBookLanguage\lsBookLanguageFrench
- \renewcommand{\chapref}[1]{Chapitre~\ref{#1}}
- \renewcommand{\partref}[1]{Partie~\ref{#1}}
- \renewcommand{\tabref}[1]{Tableau~\ref{#1}}
- \renewcommand{\figref}[1]{Figure~\ref{#1}}
+ \renewcommand{\chapref}[1]{Chapitre~\ref{#1}}
+ \renewcommand{\partref}[1]{Partie~\ref{#1}}
+ \renewcommand{\tabref}[1]{Tableau~\ref{#1}}
+ \renewcommand{\figref}[1]{Figure~\ref{#1}}
\fi
+% \ifx\lsBookLanguage\lsBookLanguageSpanish
+% \renewcommand{\chapref}[1]{Capítulo~\ref{#1}}
+% \renewcommand{\partref}[1]{Parte~\ref{#1}}
+% \renewcommand{\tabref}[1]{Tabla~\ref{#1}}
+% \renewcommand{\figref}[1]{Figura~\ref{#1}}
+% \fi
+
\ifx\lsBookLanguage\lsBookLanguageGerman
- \renewcommand{\chapref}[1]{Kapitel~\ref{#1}}
- \renewcommand{\partref}[1]{Teil~\ref{#1}}
- \renewcommand{\tabref}[1]{Tabelle~\ref{#1}}
- \renewcommand{\figref}[1]{Abbildung~\ref{#1}}
+ \renewcommand{\chapref}[1]{Kapitel~\ref{#1}}
+ \renewcommand{\partref}[1]{Teil~\ref{#1}}
+ \renewcommand{\tabref}[1]{Tabelle~\ref{#1}}
+ \renewcommand{\figref}[1]{Abbildung~\ref{#1}}
\fi
\ifx\lsBookLanguage\lsBookLanguagePortuguese
- \renewcommand{\chapref}[1]{Capítulo~\ref{#1}}
- \renewcommand{\partref}[1]{Parte~\ref{#1}}
- \renewcommand{\tabref}[1]{Tabela~\ref{#1}}
- \renewcommand{\figref}[1]{Figura~\ref{#1}}
+ \renewcommand{\chapref}[1]{Capítulo~\ref{#1}}
+ \renewcommand{\partref}[1]{Parte~\ref{#1}}
+ \renewcommand{\tabref}[1]{Tabela~\ref{#1}}
+ \renewcommand{\figref}[1]{Figura~\ref{#1}}
+\fi
+
+\ifx\lsBookLanguage\lsBookLanguageChinese
+ %%Fonts for Chinese typesetting. If booklanguage=chinese, then
+ %%xeCJK is loaded, which provides the font commands below.
+ \setCJKmainfont[BoldFont = SourceHanSerifSC-Semibold.otf]{SourceHanSerifSC-Regular.otf}
+
+ \setCJKsansfont[BoldFont = SourceHanSansSC-Bold.otf]{SourceHanSansSC-Regular.otf}
+
+ %% Settings for Punctuation
+ \xeCJKsetup{CheckFullRight=true}
+ \xeCJKsetup{PunctStyle=CCT}
+
+ %% Localisation strings
+ \renewcommand{\sectionname}{节}
+ \renewcommand{\figurename}{图}
+ \renewcommand{\tablename}{表}
+ \renewcommand{\contentsname}{目\hspace{1em}录}
+ \renewcommand{\appendixname}{附录}
+ % \renewcommand{\chapref}[1]{}
+ % \renewcommand{\partref}[1]{}
+ \renewcommand{\tabref}[1]{表~\ref{#1}}
+ \renewcommand{\figref}[1]{图~\ref{#1}}
+ \renewcommand{\sectref}[1]{节~\ref{#1}}
+ \renewcommand*{\partformat}{第\zhdig{part}部分\hspace{20pt}}
+ \renewcommand*{\partheadmidvskip}{}
+ \renewcommand*{\chapterformat}{第\zhnum{chapter}章\hspace{20pt}}
+ \renewcommand*{\raggedchapter}{\centering}
+ \renewcommand*{\sectionformat}{\thesection\hspace{10pt}}
\fi
\newcommand{\lsIndexTitle}{Index}
@@ -2058,47 +1991,63 @@ width=.8\textwidth
\newcommand{\lsAcknowledgementTitle}{Acknowledgments}
\newcommand{\lsAbbreviationsTitle}{Abbreviations}
\newcommand{\lsReferencesTitle}{references} % This aligns with \defbibheading
-% \IfFileExists{{\localepath langsci-hyphenation-universal}}{\input{\localepath langsci-hyphenation-universal}}{}
\ifx\lsBookLanguage\lsBookLanguageFrench
-\renewcommand{\lsIndexTitle}{Index}
-\renewcommand{\lsNameIndexTitle}{Index des auteurs cités}
-\renewcommand{\lsSubjectIndexTitle}{Index des termes}
-\renewcommand{\lsLanguageIndexTitle}{Index des langues}
-\renewcommand{\lsPrefaceTitle}{Préface}
-\renewcommand{\lsAcknowledgementTitle}{Remerciements}
-\renewcommand{\lsAbbreviationsTitle}{Liste des abréviations utilisées dans les gloses des exemples}
-\renewcommand{\lsReferencesTitle}{french}
- \iflsNoBabel
- \else
- \renewcommand\frenchfigurename{Figure}
- \renewcommand\frenchtablename{Table}
- \fi
-% \IfFileExists{{\localepath langsci-hyphenation-fr}}{\input{\localepath langsci-hyphenation-fr}}{}
+ \renewcommand{\lsIndexTitle}{Index}
+ \renewcommand{\lsNameIndexTitle}{Index des auteurs cités}
+ \renewcommand{\lsSubjectIndexTitle}{Index des termes}
+ \renewcommand{\lsLanguageIndexTitle}{Index des langues}
+ \renewcommand{\lsPrefaceTitle}{Préface}
+ \renewcommand{\lsAcknowledgementTitle}{Remerciements}
+ \renewcommand{\lsAbbreviationsTitle}{Liste des abréviations utilisées dans les gloses des exemples}
+ \renewcommand{\lsReferencesTitle}{french}
+ \ifbool{babel}{
+ \renewcommand\frenchfigurename{Figure}
+ \renewcommand\frenchtablename{Table}
+ }{}
\fi
+% \ifx\lsBookLanguage\lsBookLanguageSpanish
+% \renewcommand{\lsIndexTitle}{Índices}
+% \renewcommand{\lsNameIndexTitle}{Índice nominal}
+% \renewcommand{\lsSubjectIndexTitle}{Índice temático}
+% \renewcommand{\lsLanguageIndexTitle}{Índice de idiomas}
+% \renewcommand{\lsPrefaceTitle}{Prefacio}
+% \renewcommand{\lsAcknowledgementTitle}{Agradecimientos}
+% \renewcommand{\lsAbbreviationsTitle}{Abreviaciones}
+% \renewcommand{\lsReferencesTitle}{spanish}
+% \fi
+
\ifx\lsBookLanguage\lsBookLanguageGerman
-\renewcommand{\lsIndexTitle}{Register}
-\renewcommand{\lsNameIndexTitle}{Autorenregister}
-\renewcommand{\lsSubjectIndexTitle}{Sachregister}
-\renewcommand{\lsLanguageIndexTitle}{Sprachregister}
-\renewcommand{\lsPrefaceTitle}{Vorwort}
-\renewcommand{\lsAcknowledgementTitle}{Danksagung}
-\renewcommand{\lsAbbreviationsTitle}{Abkürzungsverzeichnis}
-\renewcommand{\lsReferencesTitle}{german}
-% \IfFileExists{{\localepath langsci-hyphenation-de}}{\input{\localepath langsci-hyphenation-de}}{}
+ \renewcommand{\lsIndexTitle}{Register}
+ \renewcommand{\lsNameIndexTitle}{Autorenregister}
+ \renewcommand{\lsSubjectIndexTitle}{Sachregister}
+ \renewcommand{\lsLanguageIndexTitle}{Sprachregister}
+ \renewcommand{\lsPrefaceTitle}{Vorwort}
+ \renewcommand{\lsAcknowledgementTitle}{Danksagung}
+ \renewcommand{\lsAbbreviationsTitle}{Abkürzungsverzeichnis}
+ \renewcommand{\lsReferencesTitle}{german}
\fi
\ifx\lsBookLanguage\lsBookLanguagePortuguese
-\renewcommand{\lsIndexTitle}{Índices}
-\renewcommand{\lsNameIndexTitle}{Índice remissivo de autores citados}
-\renewcommand{\lsSubjectIndexTitle}{Índice remissivo temático}
-\renewcommand{\lsLanguageIndexTitle}{Índice remissivo de línguas}
-\renewcommand{\lsPrefaceTitle}{Prefácio}
-\renewcommand{\lsAcknowledgementTitle}{Agradecimentos}
-\renewcommand{\lsAbbreviationsTitle}{\colorbox{red}{Translation info for Abbv missing}}
-\renewcommand{\lsReferencesTitle}{portugese}
-% \IfFileExists{{\localepath langsci-hyphenation-pt}}{\input{\localepath langsci-hyphenation-pt}}{}
+ \renewcommand{\lsIndexTitle}{Índices}
+ \renewcommand{\lsNameIndexTitle}{Índice remissivo de autores citados}
+ \renewcommand{\lsSubjectIndexTitle}{Índice remissivo temático}
+ \renewcommand{\lsLanguageIndexTitle}{Índice remissivo de línguas}
+ \renewcommand{\lsPrefaceTitle}{Prefácio}
+ \renewcommand{\lsAcknowledgementTitle}{Agradecimentos}
+ \renewcommand{\lsAbbreviationsTitle}{\colorbox{red}{Translation info for Abbv missing}}
+ \renewcommand{\lsReferencesTitle}{portugese}
+\fi
+
+\ifx\lsBookLanguage\lsBookLanguageChinese
+ \renewcommand{\lsIndexTitle}{索引}
+ \renewcommand{\lsNameIndexTitle}{人名索引}
+ \renewcommand{\lsSubjectIndexTitle}{术语索引}
+ \renewcommand{\lsLanguageIndexTitle}{语言索引}
+ \renewcommand{\lsPrefaceTitle}{前言}
+ \renewcommand{\lsAcknowledgementTitle}{致谢}
+ \renewcommand{\lsAbbreviationsTitle}{\colorbox{red}{Translation info for Abbv missing}}
\fi
@@ -2106,31 +2055,25 @@ width=.8\textwidth
% Miscellaneous
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[figuresright]{rotating}
-
-%% hspace over width of something without showing it
\newlength{\LSPTmp}
-\newcommand*{\hspaceThis}[1]{\settowidth{\LSPTmp}{#1}\hspace*{\LSPTmp}}
-
-% no this does add vertical space instead of horizontal St. Mü. 04.03.2018
-% \newcommand*{\hspaceThis}[1]{\hphantom{#1}} %should be equivalent
-
-% in this example
-%% \eal
-%% \ex \hspaceThis{*~}The boy who is running fast can jump high. $\to$\\
-%% {}* Is the boy who running fast can jump high?
-%% \ex \hspaceThis{*~}The boy who can run fast can jump high. $\to$\\
-%% {}* Can the boy who run fast can jump high?
-%% \zl
-
-\iflsArseneau% Donald Arseneau's automatic handling of page breaking from comp.text.tex: https://groups.google.com/d/topic/comp.text.tex/3eehwzortPg/discussion
-% With the optimisations from the memoir class. The memoir class has relative instead of absolute values.
-\def\sloppybottom{%
- \def\@textbottom{\vskip \z@ \@plus.0001fil \@minus .95\topskip}%
- \topskip=1\topskip \@plus 0.625\topskip \@minus .95\topskip%
- \def\@texttop{\vskip \z@ \@plus -0.625\topskip \@minus -0.95\topskip}%
+\ifbool{uniformtopskip}{}{% Donald Arseneau's automatic handling of page breaking from comp.text.tex: https://groups.google.com/d/topic/comp.text.tex/3eehwzortPg/discussion
+ % With the optimisations from the memoir class. The memoir class has relative instead of absolute values.
+ \newlength{\lsSaveValueTopSkip}
+ \lsSaveValueTopSkip=\topskip
+ \let\lsSaveValueTextTop\@texttop
+ \let\lsSaveValueTextBottom\@textbottom
+ \def\restorebottom{%
+ \topskip=\lsSaveValueTopSkip
+ \let\@texttop\lsSaveValueTextTop
+ \let\@textbottom\lsSaveValueTextBottom
+ }
+
+ \def\sloppybottom{%
+ \def\@textbottom{\vskip \z@ \@plus.0001fil \@minus .95\topskip}%
+ \topskip=1\topskip \@plus 0.625\topskip \@minus .95\topskip%
+ \def\@texttop{\vskip \z@ \@plus -0.625\topskip \@minus -0.95\topskip}%
+ }
+ \sloppybottom
}
-\sloppybottom
-\fi
\endinput