diff options
Diffstat (limited to 'Master/texmf-dist/doc')
89 files changed, 1573 insertions, 655 deletions
diff --git a/Master/texmf-dist/doc/latex/colorblind/ChangeLog b/Master/texmf-dist/doc/latex/colorblind/ChangeLog index a864cd215e8..bdef33e32f4 100644 --- a/Master/texmf-dist/doc/latex/colorblind/ChangeLog +++ b/Master/texmf-dist/doc/latex/colorblind/ChangeLog @@ -1,7 +1,16 @@ Package `colorblind` by Simon Pfahler -https://github.com/simon-pfahler/colorblind +https://github.com/simon-pfahler/colorblind/issues History ======= +2024/12/23 v1.1 +* Redefine default colors unless the option `keep-defaults` is specified +* Refactor documentation +* Minor bug fixes + +2024/05/16 v1.0.1 +* Add package options `pgf` and `no-tikz` to give more control over which +packages are loaded + 2024/05/12 v1.0 -* First published release. +* Initial published release diff --git a/Master/texmf-dist/doc/latex/colorblind/README.md b/Master/texmf-dist/doc/latex/colorblind/README.md index 0fd83d42f85..b8ba60d9fb6 100644 --- a/Master/texmf-dist/doc/latex/colorblind/README.md +++ b/Master/texmf-dist/doc/latex/colorblind/README.md @@ -1,6 +1,6 @@ ## Package `colorblind` by Simon Pfahler -Version 2024-05-12 v1.0 +Version 2024-12-24 v1.1 In colorblind-safe documents, the contents are presented in a way that the same information is conveyed to readers regardless of a potential color vision deficiency. This package provides the tools necessary for colorblind-safe typesetting in LaTeX. diff --git a/Master/texmf-dist/doc/latex/colorblind/colorblind_doc.pdf b/Master/texmf-dist/doc/latex/colorblind/colorblind_doc.pdf Binary files differnew file mode 100644 index 00000000000..0ecc058ae85 --- /dev/null +++ b/Master/texmf-dist/doc/latex/colorblind/colorblind_doc.pdf diff --git a/Master/texmf-dist/doc/latex/colorblind/colorblind_doc.tex b/Master/texmf-dist/doc/latex/colorblind/colorblind_doc.tex new file mode 100644 index 00000000000..311de4ad34c --- /dev/null +++ b/Master/texmf-dist/doc/latex/colorblind/colorblind_doc.tex @@ -0,0 +1,422 @@ +%% +%% ---------------------------------------------------------------- +%% Copyright (C) 2023-2024 by Simon Pfahler <simon.pfahler at ur dot de> +%% ---------------------------------------------------------------- +%% +%! TeX program = lualatex +\DocumentMetadata{lang = en-us} +\documentclass{scrartcl} +\usepackage[left=4.5cm,right=3cm,top=3cm,bottom=3cm, marginpar=4cm]{geometry} +\setlength{\parindent}{0pt} +\setlength{\parskip}{1ex} + +\usepackage{xcolor} +\usepackage{soul} + +\usepackage{tikz} +\usetikzlibrary{positioning, shapes, fit, arrows.meta, decorations.pathmorphing, math} +\pgfdeclarelayer{bg} +\pgfsetlayers{bg,main} + +\usepackage{pgfplots, pgfplotstable} +\pgfplotsset{compat=1.18} + +%%%% from https://tex.stackexchange.com/questions/355713/pgfplots-show-error-marker-in-legend +\pgfplotsset{error bar legend/.style={% + /pgfplots/legend image code/.prefix code={% + \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}% + \draw[% + /pgfplots/every error bar, + mark=\pgfplotserrorbarsmark, + /pgfplots/error bars/error mark options, + sharp plot, + ##1 + ] plot coordinates {(0.3cm, -0.15cm) (0.3cm, 0.15cm)};% + } + } +} +%%%% + +\pgfplotsset{custom area legend/.style={% + /pgfplots/legend image code/.prefix code={% + \fill[##1, draw=white] plot coordinates {(0cm, -0.1cm) (0.6cm,-0.1cm) (0.6cm, 0.1cm) (0cm, 0.1cm)};% + } + } +} + +\def\w{420pt} + +\usepackage{hyperref} +\hypersetup{ + pdftitle={Easy colorblind-safe typesetting: the colorblind package}, + pdfauthor={Simon Pfahler}, +} +\usepackage{cleveref} + +\usepackage{csquotes} +\usepackage[backend=biber, style=numeric-comp, seconds=true, sorting=none, subentry=true, doi=false, alldates=iso]{biblatex} +\renewcommand*{\entrysetpunct}{\\[5pt]} +\addbibresource{bib.bib} + +\usepackage[keep-defaults, Tol, OkabeIto, pgf]{colorblind} + +\newcommand\colorblind{\textbf{colorblind} } +\newcommand\hlc[2][T-Q-PH4]{{% + \colorlet{foo}{#1}% + \sethlcolor{foo}\hl{#2}}% +} + +\reversemarginpar +\newcommand\marg[1]{\leavevmode\marginpar{\raggedleft #1}} +\newcommand\tbs{\textbackslash} +\newcommand\cs[1]{\texttt{\tbs#1}} + +\title{Easy colorblind-safe typesetting:\\ the \colorblind package} +\author{Simon Pfahler} +\date{\today\\Version 1.1} + + +\begin{document} + +\maketitle + +\begin{abstract} + In colorblind-safe documents, the contents are presented in a way that the same information is conveyed to readers regardless of a potential color vision deficiency. + This package provides some useful tools for colorblind-safe typesetting in \LaTeX. + It provides color schemes for a wide range of applications. + The most commonly used schemes are qualitative schemes, providing easily distinguishable colors for use in graphics, but also for text coloring or highlighting. + Additionally, diverging and sequential schemes are provided, which can be used for encoding quantitative information using colors. + This package incorporates colorblind-safeness into the writing process, making it both less cumbersome and less error-prone. +\end{abstract} + +\tableofcontents +\clearpage + +\section{Introduction} +\subsection{For the impatient} +Writing good colorblind-safe documents can be a tricky task. +It is a good starting point to realize that the default \LaTeX\ colors like \hlc[red]{red} or \hlc[blue]{blue} should be avoided. +This is why for the impatient, simply loading this package without specifying any options (i.e.\ \cs{usepackage\{colorblind\}}) redefines the default colors to more sensible alternatives. +\footnote{Where no suitable redefinition was possible for a builtin named color, the definition is changed to black.} + +\begin{figure}[ht] + \centering + \begin{tikzpicture} + \node[inner sep=1, fill=red] at (-1.2*0.7cm,2.3*0.7cm) {R}; + \node[inner sep=1, fill=green] at (-1.2*0.7cm, 1.8*0.7cm) {G}; + \node[inner sep=1, fill=blue] at (-1.2*0.7cm,1.3*0.7cm) {B}; + + \node at (1*1cm-1cm,2.3*0.7cm) {68}; + \node at (1*1cm-1cm,1.8*0.7cm) {119}; + \node at (1*1cm-1cm,1.3*0.7cm) {170}; + \draw[fill=T-Q-B1] (1*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (1*1cm-1cm,-1*0.7cm) {\vphantom{bp}blue}; + + \node at (2*1cm-1cm,2.3*0.7cm) {102}; + \node at (2*1cm-1cm,1.8*0.7cm) {204}; + \node at (2*1cm-1cm,1.3*0.7cm) {238}; + \draw[fill=T-Q-B2] (2*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (2*1cm-1cm,-1*0.7cm) {\vphantom{bp}cyan}; + + \node at (3*1cm-1cm,2.3*0.7cm) {34}; + \node at (3*1cm-1cm,1.8*0.7cm) {136}; + \node at (3*1cm-1cm,1.3*0.7cm) {51}; + \draw[fill=T-Q-B3] (3*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (3*1cm-1cm,-1*0.7cm) {\vphantom{bp}green}; + + \node at (4*1cm-1cm,2.3*0.7cm) {204}; + \node at (4*1cm-1cm,1.8*0.7cm) {187}; + \node at (4*1cm-1cm,1.3*0.7cm) {68}; + \draw[fill=T-Q-B4] (4*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (4*1cm-1cm,-1*0.7cm) {\vphantom{bp}yellow}; + + \node at (5*1cm-1cm,2.3*0.7cm) {238}; + \node at (5*1cm-1cm,1.8*0.7cm) {102}; + \node at (5*1cm-1cm,1.3*0.7cm) {119}; + \draw[fill=T-Q-B5] (5*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (5*1cm-1cm,-1*0.7cm) {\vphantom{bp}red}; + + \node at (6*1cm-1cm,2.3*0.7cm) {170}; + \node at (6*1cm-1cm,1.8*0.7cm) {51}; + \node at (6*1cm-1cm,1.3*0.7cm) {119}; + \draw[fill=T-Q-B6] (6*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (6*1cm-1cm,-1*0.7cm) {\vphantom{bp}violet}; + + \node at (7*1cm-1cm,2.3*0.7cm) {187}; + \node at (7*1cm-1cm,1.8*0.7cm) {187}; + \node at (7*1cm-1cm,1.3*0.7cm) {187}; + \draw[fill=T-Q-B0] (7*1cm-1cm,0) circle (0.7cm); + \node[rotate=25, anchor=north east] at (7*1cm-1cm,-1*0.7cm) {\vphantom{bp}gray}; + + \end{tikzpicture} + \caption{Redefinitions of the default \LaTeX\ colors.} +\end{figure} + +It should be noted that this is a very brute-force way of trying to achieve colorblind-safeness. +If you care about this topic (which you should), the rest of this document provides details on how colorblind-safeness is best achieved in different scenarios. + +\subsection{Package options} +\marg{\texttt{Tol}\\\texttt{OkabeIto}}% +The \colorblind package provides the color schemes by Paul Tol~\cite{Tol} and the Okabe Ito color palette~\cite{Ichihara_2008}. +By default, no schemes are loaded. +Providing one of the options \texttt{Tol} or \texttt{OkabeIto} loads all corresponding schemes. + +\marg{\texttt{pgf}}% +If the option \texttt{pgf} is provided, continuous colormaps are defined for use with \texttt{pgfplots} (or \texttt{TikZ}). +Also, the command \cs{drawSchemeC} for drawing continuous color schemes is only defined when the option is provided and continuous color schemes are available (through providing the \texttt{Tol} option). +Continuous versions of color schemes are only available when the colors are allowed to be interpolated, see below for details. + +\marg{\texttt{no-tikz}}% +The package uses \texttt{TikZ} to draw the discrete versions of color schemes. +Providing the option \texttt{no-tikz} disables this, the command \cs{drawScheme} is not defined in this case. + +\marg{\texttt{keep-defaults}}% +The package redefines the default colors like \hlc[T-Q-PH5]{red} or \hlc[T-Q-PH1]{blue} to be colorblind-safe. By specifying this option, the defaults are not changed. + +\subsection{Overview} +As an example for how to use the colors, we look at the \emph{bright qualitative} color scheme by Tol. +\cref{fig:T-Q-Bexample} shows the colors in the scheme. + +\begin{figure}[ht] + \centering + \drawScheme{T-Q-B} + \caption{Bright qualitative color scheme by Tol.} + \label{fig:T-Q-Bexample} +\end{figure} + +All colors in this model start with \texttt{T-Q-B}, indicating that it is a scheme by \textbf{T}ol, that it is a \textbf{q}ualitative scheme, and that it is the \textbf{b}right scheme. +The colors in the scheme are specified by a number following the scheme name, in this case ranging from \texttt{T-Q-B1} to \texttt{T-Q-B6} for the non-grey colors. +The additional color \texttt{T-Q-B0} provides a color that can be used, e.g., to indicate bad data. + +There are two reasons why color names are not based on natural color names (e.g., ``\hlc[T-Q-PH1]{blue}''): +\begin{enumerate} + \item Certain colors (\hlc[T-Q-PH3]{green}, \hlc[T-Q-PH5]{red}) are often used by people with full color vision to convey certain meanings (\hlc[T-Q-PH3]{good}, \hlc[T-Q-PH5]{bad}). + This meaning is difficult for people with color vision deficiencies to pick up. + By not using natural color names, it is easier to write colorblind-safe documents that do not make use of said connotations. + \item Natural color names can be cumbersome, e.g., when slight variations of a color are used. It is annoying having to look up if a color is called, e.g., \hlc[T-Q-PH1]{blue} or \hlc[T-Q-PH2]{cyan}. +\end{enumerate} + +These colors are used the same way as any other colors. To change the text color to \texttt{T-Q-B1} for example, use \cs{color\{T-Q-B1\}}. + +\section{Guidelines}\label{sec:guidelines} +In this section, we provide some general guidelines for colorblind-safe design. + +Color vision deficiencies apper in many different variations and grades of severity, up to monochromacy, where different colors can only be distinguished via their perceived brightness. +This means that while the color schemes provided by this package are easier to distinguish for the most common color vision deficiencies, information encoded only in color can never be truely colorblind safe. +This leads us to the most important rule in colorblind-safe design: +\begin{center} + \setlength{\fboxrule}{1pt} + \textbf{Rule 1}: + \fbox{\parbox{0.65\columnwidth}{ + Always provide information in more ways than just color. + }} +\end{center} + +If this rule is satisfied in a document, it is by construction guaranteed to be colorblind-safe. +However, this does not mean that it is \emph{convenient} for people with color vision deficiencies to extract the information. +In order to achieve the best possible result, a few more rules should be considered when using color. +\begin{center} + \setlength{\fboxrule}{1pt} + \textbf{Rule 2}: + \fbox{\parbox{0.65\columnwidth}{ + Stick to a color scheme. + \begin{itemize} + \item[(\textbf{a})] Do not mix colors within a scheme. + \item[(\textbf{b})] Do not use shades of colors. + \end{itemize} + }} +\end{center} + +Colors within colorblind-safe color schemes are designed to be eaily distinguishable for people with the most common color vision deficiencies, so we should only use colors from one color scheme in any given visual unit. +In extension, even colors from the same scheme should not be mixed, since this makes it harder to distinguish them. +Even if the result of the mixing is easily distinguishable for people with normal color vision, the same might not be true under certain color vision deficiencies. +For the same reaseon, shades of colors (i.e.\ mixings with black or white) should be avoided, because the brightness of colors is also used to make sure the colors are distinguishable. + +\begin{center} + \setlength{\fboxrule}{1pt} + \textbf{Rule 3}: + \fbox{\parbox{0.65\columnwidth}{ + Do not use color for information and aesthetics simultaneously. + }} +\end{center} + +Color is often also used for aesthetic reasons, e.g., on a scientific poster. +This is usually unproblematic, as the color does not convey information in this case. +However, if color is used to convey information in a visual unit, avoid using additional color for aesthetic purposes, as this makes it more difficult to extract the information encoded in the color. + +\begin{center} + \setlength{\fboxrule}{1pt} + \textbf{Rule 4}: + \fbox{\parbox{0.65\columnwidth}{ + Do not use rainbow color schemes. + }} +\end{center} + +Due to the many different colors in a rainbow color scheme, they are inevitably difficult to distinguish for people with color vision deficiencies. +Therefore, it is best to avoid them. +If a rainbow color scheme has to be used at all cost, Paul Tol (and thus also the \texttt{colorblind} package) provides both a discrete as well as a continuous version~\cite{Tol}, which are optimized to be as distinguishable as possible. + +By following these four simple rules, we can ensure that the information encoded in a document is presented in a colorblind-safe way, and that it is reasonably convenient for people affected by color vision deficiencies to extract the information. +As a side node, following these rules leads to documents that do not suffer from information loss when printed in black and white, which is usually also desirable. + +\section{Provided color schemes}\label{sec:colors} +The color schemes provided are split into three groups: +\begin{itemize} + \item Qualitative schemes:\newline + These schemes are used to convey qualitative information, such as different data sources, countries or manufacturers. + They should usually be used for coloring text or distinguishing different lines/bars in a plot. + \item Diverging color schemes:\newline + When quantitative data ranges between two extremes, and the middle is being considered ``neutral'', a diverging color scheme should be used. + Examples for this kind of data might be test grades, temperatures or pH values. + \item Sequential color schemes:\newline + For quantitative data without an important midpoint, sequential color schemes should be preferred over diverging ones. + This is especially true for quantites that start from $0$. + They can be used to denote for example velocities, concentrations or pressures. +\end{itemize} + +For each type of schemes, this package provides a range of options. +\Cref{sec:Tol_schemes} shows the schemes designed by Paul Tol~\cite{Tol}, which include qualitative, diverging and sequential schemes (see \cref{sec:T-Q,sec:T-D,sec:T-S}). +In \cref{sec:OkabeIto}, the Okabe Ito color scheme~\cite{Ichihara_2008} is provided, which is probably the most famous qualitative colorblind-safe color scheme due to it being mentioned in various articles in high-ranking journals. + +All of the schemes are colorblind-safe, and some are optimized for printout or designed for a particular purpose. +This is denoted under the scheme name.\clearpage + +\subsection{Paul Tol's color schemes}\label{sec:Tol_schemes} + +\subsubsection{Qualitative color schemes}\label{sec:T-Q} +\begin{minipage}{0.5\textwidth} + \centering + \scalebox{0.7}{\drawScheme{T-Q-B}}\\ + \textbf{B}right\\ + \phantom{pb} +\end{minipage}\hfill% +\begin{minipage}{0.5\textwidth} + \centering + \scalebox{0.7}{\drawScheme{T-Q-V}}\\ + \textbf{V}ibrant +\end{minipage} + +\begin{minipage}{0.5\textwidth} + \centering + \scalebox{0.7}{\drawScheme{T-Q-HC}}\\ + \textbf{H}igh-\textbf{C}ontrast\\ + works for black and white printout +\end{minipage}\hfill% +\begin{minipage}{0.5\textwidth} + \centering + \scalebox{0.7}{\drawScheme{T-Q-MC}}\\ + \textbf{M}edium-\textbf{C}ontrast\\ + works for black and white printout +\end{minipage} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-Q-M}}\\ + \textbf{M}uted +\end{center} + +\begin{minipage}{0.5\textwidth} + \centering + \scalebox{0.7}{\drawScheme{T-Q-PH}}\\ + \textbf{P}ale \textbf{H}ighlight\\ + specifically for text background +\end{minipage}\hfill% +\begin{minipage}{0.5\textwidth} + \centering + \scalebox{0.7}{\drawScheme{T-Q-DT}}\\ + \textbf{D}ark \textbf{T}ext\\ + specifically for text color +\end{minipage} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-Q-L}}\\ + \textbf{L}ight\\ + less distinguishable than other schemes,\\ mostly meant for filling in labelled cells +\end{center}\clearpage + +\subsubsection{Diverging color schemes}\label{sec:T-D} +For diverging schemes, when a continuous scheme is needed, the colors are allowed to be linearly interpolated. +When using the option \texttt{pgf}, the interpolations are available as colormaps with the names of their color scheme. + +\begin{center} + \scalebox{0.7}{\drawScheme{T-D-S}}\\ + \drawSchemeC[0.6\textwidth]{T-D-S}\\ + \textbf{S}unset +\end{center} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-D-N}}\\ + \drawSchemeC[0.9\textwidth]{T-D-N}\\ + \textbf{N}ightfall +\end{center} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-D-BR}}\\ + \drawSchemeC[0.5\textwidth]{T-D-BR}\\ + \textbf{B}u\textbf{R}d +\end{center} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-D-PG}}\\ + \drawSchemeC[0.5\textwidth]{T-D-PG}\\ + \textbf{P}R\textbf{G}n +\end{center}\clearpage + +\subsubsection{Sequential color schemes}\label{sec:T-S} +For most sequential schemes, a continuous scheme can be obtained again by linearly interpolating the colors. +The only exception to this is the \emph{discrete rainbow} scheme, which has an explicitly continuos variation, the \emph{smooth rainbow} scheme. +When using the option \texttt{pgf}, the interpolations are available as colormaps with the names of their color scheme. + +When the discrete scheme is not shown, this is because there are too many colors in it. + +\begin{center} + \scalebox{0.7}{\drawScheme{T-S-YOB}}\\ + \drawSchemeC[0.5\textwidth]{T-S-YOB}\\ + \textbf{Y}l\textbf{O}r\textbf{B}r +\end{center} + +\begin{center} + \drawSchemeC[0.9\textwidth]{T-S-IR}\\ + \textbf{Ir}idescent +\end{center} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-S-IN}}\\ + \drawSchemeC[0.6\textwidth]{T-S-IN}\\ + \textbf{In}candescent\\ + not print-friendly +\end{center} + +\begin{center} + \scalebox{0.7}{\drawScheme{T-S-DR}}\\ + \textbf{D}iscrete \textbf{R}ainbow\\ + Do not interpolate! +\end{center} + +\begin{center} + \drawSchemeC[\textwidth]{T-S-SR}\\ + \textbf{S}mooth \textbf{R}ainbow\\ +\end{center}\clearpage + +\subsection{Okabe Ito qualitative color scheme}\label{sec:OkabeIto} +This is the qualitative color scheme commonly known as the \emph{Okabe Ito} color palette~\cite{Ichihara_2008}. + +\begin{center} + \scalebox{0.7}{\drawScheme{OI}}\\ + \textbf{O}kabe \textbf{I}to +\end{center} + +\section{Provided commands} +\marg{\cs{drawScheme\{...\}}}% +The discrete visualizations of color schemes given in this documentation are created with the command \cs{drawScheme\{...\}}. +The name of the color scheme should be provided to the command, e.g.\ \cs{drawScheme\{T-Q-B\}} to print the \emph{qualitative bright} scheme by Tol. +Note that this command is not available when the package option \texttt{no-tikz} is used. + +\marg{\cs{drawSchemeC\{...\}}}% +The continuous visualizations of color schemes given in this documentation are created with the command \cs{drawSchemeC\{...\}}. +The name of the color scheme should be provided to the command, e.g.\ \cs{drawSchemeC\{T-D-S\}} to print the \emph{diverging sunset} scheme by Tol. +Note that this command only works for color schemes that are allowed to be interpolated, and that the command is only available when the package option \texttt{pgf} is used. + +\clearpage +\printbibliography + +\end{document} diff --git a/Master/texmf-dist/doc/latex/colorblind/documentation.pdf b/Master/texmf-dist/doc/latex/colorblind/documentation.pdf Binary files differdeleted file mode 100644 index f35c9473281..00000000000 --- a/Master/texmf-dist/doc/latex/colorblind/documentation.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/colorblind/documentation.tex b/Master/texmf-dist/doc/latex/colorblind/documentation.tex deleted file mode 100644 index a04188b5703..00000000000 --- a/Master/texmf-dist/doc/latex/colorblind/documentation.tex +++ /dev/null @@ -1,365 +0,0 @@ -%% -%% ---------------------------------------------------------------- -%% Copyright (C) 2023-2024 by Simon Pfahler <simon.pfahler at ur dot de> -%% ---------------------------------------------------------------- -%% -%! TeX program = lualatex -\documentclass{scrartcl} -\usepackage[left=4cm,right=3cm,top=3cm,bottom=3cm, marginpar=3cm]{geometry} -\setlength{\parindent}{0pt} -\setlength{\parskip}{1ex} - -\usepackage{cprotect} -\usepackage{tikz} -\usetikzlibrary{math} - -\usepackage{xcolor} -\usepackage{soul} - -\usepackage{tikz} -\usetikzlibrary{positioning, shapes, fit, arrows.meta, decorations.pathmorphing} -\pgfdeclarelayer{bg} -\pgfsetlayers{bg,main} - -\usepackage{pgfplots, pgfplotstable} -\pgfplotsset{compat=1.18} - -%%%% from https://tex.stackexchange.com/questions/355713/pgfplots-show-error-marker-in-legend -\pgfplotsset{error bar legend/.style={% - /pgfplots/legend image code/.prefix code={% - \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}% - \draw[% - /pgfplots/every error bar, - mark=\pgfplotserrorbarsmark, - /pgfplots/error bars/error mark options, - sharp plot, - ##1 - ] plot coordinates {(0.3cm, -0.15cm) (0.3cm, 0.15cm)};% - } - } -} -%%%% - -\pgfplotsset{custom area legend/.style={% - /pgfplots/legend image code/.prefix code={% - \fill[##1, draw=white] plot coordinates {(0cm, -0.1cm) (0.6cm,-0.1cm) (0.6cm, 0.1cm) (0cm, 0.1cm)};% - } - } -} - -\def\w{420pt} - -\usepackage{hyperref} -\hypersetup{ - pdftitle={Easy colorblind-safe typesetting: the colorblind package}, - pdfauthor={Simon Pfahler}, -} -\usepackage{cleveref} - -\usepackage{csquotes} -\usepackage[backend=biber, style=numeric-comp, seconds=true, sorting=none, subentry=true, doi=false, alldates=iso]{biblatex} -\renewcommand*{\entrysetpunct}{\\[5pt]} -\addbibresource{bib.bib} - -\usepackage[Tol, OkabeIto]{colorblind} - -\newcommand\colorblind{\textbf{colorblind} } -\newcommand\hlc[2][T-Q-PH4]{{% - \colorlet{foo}{#1}% - \sethlcolor{foo}\hl{#2}}% -} - -\reversemarginpar -\newcommand\marg[1]{\leavevmode\marginpar{\raggedleft #1}} -\newcommand\tbs{\textbackslash} - -\title{Easy colorblind-safe typesetting:\\ the \colorblind package} -\author{Simon Pfahler} -\date{\today\\Version 1.0} - - -\begin{document} - -\maketitle - -\begin{abstract} - In colorblind-safe documents, the contents are presented in a way that the same information is conveyed to readers regardless of a potential color vision deficiency. - This package provides the tools necessary for colorblind-safe typesetting in \LaTeX. - It provides color schemes for a wide range of applications. - The most commonly used schemes are qualitative schemes, providing easily distinguishable colors for use in graphics, but also for text coloring or highlighting. - Additionally, diverging and sequential schemes are included which can be used for encoding quantitative information using colors. - This package incorporates colorblind-safeness into the writing process, making it both less cumbersome and less error-prone. -\end{abstract} - -\tableofcontents -\clearpage - -\section{Introduction} -\subsection{Package options} -\cprotect\marg{\verb!Tol!\\\verb!OkabeIto!}% -The \colorblind package provides the color schemes by Paul Tol~\cite{Tol} and the Okabe Ito color palette~\cite{Ichihara_2008}. -By default, no schemes are loaded. -Providing one of the options \verb!Tol! or \verb!OkabeIto! loads all corresponding schemes. - -\subsection{Overview} -As an example for how to use the colors, we look at the \emph{bright qualitative} color scheme by Tol. -\cref{fig:T-Q-Bexample} shows the colors in the scheme - -\begin{figure}[ht] - \centering - \drawScheme{T-Q-B} - \caption{Bright qualitative color scheme by Tol.} - \label{fig:T-Q-Bexample} -\end{figure} - -All colors in this model start with \verb!T-Q-B!, indicating that it is a scheme by \textbf{T}ol, that it is a \textbf{q}ualitative scheme, and that it is the \textbf{b}right scheme. -The colors in the scheme are specified by a number following the scheme name, in this case ranging from \verb!T-Q-B1! to \verb!T-Q-B6! for the non-grey colors. -The additional color \verb!T-Q-B0! provides a color that can be used, e.g., to indicate bad data. - -There are two reasons why color names are not based on natural color names (e.g., ``\hlc[T-Q-PH1]{blue}''): -\begin{enumerate} - \item Certain colors (\hlc[T-Q-PH3]{green}, \hlc[T-Q-PH5]{red}) are often used by people with full color vision to convey certain meanings (\hlc[T-Q-PH3]{good}, \hlc[T-Q-PH5]{bad}). - This meaning is difficult for people with color vision deficiencies to pick up. - By not using natural color names, it is easier to write colorblind-safe documents that do not make use of said connotations. - \item Natural color names can be cumbersome, e.g., when multiple variations of a primary color are used. It is annoying having to look up if a color is called, e.g., \hlc[T-Q-PH1]{blue} or \hlc[T-Q-PH2]{cyan}. -\end{enumerate} - -These colors are used the same way as any other colors. To change the text color to \verb!T-Q-B1! for example, use \verb!\color{T-Q-B1}!. - -\section{Guidelines} -On its own, using colorblind-safe colors is not sufficient for making a document truly colorblind-safe. -This section provides some general rules to follow for colorblind-safe typesetting. - -These rules apply to each visual unit of a document individually. -A visual unit may be a graphic, a table or a paragraph of text. -It might be advisable to be consistent also between different visual units (e.g., use the same color scheme for all graphics), but this is more of an aesthetic argument and is not strictly necessary for a colorblind-safe document. - -The most important rules are: -\begin{enumerate} - \item \hlc{Do not mix the colors in qualitative schemes!}\newline - The colors in each scheme are defined with the purpose of being easily distinguishable. - Mixing of colors, e.g., \verb?T-Q-B1!50!T-Q-B5? interferes with this. - A special case of this is that qualitative colors should not be mixed in order to convey quantitative information. - In this case, a suitable non-qualitative color scheme (i.e.\ a diverging or sequential scheme) should be used. - \item \hlc{Only use colors from one color scheme for a given visual unit!}\newline - The colors between different schemes are not tuned to be distinguishable. - Using colors from multiple schemes therefore defies the point of this package. - \item \hlc{Do not use shades of colors!}\newline - Saturation and brightness are also used for distinguishability, so mixings involving \verb!white! and \verb!black! should also be avoided. -\end{enumerate} - -The first two rules should be ensured in any visual unit. If the need for more colors arises, a different color scheme should be used alltogether. -While the third rule should also be followed in most scenarios, there are some situations that might allow for breaking this rule. As an example, consider \cref{fig:errorbar_plot}, where the error band is colored with a lighter shade of the original color. -This is ok because only few colors are used in the plot and the colors are not necessary for conveying the message of the plot. - -\begin{figure}[ht] - \centering - \begin{tikzpicture} - \begin{axis}[ - width=0.4*\w, - height=0.28*\w, - scale only axis=true, - xlabel = {x}, - ylabel = {y}, - x label style = {yshift=2mm}, - y label style = {yshift=-2mm}, - clip marker paths=true, - axis on top - ] - - \fill[T-Q-B5!20] (0,0.1068558) -- (40,0.1068558) -- (40,0.0668558) -- (0,0.0668558) -- cycle; - \draw[T-Q-B5] (0,0.0868558) -- (40,0.0868558); - - \addplot[color=T-Q-B1, mark=*, only marks, forget plot] - plot[/pgfplots/error bars/.cd, x dir=none, y dir=both, y explicit, - error mark=-, error bar style={color=T-Q-B1}] - coordinates { - (4,0.263148) +- (0.120064,0.120064) - (8,0.159158) +- (0.0621894,0.0621894) - (12,0.129892) +- (0.0543303,0.0543303) - (16,0.112302) +- (0.0358508,0.0358508) - (20,0.098435) +- (0.02648,0.02648) - (24,0.0909784) +- (0.0215048,0.0215048) - (28,0.0894657) +- (0.0212992,0.0212992) - (32,0.0869343) +- (0.0202553,0.0202553) - }; - \addlegendimage{T-Q-B1, mark=*, only marks, error bar legend}; - \addlegendentry{data}; - \addlegendimage{draw=T-Q-B5, fill=T-Q-B5!20, custom area legend}; - \addlegendentry{reference}; - - \end{axis} - \end{tikzpicture} - \cprotect\caption{This plot breaks rule 3 by using the shade \verb?T-Q-B5!20? for the error band of the reference, but it is still colorblind-safe.} - \label{fig:errorbar_plot} -\end{figure} - -There are additional guidelines that should be kept in mind when typesetting colorblind-safe documents. -Their importance may vary between different applications, so try to follow them as best as possible, at your own judgement. -In no particular order, they are: -\begin{itemize} - \item \hlc{Do not convey information only through color!}\newline - When possible, encode the information the color provides also in a different way, e.g., through text, patterns or symbols. - \item \hlc{Do not use color for information and aesthetics simultaneously!}\newline - Color is often also used for aesthetic reasons, e.g., on a scientific poster. - While this is ok in principle, do not mix information and aesthetics within the same visual unit, as this makes it more difficult to extract the encoded information. - \item \hlc{Do not use rainbow color schemes!}\newline - Due to the many different colors in a rainbow color scheme, they are very difficult to distinguish for people with color vision deficiencies (even when the scheme is tuned for this purpose). - Therefore, it is best to avoid them. - If you insist on using them, Paul Tol provides both a sequential as well as a continuous version, which are optimized to be as distinguishable as possible. -\end{itemize} - -\section{Provided color schemes}\label{sec:colors} -The color schemes provided are split into three groups: -\begin{itemize} - \item Qualitative schemes:\newline - These schemes are used to convey qualitative information, such as different data sources, countries or manufacturers. - They should usually be used for coloring text or distinguishing different lines/bars in a plot. - \item Diverging color schemes:\newline - When quantitative data ranges between two extremes, and the middle is being considered ``neutral'', a diverging color scheme should be used. - Examples for this kind of data might be test grades, temperatures or pH values. - \item Sequential color schemes:\newline - For quantitative data without an important midpoint, sequential color schemes should be preferred over diverging ones. - This is especially true for quantites that start from $0$. - They can be used to denote for example velocities, concentrations or pressures. -\end{itemize} - -For each type of schemes, this package provides a range of options. -\Cref{sec:Tol_schemes} shows the schemes designed by Paul Tol~\cite{Tol}, which include qualitative, diverging and sequential schemes (see \cref{sec:T-Q,sec:T-D,sec:T-S}). -In \cref{sec:OkabeIto}, the Okabe Ito color scheme~\cite{Ichihara_2008} is provided, which is probably the most famous qualitative colorblind-safe color scheme due to it being mentioned in various articles in high-ranking journals. - -All of the schemes are colorblind-safe, and some are optimized for printout or designed for a particular purpose. -This is denoted under the scheme name.\clearpage - -\subsection{Paul Tol's color schemes}\label{sec:Tol_schemes} - -\subsubsection{Qualitative color schemes}\label{sec:T-Q} -\begin{minipage}{0.5\textwidth} - \centering - \scalebox{0.7}{\drawScheme{T-Q-B}}\\ - \textbf{B}right\\ - \phantom{pb} -\end{minipage}\hfill% -\begin{minipage}{0.5\textwidth} - \centering - \scalebox{0.7}{\drawScheme{T-Q-V}}\\ - \textbf{V}ibrant -\end{minipage} - -\begin{minipage}{0.5\textwidth} - \centering - \scalebox{0.7}{\drawScheme{T-Q-HC}}\\ - \textbf{H}igh-\textbf{C}ontrast\\ - works for black and white printout -\end{minipage}\hfill% -\begin{minipage}{0.5\textwidth} - \centering - \scalebox{0.7}{\drawScheme{T-Q-MC}}\\ - \textbf{M}edium-\textbf{C}ontrast\\ - works for black and white printout -\end{minipage} - -\begin{center} - \scalebox{0.7}{\drawScheme{T-Q-M}}\\ - \textbf{M}uted -\end{center} - -\begin{minipage}{0.5\textwidth} - \centering - \scalebox{0.7}{\drawScheme{T-Q-PH}}\\ - \textbf{P}ale \textbf{H}ighlight\\ - specifically for text background -\end{minipage}\hfill% -\begin{minipage}{0.5\textwidth} - \centering - \scalebox{0.7}{\drawScheme{T-Q-DT}}\\ - \textbf{D}ark \textbf{T}ext\\ - specifically for text color -\end{minipage} - -\begin{center} - \scalebox{0.7}{\drawScheme{T-Q-L}}\\ - \textbf{L}ight\\ - less distinguishable than other schemes,\\ mostly meant for filling in labelled cells -\end{center}\clearpage - -\subsubsection{Diverging color schemes}\label{sec:T-D} -For diverging schemes, when a continuous palette is needed, the colors are allowed to be linearly interpolated. -When using \verb!pgfplots! (or \verb!TikZ!), the interpolations are available as colormaps with the names of their color scheme. - -\begin{center} - \scalebox{0.7}{\drawScheme{T-D-S}}\\ - \drawSchemeC[0.6\textwidth]{T-D-S}\\ - \textbf{S}unset -\end{center} - -\begin{center} - \scalebox{0.7}{\drawScheme{T-D-N}}\\ - \drawSchemeC[0.9\textwidth]{T-D-N}\\ - \textbf{N}ightfall -\end{center} - -\begin{center} - \scalebox{0.7}{\drawScheme{T-D-BR}}\\ - \drawSchemeC[0.5\textwidth]{T-D-BR}\\ - \textbf{B}u\textbf{R}d -\end{center}\clearpage - -\subsubsection{Sequential color schemes}\label{sec:T-S} -For most sequential schemes, a continuous palette can be obtained again by linearly interpolating the colors. -The only exception to this is the \emph{discrete rainbow} scheme, which has an explicitly continuos variation, the \emph{smooth rainbow} scheme. -When using \verb!pgfplots!, the interpolations are available as colormaps with the names of their color scheme. - -When the discrete scheme is not shown, this is because there are too many colors in them. - -\begin{center} - \scalebox{0.7}{\drawScheme{T-S-YOB}}\\ - \drawSchemeC[0.5\textwidth]{T-S-YOB}\\ - \textbf{Y}l\textbf{O}r\textbf{B}r -\end{center} - -\begin{center} - \drawSchemeC[0.9\textwidth]{T-S-IR}\\ - \textbf{Ir}idescent -\end{center} - -\begin{center} - \scalebox{0.7}{\drawScheme{T-S-IN}}\\ - \drawSchemeC[0.6\textwidth]{T-S-IN}\\ - \textbf{In}candescent\\ - not print-friendly -\end{center} - -\begin{center} - \scalebox{0.7}{\drawScheme{T-S-DR}}\\ - \textbf{D}iscrete \textbf{R}ainbow\\ - Do not interpolate! -\end{center} - -\begin{center} - \drawSchemeC[\textwidth]{T-S-SR}\\ - \textbf{S}mooth \textbf{R}ainbow\\ -\end{center} - -\subsection{Okabe Ito qualitative color scheme}\label{sec:OkabeIto} -This is the qualitative color scheme commonly known as the \emph{Okabe Ito} color palette~\cite{Ichihara_2008}. - -\begin{center} - \scalebox{0.7}{\drawScheme{OI}}\\ - \textbf{O}kabe \textbf{I}to -\end{center} - -\section{Provided commands} -\cprotect\marg{\verb!\drawScheme{...}!}% -The discrete visualizations of color schemes given in this documentation are created with the command \verb!\drawScheme{...}!. -The name of the color scheme should be provided to the command, e.g.\ \verb!\drawScheme{T-Q-B}! to print the \emph{qualitative bright} scheme by Tol. - -\cprotect\marg{\verb!\drawSchemeC{...}!}% -The continuous visualizations of color schemes given in this documentation are created with the command \verb!\drawSchemeC{...}!. -The name of the color scheme should be provided to the command, e.g.\ \verb!\drawSchemeC{T-D-S}! to print the \emph{diverging sunset} scheme by Tol. -Note that this command only works for color schemes that are allowed to be interpolated. - -\clearpage -\printbibliography - -\end{document} diff --git a/Master/texmf-dist/doc/latex/easybook/README.md b/Master/texmf-dist/doc/latex/easybook/README.md index dce421d3b41..bd0b1b68e29 100644 --- a/Master/texmf-dist/doc/latex/easybook/README.md +++ b/Master/texmf-dist/doc/latex/easybook/README.md @@ -1,5 +1,5 @@ # The `easybook` document class -Easily typesetting Chinese theses or books (v2024hx) +Easily typesetting Chinese theses or books (v2024hz) ## Abstract `easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes. diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf Binary files differindex 686760c0a49..01f70dc7a8d 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.pdf +++ b/Master/texmf-dist/doc/latex/easybook/easybook.pdf diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.tex b/Master/texmf-dist/doc/latex/easybook/easybook.tex index 2ca7066d435..0dcf45bc129 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex @@ -23,8 +23,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK使用手册, - version = v2024hx, - date = 2024/12/22, + version = v2024hz, + date = 2024/12/23, authors = 瞿毅, info = 简便地排版中文学位论文或书籍, email = toquyi@163.com, diff --git a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md index 80629d5ef56..7cfd571a6cd 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md @@ -7,6 +7,28 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2024-12-09] + +### Added +- `\bitset_use:N` and `\clist_use:N`: this clarifies that bitsets and clists + can be used with `V`-type expansion +- `\sys_if_engine_opentype:(TF)` +- Add equivalent interfaces for regex functions: + - `\int_(g)set_regex_count:Nnn`, `\int_(g)set_regex_count:NNn` + - `\seq_(g)set_regex_extract_once:Nnn`, `\seq_(g)set_regex_extract_once:NNn` + - `\seq_(g)set_regex_extract_all:Nnn`, `\seq_(g)set_regex_extract_all:NNn` + - `\seq_(g)set_regex_split:Nnn`, `\seq_(g)set_regex_split:NNn` + - `\tl_if_regex_match:nn(TF)`, `\tl_if_regex_match:nN(TF)` + - `\tl_regex_(g)replace_once:Nnn`, `\tl_regex_(g)replace_once:NNn` + - `\tl_regex_(g)replace_all:Nnn`, `\tl_regex_(g)replace_all:NNn` + +### Fixed +- `\prop_item:Nn` result not returned in `\exp_not:n` for linked properties + (#1630) + +### Removed +- `\c_catcode_active_tl`: was missing a `_`, always intended to be internal + ## [2024-11-02] ### Added @@ -1793,7 +1815,8 @@ this project uses date-based 'snapshot' version identifiers. - Step functions have been added for dim variables, e.g. `\dim_step_inline:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2024-11-02...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2024-12-09...HEAD +[2024-12-09]: https://github.com/latex3/latex3/compare/2024-11-02...2024-12-09 [2024-11-02]: https://github.com/latex3/latex3/compare/2024-10-09...2024-11-02 [2024-10-09]: https://github.com/latex3/latex3/compare/2024-09-10...2024-10-09 [2024-09-10]: https://github.com/latex3/latex3/compare/2024-08-30...2024-09-10 diff --git a/Master/texmf-dist/doc/latex/l3kernel/README.md b/Master/texmf-dist/doc/latex/l3kernel/README.md index d048951c6d4..4721d6ca8c7 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/README.md +++ b/Master/texmf-dist/doc/latex/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2024-11-02 +Release 2024-12-09 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf Binary files differindex 611d4ad06f9..888e6d3af4b 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf Binary files differindex ca71fc3daff..241f71b5811 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex index 91576320b01..c5286fdb343 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex @@ -58,7 +58,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2024-11-02} +\date{Released 2024-12-09} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf Binary files differindex de0bcf60e83..2e0ebf63db7 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3doc.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf Binary files differindex 061cd6fc447..8039326289f 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf Binary files differindex 6082a4a8f05..2ed90b59e34 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf Binary files differindex ab42ee7d9e4..51c7ab3882c 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news01.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf Binary files differindex 0dc154f2666..662d3927d53 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news02.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf Binary files differindex b65c38e4dae..d8159114d13 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news03.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf Binary files differindex 72b0bd75080..56df9fa8c9a 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news04.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf Binary files differindex 1ee59993893..781cbe546f5 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news05.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf Binary files differindex 796821593a7..b79bd3b3ccc 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news06.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf Binary files differindex 545b732f7af..c2e10cd77ab 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news07.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf Binary files differindex 66d91ae3414..2d1503dda92 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news08.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf Binary files differindex 1e56ef28374..5da780b048c 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news09.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf Binary files differindex 1d50364e6e8..b1fbb7286b3 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news10.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf Binary files differindex c5460e4ca73..ff66366fde7 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news11.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf Binary files differindex 517857c7dd6..f2c8092f9b2 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3news12.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt b/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt index 0403ec5225e..49187343561 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt +++ b/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt @@ -141,6 +141,7 @@ Function Date removed \box_set_eq_clear:NN 2021-07-07 \box_use_clear:c 2018-12-27 \box_use_clear:N 2018-12-27 +\c_catcode_active_tl 2024-11-12 \c_active_char_token 2011-09-08 \c_alignment_tab_token 2011-09-08 \c_eight 2020-01-01 diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.csv b/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.csv index e9835fb3f0e..4fad000211b 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.csv +++ b/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.csv @@ -75,6 +75,7 @@ emoji,emoji,Xiangdong Zeng,https://github.com/stone-zeng/latex-emoji,https://git emojicite,emojicite,Leon Sixt,https://github.com/berleon/emojicite,https://github.com/berleon/emojicite.git,https://github.com/berleon/emojicite/issues/,2020-04-14,2020-04-20, empty,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12, enotez,enotez,Clemens Niederberger,https://github.com/cgnieder/enotez/,https://github.com/cgnieder/enotez.git,https://github.com/cgnieder/enotez/issues,2013-03-16,2020-04-14, +enumext,enumext,Pablo González,https://github.com/pablgonz/enumext,git@github.com:pablgonz/enumext.git,https://github.com/pablgonz/enumext/issues,2024-11-18,2024-11-18, etex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27, etl,etl,Jonathan P. Spratte,https://github.com/Skillmon/ltx_etl,git@github.com:Skillmon/ltx_etl.git,https://github.com/Skillmon/ltx_etl/issues,2021-08-16,2021-08-16, exp,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27, @@ -231,6 +232,7 @@ rivbook,rivbook,Julien Rivaud,,,,2018-06-13,2018-06-14, rivmath,rivmath,Julien Rivaud,,,,2018-06-13,2018-06-13, rpgicons,rpgicons,Jasper Habicht,https://github.com/jasperhabicht/rpgicons,https://github.com/jasperhabicht/rpgicons/rpgicons.git,https://github.com/jasperhabicht/rpgicons/issues,2024-04-29,2024-04-29, sanuml,sanitize-umlaut,Thomas F. Sturm,https://github.com/T-F-S/sanitize-umlaut,https://github.com/T-F-S/sanitize-umlaut.git,https://github.com/T-F-S/sanitize-umlaut/issues,2022-07-19,2022-07-19, +scaletextbullet,scaletextbullet,Oliver Beery,https://github.com/beeryoliver/scaletextbullet,https://github.com/beeryoliver/scaletextbullet/scaletextbullet.git,https://github.com/beeryoliver/scaletextbullet/issues,2024-11-15,2024-11-15, scan,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27, schulma,schulmathematik,Keno Wehr,https://ctan.org/pkg/schulmathematik,,,2021-08-23,2021-08-23, scontents,scontents,Pablo González,https://github.com/pablgonz/scontents,git@github.com:pablgonz/scontents.git,https://github.com/pablgonz/scontents/issues,2019-12-05,2019-12-05, diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf Binary files differindex 3063489a715..c50af16ac6d 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3prefixes.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf Binary files differindex 3bc937254f8..42a51a2545b 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex index 32395f1377f..6395c2b433d 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2024-11-02} +\date{Released 2024-12-09} \begin{document} diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf Binary files differindex 5d7b4faff42..ff471740cd6 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex index d86cba73d81..4ef884a5ba6 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2024-11-02} +\date{Released 2024-12-09} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf Binary files differindex 921a8a0614a..b1faa183381 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex index cb01e6f812a..735af0146cd 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2024-11-02} +\date{Released 2024-12-09} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf Binary files differindex 463d639fb0f..20488fc15d8 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.tex b/Master/texmf-dist/doc/latex/l3kernel/source3.tex index 08d3319b5eb..ef6244f6cc3 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.tex @@ -57,7 +57,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2024-11-02} +\date{Released 2024-12-09} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex/pageslts/README b/Master/texmf-dist/doc/latex/pageslts/README index 490ea9aaa5e..8a284056920 100644 --- a/Master/texmf-dist/doc/latex/pageslts/README +++ b/Master/texmf-dist/doc/latex/pageslts/README @@ -1,4 +1,4 @@ -README for pageslts package, 2024-12-07, v2.0b +README for pageslts package, 2024-12-23, v2.0c TABLE OF CONTENTS @@ -143,7 +143,7 @@ h) Copy the documentation files to The pageslts.sty for LaTeX2e (i.e. all documents using the pageslts package) requires: -- TeXFormat LaTeX2e, 2024-06-01 +- TeXFormat LaTeX2e, 2024-11-01 - package undolabl, 2024-12-05, v1.0n, https://ctan.org/pkg/undolabl - if any of the options alphMult, AlphMulti, or fnsymbolmult @@ -152,12 +152,12 @@ pageslts package) requires: The pageslts-example.tex requires the same files as all documents using the pageslts package, and additionally: -- class article, 2024/02/08, v1.4n, from classes.dtx: https://ctan.org/pkg/classes +- class article, 2024/06/29, v1.4n, from classes.dtx: https://ctan.org/pkg/classes - package alphalph, 2019/12/09, v2.6, https://ctan.org/pkg/alphalph - package lipsum, 2021-09-20, v2.7, https://ctan.org/pkg/lipsum - package showkeys, 2024/05/23, v3.21, https://ctan.org/pkg/showkeys -- package hyperref, 2024-10-30, v7.01k, https://ctan.org/pkg/hyperref -- package pageslts, 2024-12-06, v2.0b, https://ctan.org/pkg/pageslts +- package hyperref, 2024-11-05, v7.01l, https://ctan.org/pkg/hyperref +- package pageslts, 2024-12-23, v2.0c, https://ctan.org/pkg/pageslts (Well, it is the example file for this package, and because you are reading the README for the pageslts package, it can be assumed that you already have some version of it diff --git a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf Binary files differindex ec37cf643a5..780b2553163 100644 --- a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf +++ b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf diff --git a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex index 10ba03e982d..48608665cfa 100644 --- a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex +++ b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pageslts -%% Version: 2024-12-07 v2.0b +%% Version: 2024-12-23 v2.0c %% Info: Variants of last page labels %% %% Copyright (C) 2010 - 2024 by @@ -65,11 +65,11 @@ %% Tommy Muench + 2014-01-02 %% Hans-Klaus Muench + 2014-08-24 %% -\documentclass[british]{article}[2024/02/08]% v1.4n +\documentclass[british]{article}[2024/06/29]% v1.4n \usepackage{lipsum}[2021-09-20]% v2.7 \usepackage[draft]{showkeys}[2024/05/23]% v3.21 %% Use final instead of draft to hide the keys. %% -\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-10-30]% v7.01k +\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-11-05]% v7.01l \makeatletter \@ifpackageloaded{hyperref}{% Hypertext links for LaTeX \hypersetup{extension=pdf,% @@ -86,7 +86,7 @@ }}{\usepackage{url}[2013/09/16]}% v3.4 \makeatother \usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,% - romanMult=true,RomanMulti=true]{pageslts}[2024-12-07]% v2.0b + romanMult=true,RomanMulti=true]{pageslts}[2024-12-23]% v2.0c %% These are the default options. %% \makeatletter @@ -128,7 +128,7 @@ \markboth{Example for pageslts}{Example for pageslts} This example demonstrates the most common uses of package\newline -\textsf{pageslts}, v2.0b as of 2024-12-07 (HMM);\newline +\textsf{pageslts}, v2.0c as of 2024-12-23 (HMM);\newline \url{https://ctan.org/pkg/pageslts}.\bigskip The used options were \texttt{pagecontinue=true}, diff --git a/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf b/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf Binary files differindex 491793e2186..7046225de56 100644 --- a/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf +++ b/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf diff --git a/Master/texmf-dist/doc/support/expltools/CHANGES.md b/Master/texmf-dist/doc/support/expltools/CHANGES.md index 39d3a6c9c60..3192d358ed9 100644 --- a/Master/texmf-dist/doc/support/expltools/CHANGES.md +++ b/Master/texmf-dist/doc/support/expltools/CHANGES.md @@ -1,5 +1,47 @@ # Changes +## expltools 2024-12-23 + +### explcheck v0.3.0 + +#### Development + +- Add option `--expect-expl3-everywhere` to ignore \ExplSyntaxOn and Off. + (discussed with @muzimuzhi in #17, added in #19) + +- Add short-hand command-line option `-p` for `--porcelain`. + (suggested by @FrankMittelbach in #8, added in #19) + +- Add file `explcheck-config.lua` with the default configuration of explcheck. (#19) + + You may place a file named `explcheck-config.lua` with your own configuration + in your repository to control the behavior of explcheck. + + Note that the configuration options are provisional and may be changed or + removed before version 1.0.0. Furthermore, support for configuration YAML + files that will allow you to specify different configuration for different + .tex files is envisioned for a future release and will be the recommended way + to configure explcheck. + +#### Fixes + +- Make the detection of error E102 (expl3 material in non-expl3 parts) more precise. + (discussed with @cfr42 in #18, fixed in #19) + +- Use a less naïve parser of TeX comments to improve the detection of issues + W100 and E102. (reported by @FrankMittelbach in #8, fixed in #16) + +#### Documentation + +- State in the output of `explcheck --help` that command-line options are + provisional and subject to change. (discussed with @FrankMittelbach and + @muzimuzhi in #8 and #17, added in #19) + +- Display the default maximum line length in the output of `explcheck --help`. (#19) + +- Rename E102 to "expl3 material in non-expl3 parts". + (discussed with @cfr42 in #18, added in #19) + ## expltools 2024-12-13 ### explcheck v0.2.0 @@ -7,7 +49,7 @@ #### Development - Add a command-line option `--porcelain` for machine-readable output. - (suggested by @FrankMittelbach in #8, added in #14) + (suggested by @FrankMittelbach in #8, added in #15) See <https://github.com/Witiko/expltools/pull/15#issuecomment-2542418484> and below for a demonstration of how you might set up your text editor, so diff --git a/Master/texmf-dist/doc/support/expltools/README.md b/Master/texmf-dist/doc/support/expltools/README.md index 94479c74c5f..4b2f33cdcdf 100644 --- a/Master/texmf-dist/doc/support/expltools/README.md +++ b/Master/texmf-dist/doc/support/expltools/README.md @@ -6,10 +6,14 @@ This repository contains the code and documentation of an expl3 static analysis 2. [Requirements][2] 3. [Related work][3] 4. [Design][4] -5. [First public release][5] -On September 6, 2024, the tool has been [accepted for funding][6] by [the TeX Development Fund][7]. -The full text of the project proposal, which summarizes devlog posts 1–4 is available [here][8]. +On September 6, 2024, the tool has been [accepted for funding][5] by [the TeX Development Fund][6]. +The full text of the project proposal, which summarizes devlog posts 1–4 is available [here][7]. + +These devlog posts chronicle the latest updates and progress in the ongoing development of the tool: + +5. [Frank Mittelbach in Brno, the first public release of explcheck, and expl3 usage statistics][8] from December 5, 2024 +6. [A flurry of releases, CSTUG talk, and what's next][9] from December 19, 2024 In the future, this repository may also contain the code of other useful development tools for expl3 programmers, such as a command-line utility similar to `grep` that will ignore whitespaces and newlines as well as other tools. @@ -17,10 +21,11 @@ In the future, this repository may also contain the code of other useful develop [2]: https://witiko.github.io/Expl3-Linter-2/ [3]: https://witiko.github.io/Expl3-Linter-3/ [4]: https://witiko.github.io/Expl3-Linter-4/ - [5]: https://witiko.github.io/Expl3-Linter-5/ - [6]: https://tug.org/tc/devfund/grants.html - [7]: https://tug.org/tc/devfund/application.html - [8]: https://tug.org/tc/devfund/documents/2024-09-expltools.pdf + [5]: https://tug.org/tc/devfund/grants.html + [6]: https://tug.org/tc/devfund/application.html + [7]: https://tug.org/tc/devfund/documents/2024-09-expltools.pdf + [8]: https://witiko.github.io/Expl3-Linter-5/ + [9]: https://witiko.github.io/Expl3-Linter-6/ ## Usage diff --git a/Master/texmf-dist/doc/support/expltools/project-proposal.pdf b/Master/texmf-dist/doc/support/expltools/project-proposal.pdf Binary files differindex 1d831747a9f..a4bc78b18b5 100644 --- a/Master/texmf-dist/doc/support/expltools/project-proposal.pdf +++ b/Master/texmf-dist/doc/support/expltools/project-proposal.pdf diff --git a/Master/texmf-dist/doc/support/expltools/warnings-and-errors-01-preprocessing.md b/Master/texmf-dist/doc/support/expltools/warnings-and-errors-01-preprocessing.md index a88efa28c7a..965156dbc8b 100644 --- a/Master/texmf-dist/doc/support/expltools/warnings-and-errors-01-preprocessing.md +++ b/Master/texmf-dist/doc/support/expltools/warnings-and-errors-01-preprocessing.md @@ -11,8 +11,8 @@ An input file contains extraneous `\ExplSyntaxOn` delimiters [@latexteam2024inte /w101.tex -## Expl3 control sequences in non-expl3 parts {.e label=e102} -An input file contains what looks like expl3 control sequences [@latexteam2024interfaces, Section 1.1] in non-expl3 parts. +## Expl3 material in non-expl3 parts {.e label=e102} +An input file contains what looks like expl3 material [@latexteam2024interfaces, Section 1.1] in non-expl3 parts. /e102.tex diff --git a/Master/texmf-dist/doc/support/expltools/warnings-and-errors.pdf b/Master/texmf-dist/doc/support/expltools/warnings-and-errors.pdf Binary files differindex 56c20e7dfa2..53c8011a94e 100644 --- a/Master/texmf-dist/doc/support/expltools/warnings-and-errors.pdf +++ b/Master/texmf-dist/doc/support/expltools/warnings-and-errors.pdf diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/README.md b/Master/texmf-dist/doc/xelatex/hduthesis/README.md index ed262152920..6a92084e29b 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/README.md +++ b/Master/texmf-dist/doc/xelatex/hduthesis/README.md @@ -1,7 +1,6 @@ ## 杭州电子科技大学学位论文 LaTeX 模板 -杭州电子科技大学学位论文 LaTeX 模板以 `LaTeX-expl3` 构建. -模板提供杭州电子科技大学学士和硕士学位论文模板. +杭州电子科技大学学位论文 LaTeX 模板以 `LaTeX-expl3` 构建,提供杭州电子科技大学学士和硕士学位论文格式. `hduThesiS` 的模块提供以下支持: @@ -39,7 +38,7 @@ Modules of `hduThesiS` provide the following supports: - `hdu.l3doc`: Configuration for class's `l3doc` manual -**Welcome to pull requests [here](https://github.com/xiamyphys/hduthesis).** +**Welcome to pull requests [here](https://github.com/myhsia/hduthesis).** ## License @@ -53,18 +52,18 @@ The Current Maintainer of this work is [Mingyu Xia](https://www.ctan.org/author/ #### References -> [1]. The LaTeX3 Interfaces +> \[1\]. The LaTeX3 Interfaces -> [2]. CTeX 宏集 +> \[2\]. CTeX 宏集 -> [3]. LaTeX for package and class authors current version +> \[3\]. LaTeX for package and class authors current version -> [4]. The LaTeX2e Sources +> \[4\]. The LaTeX2e Sources -> [4]. The LaTeX3 kernel: style guide for code authors +> \[5\]. The LaTeX3 kernel: style guide for code authors -> [5]. Package `etoolbox`, `geometry`, `tocloft`, `fancyhdr`, etc. +> \[6\]. Package `etoolbox`, `geometry`, `tocloft`, `fancyhdr`, etc. -> [6]. [毕业设计(论文)的写作规范及格式要求(含写作模板)](https://jwc.hdu.edu.cn/2022/0428/c4555a153813/page.htm) +> \[7\]. [毕业设计(论文)的写作规范及格式要求(含写作模板)](https://jwc.hdu.edu.cn/2022/0428/c4555a153813/page.htm) -> [7]. [杭州电子科技大学研究生学位论文格式统一要求(杭电研〔2012〕311号)](https://grs.hdu.edu.cn/2013/0507/c1730a51754/page.htm) +> \[8\]. [杭州电子科技大学研究生学位论文格式统一要求(杭电研〔2012〕311号)](https://grs.hdu.edu.cn/2013/0507/c1730a51754/page.htm) diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/abstract.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/abstract.tex new file mode 100644 index 00000000000..3bf688b19b1 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/abstract.tex @@ -0,0 +1,12 @@ +\begin{abstract} + \hologo{hduthesis} 是杭州电子科技大学学位论文 \hologo{LaTeX} 模板,支持学士、硕士学位论文排版. +\end{abstract} + +\begin{center} + \small\bfseries 用户协议 +\end{center} +\begin{enumerate} [ itemsep = 0pt ] \small + \item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件. + \item 本模板根据杭州电子科技大学教务处颁发的 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 编写而成,作者不对使用本模板产生的格式审查问题负责. \emph{如果您所在的学院因论文查重、收录等原因要求提交 \file{.docx} 格式,不接收 \file{.pdf} 论文稿件,请勿执意使用本模板,避免因格式转换带来不必要的麻烦.} 使用本模板时,请按编译错误提示操作来勾选同意用户协议. + \item 欢迎前往 GitHub 提交反馈意见,为推动学校认证与规范化 \hologo{hduthesis} 贡献力量. +\end{enumerate}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/contents.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/contents.tex new file mode 100644 index 00000000000..72a5eb84da2 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/contents.tex @@ -0,0 +1,345 @@ +\section{\hologo{hduthesis} 模板介绍} + +\hologo{hduthesis}(\textbf Hangzhou \textbf Dianzi \textbf University \hologo{LaTeX} \textbf{Thesis} Template) 是杭州电子科技大学学位论文 \underline{非官方} \hologo{LaTeX} 模板,以 \hologo{LaTeX3} 构建,支持学士和硕士学位论文排版. + +本模板文档将尽量完整地介绍模板的使用方法,如有不清楚之处,或者想提出改进建议,可以在 \href{https://github.com/myhsia/hduthesis/issues}{GitHub Issues} 提交反馈意见及贡献代码. + +对于未接触过 \hologo{LaTeX} 的初学者,推荐阅读 +\href{https://tug.ctan.org/info/lshort/english/lshort.pdf} + {\emph{The Not So Short Introduction to \hologo{LaTeX2e}}} +(可在终端执行 \cmd{texdoc lshort} 获取)或者其中文版 +\href{http://mirrors.ctan.org/info/lshort/chinese/lshort-zh-cn.pdf} + {\emph{《一份(不太)简短的 \hologo{LaTeX2e} 介绍》}} +(可在终端执行 \cmd{texdoc lshort-zh-cn} 获取). + +\subsection{模板组成} + +\hologo{hduthesis} 模板的 \file{./tex/} 文件夹中包含了模板的所有 Runtime 文件. +其中,\file{hduthesis.cls} 是模板的核心文件,实质上并不提供主要功能,只用于对全局选项的控制加载模板的各个模块. 模板的功能模块如下 + +\begin{tasks}(2) + \task! \file{typeset}:排版模块,用于控制字体和公式设置. + \task! \file{layout}:版面模块,用于提供封面所用到的盒子和对输入文档信息的处理. + \task \file{bc.config}:本科学位论文配置模块. + \task \file{pg.config}:硕士学位论文配置模块. + \task \file{hdu.l3doc}:用户手册模块. + \task \file{hdu.stationery}:信纸模块. +\end{tasks} + +以上模块包含在 \file{hduthesis-}\meta{模块名}\file{-module.code.tex} 文件中. +同时,\file{./tex/} 文件夹中还包含了 \file{hdulogo.pdf}、\file{hdutitle.pdf}、\file{hdumotto.pdf}、\file{hdubadge.pdf},分别提供杭州电子科技大学校徽、校名、校训和校牌的矢量图. +\footnote + { + 这些矢量图均由 \href{https://www.hdu.edu.cn/666/list.htm}{校情纵览/校标规范} 所提供素材用 \href{https://inkscape.org}{Inkscape} 裁切制成. 如果你通过 \cmd{tlmgr} 安装了此模板,在其他文档类中也可以调用这些素材,并支持在 \hologo{XeLaTeX} 和 \hologo{pdfLaTeX} 编译器下使用 \cmd{Ti\textit k\/Z} 等方式设置透明度. + } + +模板预制的宏包有 + +\begin{table}[htbp] + \centering \renewcommand* \arraystretch {.72} + \begin{tabularx}{\linewidth}{*{9}{>{\footnotesize}X}} + \toprule + \pkg{amssymb} & \pkg{bm} & \pkg{booktabs} & + \pkg{cancel} & \pkg{circuitikz} & \pkg{cleveref} & + \pkg{derivative} & \pkg{extarrows} & \pkg{fixdif} \\ + \midrule + \pkg{hyperref} & \pkg{listings} & \pkg{mathtools} & + \pkg{multicol} & \pkg{pgfplots} & \pkg{physics2} & + \pkg{siunitx} & \multicolumn{2}{>{\footnotesize}l}{\pkg{unicode-math}}\\ + \bottomrule + \end{tabularx} +\end{table} + +\subsection{文件结构} + +\subsubsection{用户手册} + +\begin{center} + \begin{minipage}{.36\linewidth} + \dirtree + {% + .1 ./doc/. + .2 hduthesis.tex. + .2 hduthesis.pdf. + } + \end{minipage} + \hfill + \begin{minipage}{.6\linewidth} + \dirtree + {% + .1 ./example/. + .2 hduthesis-bc.tex, hduthesis-bc.pdf. + .2 hduthesis-pg.tex, hduthesis-pg.pdf. + } + \end{minipage} +\end{center} + +\subsubsection{Runtime 文件} + +\dirtree + {% + .1 ./tex/. + .2 hduthesis.cls. + .2 hduthesis-typeset-module.code. + .2 hduthesis-layout-module.code. + .2 hduthesis-bc.config-module.code. + .2 hduthesis-pg.config-module.code. + .2 hduthesis-hdu.l3doc-module.code. + .2 hduthesis-hdu.stationery-module.code. + .2 hdulogo.pdf, hdutitle.pdf, hdumotto.pdf, hdubadge.pdf. + } + +\subsubsection{许可证} + +\dirtree + {% + .1 ./LICENSE, README.md. + } +\section{模板安装} + +\subsection{系统要求} + +本模板支持在 \cmd{macOS}、\cmd{Windows}、\cmd{Linux}、\cmd{Overleaf}、\cmd{TeXPage} 等平台使用. +\footnote + { + 所使用的测试平台为 \cmd{macOS Sequoia Version 15.3}、\cmd{Ubuntu 24.04.1 LTS}、\cmd{Overleaf} 上的 \hologo{TeX} Live 2024 发行版,本模板均可顺利编译. + } +本模板最低兼容发行版 \hologo{TeX} Live 2022,推荐使用 \hologo{TeX} Live 2023 或更新版本. +\footnote + { 发行版 \hologo{TeX} Live 2022 中不包含 \pkg{physics2} 宏包,无法快捷输入等高括号. } +\footnote + { + 发行版 \hologo{TeX} Live 2022 中通过导言区设置中文字体伪粗体和伪斜体时可能遇到报错. 详情请见 3.2 节. + } +\footnote + { + 根据 \emph{Plan for \hologo{TeX} Live 2025: 22feb: code freeze for final build, major bug fixes only; 1mar: final updates from CTAN, final doc tweaks.} 本模板将于 2025 年 2 月 22 日移除对 \hologo{TeX} Live 2022 的兼容,建议 \hologo{TeX} Live 2022 用户尽快升级至最新发行版. + } +使用本模板生成学位论文,仅支持 \hologo{XeLaTeX} 编译;使用本模板生成信纸,支持 \hologo{pdfLaTeX} 编译. + +\subsection{标准安装} + +强烈建议您使用 \cmd{tlmgr} 进行安装与升级. 在终端(Terminal)执行以下命令即可安装最新版本的 \hologo{hduthesis} 模板. + +\begin{framed} + \begin{verbatim} + sudo tlmgr install hduthesis + \end{verbatim} +\end{framed} + +Windows 系统用户无需 \verb|sudo|,请以管理员身份运行命令提示符. 有些时候,您需要手动更新 \cmd{tlmgr} + +\begin{framed} + \begin{verbatim} + sudo tlmgr update --self + \end{verbatim} +\end{framed} + +才能正常使用 \cmd{tlmgr} 命令安装宏包. +如果您的 \hologo{TeX} 发行版不支持 \cmd{tlmgr},请尽快升级您的 \hologo{TeX} 发行版. +升级该模板,在终端(Terminal)执行以下命令即可 + +\begin{framed} + \begin{verbatim} + sudo tlmgr update hduthesis + \end{verbatim} +\end{framed} + +\subsection{手动安装} + +本模板已上传至 CTAN、GitHub 和 Gitee 平台. 可以直接从三个平台下载最新版本的 \hologo{hduthesis} 模板. 下载后,将 \file{./hduthesis/tex/} 文件夹中的所有 (runtime) 文件复制到 \file{./hduthesis/example/} 目录下,即可编译 \file{./hduthesis/example/} 文件夹中的样例. + +\section{全局选项} + +\subsection{用户协议} + +使用本模板编译本科、硕士学位论文时遇到``编译受阻''报错,请认真阅读封面的用户协议. +添加选项 \cmd{agreed} 后(即\verb|\documentclass [ agreed ] { hduthesis }|),方可顺利编译,\emph{并默认您已同意用户协议}. + +使用 \hologo{hduthesis} 编译信纸和本用户手册时,无需 \cmd{agreed} 选项. + +\subsection{字体设置} + +用户可通过全局选项设置文档的数学和中文字体. 设置的方式为键值对,键 \keys{\cmdmac~math-font} 用于设置数学字体,键 \keys{\cmdmac~CJKmain-font} 用于设置中文字体,键 \keys{\cmdmac~CJKsans-font} 用于设置中文无衬线字体. 以下是设置示例. + +\begin{framed} + \begin{verbatim} + \documentclass + [ + math-font = STIX Two Math, agreed, + CJKmain-font = {{Songti SC}[AutoFakeBold = 2.5, AutoFakeSlant]}, + CJKsans-font = {{STHeiti}[AutoFakeBold = 2]} + ] {hduthesis} + \end{verbatim} +\end{framed} + +如果你使用的是 \hologo{TeX} Live 2022,设置中文字体的伪粗体和伪斜体时可能会遇到报错. +在此发行版中,最多能对两个选项中的其一赋强度值,且被赋值选项需放在未被赋值选项前. + +更加详细的字体设置请参考 \pkg{xeCJK} 宏包的文档. + +\section{文档信息设置} + +\begin{function}{\DocInfo} + \begin{syntax} + \cs{DocInfo}\marg{keyvals} + \end{syntax} + + 此命令接收键值,用于设置文档信息. 键 \keys{\cmdmac~title} 用于设置论文标题,键 \keys{\cmdmac~department} 用于设置学院,键 \keys{\cmdmac~major} 用于设置专业,键 \keys{\cmdmac~class} 用于设置班级,键 \keys{\cmdmac~stdntid} 用于设置学号,键 \keys{\cmdmac~author} 用于设置作者,键 \keys{\cmdmac~supervisor} 用于设置导师,键 \keys{\cmdmac~bibsource} 用于设置插入参考文献文件源. 命令会根据输入的学号自动判断使用者为本科生/研究生. + + 命令 \cs{DocInfo} 需在导言区中执行. 完成文档信息输入后,在 \verb|\begin{document}| 后执行命令 \cs{maketitle} 会调用所设置的键值自动生成 \emph*{论文封面} 和 \emph*{目录}. +\end{function} + +本科生输入样例如下. 需要使用键 \keys{\cmdmac~title} 设置类型为毕业设计/毕业论文,使用斜线 (/) 分隔,如 \cmd{title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文}. + +\begin{framed} + \begin{verbatim} + \DocInfo + { + title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/ + 本科毕业设计, department = 理学院, major = 物理学, + bibsource = reference, class = 英才班, stdntid = C668668E, + author = 申智能, supervisor = 教授:葉芷晴, + } + \end{verbatim} +\end{framed} + +研究生输入样例如下. 硕士学位论文扉页需同时有英文版,因此需要在键 \keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~supervisor} 中分别输入中文和英文信息,中英信息使用斜线 (\cmd/) 分隔,指导教师职称和姓名之间用半角冒号 (\cmd:) 分隔. + +\begin{framed} + \begin{verbatim} + \documentclass { hduthesis } + \DocInfo + { + title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/ + \hologo{LaTeX} Template for Thesis at + Hangzhou Dianzi University, + major = 物理学, stdntid = 216686680, + author = 申智能/SAN Chi Nan, bibsource = reference + supervisor = 教授:葉芷晴/Prof.:YIP Tsz Ching, + } + \end{verbatim} +\end{framed} + +\subsection{生成封面 \& 扉页} + +在正文区域,使用命令 \cmd{maketitle} 即可生成论文封面和扉页. 生成的封面和扉页会根据所设置的文档信息自动生成. + +\DescribeMacro{\l__hduthesis_grade_int} +封面上的论文完成日期和学生毕业年份会根据当前系统时间自动生成. +针对本科论文,如果当前月份在8月及以前,毕业年份会显示今年;如果当前月份在9月及以后,毕业年份会显示次年. 在 \cs{DocInfo} 后对整型 \cs{l__hduthesis_grade_int} 重新赋值可手动更改毕业年份. + +\begin{syntax} + \cs{ExplSyntaxOn} \cs{int_set:Nn} \cs{l__hduthesis_grade_int} \marg{Year} \cs{ExplSyntaxOff} +\end{syntax} + +\subsection{生成承诺书} + +\begin{function}{\commitment} + \begin{syntax} + \cs{commitment} \oarg{file1/yyyy-mm-dd, file2/yyyy-mm-dd, file3/yyyy-mm-dd} + \end{syntax} + + 此命令用于生成承诺书. 命令的可选参数接收数组,用于指定签名文件和输入签名的日期. 签名文件和签名的日期之间用 \cmd{/} 分隔,多组签名之间用 \cmd{,} 分隔. 签名文件接收 \file{.pdf} / \file{.png} / \file{.jpg} 等格式. 日期的输入格式为 \texttt{yyyy-mm-dd}. +\end{function} + +对于本科生,只需要签署 ``\emph*{诚信承诺}'' 一组签名;对于研生,则需要签署 ``\emph*{原创性声明}''、``\emph*{(作者同意)学位论文使用授权声明}'' 和 ``\emph*{(导师同意)学位论文使用授权声明}'' 三组签名. 使用用例如下 + +\begin{framed} + \begin{verbatim} + % 本科生使用用例 + ... \maketitle ... \commitment [ example-image-a/2024-05-31 ] ... + % 研究生使用用例 + ... \maketitle ... + \commitment + [ + example-image-a/2025-05-31, example-image-a/2025-05-31, + example-image-b/2025-06-01 + ] + \end{verbatim} +\end{framed} + +如果使用者暂未生成签名但是需要添加日期,则将签名文件留空即可,但分隔符 \cmd{/} 仍需保留. 例如 +\verb|\commitment [ /2024-05-31 ]|. 如果不需要添加日期,则直接留空即可. + +下两页分别为所生成的本科和硕士学位论文封面、扉页和承诺书缩略图. 可在终端执行 \cmd{texdoc hduthesis-bc} 和 \cmd{texdoc hduthesis-pg} 分别获取本科和硕士学位论文样例文件. + +\includepdfmerge + [ nup = 2x3, frame, linktodoc, scale = 0.96, delta = 1in .25in ] + { /Users/myhsia/Documents/GitHub/hduthesis/example/hduthesis-bc.pdf, 1-2, + /Users/myhsia/Documents/GitHub/hduthesis/example/hduthesis-pg.pdf, 1-4 } + +\section{章节设置} + +\subsection{输入中 / 英摘要} + +\DescribeEnv{abstract} +环境 \env{abstract} 用于生成摘要,其可选参数可设置语言格式. + +\DescribeMacro{\keywords} +命令 \cs{keywords} 需在 \env{abstract} 环境内执行,其会根据 \env{abstract} 环境所选择的语言,自动生成英文 / 中文格式的关键词. + +\begin{framed} + \begin{verbatim} + \begin{abstract}[en]...\keywords{keyword1, keyword2} \end{abstract} + \begin{abstract}[cn]...\keywords{关键词1, 关键词2} \end{abstract} + \end{verbatim} +\end{framed} + +通过命令 \cs{keywords} 以半角逗号 (,) 为分隔输入关键词列表,输出时会根据所处 \env{abstract} 环境选择的语言不同,自动以半 / 全角分号分隔. + +\subsection{输入目录 \& 正文} + +通过命令 \cs{tableofcontents} 可生成目录. \cs{chapter}、\cs{section}、\cs{subsection} 等章节级次均按照 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 定制. + +\subsection{参考文献 \& 附录} + +通过命令 \cs{DocInfo} 指定 \file{.bib} 文件后使用命令 \cs{printbiblography} 即可输出参考文献列表. 参考文献格式已设置为 \cmd{gb7714-2015}. 若未指定参考文献 \file{.bib} 文件,为加速编译,\pkg{gbt7714} 宏包将不会加载. + +可以直接使用带有星号的章节命令生成附录章节,如 \verb|\chapter*{附录}|. + +\clearpage + +\section{附加模块} + +\subsection{杭州电子科技大学信纸} + +加载全局选项 \pkg{stationery},并进行文档信息设置,即可生成信纸. 可用于推荐信撰写或生成笔记纸. +此模块无需 \pkg{agreed} 选项. + +\begin{framed} + \begin{verbatim} + \documentclass [ stationery ] { hduthesis } + \end{verbatim} +\end{framed} + +与学士 / 硕士学位论文文档信息设置类似,使用 \cs{DocInfo} 命令,对信件主题、发件人、邮箱、日期和水印进行设置. 此时 \cs{DocInfo} 命令接受键 +\keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~mail} +\keys{\cmdmac~date} \keys{\cmdmac~watermark}. 下页为生成信纸的样例. + +\begin{framed} + \begin{verbatim} + \DocInfo + { + title = Recommendation Letter for SAN Chi Nan, + author = YIP Tsz Ching, mail = email@server.domain, + date = {23\textsuperscript{th} December, 2024}, + watermark = true + } + \end{verbatim} +\end{framed} + +若要在信纸上添加笔记线,可使用命令 \cs{noteLine}\oarg{num},其可选参数接收笔记线的数量,默认值为20. 下两页分别为生成的信纸和笔记纸样例,可在终端执行 \cmd{texdoc hduthesis-stationery} 获取此样例文件. + +\subsection{用户手册} + +本手册为 \cls{hduthesis} 加载选项 \pkg{l3doc} 后生成,此模块无需 \pkg{agreed} 选项. + +\begin{framed} + \begin{verbatim} + \documentclass [ l3doc ] { hduthesis } + \end{verbatim} +\end{framed} + +\includepdf[pages = -, nup = 1x2, angle = -90, frame, linktodoc, scale = 0.96, delta = 0in .25in] + {/Users/myhsia/Documents/GitHub/hduthesis/example/hduthesis-stationery}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source.tex new file mode 100644 index 00000000000..c92777877f5 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source.tex @@ -0,0 +1,18 @@ +\ExplSyntaxOn +\pagecolor{black!\fpeval{100-3200/255}} +\color{black!10} \color_select:n{black!10} \appendix +\colorlet{bg}{black!\fpeval{100-2400/255}} +\hypersetup + { filecolor = DarkGreen!40, urlcolor = MidnightBlue!40, + linkcolor = FireBrick!40 } +\cfoot{\color_select:n{black!10} \thepage} +\lhead{} \rhead{} \let \headrule \relax +\pagestyle{fancy} +\ExplSyntaxOff +\section{实现细节} + +恭喜你已经阅读到了这部分!如你所见,页面已经变成了程序员视力友好颜色. 下面这些内容面向 \hologo{LaTeX} 宏包开发者或者对 \hologo{hduthesis} 开发感兴趣的用户,如果您有任何意见或建议或想法,都欢迎到 \href{https://github.com/myhsia/hduthesis/issues}{GitHub} 提交Issue. 您对模板开发或者本文档的撰写的任何贡献都会受到诚挚欢迎! + +\setlength {\parindent} {0em} + +\foreach \i in {1,...,7} { \input{cha/source/a\i.tex} }
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a1.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a1.tex new file mode 100644 index 00000000000..4bb5fd10bef --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a1.tex @@ -0,0 +1,224 @@ +\subsection{\file{hduthesis.cls} 的实现} + +文档类日期/版本号/开发者id +\begin{minted} [ linenos, bgcolor = bg, breaklines ] {tex} + \def\hduthesis@date{2024/12/23} + \def\hduthesis@version{0.5.0} + \def\hduthesis@maintainerid{myhsia} +\end{minted} + +调用 \pkg{etoolbox} 宏包用于给命令打补丁 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage{etoolbox} +\end{minted} + +提供 \cls{hduthesis} 文档类,设置文档类日期、版本号 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \ProvidesExplClass{hduthesis} {\hduthesis@date} {\hduthesis@version} + {LaTeX Class for Thesis at Hangzhou Dianzi University} +\end{minted} + +兼容 \hologo{TeX} Live 2022 及之后的版本. 当对应命令不存在时,在已有命令基础上新增变体 + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_if_exist:NF \seq_set_split:Nne + { \cs_generate_variant:Nn \seq_set_split:Nnn { Nne } } + \cs_if_exist:NF \seq_set_split:Nee + { \cs_generate_variant:Nn \seq_set_split:Nnn { Nee } } + \cs_if_exist:NF \tl_set:Ne + { \cs_generate_variant:Nn \tl_set:Nn { Ne } } + \cs_if_exist:NF \tl_gset:Ne + { \cs_generate_variant:Nn \tl_gset:Nn { Ne } } +\end{minted} + +定义新命令 \cs{hduthesis_msg_new:nn} 和 \cs{hduthesis_msg_error:nn} 用于新增错误消息和将错误消息广播到 Workspace +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected:Npn \hduthesis_msg_new:nn #1#2 + { \msg_new:nnn { hduthesis } {#1} {#2} } + \cs_new_protected:Npn \hduthesis_msg_error:nn #1#2 + { \msg_error:nnn { hduthesis } {#1} {#2} } +\end{minted} + +新增错误消息:用户协议 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \hduthesis_msg_new:nn { 用户协议 } + { \exp_not:n + { + hduThesiS~ 编译受阻.~ + 使用模板前请认真阅读模板说明文档封面上的「用户协议」~ + 模板作者不对使用本模板产生的格式审查问题负责~ + 添加选项 `agreed'[\documentclass[agreed]{hduthesis}]~ + 即可顺利编译并默认代表您已同意本协议.~ 祝君科研顺利!~ + 如遇问题,可邮件反馈至 xiamyphys@gmail.com. + } + } +\end{minted} + +对命令 \cs{hduthesis_msg_error:nn} 新增 \cmd{nx} 变体 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_generate_variant:Nn \hduthesis_msg_error:nn { nx } +\end{minted} + +新增错误消息:未找到模块 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \hduthesis_msg_new:nn { not found module } + { The~hduthesis~module~`#1'~not~found. } +\end{minted} + +定义命令 \cs{hduthesis_load_module:n} 用于加载模块,若模块不存在则输出错误消息 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected_nopar:Npn \hduthesis_load_module:n #1 + { + \file_if_exist_input:nF { hduthesis-##1-module.code.tex } + { \hduthesis_msg_error:nn { not found module } {##1} } + } +\end{minted} + +定义命令 \cs{hduthesis_provide_module:n} 用于提供模块 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected_nopar:Npn \hduthesis_provide_module:n #1 + { + \ProvidesExplFile{hduthesis-#1-module.code.tex} + {\hduthesis@date}{\hduthesis@version} + {hduThesiS~ \text_titlecase:n {#1} ~Module} + } +\end{minted} + +定义新数组 \cs{g__hdu_base_class_options_clist},用于存储文档类选项 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \clist_new:N \g__hdu_base_class_options_clist +\end{minted} + +定义文档类选项的键: +\begin{enumerate} + \item 布尔(Bool)值 \keys{\cmdmac~ agreed}:用户是否同意用户协议,初始值 \cmd{false}. 一旦输入 \cmd{agreed} 选项,则将 \cmd{agreed} 设置为 \cmd{true},即 \cmd{agreed} 等价于 \cmd{agreed = true} + \item 布尔(Bool)值 \keys{\cmdmac~ l3doc}:是否启用 \cls{l3doc} 文档类,初始值 \cmd{false}. 一旦输入 \cmd{l3doc} 选项,则将 \cmd{l3doc} 设置为 \cmd{true},即 \cmd{l3doc} 等价于 \cmd{l3doc = true} + \item 布尔(Bool)值 \keys{\cmdmac~ stationery}:是否启用 \cls{letter} 文档类,初始值 \cmd{false}. 一旦输入 \cmd{stationery} 选项,则将 \cmd{stationery} 设置为 \cmd{true},即 \cmd{stationery} 等价于 \cmd{stationery = true} + \item 令牌(token list)\keys{\cmdmac~ math-font}:数学字体 + \item 令牌(token list) \keys{\cmdmac~ CJKmain-font}:中文主字体 + \item 令牌(token list) \keys{\cmdmac~ CJKsans-font}:中文无衬线字体 + \item 令牌(token list) \keys{\cmdmac~ CJKmono-font}:中文等宽字体 + \item 未知选项 \keys{\cmdmac~ unknown}:将未知选项交给 \cs{__hduthesis_unknown_option:n} 处理 +\end{enumerate} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \keys_define:nn { hduthesis / classoption } + { + agreed .bool_set:N = \g__hduthesis_agreement_bool, + agreed .initial:n = false, + agreed .default:n = true, + l3doc .bool_set:N = \g__hduthesis_doc_bool, + l3doc .initial:n = false, + l3doc .default:n = true, + stationery .bool_set:N = \g__hduthesis_stationery_bool, + stationery .initial:n = false, + stationery .default:n = true, + math-font .tl_set:N = \g__hduthesis_math_font, + CJKmain-font .tl_set:N = \g__hduthesis_main_CJK_font, + CJKsans-font .tl_set:N = \g__hduthesis_sans_CJK_font, + CJKmono-font .tl_set:N = \g__hduthesis_mono_CJK_font, + unknown .code:n = \__hduthesis_unknown_option:n {#1}, + } +\end{minted} + +定义命令 \cs{__hduthesis_unknown_option:n} 用于处理未知选项 + +若未知选项为空,则将 \cs{l_keys_key_str} 加入 \cs{g__hdu_base_class_options_clist} 列表;否则设置 \cs{l_keys_key_str} 为未知选项,并将其加入 \cs{g__hdu_base_class_options_clist} 列表 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected_nopar:Npn \__hduthesis_unknown_option:n #1 + { + \tl_if_empty:nTF { #1 } + { + \clist_gput_right:NV \g__hdu_base_class_options_clist \l_keys_key_str + } + { + \exp_args:NNx \clist_gput_right:Nn \g__hdu_base_class_options_clist + { \l_keys_key_str = \exp_not:n {#1} } + } + } +\end{minted} + +处理文档类选项 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \ProcessKeyOptions [ hduthesis / classoption ] +\end{minted} + +若启用 \cmd{l3doc} 选项,加载 \cls{l3doc} 文档类为基底,加载 \file{hdu.l3doc} 模块并结束输入 + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \bool_if:NT \g__hduthesis_doc_bool + { + \PassOptionsToClass { 11pt, letterpaper } { l3doc } + \exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { l3doc } + \hduthesis_load_module:n { hdu.l3doc } + \endinput + } +\end{minted} + +若启用 \cmd{stationery} 选项,加载 \cls{letter} 文档类为基底,加载 \file{hdu.stationery} 模块并结束输入 + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \bool_if:NT \g__hduthesis_stationery_bool + { + \PassOptionsToClass { 12pt } { letter } + \exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { letter } + \hduthesis_load_module:n { hdu.stationery } + \endinput + } +\end{minted} + +为基本文档类 \cls{ctexrep} 添加选项 \keys{a4paper, zihao = -4},为 \pkg{xeCJK} 宏包添加选项 \keys{quiet, no-math},加载 \cls{ctexrep} 文档类为基底,并用 \cs{exp_args:NNV} 将未知选项展开加载到 \cls{ctexrep} 文档类上 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \PassOptionsToClass { a4paper, zihao = -4 } { ctexrep } + \PassOptionsToPackage { quiet, no-math } { xeCJK } + \exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { ctexrep } +\end{minted} + +如果用户未确认用户协议,输出错误消息,并不加载 \pkg{hyperref} 宏包,以免因``遇到报错而停止编译''而产生额外的 \pkg{hyperref} 警告. 否则,加载 \pkg{hyperref} 宏包,设置 \pkg{hyperref} 宏包选项 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \bool_if:NTF \g__hduthesis_agreement_bool + { + \RequirePackage{hyperref} + \pdfstringdefDisableCommands + { + \def \cite#1 {<#1>} + \def \hologoRobust#1 {<#1>} + } + \AtBeginDocument + { \hypersetup { hidelinks, pdfproducer = hduThesiS~by~Mingyu~Xia } } + } { \hduthesis_msg_error:nn { 用户协议 } { 未确认 } } +\end{minted} + +预加载部分常用包,设置 \pkg{pgfplots} 宏包版本,设置 \pkg{hologo} 宏包字体,设置 \cs{graphicx} 包的相对路径 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage { siunitx, circuitikz, pgfplots, listings, + hologo, lipsum, zhlipsum, booktabs, multicol } + \pgfplotsset { compat = newest } + \hologoFontSetup { general = \sffamily } + \graphicspath + { + {./figure/}{./figures/}{./image/}{./images/} + {./graphics/}{./graphic/}{./pictures/}{./picture/} + } +\end{minted} + +加载 \cmd{typeset} 和 \cmd{layout} 模块. +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \hduthesis_load_module:n { typeset } + \hduthesis_load_module:n { layout } +\end{minted} + +定义命令 \cs{__hduthesis_docinfo_degree_if_aux} 用于判断学号长度,若学号长度为 8,则加载 \cmd{bc.config} 模块;否则加载 \cmd{bc.config} 或 \cmd{pg.config} 模块. 此命令将用在 \file{hduthesis-docinfo-module.code} 模块中,因为学号长度的判断必须发生在设置文档信息后 + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected:Nn \__hduthesis_docinfo_degree_if_aux: + { + \int_compare:nNnTF { \tl_count:N \l__docinfo_stdntid_tl } = { 8 } + { \hduthesis_load_module:n { bc.config } } + { \hduthesis_load_module:n { pg.config } } + } +\end{minted} + +结束 \file{hduthesis.cls} 文件 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \endinput +\end{minted}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a2.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a2.tex new file mode 100644 index 00000000000..8c78b072a84 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a2.tex @@ -0,0 +1,88 @@ +\subsection{\file{hduthesis-typeset-module.code} 的实现} + +提供模块 \file{typeset} 文件 +\begin{minted} [ linenos, bgcolor = bg, breaklines ] {tex} + \hduthesis_provide_module:n {typeset} +\end{minted} + +设置行间距 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \linespread{1.39} +\end{minted} + +设置首行缩进 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \dim_set:Nn \parindent { 2\ccwd } +\end{minted} + +新定义字体大小 \cs{semilarge} 和 \cs{semiLarge} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \newcommand \semilarge { \@setfontsize \semilarge{14}{16.5} } + \newcommand \semiLarge { \@setfontsize \semiLarge{16.5}{17.5} } +\end{minted} + +设置英文字体 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage{fontspec} + \setmainfont{texgyretermes} + [ + Extension = .otf, UprightFont = *-regular, BoldFont = *-bold, + ItalicFont = *-italic, BoldItalicFont = *-bolditalic + ] + \setsansfont{texgyreheros} + [ + Extension = .otf, BoldItalicFont = *-bolditalic, + UprightFont = *-regular, BoldFont = *-bold, + ItalicFont = *-italic, Scale = .9, + ] +\end{minted} + +调用 \pkg{amssymb}, \pkg{mathtools}, \pkg{cancel}, \pkg{fixdif}, \pkg{derivative} 宏包 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage { amssymb, mathtools, cancel, fixdif, derivative } +\end{minted} + +如果存在 \pkg{physics2} 宏包,则调用并配置 \pkg{physics2} 宏包 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \file_if_exist:nTF { physics2.sty } + { + \RequirePackage{physics2} + \usephysicsmodule{ ab, braket, ab.legacy, op.legacy, bm-um.legacy } + } { \RequirePackage{bm} } +\end{minted} + +调用 \pkg{unicode-math} 宏包,并关闭警告 \texttt{mathtools-colon} 和 \texttt{mathtools-overbracket} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage + [ warnings-off = { mathtools-colon, mathtools-overbracket } ] {unicode-math} +\end{minted} + +设置数学环境的间距 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \AtBeginDocument + { + \dim_set:Nn \abovedisplayskip {3pt} + \dim_set:Nn \belowdisplayskip {3pt} + } +\end{minted} + +设置数学字体 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \tl_if_empty:NF \g__hduthesis_math_font + { \setmathfont { \g__hduthesis_math_font } } +\end{minted} + +设置中文字体,保留全局选项键值中的扩号以对应 \pkg{xeCJK} 宏包的接口. +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \tl_if_empty:NF \g__hduthesis_main_CJK_font + { \exp_last_unbraced:No \setCJKmainfont \g__hduthesis_main_CJK_font } + \tl_if_empty:NF \g__hduthesis_sans_CJK_font + { \exp_last_unbraced:No \setCJKsansfont \g__hduthesis_sans_CJK_font } + \tl_if_empty:NF \g__hduthesis_mono_CJK_font + { \exp_last_unbraced:No \setCJKmonofont \g__hduthesis_mono_CJK_font } +\end{minted} + +结束 \file{hduthesis-typeset-module.code} 文件 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \endinput +\end{minted} diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a3.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a3.tex new file mode 100644 index 00000000000..979f48225f4 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a3.tex @@ -0,0 +1,231 @@ +\subsection{\file{hduthesis-layout-module.code} 的实现} + +提供模块 \file{layout} 文件 +\begin{minted} [ linenos, bgcolor = bg, breaklines ] {tex} + \hduthesis_provide_module:n {layout} +\end{minted} + +调用 \pkg{geometry}、\pkg{array}、\pkg{setspace}、\pkg{fancyhdr}、\pkg{enumitem}、\pkg{cleveref} 宏包 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage{geometry, array, setspace, fancyhdr, enumitem, cleveref} +\end{minted} + +调用并配置 \pkg{caption} 宏包 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage[skip = 1.75ex, labelsep = quad, font = small]{caption} +\end{minted} + +清空页眉页脚,设置页面样式为 \cmd{fancy} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \fancyhf{} + \pagestyle{fancy} +\end{minted} + +设置页眉线宽为 \cmd{.8pt} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \renewcommand*\headrulewidth{.8pt} +\end{minted} + +设置图表编号格式为 \texttt{\meta{chapter}-\meta{figure/table}} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \renewcommand*\thefigure {\arabic{chapter}-\arabic{figure}} + \renewcommand*\thetable {\arabic{chapter}-\arabic{table}} +\end{minted} + +设置公式编号格式为 \texttt{\meta{chapter}-\meta{equation}} +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \renewcommand*\theequation {\arabic{chapter}-\arabic{equation}} +\end{minted} + +减小图表后方与正文的间距 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \AddToHook{env/figure/after}{\vspace*{-2.3ex}} + \AddToHook{env/table/after}{\vskip-1.9ex} +\end{minted} + +设置 \cmd{enumerate} 环境的编号格式和缩进 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \setlist[enumerate,1] + { + label = (\,\arabic*\,), itemindent = 4em, leftmargin = 0em, + labelsep = 1ex, topsep = 0pt, itemsep = 0pt, partopsep = 0pt, + parsep = 0em, listparindent = 2\ccwd + } +\end{minted} + +设置引用格式 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \crefformat{figure}{图#2#1#3} + \crefformat{table}{表#2#1#3} +\end{minted} + +定义命令 \cs{__hduthesis_cover_spread_box:nn} 和 \cs{__hduthesis_cover_center_box:nn},用于生成封面中的分散与下划线居中对齐盒子. +\footnote + { \color{black!10} + 下划线居中对齐盒子的实现参考自 \href{https://tex.stackexchange.com/users/4427/egreg}{@egreg} 在 + \href{https://tex.stackexchange.com/questions/727960/how-to-center-a-series-of-text-width-a-fixed-width-that-can-automatically-linebr}{tex.stackexchange.com} 的解答. + } + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected:Npn \__hduthesis_cover_spread_box:nn #1#2 + { + \mode_leave_vertical: + \hbox_to_wd:nn {#1} + { \exp_args:Nee \tl_map_inline:nn {#2} { ##1 \hfil } \unskip } + } + \cs_new_protected:Npn \__hduthesis_cover_center_box:nn #1#2 + { % by @egreg on tex.stackexchange.com + \mode_leave_vertical: + \dim_set:Nn \l_tmpa_dim {#1} + \global\setbox1 = \box\voidb@x + \group_begin: + \setbox0 = \vbox + { + \dim_set:Nn \hsize {#1}\relax + \dim_set:Nn \parindent {0pt} + \skip_set:Nn \leftskip {0pt plus 1fil} + \skip_set:Nn \rightskip {0pt plus -1fil} + \skip_set:Nn \parfillskip {0pt plus 2fil} + #2 \par + \loop + \setbox2 = \lastbox + \unless\ifvoid2 + \global\setbox1 = \vtop + { \hbox to\hsize{\strut\unhbox2} + \vskip-4pt \hrule height .5pt + \vskip9.6pt \unvbox1 + } + \unskip\unpenalty + \repeat + } + \group_end: + \box1 + } +\end{minted} + +定义命令 \cs{__hduthesis_process_array:NnnN},用于处理一维或二维数组. 其中一级分隔符为 \texttt{:},二级分隔符为 \texttt{/}. +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected_nopar:Npn \__hduthesis_process_array:NnnN #1#2#3#4 + { + \seq_set_split:Nee \l__hduthesis_process_array_seq { / } {#1} + \seq_set_split:Nee \l__hduthesis_process_array_row_seq { \c_colon_str } + { \seq_item:Nn \l__hduthesis_process_array_seq {#2} } + \tl_if_eq:nnTF {#3} {:} + { \tl_gset:Ne #4 { \seq_use:Nn \l__hduthesis_process_array_row_seq {} } } + { + \tl_gset:Ne #4 { \seq_item:Nn \l__hduthesis_process_array_row_seq {#3} } + } + \seq_clear:N \l__hduthesis_process_array_seq + \seq_clear:N \l__hduthesis_process_array_row_seq + } +\end{minted} + +将十二个 \meta{month} 的英文名称存入 \cs{g_system_month_clist} 中 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \clist_set:Nn \g_system_month_clist + { + January, February, March, April, May, June, July, + August, September, October, November, December + } +\end{minted} + +定义文档信息的键 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \keys_define:nn { hduthesis / docinfo } + { + title .clist_set:N = \l__docinfo_title_tl, + department .tl_set:N = \l__docinfo_department_tl, + major .tl_set:N = \l__docinfo_major_tl, + class .tl_set:N = \l__docinfo_class_tl, + stdntid .tl_set:N = \l__docinfo_stdntid_tl, + author .clist_set:N = \l__docinfo_author_tl, + supervisor .tl_set:N = \l__docinfo_supervisor_tl, + bibsource .tl_set:N = \l__docinfo_bibsource_tl, + } +\end{minted} + +定义用户端文档信息的输入命令 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \NewDocumentCommand \DocInfo { m } + { + \keys_set:nn { hduthesis / docinfo } {#1} + \__hduthesis_docinfo_process_aux: + \__hduthesis_docinfo_degree_if_aux: + } +\end{minted} + +定义处理文档信息的辅助命令. 其中论文标题与作者信息为一维数组,指导教师信息为二维数组. +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_set_protected_nopar:Nn \__hduthesis_docinfo_process_aux: + { + \__hduthesis_process_array:NnnN \l__docinfo_title_tl {1} {:} \@title + \__hduthesis_process_array:NnnN \l__docinfo_title_tl {2} {:} + \l__docinfo_entitle_tl + \__hduthesis_process_array:NnnN \l__docinfo_author_tl {1} {:} \@author + \__hduthesis_process_array:NnnN \l__docinfo_author_tl {2} {:} + \l__docinfo_enauthor_tl + \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {1} {1} + \l__docinfo_cnrole_tl + \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {1} {2} + \l__docinfo_cnsupervisor_tl + \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {2} {1} + \l__docinfo_enrole_tl + \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {2} {2} + \l__docinfo_ensupervisor_tl + \bool_if:NF \g__hduthesis_agreement_bool + { \tl_clear:N \l__docinfo_bibsource_tl } + \tl_if_empty:NTF \l__docinfo_bibsource_tl + { + \newcommand*\printbibliography{\chapter*{参考文献}} + \renewcommand*\cite[1]{\textsuperscript{[##1]}} + } + { + \RequirePackage[sort&compress]{gbt7714} + \bibliographystyle{gbt7714-numerical} + \dim_set:Nn \bibsep {.35ex} + \newcommand*\printbibliography + { + \nocite{*} \bibliography { \l__docinfo_bibsource_tl } + \addcontentsline{toc}{chapter}{参考文献} + } + } + } +\end{minted} + +定义处理承诺书签名数组的辅助命令. 其中签名文件名需要展开后存入 \cs{g__hduthesis_signature_file_tl} 中. +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \cs_new_protected_nopar:Npn \__hduthesis_signature_process_aux:nnn #1#2#3 + { + \clist_set:Nn \l__hduthesis_signature_process_clist {#1} + \seq_set_split:Nne \l__hduthesis_signature_figure_seq {/} + { \clist_item:Nn \l__hduthesis_signature_process_clist {#2} } + \int_compare:nNnTF {#3} = {0} + { + \tl_set:Ne \l__hduthesis_signature_figure_tl + { \seq_item:Nn \l__hduthesis_signature_figure_seq { #3 + 1 } } + \seq_clear:N \l__hduthesis_signature_figure_seq + } + { + \seq_set_split:Nne \l__hduthesis_signature_date_seq {-} + { \seq_item:Nn \l__hduthesis_signature_figure_seq {2} } + \seq_item:Nn \l__hduthesis_signature_date_seq {#3} + \seq_clear:N \l__hduthesis_signature_date_seq + } + \clist_clear:N \l__hduthesis_signature_process_clist + } +\end{minted} + +定义插入签名图片的命令 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \NewDocumentCommand \signature { m } + { + \leavevmode@ifvmode + \lower \dimexpr \f@size\p@ * 9/16 + \hbox { \includegraphics [ height = { \fp_eval:n {2*\f@size}\p@ } ] {#1} } + } +\end{minted} + +结束模块 \file{hduthesis-layout-module.code} 文件 +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \endinput +\end{minted} diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a4.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a4.tex new file mode 100644 index 00000000000..e6f25c28e80 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a4.tex @@ -0,0 +1,4 @@ +\subsection{\file{hduthesis-bc.config-module.code} 的实现} + +\cmd{bc.config} 模块实现的过程略,主要是对前面定义的命令进行调用,并通过 \cs{ctexset} +或对标准文档类 \cls{report} 中的命令进行重定义.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a5.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a5.tex new file mode 100644 index 00000000000..a23e8009665 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a5.tex @@ -0,0 +1,4 @@ +\subsection{\file{hduthesis-pg.config-module.code} 的实现} + +\cmd{pg.config} 模块实现的过程略,主要是对前面定义的命令进行调用,并通过 \cs{ctexset} +或对标准文档类 \cls{report} 中的命令进行重定义.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a6.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a6.tex new file mode 100644 index 00000000000..7efec03fbb5 --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a6.tex @@ -0,0 +1,28 @@ +\subsection{\file{hduthesis-hdu.l3doc-module.code} 的实现} + +模块 \file{hdu.l3doc} 的代码实现与之前类似,唯独不同的是添加了两个 \cs{hologo}: + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \def \HoLogo@hduThesiS #1 + { + \raisebox{-.5pt} + { + \HOLOGO@mbox + { + \tikz [ baseline = (hduthesis.base) ] + { + \node [ inner~sep = 0pt ] (hduthesis) + {\scshape \sffamily hduThesi\scalebox{1.2}[1.2]{S}}; + \draw let \p1 = (hduthesis.west), \p2 = (hduthesis.east) + in (\x1,\y1) (\x2,\y2) [ line~width = {.028pt * (\x2 - \x1)} ] + ([yshift = -.5ex]hduthesis.north~west) to[ bend~right = 5 ] + ([yshift = .25ex]hduthesis.north~east); + } + } + } + } + \def \HoLogo@hduthesis #1 + { \raisebox{-.5pt} { \HOLOGO@mbox { \scshape \cls{hduThesiS} } } } +\end{minted} + +前者 \hologo{hduThesiS} 使用在本用户手册封面中,将字母 \textsf{S} 放大 1.2 倍,并使用 \pkg{tikz} 绘制一条搭在字母 \textsf{T} 上的曲线. 后者 \hologo{hduthesis} 则单纯地使用无衬线且缩小的大写字体.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a7.tex b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a7.tex new file mode 100644 index 00000000000..a1d38534b2a --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/cha/source/a7.tex @@ -0,0 +1,35 @@ +\subsection{\file{hduthesis-hdu.stationery-module.code} 的实现} + +模块 \file{stationery} 的代码实现与之前类似. 不同的部分有使用钩子 \cmd{shipout} 来实现水印的添加 + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \DeclareHookRule { shipout / background } { hduthesis / stationery } + { before } { pgfrcs } + \AddToHook { shipout / background } [ hduthesis / stationery ] + { + \bool_if:NT \g__docinfo_watermark_bool + { + \tikz [ remember~picture, overlay ] + \node [ opacity = .2 ] at (current~page) + { \includegraphics [ width = .4\linewidth ] {hdulogo} }; + } + } +\end{minted} + +调用 \pkg{tikzpagenodes} 宏包用于定位版心的边缘,用循环句柄 \cs{int_step_inline:nn} 与 \cs{draw} 命令来实现横线的绘制. + +\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex} + \RequirePackage{tikzpagenodes} + \NewDocumentCommand \notelines {O{20}} + { + \tikz [ remember~picture, overlay ] + { + \int_step_inline:nn { #1 - 1 } + { + \draw [ hdu, very~thick, opacity = .6 ] + ([yshift = -##1 * (\textheight + .6in - 15.87pt ) / #1 + .3in] + current~page~text~area.north~west) --++ (\linewidth, 0); + } + } + } +\end{minted} diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/abstract.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/abstract.tex index 6b78b6d13a5..6b78b6d13a5 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/abstract.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/abstract.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha1.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha1.tex index 864fd1b3db8..864fd1b3db8 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha1.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha1.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha2.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha2.tex index d7d50c54552..d7d50c54552 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha2.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha2.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha3.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha3.tex index bfa795380f1..bfa795380f1 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha3.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha3.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha4.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha4.tex index 697b58bcc9d..68cd5a048f8 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha4.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha4.tex @@ -74,9 +74,9 @@ $R_3$和$R_7$为输入匹配电阻。 \end{equation} 因而,放大器的增益: \begin{equation} - A_{Vf}=\frac{v_o}{v_s}=\frac{R_1+R_f}{R_1}=1+\frac{R_f}{R_1} + A_{V_f}=\frac{v_o}{v_s}=\frac{R_1+R_f}{R_1}=1+\frac{R_f}{R_1} \end{equation} - $\because A_{Vf}>0$,所以$v_o$与$v_s$同相。 + $\because A_{V_f}>0$,所以$v_o$与$v_s$同相。 \begin{figure}[htbp] \centering diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha5.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha5.tex index 9d2e255e86d..9d2e255e86d 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha5.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha5.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha6.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha6.tex index 1c5c628ad6b..1c5c628ad6b 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha6.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha6.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha7.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha7.tex index 17d113c0f7a..17d113c0f7a 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha7.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/cha7.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/thanks.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/thanks.tex index 303f13d4292..303f13d4292 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/thanks.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/cha/thanks.tex diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0145.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0145.png Binary files differindex 7d390d38de9..7d390d38de9 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0145.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0145.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0162.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0162.png Binary files differindex 75ed76eafc2..75ed76eafc2 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0162.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0162.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0163.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0163.png Binary files differindex 9be35b5e638..9be35b5e638 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0163.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0163.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0236.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0236.png Binary files differindex 5bed2083f93..5bed2083f93 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0236.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0236.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0284.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0284.png Binary files differindex 59bca2a5970..59bca2a5970 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0284.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0284.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0285.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0285.png Binary files differindex c1aae567551..c1aae567551 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0285.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0285.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0289.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0289.png Binary files differindex 5860708d8fc..5860708d8fc 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0289.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0289.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0419.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0419.png Binary files differindex 2af2fefab6f..2af2fefab6f 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0419.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0419.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0439.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0439.png Binary files differindex de4cc1538b6..de4cc1538b6 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0439.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0439.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0440.png b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0440.png Binary files differindex 4ccc02ea578..4ccc02ea578 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/figures/image-0440.png +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/figures/image-0440.png diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.pdf b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-bc.pdf Binary files differindex 7a87591efaa..8d6248c1ff0 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.pdf +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-bc.pdf diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-bc.tex index 1c36b498a43..b25278428b2 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-bc.tex @@ -1,7 +1,7 @@ \documentclass [ math-font = STIX Two Math, agreed, - CJKmain-font = { {Songti SC}[AutoFakeSlant, AutoFakeBold = 2.5] }, + CJKmain-font = { {Songti SC}[AutoFakeBold = 2.5, AutoFakeSlant] }, CJKsans-font = { {STHeiti}[AutoFakeBold = 2] } ] {hduthesis} \tikzset{ > = stealth } @@ -9,7 +9,7 @@ \DocInfo { - title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/本科毕业设计~ (论文), + title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/本科毕业设计, department = 理学院, major = 物理学, class = 英才班, @@ -22,6 +22,7 @@ \begin{document} \maketitle +\commitment [ example-image-a/2024-05-31 ] \input{cha/abstract.tex} diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.pdf b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-pg.pdf Binary files differindex 9b24ba35854..fb725211b93 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.pdf +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-pg.pdf diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-pg.tex index dcf27d155a9..4fe8063e983 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-pg.tex @@ -17,12 +17,17 @@ stdntid = C668668E0, author = 申智能/SAN Chi Nan, supervisor = 教授:葉芷晴/Prof.:YIP Tsz Ching, - bibsource = reference + % bibsource = reference } \begin{document} \maketitle +\commitment + [ + example-image-a/2025-05-31, example-image-a/2025-05-31, + example-image-b/2025-06-01 + ] \begin{abstract}[cn] diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-stationery.pdf b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-stationery.pdf Binary files differnew file mode 100644 index 00000000000..b84ec14d24c --- /dev/null +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-stationery.pdf diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-stationery.tex b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-stationery.tex index 71e7bd7cd85..4bc21e0f412 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-stationery.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/hduthesis-stationery.tex @@ -6,26 +6,29 @@ \DocInfo { title = Recommendation Letter for SAN Chi Nan, - author = YIP Tsz Ching, - affliction = {Physics Department, Hangzhou Dianzi University}, - date = {25\textsuperscript{th} November, 2024}, - tel = (852) 3141-5926, - mail = xiamyphys@gmail.com + author = YIP Tsz Ching, + mail = email@server.domain, + date = {23\textsuperscript{th} December, 2024}, + watermark = true } \begin{document} \maketitle -To whom it may concern: +Dear Prof. Wong, \lipsum[1-2] \vspace{\baselineskip} \raggedleft -Sincerely yours ,\\[2ex] +Sincerely yours,\\[4ex] \includegraphics[ height = 2em ]{hdutitle}\\[2ex] Professor of Department of Physics\\ Room \meta{int}, Building \meta{int}, Hangzhou Dianzi University +\clearpage + +\notelines[25] + \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/reference.bib b/Master/texmf-dist/doc/xelatex/hduthesis/example/reference.bib index 5775cc077f7..5775cc077f7 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/reference.bib +++ b/Master/texmf-dist/doc/xelatex/hduthesis/example/reference.bib diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-stationery.pdf b/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-stationery.pdf Binary files differdeleted file mode 100644 index 18c98062cad..00000000000 --- a/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-stationery.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.pdf b/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.pdf Binary files differindex acfdd8e07cb..c60ae766c74 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.pdf +++ b/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.pdf diff --git a/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex b/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex index ee4c074375d..cc62600e43c 100644 --- a/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex +++ b/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex @@ -1,251 +1,33 @@ \documentclass[l3doc]{hduthesis} +\usepackage{minted} + \DocInfo { - title = The \hologo{hduthesis} Class\\ - \hologo{LaTeX} Thesis Template for - Hangzhou Dianzi University, - author = Mingyu Xia \mailto{xiamyphys@hdu.edu.cn} - \footnote{Physics Department, Graduate in 06/2025}, + title = \hologo{hduThesiS} 文档类\\ + 杭州电子科技大学学位论文 \hologo{LaTeX} 模板 + \footnote + { + 在 杭州电子科技大学非毕业生 / 教师 中寻找模板的继承维护者, + 要求熟悉 \pkg{expl3}. 欢迎有意愿者邮件联系作者. + }, + author = Mingyu Xia \mailto{xiamyphys@gmail.com} + \footnote{Physics Department, Graduate in 06/2025}, CJKmain-font = {[AutoFakeSlant]{Songti SC}}, CJKsans-font = {[BoldFont = Hei, AutoFakeSlant]{Heiti SC}}, - CJKmono-font = {[AutoFakeSlant]{LXGW WenKai Mono}} + CJKmono-font = {[AutoFakeSlant]{Kaiti SC}} } \begin{document} \maketitle -\begin{abstract} - \hologo{hduthesis} 是杭州电子科技大学学位论文 \hologo{LaTeX} 模板,支持学士、硕士学位论文排版. -\end{abstract} - -\begin{center} - \small\bfseries User Agreement -\end{center} -\begin{enumerate}\small - \item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件. - \item 本模板根据杭州电子科技大学教务处颁发的 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 编写而成,作者不对使用本模板产生的格式审查问题负责. \emph{如果您所在的学院因论文查重、收录等原因要求提交 \file{.docx} 格式,不接收 \file{.pdf} 论文稿件,请勿执意使用本模板,避免因格式转换带来不必要的麻烦.} 使用本模板时,请按编译错误提示操作来勾选同意用户协议. - \item 欢迎前往 GitHub 提交反馈意见,为推动学校认证与规范化 \hologo{hduthesis} 贡献力量. -\end{enumerate} -\endtitlepage -\restoregeometry - -\section{Introduction \& Loading \hologo{hduthesis}} - -本模板为杭州电子科技大学学位论文 \underline{非官方} \hologo{LaTeX} 模板, -以 \hologo{LaTeX3} 构建,支持学士和硕士学位论文排版. -加载 \hologo{hduthesis} 时遇到``编译受阻''报错,请认真阅读上页的用户协议. -键入全局选项 \cmd{agreed} 后,方可顺利进行编译,并默认您已同意用户协议. - -\begin{framed} - \begin{verbatim} - \documentclass [ agreed, ... ] { hduthesis } - \end{verbatim} -\end{framed} - -\section{Generate the Cover} - -\begin{function}{\DocInfo} - \begin{syntax} - \cs{DocInfo}\marg{keyvals} - \end{syntax} - - 此命令接收键值,用于设置文档信息. 键 \keys{\cmdmac~title} 用于设置论文标题,键 \keys{\cmdmac~department} 用于设置学院,键 \keys{\cmdmac~major} 用于设置专业,键 \keys{\cmdmac~class} 用于设置班级,键 \keys{\cmdmac~stdntid} 用于设置学号,键 \keys{\cmdmac~author} 用于设置作者,键 \keys{\cmdmac~supervisor} 用于设置导师,键 \keys{\cmdmac~bibsource} 用于设置插入参考文献文件源. 命令会根据输入的学号自动判断使用者为本科生/研究生. - - 命令 \cs{DocInfo} 需在导言区中执行. 完成文档信息输入后,在 \verb|\begin{document}| 后执行命令 \cs{maketitle} 会调用所设置的键值自动生成 \emph{论文封面} 和 \emph{诚信承诺书}. -\end{function} - -本科生输入样例如下. 需要使用键 \keys{\cmdmac~title} 设置类型为毕业设计/毕业论文,使用斜线 (/) 分隔,如 \cmd{title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文}. - -\begin{framed} - \begin{verbatim} - \DocInfo - { - title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文, - department = 理学院, major = 物理学, stdntid = 21668668, - author = 申智能, supervisor = 李智能, bibsource = reference - } - \end{verbatim} -\end{framed} - -下页的缩略图为本科毕业论文文档样例 \cmd{hduthesis-bc} 中的封面、扉页和承诺书. - -\includepdfmerge - [ angle = -90, nup = 1x2, frame, linktodoc, scale = 0.96, delta = 0 .25in ] - { /Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf, 1-2 } - -研究生输入样例如下. 硕士学位论文扉页需同时有英文版,因此需要在键 \keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~supervisor} 中分别输入中文和英文信息,中英信息使用斜线 (\cmd/) 分隔. 如作者中文姓名为 \cmd{申智能},英文姓名为 \cmd{SAN Chi Nan},则键值输入格式为 \cmd{author = 申智能/SAN Chi Nan}. 指导教师职称和姓名之间用半角冒号 (\cmd:) 分隔. - -\begin{framed} - \begin{verbatim} - \documentclass { hduthesis } - \DocInfo - { - title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/ - \hologo{LaTeX} Template for Thesis at - Hangzhou Dianzi University, - major = 物理学, stdntid = 216686680, - author = 申智能/SAN Chi Nan, bibsource = reference - supervisor = 教授:葉芷晴/Prof.:YIP Tsz Ching, - } - \begin{document} \maketitle ... \end{document} - \end{verbatim} -\end{framed} - -\DescribeMacro{\l__hduthesis_grade_int} -论文完成日期和学生毕业年份会根据当前系统时间自动生成. 如果当前月份在8月及以前,毕业年份会显示今年;如果当前月份在9月及以后,毕业年份会显示次年. 在 \cs{DocInfo} 后对整型 \cs{l__hduthesis_grade_int} 重新赋值可手动更改毕业年份. - -\begin{verbatim} - \ExplSyntaxOn \int_set:Nn \l__hduthesis_grade_int <Year> \ExplSyntaxOff -\end{verbatim} - -下页包含所生成的硕士学位论文封面、扉页和承诺书缩略图. 此文档样例可在终端执行 \cmd{texdoc hduthesis-pg} 获取. - -文档类同时提供了校徽 (\file{hdulogo.pdf})、校名 (\file{hdutitle.pdf}) 、校训 (\file{hdumotto.pdf})和校牌 (\file{hdubadge.pdf}) 的矢量素材,可直接使用. 以上文件均由 \href{https://www.hdu.edu.cn/666/list.htm}{校情纵览/校标规范} 所提供素材裁切制成,均支持在 \hologo{XeLaTeX} 和 \hologo{pdfLaTeX} 编译器下使用 \pkg{Ti\textit k\/Z} 等方式设置透明度. - -\includepdfmerge - [ nup = 2x2, frame, linktodoc, scale = 0.96, delta = .25in .25in ] - { /Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-pg.pdf, 1-8 } - -\section{Enter Abstract in EN / CN} - -\DescribeEnv{abstract} -环境 \env{abstract} 用于生成摘要,其可选参数可设置语言格式. - -\DescribeMacro{\keywords} -命令 \cs{keywords} 需在 \env{abstract} 环境内执行,其会根据 \env{abstract} 环境所选择的语言,自动生成英文 / 中文格式的关键词. - -\begin{framed} - \begin{verbatim} - \begin{abstract}[en]...\keywords{keyword1, keyword2} \end{abstract} - \begin{abstract}[cn]...\keywords{关键词1, 关键词2} \end{abstract} - \end{verbatim} -\end{framed} - -通过命令 \cs{keywords} 以半角逗号 (,) 为分隔输入关键词列表,输出时会根据所处 \env{abstract} 环境选择的语言不同,自动以半 / 全角分号分隔. 下图为生成的中/英摘要样例,可在终端执行 \cmd{texdoc hduthesis-bc} 获取此样例文件. - -\begin{figure}[htbp] - \centering - \fbox - { - \includegraphics[page = 3, width = .42\linewidth] - {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} } - \hfill - \fbox - { - \includegraphics[page = 4, width = .42\linewidth] - {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} } - \caption{样例文件 \file{hduthesis-bc.pdf}, Page 3 -- 4} -\end{figure} - -\section{Input Text} - -\hologo{hduthesis} 的 {chapter}、\cs{section}、\cs{subsection}、\cs{enumerate} 等段落级次均已按``\href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范}''定制,可直接使用. - -如需插入参考文献,通过命令 \cs{DocInfo} 指定 \file{.bib} 文件后在要插入参考文献等地方输入 \cs{printbiblography} 即可输出参考文献列表. 参考文献格式已设置为 \cmd{gb7714-2015}. 若未指定参考文献 \file{.bib} 文件,为加速编译,\pkg{gbt7714} 宏包将不会加载. 同时,模板额外预置了以下宏包 - -\begin{table}[htbp] - \centering - \begin{tabular}{*{8}{>{\small}p{.096\linewidth}}} - \toprule - \pkg{amsmath} & \pkg{amssymb} & \pkg{bm} & \pkg{booktabs} & - \pkg{cancel} & \pkg{circuitikz}& \pkg{cleveref} & \pkg{derivative} \\ - \midrule - \pkg{extarrows} & \pkg{fixdif} & \pkg{listings} & \pkg{mathtools} & \pkg{multicol} & \pkg{pgfplots} & \pkg{physics2} & \pkg{siunitx}\\ - \bottomrule - \end{tabular} -\end{table} - -\begin{figure}[htbp] - \begin{subfigure}{.32\linewidth} - \centering - \fbox - { - \includegraphics[page = 5, width = .9\linewidth] - {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} - } - \caption{Table of Contents} - \end{subfigure} - \hfill - \begin{subfigure}{.32\linewidth} - \centering - \fbox - { - \includegraphics[page = 11, width = .9\linewidth] - {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} - } - \caption{Text} - \end{subfigure} - \hfill - \begin{subfigure}{.32\linewidth} - \centering - \fbox - { - \includegraphics[page = 12, width = .9\linewidth] - {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} - } - \caption{Text with figures} - \end{subfigure} -\end{figure} - -\hrule - -\begin{center} - \fbox - { \parbox[c][1.5em]{34ex}{\centering\file{hduthesis-pg.config-module}} } - \fbox { \parbox[c][1.5em]{32ex}{\centering\file{hduthesis-typeset-module}} } - \fbox { \parbox[c][1.5em]{15ex}{\centering\file{hdulogo.pdf}} }\\[2ex] - \fbox { \parbox[c][1.5em]{33ex}{\centering\file{hduthesis-bc.config-module}} } - \qquad \fbox { \parbox[c][1.5em]{16ex}{\centering\file{hdubadge.pdf}} } \qquad - \fbox { \parbox[c][1.5em]{16ex}{\centering\file{hdumotto.pdf}} }\\[2ex] - \fbox { \parbox[c][1.5em]{30ex}{\centering\file{hduthesis-layout-module}} }~ - \fbox { \parbox[c][1.5em]{16ex}{\centering\file{hdutitle.pdf}} } - \fbox - { \parbox[c][1.5em]{34ex}{\centering\file{hduthesis-stationery-module}} }~ -\end{center} - -\hrule - -\section{杭州电子科技大学信纸} - -加载全局选项 \pkg{stationery},并进行文档信息设置,即可生成信纸. 可用于推荐信撰写. -此模块无需 \pkg{agreed} 选项. - -\begin{framed} - \begin{verbatim} - \documentclass [ stationery ] { hduthesis } - \end{verbatim} -\end{framed} - -与学士 / 硕士学位论文文档信息设置类型,使用 \cs{DocInfo} 命令,对信件标题、发件人、机构、日期、电话和邮件信息进行设置. 此时 \cs{DocInfo} 命令接受键 -\keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~affliction} -\keys{\cmdmac~date} \keys{\cmdmac~tel} \keys{\cmdmac~mail}. 下页为生成信纸的样例. - -\begin{framed} - \begin{verbatim} - \DocInfo - { - title = Recommendation Letter for SAN Chi Nan, - author = YIP Tsz Ching, - affliction = {Physics Department, Hangzhou Dianzi University}, - date = {25\textsuperscript{th} November, 2024}, - tel = (852) 3141-5926, - mail = xiamyphys@gmail.com - } - \end{verbatim} -\end{framed} - -\section{For Developers} +\input{cha/abstract.tex} -本手册为 \cls{hduthesis} 加载选项 \pkg{l3doc} 后生成,基于 \cls{l3doc} 文档类. +\setcounter{tocdepth}{2} \tableofcontents -\begin{framed} - \begin{verbatim} - \documentclass [ l3doc ] { hduthesis } - \end{verbatim} -\end{framed} +\input{cha/contents.tex} -\includepdf{/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-stationery} +\input{cha/source.tex} \end{document} |