summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-09 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2022-01-09 03:00:53 +0000
commitfbacb8167ccd172bb0b177974778f228ad41691d (patch)
tree8ad1c76a4dabddbc25abf75b1bc14238e811e9c4 /macros/latex/contrib
parentcd2e7ab7ef89a5c3c1935281009729bff0f357e2 (diff)
CTAN sync 202201090300
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/dbshow/dbshow-doc.pdfbin348241 -> 388176 bytes
-rw-r--r--macros/latex/contrib/dbshow/dbshow-doc.tex444
-rw-r--r--macros/latex/contrib/dbshow/dbshow.sty168
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx164
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin595293 -> 590081 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex86
-rw-r--r--macros/latex/contrib/hvlogos/Changes4
-rw-r--r--macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdfbin76488 -> 85963 bytes
-rw-r--r--macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex85
-rw-r--r--macros/latex/contrib/hvlogos/latex/hvlogos.sty62
-rw-r--r--macros/latex/contrib/iexec/DEPENDS.txt1
-rw-r--r--macros/latex/contrib/iexec/iexec.pdfbin107811 -> 124366 bytes
-rw-r--r--macros/latex/contrib/iexec/iexec.sty54
-rw-r--r--macros/latex/contrib/iexec/iexec.tex12
-rw-r--r--macros/latex/contrib/kdpcover/DEPENDS.txt4
-rw-r--r--macros/latex/contrib/kdpcover/kdpcover.cls139
-rw-r--r--macros/latex/contrib/kdpcover/kdpcover.pdfbin103977 -> 104864 bytes
-rw-r--r--macros/latex/contrib/kdpcover/kdpcover.tex2
-rw-r--r--macros/latex/contrib/sapthesis/README24
-rw-r--r--macros/latex/contrib/sapthesis/examples/LaureaMagistrale_eng.tex216
-rw-r--r--macros/latex/contrib/sapthesis/examples/LaureaMagistrale_ita.tex221
-rw-r--r--macros/latex/contrib/sapthesis/examples/Laurea_ita.tex218
-rw-r--r--macros/latex/contrib/sapthesis/examples/Master.tex219
-rw-r--r--macros/latex/contrib/sapthesis/examples/PhD.tex221
-rw-r--r--macros/latex/contrib/sapthesis/examples/Specialization.tex220
-rw-r--r--macros/latex/contrib/sapthesis/examples/TFA.tex229
-rw-r--r--macros/latex/contrib/sapthesis/sapienza-MLblack-pos.pdfbin16817 -> 0 bytes
-rw-r--r--macros/latex/contrib/sapthesis/sapienzalogo.pdf (renamed from macros/latex/contrib/sapthesis/sapienza-MLred-pos.pdf)bin16467 -> 16467 bytes
-rw-r--r--macros/latex/contrib/sapthesis/sapthesis-doc.pdfbin233337 -> 365890 bytes
-rw-r--r--macros/latex/contrib/sapthesis/sapthesis-doc.tex532
-rw-r--r--macros/latex/contrib/sapthesis/sapthesis.cls1152
-rw-r--r--macros/latex/contrib/tasks/README6
-rw-r--r--macros/latex/contrib/tasks/tasks-manual.cls275
-rw-r--r--macros/latex/contrib/tasks/tasks-manual.pdfbin476534 -> 491114 bytes
-rw-r--r--macros/latex/contrib/tasks/tasks-manual.tex17
-rw-r--r--macros/latex/contrib/tasks/tasks.cfg2
-rw-r--r--macros/latex/contrib/tasks/tasks.sty26
37 files changed, 1780 insertions, 3023 deletions
diff --git a/macros/latex/contrib/dbshow/dbshow-doc.pdf b/macros/latex/contrib/dbshow/dbshow-doc.pdf
index 3809cbc296..fd03985433 100644
--- a/macros/latex/contrib/dbshow/dbshow-doc.pdf
+++ b/macros/latex/contrib/dbshow/dbshow-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/dbshow/dbshow-doc.tex b/macros/latex/contrib/dbshow/dbshow-doc.tex
index 02332a1257..40bef33d17 100644
--- a/macros/latex/contrib/dbshow/dbshow-doc.tex
+++ b/macros/latex/contrib/dbshow/dbshow-doc.tex
@@ -11,6 +11,10 @@
\tcbuselibrary{listings, skins, raster, breakable}
\usepackage{tabularray}
+\def\zhdate{2022年1月8日}
+\def\endate{2022/01/08}
+\def\version{v1.2}
+
\IndexPrologue
{
\section*{Index}
@@ -122,21 +126,27 @@
\DeclareDocumentCommand \opt { O{} m }
{ \__codedoc_cmd:no {#1} { #2 } }
+
+\NewDocumentCommand \linktarget { m m m } {%
+ \hyperlink{#1}{#3}%
+ \raisebox{1em}{\hypertarget{#2}{}}%
+}
\ExplSyntaxOff
\begin{document}
\title{
- \pkg{dbshow} 宏包
- \protect\footnote{\url{https://github.com/ZhiyuanLck/dbshow}}
+ \pkg{dbshow} 宏包 \version%
+ \protect\footnote{%
+ 代码仓库:\url{https://github.com/ZhiyuanLck/dbshow},
+ QQ群:788706534}
\rlap{\makebox[4cm][r]{
\normalsize $\Longrightarrow$ \color{red}
- \protect\hyperlink{en}{English Version}
- \protect\hypertarget{zh}{}
+ \linktarget{en}{zh}{English Version}
}}
}
\author{\textit{李昌锴} \texttt{<lichangkai225@qq.com>}}
-\date{2022年1月7日}
+\date{\zhdate}
\maketitle
\tableofcontents
@@ -153,6 +163,8 @@
和其他数据库宏包比如 \pkg{datatool} 相比,\pkg{dbshow} 更专注于非图表类型的数
据展示。
+\subsection{数据类型}
+
宏包基于 \pkg{expl3} 的基础类型构建了6种类型:
\begin{Description}[\texttt{clist}]
\item[\texttt{date}]
@@ -170,8 +182,21 @@
逗号分隔的列表类型。默认值为空列表。
\end{Description}
+\subsection{与 \pkg{datatool} 的区别}
+
+从核心功能上看,\pkg{dbshow} 和 \pkg{datatool} 实现了相同的功能。区别在于
+\pkg{dbshow} 基于 \pkg{expl3} 实现,支持字符串的正则匹配,还支持多级排序。使用
+方式上更倾向于样式与内容分离,所有的样式都可以通过选项提前定义好并且可以复用。
+\pkg{dbshow} 并没有实现从外部文件读取数据以及将数据持久化的功能,我认为这些应
+该是更专业的外部程序的工作而不应该在 \LaTeX 中设计这些功能。因此,\pkg{dbshow}
+只提供了一个运行时的临时数据库,足够轻便且满足大部分正常需求。如果你想删除或修
+改数据库中某一条记录,请去对应的位置删除或修改掉对应的 \env{dbitem} 环境,而不
+是让宏包提供一个输出某一行记录的命令。某种意义上记录数据库的 \TeX 源文件本身就
+是数据的一种持久化。
+
\section{接口文档}
-\subsection{\cs{dbNewDatabase}}
+
+\subsection{创建、展示和清空数据库}
\begin{function}{\dbNewDatabase, \dbNewDatabase*}
\begin{syntax}
\cs{dbNewDatabase} \oarg{base database} \marg{database} \{ \\
@@ -222,6 +247,23 @@
}
\end{verbatim}
+\begin{function}{\dbshow}
+ \begin{syntax}
+ \cs{dbshow} \marg{style} \marg{database}
+ \end{syntax}
+
+ 使用 \meta{style} 样式来展示 \meta{database}。
+\end{function}
+
+\begin{function}{\dbclear}
+ \begin{syntax}
+ \cs{dbclear} \marg{database}
+ \end{syntax}
+
+ 清空 \meta{database} 里的所有内容。
+
+\end{function}
+
\subsection{\cs{dbNewStyle} 和样式选项}
\begin{function}{\dbNewStyle}
@@ -233,7 +275,7 @@
\meta{base styles},比如 |\dbNewStyle[base1, base2]{new-style}{ques}{}|。
\end{function}
-\bigskip
+\subsubsection{通用选项}
\begin{option}{opt=filter, desc={= \meta{filter}}, init=-none-}
为当前样式设置由 \cs{dbCombineFilters} 所定义的过滤器
@@ -282,6 +324,68 @@
\end{verbatim}
\begin{option}{
+ opt = item-code,
+ desc = {= \meta{item code}}
+}
+ 该选项用来设置展示数据库中每条记录的代码。你可以使用 \cs{dbuse} 来展示属性的
+ 值。
+\end{option}
+
+\begin{option}{
+ opt = {\meta{attr}/sep},
+ desc = {= \meta{sep spec}},
+ init = {,~\~}
+}
+\begin{Syntax}
+ \meta{attr}/sep = \meta{separator} \\
+ \meta{attr}/sep = \{ \\
+ ~~\meta{separator between two}, \\
+ ~~\meta{separator between more than two}, \\
+ ~~\meta{separator between final two} \\
+ \}
+\end{Syntax}
+
+ 该选项只适用于类型为 |clist| 的属性,用来设置列表间元素的间隔。第一个版本接
+ 受一个参数,将所有的元素间隔设置为 \meta{separator}。第二个版本接受逗号分隔
+ 的三个参数,分别用来设置只有两个元素时的分隔符 \meta{separator between two},
+ 超过两个元素时的分隔符 \meta{separator between more than two},和最后两个元
+ 素之间的分隔符 \meta{separator between final two}。
+
+\end{option}
+
+\subsubsection{装饰器}
+
+下面这些选项在不同层次上装饰原有的展示代码,有些其实不必通过选项的形式来装饰,
+但这样做的好处是可以进一步使样式与内容分离。下面的例子中,\meta{style1} 和
+\meta{style2} 是相同的样式,都用 * 将 \meta{attr1} 包裹住了,但是如果你还想定
+义一个样式用 = 将 \meta{attr1} 包裹住,如果用 \meta{style1} 的方式,那就可能
+需要重复大片代码,用 \meta{style2} 的方式则可以很轻松的继承 \meta{style1} 中的
+代码。
+
+\begin{verbatim}
+ \dbNewStyle{style1}{db}{
+ item-code = {%
+ *\rvuse{attr1}*\rvuse{attr2}
+ % more code
+ }
+ }
+ \dbNewStyle{base-style}{db}{
+ item-code = {%
+ \rvuse{attr1}\rvuse{attr2}
+ % more code
+ }
+ }
+ \dbNewStyle[base-style]{style2}{db}{
+ attr1/before-code = { * },
+ attr1/after-code = { * },
+ }
+ \dbNewStyle[base-style]{style3}{db}{
+ attr1/before-code = { = },
+ attr1/after-code = { = },
+ }
+\end{verbatim}
+
+\begin{option}{
opt = before-code,
desc = {= \meta{before code}}
}
@@ -296,11 +400,17 @@
\end{option}
\begin{option}{
- opt = item-code,
- desc = {= \meta{item code}}
+ opt = record-before-code,
+ desc = {= \meta{before code}}
}
- 该选项用来设置展示数据库中每条记录的代码。你可以使用 \cs{dbuse} 来展示属性的
- 值。
+ 该选项用来设置在展示当前记录之前需要执行的代码。
+\end{option}
+
+\begin{option}{
+ opt = record-after-code,
+ desc = {= \meta{after code}}
+}
+ 该选项用来设置在展示当前记录之后需要执行的代码。
\end{option}
\begin{option}{
@@ -320,29 +430,7 @@
\end{option}
\begin{option}{
- opt = {\meta{attr}/sep},
- desc = {= \meta{sep spec}},
- init = {,~\~}
-}
-\begin{Syntax}
- \meta{attr}/sep = \meta{separator} \\
- \meta{attr}/sep = \{ \\
- ~~\meta{separator between two}, \\
- ~~\meta{separator between more than two}, \\
- ~~\meta{separator between final two} \\
- \}
-\end{Syntax}
-
- 该选项只适用于类型为 |clist| 的属性,用来设置列表间元素的间隔。第一个版本接
- 受一个参数,将所有的元素间隔设置为 \meta{separator}。第二个版本接受逗号分隔
- 的三个参数,分别用来设置只有两个元素时的分隔符 \meta{separator between two},
- 超过两个元素时的分隔符 \meta{separator between more than two},和最后两个元
- 素之间的分隔符 \meta{separator between final two}。
-
-\end{option}
-
-\begin{option}{
- opt = item-before-code,
+ opt = {\meta{attr}/item-before-code},
desc = {= \meta{before code}}
}
该选项只适用于类型为 |clist| 的属性,用来设置展示列表每个元素前需要执行的代
@@ -350,7 +438,7 @@
\end{option}
\begin{option}{
- opt = item-after-code,
+ opt = {\meta{attr}/item-after-code},
desc = {= \meta{after code}}
}
该选项只适用于类型为 |clist| 的属性,用来设置展示列表每个元素后需要执行的代
@@ -474,29 +562,26 @@
\subsection{\cs{dbsave} 和 \cs{dbuse}}
-\begin{function}{\dbsave, \dbuse}
+\begin{function}{\dbsave}
\begin{syntax}
- \cs{dbsave} \marg{attr} \marg{data} \\
- \cs{dbuse} \marg{attr} \\
+ \cs{dbsave} \marg{attr} \marg{data}
\end{syntax}
- \cs{dbsave} 用来存储数据,只能在 \env{item} 环境中使用。\cs{dbuse} 用来使用
- 数据,只能在 \opt{item-code} 选项中使用。
+ \cs{dbsave} 用来存储数据,只能在 \env{item} 环境中使用。
\end{function}
-\subsection{使用 \cs{dbshow} 展示数据库}
-
-\begin{function}{\dbshow}
+\begin{function}[EXP]{\dbuse}
\begin{syntax}
- \cs{dbshow} \marg{style} \marg{database}
+ \cs{dbuse} \marg{attr}
\end{syntax}
- 使用 \meta{style} 样式来展示 \meta{database}。
+ \cs{dbuse} 用来使用数据,只能在 \opt{item-code} 选项中使用。\cs{dbuse} 是可
+ 展开的。
\end{function}
\subsection{条件判别式}
-\begin{function}{\dbIfEmptyT, \dbIfEmptyF, \dbIfEmptyTF}
+\begin{function}[EXP]{\dbIfEmptyT, \dbIfEmptyF, \dbIfEmptyTF}
\begin{syntax}
\cs{dbIfEmptyTF} \marg{true code} \marg{false code} \\
\cs{dbIfEmptyT} \marg{true code} \\
@@ -514,44 +599,6 @@
}
\end{verbatim}
-\begin{function}{\dbItemIfEmptyT, \dbItemIfEmptyF, \dbItemIfEmptyTF}
- \begin{syntax}
- \cs{dbItemIfEmptyTF} \marg{true code} \marg{false code} \\
- \cs{dbItemIfEmptyT} \marg{true code} \\
- \cs{dbItemIfEmptyF} \marg{false code}
- \end{syntax}
-
- 该判别式用来判断当前元素是否为空。下面的示例展示了如何在展示 |database-test|
- 数据库中 |text| 属性的元素时在元素非空的时候前后都加上 |*|。
-\end{function}
-
-\begin{verbatim}
- \dbNewStyle{style-cond2}{database-test}{
- text/before-code = {\dbItemIfEmptyF{*}},
- text/after-code = {\dbItemIfEmptyF{*}},
- }
-\end{verbatim}
-
-\begin{function}{\dbClistItemIfEmptyT, \dbClistItemIfEmptyF, \dbClistItemIfEmptyTF}
- \begin{syntax}
- \cs{dbClistItemIfEmptyTF} \marg{true code} \marg{false code} \\
- \cs{dbClistItemIfEmptyT} \marg{true code} \\
- \cs{dbClistItemIfEmptyF} \marg{false code}
- \end{syntax}
-
- 该判别式用来判断列表属性中的元素是否为空。下面的示例展示了如何在展示
- |database-test| 数据库中 |labels| 属性(标签列表)的元素时在标签非空的时候前
- 后都加上 |*|。
-\end{function}
-
-\begin{verbatim}
- \dbNewDatabase{database-test}{labels=clist}
- \dbNewStyle{style-cond3}{database-test}{
- labels/item-before-code = {\dbClistItemIfEmptyF{*}},
- labels/item-after-code = {\dbClistItemIfEmptyF{*}},
- }
-\end{verbatim}
-
\subsection{特殊命令}
\pkg{dbshow} 定义了一些特殊的命令,会根据语境展开为不同的内容。
@@ -580,16 +627,17 @@
见第 \ref{sec:example} 节。
\title{
- Package \pkg{dbshow}
- \protect\footnote{\url{https://github.com/ZhiyuanLck/dbshow}}
+ Package \pkg{dbshow} \version%
+ \protect\footnote{%
+ Repository: \url{https://github.com/ZhiyuanLck/dbshow},
+ Telegram Group: \url{https://t.me/latex_dbshow}}
\rlap{\makebox[4cm][r]{
\normalsize $\Longrightarrow$ \color{red}
- \protect\hyperlink{zh}{中文版本}
- \protect\hypertarget{en}{}
+ \linktarget{zh}{en}{中文版本}
}}
}
\author{Li Changkai \texttt{<lichangkai225@qq.com>}}
-\date{2022/01/07}
+\date{\endate}
\maketitle
\section{Introduction}
@@ -605,6 +653,8 @@ The package provides four core functions: data storage and display, data
filtering, data sorting and data display. All data is saved once and then you
can display these data with custom filters, orders and styles.
+\subsection{Data Types}
+
The package constructs 6 types based on the internal typed of \pkg{expl3}:
\begin{Description}[\texttt{clist}]
\item[\texttt{date}]
@@ -622,9 +672,25 @@ The package constructs 6 types based on the internal typed of \pkg{expl3}:
comma list, default empty.
\end{Description}
+\subsection{Comparison to \pkg{datatool}}
+
+\pkg{dbshow} and \pkg{datatool} implement the same core functions. But
+\pkg{dbshow} is based on \pkg{expl3} and it supports string regex and
+multi-level sorting. \pkg{dbshow} tries to divide style from the contents
+(data in database): all styles are predefined and can be reused conveniently
+so that there can be only codes to save data and one-line code to show the
+database inside the \env{document} environment. You can hide the details in
+the preamble and focus on the data you want to display. \pkg{dbshow} provides
+a simple temporary runtime database, which means it can not input and output
+data from/to extern files (they should be responsible by some professional
+programming languages). When you need to delete or revise a record, just go to
+where it is recorded in the source code rather than use a macro to manipulate
+data after they are saved. In a sense, \TeX~file is also a kind of data
+persistence.
+
\section{Interfaces}
-\subsection{\cs{dbNewDatabase}}
+\subsection{Create, Display and Clear Database}
\begin{function}{\dbNewDatabase, \dbNewDatabase*}
\begin{syntax}
@@ -670,6 +736,23 @@ The example below define a database named |ques|.
}
\end{verbatim}
+\begin{function}{\dbshow}
+ \begin{syntax}
+ \cs{dbshow} \marg{style} \marg{database}
+ \end{syntax}
+
+ Show the \meta{database} with \meta{style}.
+\end{function}
+
+\begin{function}{\dbclear}
+ \begin{syntax}
+ \cs{dbclear} \marg{database}
+ \end{syntax}
+
+ Clear the content of \meta{database}.
+
+\end{function}
+
\subsection{\cs{dbNewStyle} and Style Options}
\begin{function}{\dbNewStyle}
@@ -682,7 +765,7 @@ from a list of \meta{base styles} such as
|\dbNewStyle[base1, base2]{new-style}{ques}{}|.
\end{function}
-\bigskip
+\subsubsection{General Options}
\begin{option}{opt=filter, desc={= \meta{filter}}, init=-none-}
Set the \meta{filter} defined by \cs{dbCombineFilters}.
@@ -734,20 +817,6 @@ from a list of \meta{base styles} such as
\end{verbatim}
\begin{option}{
- opt = before-code,
- desc = {= \meta{before code}}
-}
- Set the \meta{before code} that is executed before displaying the database.
-\end{option}
-
-\begin{option}{
- opt = after-code,
- desc = {= \meta{after code}}
-}
- Set the \meta{after code} that is executed after displaying the database.
-\end{option}
-
-\begin{option}{
opt = item-code,
desc = {= \meta{item code}}
}
@@ -756,22 +825,6 @@ from a list of \meta{base styles} such as
\end{option}
\begin{option}{
- opt = {\meta{attr}/before-code},
- desc = {= \meta{before code}}
-}
- Set the \meta{before code} that is executed by \cs{dbuse} before displaying
- certain attribute.
-\end{option}
-
-\begin{option}{
- opt = {\meta{attr}/after-code},
- desc = {= \meta{after code}}
-}
- Set the \meta{after code} that is executed by \cs{dbuse} after displaying
- certain attribute.
-\end{option}
-
-\begin{option}{
opt = {\meta{attr}/sep},
desc = {= \meta{sep spec}},
init = {,~\~}
@@ -801,8 +854,87 @@ from a list of \meta{base styles} such as
\end{option}
+\subsubsection{Decorators}
+
+The options below serves as decorators. In some cases, decorator can also be
+encoded directly into |item-code| or some other places, which is convenient
+sometimes. The benefit of defining decorators with options is that styles step
+further to be divided with contents. In the examples below, \meta{style1} and
+\meta{style2} is the same style, which wrap \meta{attr1} with *. When you want
+another style which wrap \meta{attr1} with =, if you choose the way of
+\meta{style1}, \meta{item code} are repeated, otherwise if you choose the way
+of \meta{style2}, \meta{item code} is inherited and you only need define the
+decorators.
+
+\begin{verbatim}
+ \dbNewStyle{style1}{db}{
+ item-code = {%
+ *\rvuse{attr1}*\rvuse{attr2}
+ % more code
+ }
+ }
+ \dbNewStyle{base-style}{db}{
+ item-code = {%
+ \rvuse{attr1}\rvuse{attr2}
+ % more code
+ }
+ }
+ \dbNewStyle[base-style]{style2}{db}{
+ attr1/before-code = { * },
+ attr1/after-code = { * },
+ }
+ \dbNewStyle[base-style]{style3}{db}{
+ attr1/before-code = { = },
+ attr1/after-code = { = },
+ }
+\end{verbatim}
+
\begin{option}{
- opt = item-before-code,
+ opt = before-code,
+ desc = {= \meta{before code}}
+}
+ Set the \meta{before code} that is executed before displaying the database.
+\end{option}
+
+\begin{option}{
+ opt = after-code,
+ desc = {= \meta{after code}}
+}
+ Set the \meta{after code} that is executed after displaying the database.
+\end{option}
+
+\begin{option}{
+ opt = record-before-code,
+ desc = {= \meta{before code}}
+}
+ Set the \meta{before code} that is executed before displaying the record.
+\end{option}
+
+\begin{option}{
+ opt = record-after-code,
+ desc = {= \meta{after code}}
+}
+ Set the \meta{after code} that is executed after displaying the record.
+\end{option}
+
+\begin{option}{
+ opt = {\meta{attr}/before-code},
+ desc = {= \meta{before code}}
+}
+ Set the \meta{before code} that is executed by \cs{dbuse} before displaying
+ certain attribute.
+\end{option}
+
+\begin{option}{
+ opt = {\meta{attr}/after-code},
+ desc = {= \meta{after code}}
+}
+ Set the \meta{after code} that is executed by \cs{dbuse} after displaying
+ certain attribute.
+\end{option}
+
+\begin{option}{
+ opt = {\meta{attr}/item-before-code},
desc = {= \meta{before code}}
}
Only for attributes of type |clist|. Set the \meta{after code} that is
@@ -810,7 +942,7 @@ from a list of \meta{base styles} such as
\end{option}
\begin{option}{
- opt = item-after-code,
+ opt = {\meta{attr}/item-after-code},
desc = {= \meta{after code}}
}
Only for attributes of type |clist|. Set the \meta{after code} that is
@@ -939,30 +1071,27 @@ code is showned below.
\subsection{\cs{dbsave} and \cs{dbuse}}
-\begin{function}{\dbsave, \dbuse}
+\begin{function}{\dbsave}
\begin{syntax}
- \cs{dbsave} \marg{attr} \marg{data} \\
- \cs{dbuse} \marg{attr} \\
+ \cs{dbsave} \marg{attr} \marg{data}
\end{syntax}
- Date is stored with \cs{dbsave} and is displayed with \cs{dbuse}. \cs{dbsave}
- can be used only inside the \env{dbitem} environment and \cs{dbuse} can be
- only used inside the option \opt{item-code}.
+ \cs{dbsave} save the \meta{data} to \meta{attr} of current record.
+ \cs{dbsave} can be used only inside the \env{dbitem} environment.
\end{function}
-\subsection{Use \cs{dbshow} to Display the Database}
-
-\begin{function}{\dbshow}
+\begin{function}[EXP]{\dbuse}
\begin{syntax}
- \cs{dbshow} \marg{style} \marg{database}
+ \cs{dbuse} \marg{attr}
\end{syntax}
- Show the \meta{database} with \meta{style}.
+ Display the value of \meta{attr} of current record. \cs{dbuse} is
+ \textbf{expandable} and can be only used inside the option \opt{item-code}.
\end{function}
\subsection{Conditionals}
-\begin{function}{\dbIfEmptyT, \dbIfEmptyF, \dbIfEmptyTF}
+\begin{function}[EXP]{\dbIfEmptyT, \dbIfEmptyF, \dbIfEmptyTF}
\begin{syntax}
\cs{dbIfEmptyTF} \marg{true code} \marg{false code} \\
\cs{dbIfEmptyT} \marg{true code} \\
@@ -981,43 +1110,6 @@ code is showned below.
}
\end{verbatim}
-\begin{function}{\dbItemIfEmptyT, \dbItemIfEmptyF, \dbItemIfEmptyTF}
- \begin{syntax}
- \cs{dbItemIfEmptyTF} \marg{true code} \marg{false code} \\
- \cs{dbItemIfEmptyT} \marg{true code} \\
- \cs{dbItemIfEmptyF} \marg{false code}
- \end{syntax}
-
- Test if the value of the attribute is empty. The example belows shows how to
- surround the non-empty |text| attribute with the symbol *.
-\end{function}
-
-\begin{verbatim}
- \dbNewStyle{style-cond2}{database-test}{
- text/before-code = {\dbItemIfEmptyF{*}},
- text/after-code = {\dbItemIfEmptyF{*}},
- }
-\end{verbatim}
-
-\begin{function}{\dbClistItemIfEmptyT, \dbClistItemIfEmptyF, \dbClistItemIfEmptyTF}
- \begin{syntax}
- \cs{dbClistItemIfEmptyTF} \marg{true code} \marg{false code} \\
- \cs{dbClistItemIfEmptyT} \marg{true code} \\
- \cs{dbClistItemIfEmptyF} \marg{false code}
- \end{syntax}
-
- Test if the item of comma list is empty. The example belows shows how to
- surround the non-empty label with the symbol *.
-\end{function}
-
-\begin{verbatim}
- \dbNewDatabase{database-test}{labels=clist}
- \dbNewStyle{style-cond3}{database-test}{
- labels/item-before-code = {\dbClistItemIfEmptyF{*}},
- labels/item-after-code = {\dbClistItemIfEmptyF{*}},
- }
-\end{verbatim}
-
\subsection{Special Macros}
Some special macros are defined to expand to different contents according to context.
@@ -1251,6 +1343,14 @@ run pdflatex
Add style option: \opt{raw-filter}
} \\
2022-01-07 & 1.1 & Improve example \\
+ 2022-01-07 & 1.1.1 & Add macro: \cmd{\dbclear} \\
+ 2022-01-07 & 1.1.2 & Add documentation: comparison to \pkg{datatool} \\
+ 2022-01-08 & 1.2 & {
+ Fix str sorting bug \\
+ Remove macros: \cmd{\dbItemIfEmpty(TF)}, \cmd{\dbClistItemIfEmpty(TF)} \\
+ Make \cs{dbuse} expandable \\
+ Add option: \opt{record-before-code}, \opt{record-after-code}
+ } \\
\end{tblr}
\end{documentation}
diff --git a/macros/latex/contrib/dbshow/dbshow.sty b/macros/latex/contrib/dbshow/dbshow.sty
index 0b02c20311..68ac7b1d35 100644
--- a/macros/latex/contrib/dbshow/dbshow.sty
+++ b/macros/latex/contrib/dbshow/dbshow.sty
@@ -14,8 +14,8 @@
% The Current Maintainer of this work is Li Changkai.
%
% This work consists of the files dbshow.sty, dbshow-doc.tex.
-\def\myfileversion{1.1}
-\def\myfiledate{2022/01/07}
+\def\myfileversion{v1.2}
+\def\myfiledate{2022/01/08}
\RequirePackage{expl3, xparse}
\RequirePackage[calc]{datetime2}
\ProvidesExplPackage
@@ -97,16 +97,16 @@
sep~=~\{#2\}~\msg_line_context:.
}
-\msg_new:nnn { dbshow } { unsupported-sort-type } {
- unsupported~sort~type:~'#1'~\msg_line_context:.~The~type~should~be~one~of~
- \{str,~date,~int,~fp\}.
-}
-
\cs_new:Nn \dbshow_sep_error:nn {
\msg_error:nnnn { dbshow } { wrong-seperator } { #1 } { #2 }
}
\cs_generate_variant:Nn \dbshow_sep_error:nn { xx }
+\msg_new:nnn { dbshow } { unsupported-sort-type } {
+ unsupported~sort~type:~'#1'~\msg_line_context:.~The~type~should~be~one~of~
+ \{str,~date,~int,~fp\}.
+}
+
\clist_const:Nn \dbshow_type_clist { date, str, tl, clist, int, fp }
\prop_const_from_keyval:Nn \dbshow_new_cs_map {
@@ -127,15 +127,6 @@
fp = fp_gset:cn
}
-\prop_const_from_keyval:Nn \dbshow_use_cs_map {
- date = str_use:c,
- str = str_use:c,
- tl = tl_use:c,
- clist = dbshow_clist_use:c,
- int = int_use:c,
- fp = fp_use:c
-}
-
\prop_const_from_keyval:Nn \dbshow_default_value {
date = \Today,
str = ,
@@ -146,6 +137,14 @@
}
\newcount\l_dbshow_date_diff
+\clist_new:N \l_style_sep_clist
+\tl_new:N \l_style_item_before_code
+\tl_new:N \l_style_item_after_code
+\cs_generate_variant:Nn \clist_use:nn { xx }
+\cs_generate_variant:Nn \clist_use:nnnn { xxxx }
+\prg_generate_conditional_variant:Nnn \str_compare:nNn { VNV } { TF }
+\prg_generate_conditional_variant:Nnn \int_compare:nNn { VNV } { TF }
+\prg_generate_conditional_variant:Nnn \fp_compare:nNn { VNV } { TF }
% #1 database #2 attr #3 type #4 default value
\cs_new:Npn \dbshow_process_default_value:w #1|#2=#3|#4\scan_stop {
@@ -208,6 +207,10 @@
\int_gincr:c { g__dbshow_counter_#1 }
}
+\NewDocumentCommand { \dbclear } { m } {
+ \int_gzero:c { g__dbshow_counter_#1 }
+}
+
% #1 database #2 attr #3 content
\cs_new:Nn \dbshow_save_data:nnn {
\dbshow_check_attr:nn { #1 } { #2 }
@@ -221,53 +224,53 @@
}
\cs_generate_variant:Nn \dbshow_save_data:nnn { nnx }
-\cs_new:Nn \dbshow_clist_use:N {
- \clist_clear:N \l_tmpa_clist
-
- \clist_map_inline:Nn #1 {
- \prg_set_conditional:Nnn \dbshow_clist_item_if_empty: { T, F, TF } {
- \tl_if_empty:nTF { ##1 }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_set_eq:NN \dbClistItemIfEmptyT\dbshow_clist_item_if_empty:T
- \cs_set_eq:NN \dbClistItemIfEmptyF\dbshow_clist_item_if_empty:F
- \cs_set_eq:NN \dbClistItemIfEmptyTF\dbshow_clist_item_if_empty:TF
-
- \clist_put_right:Nn \l_tmpa_clist {
- \l_style_item_before_code
- ##1
- \l_style_item_after_code
- }
- }
+\cs_new:Nn \dbshow_brace:n {
+ \exp_not:n { { #1 } }
+}
- \tl_clear:N \l_tmpa_tl
- \clist_map_inline:Nn \l_style_sep_clist {
- \tl_put_right:Nn \l_tmpa_tl { { ##1 } }
- }
+% #1 before code tl #2 after code tl #3 item
+\cs_new:Nn \dbshow_clist_wrapper:NNn {
+ \exp_not:n { { #1#3#2 }, }
+}
- \int_set:Nn \l_tmpa_int { \clist_count:N \l_style_sep_clist }
- \int_case:nnF { \l_tmpa_int } {
+% #1 clist #2 sep #3 before code tl #4 after code tl
+\cs_new:Nn \dbshow_clist_use:NNNN {
+ \int_case:nnF { \clist_count:N #2 } {
{ 1 } {
- \exp_after:wN \clist_use:Nn \exp_after:wN \l_tmpa_clist \l_tmpa_tl
+ \clist_use:xx
+ { \clist_map_tokens:Nn #1 { \dbshow_clist_wrapper:NNn #3 #4 } }
+ { \clist_item:Nn #2 { 1 } }
}
{ 3 } {
- \exp_after:wN \clist_use:Nnnn \exp_after:wN \l_tmpa_clist \l_tmpa_tl
+ \clist_use:xxxx
+ { \clist_map_tokens:Nn #1 { \dbshow_clist_wrapper:NNn #3 #4 } }
+ { \clist_item:Nn #2 { 1 } }
+ { \clist_item:Nn #2 { 2 } }
+ { \clist_item:Nn #2 { 3 } }
}
- }
- {
+ } {
\dbshow_sep_error:xx
- { \int_use:N \l_tmpa_int }
- { \clist_use:Nn \l_style_sep_clist { , } }
+ { \clist_count:N #2 }
+ { \clist_use:Nn #2 { , } }
}
}
-\cs_generate_variant:Nn \dbshow_clist_use:N { c }
-
-% #1 database #2 attr #3 index
-\cs_new:Nn \dbshow_use_data:nnn {
- \str_set:Nx \l_tmp_type { \dbshow_get_type:nn { #1 } { #2 } }
- \prop_get:NVN \dbshow_use_cs_map \l_tmp_type \l_tmp_cs
- \use:c { \l_tmp_cs } { g__dbshow_data_#1_#2_#3 }
+\cs_generate_variant:Nn \dbshow_clist_use:NNNN { cccc }
+
+% #1 database #2 attr #3 index #4 style
+\cs_new:Nn \dbshow_use_data:nnnn {
+ \str_case_e:nn { \prop_item:cn { g__dbshow_type_map_#1 } { #2 } } {
+ { date } { \str_use:c { g__dbshow_data_#1_#2_#3 } }
+ { str } { \str_use:c { g__dbshow_data_#1_#2_#3 } }
+ { tl } { \tl_use:c { g__dbshow_data_#1_#2_#3 } }
+ { int } { \int_use:c { g__dbshow_data_#1_#2_#3 } }
+ { fp } { \fp_use:c { g__dbshow_data_#1_#2_#3 } }
+ { clist } {
+ \dbshow_clist_use:cccc { g__dbshow_data_#1_#2_#3 }
+ { g__dbshow_style_clist_sep_#4_#1_#2 }
+ { g__dbshow_style_clist_item_before_#4_#1_#2 }
+ { g__dbshow_style_clist_item_after_#4_#1_#2 }
+ }
+ }
}
% #1 database
@@ -469,19 +472,19 @@
\cs_new_protected:Nn \dbshow_new_attr_style:nnn {
\dbshow_check_attr:nn { #2 } { #3 }
\keys_define:nn { dbshow/style/#1/#3 } {
- before-code .tl_gset:c = { g__dbshow_style_before_#1_#2_#3 },
+ before-code .tl_gset:c = { g__dbshow_style_attr_before_#1_#2_#3 },
before-code .initial:n = ,
- after-code .tl_gset:c = { g__dbshow_style_after_#1_#2_#3 },
+ after-code .tl_gset:c = { g__dbshow_style_attr_after_#1_#2_#3 },
after-code .initial:n = ,
}
\prop_get:cnN { g__dbshow_type_map_#2 } { #3 } \l_tmp_type
\str_if_eq:eeT { \l_tmp_type } { clist } {
\keys_define:nn { dbshow/style/#1/#3 } {
- sep .clist_gset:c = { g__dbshow_style_sep_#1_#2_#3 },
+ sep .clist_gset:c = { g__dbshow_style_clist_sep_#1_#2_#3 },
sep .initial:n = { { ,~ } },
- item-before-code .tl_gset:c = { g__dbshow_style_item_before_#1_#2_#3 },
+ item-before-code .tl_gset:c = { g__dbshow_style_clist_item_before_#1_#2_#3 },
item-before-code .initial:n = ,
- item-after-code .tl_gset:c = { g__dbshow_style_item_after_#1_#2_#3 },
+ item-after-code .tl_gset:c = { g__dbshow_style_clist_item_after_#1_#2_#3 },
item-after-code .initial:n = ,
}
}
@@ -507,6 +510,10 @@
item-code .initial:n = ,
after-code .tl_gset:c = { g__dbshow_style_after_#1_#2 },
after-code .initial:n = ,
+ record-before-code .tl_gset:c = { g__dbshow_style_record_before_#1_#2 },
+ record-before-code .initial:n = ,
+ record-after-code .tl_gset:c = { g__dbshow_style_record_after_#1_#2 },
+ record-after-code .initial:n = ,
}
\prop_map_inline:cn { g__dbshow_type_map_#2 } {
\dbshow_new_attr_style:nnn { #1 } { #2 } { ##1 }
@@ -566,13 +573,11 @@
}
\str_if_eq:eeT { \l_tmp_type } { date }
{ \str_set:Nn \l_tmp_type { str } }
- \cs_set_eq:Nc \dbshow_compare { \l_tmp_type _compare:nNnTF }
+ \cs_set_eq:Nc \dbshow_compare { \l_tmp_type _compare:VNVTF }
- \exp_args:NnV
- \dbshow_compare { \l_tmpa_tl } \l_op_same { \l_tmpb_tl }
+ \dbshow_compare \l_tmpa_tl \l_op_same \l_tmpb_tl
{ \sort_return_same: }
{
- \exp_args:NnV
\dbshow_compare { \l_tmpa_tl } \l_op_swap { \l_tmpb_tl }
{ \sort_return_swapped: }
{
@@ -621,34 +626,15 @@
\tl_set:Nn \dbIndex { ##1 }
% ####1 attr
- \cs_set:Npn \dbuse ####1 {
+ \DeclareExpandableDocumentCommand { \dbuse } { m } {
\dbshow_check_attr:nn { #2 } { ####1 }
- \clist_set_eq:Nc \l_style_sep_clist
- { g__dbshow_style_sep_#1_#2_####1 }
- \tl_set_eq:Nc \l_style_item_before_code
- { g__dbshow_style_item_before_#1_#2_####1 }
- \tl_set_eq:Nc \l_style_item_after_code
- { g__dbshow_style_item_after_#1_#2_####1 }
-
- \prop_get:cnN { g__dbshow_type_map_#2 } { ####1 } \l_tmp_type
- % \tl_show:N \l_tmp_type
- \str_if_eq:eeT { \l_tmp_type } { date }
- { \tl_set:Nn \l_tmp_type { str } }
- \prg_set_conditional:Nnn \dbshow_item_if_empty: { T, F, TF } {
- \use:c { \l_tmp_type _if_empty:cTF }
- { g__dbshow_data_#2_####1_##1 }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_set_eq:NN \dbItemIfEmptyT\dbshow_item_if_empty:T
- \cs_set_eq:NN \dbItemIfEmptyF\dbshow_item_if_empty:F
- \cs_set_eq:NN \dbItemIfEmptyTF\dbshow_item_if_empty:TF
-
- \tl_use:c { g__dbshow_style_before_#1_#2_####1 }
- \dbshow_use_data:nnn { #2 } { ####1 } { ##1 }
- \tl_use:c { g__dbshow_style_after_#1_#2_####1 }
+ \tl_use:c { g__dbshow_style_attr_before_#1_#2_####1 }
+ \dbshow_use_data:nnnn { #2 } { ####1 } { ##1 } { #1 }
+ \tl_use:c { g__dbshow_style_attr_after_#1_#2_####1 }
}
+ \tl_use:c { g__dbshow_style_record_before_#1_#2 }
\tl_use:c { g__dbshow_style_database_item_#1_#2 }
+ \tl_use:c { g__dbshow_style_record_after_#1_#2 }
}
\prg_set_conditional:Nnn \dbshow_if_empty: { T, F, TF } {
\clist_if_empty:NTF \l_index
@@ -668,8 +654,10 @@
\NewDocumentCommand { \dbshow } { m m } {
\dbshow_check_database:n { #2 }
\tl_set_eq:Nc \l_dbshow_filter { g__dbshow_filter_#1_#2 }
- \dbshow_check_filter:nn { #2 } { \l_dbshow_filter }
- \dbshow_init_iterator:nnn { #1 } { #2 } { \l_dbshow_filter }
+ \exp_args:Nnv \dbshow_check_filter:nn
+ { #2 } { g__dbshow_filter_#1_#2 }
+ \exp_args:Nnnv \dbshow_init_iterator:nnn
+ { #1 } { #2 } { g__dbshow_filter_#1_#2 }
}
\endinput
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7dadbd6f00..b1dae3cc0c 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/01/06}{1.43}
+\ProvidesExplClass{easybook}{2022/01/08}{1.44}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -306,7 +306,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/01/06}{1.43}
+\ProvidesExplPackage{easybase}{2022/01/08}{1.44}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1859,14 +1859,9 @@
\setlist[enumerate,2]{label = alph,ref = enumii}
\setlist[enumerate,3]{label = roman,ref = enumiii}
\setlist[description]{font = sf,style = standard}
-\newlist{eb@outline@list}{itemize}{1}
-\newlist{eb@exercise@list}{enumerate}{2}
\newlist{eb@eqcomp@list}{description}{1}
-\setlist[eb@outline@list]{label = outline,itemsep = 0.5ex plus .1ex}
-\setlist[eb@eqcomp@list]{labelsep = 0em}
-\cs_new:Npn \setexerlist #1 { \setlist*[eb@exercise@list]{#1} }
+\setlist[eb@eqcomp@list]{nosep,labelsep = 0em}
\cs_new:Npn \seteqcomplist #1 { \setlist*[eb@eqcomp@list]{#1} }
-\cs_new:Npn \setoutlinelist #1 { \setlist*[eb@outline@list]{#1} }
\keys_define:nn { eb/eqcomp }
{
@@ -1926,7 +1921,7 @@
{\makebox[\box_wd:N \l_tmpa_box][\l__eb_eqsymb_delim_align_tl]{#2}}
\hspace{\l__eb_eqsymb_space_dim}
}
-\cs_new_protected:Npn \eb@itembox { \item\makebox }
+\cs_new_protected:Npn \eb@itembox { \item[]\makebox }
\NewDocumentCommand{\symb}{smO{\l__eb_eqsymb_delim_tl}}
{
\IfBooleanTF{#1}
@@ -2384,13 +2379,11 @@
\labelformat{chapter}{\CTEXthechapter}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
-\labelformat{exercise}{\exercisename~#1}
\providecommand{\bibname}{\refname}
\ctex_define:n
{
lstlistlistingname .tl_set:N = \listlstlistingname,
- lstlistingname .tl_set:N = \lstlistingname,
- exercisename .tl_set:N = \exercisename
+ lstlistingname .tl_set:N = \lstlistingname
}
\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
{
@@ -2402,8 +2395,7 @@
listfigurename = 图片索引,
listtablename = 表格索引,
lstlistlistingname = 代码索引,
- lstlistingname = 代码,
- exercisename = 练习
+ lstlistingname = 代码
}
\labelformat{equation}{式(#1)}
\labelformat{section}{节 #1}
@@ -2414,8 +2406,7 @@
{
abstractname = Abstract,
lstlistlistingname = List~of~Codes,
- lstlistingname = Code,
- exercisename = Exercise
+ lstlistingname = Code
}
\labelformat{equation}{Equation~(#1)}
\labelformat{section}{Section~#1}
@@ -2423,11 +2414,9 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/06}{1.43}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/08}{1.44}
{Customization of tcolorbox for easybook}
-\cs_set_protected:Npn \setexercise #1
- { \keys_set:nn { eb/exercise } {#1} }
\cs_set_protected:Npn \addtotcbstyle #1#2
{ \tcbset{#1/.append~style = {#2}} }
\cs_set_protected:Npn \deftcbstyle #1#2
@@ -2435,22 +2424,6 @@
\cs_new_protected:Npn \tcbappstyle
{ \@ifstar{\deftcbstyle}{\addtotcbstyle} }
\cs_set_eq:NN \newtcbstyle \deftcbstyle
-\keys_define:nn { eb/exercise }
- {
- color .tl_set:N = \eb@tc@background@color,
- color .initial:n = DeepSkyBlue,
- number .tl_set:N = \eb@tc@list@number,
- number .initial:n = 1.,
- title .tl_set:N = \eb@tc@exercise@title,
- title .initial:n = \exercisename,
- numsep .dim_set:N = \eb@toc@exercise@numsep,
- numsep .initial:n = 0.5em,
- tocnumsep .dim_set:N = \eb@toc@exertoc@numsep,
- tocnumsep .initial:n = 1em,
- label .tl_set:N = \eb@tc@exercise@label,
- enumitem .code:n = \setexerlist{#1},
- tcolorbox .code:n = \addtotcbstyle{exercise}{#1}
- }
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
\deftcbstyle{tc-theorem}
@@ -2458,36 +2431,15 @@
enhanced~jigsaw,pad~at~break* = 3pt,
opacityback = 0,
colframe = ctex@emph,
- sharpish~corners,
beforeafter~skip = 1.75ex plus .2ex minus .1ex,
left = 8pt,right = 8pt,
top = \eb@tc@line@skip,bottom = \eb@tc@line@skip,
middle = \eb@tc@line@skip
}
-\deftcbstyle{tc-outline}
- {
- enhanced,nofloat,
- tikznode~boxed~title,
- interior~style = white,colframe = ctex@emph,
- colbacktitle = white,coltitle = ctex@emph,
- fonttitle = \large\sffamily,fontupper = \itshape,
- boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
- attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
- after~skip = 3ex plus .2ex minus .1ex,
- arc = 3pt,
- left = 2pc,right = 2pc,top = 1.5pc,bottom = 1pc
- }
-\deftcbstyle{tc-exercise}
- {
- blank,center,sharpish~corners,
- fontupper = \Large\sffamily,
- beforeafter~skip = 5ex plus .2ex minus .1ex
- }
\deftcbstyle{tc-easybox}
{
enhanced~jigsaw,pad~at~break* = 3pt,
center~title,
- sharpish~corners,
left = 8pt,right = 8pt,
coltitle = black,colframe = black,
top = \eb@tc@line@skip,bottom = \eb@tc@line@skip,
@@ -2501,115 +2453,26 @@
frame~hidden,
enhanced~jigsaw,pad~at~break* = 3pt,
boxrule = 0pt,
- sharpish~corners,
left = 8pt,
middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip,
beforeafter~skip = 1.75ex plus .2ex minus .1ex
}
\deftcbstyle{tc-ebemph}{on~line,blank}
-\deftcbstyle{tc-eblink}
- {
- standard~jigsaw,on~line,
- top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt,
- arc = 1pt,opacityback = 0.2
- }
\deftcbstyle{tc-ebfbox}
{
- standard~jigsaw,on~line,sharpish~corners,
+ standard~jigsaw,on~line,
top = 3pt,bottom = 3pt,left = 3pt,right = 3pt,
boxrule = 0.4pt,opacityback = 0.2
}
\tcbset
{
breakable,
- boxsep = 0pt,
+ sharpish~corners,
fonttitle = \sffamily,
+ boxsep = 0pt,
boxrule = 0.5pt
}
-\tl_new:N \p@eb@exercise
-\tl_new:N \eb@tc@list@prologue
-\bool_gset_true:N \g__eb_exer_clear_prologue_bool
-\NewDocumentCommand{\exerprologue}{sm}
- {
- \IfBooleanTF{#1}
- {\bool_gset_false:N \g__eb_exer_clear_prologue_bool}
- {\bool_gset_true:N \g__eb_exer_clear_prologue_bool}
- \tl_gset:Nn \eb@tc@list@prologue {#2}
- }
-\cs_new_protected:Npn \tcphantomifname #1#2
- {
- \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1}
- \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2}
- }
-\tcphantomifname
- {
- \markright
- {
- \eb_tcb_toc_counter_numsep:n { exercise }
- \eb@tc@exercise@title
- }
- \addcontentsline{toc}{section}
- {
- \eb_tcb_toc_counter_numsep:n { exertoc }
- \eb@tc@exercise@title
- }
- }{}
-\cs_new:Npn \eb_exercise_label_noempty_use:
- {
- \eb_current_label:n { exercise }
- \tl_if_empty:NF \eb@tc@exercise@label
- { \exp_args:NV \label \eb@tc@exercise@label }
- }
-\cs_new:Npn \eb_tcb_toc_counter_numsep:n #1
- {
- \thetcbcounter
- \hspace{\use:c { eb@toc@#1@numsep }}
- }
-
-\newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1}
-\newtcolorbox{eb@tc@outline@box}[2]{title = #1,tc-outline,#2}
-\DeclareDocumentEnvironment{outline}{O{}D(){\abstractname}o+b}
- {
- \begin{eb@tc@outline@box}{#2}{IfValueT = {#3}{#3}}
- \begin{eb@outline@list}[#1]
- #4
- \end{eb@outline@list}
- \end{eb@tc@outline@box}
- }{}
-\DeclareDocumentEnvironment{exercise}{st-od()O{}+b}
- {
- \IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} }
- \IfBooleanF{#2}
- {
- \eb@tc@exercise@box
- {
- fuzzy~halo = 5pt~with~\eb@tc@background@color,
- IfValueT = {#4}{#4},
- phantom =
- {
- \IfBooleanTF{#1}
- {\eb@tc@exercise@ifnamefalse}
- {\eb@tc@exercise@ifnametrue}
- }
- }{
- \IfBooleanF{#1}
- {
- \eb_tcb_toc_counter_numsep:n { exercise }
- \cs_set_eq:NN \theexercise \thetcbcounter
- \eb_exercise_label_noempty_use:
- }
- \eb@tc@exercise@title
- }
- }
- \tl_if_empty:NF \eb@tc@list@prologue { \eb@tc@list@prologue }
- \exp_last_unbraced:NnNo
- \begin{eb@exercise@list}[\eb@tc@list@number,#5]
- #6
- \end{eb@exercise@list}
- \bool_if:NT \g__eb_exer_clear_prologue_bool
- { \tl_gclear:N \eb@tc@list@prologue }
- }{}
\DeclareTColorBox{easybox}{sO{PaleGoldenrod}d()O{}}
{
IfBooleanF = {#1}{frame~hidden,boxrule = 0pt},
@@ -2644,9 +2507,4 @@
fuzzy~halo = 2pt~with~#1,
tc-ebemph,#3
}{#2}
-\DeclareTotalTCBox{\eblink}{O{Aqua}vO{}}
- {
- colback = #1,colframe = #1,
- tc-eblink,#3
- }{#2}
%</tcolorbox> \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index ac276244b6..9b5cbcc16d 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index c5aacaa0e1..259bbd6bd4 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -4,7 +4,7 @@
\usepackage
{
enumitem,newtxmath,indentfirst,tabularray,
- fancyvrb,geometry,hologo,pifont
+ fancyvrb,geometry,hologo,pifont,changelog
}
\definecolorscheme{blue}
{
@@ -20,8 +20,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.43,
- date = 2022/01/06,
+ version = v1.44,
+ date = 2022/01/08,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -935,6 +935,7 @@
\command*{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}]
克隆基本的 \meta{列表类型} 在其基础上新建一个名为 \meta{列表名} 的列表环境。不要将 \meta{最大级别} 设置过大以避免创建过多的计数器和相关宏。
\begin{ctexexam}
+ \setlist{} % 清除所有列表共享的格式
\setlist[1]{labelindent = \parindent}
\setlist[itemize,1]{label = $\triangleleft$}
\setlist[enumerate]{labelsep = *,leftmargin = 1.5pc}
@@ -1029,56 +1030,9 @@
代码目录名与代码环境题注名选项 \option*{lstlistlistingname} 和 \option*{lstlistingname} 用法与 C\TeX 使用手册标题汉化一节类似,可以看作对这节的扩展。
\end{options}
-\subsection{习题}
-\label{subsec:exercise}
-\begin{environments}
- \environment{exercise}[\sarg\harg\oarg{键值列表1}\darg{键值列表2}\oarg{键值列表3}]
- 习题环境的标题使用 \cs*{tcbox} 行内盒子包装样式,内容则使用 \env*{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 \harg{} 号参数时不显示标题,此时 \meta{键值列表1} 除了 \option{label} 选项失效。
-
- \meta{键值列表2} 包括 \pkg*{tcolorbox} 的盒子样式选项,例如 \option*{boxsep} 和 \option*{fontupper} 等,也可以使用下述 \option{tcolorbox} 选项。在这里可以使用 \cs{addtotcbstyle} 命令设置标题选项 \meta{键值列表2} 的值,第一个参数为 \code{tc-exercise}。
- \begin{ctexexam}
- \tcphantomifname{\markright{\counteruse{tcbcounter}\quad 习题}}{}
- \addtotcbstyle{tc-exercise}{boxsep = 5pt}
- \exerprologue{习题前的一段文本}
- \begin{exercise}*[color = LightSkyBlue](after skip = 2pc)[itemsep = 1ex]
- \item 第一题
- \item 第二题
- \end{exercise}
- \end{ctexexam}
-\end{environments}
-
-\begin{commands}
- \command{setexercise}[\marg{键值列表1}]
- 配置命令 \cs{setexercise} 用于全局设置上述习题环境 \env{exercise} 标题样式可选参数中 \meta{键值列表1} 的默认值,包含的选项如下:
- \begin{options}
- \keyval-{color}{标题背景颜色名}\Default{DeepSkyBlue}
- 习题标题盒子背景颜色,可以使用 \pkg*{xcolor} 自定义颜色或使用色库。
- \keyval-{title}{环境标题}
- 习题的标题,可以匹配中英文模式,习题环境使用 \harg{} 号参数时无效。也可以使用 \option{exercisename} 选项设置习题环境标题的默认值。
- \keyval-{number}{习题编号类型}\Default{1.}
- 标题编号输出选项 \option{number} 为短编号形式,应当包含 \code{A}、\code{a}、\code{I}、\code{i}、或 \code{1} 其中一个符号。
- \keyval-{numsep}{编号与标题的间距}\Default{0.5em}
- 习题标题编号与后方标题文本的间距,习题环境使用星号参数时无效。
- \keyval-{tocnumsep}{目录编号与标题的间距}\Default{1em}
- 目录中习题标题编号与后方标题文本的间距,习题环境使用星号参数时无效。
- \keyval-{tcolorbox}{键值列表2}
- 局部传递 \pkg*{tcolorbox} 宏包的格式选项给习题标题(如果存在)。
- \keyval-{enumitem}{键值列表3}
- 局部传递 \pkg*{enumitem} 宏包的格式选项给习题条目列表。
- \keyval-{label}{标签内容}
- 设置习题环境的引用标签,它与标签格式命令 \cs{labelformat} 对应的计数器是 \code{exercise}。
- \end{options}
- \command{setexerlist}[\marg{键值列表3}]
- 命令 \cs{setexerlist} 用于全局设置习题条目选项 \meta{键值列表3} 的值。\meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。
- \command{exerprologue}[\sarg\marg{序言内容}]
- 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。带有星号参数的命令会使序言在习题环境一直有效。
- \command{tcphantomifname}[\marg{编号代码}\marg{不编号代码}]
- 命令 \cs{tcphantomifname} 根据使用 \pkg*{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \cs*{addcontentsline} 命令将习题标题加入目录。
-\end{commands}
-
\subsection{盒子}
\label{subsec:box}
-使用盒子以及\ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg*{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。
+文档类预置了两个行间盒子环境和两个行内盒子命令,需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包提供支持。它们 \meta{配置选项} 的键值列表可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置。如果 \meta{配置选项} 较长且希望在原有基础上改为全局固定的样式,可以使用 \cs{addtotcbstyle} 命令设置,第一个参数为 \code{tc-}\meta{环境或命令名}。
\begin{commands}
\command{deftcbstyle}[\marg{盒子风格}\marg{键值列表}]
新建或重置一个名称为 \meta{盒子风格} 的 \pkg*{tcolorbox} 宏包盒子风格,可以与 \cs{addtotcbstyle} 命令联用。
@@ -1102,29 +1056,12 @@
\end{ctexexam}
\end{commands}
-\subsubsection{摘要盒子}
-\begin{environments}
- \environment{outline}[\oarg{键值列表1}\darg{标题名称}\oarg{键值列表2}]
- 摘要盒子 \env{outline} 可用于章前摘要,它的标题是可选参数,默认标题是摘要。\meta{键值列表2} 是摘要盒子样式选项,可以使用 \cs{addtotcbstyle} 命令对它进行全局设置,第一个参数为 \code{tc-outline}。
-\end{environments}
-
-\begin{commands}
- \command{setoutlinelist}[\marg{键值列表1}]
- \meta{键值列表1} 与 \pkg*{enumitem} 宏包中列表配置选项相同,可以设置摘要条目的各种距离,要对它进行全局设置可以使用 \cs{setoutlinelist} 命令。
- \begin{ctexexam}
- \addtotcbstyle{tc-outline}{arc = 6pt}
- \begin{outline}[leftmargin = *](摘要标题)
- \item 摘要内容1
- \item 摘要内容2
- \end{outline}
- \end{ctexexam}
-\end{commands}
-
-\subsubsection{段落盒子}
+\subsubsection{行间盒子}
\begin{environments}
\environment{easybox}[\sarg\oarg{颜色名}\darg{段落标题}\oarg{配置选项}]
- 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。如果 \meta{配置选项} 较长且希望在原有基础上改为全局固定的样式,可以使用 \cs{addtotcbstyle} 命令设置,第一个参数为 \code{tc-easybox}。
+ 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。
\begin{ctexexam}
+ \addtotcbstyle{tc-easybox}{arc = 6pt}
\begin{easybox}*[DarkCyan](段落标题)
上半盒子内容
\tcblower % 盒子上下部分分界线
@@ -1137,10 +1074,8 @@
\subsubsection{行内盒子}
\begin{commands}
- \command{eblink}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
- 使用 \pkg*{tcolorbox} 预置了三个参数选项相同的行内盒子,它们均为抄录命令。盒子 \cs{eblink} 具有类似超链接边框的效果。
\command{ebemph}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
- 盒子 \cs{ebemph} 具有模糊边缘类似高亮的效果。
+ 行内盒子均为抄录命令。盒子 \cs{ebemph} 具有模糊边缘类似高亮的效果。
\command{ebfbox}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
盒子 \cs{ebfbox} 则有直角边缘和四周框线,效果类似带颜色的 \cs*{fbox} 盒子。
\end{commands}
@@ -1302,6 +1237,9 @@
\end{commands}
\appendix
+\begin{changelog}[title = 更新日志]
+ \shortversion{v = 1.44,date = 2022/01/08,changes = 经过前期各模块的功能调整和错误修复,稳定版本正式发布。}
+\end{changelog}
\nocite{*}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/hvlogos/Changes b/macros/latex/contrib/hvlogos/Changes
index a1b985f0e7..0e3a6e5bb9 100644
--- a/macros/latex/contrib/hvlogos/Changes
+++ b/macros/latex/contrib/hvlogos/Changes
@@ -1,4 +1,8 @@
hvlogos.sty:
+0.05 2022-01-08 - added \LuaMetaTeX and \LMTX with alias in lowercase letters
+0.04 2021-10-02 - added new macros to user-defined kernings
+0.03 2021-09-25 - \tikz in regular font
+ - \CTAN is sf font
0.02 2021-08-13 - fix for \tikz which is reserved by package tikz
renamed to \tikzlogo
- added logos for Purdue University
diff --git a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf
index d44fb7affd..7b732b272a 100644
--- a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf
+++ b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex
index 1adcd9633f..81f7731d59 100644
--- a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex
+++ b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex
@@ -2,7 +2,7 @@
\usepackage{libertinus-otf}
\setmonofont[Scale=MatchLowercase,FakeStretch=0.88]{AnonymousPro}
\usepackage{hvlogos}
-\usepackage{longtable, booktabs}
+\usepackage{longtable, booktabs, array}
\usepackage{babel}
\usepackage[autostyle]{csquotes}
\MakeAutoQuote{»}{«}
@@ -13,7 +13,7 @@
\title{\texttt{hvlogos} -- Print \TeX-related Logos}
\author{Herbert Voß\thanks{Thanks to
-Heiko Oberdiek, Mark Senn}}
+Denis Bitouzé, Heiko Oberdiek, Mark Senn}}
\begin{document}
\maketitle
@@ -21,16 +21,16 @@ The package \LPack{hvlogos} loads by default the packages
\LPack{fetamont}, \LPack{hologo}, \LPack{dantelogo}, and \LPack{xspace}.
\bigskip
-\begin{longtable}{lll}\toprule
-\emph{Macro} & \emph{Alias} & \emph{Output}\\\midrule
+\begin{longtable}{lll>{\sffamily}l}\toprule
+\emph{Macro} & \emph{Alias} & \emph{Output} & \emph{sf-Output}\\\midrule
\endfirsthead
-\multicolumn{3}{l}{\ldots\ previous page}\\\midrule
-\emph{Macro} & \emph{Alias} & \emph{Output}\\\midrule
+\multicolumn{4}{l}{\ldots\ previous page}\\\midrule
+\emph{Macro} & \emph{Alias} & \emph{Output}& \emph{sf-Output}\\\midrule
\endhead
\midrule
-\multicolumn{3}{r}{next page \ldots}\\
+\multicolumn{4}{r}{next page \ldots}\\
\endfoot
\bottomrule
@@ -38,13 +38,13 @@ The package \LPack{hvlogos} loads by default the packages
\Lcs{ALEPH} && \ALEPH \\[5pt]
-\Lcs{AmS} & \Lcs{AMS} & \AMS\\
-\Lcs{AmSLaTeX} && \AmSLaTeX\\
-\Lcs{amsmath} && \amsmath\\
-\Lcs{AmSTeX} && \AmSTeX\\[5pt]
+\Lcs{AmS} & \Lcs{AMS} & \AMS& \AMS\\
+\Lcs{AmSLaTeX} && \AmSLaTeX & \AmSLaTeX\\
+\Lcs{amsmath} & & \amsmath& \amsmath\\
+\Lcs{AmSTeX} && \AmSTeX & \AmSTeX\\[5pt]
-\Lcs{biber} && \biber\\
-\Lcs{Biber} && \Biber \\
+\Lcs{biber} && \biber & \biber\\
+\Lcs{Biber} && \Biber & \Biber\\
\Lcs{BibLaTeX} & \Lcs{biblatex}& \BibLaTeX \\
\Lcs{BibTeX} && \BibTeX \\
\Lcs{BibTeX8} & \Lcs{BibTeXacht} & \BibTeX8\\
@@ -68,15 +68,18 @@ The package \LPack{hvlogos} loads by default the packages
\Lcs{iniTeX} && \iniTeX \\
\Lcs{KOMAScript} && \KOMAScript \\
-\Lcs{LaTeX} && \LaTeX \\
-\Lcs{LaTeXe} && \LaTeXe \\
-\Lcs{LaTeXIII} && \LaTeXIII \\
-\Lcs{LaTeXTeX} && \LaTeXTeX\\
-\Lcs{LaTeXML} && \LaTeXML \\
-\Lcs{LuaHBTeX} & \Lcs{luahbtex}, \Lcs{LuahbTeX} & \LuaHBTeX\\
-\Lcs{LuaLaTeX}& \Lcs{lualatex} & \LuaLaTeX \\
-\Lcs{LuaTeX} & \Lcs{luatex} & \LuaTeX\\
-\Lcs{LyX} && \LyX \\[5pt]
+\Lcs{LaTeX} && \LaTeX & \LaTeX \\
+\Lcs{LaTeXe} && \LaTeXe & \LaTeXe \\
+\Lcs{LaTeXIII} && \LaTeXIII& \LaTeXIII \\
+\Lcs{LaTeXTeX} && \LaTeXTeX& \LaTeXTeX\\
+\Lcs{LaTeXML} && \LaTeXML& \LaTeXML \\
+\Lcs{LMTX} & \Lcs{lmtx} & \LMTX & \\
+\Lcs{LuaHBTeX} & \Lcs{luahbtex}, \Lcs{LuahbTeX} & \LuaHBTeX & \LuaHBTeX\\
+\Lcs{LuaLaTeX}& \Lcs{lualatex} & \LuaLaTeX  & \LuaLaTeX\\
+\Lcs{LuaTeX} & \Lcs{luatex} & \LuaTeX & \LuaTeX\\
+\Lcs{LuaMetaTeX} & \Lcs{luametatex} & \LuaMetaTeX & \LuaMetaTeX\\
+
+\Lcs{LyX} && \LyX & \LyX \\[5pt]
\Lcs{macOS} && \macOS\\
\Lcs{mpShort} && \mpShort\\
@@ -110,7 +113,7 @@ The package \LPack{hvlogos} loads by default the packages
\Lcs{SLiTeX} && \SLiTeX \\[5pt]
\Lcs{teTeX} && \teTeX \\
-\Lcs{TeXivht} && \TeX4ht \\
+\Lcs{TeXivht} &\Lcs{tex4ht}& \TeX4ht \\
\Lcs{TeXLive} && \TeXLive\\[5pt]
\Lcs{TikZ} & \Lcs{tikzlogo}& \tikzlogo \\
@@ -128,6 +131,42 @@ The package \LPack{hvlogos} loads by default the packages
\end{longtable}
+
+
+\section*{Experimental}
+The logos for \LaTeX\ and \LaTeXTeX\ can be modified with the following commands:
+
+
+\Lcs{hvLaTeX}\texttt{[<kern between L and a>][<kern between La and TeX>]}\\
+\Lcs{hvLaTeXTeX}\texttt{[<kern between ( and La>][<kern between L and a>][<kern a and )>][<kern between ) and TeX>]}
+
+The two kernings for \Lcs{LaTeX} are predefined by \texttt{-0.25em} and \texttt{-0.15em} and
+the four for \Lcs{LaTeXTeX} by \texttt{-0.1em}, \texttt{-0.25em}, \texttt{-0.15em}, and \texttt{-0.1em}.
+
+A modification make sense if you have a font where the default kerning doesn't really works well.
+For example with the font {\fontspec{Lobster Two} Lobster Two}:
+
+\begin{tabular}{ l l}
+\fontspec{Lobster Two}\LaTeX & default kerning\\
+\fontspec{Lobster Two}\hvLaTeX[-0.1em][-0.07em]\LaTeX & new setting with \Lcs{hvLaTeX}\texttt{[-0.1em][-0.07em]} \\
+\fontspec{Lobster Two}\LaTeXTeX & default kerning \\
+\fontspec{Lobster Two}\hvLaTeXTeX[-0.1em][-0.1em][0em]\LaTeXTeX & new setting with \Lcs{hvLaTeXTeX}\texttt{[-0.1em][-0.1em][0em]} \\
+\end{tabular}
+
+A missing optional argument will be set by its default. Remember that you have to use all preceeding arguments if you
+want to change only the 2nd, 3rd or 4th.
+
+
+
+
+
+%\NewDocumentCommand\hvLaTeXTeX{ O{-0.1em} O{-0.25em} O{-0.15em} O{-0.1em} }
+ % {\def\LaTeXTeX{(\kern#1\hologo{La}[#2]\kern#3)\kern#4\hologo{TeX}}}
+
+%\hvLaTeX
+%\hvLaTeXTeX
+
+
\printindex
\end{document}
diff --git a/macros/latex/contrib/hvlogos/latex/hvlogos.sty b/macros/latex/contrib/hvlogos/latex/hvlogos.sty
index c55b7e4ed7..d6b5e38677 100644
--- a/macros/latex/contrib/hvlogos/latex/hvlogos.sty
+++ b/macros/latex/contrib/hvlogos/latex/hvlogos.sty
@@ -2,7 +2,7 @@
%%
%% This is file `hvlogos.sty',
%%
-%% Copyright (C) 2021 Herbert Voss
+%% Copyright (C) 2021,22 Herbert Voss
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
@@ -10,11 +10,12 @@
%
%
% -------------------------------------
-\ProvidesPackage{hvlogos}[2021/08/13 v. 0.02 Logos (hv)]
+\ProvidesPackage{hvlogos}[2022/01/08 v. 0.05 Logos (hv)]
%
\newif\if@dtk@newengine \@dtk@newenginetrue
%
-\RequirePackage{fetamont,hologo,dantelogo,xspace}
+\RequirePackage{fetamont,hologo,dantelogo,xspace,expl3}
+
\ifluatex\else\ifxetex\else\@dtk@newenginefalse\fi\fi
\if@dtk@newengine
@@ -31,12 +32,14 @@
\def\MP{\textffm{META}\@dischyph\textffm{POST}\@}
\def\MT{\textffm{META}\@dischyph\textffm{TYPE1}\@}
\fi
+
\def\mpShort{\textffm{MP}\@}
\def\mfShort{\textffm{MF}\@}
-\def\HoLogo@La#1{%
- L%
- \ifx\f@family\sfdefault\kern-.15em\else\kern-.23em\fi
+\ExplSyntaxOn
+\DeclareDocumentCommand\hologo@La{ O{-0.25em} }%
+{ L%
+ \ifx\f@family\sfdefault\kern#1\else\kern\dimexpr#1+0.02em\relax\fi
\begingroup
\setbox\ltx@zero\hbox{T}%
\vbox to\ht\ltx@zero{%
@@ -54,20 +57,23 @@
}%
\endgroup
}
+\NewDocumentCommand\hvLaTeX{ O{-0.25em} O{-0.15em} }
+ {\def\LaTeX{\hologo@La[#1]\kern#2\hologo{TeX}}}
+
+\NewDocumentCommand\hvLaTeXTeX{ O{-0.1em} O{-0.25em} O{-0.15em} O{-0.1em} }
+ {\def\LaTeXTeX{(\kern#1\hologo@La[#2]\kern#3)\kern#4\hologo{TeX}}}
+
+\hvLaTeX
+\hvLaTeXTeX
-%\edef\hologoList{%
-% \hologoList%
-% \hologoEntry{LuaHBTeX}{}{2020/07/13}%
-%}
-
-\def\LaTeXTeX{\hologo{(La)TeX}}
+\ExplSyntaxOff
\def\AmS{\textsf{AMS}}
\let\AMS\AmS
%{\ifluatex\mathversion{XITS}\fi%
% $\mathcal{A}$\kern-.1667em\lower.5ex\hbox{$\mathcal{M}$}\kern-.125em$\mathcal{S}$}}% $
\def\amsmath{\AMS\textsf{math}}
-\def\AmSLaTeX{\mbox{\textsf{AMS}-\hologo{LaTeX}}}
+\def\AmSLaTeX{\mbox{\textsf{AMS}-\LaTeX}}
\def\AmSTeX{\mbox{\textsf{AMS}-\hologo{TeX}}}
\DeclareRobustCommand\Biber{\textsf{Biber}}
\let\biber\Biber
@@ -75,18 +81,20 @@
\def\@BibTeX{{\hologoLogoSetup{BibTeX}{variant=sc}\hologo{BibTeX}}}
\def\BibTeXacht{{\hologoLogoSetup{BibTeX8}{variant=sc}\hologo{BibTeX8}}}
\def\@@BibTeX8{\hologo{BibTeX8}}
-\DeclareRobustCommand\BibLaTeX{Bib\hologo{LaTeX}}
+\DeclareRobustCommand\BibLaTeX{Bib\LaTeX}
\let\biblatex\BibLaTeX
\def\ConTeXt{\hologo{ConTeXt}}
\let\context\ConTeXt
\def\emTeX{\hologo{emTeX}}
\def\eTeX{\hologo{eTeX}}
\def\ExTeX{\hologo{ExTeX}}
-\def\HanTheThanh{\hologo{HanTheThanh}}
+\def\HanTheThanh{\hologo{HanTheThanh}}%
\let\HTT\HanTheThanh
\def\iniTeX{\hologo{iniTeX}}
\def\KOMAScript{\hologo{KOMAScript}}
-\def\LaTeX{\hologo{LaTeX}}
+
+%\def\LaTeX{\hologo{LaTeX}}
+%\def\LaTeXTeX{\hologo{(La)TeX}}
\def\LaTeXe{\hologo{LaTeX2e}}
\def\LaTeXIII{\hologo{LaTeX3}}
\def\LaTeXML{\hologo{LaTeXML}}
@@ -106,6 +114,19 @@
\let\luahbtex\LuaHBTeX
\let\LuahbTeX\LuaHBTeX
\let\luatex\LuaTeX
+%
+
+\def\LuaMetaTeX{%
+ \mbox{Lua}%
+% \HOLOGO@discretionary
+% \mbox{\fontfamily{logo}\fontencoding{U}\selectfont META}
+ \HoLogoFont@font{METAFONT}{logo}{\mbox{META}}%
+% \HOLOGO@discretionary
+ \hologo{TeX}%
+}
+\def\LMTX{\textsf{LMTX}}
+\let\lmtx\LMTX
+
\def\LyX{\hologo{LyX}}
\def\METAFONT{\hologo{METAFONT}}
\let\MF\METAFONT
@@ -134,6 +155,7 @@
\def\SLiTeX{\hologo{SLiTeX}}
\def\teTeX{\hologo{teTeX}}
\def\TeXivht{\hologo{TeX4ht}}
+\def\tex4ht{\hologo{TeX4ht}}
\def\TTH{\hologo{TTH}}
\def\virTeX{\hologo{virTeX}}
\def\VTeX{\hologo{VTeX}}
@@ -143,7 +165,7 @@
%
\newcommand\BibTool{\textsc{Bib\hskip-.1em
T\hskip-.15emo\hskip-.05emo\hskip-.05eml}\xspace}
-\def\tikzlogo{\textsf{Ti\textit{k}Z}}
+\def\tikzlogo{Ti\textit{k}Z}
\def\ALEPH{\ensuremath{\aleph}}
\let\TikZ\tikzlogo
@@ -176,11 +198,11 @@
\providecommand\TUG{\TeX{} Users Group}
\providecommand\TUGboat{\textsl{TUGboat}}
\let\DANTE\dantelogo
-\def\pgf/tikz{\textsf{pgf/Ti\textit{k}Z}}
-\def\pgftikz{\textsf{pgf/Ti\textit{k}Z}}
+\def\pgf/tikz{pgf/Ti\textit{k}Z}
+\def\pgftikz{pgf/Ti\textit{k}Z}
\def\TeXLive{\TeX{}Live\xspace}
-\def\CTAN{\texttt{CTAN}\xspace}
+\def\CTAN{\textsf{CTAN}\xspace}
\def\PSTricks{\textsf{PSTricks}\xspace}
\let\pstricks\PSTricks
diff --git a/macros/latex/contrib/iexec/DEPENDS.txt b/macros/latex/contrib/iexec/DEPENDS.txt
index 6645129e89..5fa4f92b5c 100644
--- a/macros/latex/contrib/iexec/DEPENDS.txt
+++ b/macros/latex/contrib/iexec/DEPENDS.txt
@@ -1,2 +1,3 @@
hard shellesc
+hard pgfkeys
hard xkeyval
diff --git a/macros/latex/contrib/iexec/iexec.pdf b/macros/latex/contrib/iexec/iexec.pdf
index 8bae3e0881..25fa196e42 100644
--- a/macros/latex/contrib/iexec/iexec.pdf
+++ b/macros/latex/contrib/iexec/iexec.pdf
Binary files differ
diff --git a/macros/latex/contrib/iexec/iexec.sty b/macros/latex/contrib/iexec/iexec.sty
index a96f41b004..a15cd50942 100644
--- a/macros/latex/contrib/iexec/iexec.sty
+++ b/macros/latex/contrib/iexec/iexec.sty
@@ -21,29 +21,55 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{iexec}[2022/01/02 0.4.1 Inputable Shell Executions]
+\ProvidesPackage{iexec}[2022/01/08 0.5.0 Inputable Shell Executions]
\RequirePackage{shellesc}
-
+\RequirePackage{pgfkeys}
\RequirePackage{xkeyval}
+
\makeatletter\newif\ifiexec@trace
\DeclareOptionX{trace}{\iexec@tracetrue}
\ProcessOptionsX\relax\makeatother
-\makeatletter\newcommand\iexec[2][iexec.tmp]{%
- \ifnum\pdfshellescape=1\else
- \PackageError{iexec}{You must run latex with --shell-escape option}{}
- \fi
+\makeatletter\pgfkeys{
+ /iexec/.is family,
+ /iexec,
+ stdout/.estore in = \iexec@stdout,
+ stdout/.default = iexec.tmp,
+ trace/.estore in = \iexec@traceit,
+ quiet/.estore in = \iexec@quiet,
+ stdout
+}\makeatother
+
+\makeatletter\newcommand\iexec[2][]{%
+ \pgfkeys{/iexec, #1}%
+ \ifnum\pdfshellescape=1\else%
+ \PackageError{iexec}{You must run latex with --shell-escape option}{}%
+ \fi%
\begingroup%
- \let\%\@percentchar%
- \let\\\@backslashchar%
- \let\{\@charlb%
- \let\}\@charrb%
- \ShellEscape{#2 > #1}%
- \message{iexec: [#2 > #1]}%
+ \let\%\@percentchar%
+ \let\\\@backslashchar%
+ \let\{\@charlb%
+ \let\}\@charrb%
+ \ShellEscape{#2 > \iexec@stdout}%
+ \message{iexec: [#2 > \iexec@stdout]}%
\endgroup%
- \input{#1}%
- \ifiexec@trace\else\ShellEscape{rm #1}\fi%
+ \ifdefined\iexec@quiet
+ \message{iexec: Due to 'quiet' we didn't read the content of '\iexec@stdout'}%
+ \else%
+ \input{\iexec@stdout}%
+ \message{iexec: The content of '\iexec@stdout' was included into the document}%
+ \fi%
+ \ifiexec@trace%
+ \message{iexec: Due to package option 'trace', the file '\iexec@stdout' was not deleted}%
+ \else%
+ \ifdefined\iexec@traceit%
+ \message{iexec: Due to 'trace' option, the file '\iexec@stdout' was not deleted}%
+ \else%
+ \ShellEscape{rm \iexec@stdout}%
+ \message{iexec: The file '\iexec@stdout' was deleted}%
+ \fi%
+ \fi%
}\makeatother
\endinput
diff --git a/macros/latex/contrib/iexec/iexec.tex b/macros/latex/contrib/iexec/iexec.tex
index cc58780c23..0b9d047026 100644
--- a/macros/latex/contrib/iexec/iexec.tex
+++ b/macros/latex/contrib/iexec/iexec.tex
@@ -27,7 +27,7 @@
\usepackage{ffcode}
\title{\ff{iexec}: \LaTeX{} Package \\ for Inputable Shell Executions}
\author{Yegor Bugayenko}
-\date{0.4.1 2022/01/02}
+\date{0.5.0 2022/01/08}
\begin{document}
\pagenumbering{gobble}
\raggedbottom
@@ -66,7 +66,7 @@ The output of your code is saved into the file provided as the
second optional argument of \ff{\char`\\iexec} (the default value is \ff{iexec.tmp}):
\begin{ffcode}
-Today is \iexec[date.txt]{date +\%e-\%b-\%Y | tr -d '\\n'}.
+Today is \iexec[stdout=date.txt]{date +\%e-\%b-\%Y | tr -d '\\n'}.
\end{ffcode}
The tailing part of the command here removes all ends-of-line.
@@ -75,6 +75,14 @@ The file specified will be deleted right after its usage. If you don't
want this to happen, use \ff{trace} package option: all files will remain
in the directory.
+There are a few options you can provide for the \ff{\char`\\iexec} command:
+
+\begin{itemize}
+ \item \ff{trace}: to prevent the deletion of the file;
+ \item \ff{stdout=...}: to set the name of the file where the standard output of the command will be saved;
+ \item \ff{quiet}: to prevent including of the content into the document.
+\end{itemize}
+
More details about this package you can find
in the \ff{yegor256/iexec} GitHub repository.
diff --git a/macros/latex/contrib/kdpcover/DEPENDS.txt b/macros/latex/contrib/kdpcover/DEPENDS.txt
index 75af288d41..ea48e500f9 100644
--- a/macros/latex/contrib/kdpcover/DEPENDS.txt
+++ b/macros/latex/contrib/kdpcover/DEPENDS.txt
@@ -1,11 +1,11 @@
-hard iexec
+hard /code/iexec/iexec
hard xkeyval
hard anyfontsize
hard tikz
hard microtype
-hard xifthen
hard xcolor
hard graphicx
+hard calc
hard setspace
hard geometry
hard textpos
diff --git a/macros/latex/contrib/kdpcover/kdpcover.cls b/macros/latex/contrib/kdpcover/kdpcover.cls
index 9f3355f026..612510d48e 100644
--- a/macros/latex/contrib/kdpcover/kdpcover.cls
+++ b/macros/latex/contrib/kdpcover/kdpcover.cls
@@ -21,127 +21,142 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{kdpcover}[2021/09/02 0.2.2 Cover for Kindle Direct Publishing books]
+\ProvidesClass{kdpcover}[2022/01/08 0.2.3 Cover for Kindle Direct Publishing books]
\LoadClass{article}
-\newcommand*\kdppages{100}
-\newlength\kdpxsize
-\newlength\kdpysize
+\makeatletter
+\newcommand*\kdp@pages{100}
+\newlength\kdp@xsize
+\setlength\kdp@xsize{6in}
+\newlength\kdp@ysize
+\setlength\kdp@ysize{9in}
+\makeatother
+
+\RequirePackage{/code/iexec/iexec}
-\RequirePackage{iexec}
\RequirePackage{xkeyval}
-\DeclareOptionX{6x9}{\setlength\kdpxsize{6in}\setlength\kdpysize{9in}}
-\DeclareOptionX{7x10}{\setlength\kdpxsize{7in}\setlength\kdpysize{10in}}
-\DeclareOptionX{8x10}{\setlength\kdpxsize{8in}\setlength\kdpysize{10in}}
-\DeclareOptionX{pages}{\renewcommand*\kdppages{#1}}
-\DeclareOptionX{pdf}{\renewcommand*{\kdppages}{\iexec{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}}}
-\ProcessOptionsX\relax
+
+\makeatletter
+\DeclareOptionX{6x9}{\setlength\kdp@xsize{6in}\setlength\kdp@ysize{9in}}
+\DeclareOptionX{7x10}{\setlength\kdp@xsize{7in}\setlength\kdp@ysize{10in}}
+\DeclareOptionX{8x10}{\setlength\kdp@xsize{8in}\setlength\kdp@ysize{10in}}
+\DeclareOptionX{pages}{\renewcommand*\kdp@pages{#1}}
+\DeclareOptionX{pdf}{%
+ \iexec[trace,quiet,stdout=kdpcover-pages-count.txt]{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}%
+ \newread\kdp@pagescount%
+ \openin\kdp@pagescount=kdpcover-pages-count.txt
+ \read\kdp@pagescount to \kdp@pages%
+}
+\ProcessOptionsX\relax\makeatother
\RequirePackage{anyfontsize}
\RequirePackage{tikz}
\RequirePackage[letterspace=-50]{microtype}
-\RequirePackage{xifthen}
\RequirePackage{xcolor}
\RequirePackage{graphicx}
+\RequirePackage{calc}
+
\RequirePackage{setspace}
\setstretch{1.2}
+
% The height of the page is 9 inches plus 0.125 "bleed" on top and
% on the bottom.
% Check this doc: https://kdp.amazon.com/en_US/help/topic/G201953020
-\newlength\kdpheight
-\setlength\kdpheight{0.125in + \kdpysize + 0.125in}
+\makeatletter\newlength\kdp@height\makeatother%
+\makeatletter\setlength\kdp@height{0.125in + \kdp@ysize + 0.125in}\makeatother%
% The width is 6 inches plus 0.125 "bleed" on each side. The width of the
-% "spine" depends on the amount of pages in the book. Also, there is a
-%
-\newlength\kdpwidth
-\setlength\kdpwidth{0.125in + \kdpxsize + 0.0025in * \kdppages + \kdpxsize + 0.125in}
+% "spine" depends on the amount of pages in the book.
+\makeatletter\newlength\kdp@width\makeatother
+\makeatletter\setlength\kdp@width{0.125in + \kdp@xsize + 0.0025in * \kdp@pages + \kdp@xsize + 0.125in}\makeatother
\RequirePackage{geometry}
- \geometry{paperwidth=\kdpwidth,paperheight=\kdpheight,left=0pt,right=0pt,top=0pt,bottom=0pt}
+ \makeatletter
+ \geometry{paperwidth=\kdp@width,paperheight=\kdp@height,left=0pt,right=0pt,top=0pt,bottom=0pt}
+ \makeatother
\RequirePackage[absolute]{textpos}
\TPGrid{16}{16}
-\newcommand\putSpine[2][kdpcover-signature]{
- \begin{textblock}{2.4}[0.5,0](8,0)
- \begin{tikzpicture}
+\newcommand\putSpine[2][kdpcover-signature]{%
+ \begin{textblock}{2.4}[0.5,0](8,0)%
+ \begin{tikzpicture}%
\node [rectangle, inner sep=0em, fill=black, minimum width=2.4\TPHorizModule, minimum height=16\TPVertModule] at (0,0) {};
- \end{tikzpicture}
- \end{textblock}
- \begin{textblock}{1}[0.5,0](8,2)
- \begin{tikzpicture}
+ \end{tikzpicture}%
+ \end{textblock}%
+ \begin{textblock}{1}[0.5,0](8,2)%
+ \begin{tikzpicture}%
\node [color=white, inner sep=0cm, outer sep=0cm, rotate=270, minimum height=\TPHorizModule] at (0,0) {
- \Large #1
- };
- \end{tikzpicture}
- \end{textblock}
- \begin{textblock}{2.4}[0.5,1](8,14)
- \centerline{\includegraphics[width=0.32in]{#1}}
- \end{textblock}
+ \Large #2
+ };%
+ \end{tikzpicture}%
+ \end{textblock}%
+ \begin{textblock}{2.4}[0.5,1](8,14)%
+ \centerline{\includegraphics[width=0.32in]{#1}}%
+ \end{textblock}%
}
-\newcommand\putPicture[1]{
- \begin{textblock}{4}(10,2)
+\newcommand\putPicture[1]{%
+ \begin{textblock}{4}(10,2)%
\includegraphics[width=\textwidth]{#1}
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putVolume[1]{
- \begin{textblock}{2}[1,1](15,14)
+\newcommand\putVolume[1]{%
+ \begin{textblock}{2}[1,1](15,14)%
\raggedleft
\includegraphics[height=0.4in]{kdpcover-vol-#1}
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putPrice[1]{
- \begin{textblock}{4}[0,1](1,2)
+\newcommand\putPrice[1]{%
+ \begin{textblock}{4}[0,1](1,2)%
\small #1
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putBack[1]{
- \begin{textblock}{5}[0,0](1,3)
+\newcommand\putBack[1]{%
+ \begin{textblock}{5}[0,0](1,3)%
\small #1
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putTitle[1]{
- \begin{textblock}{5}(10,9)
+\newcommand\putTitle[1]{%
+ \begin{textblock}{5}(10,9)%
\fontsize{32}{32}\selectfont #1
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putAuthor[1]{
- \begin{textblock}{4}(10,10)
+\newcommand\putAuthor[1]{%
+ \begin{textblock}{4}(10,10)%
\large by #1
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putTLDR[1]{
- \begin{textblock}{5}(10,11)
+\newcommand\putTLDR[1]{%
+ \begin{textblock}{5}(10,11)%
TL;DR #1
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putVersion[1]{
- \begin{textblock}{4}[0,1](10,14)
+\newcommand\putVersion[1]{%
+ \begin{textblock}{4}[0,1](10,14)%
#1
\quad
\iexec{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'}
- \end{textblock}
+ \end{textblock}%
}
-\newcommand\putCopyright[2]{
- \begin{textblock}{4}[0,1](1,14)
+\newcommand\putCopyright[2]{%
+ \begin{textblock}{4}[0,1](1,14)%
\small (c)
#1 #2
- \end{textblock}
+ \end{textblock}%
}
-\AtBeginDocument{
+\AtBeginDocument{%
\ttfamily%
\raggedright%
\setlength\parindent{0pt}%
\setlength\parskip{0pt}%
- \interfootnotelinepenalty=10000
+ \interfootnotelinepenalty=10000%
}
\endinput
diff --git a/macros/latex/contrib/kdpcover/kdpcover.pdf b/macros/latex/contrib/kdpcover/kdpcover.pdf
index aad909aa9d..b48b7b05c3 100644
--- a/macros/latex/contrib/kdpcover/kdpcover.pdf
+++ b/macros/latex/contrib/kdpcover/kdpcover.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpcover/kdpcover.tex b/macros/latex/contrib/kdpcover/kdpcover.tex
index 8f09b9f9b2..2fda6e5bfd 100644
--- a/macros/latex/contrib/kdpcover/kdpcover.tex
+++ b/macros/latex/contrib/kdpcover/kdpcover.tex
@@ -45,7 +45,7 @@
% Here we print the version and it will also add the date of the latest
% Git commit in the current directory. If it's not a Git repository,
% the date won't be printed.
-\putVersion{0.2.2}
+\putVersion{0.2.3}
% This prints the price, which is a good practice to mention, I believe.
\putPrice{\$0.00}
diff --git a/macros/latex/contrib/sapthesis/README b/macros/latex/contrib/sapthesis/README
index a3abe94360..0201d87517 100644
--- a/macros/latex/contrib/sapthesis/README
+++ b/macros/latex/contrib/sapthesis/README
@@ -10,7 +10,7 @@
** License **********************************************************
- Copyright (c) 2008-2018 by Francesco Biccari.
+ Copyright (c) 2008-2022 by Francesco Biccari.
This work (specified below) may be distributed and/or
modified under the conditions of the
@@ -40,9 +40,6 @@
Sapthesis is a LaTeX class to typeset theses that adhere to
"Sapienza - University of Rome"'s guidelines for publishing.
- The supported types of theses are: Laurea, LaureaMagistrale,
- Dottorato di Ricerca, Master di primo livello, Master di
- secondo livello, TFA, Specializzazione.
It is compatible with two compilation methods:
pdflatex and xelatex.
@@ -63,7 +60,7 @@
of your TeX distribution (TeX Live, MiKTeX or MacTeX).
2. Instead, if you want to install sapthesis manually, you have to
- download the sapthesis.zip archive from CTAN or, better, from
+ download the sapthesis.zip archive from CTAN or from
the official sapthesis website
http://biccari.altervista.org/c/informatica/latex/sapthesis.php
@@ -73,27 +70,22 @@
2. sapthesis-doc.pdf (manual of sapthesis.cls)
3. sapthesis-doc.tex (source of the manual)
4. README (this file)
- 5. sapienza-MLred-pos.pdf (red university logo)
- 6. sapienza-MLblack-pos.pdf (black university logo)
- 7. examples folder with several examples of usage
- 8. sapthesis.bst (an english BibTeX style)
- 9. sapthesis.layout (sapthesis layout file for LyX)
+ 5. sapienzalogo.pdf (university logo)
+ 6. sapthesis.bst (an english BibTeX style)
+ 7. sapthesis.layout (sapthesis layout file for LyX)
You can simply copy sapthesis.cls and sapthesis.bst
- together with sapienza-MLred-pos.pdf and
- sapienza-MLblack-pos.pdf into your local work directory where
- your thesis files will live.
+ together with sapienzalogo.pdf into your local
+ work directory where your thesis files will live.
3. The last possibility is copying the files of Sapthesis
(discussed in the previous point) into your texmf tree
(or your localtexmf tree) at these locations:
<texmf>/tex/latex/sapthesis/sapthesis.cls
- <texmf>/tex/latex/sapthesis/sapienza-MLred-pos.pdf
- <texmf>/tex/latex/sapthesis/sapienza-MLblack-pos.pdf
+ <texmf>/tex/latex/sapthesis/sapienzalogo.pdf
<texmf>/doc/latex/sapthesis/sapthesis-doc.pdf
<texmf>/doc/latex/sapthesis/sapthesis-doc.tex
- <texmf>/doc/latex/sapthesis/examples/*.tex
<texmf>/doc/latex/sapthesis/README
<texmf>/bibtex/bst/sapthesis/sapthesis.bst
<texmf>/doc/latex/sapthesis/sapthesis.layout
diff --git a/macros/latex/contrib/sapthesis/examples/LaureaMagistrale_eng.tex b/macros/latex/contrib/sapthesis/examples/LaureaMagistrale_eng.tex
deleted file mode 100644
index 363702f64e..0000000000
--- a/macros/latex/contrib/sapthesis/examples/LaureaMagistrale_eng.tex
+++ /dev/null
@@ -1,216 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = en_US
-
-\documentclass[LaM,binding=0.6cm]{sapthesis}
-
-\usepackage{microtype}
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Usage example of the Sapthesis class for a Laurea Magistrale thesis in English},pdfauthor={Francesco Biccari}}
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-% Commands for the titlepage
-\title{Usage example of the Sapthesis class\\ for a Laurea Magistrale thesis in English}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course{Fisica}
-\courseorganizer{Facolt\`{a} di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2012/2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\advisor{Dr. Nome Cognome}
-\coadvisor{Dr. Nome Cognome}
-\authoremail{biccari@email.com}
-
-\examdate{16 April 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Dr. Nome Cognome}
-\versiondate{\today}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicated to\\ Donald Knuth}
-
-\begin{abstract}
-This document is an example which shows the main features of
-the \LaTeXe\ class \texttt{sapthesis.cls} developed by Francesco Biccari
-with the help of GuIT (Gruppo Utilizzatori Italiani di \TeX).
-\end{abstract}
-
-\begin{acknowledgments}
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Capitolo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Paragrafo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/examples/LaureaMagistrale_ita.tex b/macros/latex/contrib/sapthesis/examples/LaureaMagistrale_ita.tex
deleted file mode 100644
index 425de42d61..0000000000
--- a/macros/latex/contrib/sapthesis/examples/LaureaMagistrale_ita.tex
+++ /dev/null
@@ -1,221 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = it_IT
-
-\documentclass[LaM,binding=0.6cm]{../sapthesis}
-
-\usepackage{microtype}
-\usepackage[italian]{babel}
-\usepackage[utf8]{inputenc}
-%\input{ix-utf8enc.dfu}
-
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Esempio d'uso della classe Sapthesis per una tesi di Laurea Magistrale},pdfauthor={Francesco Biccari}}
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-% Commands for the titlepage
-\title{Esempio d'uso della classe Sapthesis\\
-per una tesi di Laurea Magistrale}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course{Fisica}
-\courseorganizer{Facoltà di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2012/2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\advisor{Dr. Nome Cognome}
-\coadvisor{Dr. Nome Cognome}
-\authoremail{biccari@email.com}
-
-\examdate{16 April 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Dr. Nome Cognome}
-\versiondate{\today}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicato a\\ Donald Knuth}
-
-\begin{abstract}
-This document is an example which shows the main features of
-the \LaTeXe\ class \texttt{sapthesis.cls} developed by Francesco Biccari
-with the help of GuIT (Gruppo Utilizzatori Italiani di \TeX).
-\end{abstract}
-
-\begin{acknowledgments}
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Capitolo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Paragrafo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/examples/Laurea_ita.tex b/macros/latex/contrib/sapthesis/examples/Laurea_ita.tex
deleted file mode 100644
index 851ae6b35f..0000000000
--- a/macros/latex/contrib/sapthesis/examples/Laurea_ita.tex
+++ /dev/null
@@ -1,218 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = it_IT
-
-\documentclass[Lau,binding=0.6cm]{sapthesis}
-
-\usepackage{microtype}
-\usepackage[italian]{babel}
-\usepackage[utf8]{inputenx}
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Sapthesis class example},pdfauthor={Francesco Biccari}}
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-% Commands for the titlepage
-\title{Esempio d'uso della classe Sapthesis\\ per una tesi di Laurea}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course{Fisica}
-\courseorganizer{Facoltà di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2012/2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\advisor{Dr. Nome Cognome}
-\coadvisor{Dr. Nome Cognome}
-\authoremail{biccari@email.com}
-
-\examdate{16 April 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Dr. Nome Cognome}
-\versiondate{\today}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicato a\\ Donald Knuth}
-
-\begin{abstract}
-This document is an example which shows the main features of
-the \LaTeXe\ class \texttt{sapthesis.cls} developed by Francesco Biccari
-with the help of GuIT (Gruppo Utilizzatori Italiani di \TeX).
-\end{abstract}
-
-\begin{acknowledgments}
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Capitolo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Paragrafo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/examples/Master.tex b/macros/latex/contrib/sapthesis/examples/Master.tex
deleted file mode 100644
index c780e79ee8..0000000000
--- a/macros/latex/contrib/sapthesis/examples/Master.tex
+++ /dev/null
@@ -1,219 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = it_IT
-
-\documentclass[MasterS,binding=0.6cm]{sapthesis}
-% use MasterP option, instead of MasterS, for a ``Master di primo livello''
-
-\usepackage{microtype}
-\usepackage[italian]{babel}
-\usepackage[utf8]{inputenx}
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Esempio d'uso della classe Sapthesis per una tesi di Master},pdfauthor={Francesco Biccari}}
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-% Commands for the titlepage
-\title{Esempio d'uso della classe Sapthesis\\ per una tesi di Master}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course{Fisica}
-\courseorganizer{Facoltà di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2012/2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\advisor{Dr. Nome Cognome}
-\coadvisor{Dr. Nome Cognome}
-\authoremail{biccari@email.com}
-
-\examdate{16 April 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Dr. Nome Cognome}
-\versiondate{\today}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicato a\\ Donald Knuth}
-
-\begin{abstract}
-This document is an example which shows the main features of
-the \LaTeXe\ class \texttt{sapthesis.cls} developed by Francesco Biccari
-with the help of GuIT (Gruppo Utilizzatori Italiani di \TeX).
-\end{abstract}
-
-\begin{acknowledgments}
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Capitolo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Paragrafo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/examples/PhD.tex b/macros/latex/contrib/sapthesis/examples/PhD.tex
deleted file mode 100644
index 20dadb8c81..0000000000
--- a/macros/latex/contrib/sapthesis/examples/PhD.tex
+++ /dev/null
@@ -1,221 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = en_US
-
-\documentclass[PhD,binding=0.6cm]{../sapthesis}
-
-\usepackage{microtype}
-% if you write in italian:
-%\usepackage[italian]{babel}
-\usepackage[utf8]{inputenx}
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Usage example of the Sapthesis class for a PhD thesis},pdfauthor={Francesco Biccari}}
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-% Commands for the titlepage
-\title{Usage example of the Sapthesis class\\ for a PhD thesis}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course[Physics]{Fisica}
-\courseorganizer{Scuola di dottorato Vito Volterra}
-\cycle{XXV}
-\submitdate{April 2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\advisor{Dr. Nome Cognome}
-\coadvisor{Dr. Nome Cognome}
-\authoremail{biccari@email.com}
-
-\examdate{16 April 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Dr. Nome Cognome}
-\versiondate{\today}
-\ISBN{000000000-0}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicated to\\ Donald Knuth}
-
-\begin{abstract}
-This document is an example which shows the main features of
-the \LaTeXe\ class \texttt{sapthesis.cls} developed by Francesco Biccari
-with the help of GuIT (Gruppo Utilizzatori Italiani di \TeX).
-\end{abstract}
-
-\begin{acknowledgments}[Ringraziamenti]
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Non numbered chapter}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Non numbered section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/examples/Specialization.tex b/macros/latex/contrib/sapthesis/examples/Specialization.tex
deleted file mode 100644
index db99767f6b..0000000000
--- a/macros/latex/contrib/sapthesis/examples/Specialization.tex
+++ /dev/null
@@ -1,220 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = en_US
-
-\documentclass[Specialization,binding=0.6cm]{sapthesis}
-
-\usepackage{microtype}
-\usepackage[utf8]{inputenx}
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Usage example of Sapthesis class for Specialization thesis},pdfauthor={Francesco Biccari}}
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-% Commands for the titlepage
-\title{Usage example of Sapthesis class for\\ Specialization thesis}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course{Fisica Medica}
-\courseorganizer{Facoltà di Medicina e Chirurgia}
-\AcademicYear{2012/2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\advisor{Dr. Nome Cognome}
-\coadvisor{Dr. Nome Cognome}
-\director{Prof. Nome Cognome}
-\authoremail{biccari@email.com}
-
-\examdate{16 April 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Dr. Nome Cognome}
-\versiondate{\today}
-\website{biccari.altervista.org}
-\ISBN{000000000-0}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicated to\\ Donald Knuth}
-
-\begin{abstract}
-This document is an example which shows the main features of
-the \LaTeXe\ class \texttt{sapthesis.cls} developed by Francesco Biccari
-with the help of GuIT (Gruppo Utilizzatori Italiani di \TeX).
-\end{abstract}
-
-\begin{acknowledgments}[Ringraziamenti]
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Non numbered chapter}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Non numbered section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/examples/TFA.tex b/macros/latex/contrib/sapthesis/examples/TFA.tex
deleted file mode 100644
index ddebabbf4d..0000000000
--- a/macros/latex/contrib/sapthesis/examples/TFA.tex
+++ /dev/null
@@ -1,229 +0,0 @@
-% !TeX encoding = UTF-8
-% !TeX program = pdflatex
-% !TeX spellcheck = it_IT
-
-\documentclass[TFA,oneside]{sapthesis}
-
-% READ THE DOCUMENTATION!
-
-\usepackage{microtype}
-\usepackage[italian]{babel}
-\usepackage[utf8]{inputenx}
-
-\usepackage{hyperref}
-\hypersetup{pdftitle={Esempio relazione TFA},pdfauthor={Francesco Biccari}}
-
-% If you need to increase the line spacing (interlinea)
-%\usepackage{setspace}
-%\onehalfspacing
-
-% Remove in a normal thesis
-\usepackage{lipsum}
-\usepackage{curve2e}
-\definecolor{gray}{gray}{0.4}
-\newcommand{\bs}{\textbackslash}
-
-
-% Commands for the titlepage
-\title{Esempio d'uso della classe Sapthesis\\ per la relazione di tirocinio del TFA}
-\author{Francesco Biccari}
-\IDnumber{1234567}
-\course{A027 Matematica e Fisica}
-\courseorganizer{Facoltà di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2012/2013}
-\copyyear{2013}
-\advisor{Prof. Nome Cognome}
-\tutor{Prof.ssa Nome Cognome}
-\tutorcoord{Prof.ssa Nome Cognome}
-\authoremail{biccari@email.com}
-\schoolname{Liceo Scientifico Louis Pasteur}
-\schooladdress{Via G. Barellai 130, 00135 Roma}
-\schoolwebsite{http://www.liceopasteur.it/}
-\schoolprincipal{Prof.ssa Nome Cognome}
-
-\examdate{9 luglio 2013}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome}
-\examiner{Prof. Nome Cognome (tutor coord.)}
-\examiner{Prof. Nome Cognome (tutor)}
-\examiner{Prof. Nome Cognome (dirigente scolastico nominato dall'USR)}
-\examiner{Prof. Nome Cognome (tutor coord. supplente)}
-
-\versiondate{\today}
-
-
-
-\begin{document}
-
-\frontmatter
-
-\maketitle
-
-\dedication{Dedicato a\\ Donald Knuth}
-
-\begin{acknowledgments}[Ringraziamenti]
-Ho deciso di scrivere i ringraziamenti in italiano
-per dimostrare la mia gratitudine verso i membri
-del GuIT, il Gruppo Utilizzatori Italiani di \TeX, e, in particolare,
-verso il prof. Enrico Gregorio.
-\end{acknowledgments}
-
-\tableofcontents
-
-% Do not use the starred version of the chapter command!
-\chapter{Capitolo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.%
-\footnote{This is a footnote.}
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-\section*{Paragrafo non numerato}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-22]}
-
-
-
-
-\mainmatter
-
-\chapter{Style features of \textsf{sapthesis}}
-
-In this chapter I will discuss my stylistic choices of \textsf{sapthesis}.
-I will show the page layout geometry and I will describe the page style.
-
-\section{Page layout}
-
-The page is fixed at the dimensions of an A4 paper, therefore you have to print your thesis on A4 paper to obtain the best results. The font dimension is fixed at 11\, pt. The text column and the margins are chosen to fill to the best an A4 paper while keeping a reasonable line length (396\, pt) for a good readability. The text height and the text width are in golden ratio (\textasciitilde 1.6180) as well as the outer and inner margins in a two-side document after binding margin removal. Also the top margin (excluding the header) and bottom margin are in the golden ratio. In Fig.~\ref{layout} a sketch of the \textsf{sapthesis} page layout is shown.
-
-\begin{figure}[h]
-\centering
-\setlength{\unitlength}{0.27mm}
-\begin{picture}(420,297)(-210,0)
-\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
-\Line(0,0)(0,297)
-\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
-\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
-\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
-\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
-\end{picture}
-\caption{Page layout scheme of \textsf{sapthesis class} using a zero binding margin.}
-\label{layout}
-\end{figure}
-
-
-\section{Page style}
-
-The captions have a smaller font respect to the text and the label is in boldface. The appearance of the margin notes has been improved.
-They have the same font dimension of the footnotes and are typed in italics.
-Moreover I defined a new command to typeset margin note aligned to the left on the right page and vice versa on the left page.
-Notice that if a binding margin greater than 1.5\, cm is used, the dimensions of the margin notes become too small and very ugly.
-Do not use them in this case.
-
-The mathematical objects, figures and tables are numbered within the chapters (e.g. 1.1, 1.2,\ldots for the first chapter, 2.1, 2.2 for the second one and so on\ldots). See for example the number of this simple equation
-\begin{equation}
-x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
-\end{equation}
-
-
-The title page is automatically composed when the \texttt{\bs maketitle} command is given.
-The parameters needed for the title page, author, title, etc\ldots , are supplied by dedicated commands explained in the next section.
-Two copies of the university logo in \texttt{pdf} format, one for color printing and the other one for black and white printing, are supplied in the \textsf{sapthesis} package. They are shown in Fig.~\ref{fig:largenenough}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.7\textwidth]{sapienza-MLred-pos}\\[3ex]
-\includegraphics[width=0.7\textwidth]{sapienza-MLblack-pos}
-\caption{Logo of the Sapienza -- University of Rome.}
-\label{fig:largenenough}
-\end{figure}
-
-
-
-\section{About figures and tables}
-
-As regards the image formats, please use vector images as much as possible! Use jpg images only for photographs! pdf\LaTeX\ supports the pdf, jpg and png formats.
-
-A very simple table is show in Tab.~\ref{tab:letters}. Remember to typeset
-always the table caption above the table. Do not use vertical lines.
-
-\begin{table}
-\caption{This is a simple table.}
-\label{tab:letters}
-\centering
-\begin{tabular}{lcc}
-\toprule
-Letter & Test & Test \\
-\midrule
-A & C & E \\
-B & D & F \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-
-\section{A section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum[1-10]}
-
-
-
-\section{Another section}
-
-In this manual you can skip the gray text because it is just dummy text.
-
-\textcolor{gray}{\lipsum}
-
-
-\appendix
-\chapter{Special commands provided by \textsf{sapthesis}}
-
-\textsf{Sapthesis} provides some special commands, particularly useful for scientific works. You can use for example the roman shape, instead of the italic, for the imaginary unit (\texttt{\bs iu}) and Napier's number (\texttt{\bs eu}):
-\begin{equation}
-\eu^{\iu\pi}+1=0
-\end{equation}
-
-There are also two commands to speed up the writing of derivatives. In the following example we have used the commands \texttt{\bs der} and \texttt{\bs pder}):
-\begin{equation}
-\der{f}{x} \qquad \pder{f}{*{2}{y}}
-\end{equation}
-
-
-\textsf{Sapthesis} provides also 4 commands to improve the writing of subscripts, \texttt{\bs rb} and \texttt{\bs tb}, and superscripts, \texttt{\bs rp} and \texttt{\bs tp}. Two of these commands, \texttt{\bs rb} and \texttt{\bs rp}, can be used both in text and in math mode and compose their argument in roman. The other two, \texttt{\bs tb} and \texttt{\bs tp}, can be used only in text mode and compose their argument as are. Here it is an usage example of \texttt{\bs rb} and \texttt{\bs rp}:
-\[
-a_b \neq a\rb{b}\qquad a^b \neq a\rp{b}
-\]
-And here it is an usage example of \texttt{\bs tb}: \emph{Cu\tb{It} indicates copper bought in Italy}. And a usage example of \texttt{\bs ts}: \emph{Cher G\tp{le} Napol\'eon}.
-
-
-Then several commands for the correct typesetting of unit of measurements are provided. For example the command \texttt{\bs un} typesets its argument in roman and leaves a thin space between the number and the unit: $25\un{m}$, $3.5\un{m/s}$. Other commands are: (\texttt{\bs g}) 45\g, (\texttt{\bs C}) 30\,\C, (\texttt{\bs A}) 12\,\A, (\texttt{\bs micro}) 40\,\micro m, (\texttt{\bs ohm}) 27\,\ohm.
-
-We have also \texttt{\bs x} as abbreviation of \texttt{\bs times}: \texttt{\$7 \bs x 10\^{}5\$} gives $7 \x 10^5$. Then \texttt{\bs di} is the differential symbol which automatically insert the correct spacing.
-\[
-\int x \di x
-\]
-
-Finally we have defined the color \textsf{sapred} which is the official color
-of Sapienza -- University of Rome. It is defined as RGB(130,36,51). \textcolor{sapred}{This text is written with the color \textsf{sapred}.}
-
-In the following dummy text you can observe the usage of \texttt{\bs mnote} command which typesets fancy margin notes.
-
-\textcolor{gray}{\lipsum}
-\marginpar{This is a fancy margin note!}
-\textcolor{gray}{\lipsum}
-
-\backmatter
-% bibliography
-%\cleardoublepage
-%\phantomsection
-%\bibliographystyle{sapthesis} % BibTeX style
-%\bibliography{bibliography} % BibTeX database without .bib extension
-
-\end{document}
diff --git a/macros/latex/contrib/sapthesis/sapienza-MLblack-pos.pdf b/macros/latex/contrib/sapthesis/sapienza-MLblack-pos.pdf
deleted file mode 100644
index f8b64b193e..0000000000
--- a/macros/latex/contrib/sapthesis/sapienza-MLblack-pos.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/sapthesis/sapienza-MLred-pos.pdf b/macros/latex/contrib/sapthesis/sapienzalogo.pdf
index 348c7c9c09..348c7c9c09 100644
--- a/macros/latex/contrib/sapthesis/sapienza-MLred-pos.pdf
+++ b/macros/latex/contrib/sapthesis/sapienzalogo.pdf
Binary files differ
diff --git a/macros/latex/contrib/sapthesis/sapthesis-doc.pdf b/macros/latex/contrib/sapthesis/sapthesis-doc.pdf
index 80268090c7..18c215ee6c 100644
--- a/macros/latex/contrib/sapthesis/sapthesis-doc.pdf
+++ b/macros/latex/contrib/sapthesis/sapthesis-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/sapthesis/sapthesis-doc.tex b/macros/latex/contrib/sapthesis/sapthesis-doc.tex
index 67c736eceb..ce2ce1811e 100644
--- a/macros/latex/contrib/sapthesis/sapthesis-doc.tex
+++ b/macros/latex/contrib/sapthesis/sapthesis-doc.tex
@@ -16,6 +16,7 @@
\usepackage{color}
\definecolor{gray}{gray}{0.4}
\definecolor{sfondoblu}{rgb}{0.94,0.97,1}
+\usepackage{curve2e}
\usepackage{listings}
\lstset{language=[LaTeX]TeX,
basicstyle=\scriptsize\ttfamily,
@@ -25,10 +26,12 @@
frameround=tttt,
frame=tlrb,
escapechar=|,
- morekeywords={submitdate, cycle, courseorganizer, AcademicYear, copyyear, Faculty, course, PhDorganizer, IDnumber, advisor, examdate, examiner, authoremail, frontmatter, mainmatter, maketitle, tableofcontents, chapter, appendix, backmatter, dedication, selectlanguage, tutor, tutorcoord, schoolname, schooladdress, schoolwebsite, schoolprincipal},
+ morekeywords={submitdate, cycle, courseorganizer, AcademicYear, copyyear, Faculty, course, PhDorganizer, IDnumber, advisor, coadvisor, examdate, examiner, authoremail, frontmatter, mainmatter, maketitle, tableofcontents, chapter, appendix, backmatter, dedication, selectlanguage, tutor, tutorcoord, thesistype, customdirectorlabel, schoolname, schooladdress, schoolwebsite, schoolprincipal, phantomsection, director, hypersetup},
columns=flexible
}
+\definecolor{sapred}{rgb}{0.5098039,0.1411765,0.2}
+
\usepackage{multicol}
% eliminate dots in the table of contents
@@ -53,7 +56,7 @@
\author{\small Francesco Biccari\thanks{\href{mailto:biccari@gmail.com}{biccari@gmail.com}}}
\title{\small Documentation of the \LaTeX\ class\\
\Large \textbf{\texttt{sapthesis.cls}}\\
- \small \vspace{0.2cm} Version 4.1, 2018-08-07
+ \small \vspace{0.2cm} Version 5.0, 2022-01-01
}
\date{}
@@ -104,7 +107,7 @@
\maketitle
\begin{abstract}\noindent
-This document describes how to use \texttt{sapthesis.cls}, a \LaTeX\ document class for the typesetting of the theses of the ``Sapienza -- University of Rome''. The official web page of \textsf{sapthesis} is\\
+This document describes how to use \texttt{sapthesis.cls}, a \LaTeX\ document class for the typesetting of the theses of the ``Sapienza University of Rome''. The official web page of \textsf{sapthesis} is\\
{\footnotesize\url{http://biccari.altervista.org/c/informatica/latex/sapthesis.php}}.
\end{abstract}
@@ -126,7 +129,7 @@ Apart from the time spent, the resulting documents are obviously all different f
This has a negative impact both on the student's work and on the university.
Moreover in 2007 the Sapienza university changed completely its
logo and a lot of strict graphic rules for official documents were introduced.%
-\footnote{A thesis is not an official document and therefore these guidelines can not be applied (private communication with Laura Gobbo, Ufficio Stampa e Comunicazione Sapienza -- Universit\`a di Roma).
+\footnote{A thesis is not an official document and therefore these guidelines can not be applied (private communication with Laura Gobbo, Ufficio Stampa e Comunicazione Sapienza Universit\`a di Roma).
However some Microsoft Word templates, with a completely different style, are provided.
To give a look to the new Sapienza style see
\href{https://www.uniroma1.it/it/pagina/marchio-identita-visiva-e-sistema-grafico}{Marchio, identità visiva e sistema grafico} and \href{https://www.uniroma1.it/it/pagina/impaginazione-della-tesi-e-logo}{Template tesi}.}
@@ -134,11 +137,13 @@ To give a look to the new Sapienza style see
For these reasons I thought that a \LaTeX\ class for the theses of my
university would have been a good idea.
\textsf{Sapthesis} is the result of my work.
-To give a look to a document composed by \textsf{sapthesis} class, compile one of the several examples in the \texttt{examples} directory.
-In those files the page layout and the layout choices are explained.
+Its official web page is
+{\footnotesize\url{http://biccari.altervista.org/c/informatica/latex/sapthesis.php}}.
\textsf{Sapthesis} is released under the terms of the latest version of the
\href{http://www.latex-project.org/lppl/}{\LaTeX\ Project Public License}.
+To give a look to a document composed by \textsf{sapthesis} class, compile one of the several examples reported in App.\,\ref{sec:examples}.
+
I would like to thank the Italian \TeX\ user group (\href{http://www.guitex.org/}{GuIT}) for the help provided, in particular Enrico Gregorio and Claudio Beccari. I would also thank all the users who reported bugs and suggestions.
\section[Requirements\\ and installation]{Requirements and installation}
@@ -150,8 +155,8 @@ the \texttt{README} file.
The \textsf{sapthesis} package provides: the
\texttt{sapthesis.cls} class file; the documentation
-\texttt{sapthesis-doc.pdf} (this file) and its source code; the logos of
-Sapienza university; several usage examples; an English Bib\TeX\ style, called
+\texttt{sapthesis-doc.pdf} (this file) and its source code; the logo of
+Sapienza university; an English Bib\TeX\ style, called
\texttt{sapthesis.bst}, which can be used, obviously, only if you use the
Bib\TeX\ way to compose your bibliography and if your thesis is written in
English (its usage is not mandatory).
@@ -174,46 +179,34 @@ As usual, in order to use this class, you need to call it by
\begin{lstlisting}
\documentclass[|\textit{\texttt{options}}|]{sapthesis}
\end{lstlisting}
-You have to specify the class options for your case (see Sec.~\ref{class_options}). Then you have to provide some fundamental information (title, author, etc\ldots) by specific commands in the preamble (see Sec.~\ref{commands_titlepage}). Finally, remember to follow a source code structure similar to those of the examples given in App.~\ref{sec:PhDexample} and~\ref{sec:LaMexample}.
+You have to specify the class options for your case (see Sec.~\ref{class_options}). Then you have to provide some fundamental information (title, author, etc\ldots) by specific commands in the preamble (see Sec.~\ref{commands_titlepage}). Finally, remember to follow a source code structure similar to those of the examples given in App.~\ref{sec:examples}.
Especially the usage of the commands \texttt{\bs frontmatter}, \texttt{\bs mainmatter} and \texttt{\bs backmatter} is mandatory, otherwise the page style of the document will be wrong!
-This class supports, at the moment, two languages: Italian and English. English is the default.
-If your thesis contains only English or very few paragraphs in another language, do not use the \texttt{babel} package because completely useless. Instead, if you write in italian, load the \texttt{babel} package with the
-\texttt{italian} option: \texttt{\bs usepackage[italian]\{babel\}}.
+This class supports, at the moment, two languages: Italian and English. The choice of the language is automatic according to the \texttt{babel} package settings. If babel is not loaded, english is used. See below to override the automatic choice.
\subsection{Class options}
\label{class_options}
The following options can be passed to the \texttt{\bs documentclass} command.
\begin{description}
-\item[\texttt{PhD}] Option to typeset a \textit{Dottorato di Ricerca} (PhD) thesis.
-\item[\texttt{LaM}] Option to typeset a \textit{Laurea Magistrale} (Master's degree) thesis.
-\item[\texttt{Lau}] Option to typeset a \textit{Laurea} (Bachelor's degree) thesis.
-\item[\texttt{MasterP}] Option to typeset a thesis for a \textit{Master di primo livello} (First level master).
-\item[\texttt{MasterS}] Option to typeset a thesis for a \textit{Master di secondo livello} (Second level master).
-\item[\texttt{TFA}] Option to typeset the final report for a \textit{Tirocinio Formativo Attivo}.
-\item[\texttt{Specialization}] Option to typeset a thesis for a \textit{Specializzazione}.
+\item[\texttt{a4paper/a5paper/b5paper}] Choose one of these three options to set the paper format. The default value is \texttt{a4paper}.
+\item[\texttt{layout=\textsl{a5paper/b5paper}}] If, for some reason, it is impossible to print on A5 or B5 directly (printer not supporting these formats, paper not available, ...), it is possible to specify the A5 or B5 layout, maintaining the A4 paper format: some cropmarks will be printed to show where the page should be cut.
\item[\texttt{draft}] The usual \texttt{draft} option of the \LaTeX\ Standard Classes.
\item[\texttt{oneside}] The usual \texttt{oneside} option of the \LaTeX\ Standard Classes.
\item[\texttt{twoside}] (default) The usual \texttt{twoside} option of the \LaTeX\ Standard Classes.
-\item[\texttt{bn}] This option typesets the title page in black and white
-(using the b/w logo, \texttt{sapienza-MLblack-pos.pdf}, instead of the colored one) and passes the \texttt{monochrome} option to \textsf{color} and
-\textsf{xcolor} packages.
-
\item[\texttt{binding=\textsl{length}}] (zero default binding)
The value of this option is an offset of the text column.
It is useful to take into account the margin for the binding (ask to your bookbinder for information).
-\item[\texttt{noexaminfo}] Suppress all the final exam informations. Indeed, by default, \textsf{sapthesis} shows some information about the final thesis discussion on the back of the title page. By default it shows the phrase ``Thesis not yet defended''. Otherwise, as explained later, giving the commands
+\item[\texttt{noexaminfo}] Suppress all the final exam informations. Indeed, by default, \textsf{Sapthesis} shows some information about the final thesis discussion on the back of the title page. By default it shows the phrase ``Thesis not yet defended''. Otherwise, as explained later, giving the commands
\texttt{\bs examdate\{\dots\}} and \texttt{\bs examiner\{\dots\}} the date and
the examiners list are shown.
-\item[\texttt{italian} or \texttt{english}] Explicitly declare the language of
-the title page. Useful when you want to write the title page in a language
-and the thesis in a different language.
\item[\texttt{nodefaultfont}] Avoid the loading of packages \textsf{fontenc}, \textsf{textcomp} and \textsf{lmodern}.
\item[\texttt{romandiff}] See App.~\ref{sec:usefulcommands}.
-\item[\texttt{fem}] Use the feminine (only Italian): shows ``candidata'' instead of ``candidato''.
+\item[\texttt{italian} / \texttt{english}] Explicitly declare the language of
+the title page. Useful to write the title page in a language
+and the thesis in a different language.
\end{description}
\subsection[Commands for the\\ title page]{Commands for the title page}
@@ -223,64 +216,71 @@ As usual, the title page is generated by the \texttt{\bs maketitle} command.
It needs some information that you can supply by the following commands
in the preamble.
\begin{description}
-\item[\texttt{\bs title\{\dots\}}] Mandatory. Title.
+\item[\texttt{\bs title\{\dots\}}] Mandatory. Title of the thesis. The text is justified, however it is recommended to insert manual linebreaks (\bs\bs) to compose a beautiful title.
+
+\item[\texttt{\bs subtitle\{\dots\}}] Optional. Subtitle (try to avoid a subtitle). If both\\ \texttt{\bs subtitle\{\dots\}} and \texttt{\bs alttitle\{\dots\}} are used, the latter is discarded.
-\item[\texttt{\bs subtitle\{\dots\}}] Optional. Subtitle (try to avoid a subtitle).
+\item[\texttt{\bs alttitle\{\dots\}}] Optional. Alternative title (try to avoid an alternative title). This command, together with the \texttt{\bs title\{\dots\}} command, is typically used to insert in the frontispiece the title in another language. If both \texttt{\bs subtitle\{\dots\}} and \texttt{\bs alttitle\{\dots\}} are used, the latter is discarded.
\item[\texttt{\bs author\{\dots\}}] Mandatory. Author (student's name).
\item[\texttt{\bs IDnumber\{\dots\}}] Mandatory. ID number (\textit{matricola} in Italian).
-\item[\texttt{\bs course[\dots]\{\dots\}}] Mandatory. Use the official Italian name of the course. If the optional argument \texttt{override} is specified, the mandatory argument is used to specify the entire course line in the frontispiece. In this way it is possible to override the behavior of the class (not recommended!).
+\item[\texttt{\bs course\{\dots\}}] Mandatory. Use the official Italian name of the course.
+Even though your thesis is in English you should write here the official name of the course, which normally is in Italian.
-\item[\texttt{\bs courseorganizer\{\dots\}}] Mandatory. Course organizer.
-
-\item[\texttt{\bs submitdate\{\dots\}}] Mandatory. Use the form \texttt{\bs submitdate\{April 2009\}} for PhD's and the form \texttt{\bs submitdate\{2009/2010\}} for Laurea theses.
+\item[\texttt{\bs cycle\{\dots\}}] Mandatory only for PhD's. Use the form: \texttt{\bs cycle\{XXII\}}
-\item[\texttt{\bs AcademicYear\{\dots\}}] Alias for \texttt{\bs submitdate}. Academic Year.
+\item[\texttt{\bs courseorganizer\{\dots\}}] Mandatory. Course organizer (for example Scuola di Scienze Matematiche Fisiche e Naturali). Use \bs\bs\ to properly break the lines.
-\item[\texttt{\bs copyyear\{\dots\}}] Mandatory. Copyright year (usually the
-graduation year).
+\item[\texttt{\bs AcademicYear\{\dots\}}] Academic Year.
\item[\texttt{\bs advisor\{\dots\}}] You must specify at least one advisor.
If you have more than one advisor, put several advisor commands in the correct order:\\
\texttt{\bs advisor\{Prof.~Pippo\}} \texttt{\bs advisor\{Dr.~Pluto\}}
-\item[\texttt{\bs coadvisor[\dots]\{\dots\}}] Optional. Co-advisors of the thesis.
-Same syntax of the \texttt{\bs advisor} command. If the optional argument \texttt{ext} is specified, ``External advisor'' will be printed instead of ``Co-Advisor''.
+\item[\texttt{\bs customadvisorlabel\{\dots\}}] Optional. Specify the label for advisors. It can be used, for example, to print ``Relatrice'' instead of ``Relatore''.
-\item[\texttt{\bs reviewer\{\dots\}}] Optional. Reviewers of the thesis.
-Same syntax of the \texttt{\bs advisor} command. The list of the reviewer is preceded by the a text which can be specified by the \texttt{\bs reviewerlabel\{\dots\}} command.
+\item[\texttt{\bs coadvisor\{\dots\}}] Optional. Co-advisors of the thesis.
+Same syntax of the \texttt{\bs advisor} command.
-\item[\texttt{\bs authoremail\{\dots\}}] Mandatory. Email of the thesis author.
-It is automatically hyper-linked if \textsf{hyperref} package is loaded.
-
-\item[\texttt{\bs versiondate\{\dots\}}] Optional. Date version of the thesis.
+\item[\texttt{\bs customcoadvisorlabel\{\dots\}}] Optional. Specify the label for co-advisors. It can be used to print ``external advisor'' or similar labels.
-\item[\texttt{\bs website\{\dots\}}] Optional. Thesis website. Automatically
-hyper-linked if \textsf{hyperref} package is loaded.
-
-\item[\texttt{\bs ISBN\{\dots\}}] Optional. ISBN
+\item[\texttt{\bs director\{\dots\}}] Optional. Director of the PhD program, head of the Specialization degree, or similar. Same syntax of the \texttt{\bs advisor} command. Avoid its usage if possible.
-\item[\texttt{\bs copyrightstatement\{\dots\}}] Optional. Specify a copyright statement that will be printed in place of the default one.
+\item[\texttt{\bs customdirectorlabel\{\dots\}}] Optional. Specify the label for director.
+\end{description}
+Together with the title page, \textsf{Sapthesis} will also compose an information page just after the title page. See also the \texttt{\bs noexaminfo} class option described in a previous section. Here follow the necessary commands to compose this page.
+\begin{description}
\item[\texttt{\bs examdate\{\dots\}}] Optional. Date of the final exam.\\
-Example: \texttt{\bs examdate\{16 February 2010\}}.
+Example: \texttt{\bs examdate\{16 February 2020\}}.
\item[\texttt{\bs examiner[\dots]\{\dots\}}] Optional. Specifies the members of the
board of examiners of the final exam. Usage similar to \texttt{\bs advisor} command. The optional argument can be used to specify the role of that examiner in the commission.
-\item[\texttt{\bs cycle\{\dots\}}] Mandatory only for PhD's. Use the form: \texttt{\bs cycle\{XXII\}}
+\item[\texttt{\bs thesistype\{\dots\}}] Optional. Type of thesis (usually PhD thesis, Master thesis, and so on).
+
+\item[\texttt{\bs ISBN\{\dots\}}] Optional. ISBN
+
+\item[\texttt{\bs copyyear\{\dots\}}] Mandatory. Copyright year (usually the
+graduation year).
+
+\item[\texttt{\bs copyrightstatement\{\dots\}}] Optional. Specify a copyright statement that will be printed in place of the default one.
+
+\item[\texttt{\bs versiondate\{\dots\}}] Optional. Date version of the thesis.
+
+\item[\texttt{\bs website\{\dots\}}] Optional. Thesis website. Automatically
+hyper-linked if \textsf{hyperref} package is loaded.
+
+\item[\texttt{\bs authoremail\{\dots\}}] Mandatory. Email of the thesis author.
+It is automatically hyper-linked if \textsf{hyperref} package is loaded.
-\item[\texttt{\bs director\{\dots\}}] Only for Specialization. Mandatory.
+\item[\texttt{\bs reviewer\{\dots\}}] Optional. Reviewers of the thesis (typically this applies to PhD theses only). Same syntax of the \texttt{\bs advisor} command. The list of the reviewer is preceded by the a text which can be specified by the \texttt{\bs reviewerlabel\{\dots\}} command.
-\item[\texttt{\bs tutor\{\dots\}} and \texttt{\bs tutorcoord\{\dots\}}] Only for TFA. Mandatory.
+\item[\texttt{\bs extrainfo\{\dots\}}] Optional. This command can be used to insert an arbitraly long text at the top of the back of the titlepage. For example, in the past it was used to provide some information for TFA theses (tutor, tutor coordinator, principal of the school, name of the school, and so on).
-\item[\texttt{\bs schoolname\{\dots\}}] Only for TFA. Mandatory. Name of the school.
-\item[\texttt{\bs schooladdress\{\dots\}}] Only for TFA. Mandatory. School's address.
-\item[\texttt{\bs schoolwebsite\{\dots\}}] Only for TFA. Optional. School's website.
-\item[\texttt{\bs schoolprincipal\{\dots\}}] Only for TFA. Mandatory. School's principal.
\end{description}
@@ -300,21 +300,20 @@ If you use a language for the acknowledgments different from that of the thesis,
\end{description}
-
-The \texttt{sapthesis} class defines also the color \texttt{sapred} which is the \emph{Sapienza red}: RGB(130,36,51).
-This color is switched to black if the \texttt{bn} option is in use. Example of usage: \texttt{\ldots \bs textcolor\{sapred\}\{blah blah blah\}\ldots}
+\textcolor{sapred}{%
+The \texttt{sapthesis} class defines also the color \texttt{sapred} which is the \emph{Sapienza red}: RGB(130,36,51). Example of usage: \texttt{\bs textcolor\{sapred\}\{blah blah\}}}
\section{Recommendations}
\begin{itemize}
-\item Do \textbf{not} change the default layout. If you want to change the interline spacing, do not use the \texttt{\bs linespread} command. Load instead the \textsf{setspace} package and use, for example, the \texttt{\bs onehalfspacing} command.
+\item Do \textbf{not} change the default layout.
\item Do \textbf{not} load the packages already loaded by \textsf{sapthesis} (see Sec.~\ref{requirements_installation}).
\item As you already should know, \LaTeX\ can process only documents
-in pure ASCII. If you want to insert \emph{directly} other characters, not included in the 128 ASCII characters (for example accented letters), you have to use a particular text encoding for your source file. Then you have to ``tell'' to \LaTeX\ which encoding you have chosen by the packages \texttt{inputenc}. It is always recommended to use UTF-8 character encoding and specify this choice also by the \emph{magic lines} at the beginning of the source code (see the examples in App.~\ref{sec:PhDexample} and~\ref{sec:LaMexample}).
+in pure ASCII. If you want to insert \emph{directly} other characters, not included in the 128 ASCII characters (for example accented letters), you have to use a particular text encoding for your source file. Then you have to ``tell'' to \LaTeX\ which encoding you have chosen by the packages \texttt{inputenc}. It is always recommended to use UTF-8 character encoding and specify this choice also by the \emph{magic lines} at the beginning of the source code (see the examples in App.~\ref{sec:examples}).
\item Respect the following thesis structure:
@@ -354,90 +353,64 @@ first author surname: this order is very useful, contrary to the other typical o
\end{itemize}
+\clearpage
+\section{Other useful commands}
+\label{sec:usefulcommands}
-\appendix
-
-\section{A very brief introduction to the \TeX\ world}
-
-Many people want to (or are compelled to) write in \LaTeX\ without studying
-a basic manual. Here follows a very brief introduction to the \TeX\ world.
-
-\TeX, the document preparation system designed by Donald Knuth in 1978, is a program to typeset documents.
-It is a mark-up language: you write a simple text decorated with \TeX\ commands (source code) which is then compiled to obtain the final product, a document in pdf format.
-\LaTeX\ is just a set of macros, written in \TeX, to simplify the writing of the source code: it can be thought as a simpler programming language with respect to \TeX. A source code written in \LaTeX\ can be compiled by several ``compilers'': \texttt{pdflatex} (the most common), or \texttt{xelatex}, or others.
-
-The following list of \LaTeX\ manuals, may be especially useful for Italian authors.
-
-\begin{itemize}
-\item \href{http://www.lorenzopantieri.net/LaTeX_files/ArteLaTeX.pdf}{\textsc{L.
-Pantieri \& T. Gordini}, \textit{L'arte di scrivere con} \LaTeX, (2017)}
-
-\item \href{http://mirror.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}{\textsc{S. Pakin}, \textit{The comprehensive} \LaTeX\ \textit{symbol list}, (2017)}
-
-\item \href{http://profs.sci.univr.it/~gregorio/breveguida.pdf}{\textsc{E. Gregorio}, \LaTeX\textit{: breve guida ai pacchetti di uso pi\`u comune}, (2010)}
-\end{itemize}
-
-In order to use \LaTeX, you have to install a \TeX\ distribution. It contains the compilers, several fonts and other files needed by the compilers and also many \emph{packages}, which can be thought as libraries or extensions of \LaTeX. The most famous distributions are \href{http://miktex.org/}{MiKTeX} (available only for Windows), \href{http://www.tug.org/texlive/}{TeX Live} (available both for Windows and Linux) and \href{http://www.tug.org/mactex/2011/}{MacTeX} (available only for Mac OS).
-
-Finally we discuss the editor, that is the program used to write your source file. Since a source file written in \LaTeX, like in any other programming language, is a simple text file, you can write your code with any text editor you want (for example Notepad in Windows). However the suggested editors are:
-\begin{itemize}
-\item \href{http://tug.org/texworks/}{TeXworks}. Already installed with any \TeX\ distribution. Very simple and powerful. Use TeXworks if you are not an expert. Enrico Gregorio has written a very good and brief TeXworks manual in Italian, which can be found at: {\small \url{http://profs.sci.univr.it/~gregorio/introtexworks.pdf}}.
-
-\item \href{http://texstudio.sourceforge.net/}{TeXstudio} (cross-platform), \href{http://www.xm1math.net/texmaker/}{TeXmaker} (cross-platform), \href{http://pages.uoregon.edu/koch/texshop/}{TeXshop} (only for Mac), \href{http://kile.sourceforge.net/}{Kile} (only for Linux). Powerful editors.
-
-\item \textbf{Avoid} other editors unless you know what you are doing!
-
-\end{itemize}
+\textsf{Sapthesis} provides several useful commands for scientific texts.
-Finally we explain how to compile the example documents provided in the \textsf{sapthesis} package. Double click on one of the \texttt{.tex} file in the \texttt{examples} folder.
-TeXworks should start showing the content of that file.
-The \texttt{pdflatex} compiler should be automatically selected thanks to the \emph{magic lines} placed at the beginning of the file.
-Now, in order to compile, press the green button.
-At the end of the compilation the resulting pdf appears in a separate window. Remember to compile at least three times, because \LaTeX\ needs more than one compilation to correctly resolve the internal cross references (for example for the table of contents composition, or when you refer to a figure by the \texttt{\bs label}\,--\,\texttt{\bs ref}\,/\,\texttt{\bs pageref} mechanism).
+\begin{description}
+\item[\texttt{\bs eu}] Napier's number, $\mathrm{e}$, in roman.
+\item[\texttt{\bs iu}] Imaginary unit, $\mathrm{i}$, in roman.
+\item[\texttt{\bs der\{\dots\}\{\dots\}}] Derivative. The first argument represents the function to derive while the second the variables separated by commas. The differential symbol is automatically inserted. Examples:
+\texttt{\bs der\{f\}\{x\}}, \texttt{\bs der\{f\}\{x,y\}}, \texttt{\bs der\{f\}\{*\{3\}\{x\}\}},
+\texttt{\bs der\{f\}\{*\{2\}\{x\},*\{2\}\{y\},z\}}.
-\section{Using LyX}
+\item[\texttt{\bs pder\{\dots\}\{\dots\}}] Partial derivative. Same syntax of the \texttt{\bs der} command.
-LyX is an advanced \LaTeX\ editor which does not simply show the source code like any text editor, but instead it renders maths, images, tables and some text formatting commands. However this ``layer'' between the writer and the real source code is sometimes frustrating and many authors discourage the usage of LyX.
+\item[\texttt{\bs rb\{\dots\}}] Roman suBscript
-Using \textsf{sapthesis} with LyX is quite straightforward.
-\begin{itemize}
-\item
-Install \textsf{sapthesis} by the package manager of your \TeX\ distribution or manually.
+\item[\texttt{\bs rp\{\dots\}}] Roman suPerscript
-\item
-Copy the file \texttt{sapthesis.layout} in the directory\\ \texttt{C:\bs Program Files\bs Lyx20\bs Resources\bs layouts\bs}\\ and then, in LyX, click on \textsf{Tools > Reconfigure}. This will add the \textsf{sapthesis} class in the list of LyX available classes.
+\item[\texttt{\bs tb\{\dots\}}] Text suBscript
-\item
-In LyX, first of all, go in \textsf{Tools > Preferences > Language Settings > Language} and choose ``none'' in Language package. This step is necessary because LyX not only loads babel with the desired language, but it passes the language also as an option for the class! This triggers an error in many classes.
+\item[\texttt{\bs tp\{\dots\}}] Text suPerscript
-\item
-Create a new document and go in \textsf{Document > Settings > Document Class}. Here you can choose \textsf{sapthesis} as the class for the document and write the class options.
+\item[\texttt{\bs un\{\dots\}}] Useful command to typeset measurement units in the correct way, e.g. \texttt{25\bs un\{m/s\}},
+\texttt{13\bs un\{kg\bs ,cm\^{}\{-3\}\}}. It can be used both inside or outside the math environment.
+For heavy usage of measurement units and to insert numbers in the form
+\texttt{1.4e-5}, the package \textsf{siunitx} is recommended.
-\item
-Write the preamble in \textsf{Document > Settings > LaTeX Preamble}.
+\item[\texttt{\bs g}] Shortcut for the \texttt{\bs degree} command. Example: \texttt{45\bs g} produces 45\g.
-\item Create the titlepage inserting the title by the \textsf{Title} item in the LyX left menu.
+\item[\texttt{\bs C}] Shortcut for the \texttt{\bs celsius} command. Example: \texttt{37\bs ,\bs C} produces 37\,\C. (Not available in math mode compiling with \texttt{xelatex}).
-\end{itemize}
+\item[\texttt{\bs A}] Angstrom. Example: \texttt{10\bs ,\bs A} produces 10\,\A.
-It is recommended to activate \textsf{View > Source Pane}. This step is not necessary but it is very useful to observe the \LaTeX\ code produced by LyX (on the right choose ``Complete source'' or ``Preamble'').
+\item[\texttt{\bs micro}] Micro prefix. Example: \texttt{7\bs ,\bs micro m} produces 7\,\micro m.
+\item[\texttt{\bs ohm}] Ohm. Example: \texttt{100\bs ,\bs ohm} produces 100\,\ohm.
+\item[\texttt{\bs di}] Differential symbol with automatic spacing. Example:
+\texttt{\$\bs int x \bs di x\$} produces $\int x \di x$. If you prefer the differential symbol in roman ($\mathrm{d}$), you can use the \texttt{romandiff} document class option.
+\item[\texttt{\bs x}] Shortcut for the \texttt{\bs times} command. E.g.: \texttt{\$7 \bs x 10\^{}5\$} produces $7 \times 10^5$.
+\end{description}
\clearpage
-\section{PhD thesis example}
-\label{sec:PhDexample}
+\section{Examples}
+\label{sec:examples}
+\subsection*{PhD thesis in English}
\begin{lstlisting}
% !TeX encoding = UTF-8
% !TeX program = pdflatex
% !TeX spellcheck = en_US
-\documentclass[binding=0.6cm,PhD]{sapthesis}
+\documentclass[binding=0.6cm]{sapthesis}
\usepackage{microtype}
\usepackage{hyperref}
@@ -446,14 +419,15 @@ It is recommended to activate \textsf{View > Source Pane}. This step is not nece
\title{My thesis}
\author{Francesco Biccari}
\IDnumber{123456}
-\course[Philology]{Filologia}
+\course{Dottorato di Ricerca in Filologia}
\courseorganizer{Scuola di Dottorato in Scienze Filologiche}
-\cycle{XXII}
-\submitdate{October 2009}
-\copyyear{2009}
+\cycle{XXXVII}
+\AcademicYear{2021/2022}
\advisor{Prof. Caio}
-\advisor{Dr. Sempronio}
+\coadvisor{Dr. Sempronio}
\authoremail{pippo@pippo.com}
+\copyyear{2022}
+\thesistype{PhD thesis}
\begin{document}
@@ -483,15 +457,14 @@ This thesis deals with myself.
\clearpage
-\section[Laurea (Magistrale)\\ thesis example]{Laurea (Magistrale) thesis example}
-\label{sec:LaMexample}
+\subsection*{Master thesis (Laurea/Laurea Magistrale) in Italian}
\begin{lstlisting}
% !TeX encoding = UTF-8
% !TeX program = pdflatex
% !TeX spellcheck = it_IT
-\documentclass[binding=0.6cm,Lau]{sapthesis} % LaM for a Laurea Magistrale
+\documentclass[binding=0.6cm]{sapthesis}
\usepackage{microtype}
\usepackage[italian]{babel}
@@ -502,13 +475,14 @@ This thesis deals with myself.
\title{La mia tesi}
\author{Francesco Biccari}
\IDnumber{123456}
-\course{Fisica}
+\course{Laurea Magistrale in Fisica}
\courseorganizer{Facolt|\`a| di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2011/2012}
-\copyyear{2012}
+\AcademicYear{2021/2022}
\advisor{Prof. Caio}
-\advisor{Dr. Sempronio}
-\authoremail{pippo@pippo.com}
+\coadvisor{Dr. Sempronio}
+\authoremail{francesco.biccari@pippo.com}
+\copyyear{2022}
+\thesistype{Tesi di Laurea Magistrale}
\begin{document}
@@ -538,49 +512,49 @@ Questa tesi parla di me.
\clearpage
-\section{TFA thesis example}
-\label{sec:TFAexample}
+\subsection*{Specialization thesis in English}
\begin{lstlisting}
% !TeX encoding = UTF-8
% !TeX program = pdflatex
-% !TeX spellcheck = it_IT
+% !TeX spellcheck = en_US
-\documentclass[binding=0.6cm,TFA]{sapthesis}
+\documentclass[binding=0.6cm]{sapthesis}
\usepackage{microtype}
-\usepackage[italian]{babel}
+\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
-\hypersetup{pdftitle={La mia tesi},pdfauthor={Francesco Biccari}}
+\hypersetup{pdftitle={My thesis},pdfauthor={Francesco Biccari}}
-\title{La mia tesi}
+\title{My thesis}
\author{Francesco Biccari}
\IDnumber{123456}
-\course{A049 Matematica e Fisica}
-\courseorganizer{Facolt|\`a| di Scienze Matematiche, Fisiche e Naturali}
-\AcademicYear{2012/2013}
-\copyyear{2013}
+\course{Specializzazione in Fisica Medica}
+\courseorganizer{Facolt|\`a| di Medicina e Chirurgia}
+\AcademicYear{2021/2022}
\advisor{Prof. Caio}
-\tutor{Dr. Sempronio}
-\tutorcoord{Dr. Sempronio}
-\authoremail{pippo@pippo.com}
-
-\schoolname{Liceo Scientifico Louis Pasteur}
-\schooladdress{Via G. Barellai 130, 00135 Roma}
-\schoolwebsite{http://www.liceopasteur.it/}
-\schoolprincipal{Prof. Diego Armando Maradona}
+\coadvisor{Dr. Sempronio}
+\director{Prof. Pippo}
+\customdirectorlabel{Direttore della Scuola di Specializzazione}
+\authoremail{francesco.biccari@pippo.com}
+\copyyear{2022}
+\thesistype{Specialization thesis}
\begin{document}
\frontmatter
\maketitle
-\dedication{Dedicato a\\ Donald Knuth}
+\dedication{Dedicated to\\ Donald Knuth}
+
+\begin{abstract}
+This thesis deals with myself.
+\end{abstract}
\tableofcontents
\mainmatter
-\chapter{Introduzione}
+\chapter{Introduction}
...
\backmatter
@@ -593,57 +567,251 @@ Questa tesi parla di me.
\end{document}
\end{lstlisting}
+
+\appendix
+
+\section{A very brief introduction to the \TeX\ world}
+
+Many people want to (or are compelled to) write in \LaTeX\ without studying
+a basic manual. Here follows a very brief introduction to the \TeX\ world.
+
+\TeX, the document preparation system designed by Donald Knuth in 1978, is a program to typeset documents.
+It is a mark-up language: you write a simple text decorated with \TeX\ commands (source code) which is then compiled to obtain the final product, a document in pdf format.
+\LaTeX\ is just a set of macros, written in \TeX, to simplify the writing of the source code: it can be thought as a simpler programming language with respect to \TeX. A source code written in \LaTeX\ can be compiled by several ``compilers'': \texttt{pdflatex} (the most common), or \texttt{xelatex}, or others.
+
+The following list of \LaTeX\ manuals, may be especially useful for Italian authors.
+
+\begin{itemize}
+\item \href{http://www.lorenzopantieri.net/LaTeX_files/ArteLaTeX.pdf}{\textsc{L.
+Pantieri \& T. Gordini}, \textit{L'arte di scrivere con} \LaTeX, (2017)}
+
+\item \href{http://mirror.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}{\textsc{S. Pakin}, \textit{The comprehensive} \LaTeX\ \textit{symbol list}, (2021)}
+
+\item \href{http://profs.sci.univr.it/~gregorio/breveguida.pdf}{\textsc{E. Gregorio}, \LaTeX\textit{: breve guida ai pacchetti di uso pi\`u comune}, (2010)}
+\end{itemize}
+
+In order to use \LaTeX, you have to install a \TeX\ distribution. It contains the compilers, several fonts and other files needed by the compilers and also many \emph{packages}, which can be thought as libraries or extensions of \LaTeX. The most famous distributions are \href{http://miktex.org/}{MiKTeX} (available only for Windows, Linux, and Mac), \href{http://www.tug.org/texlive/}{TeX Live} (available for Windows, Linux, and Mac) and \href{https://tug.org/mactex/}{MacTeX} (available only for Mac OS).
+
+Finally we discuss the editor, that is the program used to write your source file. Since a source file written in \LaTeX, like in any other programming language, is a simple text file, you can write your code with any text editor you want (for example Notepad in Windows). However the suggested editors are:
+\begin{itemize}
+\item \href{http://tug.org/texworks/}{TeXworks}. Already installed with any \TeX\ distribution. Very simple and powerful. Use TeXworks if you are not an expert. Enrico Gregorio has written a very good and brief TeXworks manual in Italian, which can be found at: {\small \url{http://profs.sci.univr.it/~gregorio/introtexworks.pdf}}.
+
+\item \href{http://texstudio.sourceforge.net/}{TeXstudio} (cross-platform), \href{http://www.xm1math.net/texmaker/}{TeXmaker} (cross-platform), \href{http://pages.uoregon.edu/koch/texshop/}{TeXshop} (only for Mac), \href{http://kile.sourceforge.net/}{Kile} (only for Linux). Powerful editors.
+
+\item \textbf{Avoid} other editors unless you know what you are doing!
+
+\end{itemize}
+
+Finally we explain how to compile the example documents provided in the \textsf{sapthesis} package. Double click on one of the \texttt{.tex} file in the \texttt{examples} folder.
+TeXworks should start showing the content of that file.
+The \texttt{pdflatex} compiler should be automatically selected thanks to the \emph{magic lines} placed at the beginning of the file.
+Now, in order to compile, press the green button.
+At the end of the compilation the resulting pdf appears in a separate window. Remember to compile at least three times, because \LaTeX\ needs more than one compilation to correctly resolve the internal cross references (for example for the table of contents composition, or when you refer to a figure by the \texttt{\bs label}\,--\,\texttt{\bs ref}\,/\,\texttt{\bs pageref} mechanism).
+
+
+\subsection*{Using Overleaf}
+
+\href{https://www.overleaf.com/}{Overleaf} is a collaborative cloud-based online text editor, specifically designed for \LaTeX. The compilation of the source file is performed remotely on the Overleaf servers, by a TeXLive distribution. Therefore, using \textsf{sapthesis} in Overleaf is straightforward. You don't need to do anything, the package is already available. For any reason \textsf{sapthesis} is not available or the version present in Overleaf is outdated, just copy the files of \textsf{sapthesis } in your remote working directory in Overleaf. Local files have always precedence with respect to global files.
+
+\subsection*{Using LyX}
+
+\href{https://www.lyx.org/}{LyX} is an advanced \LaTeX\ editor which does not simply show the source code like any text editor, but instead it renders maths, images, tables and some text formatting commands. However this ``layer'' between the writer and the real source code is sometimes frustrating and many authors discourage the usage of LyX.
+
+Using \textsf{sapthesis} with LyX is quite straightforward.
+\begin{itemize}
+\item
+Install \textsf{sapthesis} by the package manager of your \TeX\ distribution or manually.
+
+\item
+Copy the file \texttt{sapthesis.layout} in the directory\\ \texttt{C:\bs Program Files\bs Lyx20\bs Resources\bs layouts\bs}\\ and then, in LyX, click on \textsf{Tools > Reconfigure}. This will add the \textsf{sapthesis} class in the list of LyX available classes.
+
+\item
+In LyX, first of all, go in \textsf{Tools > Preferences > Language Settings > Language} and choose ``none'' in Language package. This step is necessary because LyX not only loads babel with the desired language, but it passes the language also as an option for the class! This triggers an error in many classes.
+
+\item
+Create a new document and go in \textsf{Document > Settings > Document Class}. Here you can choose \textsf{sapthesis} as the class for the document and write the class options.
+
+\item
+Write the preamble in \textsf{Document > Settings > LaTeX Preamble}.
+
+\item Create the titlepage inserting the title by the \textsf{Title} item in the LyX left menu.
+
+\end{itemize}
+
+It is recommended to activate \textsf{View > Source Pane}. This step is not necessary but it is very useful to observe the \LaTeX\ code produced by LyX (on the right choose ``Complete source'' or ``Preamble'').
+
+
+
+
+
+
+
+
+
\clearpage
-\section{Other useful commands}
-\label{sec:usefulcommands}
+\section{Frequently Asked Questions}
-\begin{description}
-\item[\texttt{\bs eu}] Napier's number, $\mathrm{e}$, in roman.
+\subsection{How can I increase the font size?}
-\item[\texttt{\bs iu}] Imaginary unit, $\mathrm{i}$, in roman.
+The default font used in \textsf{Sapthesis} is Latin Modern. The default font size is 11\,pt using A4 and 10\,pt using A5 and B5. At the moment it is impossible to change the font size unless you modify the \textsf{Sapthesis} class file (\texttt{sapthesis.cls}). The reason for this choice is to maintain a common format for all the theses.
-\item[\texttt{\bs der\{\dots\}\{\dots\}}] Derivative. The first argument represents the function to derive while the second the variables separated by commas. The differential symbol is automatically inserted. Examples:
-\texttt{\bs der\{f\}\{x\}}, \texttt{\bs der\{f\}\{x,y\}}, \texttt{\bs der\{f\}\{*\{3\}\{x\}\}},
-\texttt{\bs der\{f\}\{*\{2\}\{x\},*\{2\}\{y\},z\}}.
-\item[\texttt{\bs pder\{\dots\}\{\dots\}}] Partial derivative. Same syntax of the \texttt{\bs der} command.
+\subsection{How can I increase the line-spacing?}
-\item[\texttt{\bs rb\{\dots\}}] Roman suBscript
+The line-spacing in typography is defined as the distance between two lines. A strange ``tradition'' in Italy is to write the thesis with a double line-spacing. This is an incredibly large number. The lines are so separated that the effect is very ugly. Two reasons are behind this choice. The first one is that a lot of space is available for your professor to comment your text. The second one is that, in this way, the thesis is thicker.
-\item[\texttt{\bs rp\{\dots\}}] Roman suPerscript
+This effect is amplified when you use Microsoft Word because Word defines the line-spacing in a different way with respect to the typical definition. And usually people do not know that. Therefore, when you set the value of 2 for the line-spacing in Word, actually you obtain a line-spacing of 2.34 according to the normal definition of the term! (Word adds an extra 17\% of space, I do not know why).
-\item[\texttt{\bs tb\{\dots\}}] Text suBscript
+Of course this large value of the line-spacing is a nonsense. It is known in typography that the best value ranges between 1.20 and 1.45. In \LaTeX\ the default line-spacing is 1.20, which means that, if you use a font size of 10\,pt, the line-spacing is 12\,pt. In \textsf{Sapthesis} the line-spacing is set to 1.20. Nowadays, professors typically correct a thesis by using the comment tools of the their pdf viewer. There are still some who want to print it and want a double line-spacing. In that case, give them a copy with a double line-spacing but ask them to have the permission to print it in a more normal line-spacing, in order to save paper.
-\item[\texttt{\bs tp\{\dots\}}] Text suPerscript
+If you want to change the line-spacing, do not use the \texttt{\bs linespread} command. Load instead the \textsf{setspace} package and use, for example, the \texttt{\bs onehalfspacing} command.
-\item[\texttt{\bs un\{\dots\}}] Useful command to typeset measurement units in the correct way, e.g. \texttt{25\bs un\{m/s\}},
-\texttt{13\bs un\{kg\bs ,cm\^{}\{-3\}\}}. It can be used both inside or outside the math environment.
-For heavy usage of measurement units and to insert numbers in the form
-\texttt{1.4e-5}, the package \textsf{siunitx} is recommended.
-\item[\texttt{\bs mnote\{\dots\}}] Fancy margin notes
-\item[\texttt{\bs g}] Shortcut for the \texttt{\bs degree} command. Example: \texttt{45\bs g} produces 45\g.
+\subsection{Single sided or double sided printing?}
-\item[\texttt{\bs C}] Shortcut for the \texttt{\bs celsius} command. Example: \texttt{37\bs ,\bs C} produces 37\,\C. (Not available in math mode compiling with \texttt{xelatex}).
+A strange ``tradition'' in Italy is to print the theses only on one side of the paper sheets. In the past this was justified because a thesis was manually typed by a \href{https://en.wikipedia.org/wiki/Typewriter}{typewriter machine}.
+Today, where the theses are all composed by a computer, this ``tradition'' is kept mainly because in this way the professors and the students are happy to see a thicker book.
-\item[\texttt{\bs A}] Angstrom. Example: \texttt{10\bs ,\bs A} produces 10\,\A.
+Of course this is a nonsense. Not only because the bulky effect is only aesthetic (if you open the thesis you can see that only one side is printed), but especially because it is a waste of paper. Moreover, reading a book where only the right page is printed is quite ugly and strange, isn't it? (Have you ever seen a book, containing mainly text, printed single sided?)
-\item[\texttt{\bs micro}] Micro prefix. Example: \texttt{7\bs ,\bs micro m} produces 7\,\micro m.
+The only real reason to print single sided is when a good paper is not available. Indeed, a low quality paper, like the one typically used for photocopies, has a grammage of 80\,g/m$^2$. It is a little bit semitransparent and this can be a problem when you print double sided, especially if you have many color images. The best approach is using a proper paper grammage of 90\,g/m$^2$ or 100\,g/m$^2$. Ask to the printing service which type of paper is more suitable to print your thesis double sided.
-\item[\texttt{\bs ohm}] Ohm. Example: \texttt{100\bs ,\bs ohm} produces 100\,\ohm.
-\item[\texttt{\bs di}] Differential symbol with automatic spacing.\\ Example:
-\texttt{\$\bs int x \bs di x\$} produces $\int x \di x$. If you prefer the differential symbol in roman ($\mathrm{d}$) you can give the option \texttt{romandiff} in the document class options.
+\subsection{Inverted margins? How much space for binding?}
-\item[\texttt{\bs x}] Shortcut for the \texttt{\bs times} command. E.g.: \texttt{\$7 \bs x 10\^{}5\$} produces $7 \times 10^5$.
+Another typical question regards the margins of the thesis. Quite often the students (and incredibly also the printing services) complain about the margins of the thesis. They think that the margins are reversed because in \LaTeX\ standard classes, by default, the inner margin is smaller than the outer margin. The same behaviour, but with slightly different proportions, is adopted in \textsf{Sapthesis} (see Figure\,\ref{layout}). Of course, they are wrong. This is the correct behavior! Indeed, as you can see in any book, the sum of the two inner margins should be more or less equal to the width of a single outer margin. This is for an aesthetic reason. Otherwise the two columns of text would be too much separated when the book is open.
-\end{description}
+\begin{figure}[!b]
+\centering
+\setlength{\unitlength}{0.12mm}
+\begin{picture}(420,297)(-210,0)
+\polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
+\Line(0,0)(0,297)
+\put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
+\put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
+\put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
+\put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
+\end{picture}
+\caption{A4 page layout scheme of \textsf{UniFiTh} class using a zero binding margin.}
+\label{layout}
+\end{figure}
+
+
+At this point the students usually reply ``what about the binding margin? The inner margin should be larger because some space is used by the binding process!'' This is partially true. The effect described above in Figure\,\ref{layout} is what should happen \emph{after} the binding process. For this reason there is the documentclass \texttt{binding} option in \textsf{Sapthesis} (see Section\,\ref{class_options}). Typical values are 6 or 7\,mm but it is always preferable to ask the printing service which is the correct value according to the binding method (be careful because many printing services are not professional and suggest arbitrarly binding margin values).
+\subsection{Numbered introduction and conclusions?}
+There is a strange ``tradition'' in Italy to not attribute a number to the Introduction and Conclusions of a thesis. Probably, only because they are usually short chapters. So it seems that they do not deserve a proper number like any other chapter.
+In my (and not only mine) opinion this is a nonsense. The Introduction and Conclusions chapters are part of the thesis, and they should be read to properly understand the thesis. They cannot be skipped. So why don't attribute a number to those chapters?
+Therefore I suggest to use the following structure of the thesis (which is the same reported in the examples in Appendix \ref{sec:examples}).
+
+\begin{lstlisting}
+...
+
+\frontmatter
+\maketitle
+...
+
+% The chapters after the mainmatter command are numbered
+\mainmatter
+\chapter{Introduction}
+\chapter{...}
+\chapter{...}
+\chapter{...}
+\chapter{Conclusions}
+
+\backmatter
+...
+\end{lstlisting}
+
+However, if you really want to follow the nonsense of not giving a number to the Introduction and Conclusions chapter, you can do it in the following way. But keep in mind that \emph{if you do not number the Introduction and Conclusions, you cannot insert any numbered equation, table, or picture in these chapters}. Indeed, all these objects are numbered with the chapter number: Fig.\,1.2, Tab.\,3.2, Eq.\,(4.1), etc. If the chapter does not have a number, how can we assign a number to Figures, Tables, or Equations?
+
+\begin{lstlisting}
+...
+
+\frontmatter
+\maketitle
+
+% The chapters after the mainmatter command are numbered
+\mainmatter
+\chapter*{Introduction} % The chapter* does not attribute a number
+\markboth{Introduction}{} % This command is necessary for the headings
+\chapter{...}
+\chapter{...}
+\chapter{...}
+\chapter*{Conclusions} % The chapter* does not attribute a number
+\markboth{Conclusions}{} % This command is necessary for the headings
+
+\backmatter
+...
+\end{lstlisting}
+
+Finally, it is worth noting that the first and last chapter of a thesis must not to be always called Introduction and Conclusions!
+
+\subsection{How to reduce the size of the pdf?}
+
+Usually, students do not optimize the images of their thesis. This is a very bad practice and one of the typical consequences is the excessive large size of the final pdf. The topic is too long to be covered here, however I want to provide a simple way to reduce \textit{a posteriori} the file size of the pdf.
+
+Using \href{https://www.ghostscript.com/}{Ghostscript} we can ``distill'' a pdf file, which means interpreting it and re-enconding it again. This is just a small list of possible commands (commands are intended for Windows 64 bit but they can easily applied to other operating systems changing the name of the Ghostscript executable):
+
+\begin{lstlisting}
+BEST QUALITY (Flate image encoding)
+
+gswin64c.exe -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
+-dAutoFilterColorImages=false -dAutoFilterGrayImages=false
+-dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode
+-dPDFSETTINGS=/prepress -dCompatibilityLevel=1.5 input.pdf
+\end{lstlisting}
+
+\begin{lstlisting}
+BEST QUALITY (DECT image encoding)
+
+gswin64c.exe -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
+-dPDFSETTINGS=/prepress -dCompatibilityLevel=1.5 input.pdf
+\end{lstlisting}
+
+\begin{lstlisting}
+LOWER QUALITY (DECT image encoding)
+Substitute XXXXXXX with one of the following settings (order of descending quality):
+/printer /ebook /screen
+
+gswin64c.exe -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
+-dPDFSETTINGS=XXXXXXX -dCompatibilityLevel=1.5 input.pdf
+\end{lstlisting}
+
+\subsection{How to create an archivable pdf?}
+
+\href{https://en.wikipedia.org/wiki/PDF/A}{PDF/A} is a particular PDF format, standardized by ISO, specialized for use in the archiving and long-term preservation of electronic documents. Public and private institutions, including universities, increasingly require this form to archive electronic documents. There are several levels of PDF/A. The suggested format for a thesis is the PDF/A-2b.
+
+The best and free way to check if a pdf file is compliant to one of the PDF/A levels is to use \href{https://verapdf.org/}{veraPDF}, an open source software supported by the most important PDF associations in the world and funded by the European Commission. This software is freely available for Windows, Linux, and Mac.
+
+A PDF/A file can be generated directly in \LaTeX, properly following some rules (see ``Creare file archiviabili con pdf\LaTeX\ e Lua\LaTeX'' by Claudio Beccari) however we do not have enough space to cover this topic here.
+A faster way is to transform the file of the thesis in a PDF/A compliant pdf file using \href{https://www.ghostscript.com/}{Ghostscript}. Follow the following steps:
+
+\begin{enumerate}
+\item Copy in your working directory an \texttt{icc} color profile. Since the pdf file will be viewed mainly on electronic screen, you can use a generic sRGB color profile. You can download one here: \url{https://www.color.org/srgbprofiles.xalter}. Rename it, for example, in \texttt{srgb.icc}.
+
+\item Copy a PostScript definition file, with the instructions to convert the file in PDF/A, in your working directory. This file, containing all the proper commands, can be found in your computer.
+You can find it under the name \texttt{PDFA\_def.ps} in the \texttt{lib} folder of your Ghostscript installation directory (for example \texttt{C:\bs Program Files\bs gs\bs gs9.22\bs lib\bs}typically in the lib subfolder). Copy this file in your working directory and rename it! Let us suppose to rename it in \texttt{PDFArenamed.ps}.
+
+\item Modify the PostScript definition file. Open the \texttt{PDFArenamed.ps} file and specify the color profile (\texttt{srgb.icc}) and the title of your pdf file. To do that use the text editor you prefer. The variables to modify are intuitive and easily identifiable: \texttt{/ICCProfile} and \texttt{/Title}.
+
+\item Open a terminal and launch the following command
+\begin{lstlisting}
+gswin64.exe -q -dNOPAUSE -dBATCH -dNOSAFER
+-sDEVICE=pdfwrite -sOutputFile=output.pdf
+-dPDFA=2 -dPDFACompatibilityPolicy=1
+-sColorConversionStrategy=UseDeviceIndependentColor
+-sProcessColorModel=DeviceRGB
+PDFArenamed.ps input.pdf
+\end{lstlisting}
+\item Finally, control that the converted file correctly adheres to the PDF/A format using the VeraPDF software.
+
+\end{enumerate}
\addtocontents{toc}{\protect\end{multicols}}
\end{document}
diff --git a/macros/latex/contrib/sapthesis/sapthesis.cls b/macros/latex/contrib/sapthesis/sapthesis.cls
index d420c4a661..c1e330aff3 100644
--- a/macros/latex/contrib/sapthesis/sapthesis.cls
+++ b/macros/latex/contrib/sapthesis/sapthesis.cls
@@ -1,12 +1,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% sapthesis.cls %%
-%% version 4.1 %%
-%% 2018-08-07 %%
+%% version 5.0 %%
+%% date: see below %%
%% author: Francesco Biccari %%
%% contact: biccari@gmail.com %%
%% %%
%% This file is the LaTeX class for the thesis style %%
-%% of the "Sapienza -- University of Rome" %%
+%% of the "Sapienza University of Rome" %%
%% %%
%% see README for license information and installation %%
%% see sapthesis-doc.pdf for usage %%
@@ -20,9 +20,8 @@
\NeedsTeXFormat{LaTeX2e}[2009/01/01]
\ProvidesClass{sapthesis}%
-[2018/08/07 Sapienza - University of Rome thesis class]
+[2022/01/01 Sapienza University of Rome thesis class]
-\def\SAP@classVersion{4.1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -32,72 +31,50 @@
\newif\ifSAP@nodefaultfont \SAP@nodefaultfontfalse
\newif\ifSAP@romandiff \SAP@romandifffalse
\newif\ifSAP@customlanguage \SAP@customlanguagefalse
-\newif\ifSAP@bn \SAP@bnfalse
-\newif\ifSAP@PhD \SAP@PhDfalse
-\newif\ifSAP@Specialization \SAP@Specializationfalse
-\newif\ifSAP@MasterP \SAP@MasterPfalse
-\newif\ifSAP@MasterS \SAP@MasterSfalse
-\newif\ifSAP@LaM \SAP@LaMfalse
-\newif\ifSAP@Lau \SAP@Laufalse
-\newif\ifSAP@TFA \SAP@TFAfalse
\newif\ifSAP@noexaminfo \SAP@noexaminfofalse
\newif\ifSAP@femaleauthor \SAP@femaleauthorfalse
-\newif\ifSAP@overridecourse \SAP@overridecoursefalse
+\def\SAP@paper{a4paper}
+\def\SAP@layout{a4paper}
+\def\SAP@fontsize{11pt}
\newcommand{\SAP@customlanguage}{}
-
-\define@key[sap]{}{noexaminfo}[]{\SAP@noexaminfotrue}
-\define@key[sap]{}{fem}[]{\SAP@femaleauthortrue}
-\define@key[sap]{}{nodefaultfont}[]{\SAP@nodefaultfonttrue}
-\define@key[sap]{}{romandiff}[]{\SAP@romandifftrue}
\define@key[sap]{}{italian}[]{\SAP@customlanguagetrue
\renewcommand{\SAP@customlanguage}{\SAP@italian}}
\define@key[sap]{}{english}[]{\SAP@customlanguagetrue
\renewcommand{\SAP@customlanguage}{\SAP@english}}
-\define@key[sap]{}{bn}[]{\SAP@bntrue
- \PassOptionsToPackage{monochrome}{color}
- \PassOptionsToPackage{monochrome}{xcolor}}
-\define@key[sap]{}{PhD}[]{\SAP@PhDtrue}
-\define@key[sap]{}{Specialization}[]{\SAP@Specializationtrue}
-\define@key[sap]{}{LaM}[]{\SAP@LaMtrue}
-\define@key[sap]{}{Lau}[]{\SAP@Lautrue}
-\define@key[sap]{}{TFA}[]{\SAP@TFAtrue}
-\define@key[sap]{}{MasterP}[]{\SAP@MasterPtrue\SAP@MasterPtrue}
-\define@key[sap]{}{MasterS}[]{\SAP@MasterStrue\SAP@MasterStrue}
+\define@key[sap]{}{noexaminfo}[]{\SAP@noexaminfotrue}
+\define@key[sap]{}{fem}[]{\SAP@femaleauthortrue}
+\define@key[sap]{}{nodefaultfont}[]{\SAP@nodefaultfonttrue}
+\define@key[sap]{}{romandiff}[]{\SAP@romandifftrue}
\define@key[sap]{}{binding}[0pt]{\setlength{\SAP@binding}{#1}}
-\define@key[sap]{}{draft}[]{\PassOptionsToClass{draft}{book}}
+\define@key[sap]{}{draft}[]{%
+\PassOptionsToClass{draft}{book}%
+%\PassOptionsToPackage{showframe}{geometry}
+}
\define@key[sap]{}{oneside}[]{\PassOptionsToClass{oneside}{book}}
\define@key[sap]{}{twoside}[]{}
+\define@key[sap]{}{a4paper}[]{\def\SAP@paper{a4paper}}
+\define@key[sap]{}{a5paper}[]{%
+\def\SAP@paper{a5paper}\def\SAP@layout{a5paper}\def\SAP@fontsize{10pt}}
+\define@key[sap]{}{b5paper}[]{%
+\def\SAP@paper{b5paper}\def\SAP@layout{b5paper}\def\SAP@fontsize{10pt}}
+\define@choicekey[sap]{}{layout}[]{a4paper,a5paper,b5paper}[]{%
+\def\SAP@layout{#1}\def\SAP@fontsize{10pt}}
\DeclareOptionX*{\ClassError{sapthesis}{Option '\CurrentOption'%
\MessageBreak is not valid}{Remove '\CurrentOption' %
from class options}}
\ProcessOptionsX[sap]<>
-\LoadClass[a4paper,11pt]{book}
-
-
-\ifSAP@PhD\relax\else
- \ifSAP@Specialization\relax\else
- \ifSAP@LaM\relax\else
- \ifSAP@Lau\relax\else
- \ifSAP@MasterP\relax\else
- \ifSAP@MasterS\relax\else
- \ifSAP@TFA\relax\else
- \ClassError{sapthesis}{You must specify the PhD, LaM, Lau, MasterP, %
- MasterS, Specialization or TFA option}{}
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
-\fi
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Page layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage[a4paper]{geometry}
+\LoadClass[\SAP@paper,\SAP@fontsize]{book}
+\RequirePackage[\SAP@paper]{geometry}
+
+% A4
+\def\SAP@layoutname{a4paper}
+\ifx\SAP@layout\SAP@layoutname %
\geometry{textwidth=396pt,
textheight=641pt,
marginparsep=12pt,
@@ -106,8 +83,43 @@
includehead,
marginparwidth=72pt,
heightrounded}
+\if@twoside\geometry{hmarginratio=55:89}\fi
+\fi
+% A5
+\def\SAP@layoutname{a5paper}
+\ifx\SAP@layout\SAP@layoutname %
+\geometry{textwidth=300pt,
+ textheight=485pt,
+ marginparsep=12pt,
+ bindingoffset=\SAP@binding,
+ vmarginratio=55:89,
+ includehead,
+ marginparwidth=42pt,
+ heightrounded}
+\if@twoside\geometry{hmarginratio=55:89}\fi
+\def\SAP@papername{a4paper}
+\ifx\SAP@paper\SAP@papername%
+\geometry{layout=\SAP@layout,layouthoffset=2cm,layoutvoffset=2cm,showcrop}\fi
+\fi
+
+% B5
+\def\SAP@layoutname{b5paper}
+\ifx\SAP@layout\SAP@layoutname %
+\geometry{textwidth=340pt,
+ textheight=550pt,
+ marginparsep=12pt,
+ bindingoffset=\SAP@binding,
+ vmarginratio=55:89,
+ includehead,
+ marginparwidth=42pt,
+ heightrounded}
\if@twoside\geometry{hmarginratio=55:89}\fi
+\def\SAP@papername{a4paper}
+\ifx\SAP@paper\SAP@papername%
+\geometry{layout=\SAP@layout,layouthoffset=2cm,layoutvoffset=2cm,showcrop}\fi
+\fi
+
@@ -116,7 +128,7 @@
%% Some settings%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{ifxetex}
\ifxetex
- \RequirePackage{xltxtra}
+ \RequirePackage{fontspec}
\else
\ifSAP@nodefaultfont\relax\else
\RequirePackage[T1]{fontenc}
@@ -161,7 +173,7 @@
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}}
-%% ri-definition of the plain style (first page of the chapters)
+%% re-definition of the plain style (first page of the chapters)
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
@@ -177,28 +189,21 @@
\g@addto@macro\mainmatter{\pagestyle{SAP@mainstyle}}
% fancy marginnote
-
-% commands to redefine the marginpar command
-% maybe in future I will remove the mnote command?
-%\def \@marginparreset {%
-% \reset@font
-% \footnotesize
-% \itshape
-% \@setminipage
-%}
-%\long\def\@xmpar[#1]#2{%
-% \@savemarbox\@marbox{\raggedleft #1}%
-% \@savemarbox\@currbox{\raggedright #2}%
-% \@xympar}
-%\long\def\@ympar#1{%
-% \@savemarbox\@marbox{\raggedleft #1}%
-% \@savemarbox\@currbox{\raggedright #1}%
-% \@xympar}
-%
-% simpler version which cannot redefine marginpar. A new command
-% (mnote) is needed
-\g@addto@macro\@marginparreset{\footnotesize\itshape}
-\newcommand{\mnote}[1]{\marginpar[\raggedleft #1]{\raggedright #1}}
+% redefine the marginpar command
+\def \@marginparreset {%
+ \reset@font
+ \small
+ \itshape
+ \@setminipage
+}
+\long\def\@xmpar[#1]#2{%
+ \@savemarbox\@marbox{\raggedleft #1}%
+ \@savemarbox\@currbox{\raggedright #2}%
+ \@xympar}
+\long\def\@ympar#1{%
+ \@savemarbox\@marbox{\raggedleft #1}%
+ \@savemarbox\@currbox{\raggedright #1}%
+ \@xympar}
@@ -216,15 +221,24 @@
%% GENERAL COMMANDS
+% logo
+\newif\ifSAP@sapienzalogo \SAP@sapienzalogofalse
+\IfFileExists{sapienzalogo.pdf}{\SAP@sapienzalogotrue}{%
+\ClassWarningNoLine{sapthesis}{Logo not found! You have to download it
+manually. See the documentation or just the frontispiece.}
+\RequirePackage{hyperref}}
+
+
+
\def\SAP@subtitle{}
+\def\SAP@alttitle{}
\def\SAP@courseorganizerLabel{}
\def\SAP@courseLabel{}
\newcommand{\subtitle}[1]{\def\SAP@subtitle{#1}}
+\newcommand{\alttitle}[1]{\def\SAP@alttitle{#1}}
\newcommand{\courseorganizer}[1]{\def\SAP@courseorganizerLabel{#1}}
-\newcommand{\course}[2][]{%
- \def\SAP@courseLabel{#2}
- \ifstrequal{#1}{override}{\SAP@overridecoursetrue}{}}
+\newcommand{\course}[1]{\def\SAP@courseLabel{#1}}
\def\SAP@copyyear{}
\newcommand{\copyyear}[1]{\def\SAP@copyyear{#1}}
@@ -233,7 +247,7 @@
\newcommand{\cycle}[1]{\def\SAP@cycle{#1}}
\def\SAP@submitdate{}
-\newcommand{\submitdate}[1]{\def\SAP@submitdate{#1}}
+\newcommand{\submitdate}[1]{\def\SAP@AcademicYear{#1}}
\let\AcademicYear\submitdate
\def\SAP@IDnumber{}
@@ -246,24 +260,28 @@
\ifnum\SAP@advisorcount=\z@
\SAP@advisortoks={#1}%
\else
- \SAP@advisortoks=\expandafter{\the\SAP@advisortoks\\[0.75mm]#1}%
+ \SAP@advisortoks=\expandafter{\the\SAP@advisortoks\\[1mm]#1}%
\fi
\advance\SAP@advisorcount\@ne}
+\newcommand{\customadvisorlabel}[1]{%
+ \newcommand{\SAP@ThesisAdvisorLabel}{#1}
+ \newcommand{\SAP@ThesisAdvisorsLabel}{#1}}
+
%% Co-Advisors or External Advisor
\newcount\SAP@coadvisorcount
\newtoks\SAP@coadvisortoks
-\newif\ifSAP@ext \SAP@extfalse
-\newcommand{\coadvisor}[2][]{%
+\newcommand{\coadvisor}[1]{%
\ifnum\SAP@coadvisorcount=\z@
- \SAP@coadvisortoks={#2}%
+ \SAP@coadvisortoks={#1}%
\else
- \SAP@coadvisortoks=\expandafter{\the\SAP@coadvisortoks\\[0.75mm]#2}%
+ \SAP@coadvisortoks=\expandafter{\the\SAP@coadvisortoks\\[1mm]#1}%
\fi
- \advance\SAP@coadvisorcount\@ne
- \ifstrequal{#1}{ext}{\SAP@exttrue}{}}
-
+ \advance\SAP@coadvisorcount\@ne}
+\newcommand{\customcoadvisorlabel}[1]{%
+ \newcommand{\SAP@ThesisCoAdvisorLabel}{#1}
+ \newcommand{\SAP@ThesisCoAdvisorsLabel}{#1}}
%% Reviewers
\def\SAP@ReviewerLabel{}
@@ -275,7 +293,7 @@
\ifnum\SAP@reviewercount=\z@
\SAP@reviewertoks={#1}%
\else
- \SAP@reviewertoks=\expandafter{\the\SAP@reviewertoks\\[0.75mm]#1}%
+ \SAP@reviewertoks=\expandafter{\the\SAP@reviewertoks\\[1mm]#1}%
\fi
\advance\SAP@reviewercount\@ne}
@@ -292,27 +310,9 @@
\fi
\advance\SAP@directorcount\@ne}
-%% Tutor (TFA only)
-\newcount\SAP@tutorcount
-\newtoks\SAP@tutortoks
-\newcommand{\tutor}[1]{%
- \ifnum\SAP@tutorcount=\z@
- \SAP@tutortoks={#1}%
- \else
- \SAP@tutortoks=\expandafter{\the\SAP@tutortoks\\[0.75mm]#1}%
- \fi
- \advance\SAP@tutorcount\@ne}
-
-%% Tutor Coordinatori (TFA only)
-\newcount\SAP@tutorcoordcount
-\newtoks\SAP@tutorcoordtoks
-\newcommand{\tutorcoord}[1]{%
- \ifnum\SAP@tutorcoordcount=\z@
- \SAP@tutorcoordtoks={#1}%
- \else
- \SAP@tutorcoordtoks=\expandafter{\the\SAP@tutorcoordtoks\\[0.75mm]#1}%
- \fi
- \advance\SAP@tutorcoordcount\@ne}
+\newcommand{\customdirectorlabel}[1]{%
+ \newcommand{\SAP@ThesisDirectorLabel}{#1}
+ \newcommand{\SAP@ThesisDirectorsLabel}{#1}}
%% Examiners
\newcount\SAP@examinercount
@@ -328,6 +328,9 @@
\def\SAP@examdate{}
\newcommand{\examdate}[1]{\def\SAP@examdate{#1}}
+\def\SAP@thesistype{}
+\newcommand{\thesistype}[1]{\def\SAP@thesistype{#1}}
+
\def\SAP@versiondate{}
\newcommand{\versiondate}[1]{\def\SAP@versiondate{#1}}
@@ -343,542 +346,425 @@
\def\SAP@copyrightstatement{}
\newcommand{\copyrightstatement}[1]{\def\SAP@copyrightstatement{#1}}
-\def\SAP@schoolname{}
-\newcommand{\schoolname}[1]{\def\SAP@schoolname{#1}}
-
-\def\SAP@schooladdress{}
-\newcommand{\schooladdress}[1]{\def\SAP@schooladdress{#1}}
-
-\def\SAP@schoolwebsite{}
-\newcommand{\schoolwebsite}[1]{\def\SAP@schoolwebsite{#1}}
+\def\SAP@extrainfo{}
+\newcommand{\extrainfo}[1]{\def\SAP@extrainfo{#1}}
-\def\SAP@schoolprincipal{}
-\newcommand{\schoolprincipal}[1]{\def\SAP@schoolprincipal{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% PhD maketitle
+%% maketitle commands for A4 (A), A5 (B), B5 (C) formats
-\newcommand{\SAP@maketitlePhD}{
+\newcommand{\SAP@maketitleA}{
-% Errors:
-
-\if|\SAP@courseorganizerLabel|\ClassError{sapthesis}{You must specify the Ph.D. %
- organizer}{Example: \protect\courseorganizer{Scuola di dottorato di ...}}\fi
-\if|\SAP@courseLabel|\ClassError{sapthesis}{You must specify the Ph.D. %
- course}{Example: \protect\course{Physics}}\fi
-\ifSAP@overridecourse\relax\else\if|\SAP@cycle|\ClassError{sapthesis}{You must specify the Ph.D. %
- cycle (cycle)}{Example: \protect\cycle{XXIII} The Ph.D. cycle must be in the roman numbers}\fi\fi
-\if|\SAP@submitdate|\ClassError{sapthesis}{You must specify the %
- thesis submission date}{Example: \protect\submitdate{August 2012} The date must be in the form Month(name) Year(number)}\fi
-\if|\SAP@copyyear|\ClassError{sapthesis}{You must specify the %
- copyright year}{Example: \protect\copyyear{2012}}\fi
-\if|\SAP@IDnumber|\ClassError{sapthesis}{You must specify your %
- ID number (matricola)}{Example: \protect\IDnumber{123456}}\fi
-\if|\SAP@authoremail|\ClassError{sapthesis}{You must specify the email of the author}{%
- Example: \protect\authoremail{author@email.com}}\fi
+\begin{titlepage}
-% Titlepage:
+\linespread{1}\selectfont
+\newlength{\SAP@parboxindent}
+\newlength{\SAP@parboxwidth}
+\setlength{\SAP@parboxindent}{1.72cm}
+\setlength{\SAP@parboxwidth}{\dimexpr\textwidth-\SAP@parboxindent\relax}
+\newcommand{\SAP@parbox}[2][]{\hspace{\SAP@parboxindent}%
+\parbox[t][##1][t]{\SAP@parboxwidth}{##2}}
+\parindent=0pt
+\sffamily
+
+\vspace*{-10mm}
+
+\ifSAP@sapienzalogo
+ \includegraphics[width=5cm]{sapienzalogo}
+\else
+ \parbox[b][3cm][c]{0.49\linewidth}{\hspace{-1cm}
+ \setlength{\unitlength}{1mm}
+ \begin{picture}(65,27.3)(0,0)
+ \small
+ \put(0,0){\framebox(65,27.3)[0,0]{}}
+ \put(2,23){\makebox(0,0)[l]{WARNING! ATTENZIONE!}}
+ \put(2,18){\makebox(0,0)[l]{Sapienza logo not found!}}
+ \put(2,11){\href{http://biccari.altervista.org/c/informatica/latex/sapienzalogo.pdf}{Click here to download the Sapienza logo}}
+ \put(2,5.5){Then copy sapienzalogo.pdf in the folder}
+ \put(2,1.5){of your main .tex file.}
+ \end{picture}
+ }
+\fi
- \begin{titlepage}
-
- \linespread{1}\selectfont
+\nointerlineskip
- \newcommand{\SAP@parbox}[2][]{\hspace{1.72cm}\parbox[t][##1][t]{11.9cm}{##2}}
- \parindent=0pt
- \sffamily
+%\nointerlineskip
+%\vspace{\stretch{1}}
+%\nointerlineskip
- \vspace*{-10mm}
- \ifSAP@bn
- \includegraphics[width=5cm]{sapienza-MLblack-pos}
+%\fbox{%
+\SAP@parbox[12.8cm]{
+ \nointerlineskip
+ \vspace*{7mm}
+ \vspace{\stretch{1}}
+ \nointerlineskip
+
+ {\LARGE\linespread{1.1}\selectfont\textcolor{sapred}{\@title}\par}
+
+ \if|\SAP@subtitle|
+ \if|\SAP@alttitle|
+ \relax
+ \else
+ \vspace{1cm}
+ {\LARGE\linespread{1.1}\selectfont\textcolor{sapred}{\SAP@alttitle}\par}
+ \fi
\else
- \includegraphics[width=5cm]{sapienza-MLred-pos}
+ \vspace{0.4cm}
+ {\large\linespread{1.1}\selectfont\textcolor{sapred}{\SAP@subtitle}\par}
\fi
-
+
\nointerlineskip
\vspace{\stretch{1}}
- \nointerlineskip
+ \vspace*{7mm}
+ \nointerlineskip}
+%}
- \SAP@parbox{\LARGE\textcolor{sapred}{\@title}\par}
-
- \if|\SAP@subtitle|
- \relax
- \else
- \vspace{0.4cm}
- \SAP@parbox{\linespread{1.2}\selectfont\textcolor{sapred}{\large\SAP@subtitle}\par}
- \fi
+\nointerlineskip
+%\vspace{\stretch{1}}
- \vspace{\stretch{1}}
+%\fbox{%
+\SAP@parbox{%
+\textcolor{sapred}{\SAP@courseorganizerLabel\\[1mm]
+\SAP@courseLabel\ \if|\SAP@cycle|\relax\else (\SAP@cycle\ \SAP@cycleLabel)\fi}
- \SAP@parbox[3cm]{%
- \textcolor{sapred}{\SAP@courseorganizerLabel\\[2mm]
- \ifSAP@overridecourse\SAP@courseLabel\else Dottorato di Ricerca in \SAP@courseLabel\ -- \SAP@cycle\ Ciclo\fi}}
+\vspace*{9mm}
- \SAP@parbox[3cm]{%
- \ifSAP@femaleauthor
- \SAP@CandidateLabelFemale\\[2mm]
+{\bfseries\@author}\\[1mm]
+\SAP@IDnumberLabel\ \SAP@IDnumber
+
+\vspace*{9mm}
+
+\makebox[11.9cm][l]{%
+ \parbox[t]{5.9cm}{%
+ \ifcase\SAP@advisorcount
+ \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
+ {E.g. \protect\advisor{Prof. Name Surname}}
+ \or
+ \SAP@ThesisAdvisorLabel\\[1mm]
\else
- \SAP@CandidateLabel\\[2mm]
+ \SAP@ThesisAdvisorsLabel\\[1mm]
\fi
- \@author\\[0.75mm]
- \SAP@IDnumberLabel\ \SAP@IDnumber}
-
-
-
-
- \SAP@parbox[4.5cm]{%
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@advisorcount
- \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
- {E.g. \protect\advisor{Prof. Name Surname}}
- \or
- \SAP@ThesisAdvisorLabel\\[2mm]
- \else
- \SAP@ThesisAdvisorsLabel\\[2mm]
- \fi
- \the\SAP@advisortoks}
- \hspace{1.5cm}
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@coadvisorcount
- \relax
- \or
- \ifSAP@ext\SAP@ThesisExtAdvisorLabel\else\SAP@ThesisCoAdvisorLabel\fi\\[2mm]
- \else
- \ifSAP@ext\SAP@ThesisExtAdvisorsLabel\else\SAP@ThesisCoAdvisorsLabel\fi\\[2mm]
- \fi
- \the\SAP@coadvisortoks}
- }}
+ \the\SAP@advisortoks}
+ \hspace{15mm}
+ \parbox[t]{5.9cm}{%
+ \ifcase\SAP@coadvisorcount
+ \relax
+ \or
+ \SAP@ThesisCoAdvisorLabel\\[1mm]
+ \else
+ \SAP@ThesisCoAdvisorsLabel\\[1mm]
+ \fi
+ \the\SAP@coadvisortoks}
+}%
+
+\ifcase\SAP@directorcount
+ \relax
+\or
+ \vspace*{9mm}
+ \SAP@ThesisDirectorLabel\\[1mm]
+ \the\SAP@directortoks
+\else
+ \vspace*{9mm}
+ \SAP@ThesisDirectorsLabel\\[1mm]
+ \the\SAP@directortoks
+\fi
- \SAP@parbox{\SAP@submitdate}
-
- \end{titlepage}
-\clearpage
-\SAP@composebacktitlepage
}
+%}
+\nointerlineskip
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Specialization maketitle
+\vfill
-\newcommand{\SAP@maketitleSpecialization}{
-% Errors:
+%\fbox{%
+\SAP@parbox{%
+%\ifnum\SAP@directorcount=\z@
+% \vspace*{20mm}
+%\else
+% \vspace*{10mm}
+%\fi
+\SAP@AcademicYearLabel\ \SAP@AcademicYear
+}
+%}
+\end{titlepage}
+}
-\if|\SAP@courseorganizerLabel|\ClassError{sapthesis}{You must specify the Specialization course %
- organizer}{Example: \protect\courseorganizer{Faculty of ...}}\fi
-\if|\SAP@courseLabel|\ClassError{sapthesis}{You must specify the %
- course}{Example: \protect\course{Fisica}}\fi
-\if|\SAP@submitdate|\ClassError{sapthesis}{You must specify the Academic %
- Year}{Example: \protect\submitdate{2011/2012}}\fi
-\if|\SAP@IDnumber|\ClassError{sapthesis}{You must specify your %
- ID number (matricola)}{E.g. 123456}\fi
-\if|\SAP@copyyear|\ClassError{sapthesis}{You must specify the %
- copyright year}{Example: \protect\copyyear{2012}}\fi
-\if|\SAP@authoremail|\ClassError{sapthesis}{You must specify the email of the author}{%
- Example: \protect\authoremail{author@email.com}}\fi
-% Titlepage:
+\newcommand{\SAP@maketitleB}{
+\begin{titlepage}
- \begin{titlepage}
-
- \linespread{1}\selectfont
+\linespread{1}\selectfont
+\newlength{\SAP@parboxindent}
+\newlength{\SAP@parboxwidth}
+\setlength{\SAP@parboxindent}{1.38cm}
+\setlength{\SAP@parboxwidth}{\dimexpr\textwidth-\SAP@parboxindent\relax}
+\newcommand{\SAP@parbox}[2][]{\hspace{\SAP@parboxindent}%
+\parbox[t][##1][t]{\SAP@parboxwidth}{##2}}
+\parindent=0pt
+\sffamily
+
+\vspace*{-10mm}
+
+\ifSAP@sapienzalogo
+ \includegraphics[width=4cm]{sapienzalogo}
+\else
+ \parbox[b][3cm][c]{0.49\linewidth}{\hspace{-1cm}
+ \setlength{\unitlength}{1mm}
+ \begin{picture}(65,27.3)(0,0)
+ \small
+ \put(0,0){\framebox(65,27.3)[0,0]{}}
+ \put(2,23){\makebox(0,0)[l]{WARNING! ATTENZIONE!}}
+ \put(2,18){\makebox(0,0)[l]{Sapienza logo not found!}}
+ \put(2,11){\href{http://biccari.altervista.org/c/informatica/latex/sapienzalogo.pdf}{Click here to download the Sapienza logo}}
+ \put(2,5.5){Then copy sapienzalogo.pdf in the folder}
+ \put(2,1.5){of your main .tex file.}
+ \end{picture}
+ }
+\fi
- \newcommand{\SAP@parbox}[2][]{\hspace{1.72cm}\parbox[t][##1][t]{11.9cm}{##2}}
- \parindent=0pt
- \sffamily
+\nointerlineskip
- \vspace*{-10mm}
- \ifSAP@bn
- \includegraphics[width=5cm]{sapienza-MLblack-pos}
- \else
- \includegraphics[width=5cm]{sapienza-MLred-pos}
- \fi
+%\nointerlineskip
+%\vspace{\stretch{1}}
+%\nointerlineskip
+%\fbox{%
+\SAP@parbox[9.3cm]{
\nointerlineskip
- \vspace{\stretch{0.9}}
+ \vspace*{7mm}
+ \vspace{\stretch{1}}
\nointerlineskip
-
- \SAP@parbox{\LARGE\textcolor{sapred}{\@title}\par}
-
- \if|\SAP@subtitle|
- \relax
- \else
- \vspace{0.4cm}
- \SAP@parbox{\linespread{1.2}\selectfont\textcolor{sapred}{\large\SAP@subtitle}\par}
- \fi
-
- \vspace{\stretch{0.9}}
-
- \SAP@parbox[3cm]{%
- \textcolor{sapred}{\SAP@courseorganizerLabel\\[2mm]
- \ifSAP@overridecourse\SAP@courseLabel\else Corso di specializzazione in \SAP@courseLabel\fi}}
-
- \SAP@parbox[3cm]{%
- \ifSAP@femaleauthor
- \SAP@CandidateLabelFemale\\[2mm]
- \else
- \SAP@CandidateLabel\\[2mm]
- \fi
- \@author\\[0.75mm]
- \SAP@IDnumberLabel\ \SAP@IDnumber}
-
- \SAP@parbox[4.5cm]{%
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@advisorcount
- \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
- {E.g. \protect\advisor{Prof. Name Surname}}
- \or
- \SAP@ThesisAdvisorLabel\\[2mm]
- \else
- \SAP@ThesisAdvisorsLabel\\[2mm]
- \fi
- \the\SAP@advisortoks}
- \hspace{1.5cm}
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@directorcount
- \relax
- \or
- \SAP@ThesisDirectorLabel\\[2mm]
- \else
- \SAP@ThesisDirectorsLabel\\[2mm]
- \fi
- \the\SAP@directortoks}
- }
- \vspace{1cm}
+ {\Large\linespread{1.1}\selectfont\textcolor{sapred}{\@title}\par}
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@coadvisorcount
- \or
- \ifSAP@ext\SAP@ThesisExtAdvisorLabel\else\SAP@ThesisCoAdvisorLabel\fi\\[2mm]
- \else
- \ifSAP@ext\SAP@ThesisExtAdvisorsLabel\else\SAP@ThesisCoAdvisorsLabel\fi\\[2mm]
- \fi
- \the\SAP@coadvisortoks}
- }}
-
- \SAP@parbox{\SAP@AcademicYearLabel\ \SAP@submitdate}
+ \if|\SAP@subtitle|
+ \if|\SAP@alttitle|
+ \relax
+ \else
+ \vspace{7mm}
+ {\Large\linespread{1.1}\selectfont\textcolor{sapred}{\SAP@alttitle}\par}
+ \fi
+ \else
+ \vspace{0.4cm}
+ {\normalsize\linespread{1.1}\selectfont\textcolor{sapred}{\SAP@subtitle}\par}
+ \fi
- \end{titlepage}
-\clearpage
-\SAP@composebacktitlepage
-}
-%% Laurea and Laurea Magistrale maketitle
+ \nointerlineskip
+ \vspace{\stretch{1}}
+ \vspace*{7mm}
+ \nointerlineskip}
+%}
-\newcommand{\SAP@maketitleLaurea}{
+\nointerlineskip
+%\vspace{\stretch{1}}
-% Errors:
+%\fbox{%
+\SAP@parbox{%
+\textcolor{sapred}{\SAP@courseorganizerLabel\\[1mm]
+\SAP@courseLabel\ \if|\SAP@cycle|\relax\else (\SAP@cycle\ \SAP@cycleLabel)\fi}
-\if|\SAP@courseorganizerLabel|\ClassError{sapthesis}{You must specify the degree %
- organizer}{Example: \protect\courseorganizer{Faculty of ...}}\fi
-\if|\SAP@courseLabel|\ClassError{sapthesis}{You must specify the %
- course}{Example: \protect\course{Fisica}}\fi
-\if|\SAP@submitdate|\ClassError{sapthesis}{You must specify the Academic %
- Year}{Example: \protect\submitdate{2011/2012}}\fi
-\if|\SAP@IDnumber|\ClassError{sapthesis}{You must specify your %
- ID number (matricola)}{E.g. 123456}\fi
-\if|\SAP@copyyear|\ClassError{sapthesis}{You must specify the %
- copyright year}{Example: \protect\copyyear{2012}}\fi
-\if|\SAP@authoremail|\ClassError{sapthesis}{You must specify the email of the author}{%
- Example: \protect\authoremail{author@email.com}}\fi
-
-% Titlepage:
+\vspace*{7mm}
- \begin{titlepage}
-
- \linespread{1}\selectfont
+{\bfseries\@author}\\[1mm]
+\SAP@IDnumberLabel\ \SAP@IDnumber
- \newcommand{\SAP@parbox}[2][]{\hspace{1.72cm}\parbox[t][##1][t]{11.9cm}{##2}}
- \parindent=0pt
- \sffamily
+\vspace*{7mm}
- \vspace*{-10mm}
- \ifSAP@bn
- \includegraphics[width=5cm]{sapienza-MLblack-pos}
+\raggedright
+\makebox[0cm][l]{%
+ \parbox[t]{4cm}{%
+ \ifcase\SAP@advisorcount
+ \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
+ {E.g. \protect\advisor{Prof. Name Surname}}
+ \or
+ \SAP@ThesisAdvisorLabel\\[1mm]
\else
- \includegraphics[width=5cm]{sapienza-MLred-pos}
+ \SAP@ThesisAdvisorsLabel\\[1mm]
\fi
-
- \nointerlineskip
- \vspace{\stretch{0.9}}
- \nointerlineskip
-
- \SAP@parbox{\LARGE\textcolor{sapred}{\@title}\par}
-
- \if|\SAP@subtitle|
- \relax
- \else
- \vspace{0.4cm}
- \SAP@parbox{\linespread{1.2}\selectfont\textcolor{sapred}{\large\SAP@subtitle}\par}
- \fi
-
- \vspace{\stretch{0.9}}
-
- \SAP@parbox[3cm]{%
- \textcolor{sapred}{\SAP@courseorganizerLabel\\[2mm]
- \ifSAP@overridecourse\SAP@courseLabel\else Corso di Laurea \ifSAP@LaM Magistrale \fi in \SAP@courseLabel\fi}}
-
- \SAP@parbox[3cm]{%
- \ifSAP@femaleauthor
- \SAP@CandidateLabelFemale\\[2mm]
+ \the\SAP@advisortoks}
+ \hspace{2mm}
+ \parbox[t]{4cm}{%
+ \ifcase\SAP@coadvisorcount
+ \relax
+ \or
+ \SAP@ThesisCoAdvisorLabel\\[1mm]
\else
- \SAP@CandidateLabel\\[2mm]
+ \SAP@ThesisCoAdvisorsLabel\\[1mm]
\fi
- \@author\\[0.75mm]
- \SAP@IDnumberLabel\ \SAP@IDnumber}
-
- \SAP@parbox[4.5cm]{%
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@advisorcount
- \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
- {E.g. \protect\advisor{Prof. Name Surname}}
- \or
- \SAP@ThesisAdvisorLabel\\[2mm]
- \else
- \SAP@ThesisAdvisorsLabel\\[2mm]
- \fi
- \the\SAP@advisortoks}
- \hspace{1.5cm}
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@coadvisorcount
- \relax
- \or
- \ifSAP@ext\SAP@ThesisExtAdvisorLabel\else\SAP@ThesisCoAdvisorLabel\fi\\[2mm]
- \else
- \ifSAP@ext\SAP@ThesisExtAdvisorsLabel\else\SAP@ThesisCoAdvisorsLabel\fi\\[2mm]
- \fi
- \the\SAP@coadvisortoks}
- }}
+ \the\SAP@coadvisortoks}
+}%
+
+\ifcase\SAP@directorcount
+ \relax
+\or
+ \vspace*{7mm}
+ \SAP@ThesisDirectorLabel\\[1mm]
+ \the\SAP@directortoks
+\else
+ \vspace*{7mm}
+ \SAP@ThesisDirectorsLabel\\[1mm]
+ \the\SAP@directortoks
+\fi
- \SAP@parbox{\SAP@AcademicYearLabel\ \SAP@submitdate}
-
- \end{titlepage}
-\clearpage
-\SAP@composebacktitlepage
}
+%}
+\nointerlineskip
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Master di primo livello and
-%% Master di secondo livello maketitle
+\vfill
-\newcommand{\SAP@maketitleMaster}{
-% Errors:
+%\fbox{%
+\SAP@parbox{%
+%\ifnum\SAP@directorcount=\z@
+% \vspace*{20mm}
+%\else
+% \vspace*{10mm}
+%\fi
+\SAP@AcademicYearLabel\ \SAP@AcademicYear
+}
+%}
+\end{titlepage}
+}
-\if|\SAP@courseorganizerLabel|\ClassError{sapthesis}{You must specify the degree %
- organizer}{Example: \protect\courseorganizer{Faculty of ...}}\fi
-\if|\SAP@courseLabel|\ClassError{sapthesis}{You must specify the %
- course}{Example: \protect\course{Fisica}}\fi
-\if|\SAP@submitdate|\ClassError{sapthesis}{You must specify the Academic %
- Year}{Example: \protect\submitdate{2011/2012}}\fi
-\if|\SAP@IDnumber|\ClassError{sapthesis}{You must specify your %
- ID number (matricola)}{E.g. 123456}\fi
-\if|\SAP@copyyear|\ClassError{sapthesis}{You must specify the %
- copyright year}{Example: \protect\copyyear{2012}}\fi
-\if|\SAP@authoremail|\ClassError{sapthesis}{You must specify the email of the author}{%
- Example: \protect\authoremail{author@email.com}}\fi
-% Titlepage:
+\newcommand{\SAP@maketitleC}{
+\begin{titlepage}
- \begin{titlepage}
-
- \linespread{1}\selectfont
+\linespread{1}\selectfont
+\newlength{\SAP@parboxindent}
+\newlength{\SAP@parboxwidth}
+\setlength{\SAP@parboxindent}{1.38cm}
+\setlength{\SAP@parboxwidth}{\dimexpr\textwidth-\SAP@parboxindent\relax}
+\newcommand{\SAP@parbox}[2][]{\hspace{\SAP@parboxindent}%
+\parbox[t][##1][t]{\SAP@parboxwidth}{##2}}
+\parindent=0pt
+\sffamily
+
+\vspace*{-10mm}
+
+\ifSAP@sapienzalogo
+ \includegraphics[width=4cm]{sapienzalogo}
+\else
+ \parbox[b][3cm][c]{0.49\linewidth}{\hspace{-1cm}
+ \setlength{\unitlength}{1mm}
+ \begin{picture}(65,27.3)(0,0)
+ \small
+ \put(0,0){\framebox(65,27.3)[0,0]{}}
+ \put(2,23){\makebox(0,0)[l]{WARNING! ATTENZIONE!}}
+ \put(2,18){\makebox(0,0)[l]{Sapienza logo not found!}}
+ \put(2,11){\href{http://biccari.altervista.org/c/informatica/latex/sapienzalogo.pdf}{Click here to download the Sapienza logo}}
+ \put(2,5.5){Then copy sapienzalogo.pdf in the folder}
+ \put(2,1.5){of your main .tex file.}
+ \end{picture}
+ }
+\fi
- \newcommand{\SAP@parbox}[2][]{\hspace{1.72cm}\parbox[t][##1][t]{11.9cm}{##2}}
- \parindent=0pt
- \sffamily
+\nointerlineskip
- \vspace*{-10mm}
- \ifSAP@bn
- \includegraphics[width=5cm]{sapienza-MLblack-pos}
- \else
- \includegraphics[width=5cm]{sapienza-MLred-pos}
- \fi
+%\nointerlineskip
+%\vspace{\stretch{1}}
+%\nointerlineskip
+%\fbox{%
+\SAP@parbox[11.4cm]{
\nointerlineskip
- \vspace{\stretch{0.9}}
+ \vspace*{7mm}
+ \vspace{\stretch{1}}
\nointerlineskip
-
- \SAP@parbox{\LARGE\textcolor{sapred}{\@title}\par}
-
- \if|\SAP@subtitle|
- \relax
- \else
- \vspace{0.4cm}
- \SAP@parbox{\linespread{1.2}\selectfont\textcolor{sapred}{\large\SAP@subtitle}\par}
- \fi
-
- \vspace{\stretch{0.9}}
-
- \SAP@parbox[3cm]{%
- \textcolor{sapred}{\SAP@courseorganizerLabel\\[2mm]
- \ifSAP@overridecourse\SAP@courseLabel\else Master di \ifSAP@MasterP primo \fi \ifSAP@MasterS secondo \fi livello in \SAP@courseLabel\fi}}
-
- \SAP@parbox[3cm]{%
- \ifSAP@femaleauthor
- \SAP@CandidateLabelFemale\\[2mm]
- \else
- \SAP@CandidateLabel\\[2mm]
- \fi
- \@author\\[0.75mm]
- \SAP@IDnumberLabel\ \SAP@IDnumber}
-
- \SAP@parbox[4.5cm]{%
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@advisorcount
- \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
- {E.g. \protect\advisor{Prof. Name Surname}}
- \or
- \SAP@ThesisAdvisorLabel\\[2mm]
- \else
- \SAP@ThesisAdvisorsLabel\\[2mm]
- \fi
- \the\SAP@advisortoks}
- \hspace{1.5cm}
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@coadvisorcount
- \relax
- \or
- \ifSAP@ext\SAP@ThesisExtAdvisorLabel\else\SAP@ThesisCoAdvisorLabel\fi\\[2mm]
+
+ {\Large\linespread{1.1}\selectfont\textcolor{sapred}{\@title}\par}
+
+ \if|\SAP@subtitle|
+ \if|\SAP@alttitle|
+ \relax
\else
- \ifSAP@ext\SAP@ThesisExtAdvisorsLabel\else\SAP@ThesisCoAdvisorsLabel\fi\\[2mm]
+ \vspace{1cm}
+ {\Large\linespread{1.1}\selectfont\textcolor{sapred}{\SAP@alttitle}\par}
\fi
- \the\SAP@coadvisortoks}
- }}
-
- \SAP@parbox{\SAP@AcademicYearLabel\ \SAP@submitdate}
+ \else
+ \vspace{0.4cm}
+ {\normalsize\linespread{1.1}\selectfont\textcolor{sapred}{\SAP@subtitle}\par}
+ \fi
- \end{titlepage}
-\clearpage
-\SAP@composebacktitlepage
-}
+ \nointerlineskip
+ \vspace{\stretch{1}}
+ \vspace*{7mm}
+ \nointerlineskip}
+%}
+\nointerlineskip
+%\vspace{\stretch{1}}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Tirocinio Formativo Attivo (TFA) maketitle
+%\fbox{%
+\SAP@parbox{%
+\textcolor{sapred}{\SAP@courseorganizerLabel\\[1mm]
+\SAP@courseLabel\ \if|\SAP@cycle|\relax\else (\SAP@cycle\ \SAP@cycleLabel)\fi}
-\newcommand{\SAP@maketitleTFA}{
+\vspace*{7mm}
-% Errors:
+{\bfseries\@author}\\[1mm]
+\SAP@IDnumberLabel\ \SAP@IDnumber
-\if|\SAP@courseorganizerLabel|\ClassError{sapthesis}{You must specify the degree %
- organizer}{Example: \protect\courseorganizer{Faculty of ...}}\fi
-\if|\SAP@submitdate|\ClassError{sapthesis}{You must specify the Academic %
- Year}{Example: \protect\submitdate{2011/2012}}\fi
-\if|\SAP@IDnumber|\ClassError{sapthesis}{You must specify your %
- ID number (matricola)}{E.g. 123456}\fi
-\if|\SAP@copyyear|\ClassError{sapthesis}{You must specify the %
- copyright year}{Example: \protect\copyyear{2012}}\fi
-\if|\SAP@authoremail|\ClassError{sapthesis}{You must specify the email of the author}{%
- Example: \protect\authoremail{author@email.com}}\fi
+\vspace*{7mm}
-% Titlepage:
+\raggedright
+\makebox[0cm][l]{%
+ \parbox[t]{5cm}{%
+ \ifcase\SAP@advisorcount
+ \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
+ {E.g. \protect\advisor{Prof. Name Surname}}
+ \or
+ \SAP@ThesisAdvisorLabel\\[1mm]
+ \else
+ \SAP@ThesisAdvisorsLabel\\[1mm]
+ \fi
+ \the\SAP@advisortoks}
+ \hspace{2mm}
+ \parbox[t]{5cm}{%
+ \ifcase\SAP@coadvisorcount
+ \relax
+ \or
+ \SAP@ThesisCoAdvisorLabel\\[1mm]
+ \else
+ \SAP@ThesisCoAdvisorsLabel\\[1mm]
+ \fi
+ \the\SAP@coadvisortoks}
+}%
+
+\ifcase\SAP@directorcount
+ \relax
+\or
+ \vspace*{7mm}
+ \SAP@ThesisDirectorLabel\\[1mm]
+ \the\SAP@directortoks
+\else
+ \vspace*{7mm}
+ \SAP@ThesisDirectorsLabel\\[1mm]
+ \the\SAP@directortoks
+\fi
- \begin{titlepage}
-
- \linespread{1}\selectfont
+}
+%}
- \newcommand{\SAP@parbox}[2][]{\hspace{1.72cm}\parbox[t][##1][t]{11.9cm}{##2}}
- \parindent=0pt
- \sffamily
+\nointerlineskip
- \vspace*{-10mm}
- \ifSAP@bn
- \includegraphics[width=5cm]{sapienza-MLblack-pos}
- \else
- \includegraphics[width=5cm]{sapienza-MLred-pos}
- \fi
+\vfill
- \nointerlineskip
- \vspace{\stretch{0.9}}
- \nointerlineskip
- \SAP@parbox{\LARGE\textcolor{sapred}{\@title}\par}
-
- \if|\SAP@subtitle|
- \relax
- \else
- \vspace{0.4cm}
- \SAP@parbox{\linespread{1.2}\selectfont\textcolor{sapred}{\large\SAP@subtitle}\par}
- \fi
-
- \vspace{\stretch{0.9}}
-
- \SAP@parbox[3cm]{%
- \textcolor{sapred}{\SAP@courseorganizerLabel\\[2mm]
- Tirocinio Formativo Attivo\\[2mm]
- \ifSAP@overridecourse\SAP@courseLabel\else Classe \SAP@courseLabel\fi}}
-
- \SAP@parbox[3cm]{%
- \ifSAP@femaleauthor
- \SAP@CandidateLabelFemale\\[2mm]
- \else
- \SAP@CandidateLabel\\[2mm]
- \fi
- \@author\\[0.75mm]
- \SAP@IDnumberLabel\ \SAP@IDnumber}
-
- \SAP@parbox[4.5cm]{%
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@advisorcount
- \ClassError{sapthesis}{You must specify at least one advisor in the preamble}%
- {E.g. \protect\advisor{Prof. Name Surname}}
- \or
- \SAP@ThesisAdvisorLabel\\[2mm]
- \else
- \SAP@ThesisAdvisorsLabel\\[2mm]
- \fi
- \the\SAP@advisortoks}
- \hspace{1.5cm}
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@coadvisorcount
- \relax
- \or
- \ifSAP@ext\SAP@ThesisExtAdvisorLabel\else\SAP@ThesisCoAdvisorLabel\fi\\[2mm]
- \else
- \ifSAP@ext\SAP@ThesisExtAdvisorsLabel\else\SAP@ThesisCoAdvisorsLabel\fi\\[2mm]
- \fi
- \the\SAP@coadvisortoks}
- }
-
- \vspace{1cm}
-
- \makebox[11.9cm][l]{%
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@tutorcount
- \ClassError{sapthesis}{You must specify at least one tutor in the preamble}%
- {E.g. \protect\tutor{Prof. Name Surname}}
- \or
- \SAP@ThesisTutorLabel\\[2mm]
- \else
- \SAP@ThesisTutorsLabel\\[2mm]
- \fi
- \the\SAP@tutortoks}
- \hspace{1.5cm}
- \parbox[t]{5.9cm}{%
- \ifcase\SAP@tutorcoordcount
- \ClassError{sapthesis}{You must specify at least one tutor coordinatore in the preamble}%
- {E.g. \protect\tutorcoord{Prof. Name Surname}}
- \or
- \SAP@ThesisTutorCoordLabel\\[2mm]
- \else
- \SAP@ThesisTutorCoordsLabel\\[2mm]
- \fi
- \the\SAP@tutorcoordtoks}
- }}
-
- \SAP@parbox{\SAP@AcademicYearLabel\ \SAP@submitdate}
-
- \end{titlepage}
-\clearpage
-\SAP@composebacktitlepage
+%\fbox{%
+\SAP@parbox{%
+%\ifnum\SAP@directorcount=\z@
+% \vspace*{20mm}
+%\else
+% \vspace*{10mm}
+%\fi
+\SAP@AcademicYearLabel\ \SAP@AcademicYear
+}
+%}
+\end{titlepage}
}
@@ -893,12 +779,8 @@
\null
\vspace*{1cm}
-\ifSAP@TFA
-\SAP@TFAschoolHeadLabel\\[2mm]
-\SAP@schoolname\\[0.1cm]
-\SAP@schooladdress\\[0.1cm]
-\@ifundefined{href}{\SAP@schoolwebsite}{\href{\SAP@schoolwebsite}{\SAP@schoolwebsite}}\\[0.1cm]
-\SAP@TFAschoolPrincipalLabel: \SAP@schoolprincipal
+\if|\SAP@extrainfo|\relax\else
+\SAP@extrainfo
\vspace*{1.5cm}
\fi
@@ -938,27 +820,10 @@
\small
\textbf{\def\\{}\def\newline{}\@title} \\[0.75mm]
-\ifSAP@PhD\SAP@PhDthesistype\fi
-\ifSAP@Specialization\SAP@Specializationthesistype\fi
-\ifSAP@LaM\SAP@LaMthesistype\fi
-\ifSAP@Lau\SAP@Lauthesistype\fi
-\ifSAP@MasterS\SAP@MasterSthesistype\fi
-\ifSAP@MasterP\SAP@MasterPthesistype\fi
-\ifSAP@TFA\SAP@TFAthesistype\fi
-. \SAP@sapienzaname \\[0.75mm]
+\if|\SAP@thesistype|\relax\else\SAP@thesistype.\fi\ \SAP@sapienzaname \\[0.75mm]
\if|\SAP@ISBN|\relax\else ISBN: \SAP@ISBN\fi\\[0.75mm]
\if|\SAP@copyrightstatement|\copyright\ \SAP@copyyear\ \@author. \SAP@allRightsReservedLabel\else\SAP@copyrightstatement\fi\\[1.5mm]
-%Material for which the author is the copyright owner cannot be
-%used without the written permission of the author.
-%The permission to reproduce copyright protected material does not extend
-%to any material that is copyright of a third party; authorization to
-%reproduce such material must be obtained from the copyright owners concerned.
-%If you believe that a copyright infringement is present in this thesis,
-%please contact the author, providing your name, contact details, full
-%details of the copyright infringement and advise whether you are the copyright
-%owner or a representative of the copyright owner.\\
-
\SAP@sapthesisInformationLabel.\\
\if|\SAP@versiondate|
@@ -982,13 +847,34 @@
%% Choosing the right \maketitle according to the thesis type %%%%%%%
\renewcommand{\maketitle}{%
- \ifSAP@PhD\SAP@maketitlePhD\fi
- \ifSAP@Specialization\SAP@maketitleSpecialization\fi
- \ifSAP@LaM\SAP@maketitleLaurea\fi
- \ifSAP@Lau\SAP@maketitleLaurea\fi
- \ifSAP@MasterS\SAP@maketitleMaster\fi
- \ifSAP@MasterP\SAP@maketitleMaster\fi
- \ifSAP@TFA\SAP@maketitleTFA\fi}
+% Errors:
+\if|\SAP@courseorganizerLabel|\ClassError{sapthesis}{You must specify the course %
+ organizer}{Example: \protect\courseorganizer{Scuola di dottorato di ...}}\fi
+\if|\SAP@courseLabel|\ClassError{sapthesis}{You must specify the %
+ course}{Example: \protect\course{Corso di Laurea Magistrale in Fisica}}\fi
+\if|\SAP@AcademicYear|\ClassError{sapthesis}{You must specify the %
+ thesis submission date}{Example: \protect\submitdate{August 2012} The date must be in the form Month(name) Year(number)}\fi
+\if|\SAP@copyyear|\ClassError{sapthesis}{You must specify the %
+ copyright year}{Example: \protect\copyyear{2012}}\fi
+\if|\SAP@IDnumber|\ClassError{sapthesis}{You must specify your %
+ ID number (matricola)}{Example: \protect\IDnumber{123456}}\fi
+\if|\SAP@authoremail|\ClassError{sapthesis}{You must specify the email of the author}{%
+ Example: \protect\authoremail{author@email.com}}\fi
+%titlepage
+\def\SAP@layoutname{a4paper}
+\ifx\SAP@layout\SAP@layoutname
+\SAP@maketitleA
+\fi
+\def\SAP@layoutname{a5paper}
+\ifx\SAP@layout\SAP@layoutname
+\SAP@maketitleB
+\fi
+\def\SAP@layoutname{b5paper}
+\ifx\SAP@layout\SAP@layoutname
+\SAP@maketitleC
+\fi
+\clearpage
+\SAP@composebacktitlepage}
@@ -1025,37 +911,23 @@
\newcommand{\SAP@CandidateLabel}{Candidate}
\newcommand{\SAP@CandidateLabelFemale}{Candidate}
\newcommand{\SAP@IDnumberLabel}{ID number}
- \newcommand{\SAP@ThesisAdvisorLabel}{Thesis Advisor}
- \newcommand{\SAP@ThesisAdvisorsLabel}{Thesis Advisors}
- \newcommand{\SAP@ThesisCoAdvisorLabel}{Co-Advisor}
- \newcommand{\SAP@ThesisCoAdvisorsLabel}{Co-Advisors}
- \newcommand{\SAP@ThesisExtAdvisorLabel}{External Advisor}
- \newcommand{\SAP@ThesisExtAdvisorsLabel}{External Advisors}
- \newcommand{\SAP@ThesisDirectorLabel}{Director}
- \newcommand{\SAP@ThesisDirectorsLabel}{Directors}
- \newcommand{\SAP@ThesisTutorLabel}{Trainee's Tutor}
- \newcommand{\SAP@ThesisTutorsLabel}{Trainee's Tutors}
- \newcommand{\SAP@ThesisTutorCoordLabel}{Coordinating Tutor}
- \newcommand{\SAP@ThesisTutorCoordsLabel}{Coordinating Tutors}
- \newcommand{\SAP@TFAschoolHeadLabel}{Training done at:}
- \newcommand{\SAP@TFAschoolPrincipalLabel}{Principal}
+ \newcommand{\SAP@ThesisAdvisorLabel}{Advisor}
+ \newcommand{\SAP@ThesisAdvisorsLabel}{Advisors}
+ \providecommand{\SAP@ThesisCoAdvisorLabel}{Co-Advisor}
+ \providecommand{\SAP@ThesisCoAdvisorsLabel}{Co-Advisors}
+ \providecommand{\SAP@ThesisDirectorLabel}{Director}
+ \providecommand{\SAP@ThesisDirectorsLabel}{Directors}
+ \newcommand{\SAP@cycleLabel}{cycle}
+ \newcommand{\SAP@AcademicYearLabel}{Academic Year}
\newcommand{\SAP@ThesisNotDefensedLabel}{Thesis not yet defended}
\newcommand{\SAP@ThesisDefensedLabelA}{Thesis defended on}
\newcommand{\SAP@ThesisDefensedLabelB}{in front of a Board of Examiners composed by}
\newcommand{\SAP@chairman}{chairman}
- \newcommand{\SAP@PhDthesistype}{Ph.D. thesis}
- \newcommand{\SAP@Specializationthesistype}{Specialization thesis}
- \newcommand{\SAP@LaMthesistype}{Master's thesis}
- \newcommand{\SAP@Lauthesistype}{Bachelor's thesis}
- \newcommand{\SAP@MasterPthesistype}{First level master's thesis}
- \newcommand{\SAP@MasterSthesistype}{Second level master's thesis}
- \newcommand{\SAP@TFAthesistype}{TFA report}
- \newcommand{\SAP@sapienzaname}{Sapienza -- University of Rome}
+ \newcommand{\SAP@sapienzaname}{Sapienza University of Rome}
\newcommand{\SAP@versionLabel}{Version}
\newcommand{\SAP@websiteLabel}{Website}
\newcommand{\SAP@AcknowledgmentsLabel}{Acknowledgments}
\newcommand{\SAP@AbstractLabel}{Abstract}
- \newcommand{\SAP@AcademicYearLabel}{Academic Year}
\newcommand{\SAP@allRightsReservedLabel}{All rights reserved}
\newcommand{\SAP@sapthesisInformationLabel}{This thesis has been typeset by \LaTeX\ and the Sapthesis class}
\newcommand{\SAP@emailLabel}{Author's email}}
@@ -1066,35 +938,21 @@
\newcommand{\SAP@IDnumberLabel}{Matricola}
\newcommand{\SAP@ThesisAdvisorLabel}{Relatore}
\newcommand{\SAP@ThesisAdvisorsLabel}{Relatori}
- \newcommand{\SAP@ThesisCoAdvisorLabel}{Correlatore}
- \newcommand{\SAP@ThesisCoAdvisorsLabel}{Correlatori}
- \newcommand{\SAP@ThesisExtAdvisorLabel}{Relatore esterno}
- \newcommand{\SAP@ThesisExtAdvisorsLabel}{Relatori esterni}
- \newcommand{\SAP@ThesisDirectorLabel}{Direttore}
- \newcommand{\SAP@ThesisDirectorsLabel}{Direttori}
- \newcommand{\SAP@ThesisTutorLabel}{Tutor del Tirocinante}
- \newcommand{\SAP@ThesisTutorsLabel}{Tutor del Tirocinante}
- \newcommand{\SAP@ThesisTutorCoordLabel}{Tutor Coordinatore}
- \newcommand{\SAP@ThesisTutorCoordsLabel}{Tutor Coordinatori}
- \newcommand{\SAP@TFAschoolHeadLabel}{Tirocinio svolto presso:}
- \newcommand{\SAP@TFAschoolPrincipalLabel}{Dirigente scolastico}
+ \providecommand{\SAP@ThesisCoAdvisorLabel}{Correlatore}
+ \providecommand{\SAP@ThesisCoAdvisorsLabel}{Correlatori}
+ \providecommand{\SAP@ThesisDirectorLabel}{Direttore}
+ \providecommand{\SAP@ThesisDirectorsLabel}{Direttori}
+ \newcommand{\SAP@cycleLabel}{ciclo}
+ \newcommand{\SAP@AcademicYearLabel}{Anno Accademico}
\newcommand{\SAP@ThesisNotDefensedLabel}{Tesi non ancora discussa}
\newcommand{\SAP@ThesisDefensedLabelA}{Tesi discussa il}
\newcommand{\SAP@ThesisDefensedLabelB}{di fronte a una commissione esaminatrice composta da}
\newcommand{\SAP@chairman}{presidente}
- \newcommand{\SAP@PhDthesistype}{Tesi di dottorato}
- \newcommand{\SAP@Specializationthesistype}{Tesi di Specializzazione}
- \newcommand{\SAP@LaMthesistype}{Tesi di Laurea Magistrale}
- \newcommand{\SAP@Lauthesistype}{Tesi di Laurea}
- \newcommand{\SAP@MasterPthesistype}{Tesi di Master di primo livello}
- \newcommand{\SAP@MasterSthesistype}{Tesi di Master di secondo livello}
- \newcommand{\SAP@TFAthesistype}{TFA. Relazione di tirocinio}
- \newcommand{\SAP@sapienzaname}{Sapienza -- Universit\`a di Roma}
+ \newcommand{\SAP@sapienzaname}{Sapienza Universit\`a di Roma}
\newcommand{\SAP@versionLabel}{Versione}
\newcommand{\SAP@websiteLabel}{Sito web}
\newcommand{\SAP@AcknowledgmentsLabel}{Ringraziamenti}
\newcommand{\SAP@AbstractLabel}{Sommario}
- \newcommand{\SAP@AcademicYearLabel}{Anno Accademico}
\newcommand{\SAP@allRightsReservedLabel}{Tutti i diritti riservati}
\newcommand{\SAP@sapthesisInformationLabel}{Questa tesi \`e stata composta con \LaTeX\ e la classe Sapthesis}
\newcommand{\SAP@emailLabel}{Email dell'autore}}
@@ -1176,8 +1034,8 @@
\else
\@tempswatrue
\fi
- \toks@=\expandafter{\the\expandafter\toks@\expandafter\partial\der@var}}%
- \frac{\partial\ifnum\count@=\@ne\else^{\number\count@}\fi#1}{\the\toks@}%
+ \toks@=\expandafter{\the\expandafter\toks@\expandafter\di\der@var}}%
+ \frac{\di\ifnum\count@=\@ne\else^{\number\count@}\fi#1}{\the\toks@}%
\endgroup}
\def\check@var{\@ifstar{\mult@var}{\one@var}}
\def\mult@var#1#2\@nil{\def\der@var{#2^{#1}}\def\der@exp{#1}}
diff --git a/macros/latex/contrib/tasks/README b/macros/latex/contrib/tasks/README
index 8fa06e1888..5d772f3de2 100644
--- a/macros/latex/contrib/tasks/README
+++ b/macros/latex/contrib/tasks/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the TASKS package v1.3a 2021/02/20
+the TASKS package v1.4 2022/01/08
lists with columns filled horizontally
@@ -8,7 +8,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/tasks/
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2013--2021 Clemens Niederberger
+Copyright 2013--2022 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
@@ -24,7 +24,7 @@ The Current Maintainer of this work is Clemens Niederberger.
--------------------------------------------------------------------------
The tasks package consists of the files
- tasks.sty, tasks.cfg
- - tasks-manual.tex, task-manual.pdf, task-manual.cls
+ - tasks-manual.tex, task-manual.pdf, tasks-manual.cls
- README
--------------------------------------------------------------------------
If you have any ideas, questions, suggestions or bugs to report, please
diff --git a/macros/latex/contrib/tasks/tasks-manual.cls b/macros/latex/contrib/tasks/tasks-manual.cls
new file mode 100644
index 0000000000..31742f5238
--- /dev/null
+++ b/macros/latex/contrib/tasks/tasks-manual.cls
@@ -0,0 +1,275 @@
+% --------------------------------------------------------------------------
+% the TASKS package
+%
+% lists with columns filled horizontally
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/tasks/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013--2021 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\ProvidesClass{tasks-manual}[2022/01/08]
+
+\LoadClass[load-preamble,add-index]{cnltx-doc}
+\RequirePackage{imakeidx}
+
+\RequirePackage{tasks}
+
+\setcnltx{
+ package = {tasks} ,
+ authors = Clemens Niederberger ,
+ email = {contact@mychemistry.eu} ,
+ url = {https://github.com/cgnieder/tasks/} ,
+ info = {lists with columns filled horizontally} ,
+ add-cmds = {
+ NewTasksEnvironment,
+ RenewTasksEnvironment,
+ settasks,
+ startnewitemline ,
+ task
+ } ,
+ add-silent-cmds = {
+ DeclareInstance, DeclareTemplateInterface,
+ faThumbsOUp,
+ sample, Sample , theexercise
+ } ,
+ index-setup = { othercode=\footnotesize, level=\section , noclearpage } ,
+ makeindex-setup = { columns=3, columnsep=1em }
+}
+
+\def\libertine@figurestyle{LF}
+\RequirePackage{amsmath}
+\undef\lvert \undef\lVert
+\undef\rvert \undef\rVert
+\RequirePackage[libertine]{newtxmath}
+\def\libertine@figurestyle{OsF}
+
+\newpackagename\ExSheets{ExSheets}
+\newpackagename\Tasks{tasks}
+
+% ----------------------------------------------------------------------------
+% other packages, bibliography, index
+\RequirePackage{xcoffins,tikz,wasysym,enumitem,booktabs,siunitx,accsupp}
+\RequirePackage{acro}
+\DeclareAcronym{id}{
+ short = id ,
+ long = Identifier ,
+ format = \scshape ,
+ pdfstring = ID ,
+ short-acc = ID
+}
+
+\RequirePackage{csquotes}
+
+% ----------------------------------------------------------------------------
+% example definitions that have to be done in the preamble:
+\RequirePackage{xsim}
+
+\newcommand*\sample{This is some sample text we will use to create a somewhat
+ longer text spanning a few lines.}
+\newcommand*\Sample{\sample\ \sample\par\sample}
+
+\RequirePackage{fontawesome}
+\RequirePackage{datetime2}
+\DTMsetup{useregional=numeric,datesep=/}
+\newrobustcmd*\tasks@add@version[2]{%
+ \csdef{tasks@ver@#2}{%
+ \DTMdate{#1}%
+ \csgdef{tasks@ver@#2used}{}%
+ \csdef{tasks@ver@#2}{\DTMdate{#1}}%
+ }%
+}
+
+\newrobustcmd*\tasks@date[1]{%
+ \ifcsdef{tasks@ver@#1used}{}{ (\csuse{tasks@ver@#1})}}
+\newrobustcmd*\tasks@ifnew[1]{\ifcsstring{c_tasks_version_tl}{#1}}
+\newrobustcmd*\tasks@NEW{\textcolor{red}{\faStarO\ New}}
+
+\renewrobustcmd*\sinceversion[1]{%
+ \tasks@ifnew{#1}%
+ {\cnltx@version@note{\tasks@NEW}}%
+ {\cnltx@version@note{introduced in v#1\tasks@date{#1}}}%
+}
+\renewrobustcmd*\changedversion[1]{%
+ \cnltx@version@note{updated in v#1\tasks@date{#1}}%
+}
+
+\newnote*\sincechanged[2]{%
+ introduced in v#1 and updated in v#2\tasks@date{#2}%
+}
+
+\RenewDocumentEnvironment{commands}{}
+ {%
+ \cnltx@set@catcode_{12}%
+ \let\command\cnltx@command
+ \cnltxlist
+ }
+ {\endcnltxlist}
+
+\RequirePackage{tcolorbox}
+\tcbuselibrary{skins,breakable}
+\tcbset{enhanced,enhanced jigsaw}
+
+\newtcolorbox{bewareofthedog}{
+ colback = red!2!white!98 ,
+ colframe = red ,
+ underlay={%
+ \path[draw=none]
+ (interior.south west)
+ rectangle node[red]{\Huge\bfseries !}
+ ([xshift=-4mm]interior.north west);
+ }%
+}
+
+\newtcolorbox{cnltxcode}[1][]{
+ boxrule = 1pt ,
+ colback = cnltxbg ,
+ colframe = cnltx ,
+ arc = 5pt ,
+ beforeafter skip = .5\baselineskip ,%
+ #1%
+}
+
+\newcommand*\tasks@readoptions[1]{%
+ \catcode`\^^M=13
+ \tasks@read@options{#1}%
+}
+
+\begingroup
+\catcode`\^^M=13
+\gdef\tasks@read@options#1#2^^M{%
+ \ifblank{#2}{}{\tasks@read@options@#2}%
+ #1%
+ \XSIMfilewritestart*{\jobname.tmp}%
+}%
+\endgroup
+
+\def\tasks@read@options@[#1]{\pgfqkeys{/cnltx}{#1}}
+
+\RenewDocumentEnvironment{sourcecode}{}
+ {%
+ \tasks@readoptions{%
+ \setlength\cnltx@sidebysidewidth
+ {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
+ \expanded{%
+ \noexpand\lstset{
+ style=cnltx,
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {linewidth=\cnltx@sidebysidewidth,}{}%
+ \expandonce\cnltx@local@listings@options
+ }%
+ }%
+ \XSIMgobblechars{2}%
+ }%
+ }
+ {%
+ \XSIMfilewritestop
+ \cnltxcode[breakable]%
+ \lstinputlisting[style=cnltx]{\jobname.tmp}%
+ \endcnltxcode
+ }
+
+\RenewDocumentEnvironment{example}{}
+ {%
+ \tasks@readoptions{%
+ \setlength\cnltx@sidebysidewidth
+ {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
+ \expanded{%
+ \noexpand\lstset{
+ style=cnltx,
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {linewidth=\cnltx@sidebysidewidth,}{}%
+ \expandonce\cnltx@local@listings@options
+ }%
+ }%
+ \XSIMgobblechars{2}%
+ }%
+ }
+ {%
+ \XSIMfilewritestop
+ \catcode`\^^M=5
+ \ifbool{cnltx@sidebyside}
+ {%
+ \cnltxcode
+ \noindent
+ \minipage[c]{\cnltx@sidebysidewidth}%
+ \cnltx@pre@source@hook
+ \lstinputlisting[style=cnltx] {\jobname.tmp}%
+ \cnltx@after@source@hook
+ \endminipage\hfill
+ \minipage[c]{\cnltx@sidebysidewidth}%
+ \cnltx@pre@example@hook
+ \input {\jobname.tmp}%
+ \cnltx@after@example@hook
+ \endminipage
+ }
+ {%
+ \cnltxcode[breakable]%
+ \cnltx@pre@source@hook
+ \lstinputlisting{\jobname.tmp}%
+ \cnltx@after@source@hook
+ \tcblower
+ \cnltx@pre@example@hook
+ \input {\jobname.tmp}%
+ \cnltx@after@example@hook
+ }%
+ \endcnltxcode
+ }
+
+\RequirePackage[
+ backend=biber,
+ style=cnltx,
+ sortlocale=en_US,
+ indexing=cite]{biblatex}
+\RequirePackage{csquotes,varioref}
+\defbibheading{bibliography}{\section{References}}
+\addbibresource{cnltx.bib}
+
+\RequirePackage[biblatex]{embrac}
+\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
+\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
+
+\tasks@add@version{2013-01-19}{0.7}
+\tasks@add@version{2013-04-04}{0.8a}
+\tasks@add@version{2013-04-07}{0.9}
+\tasks@add@version{2013-04-22}{0.9a}
+\tasks@add@version{2013-12-03}{0.9b}
+\tasks@add@version{2014-05-11}{0.9c}
+\tasks@add@version{2014-07-20}{0.10}
+\tasks@add@version{2014-07-29}{0.10a}
+\tasks@add@version{2016-05-03}{0.11}
+\tasks@add@version{2016-05-04}{0.11a}
+\tasks@add@version{2016-08-13}{0.12}
+\tasks@add@version{2016-08-16}{0.13}
+\tasks@add@version{2019-10-04}{1.0}
+\tasks@add@version{2019-10-05}{1.0a}
+\tasks@add@version{2019-10-06}{1.0b}
+\tasks@add@version{2019-10-07}{1.0c}
+\tasks@add@version{2019-10-08}{1.0d}
+\tasks@add@version{2019-11-03}{1.1}
+\tasks@add@version{2020-01-11}{1.1a}
+\tasks@add@version{2020-03-21}{1.2}
+\tasks@add@version{2020-04-19}{1.2a}
+\tasks@add@version{2020-08-19}{1.3}
+\tasks@add@version{2021-02-20}{1.3a}
+\tasks@add@version{2022-01-08}{1.4}
+\tasks@add@version{2022-01-08}{1.4a}
+
+\endinput
diff --git a/macros/latex/contrib/tasks/tasks-manual.pdf b/macros/latex/contrib/tasks/tasks-manual.pdf
index 04cb905ba9..d4d2860320 100644
--- a/macros/latex/contrib/tasks/tasks-manual.pdf
+++ b/macros/latex/contrib/tasks/tasks-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/tasks/tasks-manual.tex b/macros/latex/contrib/tasks/tasks-manual.tex
index fa9628d79e..ad424c2d21 100644
--- a/macros/latex/contrib/tasks/tasks-manual.tex
+++ b/macros/latex/contrib/tasks/tasks-manual.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/tasks/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2013--2021 Clemens Niederberger
+% Copyright 2013--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -264,12 +264,12 @@ following ones that can be set using a setup command:
\keychoice{label-align}{left,right,center}\Default{left}
\sinceversion{0.7}Determines how the labels are aligned within the
label-box whose width is set with \option{label-width}.
- \keyval{before-skip}{skip}\Default{0pt}
- Sets the skip before the list.
- \keyval{after-skip}{skip}\Default{0pt}
- Sets the skip after the list.
- \keyval{after-item-skip}{skip}\Default{1ex plus 1ex minus 1ex}
- \sinceversion{0.9}This vertical skip is inserted between rows of items.
+ \keyval{before-skip}{skip}\Default{\cs*{topsep}}
+ \changedversion{1.4}Sets the skip before the list.
+ \keyval{after-skip}{skip}\Default{\cs*{topsep}}
+ \changedversion{1.4}Sets the skip after the list.
+ \keyval{after-item-skip}{skip}\Default{\cs*{itemsep}}
+ \changedversion{1.4}This vertical skip is inserted between rows of items.
\keybool{resume}\Default{false}
The enumeration will resume from a previous \env{tasks} environment. In
order to use this option properly you shouldn't mix different \env{tasks}
@@ -502,7 +502,7 @@ of their usage.
label-format : tokenlist ,
label-width : length = 1em ,
label-offset : length = .3333em ,
- after-item-skip : skip = 1ex plus 1ex minus 1ex
+ after-item-skip : skip = \itemsep
}
\end{sourcecode}
@@ -522,7 +522,6 @@ This is rather brief this time:
{ label = \arabic*. }
\end{sourcecode}
-\clearpage
\printbibliography
\end{document}
diff --git a/macros/latex/contrib/tasks/tasks.cfg b/macros/latex/contrib/tasks/tasks.cfg
index 4bba318747..e53bf69ee6 100644
--- a/macros/latex/contrib/tasks/tasks.cfg
+++ b/macros/latex/contrib/tasks/tasks.cfg
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/tasks/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2013--2021 Clemens Niederberger
+% Copyright 2013--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tasks/tasks.sty b/macros/latex/contrib/tasks/tasks.sty
index 60dd49a4a5..a82a682c29 100644
--- a/macros/latex/contrib/tasks/tasks.sty
+++ b/macros/latex/contrib/tasks/tasks.sty
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/tasks/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2013--2021 Clemens Niederberger
+% Copyright 2013--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -28,9 +28,9 @@
\RequirePackage {expl3,xparse,xtemplate}
\ExplSyntaxOn
-\tl_const:Nn \c_tasks_date_tl {2021/02/20}
+\tl_const:Nn \c_tasks_date_tl {2022/01/08}
\tl_const:Nn \c_tasks_version_major_number_tl {1}
-\tl_const:Nn \c_tasks_version_minor_number_tl {3}
+\tl_const:Nn \c_tasks_version_minor_number_tl {4}
\tl_const:Nn \c_tasks_version_subrelease_tl {a}
\tl_const:Nx \c_tasks_version_number_tl
{
@@ -401,8 +401,8 @@
\cs_new_protected:Npn \__tasks_setup:
{
\dim_set:Nn \parskip {0pt}
- \skip_set:Nn \parfillskip {0pt plus 1fil}
- \dim_set_eq:NN \parskip \parsep
+ % \skip_set:Nn \parfillskip {0pt plus 1fil}
+ % \dim_set_eq:NN \parskip \parsep
\dim_set_eq:NN \parindent \listparindent
\noindent
\strut
@@ -458,7 +458,7 @@
label-width : length = 11pt ,
label-offset : length = .3333em ,
item-format : tokenlist ,
- after-item-skip : skip = 1ex plus 1ex minus 1ex
+ after-item-skip : skip = \itemsep
}
% the `default' template code:
@@ -685,10 +685,13 @@
\bool_set_true:N \l__tasks_item_indent_bool ,
column-sep .dim_set:N = \l__tasks_column_sep_dim ,
before-skip .skip_set:N = \l__tasks_before_list_skip ,
+ before-skip .initial:n = \topsep ,
after-skip .skip_set:N = \l__tasks_after_list_skip ,
+ after-skip .initial:n = \topsep ,
after-item-skip .code:n =
\bool_set_true:N \l__tasks_custom_after_item_skip_bool
\skip_set:Nn \l__tasks_custom_after_item_skip {#1} ,
+ after-item-skip .initial:n = \itemsep ,
resume .bool_set:N = \l__tasks_resume_bool ,
start .int_set:N = \l__tasks_start_int ,
start .initial:n = 1
@@ -712,18 +715,22 @@
}
\keys_set:nn {tasks/list} {#2}
\dim_compare:nNnF { \l__tasks_before_list_skip } = {0pt}
- { \vspace {\l__tasks_before_list_skip} }
+ { \par\addvspace {\l__tasks_before_list_skip} }
\list {}
{
\dim_set:Nn \leftmargin {0pt}
\dim_set:Nn \rightmargin {0pt}
+ \dim_set:Nn \parsep {0pt}
+ \dim_set:Nn \partopsep {0pt}
+ \dim_set:Nn \topsep {0pt}
+ \dim_set:Nn \itemsep {0pt}
}
\item \scan_stop:
\dim_set:Nn \l__tasks_full_width_dim { \linewidth }
\tasks_environment:Vnnn \l__tasks_instance_tl {#3} {#1} {#4}
\endlist
\dim_compare:nNnF { \l__tasks_after_list_skip } = {0pt}
- { \vspace {\l__tasks_after_list_skip} }
+ { \addvspace {\l__tasks_after_list_skip} }
}
% --------------------------------------------------------------------------
@@ -886,3 +893,6 @@
2020/05/11 v1.2b - options are set to late for `before-skip' -- fixed
2020/08/19 v1.3 - add `ref' option
2021/02/20 v1.3a - fix issue #23
+2022/01/08 v1.4 - fix issue #27
+2022/01/08 v1.4a - change \vspace into \addvspace so that consecutive lists don't add
+ their vertical seps, see https://tex.stackexchange.com/q/222973/