summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-16 03:18:07 +0000
committerNorbert Preining <norbert@preining.info>2020-02-16 03:18:07 +0000
commit7b19cae701283a0c7c6cb760c3b28ba912abdaea (patch)
tree26ae38aa8a3bfa79c400ab474d890b5b65b56885 /macros/latex/contrib
parent6e362e815ea119b3f6db97b21c10fee3279b5c6b (diff)
CTAN sync 202002160318
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/euclideangeometry/README.txt2
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdfbin559270 -> 556684 bytes
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex398
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry.dtx2
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry.pdfbin410913 -> 411051 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/README.md27
-rw-r--r--macros/latex/contrib/hitszthesis/figure/3angle.pngbin0 -> 70797 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/3grasp.pngbin0 -> 149872 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/3posoreest.pngbin0 -> 170786 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/3rfcn.pngbin0 -> 101012 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/figmutihopcomplex.pngbin0 -> 24205 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/flowchart.pngbin0 -> 31527 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/less1.jpgbin0 -> 10369 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/less2.jpgbin0 -> 6321 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/figure/less3.jpgbin0 -> 29884 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/front/HITSZname.jpgbin0 -> 84547 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/front/thesistitle.eps335
-rw-r--r--macros/latex/contrib/hitszthesis/hitszthesis.cls822
-rw-r--r--macros/latex/contrib/hitszthesis/hitszthesis.pdfbin0 -> 894116 bytes
-rw-r--r--macros/latex/contrib/hitszthesis/hitszthesis.tex615
-rw-r--r--macros/latex/contrib/sdaps/README3
-rw-r--r--macros/latex/contrib/sdaps/sdapsarray.dtx63
-rw-r--r--macros/latex/contrib/sdaps/sdapsarray.ins8
-rw-r--r--macros/latex/contrib/sdaps/sdapsarray.pdfbin191217 -> 192001 bytes
-rw-r--r--macros/latex/contrib/sdaps/sdapsbase.dtx24
-rw-r--r--macros/latex/contrib/sdaps/sdapsbase.ins8
-rw-r--r--macros/latex/contrib/sdaps/sdapsbase.pdfbin202251 -> 202996 bytes
-rw-r--r--macros/latex/contrib/sdaps/sdapsclassic.dtx122
-rw-r--r--macros/latex/contrib/sdaps/sdapsclassic.ins8
-rw-r--r--macros/latex/contrib/sdaps/sdapsclassic.pdfbin173223 -> 174774 bytes
-rw-r--r--macros/latex/contrib/sdaps/sdapslayout.dtx74
-rw-r--r--macros/latex/contrib/sdaps/sdapslayout.ins8
-rw-r--r--macros/latex/contrib/sdaps/sdapslayout.pdfbin287460 -> 286999 bytes
-rw-r--r--macros/latex/contrib/sdaps/sdapspdf.dtx6
-rw-r--r--macros/latex/contrib/sdaps/sdapspdf.ins8
-rw-r--r--macros/latex/contrib/sdaps/sdapspdf.pdfbin144888 -> 144993 bytes
36 files changed, 2190 insertions, 343 deletions
diff --git a/macros/latex/contrib/euclideangeometry/README.txt b/macros/latex/contrib/euclideangeometry/README.txt
index 300e9c9f93..6402a6e9ff 100644
--- a/macros/latex/contrib/euclideangeometry/README.txt
+++ b/macros/latex/contrib/euclideangeometry/README.txt
@@ -10,7 +10,7 @@
%% License information appended
%%
File README.txt for package euclideangeometry
- [2020-02-11 v.0.1.4 Extension package for curve2e]
+ [2020-02-12 v.0.1.5 Extension package for curve2e]
The package bundle euclideangeometry is composed of the following files
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf
index 593310a47f..d36d79326e 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
index 01ee2978b3..4c09bb6025 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
@@ -1,7 +1,7 @@
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = pdflatex
-\documentclass[11pt,titlepage]{article}\errorcontextlines=100
+\documentclass[11pt,titlepage,a4paper]{article}\errorcontextlines=100
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
@@ -101,9 +101,30 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\newwrite\example@out
\newlength\Wboxu \newlength\Wboxd
-\DeclareDocumentEnvironment{Esempio}{ O{\normalsize} D(){0.40}}
+% Attention!
+%
+% This is the latest version of the Esempio/Example environment
+% It differs from the previous versions because it accepts an optional
+% first argument asterisk; if the asterisk is not specified, the
+% environment produces the code and the typeset result side by side.
+% If the asterisk is specified, the code is typeset first, and its typeset
+% result is shown below the code.
+% Very handy when the typeset result cannot be shrunk too much and/or
+% when the code is really lengthy possibly with lines that are quite long.
+% With reasonably short codes and lines that can be folded, the code font
+% size can be specified even with a fractional size; obviously, the
+% default value is \normalsize, but, if necessary, it can be specified with
+% something such as [\setfontsize{8,25}] (if the unit of measure is not
+% specified, pt is assumed; otherwise it is possible to specify something
+% such as 2.33mm).
+% When the asterisk is NOT specified, the \textwidth fraction for the
+% code may be specified: default is (0.40); the remaining fraction minus
+% \columnsep is used for the code typeset result.
+%
+\newwrite\example@out
+\DeclareDocumentEnvironment{Esempio}{s O{\normalsize} D(){0.40}}
{\par\addvspace{3.0ex plus 0.8ex minus 0.5ex}\vskip -\parskip
-\Wboxu=#2\textwidth\relax
+\Wboxu=#3\textwidth\relax
\Wboxd=\dimexpr\linewidth-\columnsep-\Wboxu\relax
\begingroup
\@bsphack
@@ -113,23 +134,19 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\immediate\write\example@out{\the\verbatim@line}}%
\verbatim@start\relax}%
{\immediate\closeout\example@out\@esphack\endgroup
-\begin{lrbox}{0}%
\begin{minipage}{\textwidth}%
-\begin{minipage}{\Wboxu}%
-#1\relax
+\IfBooleanTF{#1}{\begin{minipage}{\textwidth}}{\begin{minipage}{\Wboxu}}%
+#2\relax
\verbatiminput{\jobname-temp.tex}
\end{minipage}%
-\hfill
-\begin{minipage}{\Wboxd}\raggedleft
-\input{\jobname-temp}%
+\IfBooleanTF{#1}{\par\bigskip}{\hfill}%
+\IfBooleanTF{#1}{\begin{minipage}{\textwidth}}{\begin{minipage}{\Wboxd}}%
+\raggedleft
+\input{\jobname-temp}
\end{minipage}
-\end{minipage}%
-\end{lrbox}%
-
-\medskip
-\noindent\makebox[\textwidth]{\box0}%
-\par\addvspace{3.0ex plus 0.8ex minus 0.5ex}\vskip -\parskip
+\end{minipage}\par
}
+
\makeatother
\newenvironment{ttsintassi}{\begin{lrbox}{0}
@@ -173,22 +190,21 @@ Version \fileversion\ of \filedate
kernel source file.
The \pack{curve2e} package was upgraded a the beginning of 2020; the
- material
- of this new package, might have been included in the former one, but is
- is sospecific, that we preferred defining a standalone one; this package
- takes care of requesting the packages it depends from.
+ material of this new package, might have been included in the former one,
+ but it is so specific, that we preferred defining a standalone one; this
+ package takes care of requesting the packages it depends from.
The purpose is to provide the tools to draw most of the geometrical
constructions that a high school instructor or bachelor degree professor
- might need to teach geometry. The connection to Euclide depends on the
- fact that in its times calculations were made with ruler, compass, and,
- apparently, also with ellipsograph,
+ might need in order to teach geometry. The connection to Euclide depends
+ on the fact that in its times calculations were made with ruler, compass,
+ and, apparently, also with ellipsograph.
The user of this package has available all the machinery provided by
- the \pack{pict2e} and \pack{curve2e} packages, in order to define new functionalities
- and build macros that draw the necessary lines, circles, and other such
- objects, as they would have done in the ancient times. Actually just one
- macro is programmed to solve a linear system of equations
+ the \pack{pict2e} and \pack{curve2e} packages, in order to define new
+ functionalities and build macros that draw the necessary lines, circles,
+ and other such objects, as they would have done in the ancient times.
+ Actually just one macro is programmed to solve a linear system of equations
\end{abstract}
\tableofcontents
@@ -207,36 +223,36 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
that allowed to draw very simple line graphics with many limitations.
When \LaTeX was upgraded from \LaTeX\!2.09 to \LaTeXe in 1994, Leslie
Lamport announced an upgrade that eventually became available in 2003
- with package \pack{pict2e}; in 2006 I wrote the \pack{curve2e} package that added
- many more functionalities; both packages were upgraded during these
- years; and now line graphics with the \env{picture} environment can perform
- pretty well. The package \pack{euclideangeometry} adds even more specific
- functionalities in order to produce geometric drawings as they were
- possible in the old times, when calculus and analytic geometry were
- not available.
+ with package \pack{pict2e}; in 2006 I wrote the \pack{curve2e} package
+ that added many more functionalities; both packages were upgraded during
+ these years; and now line graphics with the \env{picture} environment
+ can perform pretty well. The package \pack{euclideangeometry} adds even
+ more specific functionalities in order to produce geometric drawings as
+ they were possible in the old times, when calculus and analytic geometry
+ were not available.
In these years other drawing programs were made available to the \TeX
- community; \pack{PSTricks} and \pack{TikZ} are the most known ones, but there are
- other less known packages, that perform very well; among the latter
- I would like to mention \pack{xpicture}, that relies on \pack{pict2e} and
- \pack{curve2e}, but extends the functionalities with a very smart handling
- of coordinate systems, that allow to draw many line drawings suitable
- for teaching geometry in high schools and introductory courses in the
- university bachelor degree programs.
+ community; \pack{PSTricks} and \pack{TikZ} are the most known ones, but
+ there are other less known packages, that perform very well; among the
+ latter I would like to mention \pack{xpicture}, that relies on
+ \pack{pict2e} and \pack{curve2e}, but extends the functionalities with a
+ very smart handling of coordinate systems, that allow to draw many line
+ drawings suitable for teaching geometry in high schools and introductory
+ courses in the university bachelor degree programs.
- This package \pack{euclideangeomery} in a certain way follows the same
- path of \pack{xpicture} but it avoids defining a new user language
+ This package \pack{euclideangeomery} apparently follows the same
+ path of \pack{xpicture}, but it avoids defining a new user language
interface; rather it builds new macros by using the same philosophy of
the recent \pack{curve2e} package.
It is worth mentioning that now \pack{curve2e} accepts coordinates in both
cartesian and polar form; it allows to identify specific points of the
drawing with macros, so the same macro can be used over and over again to
- address the same points.The package can draw lines, vectors, arcs
+ address the same points. The package can draw lines, vectors, arcs
with no arrow tips, or with one arrow tip, or with arrow tips at both ends,
arcs included. The macros for drawing poly lines, polygons, circles,
generic curves (by means of Bézier cubic or quadratic splines) are
- already available; such facilities are well documented and exemplified
+ already available; such facilities are documented and exemplified
in the user manual of \pack{curve2e} package.
In what follows there will be several figures drawn with this package;
@@ -245,7 +261,7 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
understand the position of the various drawings on the picture canvas.
This grid is useful also to the end user, while s/he is working on a
particular drawing, but when the drawing is finished, the user can
- delete the grid command or comment ot that line of code.
+ delete the grid command or comment out that line of code.
For what regards the commands used to render the images, their codes can
be found in the documented code file \pack{euclideangeometry.pdf}.
@@ -257,18 +273,20 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
installation, otherwise this package won't work; this means that
you have done your updating after 2020-01-18. And this package is already
present in any modern updated complete installation of the \TeX system.
- Nevertheless the package will load \pack{curve2e} with the wrong version
- and file date, but this package will abort its own loading.
+ Otherwise the package will load \pack{curve2e} with an old version
+ and file date, and this package will abort its own loading, besides
+ aborting the whole job.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Loading \pack{euclideangeometry}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- If you want to use the \pack{euclideangeometry} package, we suggest you load it with the following command:
+ If you want to use the \pack{euclideangeometry} package, we suggest you
+ load it with the following command:
\begin{flushleft}\obeylines
\cs{usepackage}\oarg{options}\Marg{euclideangeomery}
\end{flushleft}
The package will take care of managing the possible \meta{options}
- and to call \pack{curve2e} with the specified options; on turn
+ and to call \pack{curve2e} with the such specified options; on turn
\pack{curve2e} calls \pack{pict2e} passing on the \meta{options}; such
\meta{options} are only those usable by \pack{pict2e} because neither
\pack{curve2e} nor \pack{euclideangeometry} use any option. If the
@@ -341,31 +359,31 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
command to put the segment in place; nevertheless it can be shifted
somewhere else with \cs{put} if it becomes necessary.
-\item the new command \cs{polyline} draws a sequence of connected
+\item The new command \cs{polyline} draws a sequence of connected
segments that form a piecewise linear “curve”; the way segments are
joined to one another depend from the “join” specifiers that
\pack{pict2e} has introduced; they will be described further on.
\item \cs{polygon} and \cs{polygon*} produce closed paths as it would
be possible when using \cs{polyline} and specifying the last point
- coincident with the first point of that curve. The closed path is
- filled with the default color if the asterisk is used.
+ coincident with the first point of that curve. If the asterisk is used
+ the closed path is filled with the default color.
\end{enumerate}
There were also the low level commands user interfaces to the various
drivers; these drivers really exist, but \pack{pict2e}
knows how to detect the correct language of the necessary drive;
the user is therefore allowed to pretend to ignore the existence
- of such drivers; s/he can simply use these commands; their names are
- almost self explanatory.
+ of such drivers, and s/he can simply use these low level commands; their
+ names are almost self explanatory.
\begin{enumerate}[noitemsep]
-\item \cs{moveto} Sets the start of a line tracing to an initial point.
+\item \cs{moveto} Sets the start of a line to an initial point.
\item \cs{lineto} traces a segment up to a specified point.
-\item \cs{curveto} traces a third degree Bézier up to the third specified
- point, while using the other two ones as control points.\footnote{If
- these terms are unfamiliar, please read the \pack{pict2e} documentation.}
+\item \cs{curveto} traces a third degree Bézier spline up to the third
+ specified point, while using the other two ones as control
+ points.\footnote{If these terms are unfamiliar, please read the \pack{pict2e} documentation.}
\item \cs{circlearc} traces a circumference arc from the last line
point to a specified destination; its center, its angle amplitude, its
@@ -375,8 +393,8 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\item[]\mbox{\bfseries Attention!} Notice that these commands produce
just information to trace lines, but by themselves they do not trace
anything; in order to actually trace the curve or do other operations
- with what has been done after the user finished describing the line to
- trace, the following low level commands must be used.
+ with what has been done after the user finished describing the line to be
+ traced, the following low level commands must be used.
\item A \cs{closepath} is necessary if it is desired to
join the last position to the initial one. But if the last point
@@ -385,7 +403,7 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\item If a \cs{strokepath} command is used the line is drawn.
-\item If a \cs{fillpath} command is used, the line loop is filled by
+\item If a \cs{fillpath} command is used, the line loop is filled with
the current color. Notice, if the described line is not a closed loop,
this filling command acts as if the line first point and last point were
joined by a straight line.
@@ -405,7 +423,7 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\item \cs{roundcap} adds a semicircle to the very end of each line.
-\item \cs{squarecap} adds the half square to the very end of each line.
+\item \cs{squarecap} adds a half square to the very end of each line.
\item \cs{miterjoin} joins two (generally straight) lines with a miter
(or mitre) joint; this means that the borders of the line are prolonged
@@ -414,7 +432,7 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
type of joint is the default.
\item \cs{roundjoin} joins each (generally straight) line with
- a \cs{roundcap}; it is good in most circumstances.
+ an arc on the external part of the bend; it is good in most circumstances.
\item \cs{beveljoin} joins two (generally straight) lines with a miter
joint truncated with a sharp cut perpendicular to the bisector of the
@@ -430,7 +448,8 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
drawing and the \pack{pic2e} extensions can consult that package
documentation. Actually all commands have been redefined or modified
by \pack{curve2e} in order to render them at least compatible with
- both the cartesian and polar coordinates. In oder to have a better understanding of these details, see figure~\ref{fig:joins}\footnote{The \cs{polyline} macro has the default join of type bevel; remember to specify a different join type if you want a different one.}.
+ both the cartesian and polar coordinates. In oder to have a better
+ understanding of these details, see figure~\ref{fig:joins}\footnote{The \cs{polyline} macro has the default join of type bevel; remember to specify a different join type if you want a different one.}.
\begin{figure}[!htb] \centering
\makebox[\textwidth]{\unitlength=0.009\textwidth
@@ -498,10 +517,10 @@ z_1 z_2 &=( m_1 m_2) \eu^{\iu(\phi_1 + \phi_2)} \\
z_1/z_2 &=( m_1/m_2) \eu^{\iu(\phi_1 - \phi_2)}
\end{align*}
Squares and square roots\footnote{The square root of a complex number
- has two values; here we do not go into the details on how \pack{curve2e}
- choses one or the other value. In practice, the \pack{curve2e} macros
- that use square roots, work mostly on scalars to find magnitudes that
- are always positive.} are simply done with:
+ has two complex values; here we do not go into the details on how
+ \pack{curve2e} choses one or the other value. In practice, the
+ \pack{curve2e} macros that use square roots, work mostly on scalars to
+ find magnitudes that are always positive.} are simply done with:
\begin{align*}
z^2 &= m^2\eu^{\iu 2\phi}\\
\sqrt{z} &= \sqrt{m}\eu^{\iu\phi/2}
@@ -519,7 +538,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
generally be introduced with point macros, as well as numerical
coordinates (no matter if cartesian and polar ones) while
the output(s) should always be in form of point macro(s). Parentheses
- for delimiting the ordered couples or the point macros are seldom
+ for delimiting the ordered pairs or the point macros are seldom
required. On the other side, the variety of multiple optional
arguments, sometimes requires the use of different delimiters,
most often than not the signs~\texttt{<~>}, in addition to the
@@ -533,10 +552,10 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
%
\item Cartesian and polar coordinates; they are distinguished by
their separator; cartesian coordinates are the usual comma separated
- couple \meta{$x,y$}; polar coordinates are specified with a colon
- separated couple \meta{$\theta{:}\,\rho$}. In general they are
+ pair \meta{$x,y$}; polar coordinates are specified with a colon
+ separated pair \meta{$\theta{:}\,\rho$}. In general they are
specified within parentheses, but some commands require them without
- any parentheses. In what follows a generic math symbol, such as for
+ any parenthesis. In what follows a generic math symbol, such as for
example $P_1$, is used to indicate a complex number that addresses
a particular point, irrespective of the chosen coordinate type,
or a macro defined to contain those coordinates.
@@ -545,45 +564,45 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\pack{curve2e} are the following; we specify “macro” because in general
macros are used, instead of explicit numerical values, but for input
vector macros it is possible to use the comma or colon separated ordered
- couple; “versor” means “unit vector”; angles are always expressed in
+ pair; “versor” means “unit vector”; angles are always expressed in
degrees; output quantities are everything follows the key word
\texttt{to}; output quantities are alway supposed to be in the form
of control sequences.
\begin{itemize}\small
\item \cs{MakeVectorFrom}\meta{number,number}\meta{numeric macro} to\meta{vector macro}
-\item \cs{CopyVect}\meta{vector macro} to\meta{vector macro}
-\item \cs{ModOfVect}\meta{vector macro} to\meta{modulus macro}
-\item \cs{DirOfVect}\meta{vector macro} to\meta{versor macro}
-\item \cs{ModAndDirOfVect}\meta{vector macro} to\meta{modulus macro}
- and\meta{versor macro}
-\item \cs{ModAndAngleOfVect}\meta{vector macro} to \meta{modulus macro}
+\item \cs{CopyVect}\meta{vector macro} \texttt{to}\meta{vector macro}
+\item \cs{ModOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro}
+\item \cs{DirOfVect}\meta{vector macro} \texttt{to}\meta{versor macro}
+\item \cs{ModAndDirOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro}
+ \texttt{and}\meta{versor macro}
+\item \cs{ModAndAngleOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro}
and\meta{angle macro}
\item \cs{DistanceAndDirOfVect}\meta{1st vector macro}
- minus\meta{2nd vector macro} to\meta{distance macro}
- and\meta{versor macro}
-\item \cs{XpartOfVect}\meta{vector macro} to\meta{numerical macro}
-\item \cs{YpartOfVect}\meta{vector macro} to\meta{numerical macro}
-\item \cs{DirFromAngle}\meta{angle macro} to\meta{versor macro}
-\item \cs{ArgOfVect}\meta{vector macro} to\meta{angle macro}
-\item \cs{ScaleVect}\meta{vector macro} by\meta{scale factor}
- to\meta{vector macro}
+ \texttt{minus}\meta{2nd vector macro} \texttt{to}\meta{distance macro}
+ \texttt{and}\meta{versor macro}
+\item \cs{XpartOfVect}\meta{vector macro} \texttt{to}\meta{numerical macro}
+\item \cs{YpartOfVect}\meta{vector macro} \texttt{to}\meta{numerical macro}
+\item \cs{DirFromAngle}\meta{angle macro} \texttt{to}\meta{versor macro}
+\item \cs{ArgOfVect}\meta{vector macro} \texttt{to}\meta{angle macro}
+\item \cs{ScaleVect}\meta{vector macro} \texttt{by}\meta{scale factor}
+ \texttt{to}\meta{vector macro}
\item \cs{ConjVect}\meta{vector macro} to\meta{conjugate vector macro}
-\item \cs{SubVect}\meta{subtrahend vector} from\meta{minuend vector}
- to\meta{vector macro}
-\item \cs{AddVect}\meta{1st vector} and\meta{2nd vector}
- to\meta{vector macro}
+\item \cs{SubVect}\meta{subtrahend vector} \texttt{from}\meta{minuend vector}
+ \texttt{to}\meta{vector macro}
+\item \cs{AddVect}\meta{1st vector} \texttt{and}\meta{2nd vector}
+ \texttt{to}\meta{vector macro}
\item \cs{Multvect}\marg{1st vector}\meta{$\star$}\marg{2nd vector}\meta{$
\star$}\meta{output vector macro}\newline the asterisks are optional;
either one changes the \meta{2nd vector} into its complex conjugate
\item \cs{MultVect}\meta{1st vector}\meta{$\star$}\meta{2nd vector}
- to\meta{vector macro}\newline discouraged; maintained for backward
+ \texttt{to}\meta{vector macro}\newline discouraged; maintained for backward
compatibility; the only optional asterisk changes the \meta{2nd vector}
into its complex conjugate
\item \cs{Divvect}\marg{dividend vector}\marg{divisor vector}\marg{output
vector macro}
-\item \cs{DivVect}\meta{dividend vector}\meta{divisor vector}
- to\meta{vector macro}\newline maintained for backwards
- compatibility
+\item \cs{DivVect}\meta{dividend vector} \texttt{by}\meta{divisor vector}
+ \texttt{to}\meta{vector macro}\newline maintained for backwards
+ compatibility.
\end{itemize}
\item A new command \cs{segment}\parg{$P_1$}\parg{$P_2$} draws a line that
@@ -592,7 +611,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item Command \cs{Dashline}\parg{$P_1$}\parg{$P_2$}\marg{dash length}
draws a dashed line between the specified points; the
\meta{dash length} is specified as a coefficient of
- \cs{unitlenth} so they are proportioned to the diagram scale. The gap
+ \cs{unitlenth} so it is a proportioned to the diagram scale. The gap
between dashes is just as wide as the dashes; they are recomputed by
the command in order to slightly adjust the \meta{dash length} so
that the line starts at point $P_1$ with a dash, and ends at $P_2$
@@ -614,7 +633,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item New commands \cs{Arc}\parg{center}\parg{start}\marg{angle} and,
with the same syntax, \cs{VectorArc} and \cs{VectorARC} draw
- arcs without or with arrow tip(s), with the specified \meta{center},
+ arcs with the specified \meta{center},
starting at point \meta{start}, with an aperture of \meta{angle}
degrees (not radians). \cs{Arc} draws the arc without arrow tips;
\cs{VectorArc} draws the arc with one arrow tip at the end point;
@@ -703,7 +722,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item The new command \cs{Curve} joins a sequence of third order
splines by simply specifying the node-direction coordinates; i.e. at the
junction of two consecutive splines, in a certain interpolation node the
- final previous spline tangent has the same direction of the tangent
+ final previous spline tangent has the same direction as that
at the second spline first node; if a change of direction is required, an
optional new direction can be specified. Therefore this triplet of
information has the following syntax:
@@ -718,17 +737,17 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\end{flushleft}
where \meta{start} is the spline starting “looseness” and \meta{end}
is the spline ending one. These (generally different) values
- are an index of how far is the control point from the adjacent node.
+ are an index of how far the control point is from the adjacent node.
With this functionality the user has a very good control on the curve
shape and curvature.
\item A similar command \cs{Qurve} works almost the same way, but it
traces a quadratic Bézier spline; this one is specified only with two
nodes an a single control point, therefore is less configurable than
- cubic splines; the same final line requires several quadratic splines
+ cubic splines; the same final line may require several quadratic splines
when just a single cubic spline might do the same job. Notice also that
- quadratic splines are just parabolic arcs, therefore without inflections,
- while a cubic spline can have one inflexion.
+ quadratic splines are just parabolic arcs, therefore without inflection
+ points, while a cubic spline can have one inflexion point.
\item A further advanced variation is obtained with the new
\cs{CurveBetween} command that creates a single cubic spline between two
@@ -757,8 +776,8 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
that kind of geometry that was used in the ancient times when
mathematicians did not have available the sophisticated means they
have today; they did not even have a positional numerical notation, that
- arrived in the “west” of the world we are familiar with, just by
- the XI-XII century; before replacing the roman numbering system another
+ arrived in the “western world” we are familiar with, just by
+ the XI-XII century; before replacing the roman numbering system, another
couple of centuries passed by; real numbers with the notation we use
today with a decimal separator, had to wait till the XVI century (at
least); many things that naw are taught in elementary school were
@@ -789,7 +808,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
one the \emph{golden section}.
Luca Pacioli, by the turn of centuries XV–XVI, was the tutor of
- Guidubaldo, the heir of Federico di Montefeltro, Duke of
+ Guidubaldo, the son and heir of Federico di Montefeltro, Duke of
Urbino\footnote{If you never visited this Renaissance city and its Ducal
Palace, consider visiting it; it is one of the many UNESCO Heritage
places.}; he wrote the famous book \emph{De Diuina Proportione} that
@@ -836,7 +855,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
Mathematicians in the classical times B.C. up to the artists in the
Renaissance, had no other means but to use geometrical constructions with
ruler and compass. Even today in schools where calculus is not yet
- taught as a normal subject, possibly not in certainly high school degree
+ taught as a normal subject, possibly not in certainly high school degree
courses, but certainly not in elementary and junior high schools, the
instructors have to recourse to geometrical constructions. Sometimes, as
in Italy, access to public universities is open with no restrictions to
@@ -847,7 +866,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
education.
The instructors nowadays very often prepare some booklets with their
- lessons; such documents, especially in electronic form, are a nice help
+ lessons; such documents, especially in electronic form, are a good help
for many students. And \LaTeX is used to write such documents.
Therefore this extension module is mostly dedicated to such instructors.
@@ -861,9 +880,10 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\begin{enumerate}[noitemsep]
\item Command \cs{IntersectionOfLines} is a fundamental one; its syntax is
the following:
-\begin{ttsintassi}
-\cs{IntersecionOfLines}\parg{point1}\parg{dir1} and\parg{point2}\parg{dir2} to\meta{vector}
-\end{ttsintassi}
+\begin{ttsyntax}
+\cs{IntersecionOfLines}\parg{point1}\parg{dir1} and\parg{point2}\parg{dir2}
+\qquad to\meta{vector}
+\end{ttsyntax}
were each line is identified with its \meta{point} and its direction
\meta{dir}; the intersection coordinates go to the output \meta{vector}.
@@ -871,44 +891,44 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
work, but the coordinates of a segment define also its direction,
which is the argument of the difference of the terminal nodes of each
segment; the syntax therefore is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{IntersectionOfSegments}\parg{point11}\parg{point12}
- and\parg{point21}\parg{point22}to\meta{vector}
-\end{ttsintassi}
+\qquad and\parg{point21}\parg{point22}to\meta{vector}
+\end{ttsyntax}
Again the intersection point coordinates go to the output \meta{vector}.
The first segment is between points 11 and 12, and, similarly, the second
segment is between points 21 and 22.
\item Command \cs{ThreePointCircle} draws a circle that goes through three
given points; the syntax is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{ThreePointCircle}\meta{$\star$}\parg{point1}\parg{point2}\parg{point3}
-\end{ttsintassi}
+\end{ttsyntax}
A sub product of this macro is formed by the vector \cs{C} that contains
the coordinates of the center of the circle, that might be useful even
if the circle is not drawn; the optional asterisk, if present, does not
draw the circle, but the center is available.
\item Alternatively
-\begin{ttsintassi}
+\begin{ttsyntax}\setfontsize{10.5}
\cs{ThreePointCircleCenter}\parg{point1}\parg{point2}\parg{point3}to\meta{vector}
-\end{ttsintassi}
+\end{ttsyntax}
computes the three point circle center assigning its coordinates to
\meta{vector}.
\item Command \cs{CircleWithCenter} draws a circle given its center and it
radius; in facts the syntax is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{CircleWithCenter}\meta{center} Radius\meta{Radius}
-\end{ttsintassi}
+\end{ttsyntax}
This macro does not require the \cs{put} command to put the circle
in place.
\item A similar macro \cs{Circlewithcenter} does almost the same; its
syntax is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{Circlewithcenter}\meta{center} radius\meta{radius}
-\end{ttsintassi}
+\end{ttsyntax}
Apparently these two commands do the same, but, no, they behave
differently: in the former command the \meta{Radius} is a vector the
modulus of which si computed and used as the radius; in the latter
@@ -916,19 +936,19 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
used.
\item Command with syntax:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{AxisOf}\meta{point1} and\meta{point2} to \meta{point3} and\meta{point4}
-\end{ttsintassi}
+\end{ttsyntax}
is used to determine the axis of a segment; the given
segment is specified with its end points \meta{point1} and \meta{point2}
and the axis is determined by point \meta{point3} and \meta{point4};
actually \meta{point3} is the middle point of the given segment.
\item These two commands with syntax:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{SegmentCenter}\parg{point1}\parg{point2}to\meta{center}
\cs{MiddlePointOf}\parg{point1}\parg{point2}to\meta{center}
-\end{ttsintassi}
+\end{ttsyntax}
determine just the middle point between two given points. They are
totally equivalent, aliases to one another; sometimes it is more
convenient to use a name, sometimes the other; it helps reading the
@@ -938,53 +958,53 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
the middle point of the opposite side; it is not very difficult, but it
is very handy to have all the necessary elements to draw the median line.
The simple syntax is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{TriangleMedianBase}\meta{vertex} on\meta{base1} and\meta{base2}
\qquad to\meta{base middle point}
-\end{ttsintassi}
+\end{ttsyntax}
\item A similar command \cs{TriangleHeightBase} is used to determine the
intersection of the height segment from one vertex to the opposite base;
with triangles that have an obtuse angle, the height base might lay
externally to one of the bases adjacent to such an angle. The syntax is
the following
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{TriangleHeigthtBase}\meta{vertex} on\meta{base1} and\meta{base2} to\meta{height base}
-\end{ttsintassi}
+\end{ttsyntax}
\item Similarly there is the \cs{TriangleBisectorBase} macro with
a similar syntax:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{TriangleBisectorBase}\meta{vertex} on\meta{base1} and\meta{base2}
\qquad to\meta{bisector base}
-\end{ttsintassi}
+\end{ttsyntax}
\item A triangle \emph{barycenter} is the point where its median lines
intersect; command \cs{TriangleBarycenter} determines its coordinates
with the following syntax.
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{TriangleBarycenter}\parg{vertex1}\parg{vertex2}\parg{vertex3} to\meta{barycenter}
-\end{ttsintassi}
+\end{ttsyntax}
\item A triangle \emph{orthocenter} is the point where its height lines
intersect; command \cs{TriangleOrthocenter} determines its coordinates
with the following syntax:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{TriangleOrthocenter}\parg{vertex1}\parg{vertex2}\parg{vertex3} to\meta{orthocenter}
-\end{ttsintassi}
+\end{ttsyntax}
\item A triangle \emph{incenter} is the point where its bisector lines
intersect; command \cs{TriangleIncenter} determines its coordinates
with the following syntax:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{TriangleIncenter}\parg{vertex1}\parg{vertex2}\parg{vertex3} to\meta{incenter}
-\end{ttsintassi}
+\end{ttsyntax}
\item The distance of a specified point from a given segment or line is
computed with the following command
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{DistanceOfPoint}\meta{point} from\parg{point1}\parg{point2} to\meta{distance}
-\end{ttsintassi}
+\end{ttsyntax}
where \meta{point} specifies the point and \meta{point1} and \meta{point2}
identify two points on a segment or a line; \meta{distance} is a scalar
value.
@@ -999,10 +1019,10 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
otherwise the user should pay attention to use as the first entry the
smaller among $b$ and $c$, so as to compute a Pitagorean sum. The command
is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{AxisFromAxisAndFocus}\meta{axis or focus} and\meta{focus or axis}
\qquad to\meta{other axis or focus}
-\end{ttsintassi}
+\end{ttsyntax}
The word “axis” stands for “semi axis length”; the word “focus" stands
for “focal semi distance”; actually the macro works equally well with
full lengths, instead of half lengths; its is important not to mix
@@ -1018,23 +1038,23 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
compute modulus and argument of a vector, but consists in computing such
quantities from the difference of the vectors pointing to the segment
end points. These two macros are the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{SegmentLength}\parg{point1}\parg{point2} to\meta{length}
\cs{SegmentArg}\parg{point1}\parg{point2} to\meta{argument}
-\end{ttsintassi}
+\end{ttsyntax}
The \meta{argument} is computed in the interval $-180^\circ < \phi \leq
+180^\circ$; it represents the argument of the vector that goes from
\meta{point1} to \meta{point2}, therefore the user must pay attention to
- the order s/he enters the end points coordinates.
+ the order s/he enters the end point coordinates.
\item The next command \cs{SymmetricalPointOf} is used to find the
reflection of a specified point with respect to a fixed point; of course
the latter is the middle point of the couple, but the unknown to be
determined is not the center of a segment, but one of its end points.
The syntax is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{SymmetricalPointOf}\meta{point1} respect\meta{fixed} to\meta{point2}
-\end{ttsintassi}
+\end{ttsyntax}
\item Command \cs{RegPolygon} draws a regular polygon inscribed within
a circle of given radius and center, with a specified number of sides;
@@ -1046,11 +1066,11 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
different settings; but it would not be too difficult to arrange a new
macro or to modify this one in order to get “bicolor” polygons.
It is not necessary for the purpose of this package, therefore we
- let the user express his/her phantasy with other macros. The actual
+ let the user express his/her phantasy by creating other macros. The actual
syntax is the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{RegPolygon}\meta{$\star$}\parg{center}\marg{radius}\marg{sides}\oarg{angle}\aarg{settings}
-\end{ttsintassi}
+\end{ttsyntax}
The initial optional asterisk specifies if the interior has to be
coloured; if yes, the \meta{settings} refer to the color of the
interior; if not, the \meta{settings} refer to the thickness and
@@ -1065,11 +1085,11 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
argument is specified, the polygon center is displaced accordingly.
The number of sides in theory may be very high, but it is not wise
to exceed a couple of dozen sides; if the number of sides is too
- high, the polygon becomes undistinguishable from a circumference.
+ high, a polygon (completely contained in an A4 page) may become undistinguishable from a circumference.
\item Several macros are dedicated to ellipses; their names are spelled
in Italian, “ellisse”, because the name “ellipse” is already taken by
- other packages; with Italian user command names there should be no
+ other packages; with an Italian user command names there should be no
interference with other packages, or the risk is reduced to
a minimum. The various macros are \cs{ellisse}, \cs{Sellisse},
\cs{Xellisse}, \cs{XSellisse}, \cs{EllisseConFuoco} \cs{EllisseSteiner};
@@ -1080,17 +1100,16 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
similar and are pronounced almost identically.
{\tolerance=3000 Actually \cs{ellisse} is practically a shorthand for
- \cs{Sellisse} because
- some optional arguments are already fixed, but the meaning of
- \cs{fillstroke} depends on the presence or absence of an initial
- asterisk; similarly \cs{Xellisse} is a sort of a shorthand for
- \cs{XSellisse}; in facts those commands, that contain
- an ‘S’ in their names, can optionally perform also the affine
- \emph{shear} transformation, while those without the ‘S’ do not execute
- such transformation. Figure~\ref{fig:shear} displays a normal ellipse
- with its bounding rectangle, and the same ellipse to which the shear
- affine transformation is applied; the labeled points represent the
- third order Bézier spline nodes and control points.\par}
+ \cs{Sellisse} because some optional arguments are already fixed, but the
+ meaning of \cs{fillstroke} depends on the presence or absence of an
+ initial asterisk; similarly \cs{Xellisse} is a sort of a shorthand for
+ \cs{XSellisse}; in facts those commands, that contain an ‘S’ in their
+ names, can optionally perform also the affine \emph{shear} transformation,
+ while those without the ‘S’ do not execute such transformation.
+ Figure~\ref{fig:shear} displays a normal ellipse with its bounding
+ rectangle, and the same ellipse to which the shear affine transformation
+ is applied; the labeled points represent the third order Bézier spline
+ nodes and control points.\par}
\begin{figure}[!htb]
\dimendef\Wmp=2000 \Wmp=\dimexpr(\textwidth-\columnsep)/2\relax
\begin{minipage}{\Wmp}\centering
@@ -1110,7 +1129,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\end{figure}
\item The syntax of those six commands are the following:
-\begin{ttsintassi}
+\begin{ttsyntax}
\cs{Sellisse}\meta{$\star$}\marg{semiaxis-h}\marg{semiaxis-v}\oarg{shear}
\cs{ellisse}\meta{$\star$}\marg{semiaxis-h}\marg{semiaxis-v}
\cs{XSellisse}\meta{$\star$}\parg{center}\oarg{angle}\aarg{shear}\marg{semiaxis-h}\%
@@ -1119,20 +1138,21 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\qquad\marg{semiaxis-v}\oarg{settings1}\marg{settings2}
\cs{EllipseWithFocus}\meta{$\star$}\parg{vertex1}\parg{vertex2}\parg{vertex3}\parg{focus}
\cs{SteinerEllipse}\meta{$\star$}\parg{vertex1}\parg{vertex2}\parg{vertex3}\oarg{diameter}
-\end{ttsintassi}
+\end{ttsyntax}
All require the semi axis lengths; the \meta{semiaxis-h} and
\meta{semiaxis-v} refer to the semi axes before possible rotation by
\meta{angle} degrees, and do not make assumptions on which axis is the
- larger one. The optional parameter \meta{shear} is the angle in degrees
- by which the vertical coordinate lines are rotated by effect of shearing.
+ bigger one. The optional parameter \meta{shear} is the angle in degrees
+ by which the vertical coordinate lines are slanted by effect of shearing.
If \meta{shear}, that by default equals zero, is not set
to another value, the asterisks of command \cs{Sellisse} and
\cs{XSellisse} do not have any effect. Otherwise the asterisk of
\cs{Sellisse} forces to draw the ellipse bounding box (rectangle before
shearing, parallelogram after shearing) as shown together with some
marked special points (the vertices, spline nodes and control points
- of the quarter circles or quarter ellipses) in figure~\ref{fig:shear}.
- For \cs{ellipse} the asterisk implies filling, instead of stroking the
+ of the quarter circle or quarter ellipse Bézier splines) in
+ figure~\ref{fig:shear}.
+ For \cs{ellisse} the asterisk implies filling, instead of stroking the
ellipse contour.
The \meta{setting}~1 and~2 refer to the color filling and/or border
color, and contour thickness, as already explained. For the
@@ -1237,7 +1257,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Dashed and dotted lines}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- For dotted lines there is a possibility of specifying the dot size;
+ For dotted lines it is possible to specify the dot size;
it can be specified with an explicit unit of measure, or, if no unit is
specified, it is assumed to be “points”. The \cs{Dotline} takes care
of transforming the implied or the explicit dimension in multiples of
@@ -1245,19 +1265,19 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
codes.
\begin{figure}[!htb]
-\begin{Esempio}[\setfontsize{10}](0.65)
-\unitlength=1mm
+\begin{Esempio}[\setfontsize{10}](0.45)
+\unitlength=0.02\linewidth
\begin{picture}(40,40)
\GraphGrid(40,40)
\Dashline(0,0)(40,10){4}
-\put(0,0){\circle*{2}}
+\put(0,0){\circle*{1}}
\Dashline(40,10)(0,25){4}
-\put(40,10){\circle*{2}}
+\put(40,10){\circle*{1}}
\Dashline(0,25)(20,40){4}
-\put(0,25){\circle*{2}}
-\put(20,40){\circle*{2}}
+\put(0,25){\circle*{1}}
+\put(20,40){\circle*{1}}
\Dotline(0,0)(40,40){2}[0.75mm]
-\put(40,40){\circle*{2}}
+\put(40,40){\circle*{1}}
\end{picture}
\end{Esempio}
\caption{Dashed and dotted lines}\label{fig:DashDot}
@@ -1267,7 +1287,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Generic curves}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- With the \cs{Curve} macro it is possible to make line art or filled shapes. Figures~\ref{fig:hearts} show the same shape, the first just stroked and the second color filled.
+With the \cs{Curve} macro it is possible to make line art or filled shapes. Figures~\ref{fig:hearts} show the same shape, the first just stroked and the second color filled.
\begin{figure}[!htp]
\begin{Esempio}[\setfontsize{9}](0.65)
@@ -1488,10 +1508,10 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
special lines relative to a specific vertex. Thanks to the macros
described earlier in this list, this drawing is particularly simple; most
of the code is dedicated to labelling the various points and to
- assign coordinate values to the macros that are going to use them
+ assign coordinate values to the macros that are going to be use
in a symbolic way. The generic triangle (not a regular polygon) requires
- one line, and the determination of the intersections of the lines with
- the suitable triangle side, and their tracing requires two code lines
+ one line of code, and the determination of the intersections of the lines
+ with the suitable triangle side, and their tracing requires two code lines
each.
\begin{figure}[!tb]\centering
@@ -1526,7 +1546,7 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
\emph{barycenter}, the height lines in the \emph{orthocenter}, the
bisectors lines in the \emph{incenter}; these centers may be those of
special circles: Figures~\ref{fig:barycenter} to~\ref{fig:circumcenter};
- the \emph{incircle}, centered in the incenter,
+ the \emph{incircle}, centred in the incenter,
has a special name, because it has the property of being tangent to all
the three triangle sides; there is also the circumcircle that passes
through the three vertices, its center is the intersection of the
@@ -1631,7 +1651,7 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
Although these examples require some new simple macros, described
in the previous sections; some more more examples can be made that require
more complex macros. Even these macros are just examples. For other
- applications it is probably necessary to add more macros.
+ applications it is probably necessary to add even more macros.
Let us proceed with the construction of the Steiner ellipse: given a
triangle, there exists only one ellipse that is internally tangent to
@@ -1721,7 +1741,7 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
The geometrical construction is rather complicated; the steps to follow
- are the following:
+ are the following:\enlargethispage*{\baselineskip}
\begin{itemize}[noitemsep]
\item draw the triangle and the given focus $\mathsf{F}$;
@@ -1744,8 +1764,8 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
\item equation~\eqref{equ:axes-foci} allows to find the second axis
length; the segment that joins the foci has the required inclination
- of the main axis; therefore all necessary pieces of information to
- draw the ellipse are known.
+ of the main axis; its middle point is the ellipse center; therefore all
+ necessary pieces of information to draw the ellipse are known.
\end{itemize}
Figures~\ref{fig:ellisse-interna-finale} and~\ref{fig:ellisse-interna}
@@ -1761,7 +1781,7 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
code for the initial \env{picture} environment.
The reader can easily understand that this package is far from being
- exhaustive for all geometrical problema]s to be solved with ruler and
+ exhaustive for all geometrical problems to be solved with ruler and
compass; it shows a way to add more commands to approach further problems;
if any author, who creates new commands, would like to contribute more
macros to this package, I will be happy to integrate his/her contribution
@@ -1769,12 +1789,12 @@ y(t) &= \dfrac{13\cos(t)-5\cos(2t)-2\cos(3t)-\cos(4t)}{16}
be very happy to add its author name to this package author list; for
simpler contributions each contributor will be duly acknowledged.
- Creating new macros to solve more problems is pleasant and more
- difficult is the problem, greater is the satisfaction in solving it.
+ Creating new macros to solve more problems is pleasant; the more
+ difficult the problem, the greater the satisfaction in solving it.
\begin{center}
- Have fun with \LaTeX and its potential applications!
+ Have fun with \LaTeX and its potential applications!
\end{center}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx b/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx
index 054ee39ae1..5710287c70 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx
@@ -45,7 +45,7 @@ This work consists of files:
%<package>\ProvidesPackage{euclideangeometry}%
%<readme>File README.txt for package euclideangeometry
%<*package|readme>
- [2020-02-11 v.0.1.4 Extension package for curve2e]
+ [2020-02-12 v.0.1.5 Extension package for curve2e]
%</package|readme>
%<*driver>
\documentclass{ltxdoc}\errorcontextlines=100
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf b/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf
index 54f15c1355..1665a1b1f0 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/README.md b/macros/latex/contrib/hitszthesis/README.md
new file mode 100644
index 0000000000..838f63a599
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/README.md
@@ -0,0 +1,27 @@
+<!-- Author : Jingxuan Yang-->
+<!-- Program Email: yanglatex2e@gmail.com -->
+
+[Github](https://github.com/YangLaTeX/YangThesis) | [Download](https://github.com/YangLaTeX/YangThesis/releases) | [Wiki](https://github.com/YangLaTeX/YangThesis/wiki)
+
+# HITSZThesis
+
+## Introduction
+
+HITSZThesis is a **bachelor dissertation** LaTeX template for **Harbin Institute of Technology, ShenZhen** (HITSZ).
+
+## Requirements
+
+This package uses `mtpro2` as math font, you can install this font from [here](https://www.latexstudio.net/archives/51742.html).
+
+## Version
+
+This is version 1.2, updated on 2/15/2020.
+
+## Issues
+If you have any questions or advice, you can create an issue at [https://github.com/YangLaTeX/YangThesis/issues](https://github.com/YangLaTeX/YangThesis/issues)
+
+## Contact
+Email: [yanglatex2e@gmail.com](mailto:yanglatex2e@gmail.com)
+
+## License
+This material is subject to the [LATEX Project Public License 1.3c](https://ctan.org/license/lppl1.3) or any later version. \ No newline at end of file
diff --git a/macros/latex/contrib/hitszthesis/figure/3angle.png b/macros/latex/contrib/hitszthesis/figure/3angle.png
new file mode 100644
index 0000000000..14d16cc9c3
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/3angle.png
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/3grasp.png b/macros/latex/contrib/hitszthesis/figure/3grasp.png
new file mode 100644
index 0000000000..baa5ded526
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/3grasp.png
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/3posoreest.png b/macros/latex/contrib/hitszthesis/figure/3posoreest.png
new file mode 100644
index 0000000000..23994364da
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/3posoreest.png
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/3rfcn.png b/macros/latex/contrib/hitszthesis/figure/3rfcn.png
new file mode 100644
index 0000000000..cd3161a9fe
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/3rfcn.png
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/figmutihopcomplex.png b/macros/latex/contrib/hitszthesis/figure/figmutihopcomplex.png
new file mode 100644
index 0000000000..014865ad28
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/figmutihopcomplex.png
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/flowchart.png b/macros/latex/contrib/hitszthesis/figure/flowchart.png
new file mode 100644
index 0000000000..3637a7db94
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/flowchart.png
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/less1.jpg b/macros/latex/contrib/hitszthesis/figure/less1.jpg
new file mode 100644
index 0000000000..5bdb2c1891
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/less1.jpg
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/less2.jpg b/macros/latex/contrib/hitszthesis/figure/less2.jpg
new file mode 100644
index 0000000000..d68e0cac5f
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/less2.jpg
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/figure/less3.jpg b/macros/latex/contrib/hitszthesis/figure/less3.jpg
new file mode 100644
index 0000000000..fba8801e22
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/figure/less3.jpg
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/front/HITSZname.jpg b/macros/latex/contrib/hitszthesis/front/HITSZname.jpg
new file mode 100644
index 0000000000..3d0df2b0e0
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/front/HITSZname.jpg
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/front/thesistitle.eps b/macros/latex/contrib/hitszthesis/front/thesistitle.eps
new file mode 100644
index 0000000000..631dc56ddd
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/front/thesistitle.eps
@@ -0,0 +1,335 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: cairo 1.14.10 (http://cairographics.org)
+%%CreationDate: Sat Aug 26 23:43:48 2017
+%%Pages: 1
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 2
+%%BoundingBox: 0 -1 422 55
+%%EndComments
+%%BeginProlog
+save
+50 dict begin
+/q { gsave } bind def
+/Q { grestore } bind def
+/cm { 6 array astore concat } bind def
+/w { setlinewidth } bind def
+/J { setlinecap } bind def
+/j { setlinejoin } bind def
+/M { setmiterlimit } bind def
+/d { setdash } bind def
+/m { moveto } bind def
+/l { lineto } bind def
+/c { curveto } bind def
+/h { closepath } bind def
+/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto
+ 0 exch rlineto 0 rlineto closepath } bind def
+/S { stroke } bind def
+/f { fill } bind def
+/f* { eofill } bind def
+/n { newpath } bind def
+/W { clip } bind def
+/W* { eoclip } bind def
+/BT { } bind def
+/ET { } bind def
+/pdfmark where { pop globaldict /?pdfmark /exec load put }
+ { globaldict begin /?pdfmark /pop load def /pdfmark
+ /cleartomark load def end } ifelse
+/BDC { mark 3 1 roll /BDC pdfmark } bind def
+/EMC { mark /EMC pdfmark } bind def
+/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def
+/Tj { show currentpoint cairo_store_point } bind def
+/TJ {
+ {
+ dup
+ type /stringtype eq
+ { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse
+ } forall
+ currentpoint cairo_store_point
+} bind def
+/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore
+ cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def
+/Tf { pop /cairo_font exch def /cairo_font_matrix where
+ { pop cairo_selectfont } if } bind def
+/Td { matrix translate cairo_font_matrix matrix concatmatrix dup
+ /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point
+ /cairo_font where { pop cairo_selectfont } if } bind def
+/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def
+ cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def
+/g { setgray } bind def
+/rg { setrgbcolor } bind def
+/d1 { setcachedevice } bind def
+/cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def
+/cairo_image { image cairo_flush_ascii85_file } def
+/cairo_imagemask { imagemask cairo_flush_ascii85_file } def
+%%EndProlog
+%%BeginSetup
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+%%PageBoundingBox: 0 -1 422 55
+%%EndPageSetup
+q 0 -1 422 56 rectclip q
+0 g
+20.781 0.454 m 20.582 0.704 20.312 4.915 20.18 9.95 c 20.047 14.927 19.844
+ 19.544 19.723 20.208 c 19.512 21.403 19.488 21.415 17.988 21.192 c 17.156
+ 21.067 14.938 20.813 13.062 20.634 c 8.965 20.235 7.098 19.766 4.219 18.399
+ c 0.973 16.864 0.621 16.958 0.168 19.442 c -0.25 21.751 0.102 22.798 1.293
+ 22.798 c 1.676 22.798 2.816 23.032 3.828 23.317 c 5.516 23.79 6.543 24.063
+ 12.273 25.559 c 13.32 25.833 15.043 26.298 16.105 26.599 c 17.168 26.895
+ 18.309 27.141 18.641 27.141 c 19.082 27.141 19.242 27.466 19.242 28.388
+ c 19.242 29.161 19.551 29.989 20.055 30.567 c 20.871 31.505 l 22.859 30.806
+ l 23.953 30.423 25.258 29.72 25.754 29.243 c 26.66 28.376 l 32.27 28.821
+ l 35.352 29.067 38.203 29.302 38.602 29.349 c 40.082 29.509 40.516 29.274
+ 41.535 27.774 c 42.109 26.927 42.68 26.153 42.801 26.056 c 43.188 25.739
+ 43.527 22.552 43.281 21.571 c 43.098 20.833 42.824 20.626 42.02 20.626
+c 41.457 20.626 40.902 20.778 40.789 20.962 c 40.676 21.145 39.551 21.638
+ 38.293 22.056 c 36.312 22.716 35.297 22.806 30.789 22.72 c 25.574 22.618
+ l 25.324 20.626 l 25.188 19.532 25.043 14.727 25 9.95 c 24.961 5.177 24.859
+ 0.981 24.773 0.634 c 24.652 0.138 24.238 0.001 22.879 0.001 c 21.918 0.001
+ 20.977 0.204 20.781 0.454 c h
+202.465 0.454 m 202.309 0.7 202.234 4.911 202.301 9.809 c 202.375 15.247
+ 202.246 20.274 201.977 22.72 c 201.535 26.731 l 200.133 26.966 l 198.18
+ 27.298 196.074 26.872 194.555 25.845 c 193.848 25.364 193.043 24.97 192.766
+ 24.97 c 192.152 24.97 189.68 29.513 189.68 30.641 c 189.68 31.294 189.945
+ 31.493 191.039 31.681 c 191.785 31.806 192.965 32.059 193.66 32.239 c 194.359
+ 32.419 195.309 32.563 195.777 32.567 c 196.242 32.567 197.746 32.907 199.117
+ 33.325 c 201.609 34.083 l 201.707 41.919 l 201.805 49.759 l 203.684 49.864
+ l 204.992 49.942 206.055 49.751 207.18 49.239 c 209.047 48.388 209.301
+47.942 208.66 46.665 c 208.371 46.095 208.152 43.868 208.074 40.786 c 207.957
+ 35.825 l 209.273 35.825 l 209.996 35.825 211.422 36.095 212.445 36.427
+c 214.23 37.001 214.328 36.997 214.855 36.337 c 215.16 35.954 215.578 35.196
+ 215.789 34.649 c 215.996 34.102 216.293 33.653 216.449 33.653 c 216.832
+ 33.653 217.645 30.641 217.484 29.806 c 217.367 29.192 216.957 29.13 213.016
+ 29.114 c 210.633 29.102 208.41 28.97 208.082 28.817 c 207.363 28.481 206.992
+ 22.196 206.918 9.044 c 206.879 2.056 206.781 0.641 206.328 0.352 c 205.535
+ -0.144 202.801 -0.077 202.465 0.454 c h
+407.906 2.102 m 406.441 2.333 402.094 5.352 402.332 5.974 c 402.445 6.27
+ 402.707 6.513 402.914 6.513 c 403.426 6.513 410.059 13.184 410.059 13.7
+ c 410.059 13.927 410.184 14.114 410.332 14.114 c 410.895 14.122 413.797
+ 19.571 414.762 22.434 c 417.156 29.536 417.203 38.747 414.895 47.946 c
+414.594 49.141 414.215 50.649 414.047 51.294 c 413.758 52.427 413.781 52.462
+ 414.707 52.259 c 417.59 51.634 417.832 51.333 419.203 46.681 c 422.32 36.099
+ 422.586 26.45 420.016 17.052 c 419.426 14.895 416.766 9.188 415.988 8.407
+ c 415.711 8.134 415.488 7.778 415.488 7.618 c 415.488 7.462 414.449 6.247
+ 413.18 4.919 c 410.883 2.516 409.605 1.833 407.906 2.102 c h
+262.418 2.829 m 260.957 3.532 260.273 4.263 260.258 5.145 c 260.25 5.485
+ 260.02 6.302 259.746 6.954 c 257.246 12.884 256.172 26.763 257.664 33.872
+ c 258.633 38.485 259.824 41.72 261.766 45.02 c 263.887 48.626 268.145 52.833
+ 269.668 52.833 c 270.238 52.833 274.098 50.97 274.633 50.438 c 274.883
+50.188 275.41 49.884 275.809 49.755 c 276.207 49.63 276.531 49.407 276.531
+ 49.255 c 276.531 49.001 274.07 46.681 273.797 46.681 c 273.5 46.681 270.016
+ 42.997 270.016 42.684 c 270.016 42.493 269.887 42.341 269.73 42.341 c 269.445
+ 42.341 266.758 38.907 266.758 38.54 c 266.758 38.434 266.391 37.735 265.934
+ 36.993 c 264.969 35.411 263.863 32.599 262.914 29.313 c 262.355 27.368
+262.238 25.77 262.254 20.083 c 262.273 13.337 262.504 11.423 263.945 5.97
+ c 264.887 2.403 264.906 2.169 264.277 2.196 c 263.953 2.204 263.113 2.493
+ 262.418 2.829 c h
+386.898 2.415 m 378.605 3.438 377.863 3.704 377.195 5.88 c 375.809 10.376
+ 373.941 12.786 371.555 13.149 c 370.211 13.352 370.016 13.251 367.859 11.231
+ c 365.59 9.106 365.094 8.774 361.84 7.181 c 360.895 6.716 360.121 6.227
+ 360.121 6.095 c 360.121 5.661 357.707 4.341 356.914 4.341 c 354.457 4.341
+ 348.902 8.356 348.902 10.134 c 348.902 10.813 349.148 10.856 353.184 10.856
+ c 356.52 10.856 358 11.024 359.879 11.614 c 361.207 12.032 362.293 12.52
+ 362.293 12.7 c 362.293 12.88 362.457 13.028 362.66 13.028 c 363.078 13.028
+ 366.273 16.266 366.273 16.684 c 366.273 17.184 364.309 18.345 362.422 18.966
+ c 360.445 19.61 360.137 20.067 360.129 22.356 c 360.121 23.665 360.91 25.829
+ 361.527 26.212 c 361.746 26.345 362.91 25.876 364.117 25.169 c 365.324
+24.462 366.445 23.884 366.609 23.884 c 366.773 23.884 367.113 23.638 367.359
+ 23.341 c 367.605 23.044 368.086 22.798 368.426 22.798 c 369.125 22.798
+369.891 25.466 369.891 27.891 c 369.891 29.438 369.422 29.681 367.969 28.872
+ c 367.48 28.602 365.57 28.431 362.988 28.419 c 359.531 28.411 358.57 28.282
+ 357.477 27.696 c 356.164 26.985 356.152 26.985 355.625 27.696 c 355.055
+ 28.458 354.332 31.302 354.332 32.774 c 354.332 33.849 355.266 34.282 358.246
+ 34.587 c 362.355 35.009 368.797 36.509 370.098 37.349 c 370.312 37.485
+372.266 38.192 374.441 38.919 c 376.617 39.645 378.758 40.47 379.199 40.747
+ c 380.543 41.595 381.707 41.372 382.68 40.079 c 384.594 37.528 385.734
+33.751 384.637 33.587 c 384.391 33.548 383.02 33.509 381.59 33.493 c 378.305
+ 33.466 377.375 32.841 375.738 29.532 c 374.648 27.325 373.168 21.665 373.152
+ 19.653 c 373.148 18.552 378.91 12.809 380.75 12.087 c 381.047 11.97 381.781
+ 11.649 382.379 11.38 c 382.973 11.106 384.902 10.372 386.668 9.747 c 390.215
+ 8.489 392.648 7.013 393.762 5.446 c 394.797 3.997 394.684 3.372 393.324
+ 2.946 c 392.031 2.548 388.324 2.239 386.898 2.415 c h
+152.227 4.099 m 149.426 4.513 149.035 4.825 148.445 7.145 c 148.23 7.993
+ 147.895 8.684 147.699 8.684 c 147.504 8.684 147.344 8.931 147.344 9.227
+ c 147.344 9.528 147.098 9.77 146.801 9.77 c 146.5 9.77 146.258 9.931 146.258
+ 10.126 c 146.258 10.52 143.5 11.942 142.73 11.942 c 142.457 11.942 141.797
+ 11.481 141.262 10.923 c 138.781 8.333 136.094 6.876 133.781 6.876 c 132.195
+ 6.876 129.453 7.86 128.688 8.708 c 128.082 9.376 128.082 9.442 128.707
+10.134 c 129.066 10.532 129.656 10.856 130.016 10.856 c 131.078 10.856 135.316
+ 12.778 137.27 14.145 c 138.605 15.083 l 136.484 17.313 l 135.305 18.552
+ 134.051 19.54 133.66 19.54 c 132.48 19.54 131.969 20.563 132 22.849 c 132.035
+ 25.462 132.816 26.563 134.383 26.22 c 134.996 26.087 135.402 26.149 135.402
+ 26.376 c 135.402 26.993 142.492 29.04 144.098 28.888 c 145.492 28.755 145.5
+ 28.759 144.836 29.485 c 143.207 31.274 143 32.27 143 38.341 c 143 44.794
+ 142.957 44.888 140.816 43.102 c 139.562 42.056 l 139.582 38.852 l 139.59
+ 37.087 139.672 34.782 139.762 33.724 c 139.922 31.813 139.918 31.798 138.098
+ 30.087 c 135.477 27.626 131.059 26.356 131.059 28.067 c 131.059 28.333
+131.547 29.274 132.145 30.161 c 132.742 31.044 133.23 31.907 133.23 32.079
+ c 133.234 32.247 133.496 32.876 133.816 33.474 c 134.238 34.263 134.445
+ 35.942 134.574 39.626 c 134.691 42.876 134.926 44.962 135.227 45.442 c
+135.656 46.13 139.707 47.766 140.977 47.766 c 141.246 47.766 141.938 48.009
+ 142.508 48.309 c 143.953 49.059 146.387 48.985 148.055 48.134 c 149.832
+ 47.227 150.133 46.317 149.238 44.587 c 148.355 42.888 147.648 39.95 147.613
+ 37.852 c 147.582 35.696 148.406 34.516 150.328 33.966 c 152.465 33.356
+152.77 33.04 152.77 31.454 c 152.77 30.411 152.527 29.841 151.801 29.165
+ c 150.82 28.255 148.48 27.618 147.629 28.028 c 147.371 28.153 147.473 28.044
+ 147.855 27.786 c 149.988 26.349 150.328 25.423 149.152 24.247 c 148.754
+ 23.849 148.43 23.282 148.43 22.993 c 148.43 22.477 148.07 21.552 146.543
+ 18.102 c 145.828 16.485 l 146.91 15.571 l 147.504 15.067 148.383 14.329
+ 148.863 13.931 c 150.176 12.845 153.766 11.083 156.207 10.329 c 162.23
+8.47 164.34 7.106 163.805 5.415 c 163.562 4.653 163.234 4.54 159.645 3.985
+ c 156.93 3.567 155.723 3.587 152.227 4.099 c h
+142.797 24.309 m 142.523 25.177 141.594 25.141 139.391 24.181 c 137.582
+ 23.391 l 141.676 19.454 l 142.344 21.552 l 142.707 22.708 142.914 23.95
+ 142.797 24.309 c h
+315.25 4.927 m 312.305 6.091 309.629 8.333 309.27 9.942 c 308.648 12.696
+ 308.348 16.372 308.375 20.774 c 308.395 23.579 308.402 26.149 308.395 26.485
+ c 308.383 26.927 307.93 26.657 306.797 25.544 c 304.602 23.38 302.277 21.86
+ 300.727 21.575 c 299.773 21.399 299.355 21.11 299.219 20.528 c 299.113
+20.083 298.762 19.005 298.438 18.13 c 297.465 15.505 297.832 15.165 299.734
+ 16.923 c 301.922 18.938 302.586 18.934 302.586 16.919 c 302.586 14.095
+300.703 10.075 298.281 7.72 c 297.199 6.669 296.75 6.661 295.832 7.692 c
+ 294.453 9.227 293.852 12.157 294.121 15.993 c 294.41 20.114 294.184 21.352
+ 293.145 21.352 c 292.25 21.352 291.098 20.782 290.043 19.825 c 288.664
+18.571 287.23 19.645 286.145 22.735 c 285.496 24.583 286.012 25.618 287.711
+ 25.884 c 290.102 26.255 293.352 27.255 293.762 27.743 c 293.98 28.009 294.273
+ 28.227 294.41 28.227 c 294.547 28.227 295.02 28.606 295.457 29.067 c 295.895
+ 29.532 296.527 30.009 296.859 30.134 c 297.781 30.47 300.223 28.536 300.621
+ 27.149 c 300.957 25.985 l 302.855 28.532 l 303.902 29.934 304.758 31.239
+ 304.758 31.434 c 304.758 31.63 305 32.29 305.301 32.903 c 305.598 33.516
+ 306.086 34.52 306.387 35.13 c 306.684 35.743 306.93 36.528 306.93 36.868
+ c 306.93 37.212 307.07 37.645 307.242 37.833 c 307.414 38.024 307.973 39.403
+ 308.48 40.903 c 308.988 42.399 309.562 44.028 309.758 44.52 c 309.953 45.013
+ 310.395 46.474 310.734 47.766 c 311.078 49.063 311.625 50.813 311.949 51.657
+ c 312.52 53.153 312.582 53.192 314.184 53.196 c 315.09 53.196 316.027 53.001
+ 316.266 52.763 c 316.848 52.177 316.793 50.329 316.156 49.216 c 315.512
+ 48.091 315.449 44.372 316.066 43.724 c 316.312 43.458 316.762 42.774 317.059
+ 42.196 c 317.359 41.618 318.426 40.282 319.438 39.224 c 320.445 38.165
+321.992 36.438 322.871 35.388 c 325.047 32.786 327.559 30.399 328.117 30.399
+ c 328.371 30.399 328.633 30.27 328.699 30.11 c 328.766 29.954 329.719 29.364
+ 330.812 28.798 c 333.949 27.177 336.176 25.614 336.363 24.899 c 336.914
+ 22.786 335.586 22.224 330.949 22.61 c 325.246 23.087 323.25 23.989 323.223
+ 26.099 c 323.211 27.255 321.867 30.399 321.387 30.399 c 321.195 30.399
+321.043 30.641 321.043 30.942 c 321.043 31.239 320.879 31.485 320.68 31.485
+ c 320.48 31.485 320.02 31.77 319.656 32.118 c 319.293 32.466 318.602 33.083
+ 318.117 33.493 c 317.637 33.903 316.508 35.059 315.613 36.067 c 314.719
+ 37.075 313.648 38.075 313.234 38.29 c 312.551 38.645 312.383 38.477 311.355
+ 36.438 c 309.703 33.149 309.098 31.524 309.098 30.349 c 309.098 29.337
+309.145 29.309 310.508 29.528 c 311.625 29.708 312.062 29.606 312.633 29.036
+ c 313.273 28.395 313.312 28.106 312.992 26.263 c 312.797 25.13 312.723
+24.118 312.828 24.016 c 312.93 23.911 313.723 24.247 314.586 24.755 c 315.449
+ 25.266 316.488 25.833 316.895 26.013 c 317.301 26.192 317.852 26.602 318.113
+ 26.923 c 318.875 27.841 319.586 27.606 320.156 26.247 c 321.023 24.165
+320.57 21.712 319.312 21.712 c 319.102 21.712 318.875 21.591 318.809 21.442
+ c 318.648 21.079 315.371 18.458 315.082 18.458 c 314.953 18.458 314.355
+ 17.997 313.754 17.431 c 312.664 16.415 312.66 16.395 313.051 14.278 c 313.27
+ 13.102 313.68 11.915 313.961 11.63 c 314.789 10.802 317.961 10.665 319.562
+ 11.388 c 321.227 12.138 321.766 13.536 321.766 17.122 c 321.766 18.431
+321.93 19.602 322.129 19.724 c 322.82 20.153 323.934 19.493 324.164 18.524
+ c 324.293 17.989 324.52 17.388 324.672 17.188 c 325.281 16.384 326.793
+9.849 326.809 7.962 c 326.824 6.044 326.402 5.669 323.867 5.376 c 319.918
+ 4.919 315.816 4.704 315.25 4.927 c h
+121.473 6.602 m 120.414 9.708 120.145 12.118 120.258 17.368 c 120.383 22.977
+ l 118.77 22.856 l 117.723 22.774 116.785 22.423 116.117 21.86 c 115.547
+ 21.38 114.852 20.989 114.574 20.989 c 113.812 20.989 112.613 23.634 112.512
+ 25.524 c 112.426 27.153 112.453 27.2 113.789 27.669 c 114.539 27.931 115.84
+ 28.251 116.684 28.376 c 119.211 28.759 122.801 30.251 124.078 31.454 c
+125.223 32.532 126.121 32.388 127.402 30.927 c 128.809 29.325 128.879 27.759
+ 127.621 26.056 c 127.125 25.38 126.715 24.556 126.715 24.22 c 126.715 23.888
+ 126.496 22.981 126.227 22.212 c 125.562 20.298 125.199 17.368 125.625 17.368
+ c 125.812 17.368 126.469 17.86 127.078 18.454 c 128.398 19.743 129.973
+19.934 129.973 18.806 c 129.973 18.403 129.73 17.485 129.43 16.77 c 129.133
+ 16.056 128.887 15.208 128.887 14.884 c 128.883 14.559 128.641 13.829 128.344
+ 13.259 c 128.043 12.688 127.801 12.063 127.801 11.872 c 127.801 11.454
+124.668 7.247 123.875 6.602 c 123.57 6.356 122.941 6.153 122.473 6.153 c
+ 122.008 6.153 121.559 6.356 121.473 6.602 c h
+181.875 7.872 m 180.062 12.13 179.805 13.708 180.109 18.638 c 180.562 25.884
+ 180.512 26.438 179.473 25.903 c 178.559 25.434 177.449 24.755 176.965 24.364
+ c 175.574 23.251 174.926 23.434 173.891 25.224 c 173.34 26.177 172.785
+27.04 172.66 27.141 c 172.535 27.239 172.246 27.856 172.023 28.513 c 171.676
+ 29.528 171.715 29.798 172.289 30.372 c 172.656 30.743 173.668 31.153 174.535
+ 31.282 c 176.316 31.552 179.082 32.575 183.066 34.442 c 183.906 34.833
+184.887 35.063 185.242 34.95 c 185.996 34.712 188.086 31.653 188.43 30.282
+ c 188.625 29.513 188.434 29.122 187.406 28.149 c 186.711 27.497 185.949
+ 26.583 185.719 26.126 c 185.199 25.11 184.73 16.278 185.195 16.298 c 185.91
+ 16.325 187.492 18.048 189.113 20.559 c 190.293 22.388 191.008 23.165 191.426
+ 23.079 c 192.348 22.888 192.082 19.411 190.965 16.966 c 190.09 15.056 188.59
+ 12.298 188.234 11.942 c 187.844 11.552 186.426 9.427 186.426 9.231 c 186.426
+ 9.118 185.91 8.462 185.281 7.77 c 183.727 6.063 182.633 6.095 181.875 7.872
+ c h
+57.926 8.548 m 57.348 9.239 56.527 11.497 56.52 12.403 c 56.512 13.173
+57.469 13.575 60.133 13.915 c 62.109 14.169 63.715 14.563 68.691 16.024
+c 72.648 17.184 72.555 17.036 72.473 22.192 c 72.441 24.384 72.375 24.599
+ 71.895 24.118 c 71.594 23.817 71.352 23.489 71.352 23.384 c 71.352 23.024
+ 67.984 19.54 67.637 19.54 c 66.953 19.54 63.852 22.997 63.441 24.216 c
+63.102 25.216 63.125 25.606 63.551 26.259 c 64.004 26.95 64.391 27.063 66.266
+ 27.044 c 67.816 27.028 68.645 27.196 69.113 27.626 c 69.48 27.954 69.945
+ 28.227 70.145 28.227 c 70.348 28.227 70.789 28.528 71.125 28.899 c 71.664
+ 29.493 71.707 30.165 71.488 34.52 c 71.184 40.575 71.41 41.255 73.719 41.255
+ c 75.59 41.255 78.469 40.032 78.758 39.114 c 78.875 38.739 78.723 37.802
+ 78.41 37.028 c 77.949 35.876 77.867 34.169 77.945 27.493 c 78.043 19.36
+ l 78.926 19.458 l 79.414 19.513 79.855 19.602 79.91 19.657 c 80.43 20.177
+ 81.168 25.462 81.637 32.024 c 82.121 38.794 82.473 41.677 83.508 47.29
+c 83.766 48.669 84.703 49.302 86.113 49.036 c 88.926 48.509 89.969 47.001
+ 88.707 45.29 c 88.18 44.583 87.824 43.364 87.617 41.571 c 87.449 40.102
+ 87.145 37.763 86.938 36.368 c 86.73 34.974 86.566 32.778 86.566 31.481
+c 86.57 29.13 l 87.5 30.216 l 89.414 32.446 89.805 32.942 89.805 33.114
+c 89.805 33.212 90.051 33.579 90.352 33.927 c 90.652 34.274 91.355 35.114
+ 91.918 35.79 c 93.238 37.384 94.32 37.161 96.156 34.923 c 97.621 33.134
+ 97.68 31.735 96.301 31.298 c 95.895 31.165 93.906 29.446 91.887 27.47 c
+ 89.871 25.493 87.613 23.595 86.875 23.247 c 85.812 22.751 85.5 22.38 85.395
+ 21.481 c 85.316 20.856 85.316 20.165 85.391 19.942 c 85.551 19.462 93.125
+ 19.423 95.594 19.891 c 96.492 20.063 97.84 20.321 98.59 20.462 c 99.645
+ 20.665 100.113 20.579 100.66 20.087 c 102.062 18.817 103.727 14.122 103.496
+ 12.095 c 103.383 11.095 103.289 11.04 101.746 11.079 c 100.852 11.102 98.902
+ 11.548 97.418 12.075 c 94.828 12.989 94.406 13.028 87.285 13.016 c 82.078
+ 13.005 79.203 12.845 77.684 12.477 c 76.488 12.188 74.68 11.95 73.668 11.946
+ c 70.68 11.938 63.766 10.274 60.375 8.747 c 58.289 7.809 58.52 7.829 57.926
+ 8.548 c h
+11.016 28.677 m 10.027 30.2 10.016 30.266 10.125 35.462 c 10.184 38.349
+ 10.039 42.02 9.805 43.622 c 9.43 46.177 9.449 46.677 9.977 47.692 c 10.434
+ 48.583 10.805 48.845 11.559 48.825 c 13.102 48.782 15.043 47.958 15.441
+ 47.177 c 15.754 46.567 15.988 46.513 17.168 46.794 c 18.238 47.048 18.73
+ 46.985 19.465 46.505 c 20.871 45.583 20.414 44.153 17.934 41.712 c 16.324
+ 40.126 15.863 39.415 15.711 38.278 c 15.52 36.849 l 16.566 37.825 l 18.434
+ 39.563 20.707 40.962 21.301 40.735 c 21.746 40.563 21.824 40.177 21.656
+ 38.95 c 21.469 37.587 20.539 35.29 19.953 34.739 c 19.844 34.641 19.398
+ 34.091 18.957 33.516 c 16.648 30.509 13.129 27.149 12.281 27.141 c 12.133
+ 27.141 11.562 27.833 11.016 28.677 c h
+25.684 31.841 m 24.75 32.653 23.625 34.032 23.191 34.907 c 22.434 36.415
+ 22.41 36.766 22.676 41.681 c 22.832 44.532 22.977 48.329 23 50.118 c 23.023
+ 51.911 23.172 53.579 23.332 53.829 c 23.781 54.52 25.348 54.368 26.758
+53.497 c 28.023 52.712 l 27.809 49.903 l 27.59 47.091 l 28.754 47.481 l
+29.395 47.692 30.172 48.091 30.488 48.36 c 31.309 49.067 32.543 48.966 32.98
+ 48.153 c 33.574 47.04 33.41 44.423 32.695 43.606 c 31.887 42.681 29.879
+ 41.255 29.387 41.255 c 29.18 41.255 29.012 41.11 29.012 40.934 c 29.012
+ 40.759 28.523 40.415 27.926 40.169 c 26.965 39.77 26.84 39.544 26.844 38.224
+ c 26.852 36.138 27.227 35.72 29.117 35.681 c 31.188 35.634 31.945 36.306
+ 32.762 38.895 c 33.109 39.993 33.586 40.888 33.824 40.88 c 35.031 40.849
+ 36.609 38.337 36.609 36.45 c 36.609 35.759 36.859 34.489 37.164 33.63 c
+ 37.688 32.141 37.676 32.028 36.973 31.321 c 36.32 30.665 35.703 30.567
+31.809 30.474 c 27.383 30.368 l h
+296.914 34.356 m 294.777 35.325 294.484 36.071 294.785 39.774 c 295.031
+ 42.79 295.594 44.161 296.578 44.141 c 296.945 44.134 298.684 41.708 300.68
+ 38.423 c 301.555 36.985 301.719 35.466 301.125 34.352 c 300.637 33.446
+298.918 33.446 296.914 34.356 c h
+124.816 38.591 m 122.375 39.829 l 122.375 42.13 l 122.375 45.54 123.875
+ 48.489 125.613 48.489 c 126.07 48.489 126.535 48.13 126.781 47.587 c 127.008
+ 47.087 127.332 46.681 127.496 46.681 c 127.664 46.681 127.801 46.438 127.801
+ 46.138 c 127.801 45.841 127.934 45.595 128.098 45.595 c 128.418 45.595
+129.484 43.595 130.191 41.673 c 130.938 39.638 129.73 37.259 127.984 37.321
+ c 127.586 37.337 126.16 37.907 124.816 38.591 c h
+185.168 39.817 m 183 40.587 182.699 41.337 183.145 44.864 c 183.723 49.47
+ 185.5 51.028 186.973 48.22 c 187.363 47.474 187.773 46.782 187.879 46.681
+ c 189.934 44.794 191.742 41.169 191.312 39.813 c 191.113 39.184 190.789
+ 39.091 189.023 39.13 c 187.895 39.157 186.16 39.466 185.168 39.817 c h
+368.988 42.251 m 365.379 44.106 364.602 48.188 367.129 52.016 c 367.988
+ 53.321 369.418 53.618 369.754 52.563 c 370.152 51.298 371.145 49.028 371.375
+ 48.852 c 371.504 48.755 371.977 47.817 372.426 46.77 c 374.074 42.923 372.277
+ 40.559 368.988 42.251 c h
+368.988 42.251 m f
+Q Q
+showpage
+%%Trailer
+end restore
+%%EOF
diff --git a/macros/latex/contrib/hitszthesis/hitszthesis.cls b/macros/latex/contrib/hitszthesis/hitszthesis.cls
new file mode 100644
index 0000000000..d6d1815d32
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/hitszthesis.cls
@@ -0,0 +1,822 @@
+%%==============================================
+%% start of file `HITSZThesis.cls'.
+%% Copyright 2019-2020 YangLaTeX (yanglatex2e@gmail.com)
+%%
+%% This work is available at GitHub:
+%% https://github.com/YangLaTeX/YangThesis
+%%
+%% This material is subject to the LATEX Project Public License 1.3c
+%% (https://ctan.org/license/lppl1.3) or any later version
+%%==============================================
+
+% 开始写类文件
+% 设置需要的LaTeX版本
+\NeedsTeXFormat{LaTeX2e}
+
+% 定义提供的类文件名称以及说明文字
+\ProvidesClass{hitszthesis}[2020/02/15 v1.2 HITSZThesis document class]
+
+% 键值对设置
+\RequirePackage{kvoptions}
+
+% 对宏包、环境、命令进行操作
+\RequirePackage{etoolbox}
+
+% 设置关键词
+\SetupKeyvalOptions{family=Yang, prefix=Yang@, setkeys=\kvsetkeys}
+
+% 定义设置关键词命令
+\newcommand{\ykv}[1]{\kvsetkeys{Yang}{#1}}
+
+% 表格信息对齐
+\DeclareStringOption[infocenter]{infoalign}
+\DeclareVoidOption{infocenter}{\ykv{infoalign = infocenter}}
+\DeclareVoidOption{infoleft}{\ykv{infoalign = infoleft}}
+
+% 封面标题行数
+\DeclareStringOption[onerow]{covertitle}
+\DeclareVoidOption{onerow}{\ykv{covertitle = onerow}}
+\DeclareVoidOption{tworow}{\ykv{covertitle = tworow}}
+
+% 默认选项
+\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}}
+
+% 禁用键值对操作
+\ProcessKeyvalOptions*\relax
+
+% 加载book类,A4大小,正文12磅,单面打印
+\LoadClass[12pt,a4paper,openany,oneside]{book}
+
+% 使用xelatex编译mtpro2宏包必须加载此宏包
+\RequirePackage{etex}
+
+% 加载支持中文的ctex宏包
+\RequirePackage[UTF8,space=auto,scheme=plain]{ctex}
+
+% 正文和数学字体设置
+\RequirePackage{amsmath}
+\RequirePackage[T1]{fontenc}
+\RequirePackage{newtxtext}
+\RequirePackage[mtphrb,mtpcal,zswash,subscriptcorrection,uprightGreek,nofontinfo]{mtpro2}
+\renewcommand{\rmdefault}{ptm}
+\RequirePackage[scaled=0.92]{helvet}
+\RequirePackage{type1cm}
+\RequirePackage{lipsum}
+
+% 使字体设置生效,排除其他干扰
+\RequirePackage{mathdesign}
+
+% 设置中文加粗字体
+\setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf}
+\newcommand*{\kai}{\CJKfamily{kai}}
+\setCJKfamilyfont{song}[AutoFakeBold]{SimSun}
+\newcommand*{\song}{\CJKfamily{song}}
+
+% 行间距,设为1.3,due to 12pt与小四号字的大小微差
+\linespread{1.3}
+
+%%===============常用宏包=========================
+% 在一页上可以使用单栏和多栏样式
+\RequirePackage{multicol}
+% 自定义颜色
+\RequirePackage{xcolor}
+% 排版代码
+\RequirePackage{fancyvrb}
+% 自定义目录格式
+\RequirePackage{titletoc}
+% 设置颜色
+\RequirePackage{xcolor}
+% 插入图片
+\RequirePackage{graphicx}
+% 表格
+\RequirePackage{array}
+% 长表格
+\RequirePackage{longtable}
+% booktabs 提供了\toprule 等命令.
+\RequirePackage{booktabs}
+% multirow 支持在表格中跨行
+\RequirePackage{multirow}
+% 调整间隔, 让表格更好看些
+\RequirePackage{bigstrut}
+% 在跨行表格中输入定界符
+\RequirePackage{bigdelim}
+% 保护脆落命令
+\RequirePackage{cprotect}
+% 定制列表环境
+\RequirePackage{enumitem}
+% 设置代码环境
+\RequirePackage{listings}
+% 超链接格式设置
+\RequirePackage{hyperref}
+% 首行缩进
+\RequirePackage{indentfirst}
+\setlength\parindent{2em}
+% 设置浮动体的标题
+\RequirePackage{caption}
+% 浮动环境
+\RequirePackage{float}
+% 下划线
+\RequirePackage{ulem}
+% 尺寸计算
+\RequirePackage{calc}
+% tikz绘图
+\RequirePackage{tikz}
+% 公式字母加粗
+\RequirePackage{bm}
+% 子公式编号
+\RequirePackage{cases}
+% 单位
+\RequirePackage{siunitx}
+% 排版代码
+\RequirePackage{listings}
+\renewcommand{\ttdefault}{cmtt}
+% 定义<ystyle>样式
+\lstdefinestyle{ystyle}{
+ basicstyle=%
+ \ttfamily
+ \lst@ifdisplaystyle\small\fi
+}
+% 使用<ystyle>样式
+\lstset{basicstyle = \ttfamily, style = ystyle, breaklines = true}
+% 定义代码颜色
+\definecolor{lightgrey}{rgb}{0.9,0.9,0.9}
+\definecolor{frenchplum}{RGB}{190,20,83}
+\definecolor{winered}{rgb}{0.5,0,0}
+% 设置LaTeX代码排版样式
+\lstset{language = [LaTeX]TeX,
+ texcsstyle = *\color{winered},
+ numbers = none,
+ mathescape,
+ breaklines = true,
+ keywordstyle = \color{winered},
+ commentstyle = \color{gray},
+ emph = {Yangpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath, figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex, microtype,description,times,newtx,booktabs,tabular,PDFLaTeX, XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox, titlestyle,cite,marginnote,ctex,listings,base,subnumcases},
+ emphstyle = {\color{frenchplum}},
+ morekeywords = {DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule, institute,version,includegraphics,setmainfont,setsansfont,setmonofont, setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref, tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle, appendix,chapter,hypersetup,mainmatter,frontmatter,tableofcontents, Yangpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part, equote,marginnote},
+ frame = single,
+ tabsize = 2,
+ rulecolor = \color{black},
+ framerule = 0.2pt,
+ columns = flexible,
+ % backgroundcolor = \color{lightgrey}
+}
+%%==============================================
+
+% 定义输入常量<tokens>
+% 论文标题
+\newcommand\Yang@tokens@thesistitle{}
+% 关键词,中文
+\newcommand\Yang@tokens@keywords{}
+% 关键词,英文
+\newcommand\Yang@tokens@keywordsen{}
+% 论文类别
+\newcommand*\Yang@tokens@papercategory{}
+% 学校名称
+\newcommand*\Yang@tokens@schoolname{}
+% 院系
+\newcommand*\Yang@tokens@departname{}
+% 班级
+\newcommand*\Yang@tokens@classnumber{}
+% 日期
+\newcommand*\Yang@tokens@dateinput{}
+% 姓名
+\newcommand*\Yang@tokens@authorname{}
+% 学号
+\newcommand*\Yang@tokens@studentID{}
+% 专业
+\newcommand*\Yang@tokens@majorin{}
+% 指导教师
+\newcommand*\Yang@tokens@instructor{}
+% 第一行标题
+\newcommand*\Yang@tokens@titleone{}
+% 第二行标题
+\newcommand*\Yang@tokens@titletwo{}
+
+% 定义与常量有关的新命令
+% 输入论文标题
+\newcommand*\thesistitle[1]{%
+ \renewcommand{\Yang@tokens@thesistitle}{#1}}
+% 输入论文类别
+\newcommand*\papercategory[1]{%
+ \renewcommand{\Yang@tokens@papercategory}{#1}}
+% 输入校名
+\newcommand*\schoolname[1]{%
+ \renewcommand{\Yang@tokens@schoolname}{#1}}
+% 输入院系名称
+\newcommand*\departname[1]{%
+ \renewcommand{\Yang@tokens@departname}{#1}}
+% 输入班级
+\newcommand*\classnumber[1]{%
+ \renewcommand{\Yang@tokens@classnumber}{#1}}
+% 输入日期
+\newcommand*\dateinput[1]{%
+ \renewcommand{\Yang@tokens@dateinput}{#1}}
+% 输入姓名
+\newcommand*\authorname[1]{%
+ \renewcommand{\Yang@tokens@authorname}{#1}}
+% 输入学号
+\newcommand*\studentID[1]{%
+ \renewcommand{\Yang@tokens@studentID}{#1}}
+% 输入专业
+\newcommand*\majorin[1]{%
+ \renewcommand{\Yang@tokens@majorin}{#1}}
+% 输入指导教师
+\newcommand*\instructor[1]{%
+ \renewcommand{\Yang@tokens@instructor}{#1}}
+% 输入第一行标题
+\newcommand*\titleone[1]{%
+ \renewcommand{\Yang@tokens@titleone}{#1}}
+% 输入第二行标题
+\newcommand*\titletwo[1]{%
+ \renewcommand{\Yang@tokens@titletwo}{#1}}
+
+% 定义常量的值
+% 中文标题名称设置
+
+\renewcommand\listfigurename{插图目录}
+\renewcommand\listtablename{附表目录}
+\renewcommand\abstractname{摘\quad 要}
+\newcommand{\keywordsname}{关键词}
+\newcommand{\keywordsenname}{Keywords}
+%%中文结构名字
+\renewcommand{\contentsname}{目\quad 录}
+\renewcommand{\figurename}{图}
+\renewcommand{\tablename}{表}
+\renewcommand{\partname}{部分}
+\renewcommand{\listfigurename}{插图目录}
+\renewcommand{\listtablename}{表格目录}
+\renewcommand{\bibname}{参考文献}
+\renewcommand{\appendixname}{附录}
+\renewcommand{\indexname}{索\quad 引}
+
+\newcommand{\notename}{笔记}
+\renewcommand*{\proofname}{证明}
+\newcommand{\problemname}{例题}
+\newcommand{\definitionname}{定义}
+\newcommand{\theoremname}{定理}
+\newcommand{\axiomname}{公理}
+\newcommand{\postulatename}{公设}
+\newcommand{\lemmaname}{引理}
+\newcommand{\propositionname}{命题}
+\newcommand{\corollaryname}{推论}
+\newcommand{\examplename}{例}
+\newcommand{\exercisename}{练习}
+\newcommand{\remarkname}{注}
+\newcommand{\assumptionname}{假设}
+\newcommand{\conclusionname}{结论}
+\newcommand{\solutionname}{解}
+\newcommand{\propertyname}{性质}
+
+% 中英字号转换
+\def\Yang@def@fontsize#1#2{%
+ \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
+ \fontsize{#2}{##1\dimexpr #2}\selectfont}}
+
+% 定义字号
+\Yang@def@fontsize{chuhao}{42bp}
+\Yang@def@fontsize{xiaochu}{36bp}
+\Yang@def@fontsize{yihao}{26bp}
+\Yang@def@fontsize{xiaoyi}{24bp}
+\Yang@def@fontsize{erhao}{22bp}
+\Yang@def@fontsize{xiaoer}{18bp}
+\Yang@def@fontsize{sanhao}{16bp}
+\Yang@def@fontsize{xiaosan}{15bp}
+\Yang@def@fontsize{sihao}{14bp}
+\Yang@def@fontsize{banxiaosi}{13bp}
+\Yang@def@fontsize{xiaosi}{12bp}
+\Yang@def@fontsize{dawu}{11bp}
+\Yang@def@fontsize{wuhao}{10.5bp}
+\Yang@def@fontsize{xiaowu}{9bp}
+\Yang@def@fontsize{liuhao}{7.5bp}
+\Yang@def@fontsize{xiaoliu}{6.5bp}
+\Yang@def@fontsize{qihao}{5.5bp}
+\Yang@def@fontsize{bahao}{5bp}
+
+% 图片搜索目录
+\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}{./front/}}
+
+% 页面设置
+\RequirePackage{geometry}
+\geometry{
+ a4paper,
+ left=30mm,
+ right=30mm,
+ top=41mm,
+ bottom=30mm,
+ headheight = 2.17cm,
+ headsep = 1mm,
+ footskip = 0cm,
+}
+
+% 超链接设置
+\RequirePackage{hyperref}
+\hypersetup{
+ breaklinks,
+ unicode,
+ linktoc=all,
+ bookmarksnumbered=true,
+ bookmarksopen=true,
+ pdfsubject=\@author \@title Book,
+ pdftitle = {哈尔滨工业大学(深圳)本科毕业设计(论文)},
+ pdfauthor = {\@author},
+ pdfkeywords={YangBook},
+ pdfcreator={XeLaTeX with YangThesis class},
+ colorlinks,
+ linkcolor=black,
+ citecolor=black,
+ plainpages=false,
+ pdfstartview=FitH,
+ pdfborder={0 0 0},
+}
+
+% 章节设置
+\RequirePackage[pagestyles]{titlesec}
+\RequirePackage{apptools}
+\RequirePackage[toc,page]{appendix}
+
+% 更改章节编号样式
+\setcounter{secnumdepth}{3}
+\renewcommand{\chaptername}{第 \thechapter\;章}
+
+% 设置章节标题样式
+\titleformat{\chapter}[hang]{\centering\heiti}
+{\filcenter\xiaoer\enspace\heiti{\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\xiaoer}
+
+% 设置节标题样式
+\titleformat{\section}[hang]{\heiti}
+{\xiaosan\heiti{\thesection}\enspace}{1pt}{\xiaosan\heiti\filright}
+
+% 设置条标题样式
+\titleformat{\subsection}[hang]{\heiti}
+{\sihao\heiti\thesubsection\enspace}{1pt}{\sihao\heiti\filright}
+
+% 设置四级标题样式
+\titleformat{\subsubsection}[hang]{\heiti}
+{\xiaosi\heiti\thesubsubsection\enspace}{1pt}{\xiaosi\heiti\filright}
+
+% 设置标题与上下文间距
+% \titlespacing*{<command>}{<left>}{<before-sep>}{<after-sep>}[<right-sep>]
+\titlespacing{\chapter}{0pt}{0bp}{14.4bp}
+\titlespacing{\section}{0pt}{7.5bp}{7.5bp}
+\titlespacing{\subsection}{0pt}{7bp}{7bp}
+\titlespacing{\subsubsection}{0pt}{6bp}{6bp}
+
+% 图表标题设置,字号为small,分割符为空格
+\RequirePackage[font=small,labelsep=quad]{caption}
+
+% 标题与图表的间距为3pt
+\captionsetup[table]{skip=3pt}
+\captionsetup[figure]{skip=10pt}
+
+% 图表的引用格式
+\newcommand\figref[1]{图\ref{#1}}
+\newcommand\tabref[1]{表\ref{#1}}
+\newcommand\equref[1]{式(\ref{#1})}
+
+% 设置列表环境各项间无自动间距
+\setlist{nolistsep}
+
+% 定义各类定理样式
+\RequirePackage{amsthm}
+\let\proof\relax
+\let\endproof\relax
+
+% 定义新定义样式
+\newtheoremstyle{ydefstyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
+
+% 定义新定理样式
+\newtheoremstyle{ythmstyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
+
+% 定义新命题样式
+\newtheoremstyle{yprostyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
+
+% 应用定义样式
+\theoremstyle{ydefstyle}
+\newtheorem{ydefinition}{\definitionname }[chapter]
+
+% 应用定理样式
+\theoremstyle{ythmstyle}
+\newtheorem{ytheorem}{\theoremname }[chapter]
+\newtheorem{ylemma}{\lemmaname }[chapter]
+\newtheorem{ycorollary}{\corollaryname }[chapter]
+\newtheorem{ypostulate}{\postulatename }[chapter]
+\newtheorem{yaxiom}{\axiomname }[chapter]
+
+% 应用命题样式
+\theoremstyle{yprostyle}
+\newtheorem{yproposition}{\propositionname }[chapter]
+
+% 定义新定理环境
+\newenvironment{theorem}[2]
+ {\ifstrempty{#1}{\ytheorem}{\ytheorem[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endytheorem}
+
+% 定义新定义环境
+\newenvironment{definition}[2]
+ {\ifstrempty{#1}{\ydefinition}{\ydefinition[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endydefinition}
+
+% 定义新引理环境
+\newenvironment{lemma}[2]
+ {\ifstrempty{#1}{\ylemma}{\ylemma[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endylemma}
+
+% 定义新推论环境
+\newenvironment{corollary}[2]
+ {\ifstrempty{#1}{\ycorollary}{\ycorollary[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endycorollary}
+
+% 定义新公设环境
+\newenvironment{postulate}[2]
+ {\ifstrempty{#1}{\ypostulate}{\ypostulate[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endypostulate}
+
+% 定义新公理环境
+\newenvironment{axiom}[2]
+ {\ifstrempty{#1}{\yaxiom}{\yaxiom[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endyaxiom}
+
+% 定义新命题环境
+\newenvironment{proposition}[2]
+ {\ifstrempty{#1}{\yproposition}{\yproposition[#1]}\ifstrempty{#2}{}{\label{#2}}}
+ {\endyproposition}
+
+% 定义新注解环境
+\newenvironment{note}{
+ \par\noindent\textbf{\notename\,}
+ \itshape}{\par}
+
+% 定义新证明环境
+\newenvironment{proof}{
+ \par\noindent\textbf{\proofname\;}
+}{\hfill$\Box$\quad\par}
+
+% 定义新解答环境
+\newenvironment{solution}{\medskip\par\noindent\textbf{\solutionname} \itshape}{\par}
+
+% 定义新注释环境
+\newenvironment{remark}{\noindent\textbf{\remarkname}}{\par}
+
+% 定义新假设环境
+\newenvironment{assumption}{\par\noindent\textbf{\assumptionname}}{\par}
+
+% 定义新结论环境
+\newenvironment{conclusion}{\par\noindent\textbf{\conclusionname}}{\par}
+
+% 定义新性质环境
+\newenvironment{property}{\par\noindent\textbf{\propertyname}}{\par}
+
+
+% 重定义<\maketitle>命令
+\renewcommand{\maketitle}{\par
+ \begingroup
+ \newgeometry{left=20mm,right=20mm,top=30mm,bottom=35mm}
+ \newpage
+ % 禁止图片位于页面最上方
+ \global\@topnum\z@
+ \@maketitle % 下面再设置封面具体内容
+ \endgroup
+ % 先取消原来封面样式的所有设置,以便后面重写此命令
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+}
+
+% 定义封面具体内容
+\newdimen\infowidth
+\infowidth = 6.5cm
+\def\@maketitle{%
+ \newpage
+ % 开始写封面
+ \thispagestyle{empty}
+ \vspace*{2cm}
+ %%------------------------
+ \begin{center}
+ \ifdefstring{\Yang@covertitle}{tworow}{
+ \parbox[t][1.4cm][t]{\textwidth}{
+ \begin{center}\erhao[0]\bfseries\Yang@tokens@titleone\end{center}
+ }\par
+ \parbox[t][2.5cm][t]{\textwidth}{
+ \begin{center}\erhao[0]\bfseries\Yang@tokens@titletwo\end{center}
+ }\par
+ }{\relax}
+ \ifdefstring{\Yang@covertitle}{onerow}{
+ \parbox[t][3.4cm][t]{\textwidth}{
+ \begin{center}\erhao[0]\bfseries\Yang@tokens@thesistitle\end{center}
+ }
+ }{\relax}
+ \parbox[t][8.7cm][t]{\textwidth}{
+ \begin{center}\xiaoer[0]\song\textbf{\ziju{0.2}\Yang@tokens@authorname}\end{center}
+ }
+ \begin{center}
+ \bfseries
+ \begin{tabular}{rl}
+{\xiaosi 学\hphantom{教师}院:} & \xiaosi\Yang@tokens@departname\\[14pt]
+{\xiaosi 学\hphantom{教师}号:} & \xiaosi\Yang@tokens@studentID
+ \end{tabular}
+ \hspace{0.5cm}
+ \begin{tabular}{rl}
+{\xiaosi 专\hphantom{教师}业:} & \xiaosi\Yang@tokens@majorin\\[14pt]
+{\xiaosi 指导教师:} & \xiaosi\Yang@tokens@instructor
+ \end{tabular}
+ \end{center}
+ % 日期
+ \vspace{2.6cm}
+ {\xiaosi[0]\song\textbf{2020年7月}}
+ \end{center}
+ %%----------------------------
+%% 第二页
+\clearpage
+\thispagestyle{empty}
+ \vspace*{0.8cm}
+ \centering\includegraphics[width=8cm]{HITSZname}
+ \vspace{1.3cm}
+ \begin{center}
+ \centering\includegraphics[width=10.5cm]{thesistitle}
+ \vfill
+ \parbox[t][14.2cm][b]{\textwidth}
+ {\heiti\xiaosan
+ \begin{center} \renewcommand{\arraystretch}{2.6} \bfseries
+ % 居中对齐
+ \ifdefstring{\Yang@infoalign}{infocenter}{
+ \begin{tabular}{l@{\ \ }c}
+
+ {\xiaoer 题\hphantom{\ 导\ \ \ }目} & \underline{\makebox[\infowidth]{\xiaoer \Yang@tokens@titleone}}\\
+ & \underline{\makebox[\infowidth]{\xiaoer \Yang@tokens@titletwo}}\\
+ & \\
+ {\xiaosan 专\hphantom{\ 导\ 教\ }业} & \underline{\makebox[\infowidth]{\xiaosan\Yang@tokens@majorin}}\\
+ {\xiaosan 学\hphantom{\ 导\ 教\ }号} & \underline{\makebox[\infowidth]{\xiaosan\Yang@tokens@studentID}}\\
+ {\xiaosan 学\hphantom{\ 导\ 教\ }生} & \underline{\makebox[\infowidth]{\xiaosan\Yang@tokens@authorname}}\\
+ {\xiaosan 指\ 导\ 教\ 师} & \underline{\makebox[\infowidth]{\xiaosan\Yang@tokens@instructor}}\\
+ {\xiaosan 答\ 辩\ 日\ 期} & \underline{\makebox[\infowidth]{\xiaosan\Yang@tokens@dateinput}}
+ \end{tabular} \renewcommand{\arraystretch}{1}
+ }{\relax}
+ % 左对齐
+ \ifdefstring{\Yang@infoalign}{infoleft}{
+ \begin{tabular}{l@{\ \ }c}
+
+ {\xiaoer 题\hphantom{\ 导\ \ \ }目} & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaoer \Yang@tokens@titleone}}\\
+ & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaoer \Yang@tokens@titletwo}}\\
+ & \\
+ {\xiaosan 专\hphantom{\ 导\ 教\ }业} & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaosan\Yang@tokens@majorin}}\\
+ {\xiaosan 学\hphantom{\ 导\ 教\ }号} & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaosan\Yang@tokens@studentID}}\\
+ {\xiaosan 学\hphantom{\ 导\ 教\ }生} & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaosan\Yang@tokens@authorname}}\\
+ {\xiaosan 指\ 导\ 教\ 师} & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaosan\Yang@tokens@instructor}}\\
+ {\xiaosan 答\ 辩\ 日\ 期} & \underline{\makebox[\infowidth][l]{\hspace*{1em}\xiaosan\Yang@tokens@dateinput}}
+ \end{tabular} \renewcommand{\arraystretch}{1}
+ }{\relax}
+ \end{center}
+ }
+ \end{center}
+ \restoregeometry
+ \clearpage
+}
+
+%% 中文摘要环境
+\newenvironment{abstract}{\chapter*{\abstractname}
+\addcontentsline{toc}{chapter}{\abstractname}
+}{\if@twocolumn\else\null\fi}
+
+% 中文关键词环境
+\newcommand\keywords[1]{%
+ \renewcommand{\Yang@tokens@keywords}{#1}
+ {\vskip18pt
+ \hspace{-30bp}\begin{tabular}{lp{132mm}}
+ {\zihao{-4}\heiti\keywordsname:}&
+ {\xiaosi\Yang@tokens@keywords}
+ \end{tabular}}
+ }
+
+% 英文摘要环境
+\newenvironment{abstracten}{\chapter*{\bfseries Abstract}
+\addcontentsline{toc}{chapter}{ABSTRACT}
+}{\if@twocolumn\else\null\fi}
+
+% 英文关键词环境
+\newcommand\keywordsen[1]{%
+ \renewcommand{\Yang@tokens@keywordsen}{#1}
+ {\vskip 18pt
+ \hspace{-30bp}\begin{tabular}{lp{127mm}}
+ {\zihao{-4}\bf\keywordsenname:}&
+ {\xiaosi\Yang@tokens@keywordsen}
+ \end{tabular}}
+ }
+
+% 定义原创性声明命令
+\newcommand{\declaration}{\par
+ \begingroup
+ \@declaration
+ \endgroup
+}
+
+% 定义原创性声明具体内容
+\def\@declaration{
+\chapter*{\sanhao 哈尔滨工业大学(深圳)本科毕业设计(论文)原创性声明}
+\addcontentsline{toc}{chapter}{原创性声明}\par
+本人郑重声明:在哈尔滨工业大学(深圳)攻读学士学位期间,所提交的毕业设计(论文)《\Yang@tokens@thesistitle》,是本人在导师指导下独立进行研究工作所取得的成果。对本文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明,其它未注明部分不包含他人已发表或撰写过的研究成果,不存在购买、由他人代写、剽窃和伪造数据等作假行为。
+\par
+本人愿为此声明承担法律责任。\par
+\vspace{30pt}
+\hspace{6em}作者签名:\hspace{8em}日期:\hspace{3em}年\hspace{1.5em}月\hspace{1.5em}日
+}
+
+% 定义附录,编号格式为大写字母
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\appendixname\@Alph\c@section}}
+
+% 重定义参考文献环境
+\renewenvironment{thebibliography}[1]
+ {\chapter*{\bibname}%
+ \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
+ \list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist}
+
+% 定义页眉页脚
+\RequirePackage{fancyhdr}
+\RequirePackage{lastpage}
+\pagestyle{fancy}
+% 页眉
+\lhead{}
+\chead{\wuhao 哈尔滨工业大学(深圳)本科毕业设计(论文)}
+\rhead{}
+% 页脚
+\lfoot{}
+\cfoot{\wuhao -\thepage-}
+\rfoot{}
+
+% 定义页眉双横线样式
+% 注意下面代码中的<%>不能删
+\newcommand{\makeheadrule}{%
+\makebox[0pt][l]{\rule[1mm]{\headwidth}{0.4mm}}%
+\rule[0.35\baselineskip]{\headwidth}{0.8mm}}
+
+% 定义页眉横线为双横线
+\renewcommand{\headrule}{%
+{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi%
+\makeheadrule}}
+
+% 设置目录格式,目录只有三级
+% 1级目录格式
+\titlecontents{chapter}[0pt]{\vspace{1mm}\heiti}
+{第\thecontentslabel 章\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
+% 2级目录格式
+\titlecontents{section}[25pt]{\songti}
+{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
+% 3级目录格式
+\titlecontents{subsection}[47pt]{\songti}
+{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
+
+% 修改表格字号,注意tabular要放在table环境里
+\BeforeBeginEnvironment{tabular}{\wuhao}
+% 修改表格与后文间距,缩短1cm
+\AfterEndEnvironment{table}{\vspace{-1cm}}
+
+% 新计数器,编排表格编号用
+\newcounter{rowno}
+
+% 使公式图表的编号随章节编号更新
+%\numberwithin{equation}{chapter}
+%\numberwithin{figure}{chapter}
+%\numberwithin{table}{chapter}
+
+% 设置图表公式编号格式为1-1
+\renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}
+\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}
+\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}
+
+% 使用tikz配置流程图基本图形
+\usetikzlibrary{shapes.geometric, arrows}
+% 开始
+\tikzstyle{startstop} = [rectangle, rounded corners, minimum width = 2cm, minimum height=1cm,text centered, draw = black]
+% 输入输出
+\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=2cm, minimum height=1cm, text centered, draw=black]
+% 过程
+\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black]
+% 判断
+\tikzstyle{decision} = [diamond, aspect = 3, text centered, draw=black]
+% 箭头形式
+\tikzstyle{arrow} = [->,>=stealth]
+
+% 参考文献标号为上标
+\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
+
+% 设置脚注编号格式
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+% 解决book类文档章首页和目录页没有页眉页脚的问题
+\makeatletter
+\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{fancy} % original style: plain
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+\makeatother
+
+%%=====新数学命令================================
+\newcommand\dif{\text{d}}
+\newcommand\no{\noindent}
+\newcommand\dis{\displaystyle}
+\newcommand\ls{\leqslant}
+\newcommand\gs{\geqslant}
+
+\newcommand\limit{\dis\lim\limits}
+\newcommand\limn{\dis\lim\limits_{n\to\infty}}
+\newcommand\limxz{\dis\lim\limits_{x\to0}}
+\newcommand\limxi{\dis\lim\limits_{x\to\infty}}
+\newcommand\limxpi{\dis\lim\limits_{x\to+\infty}}
+\newcommand\limxni{\dis\lim\limits_{x\to-\infty}}
+\newcommand\limtpi{\dis\lim\limits_{t\to+\infty}}
+\newcommand\limtni{\dis\lim\limits_{t\to-\infty}}
+
+\newcommand\sumn{\dis\sum\limits_{n=1}^{\infty}}
+\newcommand\sumnz{\dis\sum\limits_{n=0}^{\infty}}
+
+\newcommand\sumi{\dis\sum\limits_{i=1}^{\infty}}
+\newcommand\sumiz{\dis\sum\limits_{i=0}^{\infty}}
+\newcommand\sumin{\dis\sum\limits_{i=1}^{n}}
+\newcommand\sumizn{\dis\sum\limits_{i=0}^{n}}
+
+\newcommand\sumk{\dis\sum\limits_{k=1}^{\infty}}
+\newcommand\sumkz{\dis\sum\limits_{k=0}^{\infty}}
+\newcommand\sumkn{\dis\sum\limits_{k=0}^n}
+\newcommand\sumkfn{\dis\sum\limits_{k=1}^n}
+
+\newcommand\pzx{\dis\frac{\partial z}{\partial x}}
+\newcommand\pzy{\dis\frac{\partial z}{\partial y}}
+
+\newcommand\pfx{\dis\frac{\partial f}{\partial x}}
+\newcommand\pfy{\dis\frac{\partial f}{\partial y}}
+
+\newcommand\pzxx{\dis\frac{\partial^2 z}{\partial x^2}}
+\newcommand\pzxy{\dis\frac{\partial^2 z}{\partial x\partial y}}
+\newcommand\pzyx{\dis\frac{\partial^2 z}{\partial y\partial x}}
+\newcommand\pzyy{\dis\frac{\partial^2 z}{\partial y^2}}
+
+\newcommand\pfxx{\dis\frac{\partial^2 f}{\partial x^2}}
+\newcommand\pfxy{\dis\frac{\partial^2 f}{\partial x\partial y}}
+\newcommand\pfyx{\dis\frac{\partial^2 f}{\partial y\partial x}}
+\newcommand\pfyy{\dis\frac{\partial^2 f}{\partial y^2}}
+
+\newcommand\intzi{\dis\int_{0}^{+\infty}}
+\newcommand\intd{\dis\int}
+\newcommand\intab{\dis\int_a^b}
+
+\newcommand{\degree}{^\circ}
+
+\newcommand\ma{\mathcal{A}}
+\newcommand\mb{\mathcal{B}}
+\newcommand\mc{\mathcal{C}}
+\newcommand\me{\mathcal{E}}
+\newcommand\mg{\mathcal{g}}
+
+\newcommand\mcc{\mathbb{C}}
+\newcommand\mrr{\mathbb{R}}
+\newcommand\mzz{\mathbb{Z}}
+
+\newcommand\mx{\bf{x}}
+\newcommand\mX{\bf{X}}
+\newcommand\my{\bf{y}}
+\newcommand\mY{\bf{Y}}
+%%=============================================
+
+%%=====定义新数学符号===============================
+\DeclareMathOperator{\sgn}{sgn}
+\DeclareMathOperator{\arccot}{arccot}
+\DeclareMathOperator{\arccosh}{arccosh}
+\DeclareMathOperator{\arcsinh}{arcsinh}
+\DeclareMathOperator{\arctanh}{arctanh}
+\DeclareMathOperator{\arccoth}{arccoth}
+\DeclareMathOperator{\grad}{\bf{grad}}
+\DeclareMathOperator{\argmax}{argmax}
+\DeclareMathOperator{\argmin}{argmin}
+\DeclareMathOperator{\diag}{diag}
+\DeclareMathOperator{\csign}{csign}
+%===============================================
+
+%%===============================================
+%% End of file `HITSZThesis.cls'
+%%=============================================== \ No newline at end of file
diff --git a/macros/latex/contrib/hitszthesis/hitszthesis.pdf b/macros/latex/contrib/hitszthesis/hitszthesis.pdf
new file mode 100644
index 0000000000..d5deb617d1
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/hitszthesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/hitszthesis/hitszthesis.tex b/macros/latex/contrib/hitszthesis/hitszthesis.tex
new file mode 100644
index 0000000000..1cf3905598
--- /dev/null
+++ b/macros/latex/contrib/hitszthesis/hitszthesis.tex
@@ -0,0 +1,615 @@
+%%=============================================
+% !Mode:: "TeX:UTF-8"
+% !TEX program = XeLaTeX
+%%=============================================
+% 模板名称:HITSZThesis
+% 模板版本:V1.2
+% 模板作者:JingXuan Yang
+% 联系作者:yangjingxuan@stu.hit.edu.cn & yanglatex2e@gmail.com
+% 模板来源:yangtemplate、hithesis与elegantbook综合
+% 模板适用:哈尔滨工业大学(深圳)本科毕业设计(论文)
+% 模板编译:XeLaTeX,编译两次,两次,两次!!!
+% 更新时间:02/15/2020
+% 模板依赖:mtpro2公式字体,安装方法参见:
+% https://www.latexstudio.net/archives/51742.html
+% 模板说明:本模板尽量把接口留在了类文件外面,但是顾名思义,模板即为
+% 部分样式的集合,有些样式是定义在类文件里面的,在外面无法
+% 修改。类文件中注释齐全,很多样式可以个性化定义,建议拥有
+% 一定LaTeX基础以后再尝试修改类文件(YangThesis.cls),请
+% 善用命令行<texdoc xxx>查询帮助文档
+% 模板命令:设置字号可以直接用<\yihao,...,\xiaosi>等命令;
+% 文献引用两种方式:右上角<\upcite{}>,正文<\cite{}>;
+% 图表及公式引用:<\figref{}>,<\tabref{}>,<\equref{}>;
+% 模板使用<siunitx>宏包书写单位
+% 模板交流:QQ群:1039392552,加群请备注LaTeX、HITSZThesis相关说明
+%%=============================================
+
+% 设置文档类别为<hitszthesis>
+\documentclass{hitszthesis}
+
+% 模板提供两个选项
+% 1. 封面标题单行或多行显示:
+%% onerow(默认,单行),tworow(两行)
+% 2. 封面第二页下划线内容居中或居左显示:
+%% infocenter(默认,居中),infoleft(居左)
+
+% 示例:两行,居左,将<\documentclass{hitszthesis}>注释,
+% 且将下面语句取消注释
+%\documentclass[tworow, infoleft]{hitszthesis}
+
+% 填写封面信息
+% 论文标题
+\thesistitle{基于神经网络的机器人智能抓取研究}
+% 标题拆分为两行
+% 第一行标题
+\titleone{基于神经网络的}
+% 第二行标题
+\titletwo{机器人智能抓取研究}
+% 学校名称
+\schoolname{哈尔滨工业大学(深圳)}
+% 学院名称
+\departname{机电工程与自动化学院}
+% 专业
+\majorin{机械设计制造及其自动化}
+% 姓名
+\authorname{杨敬轩}
+% 学号
+\studentID{SZ160310217}
+% 答辩日期
+\dateinput{2020年6月7日}
+% 指导教师
+\instructor{XX 教授}
+
+%%=============================================
+% 开始写文章
+% !!注意本文仅作为排版格式示例,并不作为毕业论文规范
+\begin{document}
+
+% 若题目过长,则需使用一下命令调整封面第二页下划线宽度
+%\infowidth = 8cm
+
+% 生成封面两页
+\maketitle
+
+% 封面页与正文布局不同,此处恢复正文的布局设置
+\restoregeometry
+
+% 页码从1开始计数
+\setcounter{page}{1}
+% 页码采用罗马数字格式
+\pagenumbering{Roman}
+
+% 开始写摘要
+\begin{abstract}
+
+近年来,基于神经网络方法的机器人智能抓取物体的研究方兴未艾。本文首先介绍了该研究的背景,采用神经网络的方法进行机器人智能抓取研究是一个可行的方案。
+
+而后,本文总结归纳了神经网络在机器人智能抓取领域的研究历史与研究现状。由实值神经网络的三个里程碑意义的模型到复值神经网络的兴起,神经网络的模型得到了极大地扩展。基于深度学习的方法已经在机器人视觉识别领域取得了重大的成就,识别要抓取的物体图像以后,机器人的抓取策略也很有讲究。
+
+本文还重点介绍了基于三种不同的神经网络方法进行的机器人智能抓取研究。首先是基于复值神经网络的方法,该方法包含离散、连续、多值三种模型,复值神经网络以其自然的复数处理能力,使得图像等常需频域处理的信号有了直接的表达和处理方式。
+
+然后是基于轻量级卷积神经网络的方法,目前基于神经网络的机器人抓取位姿预测方法的研究使用的网络结构通常具有大量的参数,需要大量的计算和存储资源。基于 SqueezeNet 的轻量级卷积神经网络抓取预测模型在不降低准确率的情况下,网络模型更小,需要的存储资源更少,速度更快。
+
+最后是基于级联卷积神经网络的方法,该方法提出一种抓取姿态细估计的卷积神经网络模型 Angle-Net,在此基础上,提出一种两阶段级联式抓取位姿检测模型。
+
+% 中文关键词
+\keywords{轻量级;卷积神经网络;复值神经网络;级联神经网络;轻量级卷积神经网络;位姿检测模型}
+\end{abstract}
+
+% 英文摘要
+\begin{abstracten}
+
+In recent years, the research of intelligent object grabbing by robots based on neural network method is in the ascendant. Firstly, this paper introduces the background of this research, and it is a feasible scheme to apply the neural network method to the intelligent grasping of robots.
+
+Then, this paper summarizes the research history and status quo of neural network in the field of robotic intelligent grasping. From the three milestone models of real-valued neural networks to the emergence of complex-valued neural networks, the model of neural networks has been greatly expanded. The method based on deep learning has made great achievements in the field of robot vision recognition. After recognizing the object image to be grasped, the strategy of robot grasping is also very exquisite.
+
+This paper also focuses on the intelligent grasping of robots based on three different neural network methods. Firstly, the method based on complex-valued neural network includes three models: discrete, continuous and multi-valued. Complex-valued neural network, with its natural complex processing ability, makes the signal which often needs to be processed in frequency domain, such as image, have a direct expression and processing mode.
+
+Then it is based on the method of lightweight convolution neural network. At present, the network structure used in the research of robot grasping pose prediction method based on neural network usually has a large number of parameters, which requires a lot of computing and storage resources. The grabbing prediction model of lightweight convolutional neural network based on SqueezeNet has smaller network model, less storage resources and faster speed without reducing accuracy.
+
+Finally, based on the method of cascade convolution neural network, a convolution neural network model Angle-Net for fine grabbing attitude estimation is proposed. On this basis, a two-stage cascade grabbing pose detection model is proposed.
+
+% 英文关键词
+\keywordsen{Lightweight, Convolutional Neural Network, Complex Neural Network, Two stage cascade grabbing pose detection model}
+\end{abstracten}
+
+% 生成目录
+\tableofcontents
+
+% 分页,撰写正文
+\clearpage
+
+% 第1章的标题
+\chapter{绪论}
+
+% 页码从1开始计数
+\setcounter{page}{1}
+% 页码格式采用阿拉伯数字
+\pagenumbering{arabic}
+
+% 正文内容,注意LaTeX分段有两种方法,直接空一行或者使用<\par>
+% 默认首行缩进,不需要在代码编辑区手动敲空格
+随着社会发展,人口老龄化,劳动力短缺等问题逐渐凸显,对服务机器人的需求也越来越大,但是服务机器人所工作的非结构化环境也带来了许多技术难题,其中十分主要的一个问题就是非结构环境中机器人的自动抓取,因为抓取是机器人与现实世界交互的主要方式之一。不同于工业机器人在结构化环境中对工件的抓取,服务机器人在非结构化环境下的自动抓取面临着诸多挑战,例如动态化环境、光照变化、物体间存在相互遮挡,以及最主要的,非结构化环境中除了已知的物体,还有大量未知物体。对于非结构化环境中工作的服务机器人,预先获取所有需要进行抓取的物体的模型是不现实的,因此机器人必须能够对未知的物体在线进行快速稳定可靠的抓取规划。
+
+为了解决上述问题,常用的一种做法就是使用机器学习方法来学习从传感器数据提取出的特征表达到抓取位姿的映射关系,相比于建立物体的模型库来保存抓取经验,机器学习方法可以在没见过的物体上进行抓取经验的迁移。在这个领域中,一些传统的方法通常借助于人工设计的特征来表示和存储抓取经验,并训练分类器,但人工设计的特征往往只针对于某一种特定物体或任务有效,且人工设计特征的工作量大难度高,很难在其他场景进行使用。
+
+近年来,以卷积神经网络(Convolutional Neural Network, CNN)为代表的深度学习技术,在计算机视觉和机械设备健康监测等诸多领域取得了重大的突破,在一些领域中达到了超过人类的性能。卷积神经网络可以通过大量数据的训练挖掘出适合于当前任务的特征表达,由于通常卷积神经网络需要堆叠很多层来提高特征表达能力,因此参数较多,需要使用比传统机器学习算法更多的标注数据来进行训练,抑制过拟合提高算法的泛化能力。
+
+在机器人抓取规划领域,使用卷积神经网络学习的特征取代人工设计的特征来对抓取进行表示和分类有很大的优势和应用前景。首先,相比于人工设计的特征,卷积神经网络通过大量数据的学习可以挖掘出泛化能力更强效果更好的特征,可以进一步提高抓取规划算法的性能,且省去了复杂的人工特征设计工作。其次,随着硬件计算力和仿真软件性能的提升,视觉传感器的普及,目前已有许多通过实验或者仿真收集的机器人抓取数据集可供使用。
+
+综上,有了足够的数据以及合理设计的卷积神经网络结构就可以建立更高性能的自动抓取规划算法,进而提高服务机器人在非结构化环境的交互能力,提高其自主化和智能化程度,提高服务机器人的实用性和推进产业落地。因此,基于卷积神经网络的机器人自动抓取规划具有重要的研究价值,可以带来巨大的经济效益。
+
+% 第2章的标题
+\chapter{文献综述}
+
+% 第2章第1节的标题
+\section{实值神经网络发展历程}
+
+% <\upcite{}>为在右上角引用参考文献命令
+% <\cite{}>为在正文中引用参考文献命令
+% 目前不支持[1-6]类型的引用,需手动填写<$^{[1\text{-}6]}$>
+
+人类利用人工神经网络对生物神经网络的结构、机理和功能模拟的研究,经历了近半
+个多世纪漫长而又曲折的过程。具有里程碑意义的是如下三个模型\upcite{bibc1,bibc2}。
+
+1943年神经生理学家McCulloch和数学家Pitts提出的第一个人工神经网络模型:
+McCulloch-Pitts模型\upcite{bibc3},成为神经网络研究的开端。1949年心理学家D.O.Hebb在文献\upcite{bibc4}中提出了神经元之间突触联系强度可以改变的假设,并据此提出了神经元学习的准则,为神经网络的学习算法奠定了基础。这些重大进展促进了神经网络早期的研究。
+
+1958年Rosenblat将McCulloch和Pitts的工作与Hebb的工作结合在一起,设计出的
+一种称为感知机的神经网络模型\upcite{bibc5},首次把人工神经网络的研究从理论付诸工程实践,引起了许多科学家的兴趣。不过在1969年,人工智能创始人之一Minsky和Papert出版了以《感知机》为名的书\upcite{bibc6},书中从数学上深入分析了感知机的原理,指出了其局限性并从理论上对感知机的原理给予了沉重的打击,使得神经网络早期的研究热潮迅速降温,并开始陷入低潮和休眠状态。
+
+% <\/>命令解决fi、ff等上边连接在一起的问题
+1982年和1984年美国加州理工大学的生物物理学家J.J.Hopf\/ield提出了Hopf\/ield神经网络\upcite{bibc7,bibc8}。Hopf\/ield神经网络模型的提出具有划时代的伟大意义,使得神经网络的研究从体眠的状态开始复苏。Hopf\/ield在文献\cite{bibc7,bibc8}中设计出用电子电路实现这一网络的方案,从而为神经计算机的研究奠定了基础。更为重要的是他把设计出的神经网络应用于联想记忆以及解决优化领域一直困扰的TSP问题,并取得了巨大的成功,这些重大进展大大促进了神经网络的研究。此外,他还通过引入类似于Lapunov函的“计算能量函数”的概念对网络的动力学特性进行了分析并给出了网络稳定性的条件,从而开启了神经网络稳定性研究。
+
+% 节标题
+\section{复值神经网络的兴起}
+
+复值神经网络(Complex-valued Neural Network)是实值神经网络在复数域的推广。相比实值神经网络,复值神经网络的起步稍晚。其历史可追溯到1975年Widrow提出的复值最小均方(LMS)算法,该算法后来被广泛运用于信号处理领域\upcite{bibc9}。但正如复数的出现和被人认可经历了一个漫长的过程一样,复值神经网络在出现后的相当长时间,并未引起人们的重视。直至近几年来,随着神经网络应用领域的不断扩展,许多需要处理复数信号的领域也提出了用神经网络解决其相关问题的要求,例如量子力学、电磁学、光电子、图像、遥感、时间序列分析等。在这些领域中,基于复数信号的表示、分析和处理具有极大的便利,而复值神经网络则能直接处理复数信号,因而很自然地使二者联系在一起。事实上,在需要幅值和相位(或理解为大小和方向)两方面信息来表示同一信号的场合,运用复值神经网络较之实值神经网络,要更为直接。尽管可以用2个实值神经网络分别表达此类信号的大小和方向(或实部和虚部),但正如复数虽然只是两个实数按某种规则而连接,但依然有其独立于实数而存在的必要性一样,复值神经网络由于复数有实部和虚部,且复数运算规则的特殊性等原因,在其实现和运用过程中表现出一些实值神经网络所不具有特质,因此复值神经网络也不能简单地理解为可用2个实值神经网络所取代。而且在将神经网络从实数域到复数域的推广中,并不是像表面上理解的那样:仅是简单地将一个变量从实数变成复数。如果这样做的话,许多诸如奇异等意想不到的问题就有可能发生\upcite{bibc10}。
+
+作为复值神经网络研究领域的先导者,日本的Akira Hirose教授总结了近年来复值神经网络的研究成果,并出版一本名为《复值神经网络的理论及应用》专著\upcite{bibc10}。书中总结了近年来复值神经网络理论的发展和应用情况。
+
+% 节标题
+\section{抓取物体图像识别}
+
+近年来,基于深度学习的方法已经在包括视觉识别\upcite{bib1,bib2},语音识别和自然语言处理等任务上取得了重大成就。美国康奈尔大学 Lenz 等\upcite{bib3}借鉴深度学习在图像检测及图像识别等任务中的成功经验,提出了基于深度学习的机器人抓取检测的方法\upcite{bib3,bib4}。与传统的依靠人工经验抽取样本点特征的方式相比,基于深度学习的机器人抓取检测的方法可以自动学习如何识别和提取待抓取位置的特定特征。越来越多的机器人学者研究如何将深度学习的方法应用于机器人抓取检测上从而使机器人具备更强大的智能。大部分研究学者都是将深度学习的方法用来学习不同形状和位姿的物体的末端执行器的最佳配置,基于深度学习的深层表达能力学习的参数为每个图像预测多个抓取位置进行排序来找到最佳抓取位置。
+
+基于深度学习的方法,Lenz 等\upcite{bib3}提出了基于稀疏自编码器的两步级联抓取检测系统,构建两个大小网络用于提取 RGB-D 输入数据的抓取特征,采用滑动窗的方法搜索抓取框,最后在网络顶层添加支持向量机(Support Vector Machine,SVM)作为分类器的网络结构。在标准康奈尔抓取数据集\upcite{bib6}上达到 73.9\%的检测准确率,耗时13.5s,由于采用类似于穷举法的搜索机制,需要在不同大小的图像块上使用分类器进行重复计算,计算量非常大,且十分耗时。
+
+Redmon 等\upcite{bib7}认为采用滑动窗口的方法来预测抓取位置是一种非常耗时的方法,而且使用单阶段的网络性能优于 Lenz 等的级联系统。为了避免在不同大小的图像块上重复计算,他们利用卷积神经网络强大的特征提取能力将整个图像输入网络中,在整个图像上直接进行全局的抓取预测,目前大部分学者采用这种方案\upcite{bib5,bib8}。使用类似于 AlexNet\upcite{bib9}的卷积神经网络模型来实现单阶段的检测方法,以更快的速度达到了更高的检测精度,但是这种方法由于卷积神经网络结构的复杂性仍然存在模型较大的缺陷。
+
+Kumra 等\upcite{bib4}也采用将整个图像输入卷积神经网络中进行全局的抓取预测,网络结构上,他们采用网络结构更复杂特征提取能力更强的ResNet50提取抓取特征\upcite{bib10},用 SVM 预测抓取配置的参数。精度上可以达到比较好的检测精度,但是由于模型采用层数较深的残差网络,导致网络模型和计算量都比较大。
+
+Chu 等\upcite{bib5}提出了一种适合于多物体场景抓取模型,首先使用 ResNet50 对输入图像提取抓取特征,然后使用类似于 RPN 网络的模型进行抓取框的推荐,最后经 ROI Pooling 进行角度参数的分类和抓取框的回归。这种模型适用于多物体的抓取场景, 并且达到了较高的抓取检测准确率,由于模型较深且类似于级联系统导致模型较大。
+
+% 节标题
+\section{机器人抓取策略}
+
+在机器人分拣、 搬运等抓取作业任务中,包括顶抓(top-grasp)和侧抓(side-grasp) 2 种方式的平面抓取(planar grasp)是最为常用的抓取策略。对于任意姿态的未知不规则物体,在光照不均、 背景复杂的场景下,如何利用低成本的单目相机实现快速可靠的机器人自主抓取姿态检测具有很大的挑战。
+
+机器人自主抓取姿态规划方法根据感知信息的不同可分为 2 类:一类是基于物体模型的抓取姿态估计\upcite{bibb1,bibb2,bibb3},一类是不依赖物体模型的抓取姿态检测。基于模型的方法需要给定精确、 完整的物体 3 维模型,然而低成本相机的成像噪声大,很难扫描建立精确模型。另外,基于 3 维模型的方法计算复杂,难以适应机器人实时抓取判断的需求。
+
+不依赖物体模型的方法借助于机器学习技术,其实质是将抓取位姿检测问题转化成目标识别问题。例如,文\cite{bibb4} 提出了一种用 2 维矢量矩形表示图像上物体抓取位姿的直观方法。机器学习方法的出现令抓取检测不局限于已知物体。早期的学习方法\upcite{bibb4} 需要人为针对特定物体设定特定的视觉特征,不具备灵活性。近年来,深度学习\upcite{bibb5} 发展迅速,其优越性正在于可自主提取与抓取位姿有关的特征。
+
+% 章标题
+\chapter{典型神经网络案例分析}
+
+% 节标题
+\section{基于复值神经网络的机器人智能抓取}
+
+% 条标题
+\subsection{一类离散时间复值Hopf\/ield神经网络的分析与综合}
+
+% <$x$>为行内公式
+假设网络神经元的个数为$n$,其中第$i$个神经元的动态描述为:
+% 行间公式环境,此公式环境有自动标号
+\begin{equation}
+\left\{
+\begin{aligned}
+ u_i(k+1)&=\sum\limits_{j=1}^nT_{ij}V_{j}(k)+a_iu_i(k)+I_i\\
+ V_i(k)&=g_i[u_i(k)]+\intab x\dif x
+\end{aligned}
+\right.
+\end{equation}
+其中$u_i(k)\in \mathbb{C},\ V_i(k)\in \mcc$和$I_i\in\mcc$分别为第$i$个神经元在$k$步的状态、输出和阈值,$T_{ij}\in\mcc$为第$j$个神经元到第$i$个神经元的连接权值,$a_i\in\mrr$是第$i$个神经元的动态时间常数,$g(\cdot)$为某种非线性复值函数,即$g_i:\ \mcc\rightarrow\mcc$。
+
+若定义$\mathbf{u}=[u_1,\cdots,u_n]^T\in\mcc^n,\ \mathbf{ V}=[V_1,\cdots,V_n]^T\in\mcc^n,\ \mathbf{g}=[g_1,\ldots,g_n]^T\in\mcc^n\rightarrow\mcc^n,\ \mathbf{ T}
+=[T_{ij}]\in\mcc^{n\times n},\ \mathbf{A}=\diag(a_i)\triangleq \diag(A_{ii})
+\in\mcc^{n\times n},\ \mathbf{ I}=[I_{i}]\in\mcc^{n}$,则系统动态可写成:
+\begin{equation}
+\left\{
+\begin{aligned}
+ \mathbf{u}(k+1)&=\mathbf{T}\cdot\mathbf{V}(k)+\mathbf{A}\mathbf{u}(k)+\mathbf{ I}\\
+ \mathbf{V}(k)&=\mathbf{g}[\mathbf{u}(k)]
+\end{aligned}
+\right.
+\end{equation}
+
+如果需要对公式的子公式进行编号,则使用\lstinline{subnumcases}环境:
+\begin{lstlisting}
+\begin{subnumcases}{\label{w} w\equiv}
+ 0 & $c = d = 0$\label{wzero}\\
+ \sqrt{|c|}\,\sqrt{\frac{1 + \sqrt{1+(d/c)^2}}{2}} & $|c| \geq |d|$ \\
+ \sqrt{|d|}\,\sqrt{\frac{|c/d| + \sqrt{1+(c/d)^2}}{2}} & $|c| < |d|$
+\end{subnumcases}
+\end{lstlisting}
+上述代码输出如下:
+\begin{subnumcases}{\label{w} w\equiv}
+0 & $c = d = 0$\label{wzero}\\
+\sqrt{|c|}\,\sqrt{\frac{1 + \sqrt{1+(d/c)^2}}{2}} & $|c| \geq |d|$ \\
+\sqrt{|d|}\,\sqrt{\frac{|c/d| + \sqrt{1+(c/d)^2}}{2}} & $|c| < |d|$
+\end{subnumcases}
+
+\equref{w}中,\lstinline{label:w}为整个公式的编号,\lstinline{label:wzero}为子公式的编号。
+
+% 条标题
+\subsection{一类连续复值 Hopf\/ield 神经网络}
+
+考虑一类复值Hopf\/ield神经网络,该网络具有$n$个神经元,其动态描述如下:
+\begin{equation}
+\left\{
+\begin{aligned}
+ \frac{\dif u_i(t)}{\dif t}&=-c_iu_i(t)+\sum\limits_{j=1}^na_{ij}V_{j}(t)+I_i\\
+ V_i(t)&=f_i[u_i(t)]
+\end{aligned}
+\right.
+\end{equation}
+
+其中$u_i(t)\in \mathbb{C},\ V_i(t)\in \mcc$和$I_i\in\mcc$分别为第$i$个神经元在时刻$t$的状态、输出和阈值,$a_{ij}\in\mcc$为第$j$个神经元到第$i$个神经元的连接权值,$c_i>0$是第$i$个神经元的动态时间常数,$f(\cdot)$为某种非线性复值函数,即$f_i:\ \mcc\rightarrow\mcc$。
+
+\subsection{一种具有多值状态的复值 Hopf\/ield 神经网络模型}
+具有多值状态的复值 Hopf\/ield 神经网络是传统的二值Hopf\/ield 神经网络在复数域的扩展。该网络具有$n$个神经元,单层全连接结构,每个神经元具有复平面单位圆上的$K$种状态,即若表示第$l$个神经元在第$k$步迭代中的状态为$x_l(k)$,则:
+\begin{equation}
+x_l(k)=\exp[{i\theta_K\cdot l(k)}],\ \theta_K=\frac{2\pi}{K},\ l(k)=0,\ 1,\ \cdots,\ K-1
+\end{equation}
+
+ \figref{figmulti}给出了状态种类 $K=8$时的神经元状态取值示例,其中状态种类数$K$平分复平面单位圆为$K$等分。当记第$j$个神经元到第$l$个神经元的连接权值为$w_{lj}$时,第$l$神经元在第$k$步迭代后的输出为:
+\begin{equation}
+y_l(k) = \csign_K\left(\sum\limits_{j=1}^n w_{lj}\cdot x_j(k)\right)
+% 公式标签,可用<\eqref{}>引用
+\label{eqiter}
+\end{equation}
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.5\textwidth]{figmutihopcomplex.png}
+ \caption{复值神经元状态$(K=8)$及状态转移规则}
+ % 图片标签,可用<\figref{}>引用
+ \label{figmulti}
+\end{figure}
+
+其中激活函数$\csign(\cdot)$定义如下:
+\begin{equation}
+\csign(u)=
+\left\{
+\begin{array}{cc}
+ e^{i0},&0\ls\arg[u\cdot\exp(i\pi/K)]<\frac{2\pi}{K}\\
+ e^{i\frac{2\pi}{K}},&\frac{2\pi}{K}\ls\arg[u\cdot\exp(i\pi/K)]<\frac{4\pi}{K}\\
+ \vdots&\vdots\\
+ e^{i\frac{2\pi}{K}(K-1)},&(K-1)\frac{2\pi}{K}
+ \ls\arg[u\cdot\exp(i\pi/K)]<2\pi\\
+\end{array}
+\right.
+\end{equation}
+
+可见,激活函数$\csign(\cdot)$实际上可理解为一种复数域上定义的signum函数,它将神经元状态的加权和映射到了复平面单位圆上最接近该加权和的量化点上,其间加权和幅值固定映射成了1。相应的状态转移过程如\figref{figmulti}所示。
+
+从激活函数的定义还可以看出,这种网络是一种全连接回归,且由于神经元的状态有$K$种$(K\gs2)$,因此可将该网络看作传统的二值Hopf\/ield神经网络在复数多值域中的扩展。于是,沿袭Hopf\/ield网络的状态更新方式,该类网络的状态更新也可分同步和异步两种:
+
+异步方式:网络中的神经元状态等概率地依\equref{eqiter}进行更新,一次只更新一个神经元状态;
+
+同步方式:网络的每次迭代中,所有神经元状态同时被更新,即依照下式更新:\begin{equation}
+{\mathbf{ X}}(k+1)=\mathbf{ Y}(k)=\csign[\mathbf{ W }\cdot\mathbf{ X }(k)]
+\end{equation}
+其中$\mathbf{ X}(k)$为神经元状态$x(k)$组成的列向量,$\mathbf{ W}=(w_{kj})$为整个网络的连接权矩阵。
+
+% 节标题
+\section{基于轻量级卷积神经网络的机器人智能抓取}
+
+% 条标题
+\subsection{机器人抓取检测的问题描述}
+
+目前基于神经网络的机器人抓取位姿预测方法的研究主要集中在结合基础分类网络如 AlexNet、ResNet 等提高抓取检测准确性上,这些网络最初是为复杂的分类任务和海量数据的特点而设计的,网络结构通常具有大量的参数,需要大量的计算和存储资源。针对上述深度学习抓取检测方法的不足,文献\cite{bib:one}提出了基于 SqueezeNet 的轻量级卷积神经网络抓取预测模型,在不降低准确率的情况下,该网络模型更小,需要的存储资源更少,速度更快,更适合于移动机器人平台中。 类似的设计轻量级模型的工作如\cite{bib11}。
+
+如\figref{figless1}所示的抓取位姿预测问题与如\figref{figless2}所示普通检测问题的区别在于:抓取位姿预测问题不只是在最佳抓取位置处预测出类似于普通检测问题形式的回归框,还要预测出最佳抓取位姿$(x,\ y,\ h,\ w,\ \theta)$。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.4\textwidth]{less1.jpg}
+ \caption{五维抓取表示}
+ \label{figless1}
+\end{figure}
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.3\textwidth]{less2.jpg}
+ \caption{普通检测表示}
+ \label{figless2}
+\end{figure}
+
+机器人抓取位姿检测问题可以被表述为对于给定对象的图像$I$找到最佳抓取位姿$g$。\figref{figless1}显示了一个五维抓取表示\upcite{bib3},以便对物体的潜在的最佳抓取位姿进行表示,五维抓取位姿$g$可以表示为\equref{eqgrasp}:
+\begin{equation}
+g=f(x,y,h,w,\theta)
+\label{eqgrasp}
+\end{equation}
+
+其中$(x,\ y)$是与抓取矩形的中心对应的坐标,$h$是平行板的高度,$w$是平行板之间的最大距离,$\theta$是抓取矩形相对于水平轴的取向。蓝线$h$表示二指机器人手爪的平行板,红线$w$对应于抓取之前手爪的平行板之间的距离,该五维抓取表示给出了在对物体执行抓取时平行板夹具的位置和方向。Lenz 等表明一个最佳的五维抓取表示可以被映射回一个可以被机器人用来执行抓取的七维抓取表示,还可以降低计算成本。
+
+% 条标题
+\subsection{多模态轻量级抓取检测模型架构}
+
+与以前的方法\upcite{bib3,bib4,bib5}相比,文献\cite{bib:one}使用一个小型轻量级的卷积神经网络架构 SqueezeNet-RM(SqueezeNet Regression Model),该架构结合 SqueezeNet\upcite{bib12}参数少的优点和 DenseNet\upcite{bib13}多旁路连接加强特征复用的思想能提升抓取检测准确率的优点,在康奈尔抓取数据集检测任务上,在保证准确率不降低的情况下,网络模型更小,所需存储空间更少,模型速度更快。
+
+如\figref{figflowchart}所示,整体架构的思想是在 SqueezeNet 网络模型中引入 DenseNet 增加旁路加强特征复用的思想,conv1 和 conv10 之后加入 Batch Normalization,并在最后一层后面添加一个全连接层。全连接层有六个输出神经元对应抓取矩形框的坐标,四个神经元对应位置和高度,抓取角度使用两个附加的参数化坐标:正弦和余弦的两倍角。网络直接从原始图像回归出抓取位姿$(x,y,h,w,\theta)$。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.4\textwidth]{flowchart}
+ \caption{SqueezeNet-RM 网络模型}
+ \label{figflowchart}
+\end{figure}
+
+% 条标题
+\subsection{SqueezeNet轻量级卷积神经网络架构}
+
+如\figref{figflowchart}, SqueezeNet-RM 网络模型以一个独立的卷积层 conv1 为开端,相邻的是 8 个 f\/ire 模块,之后加一个独立的卷积层 conv10,最后以一个最终的全连接层结束。在层 conv1,f\/ire4,f\/ire8 和 conv10 之后使用步长为 2 的 max-pooling、f\/ire2、f\/ire4、f\/ire6 分别向后面的每一层引出旁路连接,这些相对较后的 pooling 和旁路连接有助于提高检测精度。
+
+类似于 Inception\upcite{bib14}和 DenseNet\upcite{bib15}的模块化思想,SqueezeNet 神经网络采用了模块化的设计思想,它的基础模块称为 f\/ire 模块,如\figref{figfire}所示: f\/ire 模块含两部分:squeeze 层和 expand 层。首先使用$1\times1$的卷积操作对输入特征图进行压缩,其卷积核数要少于上一层 feature map 数,输出特征图的数量可以远比输入特征图的数量少,这是 squeeze层的设计。然后,采用不同大小的卷积核$1\times1$和$3\times3$进行卷积操作,将这些卷积操作的输出特征图 concat 起来,这是 expand 层操作,最终将特征图的数量提升上去。将上述 f\/ire 模块堆叠, 得到 SqueezeNet 网络。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.6\textwidth]{less3}
+ \caption{f\/ire模块}
+ \label{figfire}
+\end{figure}
+
+SqueezeNet 通过 f\/ire 模块和自身优化结构,采用了以下几种常用的策略实现参数的减少。策略 1: 使用$1\times1$过滤器替换$3\times3$过滤器,因为$1\times1$滤波器具有比$3\times3$滤波器少9倍的参数,见\figref{figfire}中 Squeeze 层。策略 2:使用 Squeeze 层将输入到$3\times3$过滤器的通道的数量减少。具体而言,对于一个完全由$3\times3$滤波器组成的卷积层,该层中的参数的总量是(输入通道的数量)$\times$(滤波器的数量)$\times3\times3$,因此,为了在 CNN 中保持小的参数总数,在采用策略1的同时还要减少$3\times3$滤波器的输入通道的数量。策略 3:延迟降采样, 以使卷积层具有大的激活图,见\figref{figflowchart}中的 Maxpool 位置,大的激活图(通过延迟降采样)可以获得更高的检测精度,有助于提高任务的准确性\upcite{bib16}。策略1和2在试图保持准确性的同时减少CNN中的参数的数量,策略3是在有限的参数运算量上最大化精度。
+
+文献\cite{bib:one}采用在ImageNet分类问题上表现最佳的SqueezeNet (Simple Bypass Conection) 架构\upcite{bib12}。 SqueezeNet是一个全卷积网络,在f\/ire9 层之后添加了一个随机失活层dropout\upcite{bib17},以避免过拟合,在 SqueezeNet 网络的最后一层添加一个全连接层Fully Connected Layer (FC层) 作为输出层。
+
+% 节标题
+\section{基于级联卷积神经网络的机器人智能抓取}
+
+% 条标题
+\subsection{机器人抓取检测的问题}
+
+机器人抓取检测问题包括 2 个部分:抓取位置确定和抓取姿态估计。传统的位置检测方法根据二值化的图像计算物体重心作为抓取位置,但是可抓取位置不在重心处的物体甚多。通常采用滑动窗口法\upcite{bibb6,bibb7} 解决抓取点不在重心上的问题,但此方法以遍历搜索获得最优解,时间代价大。文\cite{bibb8} 对此作出了改进,通过缩小搜索区域范围并减少搜索窗旋转次数来实现时间的优化。Pinto 等人\upcite{bibb9}尝试用随机采样法缩短定位时间,但检测结果因依赖采样位置而表现不稳定,且计算时间减少的成效不明显。 在抓取姿态估计方面,文\cite{bibb7,bibb10}将最优搜索窗的旋转角度作为抓取角度,文\cite{bibb9} 率先以旋转角度为标签将抓取检测感知部分当作分类问题解决,但这些属于粗估计方法,低精度的抓取角度可导致机器人在实际抓取时因受力点错误而抓取失败。因此,减少抓取定位时间消耗和提升姿态估计精度是机器人在线抓取检测时亟待解决的 2 个问题。
+
+深度神经网络用于机器人抓取位姿检测的另一个问题是,已有公开模型如文\cite{bibb7}和文\cite{bibb11}所提出的模型等都是在封闭大数据集上训练所得,通常需要随机器人部署而扩展关于实际特定抓取对象的小样本数据集。迁移学习为特定任务小样本集下深度网络模型训练提供了方法。自建的数据集规模虽小,但能够在已经过百万级封闭数据集训练并具有基本特征提取能力的模型上微调训练,令在特定小样本集下训练的模型仍具有卓越的性能。这样不仅能缩短训练周期,还可提升整个系统的拓展性。
+
+文献\cite{bib:three}针对任意姿态的未知不规则物体,提出一种适于顶抓策略的平面抓取位姿快速检测方法,其主要研究内容及贡献包括:
+
+% enumerate,有序列表环境
+% fullwidth,正文不缩进
+% label,设置编号格式,可选:\Alph \alph \Roman \roman 或 \arabic
+% itemindent,编号缩进量
+\begin{enumerate}[fullwidth, label=(\arabic*), itemindent=2em]
+\item 提出一种抓取姿态细估计的卷积神经网络模型 Anlge-Net。
+
+\item 在此基础上,提出一种两阶段级联式抓取位姿检测模型。模型第 1 阶段先以基于区域的全卷积网络\upcite{bibb12}为基础提取少量且可靠的候选抓取位置, 再对候选结果筛选排序确定最优抓取位置,以此加快检测速度;第 2 阶段为 Angle-Net 在前一阶段输出的局部位置图像下计算抓取角度。 相比于文\cite{bibb9}的方法,直接计算的抓取角度误差更小,抓取检测精度得以提升。
+\end{enumerate}
+
+% 条标题
+\subsection{机器人抓取问题描述}
+
+机器人平面抓取作业任务如\figref{figgrasp}所示。机器人视觉系统分析给定抓取场景的彩色图像,推断出顶抓策略下的目标物体最优抓取位姿。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.6\textwidth]{3grasp}
+ \caption{机器人抓取作业任务示例}
+ \label{figgrasp}
+\end{figure}
+
+为使抓取检测结果与机器人末端执行器位姿对应,图像中抓取位姿检测结果采用基于文\cite{bibb4}方法简化得到的“点线法”表示,如\figref{figgrasp}中的采集图像部分所示,圆点为抓取位置的中心点,图像坐标系下记作$(u, v)$,对应机器人末端执行器两指连线的中点;短实线对应机器人末端执行器的两指连线,抓取角度$\theta$为该线顺时针旋转时与图像坐标系下$X$轴正方向的夹角,对应机器人末端执行器绕机器人 基坐标系$Z$轴旋转的角度。考虑到抓取角度的对称性,设$\theta\in [0, 180)$。线长$l$对应机器人末端执行器尝试抓取时的两指开度。
+
+针对上述研究目标和相关定义,机器人抓取检测问题可描述如下:$t$时刻机器人获取目标的$n$维度特征序列$X (t) = (x_1(t), x_2(t),\cdots, x_n(t))$,有
+\begin{equation}
+G(u(t), v(t), \theta(t), l(t)) = F(X (t))
+\end{equation}
+其中,$F$为级联机器人平面抓取位姿检测模型,$G$为“点线法”表示的抓取检测结果。
+
+% 条标题
+\subsection{R-FCN与Angle-Net级联的抓取检测器}
+
+抓取位姿检测任务包括抓取点确定和抓取姿态估计 2 个阶段。采取由粗到细的方式,针对各部分任务设计对应的卷积神经网络,并将网络级联成最终的检测模型。
+
+模型结构如\figref{figpoe}所示,第 1 个阶段可视作定位与分类问题,以 R-FCN 为基础实现抓取定位以及抓取角度的粗估计;第 2 个阶段转换成回归问题,通过构造 Angle-Net 模型实现抓取角度的精细估计。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=\textwidth]{3posoreest}
+ \caption{抓取位姿检测模型结构}
+ \label{figpoe}
+\end{figure}
+
+针对目标检测问题已提出了许多优秀的深度学习模型,根据文\upcite{bibb14}的研究,基于区域的全卷积网络(R-FCN)兼具优秀的检测速度和准确率。故本文选用 R-FCN 实现图像中候选抓取位置的提取, 可抓取位置在图像上由边界框(bounding-box)标出,抓取点即为边界框中心点.为实现抓取角度的 粗估计,以抓取角度$\theta$为分类标签,共计 4 类:$0\degree,\ 45\degree,\ 90\degree,\ 135\degree$。为在提高检测速度的同时尽量降低对检测结果的影响,抓取位置候选框定为 300 个。 R-FCN 模型输入为任意尺寸的包含目标物体的场景图像,输出为候选框及其对应的可靠性分数,通过筛选和排序确定在工作区域内分数最高的抓取位置。
+
+深度网络目标检测模型根据感兴趣区域(RoI)池化层分为两大类:一类是共享计算的全卷积子网络模型,如 R-CNN\upcite{bibb15}、 快速 R-CNN\upcite{bibb16}、 更快 R-CNN \upcite{bibb17};另一类为不共享计算的作用于各自 RoI 的子网络模型,如 SSD (single shot multibox detector)\upcite{bibb18}、YOLO (you only look once) \upcite{bibb19}。R-FCN 基于 R-CNN 的框架,即先进行区域建议再进行区域分类的策略,为了使检测能对目标的平移做出准确 响应,采用全卷积网络(FCN),用专门的卷积层构建位置敏感分数图 (position-sensitive score map)。每个空间敏感地图对 RoI 的相对空间位置信息进行编码,并在 FCN 上面增加 1 个位置敏感的RoI池化层来监管这些分数图。R-FCN 的结构如\figref{figrfcn}所示。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.6\textwidth]{3rfcn}
+ \caption{R-FCN 模型结构}
+ \label{figrfcn}
+\end{figure}
+
+设待检测类别共有$c$类,在机器人抓取检测模型中$c = 4$。R-FCN 结构中的基础卷积网络基于残差网络(ResNet)\upcite{bibb20},采用 ResNet 的前 100 层并在其最后接一个$1\times1\times1024$的全卷积层。基础卷积网络用于特征提取并输出特征图。区域建议网络沿用更快R-CNN中的区域建议网络(region proposal network,RPN)\upcite{bibb17}网络,生成多个 RoI,即抓取位置候选区域,每个 RoI 被分成$k\times k$块。$k^2$位置敏感分数图作为 R-FCN 中的最后一层卷积层,其功能是输出用于分类的结果。R-FCN 中对RoI 的$(i, j)$块$(0\ls i, j\ls k-1)$进行位置敏感的池化操作,定义为\equref{eqrcijt}:
+\begin{equation}
+r_c(i,j\mid\theta)=\sum_{(x,y)\in(i,j)}\frac{z_{i,j,c}(x+x_0,\ y+y_0|\Theta)}{n}
+\label{eqrcijt}
+\end{equation}
+
+其中,$r_c(i,j\mid\theta)$表示$ (i, j) $块对第$ C $类的池化响应;$z_{i,j,c}$是 $k^2(4 + 1)$分数图中的一个,$(x_0, y_0)$ 表示 RoI 的左上角;$n$表示的是每一块当中的像素值,$\Theta$为待学习参数。
+
+池化操作后输出$k^2$个位置敏感的分数图,利用\equref{eqrc}和\equref{eqsc}得到每一类最终的分数,用于计算损失。
+
+\begin{equation}
+r_c(\Theta)=\sum_{i,j}r_c(i,j\mid\theta)
+\label{eqrc}
+\end{equation}
+\begin{equation}
+s_c(\Theta)=\dfrac{\exp[{r_c(\Theta)}]}{\sum\limits_{c'=0}^C\exp[{r_{c'}(\Theta)}]}
+\label{eqsc}
+\end{equation}
+
+用模型直接输出角度值替代角度分类标签值可实现更高精度的抓取姿态估计,故构建姿态细估计模型 Angle-Net,结构如\figref{figangle}所示。
+
+\begin{figure}[!htbp]
+ \centering
+ \includegraphics[width=0.6\textwidth]{3angle}
+ \caption{Angle-Net 结构}
+ \label{figangle}
+\end{figure}
+
+Angle-Net 由 4 个卷积层和 2 个全连接层组成。卷积层的卷积核个数分别为 16、 32、 64、 128,全连接层的神经元个数均为 4096。 损失函数(loss function)作为模型预测值与真实值差异程度的估量函数,决定了模型训练的收敛速度和最终效果。 Angle-Net 的损失函数采用L1范数函数,为防止过拟合,在损失函数的基础上加上正则化项,定义如\equref{eqnor}:
+\begin{equation}
+L=\frac{1}{N}\left(\Big|\theta'-\theta_0\Big|+\sum\limits_i^n\lambda\omega_i^2\right)
+\label{eqnor}
+\end{equation}
+其中,$\theta_0$为期望的抓取角度,$\lambda$为正则化项,$\omega_i$为模型权值参数。
+
+\subsubsection{四级标题示例}
+
+% 条标题
+\section{表格绘制示例}
+
+表格按规定为五号字,引用表格示例:\tabref{symbol}.
+
+% 第一列不用填写,自动编号的三线表
+% 设置表格第一列计数器归零
+\setcounter{rowno}{0}
+\begin{center}
+\renewcommand{\arraystretch}{1.25}
+\begin{table}[H]
+\centering %居中
+\setlength{\abovecaptionskip}{0pt}
+\setlength{\belowcaptionskip}{0pt}
+\caption{符号说明}\label{symbol}
+\begin{tabular}{>{\stepcounter{rowno}\therowno}ccl}
+ \toprule[1.5pt]
+\multicolumn{1}{c}{序号}& \makebox[0.2\textwidth][c]{符号} & \makebox[0.4\textwidth][c]{意义} \\ \midrule
+ &$CNCi\#$&编号为$i$的CNC, $i=1,2,\cdots,8$\\
+ &$t_{mj}$ & RGV移动$j$个单位所需时间, $j=0,1,2,3$ \\
+ &$t_{cnc}$ & CNC加工完成一道工序的物料所需时间 \\
+ &$t_{cnc1}$ & CNC加工完成第一道工序所需时间 \\
+ &$t_{cnc2}$ & CNC加工完成第二道工序所需时间 \\
+\bottomrule[1.5pt]
+\end{tabular}
+\end{table}
+\end{center}
+
+定义定理等环境示例:
+% 模板支持以下环境:definition、theorem、proposition、corollary、lemma
+% remark、exam、exer、note、proof、assumption、conclusion、solution
+% 第二对{}内的内容为此定理的label,可以用此label引用
+\begin{theorem}{正弦定理}{theoremsin}
+\begin{equation}
+\frac{a}{\sin A}=\frac{b}{\sin B}=\frac{c}{\sin C}
+\end{equation}
+\vspace{0.01cm}
+\end{theorem}
+% 证明环境
+\begin{proof}
+\lipsum[5]
+\end{proof}
+
+% 结论
+\chapter*{结\quad 论}
+\addcontentsline{toc}{chapter}{结\quad 论}
+
+学位论文的结论作为论文正文的最后一章单独排写,但不加章标题序号。结论是对整个论文主要成果的总结。在结论中应明确指出本研究内容的创新性成果或创新点(含新见解、新观点),并指出今后进一步在本研究方向进行研究工作的展望与设想,上述各项用(1).(2). $\cdots$表述,不要将结论写成论文的摘要。结论字数一般在2000字以内。
+
+% 参考文献
+% 文献个数小于99
+\begin{thebibliography}{99}
+\addcontentsline{toc}{chapter}{参考文献}
+
+% 每条参考文献均需用<\bibitem{}>引出,
+% 花括号里的内容为此条参考文献的标签label,
+% 可用<\upcite{}>和<\cite{}>引用。
+
+\bibitem{bibc1} 焦李成.神经网络系统理论[M].西安:西安电子科技大学出版社,1991.
+\bibitem{bibc2} 何玉彬,李新忠.神经网络控制及其应用[M].北京:科学出版社,2000.
+\bibitem{bibc3} McCulloch W S, Pitts W A. A logical calculus of the ideas immanent in nervous activity[J]. Bulletin of Mathematical Biophysics, 1943, 5: 115-133.
+\bibitem{bibc4} Hebb D O. The Organization of Behaviour [M]. New York, John Wiley\&Sons Inc., 1949.
+\bibitem{bibc5} Rosenblatt. The perception: a probabilistic model for information storage and organization in the brain [J]. Psychology Review, 1958, 65: 386-408.
+\bibitem{bibc6} Minsky M, Papert S. Perceptron [M]. Cambridge, MA: MIT Press, 1969.
+\bibitem{bibc7} Hopf\/ield J J. Neural networks and physical systems with emergent collective computational abilities[C]. Proceeding of the National Academy of Science. USA (Biophysics), 1982, 79: 2554-2558.
+\bibitem{bibc8} Hopf\/ield J J. Neurons with graded response have collective computational properties like those of two-state neurons[C]. Proceedins of the National Academy of Science, USA(Biophysics), 1984, 81:3088-3092.
+\bibitem{bibc9} Widrow B, McCool J, Ball M. The complex LMS algorithm [C]. Proc. IEEE, 1975, 63(4):719-720
+\bibitem{bibc10} Hirose A. Complex-valued neural networks: theories and applications [M]. World Scientif\/ic Series on Innovation Intelligence, vol 5, Singapore: World Scientif\/ic Publishing Co. Pte. Ltd. 2003
+
+\bibitem{bib1} 谢林江, 季桂树, 彭清, 等. 改进的卷积神经网络在行人检测中的应用[J]. 计算机科学与探索, 2018, 12(5):708-718.
+\bibitem{bib2}王耀玮, 唐伦, 刘云龙, 等. 基于多任务卷积神经网络的车辆多属性识别[J]. 计算机工程与应用, 2018, 54(8):21-27.
+\bibitem{bib3} Lenz I, Lee H, Saxena A. Deep learning for detecting robotic grasps[J]. The International Journal of Robotics Research, 2015, 34(4-5):705-724.
+\bibitem{bib4} Kumra S, Kanan C. Robotic grasp detection using deep convolutional neural networks[C]//2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2017: 769-776.
+\bibitem{bib5} Chu F J, Xu R, Vela P A. Real-world multiobject, multigrasp detection[J]. IEEE Robotics and Automation Letters, 2018, 3(4): 3355-3362.
+\bibitem{bib6} Robot Learning Lab: Learning to Grasp[EB/OL].(2009) [2019-03-12].
+\bibitem{bib7} Redmon J, Angelova A. Real-time grasp detection using convolutional neural networks[C]//2015 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2015: 1316-1322.
+\bibitem{bib8} Ni P, Zhang W, Bai W, et al. A New Approach Based on Two-stream CNNs for Novel Objects Grasping in Clutter[J]. Journal of Intelligent \& Robotic Systems, 2018(2):1-17.
+\bibitem{bib9} Krizhevsky A, Sutskever I, Hinton G E. Imagenet classif\/ication with deep convolutional neural networks[C]// Advances in neural information processing systems. 2012: 1097-1105.
+\bibitem{bib10} He K, Zhang X, Ren S, et al. Deep residual learning for image recognition[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2016: 770-778.
+
+\bibitem{bibb1} Dogar M, Hsiao K, Ciocarlie M, et al. Physics-based grasp planning through clutter[C]//Robotics: Science and Systems VIII. Cambridge, USA: MIT Press, 2012: 8pp.
+\bibitem{bibb2} Goldfeder C, Ciocarlie M, Dang H, et al. The Columbia grasp database[C]//IEEE International Conference on Robotics and Automation. Piscataway, USA: IEEE, 2009: 1710-1716.
+\bibitem{bibb3} Weisz J, Allen P K. Pose error robust grasping from contact wrench space metrics[C]//IEEE International Conference on Robotics and Automation. Piscataway, USA: IEEE, 2012: 557- 562.
+\bibitem{bibb4} Jiang Y, Moseson S, Saxena A. Eff\/icient grasping from RGB-D images: Learning using a new rectangle representation[C]// IEEE International Conference on Robotics and Automation. Piscataway, USA: IEEE,2011: 3304-3311.
+\bibitem{bibb5} Hinton G E, Salakhutdinov R R. Reducing the dimensionality of data with neural networks[J]. Science, 2006, 313(5786): 504-507.
+
+\bibitem{bib11} Qiang Z, Li Z, Li J, et al. Vehicle color recognition using
+Multiple-Layer Feature Representations of lightweight convolutional neural network[J]. Signal Processing, 2018, 147: 146-153.
+
+ \bibitem{bib:one} 马倩倩,李晓娟,施智平.轻量级卷积神经网络的机器人抓取检测研究[J/OL].计算机工程与应用:1-11[2019-04-09].
+
+ \bibitem{bib12} Iandola F N, Han S, Moskewicz M W, et al. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and<
+0.5 MB model size[J].2016.
+
+ \bibitem{bib13} Huang G, Liu Z, Van Der Maaten L, et al. Densely connected convolutional networks[C]//Proceedings of the IEEE conference on computer vision and pattern recognition, 2017: 4700-4708.
+
+ \bibitem{bib14} Szegedy C, Vanhoucke V, Ioffe S, et al. Rethinking the inception architecture for computer vision[C]// Proceedings of the IEEE conference on computer vision and pat- tern recognition. 2016: 2818-2826.
+ \bibitem{bib15} Huang G, Liu Z, Van Der Maaten L, et al. Densely connected convolutional networks[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2017: 4700-4708.
+ \bibitem{bib16} He K, Sun J. Convolutional neural networks at con-strained time cost[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2015: 5353-5360.
+ \bibitem{bib17} Srivastava N, Hinton G, Krizhevsky A, et al. Dropout: a simple way to prevent neural networks from overfitting[J]. The Journal of Machine Learning Research, 2014, 15(1): 1929-1958.
+
+\bibitem{bibb6} 仲训杲,徐敏,仲训昱,等.基于多模特征深度学习的机器人抓取判别方法 [J].自动化学报,2016,42(7):1022- 1029.
+\bibitem{bibb7} Lenz I, Lee H, Saxena A. Deep learning for detecting robotic grasps[J]. International Journal of Robotics Research, 2015, 34(4/5): 705-724.
+\bibitem{bibb8} 杜学丹,蔡莹皓,鲁涛,等.一种基于深度学习的机械臂抓取方法 [J].机器人,2017,39(6):820-828,837.
+\bibitem{bibb9} Pinto L, Gupta A. Supersizing self-supervision: Learning to grasp from 50k tries and 700 robot hours[C]//IEEE International Conference on Robotics and Automation. Piscataway, USA: IEEE, 2016: 3406-3413.
+\bibitem{bibb10} Guo D, Sun F C, Liu H P, et al. A hybrid deep architecture for robotic grasp detection[C]//IEEE International Conference on Robotics and Automation. Piscataway, USA: IEEE, 2017: 1609-1614.
+\bibitem{bibb11} 刘义军.基于 FPGA 的线结构光视觉测量系统研究 [D]. 长 春:吉林大学,2017:23-49.
+
+ \bibitem{bib:three} 夏晶,钱堃,马旭东,刘环.基于级联卷积神经网络的机器人平面抓取位姿快速检测[J].机器人,2018,40(06):794-802.
+
+\bibitem{bibb12} 邹媛媛,赵明扬,张雷.基于量块的线结构光视觉传感器直接标定方法 [J]. 中国激光,2014,41(11):189-194.
+\bibitem{bibb13} 卢津,孙惠斌,常智勇.新型正交消隐点的摄像机标定方法 [J]. 中国激光,2014,41(2):294-302.
+
+\bibitem{bibb14} Huang J, Rathod V, Sun C, et al. Speed/accuracy trade-offs for modern convolutional object detectors[A/OL]. (2017-04-25) [2017-12-07].
+\bibitem{bibb15} Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway, USA: IEEE, 2014: 580-587.
+\bibitem{bibb16} Girshick R. Fast R-CNN[C]//IEEE International Conference on Computer Vision. Piscataway, USA: IEEE, 2015: 1440-1448.
+\bibitem{bibb17} Ren S Q, He K M, Girshick R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[M]// Advances in Neural Information Processing Systems 28. Cam- bridge, USA: MIT Press, 2015: 91-99.
+\bibitem{bibb18} Liu W, Anguelov D, Erhan D, et al. SSD: Single shot multibox detector[C]//European Conference on Computer Vision. Cham, Switzerland: Springer, 2016: 21-37.
+\bibitem{bibb19} Redmon J, Divvala S, Girshick R, et al. You only look once: Unified, real-time object detection[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway, USA:IEEE, 2016: 779-788.
+\bibitem{bibb20} Szegedy C, Ioffe S, Vanhoucke V, et al. Inception-v4, Inception-ResNet and the impact of residual connections on learning [A/OL]. (2016-08-23) [2017-12-07].
+
+\bibitem{bib:two} 李传浩. 基于卷积神经网络的机器人自动抓取规划研究[D].哈尔滨工业大学,2018.
+
+ \bibitem{bib:four} 胡琳,晁飞.基于双神经网络结构的发展型机器人3D抓取[J].电脑知识与技术,2012,8(12):2859-2862.
+\bibitem{bib:five} 刘晓玉. 复杂环境下基于神经网络的工件识别与机器人智能抓取[D].武汉科技大学,2009.
+\bibitem{bib:six} 游辉胜. 基于模糊神经网络的单目视觉伺服机器人智能抓取[D].武汉科技大学,2008.
+\end{thebibliography}
+
+% 原创性声明
+\declaration
+
+% 致谢
+\chapter*{致\quad 谢}
+\addcontentsline{toc}{chapter}{致\quad 谢}
+
+衷心感谢导师XXX教授对本人的精心指导。$\cdots\cdots$,他的言传身教将使我终生受益。
+
+感谢XXX教授,以及实验室全体老师和同窗们的热情帮助和支持!
+
+本课题承蒙XXXX基金资助,特此致谢。
+
+$\cdots$
+
+% 结束文档撰写
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/sdaps/README b/macros/latex/contrib/sdaps/README
index 3d955574b0..b5893766fd 100644
--- a/macros/latex/contrib/sdaps/README
+++ b/macros/latex/contrib/sdaps/README
@@ -1,11 +1,12 @@
SDAPS Class and Package repository
==================================
+Version: 1.9.8
+
This repository contains LaTeX classes and packages to create machine readable
questionnaires. Metadata is generated for the whole document and it is
possible to process created forms fully automatically using the SDAPS main
program.
-As of now, this package is included in the SDAPS unstable (1.9.0) distribution.
Features
========
diff --git a/macros/latex/contrib/sdaps/sdapsarray.dtx b/macros/latex/contrib/sdaps/sdapsarray.dtx
index 185fc9b961..59cfffa097 100644
--- a/macros/latex/contrib/sdaps/sdapsarray.dtx
+++ b/macros/latex/contrib/sdaps/sdapsarray.dtx
@@ -1,14 +1,12 @@
% \iffalse meta-comment
%
-% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
+% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -260,6 +258,11 @@
\keys_set:nf { sdaps / array } { \prop_item:Nn \g__sdaps_array_layouter_prop { #1 } }
+ % Force cell layouter instead of column header layouter
+ \bool_if:NT \l_sdaps_sdapsarray_no_header_bool {
+ \tl_set:NV \l__sdaps_array_colhead_tl \l__sdaps_array_cell_tl
+ }
+
\_sdaps_array_open_tmpfiles:
\tl_gset_eq:NN \g__sdaps_array_last_row_tl \c_empty_tl
@@ -352,33 +355,49 @@
\msg_error:nn { sdapsarray } { wrong_mode }
\fi
- % Pagebreak detection
- \_sdaps_array_check_insert_header:N \g_tmpa_bool
% XXX: \l_tmpa_dim is the height to the first baseline in the box. Note that
% we use the real baseline in the case of the header row!
\l__sdaps_array_row_tl #1 #2 \l_tmpb_box \l_tmpa_dim
- \bool_if:NT \g_sdaps_array_first_row_bool {
- % Stow away the box for later use (before rewriting it to save the position)
+ \bool_if:nTF { \g_sdaps_array_first_row_bool && !\l_sdaps_sdapsarray_no_header_bool } {
+ % Stow away the box for later use
\box_gset_eq:NN \g__sdaps_array_header_box \l_tmpb_box
\dim_gset:Nn \g__sdaps_array_header_dim { \box_ht:N \g__sdaps_array_header_box + \box_dp:N \g__sdaps_array_header_box }
+ } {
+ % Pagebreak detection (not needed for header row)
+ \_sdaps_array_check_insert_header:N \g_tmpa_bool
+
+ \hbox_set:Nn \l_tmpb_box {
+ \pdfsavepos
+ \iow_shipout_x:Nn \g__sdaps_array_info_iow {
+ \thepage,
+ \the\pdflastxpos
+ }
+ \box_use:N \l_tmpb_box
+ }
}
- \hbox_set:Nn \l_tmpb_box {
- \pdfsavepos
- \iow_shipout_x:Nn \g__sdaps_array_info_iow {
- \thepage,
- \the\pdflastxpos
+ \bool_if:nTF { \g_sdaps_array_first_row_bool || \l_sdaps_sdapsarray_no_header_bool } {
+ \_sdaps_array_calc_interlineskip:nnN { \prevdepth } { \l_tmpa_dim } \l_tmpa_skip
+ \nointerlineskip
+ \skip_vertical:n { \l_tmpa_skip }
+
+ % However do not insert the rowskip in the case of the first line.
+ % We rely on surrounding code to insert proper spacing before/after
+ % the environment.
+ \bool_if:NT \g_sdaps_array_first_row_bool {
+ \skip_vertical:n { - \l_sdaps_sdapsarray_rowsep_dim }
}
+
\box_use:N \l_tmpb_box
- }
+ % For the header, insert a \nobreak, otherwise the normal inter-row penalty
+ \bool_if:NTF \l_sdaps_sdapsarray_no_header_bool {
+ \penalty\int_use:N\g_sdaps_array_row_penalty_tl
+ } {
+ \nobreak
+ }
- \bool_if:NTF \g_sdaps_array_first_row_bool {
\bool_gset_false:N \g_sdaps_array_first_row_bool
-
- \box_use:N \l_tmpb_box
- % Do not ever allow a break after the header line.
- \nobreak
} {
% The idea is simple. Before every line the header is re-inserted (either
% the real one or an empty box with the same dimensions). In the case that
@@ -757,6 +776,7 @@
\tl_new:N \l_sdaps_sdapsarray_angle_sine_tl
\dim_new:N \l_sdaps_sdapsarray_colsep_dim
\dim_new:N \l_sdaps_sdapsarray_rowsep_dim
+\bool_new:N \l_sdaps_sdapsarray_no_header_bool
\keys_define:nn { sdaps / sdapsarray }
{
@@ -770,6 +790,9 @@
keepenv .bool_set:N = \l_sdaps_sdapsarray_keepenv_bool,
keepenv .initial:n = false,
keepenv .default:n = true,
+ no_header .bool_set:N = \l_sdaps_sdapsarray_no_header_bool,
+ no_header .initial:n = false,
+ no_header .default:n = true,
angle .code:n = {
\int_set:Nn \l_sdaps_sdapsarray_angle_int {#1}
@@ -1104,7 +1127,7 @@
% (i.e. it could still be an alignment character). Execute the alignment
% code directly if the next character is &.
\bool_if:NF \l_sdaps_sdapsarray_keepenv_bool {
- \peek_charcode_remove:NT & { \sdaps_array_alignment: }
+ \peek_charcode_remove_ignore_spaces:NT & { \sdaps_array_alignment: }
}
}
{
diff --git a/macros/latex/contrib/sdaps/sdapsarray.ins b/macros/latex/contrib/sdaps/sdapsarray.ins
index 9acca30c07..e826845f84 100644
--- a/macros/latex/contrib/sdaps/sdapsarray.ins
+++ b/macros/latex/contrib/sdaps/sdapsarray.ins
@@ -2,12 +2,10 @@
%% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
@@ -26,12 +24,10 @@ This is a generated file.
Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
\endpreamble
diff --git a/macros/latex/contrib/sdaps/sdapsarray.pdf b/macros/latex/contrib/sdaps/sdapsarray.pdf
index 3ff9734454..35f80796b9 100644
--- a/macros/latex/contrib/sdaps/sdapsarray.pdf
+++ b/macros/latex/contrib/sdaps/sdapsarray.pdf
Binary files differ
diff --git a/macros/latex/contrib/sdaps/sdapsbase.dtx b/macros/latex/contrib/sdaps/sdapsbase.dtx
index 94d86fd8cc..e97da6f2fc 100644
--- a/macros/latex/contrib/sdaps/sdapsbase.dtx
+++ b/macros/latex/contrib/sdaps/sdapsbase.dtx
@@ -1,14 +1,12 @@
% \iffalse meta-comment
%
-% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
+% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -806,6 +804,7 @@
\dim_new:N \l_sdaps_checkbox_height_dim
\tl_new:N \l_sdaps_checkbox_form_tl
\tl_new:N \l_sdaps_checkbox_fill_tl
+\tl_new:N \l_sdaps_checkbox_draw_tl
\tl_new:N \l_sdaps_checkbox_var_tl
\tl_new:N \l_sdaps_checkbox_value_tl
\bool_new:N \l_sdaps_checkbox_draw_check_bool
@@ -836,6 +835,9 @@
fill .tl_set:N = \l_sdaps_checkbox_fill_tl,
fill .initial:n = { white },
+ draw .tl_set:N = \l_sdaps_checkbox_draw_tl,
+ draw .initial:n = { . },
+
draw_check .bool_set:N = \l_sdaps_checkbox_draw_check_bool,
draw_check .default:n = true,
draw_check .initial:n = false,
@@ -900,10 +902,10 @@
\tikz[baseline={0.5\l_sdaps_checkbox_height_dim-0.8ex}]{%
\tl_if_eq:VnT \l_sdaps_checkbox_form_tl { box } {
- \draw[line~width=\l_sdaps_checkbox_linewidth_dim,fill=\l_sdaps_checkbox_fill_tl] (0.5\l_sdaps_checkbox_linewidth_dim, 0.5\l_sdaps_checkbox_linewidth_dim) rectangle +($(\l_sdaps_checkbox_width_dim, \l_sdaps_checkbox_height_dim)-(\l_sdaps_checkbox_linewidth_dim,\l_sdaps_checkbox_linewidth_dim)$);%
+ \draw[line~width=\l_sdaps_checkbox_linewidth_dim,fill=\l_sdaps_checkbox_fill_tl,draw=\l_sdaps_checkbox_draw_tl] (0.5\l_sdaps_checkbox_linewidth_dim, 0.5\l_sdaps_checkbox_linewidth_dim) rectangle +($(\l_sdaps_checkbox_width_dim, \l_sdaps_checkbox_height_dim)-(\l_sdaps_checkbox_linewidth_dim,\l_sdaps_checkbox_linewidth_dim)$);%
}
\tl_if_eq:VnT \l_sdaps_checkbox_form_tl { ellipse } {
- \draw[line~width=\l_sdaps_checkbox_linewidth_dim,fill=\l_sdaps_checkbox_fill_tl] (0.5\l_sdaps_checkbox_width_dim, 0.5\l_sdaps_checkbox_height_dim) circle [x~radius=0.5\l_sdaps_checkbox_width_dim-0.5\l_sdaps_checkbox_linewidth_dim, y~radius=0.5\l_sdaps_checkbox_height_dim-0.5\l_sdaps_checkbox_linewidth_dim];%
+ \draw[line~width=\l_sdaps_checkbox_linewidth_dim,fill=\l_sdaps_checkbox_fill_tl,draw=\l_sdaps_checkbox_draw_tl] (0.5\l_sdaps_checkbox_width_dim, 0.5\l_sdaps_checkbox_height_dim) circle [x~radius=0.5\l_sdaps_checkbox_width_dim-0.5\l_sdaps_checkbox_linewidth_dim, y~radius=0.5\l_sdaps_checkbox_height_dim-0.5\l_sdaps_checkbox_linewidth_dim];%
}
% For the overlay we actually position the nodes relative to the checkbox
@@ -1018,6 +1020,7 @@
\dim_new:N \l_sdaps_textbox_linewidth_dim
\tl_new:N \l_sdaps_textbox_var_tl
\tl_new:N \l_sdaps_textbox_fill_tl
+\tl_new:N \l_sdaps_textbox_draw_tl
\tl_new:N \l__sdaps_textbox_boxtype_tl
@@ -1029,6 +1032,9 @@
fill .tl_set:N = \l_sdaps_textbox_fill_tl,
fill .initial:n = { white },
+ draw .tl_set:N = \l_sdaps_textbox_draw_tl,
+ draw .initial:n = { . },
+
% Simple node overlay
centered_text .tl_set:N = \l_sdaps_overlay_centered_text_tl,
centered_text .initial:n = {},
@@ -1176,7 +1182,7 @@
\dim_set:Nn \l_sdaps_height_dim {\l__sdaps_height}
% Draw the rectangle
- \draw[line~width=\l_sdaps_textbox_linewidth_dim,fill=\l_sdaps_textbox_fill_tl] ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5 * (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$) rectangle +($(\l_sdaps_width_dim, -\l_sdaps_height_dim) - (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$);
+ \draw[line~width=\l_sdaps_textbox_linewidth_dim,fill=\l_sdaps_textbox_fill_tl,draw=\l_sdaps_textbox_draw_tl] ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5 * (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$) rectangle +($(\l_sdaps_width_dim, -\l_sdaps_height_dim) - (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$);
\begin{scope}
\seq_map_inline:Nn \g__sdaps_textbox_overlays_seq {##1}
@@ -1267,7 +1273,7 @@
\dim_set:Nn \l_sdaps_height_dim {\l__sdaps_height}
% Draw the rectangle
- \draw[line~width=\l_sdaps_textbox_linewidth_dim,fill=\l_sdaps_textbox_fill_tl] ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5 * (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$) rectangle +($(\l_sdaps_width_dim, -\l_sdaps_height_dim) - (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$);
+ \draw[line~width=\l_sdaps_textbox_linewidth_dim,fill=\l_sdaps_textbox_fill_tl,draw=\l_sdaps_textbox_draw_tl] ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5 * (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$) rectangle +($(\l_sdaps_width_dim, -\l_sdaps_height_dim) - (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$);
\begin{scope}
\seq_map_inline:Nn \g__sdaps_textbox_overlays_seq {##1}
@@ -1338,7 +1344,7 @@
% The textbox (rendered on the background)
\begin{tikzpicture}[overlay]
% Draw the rectangle
- \draw[line~width=\l_sdaps_textbox_linewidth_dim,fill=\l_sdaps_textbox_fill_tl] ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5 * (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$) rectangle +($(\l_sdaps_width_dim, -\l_sdaps_height_dim) - (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$);
+ \draw[line~width=\l_sdaps_textbox_linewidth_dim,fill=\l_sdaps_textbox_fill_tl,draw=\l_sdaps_textbox_draw_tl] ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5 * (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$) rectangle +($(\l_sdaps_width_dim, -\l_sdaps_height_dim) - (\l_sdaps_textbox_linewidth_dim, -\l_sdaps_textbox_linewidth_dim)$);
\begin{scope}
\seq_map_inline:Nn \g__sdaps_textbox_overlays_seq {##1}%
diff --git a/macros/latex/contrib/sdaps/sdapsbase.ins b/macros/latex/contrib/sdaps/sdapsbase.ins
index 485de90df5..05f32682fc 100644
--- a/macros/latex/contrib/sdaps/sdapsbase.ins
+++ b/macros/latex/contrib/sdaps/sdapsbase.ins
@@ -2,12 +2,10 @@
%% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
@@ -26,12 +24,10 @@ This is a generated file.
Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
\endpreamble
diff --git a/macros/latex/contrib/sdaps/sdapsbase.pdf b/macros/latex/contrib/sdaps/sdapsbase.pdf
index df99391a21..b65584ccbf 100644
--- a/macros/latex/contrib/sdaps/sdapsbase.pdf
+++ b/macros/latex/contrib/sdaps/sdapsbase.pdf
Binary files differ
diff --git a/macros/latex/contrib/sdaps/sdapsclassic.dtx b/macros/latex/contrib/sdaps/sdapsclassic.dtx
index d2f4002800..7694aa12ee 100644
--- a/macros/latex/contrib/sdaps/sdapsclassic.dtx
+++ b/macros/latex/contrib/sdaps/sdapsclassic.dtx
@@ -1,14 +1,12 @@
% \iffalse meta-comment
%
-% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
+% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -290,7 +288,7 @@
%\setlength{\parskip}{0pt}
\setlength\columnsep{10\p@}
\setlength\columnseprule{0\p@}
-% Redefine the spacings for \subsection ie. \questions.
+% Redefine the spacings for \subsection ie. \_sdaps_classic_question.
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-\parskip}%
{\parskip}%
@@ -341,7 +339,7 @@
\newcommand\qid{\tl_use:N \g__sdaps_questionnaire_id_tl}
-\def\question#1{%
+\def\_sdaps_classic_question#1{%
\tl_if_empty:nTF{#1}{
\refstepcounter{subsection}%
\par%
@@ -471,7 +469,7 @@
\keys_set:nn { sdapsclassic / textbox } { #1 }
\sdaps_classic_ensure_section:
- \question{#3}
+ \_sdaps_classic_question{#3}
\tl_if_empty:NTF \l_sdaps_classic_textbox_text_tl {
\sdaps_qobject_begin:nnn { textbox } { Text } { #3 }
@@ -571,7 +569,7 @@
\int_set:Nn \l_sdaps_singlemark_count_int { \themarkcheckboxcount }
}
- \question{#2}%
+ \_sdaps_classic_question{#2}%
\sdaps_qobject_begin:nnn { singlemark } { range } { #2 }
@@ -606,7 +604,7 @@
\int_set:Nn \l_sdaps_singlemark_count_int { \themarkcheckboxcount }
}
- \question{#2}%
+ \_sdaps_classic_question{#2}%
\sdaps_qobject_begin:nnn { singlemark } { range } { #2 }
@@ -634,6 +632,7 @@
\dim_new:N \l__sdaps_classic_choiceitem_pad_dim
\int_new:N \l__sdaps_classic_choiceitem_cols_int
\int_new:N \l__sdaps_classic_choiceitem_col_int
+\dim_new:N \l__sdaps_classic_choicequestion_prevdepth_dim
\coffin_new:N \l__sdaps_classic_choicequestion_coffin
\msg_new:nnn { sdapsclassic } { choicequestion_wrong_mode } { Mode~should~always~be~vertical~inside~a~choicequestion.\\ This~likely~means~that~the~choicequestion~contains~content~other~than~one~of~the~permissable~macros. }
@@ -692,7 +691,7 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\keys_set:nn { sdaps / choicequestion } { #1 }
- \question{#2}%
+ \_sdaps_classic_question{#2}%
% Setup the context
\tl_if_eq:VnTF \l_sdaps_choicquestion_type_tl { multichoice } {
@@ -716,6 +715,7 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\int_set:NV \l__sdaps_classic_choiceitem_cols_int \l_sdaps_choicequestion_cols_int
\int_set:Nn \l__sdaps_classic_choiceitem_col_int { 0 }
+ \dim_set:Nn \l__sdaps_classic_choicequestion_prevdepth_dim { 1000pt }
\coffin_clear:N \l__sdaps_classic_choicequestion_coffin
% We have to be in vertical mode at this point.
@@ -744,6 +744,7 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\choicequestion_widowpenalty
\vbox:n { \skip_horizontal:N \@totalleftmargin \box_use:N \l__sdaps_classic_choicequestion_coffin }
+ \prevdepth=\l__sdaps_classic_choicequestion_prevdepth_dim
\coffin_clear:N \l__sdaps_classic_choicequestion_coffin
\sdaps_qobject_end:n { choicequestion }
@@ -757,7 +758,7 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\endchoicequestion
}
-\cs_new_protected_nopar:Nn \_sdaps_classic_line_shipout_add:Nn
+\cs_new_protected_nopar:Nn \_sdaps_classic_line_shipout_add:NNn
{
% We have to be in vertical mode at this point.
\if_mode_vertical:
@@ -767,11 +768,13 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\fi:
% Is linewidth the right thing here?
- \int_compare:nT { \l__sdaps_classic_choiceitem_col_int + #2 > \l__sdaps_classic_choiceitem_cols_int } {
+ \int_compare:nT { \l__sdaps_classic_choiceitem_col_int + #3 > \l__sdaps_classic_choiceitem_cols_int } {
% We can only typeset a coffin in vertical mode if we use the box function
\vbox:n { \skip_horizontal:N \@totalleftmargin \box_use:N \l__sdaps_classic_choicequestion_coffin }
+ \prevdepth=\l__sdaps_classic_choicequestion_prevdepth_dim
\skip_vertical:N \l_sdaps_choicequestion_rowsep_dim
\coffin_clear:N \l__sdaps_classic_choicequestion_coffin
+ \dim_set:Nn \l__sdaps_classic_choicequestion_prevdepth_dim { 1000pt }
\choicequestion_clubpenalty
\int_set:Nn \l__sdaps_classic_choiceitem_col_int { 0 }
}
@@ -779,8 +782,14 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\dim_set:Nn \l_tmpa_dim { \linewidth / \l__sdaps_classic_choiceitem_cols_int + \l__sdaps_classic_choiceitem_pad_dim / \l__sdaps_classic_choiceitem_cols_int }
\dim_set:Nn \l_tmpa_dim { \l__sdaps_classic_choiceitem_col_int \l_tmpa_dim }
+ \dim_compare:nNnTF { \coffin_dp:N \l__sdaps_classic_choicequestion_coffin } > { \coffin_dp:N #1 } {
+ \dim_set:Nn \l__sdaps_classic_choicequestion_prevdepth_dim {\dim_min:nn { \l__sdaps_classic_choicequestion_prevdepth_dim } { #2 + \coffin_dp:N \l__sdaps_classic_choicequestion_coffin - \coffin_dp:N #1 } }
+ } {
+ \dim_set:Nn \l__sdaps_classic_choicequestion_prevdepth_dim {\dim_min:nn { \l__sdaps_classic_choicequestion_prevdepth_dim + \coffin_dp:N #1 - \coffin_dp:N \l__sdaps_classic_choicequestion_coffin } { #2 } }
+ }
+
\coffin_join:NnnNnnnn \l__sdaps_classic_choicequestion_coffin { l } { H } #1 { l } { H } { \l_tmpa_dim } { 0pt }
- \int_add:Nn \l__sdaps_classic_choiceitem_col_int { #2 }
+ \int_add:Nn \l__sdaps_classic_choiceitem_col_int { #3 }
}
\providecommand*{\choiceitem}[2][]{%
@@ -802,13 +811,16 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\hbox_set:Nn \l_tmpa_box { \strut \sdaps_checkbox:VV \l_sdaps_choicequestion_choice_var_tl \l_sdaps_choicequestion_choice_val_tl {}\ }
\dim_set:Nn \l_tmpb_dim { \box_wd:N \l_tmpa_box }
\hskip \l_sdaps_choicequestion_colsep_dim
- \hbox_unpack_clear:N \l_tmpa_box
+ \hbox_unpack:N \l_tmpa_box
\begin{minipage}[t]{\dim_eval:n { \l_tmpa_dim - \l_tmpb_dim - 2\l_sdaps_choicequestion_colsep_dim}}
- \noindent \usekomafont{choiceitemfont} \tl_trim_spaces:n { #2 }
+ \noindent \usekomafont{choiceitemfont} \tl_trim_spaces:n { #2 }\strut
+ \par
+ \dim_gset:Nn \g_tmpa_dim { \dim_max:nn { \box_dp:N \l_tmpa_box } { \prevdepth } }
+ \unskip
\end{minipage}
}
- \_sdaps_classic_line_shipout_add:Nn \l_tmpa_coffin { 1 }
+ \_sdaps_classic_line_shipout_add:NNn \l_tmpa_coffin \g_tmpa_dim { 1 }
\ignorespaces
}
@@ -831,13 +843,16 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\hbox_set:Nn \l_tmpa_box { \strut \sdaps_checkbox:VV \l_sdaps_choicequestion_choice_var_tl \l_sdaps_choicequestion_choice_val_tl {}\ }
\dim_set:Nn \l_tmpb_dim { \box_wd:N \l_tmpa_box }
\hskip \l_sdaps_choicequestion_colsep_dim
- \hbox_unpack_clear:N \l_tmpa_box
+ \hbox_unpack:N \l_tmpa_box
\begin{minipage}[t]{\dim_eval:n { \l_tmpa_dim - \l_tmpb_dim - 2\l_sdaps_choicequestion_colsep_dim}}
- \noindent \usekomafont{choiceitemfont} \tl_trim_spaces:n { #3 }
+ \noindent \usekomafont{choiceitemfont} \tl_trim_spaces:n { #3 }\strut
+ \par
+ \dim_gset:Nn \g_tmpa_dim { \dim_max:nn { \box_dp:N \l_tmpa_box } { \prevdepth } }
+ \unskip
\end{minipage}
}
- \_sdaps_classic_line_shipout_add:Nn \l_tmpa_coffin { #2 }
+ \_sdaps_classic_line_shipout_add:NNn \l_tmpa_coffin \g_tmpa_dim { #2 }
\ignorespaces
}
@@ -872,10 +887,13 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\dim_set:Nn \l_tmpb_dim { 0.5 \l_tmpb_dim + 0.8ex }
\strut\ignorespaces \tl_trim_spaces:n { #4 } ~
\sdaps_textbox_hstretch:VVVnn \l_sdaps_choicequestion_choice_var_tl \l_tmpa_dim \l_tmpb_dim { 0pt } { 1 }
+ \par
+ \dim_gset:Nn \g_tmpa_dim { \prevdepth }
+ \unskip
\end{minipage}
}
- \_sdaps_classic_line_shipout_add:Nn \l_tmpa_coffin { #3 }
+ \_sdaps_classic_line_shipout_add:NNn \l_tmpa_coffin \g_tmpa_dim { #3 }
\ignorespaces
}
@@ -1050,12 +1068,30 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
% \begin{macrocode}
%
+\tl_new:N \l__sdaps_classic_group_var_tl
+\tl_new:N \l__sdaps_classic_group_text_tl
+\tl_new:N \l__sdaps_classic_group_extra_tl
+\keys_define:nn { sdapsclassic / group }
+{
+ var .tl_set:N = \l__sdaps_classic_group_var_tl,
+ text .tl_set:N = \l__sdaps_classic_group_text_tl,
+}
\newenvironment { choicegroup } [ 2 ] []
{
\group_begin:
+ \keys_set_known:nnN { sdapsclassic / group } { #1 } \l__sdaps_classic_group_extra_tl
+
+ \_sdaps_classic_question{#2}
+ \tl_if_empty:NTF \l__sdaps_classic_group_text_tl {
+ \sdaps_qobject_begin:nnn { choicegroup } { Head } { #2 }
+ } {
+ \sdaps_qobject_begin:nnV { choicegroup } { Head } \l__sdaps_classic_group_text_tl
+ }
- \question{#2}
+ \tl_if_empty:NF \l__sdaps_classic_group_var_tl {
+ \sdaps_qobject_append_var:V \l__sdaps_classic_group_var_tl
+ }
% Undefine the question (and choice) commands in local scope so that they
% can be redefined by choicearray without any issues.
@@ -1063,7 +1099,7 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\cs_set_eq:NN\question\tex_undefined:D
\cs_set_eq:NN\choice\tex_undefined:D
- \begin{choicearray}[#1]{#2}
+ \expandafter\choicearray\expandafter[\l__sdaps_classic_group_extra_tl]
% XXX: This is a bit of a hack, set in global scope because the choicearray
% environment does evil things with scopes.
\cs_gset_eq:NN\groupaddchoice\choice
@@ -1073,15 +1109,27 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\cs_gset_eq:NN\groupaddchoice\undefined
\cs_gset_eq:NN\choiceline\undefined
- \end{choicearray}
+ \endchoicearray
+
+ \sdaps_qobject_end:n { choicegroup }
\group_end:
}
\newenvironment { optiongroup } [ 2 ] []
{
\group_begin:
+ \keys_set_known:nnN { sdapsclassic / group } { #1 } \l__sdaps_classic_group_extra_tl
- \question{#2}
+ \_sdaps_classic_question{#2}
+ \tl_if_empty:NTF \l__sdaps_classic_group_text_tl {
+ \sdaps_qobject_begin:nnn { optiongroup } { Head } { #2 }
+ } {
+ \sdaps_qobject_begin:nnV { optiongroup } { Head } \l__sdaps_classic_group_text_tl
+ }
+
+ \tl_if_empty:NF \l__sdaps_classic_group_var_tl {
+ \sdaps_qobject_append_var:V \l__sdaps_classic_group_var_tl
+ }
% Undefine the question (and choice) commands in local scope so that they
% can be redefined by optionarray without any issues.
@@ -1089,7 +1137,7 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\cs_set_eq:NN\question\tex_undefined:D
\cs_set_eq:NN\choice\tex_undefined:D
- \begin{optionarray}[#1]{#2}
+ \expandafter\optionarray\expandafter[\l__sdaps_classic_group_extra_tl]
% XXX: This is a bit of a hack, set in global scope because the optionarray
% environment does evil things with scopes.
\cs_gset_eq:NN\groupaddchoice\choice
@@ -1099,22 +1147,33 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
\cs_gset_eq:NN\groupaddoption\undefined
\cs_gset_eq:NN\optionline\undefined
- \end{optionarray}
+ \endoptionarray
+ \sdaps_qobject_end:n { optiongroup }
\group_end:
}
\newenvironment { markgroup } [ 2 ] []
{
\group_begin:
+ \keys_set_known:nnN { sdapsclassic / group } { #1 } \l__sdaps_classic_group_extra_tl
- \question{#2}
+ \_sdaps_classic_question{#2}
+ \tl_if_empty:NTF \l__sdaps_classic_group_text_tl {
+ \sdaps_qobject_begin:nnn { markgroup } { Head } { #2 }
+ } {
+ \sdaps_qobject_begin:nnV { markgroup } { Head } \l__sdaps_classic_group_text_tl
+ }
- % Undefine the question (and choice) commands in local scope so that they
- % can be redefined by choicearray without any issues.
+ \tl_if_empty:NF \l__sdaps_classic_group_var_tl {
+ \sdaps_qobject_append_var:V \l__sdaps_classic_group_var_tl
+ }
+
+ % Undefine the range command in local scope so that it can be redefined
+ % by rangearray without any issues.
% Note that \cs_undefine:N works in global scope, so we cannot use it here.
\cs_set_eq:NN\range\tex_undefined:D
- \begin{rangearray}[#1]{#2}
+ \expandafter\rangearray\expandafter[\l__sdaps_classic_group_extra_tl]
% XXX: This is a bit of a hack, set in global scope because the choicearray
% environment does evil things with scopes.
\cs_gset_eq:NN\markline\range
@@ -1122,7 +1181,8 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. }
{
\cs_gset_eq:NN\markline\undefined
- \end{rangearray}
+ \endrangearray
+ \sdaps_qobject_end:n { markgroup }
\group_end:
}
diff --git a/macros/latex/contrib/sdaps/sdapsclassic.ins b/macros/latex/contrib/sdaps/sdapsclassic.ins
index 46aeca3506..a59dcbd001 100644
--- a/macros/latex/contrib/sdaps/sdapsclassic.ins
+++ b/macros/latex/contrib/sdaps/sdapsclassic.ins
@@ -2,12 +2,10 @@
%% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
@@ -26,12 +24,10 @@ This is a generated file.
Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
\endpreamble
diff --git a/macros/latex/contrib/sdaps/sdapsclassic.pdf b/macros/latex/contrib/sdaps/sdapsclassic.pdf
index 0105d33275..fcb873935d 100644
--- a/macros/latex/contrib/sdaps/sdapsclassic.pdf
+++ b/macros/latex/contrib/sdaps/sdapsclassic.pdf
Binary files differ
diff --git a/macros/latex/contrib/sdaps/sdapslayout.dtx b/macros/latex/contrib/sdaps/sdapslayout.dtx
index 6788e55c5a..eed8031392 100644
--- a/macros/latex/contrib/sdaps/sdapslayout.dtx
+++ b/macros/latex/contrib/sdaps/sdapslayout.dtx
@@ -1,15 +1,13 @@
% \iffalse meta-comment
%
% Copyright (C) 2014 by Henry Menke <henrimenke@gmail.com>
-% Copyright (C) 2015-2016 by Benjamin Berg <benjamin@sipsolutions.net>
+% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -112,8 +110,6 @@
\tl_new:N \l_sdaps_choicearray_qobject_type_tl
\bool_new:N \l_sdaps_choicearray_horizontal_bool
-\tl_new:N \l_sdaps_choicearray_var_tl
-\tl_new:N \l_sdaps_choicearray_text_tl
\tl_new:N \l_sdaps_choicearray_layouter_tl
\tl_new:N \l_sdaps_choicearray_align_tl
\tl_new:N \l_sdaps_choicearray_extra_tl
@@ -136,8 +132,6 @@
horizontal .initial:n = true,
vertical .bool_set_inverse:N = \l_sdaps_choicearray_horizontal_bool,
vertical .default:n = true,
- var .tl_set:N = \l_sdaps_choicearray_var_tl,
- text .tl_set:N = \l_sdaps_choicearray_text_tl,
layouter .tl_set:N = \l_sdaps_choicearray_layouter_tl,
layouter .initial:n = default,
align .tl_set:N = \l_sdaps_choicearray_align_tl,
@@ -168,20 +162,10 @@
range .initial:n = {...}
}
-\cs_new_protected_nopar:Npn \_sdaps_choicearray_preprocess:nn #1#2
+\cs_new_protected_nopar:Npn \_sdaps_choicearray_preprocess:n #1
{
\keys_set_known:nnN { sdaps / choicearray } { #1 } \l_sdaps_choicearray_extra_tl
- \tl_if_empty:NTF \l_sdaps_choicearray_text_tl {
- \sdaps_qobject_begin:nnn { choicearray } { Head } { #2 }
- } {
- \sdaps_qobject_begin:nnV { choicearray } { Head } \l_sdaps_choicearray_text_tl
- }
-
- \tl_if_empty:NF \l_sdaps_choicearray_var_tl {
- \sdaps_qobject_append_var:V \l_sdaps_choicearray_var_tl
- }
-
\sdaps_checkbox_set_type:V \l_sdaps_choicearray_type_tl
\tl_if_eq:VnTF \l_sdaps_choicearray_type_tl { multichoice } {
\tl_set:Nn \l_sdaps_choicearray_qobject_type_tl { Choice }
@@ -189,12 +173,7 @@
\tl_set:Nn \l_sdaps_choicearray_qobject_type_tl { Option }
}
}
-\cs_generate_variant:Nn \_sdaps_choicearray_preprocess:nn { Vn }
-
-\cs_new_protected_nopar:Npn \_sdaps_choicearray_postprocess:
-{
- \sdaps_qobject_end:n { choicearray }
-}
+\cs_generate_variant:Nn \_sdaps_choicearray_preprocess:n { V }
\cs_new_protected_nopar:Npn \_sdaps_choicearray_process_choice_insert_tail_after:w {
\bgroup
@@ -375,8 +354,6 @@
% \begin{macrocode}
-\tl_new:N \l_sdaps_rangearray_var_tl
-\tl_new:N \l_sdaps_rangearray_text_tl
\tl_new:N \l_sdaps_rangearray_align_tl
\tl_new:N \l_sdaps_rangearray_extra_tl
\int_new:N \l_sdaps_rangearray_rangecount_int
@@ -387,14 +364,16 @@
\tl_new:N \g_sdaps_question_uppertext_tl
\tl_new:N \g_sdaps_question_othertext_tl
+\msg_new:nnn { sdapslayout } { option_not_supported } { The~#1~option~is~not~supported~by~this~environment. }
+
\keys_define:nn { sdaps / rangearray }
{
- var .tl_set:N = \l_sdaps_rangearray_var_tl,
- text .tl_set:N = \l_sdaps_rangearray_text_tl,
count .int_set:N = \l_sdaps_rangearray_rangecount_int,
count .initial:n = 5,
align .tl_set:N = \l_sdaps_rangearray_align_tl,
align .initial:n = { },
+ % Override and disallow flipping; it does not work currently
+ flip .code:n = { \msg_error:nnn { sdapslayout } { option_not_supported } { flip } },
other .bool_set:N = \l_sdaps_rangearray_other_bool,
other .default:n = true,
other .initial:n = false,
@@ -409,28 +388,13 @@
other .tl_gset:N = \g_sdaps_question_othertext_tl,
}
-\cs_new_protected_nopar:Npn \_sdaps_rangearray_preprocess:nn #1#2
+\cs_new_protected_nopar:Npn \_sdaps_rangearray_preprocess:n #1
{
\keys_set_known:nnN { sdaps / rangearray } { #1 } \l_sdaps_rangearray_extra_tl
- \tl_if_empty:NTF \l_sdaps_rangearray_text_tl {
- \sdaps_qobject_begin:nnn { rangearray } { Head } { #2 }
- } {
- \sdaps_qobject_begin:nnV { rangearray } { Head } \l_sdaps_rangearray_text_tl
- }
-
\sdaps_checkbox_set_type:n { singlechoice }
-
- \tl_if_empty:NF \l_sdaps_rangearray_var_tl {
- \sdaps_qobject_append_var:V \l_sdaps_rangearray_var_tl
- }
-}
-\cs_generate_variant:Nn \_sdaps_rangearray_preprocess:nn { Vn }
-
-\cs_new_protected_nopar:Npn \_sdaps_rangearray_postprocess:
-{
- \sdaps_qobject_end:n { rangearray }
}
+\cs_generate_variant:Nn \_sdaps_rangearray_preprocess:n { V }
% Before/After the different parts
@@ -683,7 +647,7 @@
%
-\newenvironment { choicearray } [ 2 ] []
+\newenvironment { choicearray } [ 1 ] []
{
\group_begin:
@@ -700,7 +664,7 @@
}
}
- \_sdaps_choicearray_preprocess:Vn \l_tmpa_tl { #2 }
+ \_sdaps_choicearray_preprocess:V \l_tmpa_tl
% Clear the variables
\seq_gclear:N \g_sdaps_choices_filter_seq
\seq_gclear:N \g_sdaps_choices_cell_seq
@@ -724,21 +688,19 @@
{
\endsdapsarray
\group_end:
- % Process keys
- \_sdaps_choicearray_postprocess:
\group_end:
}
-\newenvironment { optionarray } [ 2 ] []
+\newenvironment { optionarray } [ 1 ] []
{
- \choicearray[singlechoice,#1] { #2 }
+ \choicearray[singlechoice,#1]
}
{
\endchoicearray
}
-\newenvironment { rangearray } [ 2 ] []
+\newenvironment { rangearray } [ 1 ] []
{
\group_begin:
@@ -755,7 +717,7 @@
}
}
- \_sdaps_rangearray_preprocess:Vn \l_tmpa_tl { #2 }
+ \_sdaps_rangearray_preprocess:V \l_tmpa_tl
\newcommand \range [ 1 ] [] {
\_sdaps_rangearray_process_question:nw { ##1 }
@@ -763,14 +725,12 @@
\group_begin:
- \tl_set:Nx \l_tmpb_tl {keepenv,align=\l_sdaps_rangearray_align_tl,\l_sdaps_rangearray_extra_tl}
+ \tl_set:Nx \l_tmpb_tl {keepenv,align=\l_sdaps_rangearray_align_tl,no_header,\l_sdaps_rangearray_extra_tl}
\expandafter\sdapsarray\expandafter[\l_tmpb_tl]
}
{
\endsdapsarray
\group_end:
- % Process keys
- \_sdaps_rangearray_postprocess:
\group_end:
}
diff --git a/macros/latex/contrib/sdaps/sdapslayout.ins b/macros/latex/contrib/sdaps/sdapslayout.ins
index c1656b754d..e7c1adcd8c 100644
--- a/macros/latex/contrib/sdaps/sdapslayout.ins
+++ b/macros/latex/contrib/sdaps/sdapslayout.ins
@@ -2,12 +2,10 @@
%% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
@@ -26,12 +24,10 @@ This is a generated file.
Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
\endpreamble
diff --git a/macros/latex/contrib/sdaps/sdapslayout.pdf b/macros/latex/contrib/sdaps/sdapslayout.pdf
index f1f10773c6..be8a1aa4f3 100644
--- a/macros/latex/contrib/sdaps/sdapslayout.pdf
+++ b/macros/latex/contrib/sdaps/sdapslayout.pdf
Binary files differ
diff --git a/macros/latex/contrib/sdaps/sdapspdf.dtx b/macros/latex/contrib/sdaps/sdapspdf.dtx
index 76d0546abf..d243a260ef 100644
--- a/macros/latex/contrib/sdaps/sdapspdf.dtx
+++ b/macros/latex/contrib/sdaps/sdapspdf.dtx
@@ -1,15 +1,13 @@
% \iffalse meta-comment
%
% Copyright (C) 2014 by Henry Menke <henrimenke@gmail.com>
-% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
+% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
diff --git a/macros/latex/contrib/sdaps/sdapspdf.ins b/macros/latex/contrib/sdaps/sdapspdf.ins
index 96a5d913c5..f102772732 100644
--- a/macros/latex/contrib/sdaps/sdapspdf.ins
+++ b/macros/latex/contrib/sdaps/sdapspdf.ins
@@ -2,12 +2,10 @@
%% Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
@@ -26,12 +24,10 @@ This is a generated file.
Copyright (C) 2015 by Benjamin Berg <benjamin@sipsolutions.net>
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
\endpreamble
diff --git a/macros/latex/contrib/sdaps/sdapspdf.pdf b/macros/latex/contrib/sdaps/sdapspdf.pdf
index 71199651ef..551fdf687c 100644
--- a/macros/latex/contrib/sdaps/sdapspdf.pdf
+++ b/macros/latex/contrib/sdaps/sdapspdf.pdf
Binary files differ