From 3fa962623959b4028935cb5201f44840c27980e8 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 8 Dec 2022 03:02:19 +0000 Subject: CTAN sync 202212080302 --- macros/latex/contrib/dtxdescribe/README.txt | 2 +- macros/latex/contrib/dtxdescribe/dtxdescribe.dtx | 730 +++++++++++++++++++-- macros/latex/contrib/dtxdescribe/dtxdescribe.pdf | Bin 387914 -> 418847 bytes macros/latex/contrib/hfutexam/CHANGELOG.md | 3 + macros/latex/contrib/hfutexam/README.md | 2 +- macros/latex/contrib/hfutexam/hfutexam.cls | 45 +- macros/latex/contrib/hfutexam/hfutexam.pdf | Bin 200040 -> 205310 bytes macros/latex/contrib/hfutexam/hfutexam.tex | 21 +- .../latex/contrib/hfutexam/hfutexam_cankaodaan.pdf | Bin 92519 -> 92517 bytes .../latex/contrib/hfutexam/hfutexam_cankaodaan.tex | 2 +- macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf | Bin 70715 -> 70714 bytes macros/latex/contrib/hfutexam/hfutexam_datizhi.tex | 6 +- macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf | Bin 95057 -> 95064 bytes macros/latex/contrib/hfutexam/hfutexam_simple.pdf | Bin 110461 -> 110469 bytes macros/latex/contrib/jourcl/LICENSE | 427 ++++++++++++ macros/latex/contrib/jourcl/README.md | 63 ++ macros/latex/contrib/jourcl/imgs/jourcl-logo.png | Bin 0 -> 33322 bytes macros/latex/contrib/jourcl/jourcl.cls | 320 +++++++++ macros/latex/contrib/jourcl/jourcl.pdf | Bin 0 -> 102332 bytes macros/latex/contrib/jourcl/jourcl.tex | 99 +++ 20 files changed, 1625 insertions(+), 95 deletions(-) create mode 100644 macros/latex/contrib/jourcl/LICENSE create mode 100644 macros/latex/contrib/jourcl/README.md create mode 100644 macros/latex/contrib/jourcl/imgs/jourcl-logo.png create mode 100644 macros/latex/contrib/jourcl/jourcl.cls create mode 100644 macros/latex/contrib/jourcl/jourcl.pdf create mode 100644 macros/latex/contrib/jourcl/jourcl.tex (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/dtxdescribe/README.txt b/macros/latex/contrib/dtxdescribe/README.txt index af8731de74..00c1d67983 100644 --- a/macros/latex/contrib/dtxdescribe/README.txt +++ b/macros/latex/contrib/dtxdescribe/README.txt @@ -1,7 +1,7 @@ The LaTeX dtxdescribe package Describe additional object types in dtx source files. -v1.05 — 2022/09/08 +v1.06 — 2022/12/07 Copyright 2016–2022 Brian Dunn — www.BDTechConcepts.com LaTeX Project Public License, version 1.3 diff --git a/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx b/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx index a45f996734..0d3d54db2f 100644 --- a/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx +++ b/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx @@ -17,13 +17,13 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{dtxdescribe} -% [2022/09/08 v1.05 Describe additional object types in source files.] +% [2022/12/07 v1.06 Describe additional object types in source files.] % %<*driver> \documentclass{ltxdoc} \newcommand*{\mypackagename}{dtxdescribe} -\newcommand{\quicksummary}{Describe additional object types in \texttt{dtx} source files.} +\newcommand{\quicksummary}{Describe additional object types in \texttt{dtx} or \texttt{tex} source files.} \usepackage{iftex} @@ -121,22 +121,27 @@ \usepackage{\mypackagename} -\usepackage[bookmarks=true,hidelinks,% -colorlinks,linkcolor=mylinkcolor,urlcolor=myurlcolor,% -pageanchor=true,hyperindex=true, -]{hyperref} - +\AtBeginDocument{ \hypersetup{% pdfinfo={% Title={The LaTeX \mypackagename\ package},% Author={Brian Dunn},% Subject={Describe additional object types in dtx source files.]},% -Keywords={LaTeX, dtx, source, DescribeMacro}% +Keywords={LaTeX, dtx, source, DescribeMacro},% +colorlinks,% +linkcolor=mylinkcolor,% +urlcolor=myurlcolor,% +pageanchor=true, }} +} +% \crefname here is required to compile the dtxdescribe documentation +% using the doc class: +\AddToHook{begindocument/before}{% Before .aux file is loaded. \usepackage{cleveref} - +\crefname{dtxexamplefloat}{example}{examples} +} \renewenvironment{abstract} { @@ -170,7 +175,10 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% %<*package> % \fi % -% \CheckSum{1211} +% ^^A *88* remove: +% \CheckSum{1704} +% +% ^^A *88* remove: % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -197,6 +205,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \changes{v1.04}{2022/02/01}{\ 2022/02/01} % \changes{v1.04}{2022/02/01}{\ Corrected copyright date.} % \changes{v1.05}{2022/09/08}{\ 2022/09/08} +% \changes{v1.06}{2022/12/07}{\ 2022/12/07} @@ -270,10 +279,19 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % \vfill % +% \textcolor{red}{The \pkg{doc} package has changed, and +% \pkg{dtxdescribe} is not yet fully compatible. +% When \pkg{dtxdescribe} is used with \pkg{doc}, +% the optional object ``class'' is currently ignored for macros, +% and not all classes are indexed.} +% +% \textcolor{red}{Also, see change in setup of \pkg{hyperref} and \pkg{cleveref}: +% \Cref{sec:usage} on \cpageref{sec:usage}.} +% % \clearpage % % \tableofcontents -% \listofdtxdexamples +% \listofdtxexamplefloats % \listoffigures % ^^A \listoftables % @@ -318,8 +336,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \clearpage % \section{Using \pkg{dtxdescribe}} +% \label{sec:usage} -% Place |\usepackage{dtxdescribe}| in the |.dtx| file's driver section: +% To use \pkg{dtxdescribe} with the \pkg{ltxdoc} classa and \filenm{.dtx} files: % \begin{sourceverb} % %<*driver> % \documentclass{ltxdoc} @@ -330,18 +349,50 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % ... % \usepackage{packagename} % the name of your new package % ... -% \usepackage[...]{hyperref} -% \usepackage[...]{cleveref} +% +% % hyperref now automatically loaded by \pkg{ltxdoc}. +% +% \AtBeginDocument{ +% \hypersetup{...}% If needed. +% \pdfstringdefDisableCommands{ ... }% If needed. +% } +% +% \AddToHook{begindocument/before}{% Before .aux file is loaded. +% \usepackage{cleveref}% If needed. +% \crefname{somename}{name}{names}% If needed. +% } +% % ... % % % \end{sourceverb} -% Various objects inside the |dtx| file may be described with new +% To use \pkg{dtxdescribe} with the regular classes, such as \pkg{article}, +% use: +% +% \begin{sourceverb} +% \documentclass{article} +% +% \usepackage{dtxdescribe} +% +% \usepackage{hyperref}% If needed. +% \hypersetup{...}% If needed. +% \pdfstringdefDisableCommands{ ... }% If needed. +% +% \usepackage{cleveref}% If needed. +% \crefname{somename}{name}{names}% If needed. +% +% \begin{document} +% ... +% \end{document} +% \end{sourceverb} + + +% Various objects inside the |dtx| or |tex| file may be described with new % macros such as \cs{DescribeBoolean}, \cs{DescribeLength}, \cs{DescribeCounter}, % similar to the already-familiar \cs{DescribeMacro} and \cs{DescribeEnv}. -% Optional ``classes'' may be assigned to the objects being described, including the new versions -% of \cs{DescribeMacro} and \cs{DescribeEnv}. +% Optional ``classes'' may be assigned to the objects being described, +% including the new versions of \cs{DescribeMacro} and \cs{DescribeEnv}. % These classes are printed in the margin tag and index entry for each item, % and also generate additional index entries sorted by class. This is % especially useful for key/value sets, where several sets may appear in the same @@ -720,7 +771,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % code verbatim inside a frame. % A label may be included using the \optn{label} key. % Because this is a verbatim environment, it \emph{cannot} be used inside a macro. -% See \cref{ex:fsourceverb} on page \cpageref{ex:fsourceverb}. +% See \cref{ex:fsourceverb} on \cpageref{ex:fsourceverb}. % \bigskip % % \DescribeEnv{sourcedisplay} Display source code with manual formatting. @@ -969,13 +1020,13 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \DescribeMacro{\mymacro} \oarg{optional} \marg{mandatory} % A typical macro definition. % -% \DescribeMacro[photograph]{\DeclareFloatingEnvironment} -% Create a photograph float. \bigskip +% \DescribeMacro[photograph]{\DeclareFloatingPhoto} +% Create a photograph float environment. -% \DescribeMacro[photograph]{\captionsetup} +% \DescribeMacro[c=photograph]{\photocaptionsetup} % Caption settings for a photograph float. -% \DescribeMacro[photograph]{\cnameref} +% \DescribeMacro[photograph]{\cphotonameref} % \pkg{cleveref} name for the photograph float. % \end{dtxexample} % @@ -1102,7 +1153,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \DescribeArgument[figure]{[M]} % What happens when a figure is in the [M]argin. % -% \DescribeArgument[\cs{mymacro}]{bold} +% \DescribeArgument[\mymacro]{bold} % What happens when \cs{mymacro} is given the |bold| argument. % \end{dtxexample} % @@ -1110,7 +1161,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % identify their macro or environment, and group their entries % in the index. % -% Note the need to use |\cs{mymacro}| for the macro's name. +% Note you may need to use |\cs{mymacro}| for the macro's name. % \watchout[macro names] % % @@ -1133,7 +1184,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \DescribeOther{license agreement} % The following is the fictional license agreement: % -% \DescribeOther{Before \env{myenvironment}} +% \DescribeOther{Before myenvironment} % Actions to be done \cs{BeforeBeginEnvironment}. % % \DescribeOther[otherclass]{Other Item} About the other item. @@ -1213,7 +1264,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % When the example was created: % \begin{enumerate} -% \item The ``float'' of type |example| was created, +% \item The ``float'' of type |dtxexamplefloat| was created, % with the caption ``|dtxexample|'' % and the label |ex:dtxexample|, which points to \cref{ex:dtxexample}. % \item The code was displayed verbatim. @@ -1349,14 +1400,12 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% - - % \clearpage % \StopEventually{\PrintChanges\PrintIndex} - +% ^^A *source % \section{Code} @@ -1483,11 +1532,11 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \def\LOF{LOF}% \def\LOT{LOT}% } - } + }% yes hyperref % \end{macrocode} % If \pkg{hyperref} is not loaded, emulate \cs{hyperpage} here. % \begin{macrocode} - { + {% no hyperref \newcommand*{\hyperpage}[1]{#1} } } @@ -1518,7 +1567,12 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \setlength{\unitlength}{1pt} % \end{macrocode} + + +% \subsection{Warning sign} + % \begin{macro}{\warningsign} Prints an exclamation point inside a triangle. +% Displays as: \warningsign % % Creates a warning sign without relying on the presence of the fourier font. % During copy/paste, this shows up as a simple exclamation point. @@ -1535,6 +1589,77 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \end{macro} +% \subsection{Special character handling} + +% The literal backslash character: +% \begin{macrocode} +\begingroup +\catcode`\|=0 +\catcode`\\=12 +|gdef|DTXD@backslash{\} +|endgroup +% \end{macrocode} + + + +% \subsection{Patching \pkg{hypdoc}} +% +% If \pkg{hyperref} is disabled (by \pkg{lwarp}) then define the +% missing \cs{hdclindex}. +% \changes{v1.06}{2022/12/06}{Fixed for updated \pkg{doc}.} +% \begin{macrocode} +\@ifpackageloaded{doc}{ +\@ifpackageloaded{hypdoc}{ +\AddToHook{begindocument/before}[doc/hyperref]{% + \ifdoc@hyperref + \else + \def\hdclindex#1#2{% + \ifx\@nil#2\@nil\else\csname #2\expandafter\endcsname\fi% + }% + \fi +} +}{}% hypdoc loaded +}{}% doc loaded +% \end{macrocode} + +% \pkg{splitidx} is modified to add \verb+|hdpindex{}+ to work with \pkg{hypdoc}. +% \changes{v1.06}{2022/12/06}{Fixed for updated \pkg{doc}.} +% \begin{macrocode} +\AtBeginDocument{ +\@ifpackageloaded{hypdoc}{ +\@ifpackageloaded{splitidx}{ +\renewcommand*{\@wrsindex}[2][]{% + \ifx\relax#1\relax + \if@splitidx + \@wrsindex[idx]{#2}% + \else + \def\@tempa{#2}% + \if@verbindex\@onelevel@sanitize\@tempa\fi + \@wrindex{\@tempa}% + \fi + \else +% +% \def\@tempa{#2}% + \def\@tempa{#2\encapchar hdpindex{}}% dtxdescribe +% + \csname index@#1@hook\endcsname + \expandafter\ifx\csname @@wrsindex\endcsname\relax + \@@@wrsindex{#1}{{\@tempa}{\thepage}}% + \else + \def\@tempb{\@@wrsindex{#1}}% + \expandafter\@tempb\@tempa||\\% + \fi + \endgroup + \@esphack + \fi +} +}{}% splitidx loaded +}{}% hypdoc loaded +}% AtBeginDocument +% \end{macrocode} + + + % \subsection{Gobbling comment characters} % % \begin{macro}{DTXD@gobble} @@ -1636,8 +1761,8 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% }\ensuremath\rangle } \def\meta@font@select{\itshape} - } -} + }% doc loaded +}% AtBeginDocument % \end{macrocode} @@ -1653,7 +1778,6 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \end{macro} - % % \begin{macro}{\DTXD@printtype} \marg{text} % @@ -1675,8 +1799,12 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % \changes{v1.02}{2019/07/14}{Fix if not \pkg{ltxdoc} class.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{}{% not doc package + \providecommand{\usage}{} \renewcommand{\usage}[1]{\textit{\hyperpage{#1}}} + +}% not doc package % \end{macrocode} % \end{macro} @@ -1693,7 +1821,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % Creates the margin tag for the object being described. % -% The |class| is used to sub-categories keys into their key/value groups. +% The |class| is used to sub-categorize keys into their key/value groups. % % \changes{v1.01}{2019/01/20}{Put margin tag class in brackets.} % \changes{v1.03}{2022/01/08}{Reduce hbox warnings.} @@ -1753,15 +1881,17 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \begingroup% \DTXD@origwrindex{% % \end{macrocode} +% % Index by name: % % Write the name, the formatted name, the index tag, and the class: % \begin{macrocode} #2\actualchar{\protect\ttfamily#2} % name (#4)% index tag -\ifblank{#1}{}{ [#1]}% class +\ifblank{#1}{}{ [#1]}% \encapchar #5}% % \end{macrocode} +% % Index by tag and class: % % Write the tag and class as a group, under which is the name and the formatted name. @@ -1770,10 +1900,11 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \begingroup% \DTXD@origwrindex{% #4:\levelchar% index tag -\ifblank{#1}{}{[#1]:\levelchar}% class +\ifblank{#1}{}{[#1]:\levelchar}% #2\actualchar{\protect\ttfamily#2}% name \encapchar #5}% % \end{macrocode} +% % Possibly index by class and name: % \begin{macrocode} \ifblank{#1}{}{% class given @@ -1800,10 +1931,12 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \newcommand*{\DTXD@margintagindex}[5]{% % \@bsphack% % \end{macrocode} +% % The margin tag and the name: % \begin{macrocode} \DTXD@margintag{#1}{#2}{#3}% % \end{macrocode} +% % The index entries: % \begin{macrocode} \DTXD@index{#1}{#2}{#3}{#4}{#5}% @@ -1851,6 +1984,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \newcommand*{\DTXD@cmdmargintagindex}[5]{% \@bsphack% % \end{macrocode} +% % Create a margin tag with the name of the macro: % \changes{v1.03}{2022/01/08}{Reduce hbox warnings.} % \begin{macrocode} @@ -1883,6 +2017,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% (#4)% index tag \encapchar #5}% % \end{macrocode} +% % Create an index entry grouped by the tag, % then printed and sorted by the macro name with the backslash, and the tag. % @@ -1903,6 +2038,267 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % +% \subsection{Key handling for object classes} + +% If using \pkg{doc}, the optional key \Slash value argument may also +% include an object class. This is supported by assigning any unknown +% key to be the class. +% +% \changes{v1.06}{2022/12/06}{Fixed for updated \pkg{doc}.} +% \begin{macrocode} +\ExplSyntaxOn +\IfPackageLoadedTF{doc}{ + +\newcommand*{\DTXD@category}{} + +\keys_define:nn {doc} +{ + c .cs_set:Np = \DTXD@category, + unknown .code:n = {% + \renewcommand*{\DTXD@category}{\l_keys_key_str}% + }, +} + +}{}% doc loaded +\ExplSyntaxOff +% \end{macrocode} + + +% \subsection{Handling \cs{marginpar} inside a float} + +% To avoid a floats lost error, do not print margin tags if inside a float. +% \changes{v1.06}{2022/12/06}{Fixed for updated \pkg{doc}.} +% \begin{macrocode} +\def\@doc@describe#1#2{% dtxdescribe + \ifdoc@noprint\else + \@ifundefined{@captype}{% not float? dtxdescribe + \marginpar{\raggedleft + \strut + \doc@providetarget + \@nameuse{PrintDescribe#1}{#2}% + \ifdefvoid{\DTXD@category}{}{% dtxdescribe + \space{\footnotesize[\mbox{\DTXD@category}]}% + }% + } + }{}% + \fi + \ifdoc@noindex\else + \@nameuse{Special#1Index}{#2}% + \fi + \@esphack + \endgroup + \ignorespaces} +% \end{macrocode} + + + +% \subsection{Handling glossary} + +% Fix for \cs{StopEventually} in some conditions: +% \changes{v1.06}{2022/12/06}{Fixed for updated \pkg{doc}.} +% \begin{macrocode} +\AtBeginDocument{ +\def\HD@guesstoclevel#1{1} +} +% \end{macrocode} + + +% \subsection{Catcode handling to support underscores} +% +% File names and such may include underscores, so they must be neutralized +% before processing. +% +% \changes{v1.06}{2022/12/06}{Fixed for updated \pkg{doc}.} +% \begin{macrocode} +\IfPackageLoadedTF{doc}{% + +\def\@NewDocElement#1#2#3{% + \doc@macrolikefalse + \doc@topleveltrue + \def\doc@idxtype{#3}% + \def\doc@idxgroup{#3s}% + \let\doc@printtype\@empty + \csname keys_set:nn\endcsname{doc}{#1}% + \ifx\doc@printtype\@empty + \@temptokena{}% + \else + \@temptokena\expandafter{\expandafter + \textnormal\expandafter{\expandafter + \space\expandafter + (\doc@printtype)}}% + \fi + \@nameedef{Print#2Name}##1{% + {\noexpand\MacroFont + \ifdoc@macrolike + \noexpand\string##1% dtxdescribe + \else + \noexpand\detokenize\expandafter{##1}% dtxdescribe + \fi + \the\@temptokena + }}% + \expandafter\let\csname PrintDescribe#2\expandafter\endcsname + \csname Print#2Name\endcsname + \edef\doc@expr{% + \ifdoc@macrolike + \noexpand\doc@createspecialmacrolikeindexes + \else + \noexpand\doc@createspecialindexes + \fi + {#2}% + }% + \expandafter\expandafter\expandafter + \doc@expr + \expandafter\expandafter\expandafter + {\expandafter\doc@idxtype\expandafter}\expandafter + {\doc@idxgroup}% + \doc@createdescribe{#2}% + \ifdoc@macrolike + \doc@createenv{TT}{#2}{#3}% + \else + \doc@createenv{TF}{#2}{#3}% + \fi +} + +\newcommand*{\DTXD@maybecategory}{% + \ifdefvoid{\DTXD@category}% + {}% + {\space[% + \string\verb% + \verbatimchar\DTXD@category\verbatimchar% + ]}% +} + +\newcommand*{\DTXD@macrotocsname}[1]{% + \ifcat\relax\noexpand#1% + \expandafter\expandafter\expandafter\@gobble\expandafter\string + \fi + #1% +} + +\newcommand*{\DTXD@categorylevelname} + +\newcommand*{\DTXD@maybecategorylevel}[1]{% + \ifdefvoid{\DTXD@categorylevelname}% + {} + {% + \index{% + \DTXD@categorylevelname% + \noexpand\actualchar% + \string\verb*% % + \noexpand\verbatimchar + [\DTXD@category]:% + \verbatimchar% + \noexpand\levelchar% +\@gtempa\noexpand\actualchar% +\string\verb% % to fool emacs highlighting +\noexpand\quotechar% +%* +\noexpand\verbatimchar% +%\noexpand\bslash +\@gtempa\noexpand\verbatimchar% + \ifx\@nil#1\@nil\else \the\@temptokena \fi + \noexpand\doc@handleencap{usage} + }% + }% +} + + +\newcommand*{\DTXD@findcategorylevelname}{% + \edef\DTXD@categorylevelname{\DTXD@category}% + \edef\DTXD@categorylevelname{\detokenize\expandafter{\DTXD@categorylevelname}}% + \IfBeginWith{\DTXD@categorylevelname}{\DTXD@backslash} + {\StrGobbleLeft{\DTXD@categorylevelname}{1}[\DTXD@categorylevelname]} + {} +} + +\def\doc@createspecialindexes#1#2#3{% + \@temptokena{\space (#2)}% + \@temptokenb{#3:}% + \@nameedef{SpecialMain#1Index}##1{% + \noexpand\@SpecialIndexHelper@##1\noexpand\@nil% dtxdescribe + \noexpand\@bsphack + \noexpand\DTXD@findcategorylevelname% dtxdescribe + \ifdoc@toplevel +% \noexpand\special@index{##1\noexpand\actualchar +% +% + \noexpand\special@index{\noexpand\@gtempa\noexpand\actualchar% +% {\string\ttfamily\space##1}% +\string\verb% % to fool emacs highlighting% dtxdescribe +\noexpand\quotechar% +%* +\noexpand\verbatimchar% dtxdescribe +%\noexpand\bslash +\noexpand\@gtempa\noexpand\verbatimchar% dtxdescribe + \ifx\@nil#2\@nil\else \the\@temptokena \fi + \noexpand\DTXD@maybecategory% dtxdescribe + \noexpand\encapchar main}% + \noexpand\DTXD@maybecategorylevel{#2}% dtxdescribe + \fi +% +% + \ifx\@nil#3\@nil\else + \noexpand\special@index{\the\@temptokenb\noexpand\levelchar% +% ##1\noexpand\actualchar{\string\ttfamily\space##1}% +\noexpand\@gtempa\noexpand\actualchar% dtxdescribe +\string\verb% % to fool emacs highlighting% dtxdescribe +\noexpand\quotechar% +%* +\noexpand\verbatimchar% dtxdescribe +%\noexpand\bslash +\noexpand\@gtempa\noexpand\verbatimchar% dtxdescribe + \noexpand\DTXD@maybecategory% dtxdescribe + \noexpand\encapchar main}% + \noexpand\DTXD@maybecategorylevel{#2}% dtxdescribe + \fi + \noexpand\@esphack}% +% +% + \@nameedef{Special#1Index}##1{% + \noexpand\@SpecialIndexHelper@##1\noexpand\@nil% dtxdescribe + \noexpand\@bsphack + \noexpand\DTXD@findcategorylevelname% dtxdescribe +% +% + \ifdoc@toplevel + \noexpand\doc@providetarget +% \noexpand\index{##1\noexpand\actualchar{\string\ttfamily\space##1}% + \noexpand\index{\noexpand\@gtempa\noexpand\actualchar% dtxdescribe +\string\verb% % to fool emacs highlighting% dtxdescribe +\noexpand\quotechar% +%* +\noexpand\verbatimchar% dtxdescribe +%\noexpand\bslash +\noexpand\@gtempa\noexpand\verbatimchar% dtxdescribe + \ifx\@nil#2\@nil\else \the\@temptokena \fi + \noexpand\DTXD@maybecategory% dtxdescribe + \noexpand\doc@handleencap{usage}}% + \noexpand\DTXD@maybecategorylevel{#2}% dtxdescribe + \fi +% +% + \ifx\@nil#3\@nil\else + \noexpand\index{\the\@temptokenb\noexpand\levelchar% +% ##1\noexpand\actualchar{\string\ttfamily\space##1} +\noexpand\@gtempa\noexpand\actualchar% dtxdescribe +\string\verb% % to fool emacs highlighting% dtxdescribe +\noexpand\quotechar +%* +\noexpand\verbatimchar% dtxdescribe +%\noexpand\bslash +\noexpand\@gtempa\noexpand\verbatimchar% dtxdescribe + \noexpand\DTXD@maybecategory% dtxdescribe + \noexpand\doc@handleencap{usage}}% + \noexpand\DTXD@maybecategorylevel{#2}% dtxdescribe + \fi +% +% + \noexpand\@esphack}} + +}{}% doc loaded +% \end{macrocode} + + % \subsection{\cs{DescribeMacro} and \cs{DescribeEnvironment}} % \begin{macro}{\DescribeMacro} \oarg{class} \marg{\cs{name}} @@ -1914,6 +2310,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \changes{v1.02}{2019/07/14}{Fix if not \pkg{ltxdoc} class.} % \changes{v1.03}{2022/01/08}{Reduce hbox warnings.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{ +}{% not doc + \providecommand*{\DescribeMacro}{} \renewcommand*{\DescribeMacro}[2][]{% \@bsphack% @@ -1965,6 +2364,8 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \@esphack% \ignorespaces% } + +}% not doc % \end{macrocode} % \end{macro} @@ -1975,9 +2376,13 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % Redefined to allow hyperlinked index entries: % \changes{v1.02}{2019/07/14}{Fix if not \pkg{ltxdoc} class.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{}{% not doc + \providecommand*{\DescribeEnv}{} \renewcommand*{\DescribeEnv}[2][] {\DTXD@margintagindex{#1}{#2}{Env}{environment}{usage}} + +}% not doc % \end{macrocode} % \end{macro} @@ -2008,8 +2413,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \dots\ then replace any underscores with a detokenized |\_|, % which will print as an underscore when read back from the index file: % \begin{macrocode} -\StrSubstitute{\DTXD@filename}% -{\detokenize{_}}{\detokenize{\_}}[\DTXD@filename]% +\StrSubstitute{\DTXD@filename}{\detokenize{_}}{\detokenize{\_}}[\DTXD@filename]% % \end{macrocode} % The original filename is printed in the margin. % Any underscore characters have already been disabled @@ -2049,9 +2453,23 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % The underscore character is temporarily disabled, then % the name is passed directly to \cs{DTXD@DescribeFile}. % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=file, + idxgroup=Files, + printtype=\textit{file} +]{File}{file} + +}{% not doc + \newcommand*{\DescribeFile}{% -\begingroup\catcode`\_=12 \DTXD@DescribeFile% + \begingroup\catcode`\_=12 \DTXD@DescribeFile% } + +}% not doc % \end{macrocode} % \end{macro} % @@ -2072,9 +2490,23 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % The underscore character is temporarily disabled, then % the name is passed directly to \cs{DTXD@DescribeProgram}. % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=program, + idxgroup=Programs, + printtype=\textit{Prog} +]{Program}{program} + +}{% not doc + \newcommand*{\DescribeProgram}{% \begingroup\catcode`\_=12 \DTXD@DescribeProgram% } +}% not doc + % \end{macrocode} % \end{macro} @@ -2095,9 +2527,23 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % The underscore character is temporarily disabled, then % the name is passed directly to \cs{DTXD@DescribeCommand}. % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=command, + idxgroup=Commands, + printtype=\textit{Cmd} +]{Command}{command} + +}{% not doc + \newcommand*{\DescribeCommand}{% \begingroup\catcode`\_=12 \DTXD@DescribeCommand% } + +}% not doc % \end{macrocode} % \end{macro} % @@ -2120,9 +2566,24 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % \changes{v1.00}{2019/01/10}{Fix: Allow underscore.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=package, + idxgroup=Packages, + printtype=\textit{Pkg} +]{Package}{package} + +}{% not doc + \newcommand*{\DescribePackage}{% \begingroup\catcode`\_=12 \DTXD@DescribePackage% } + +}% not doc + % \end{macrocode} % \end{macro} @@ -2144,16 +2605,44 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % \changes{v1.00}{2019/01/10}{Fix: Allow underscore.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=class, + idxgroup=Classes, + printtype=\textit{Cls} +]{Class}{class} + +}{% not doc + \newcommand*{\DescribeClass}{% \begingroup\catcode`\_=12 \DTXD@DescribeClass% } + +}% not doc % \end{macrocode} % \end{macro} % \begin{macro}{\DescribeOption} \oarg{class} \marg{name} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=option, + idxgroup=Options, + printtype=\textit{Opt} +]{Option}{option} + +}{% not doc + \newcommand*{\DescribeOption}[2][] {\DTXD@margintagindex{#1}{#2}{Opt}{option}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % @@ -2161,37 +2650,107 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % The |class| may be used to categorize arguments by their macro or environment name. % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=argument, + idxgroup=Arguments, + printtype=\textit{Arg} +]{Argument}{argument} + +}{% not doc + \newcommand*{\DescribeArgument}[2][] {\DTXD@margintagindex{#1}{#2}{Arg}{argument}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % % \begin{macro}{\DescribeBoolean} \oarg{class} \marg{name} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=boolean, + idxgroup=Booleans, + printtype=\textit{bool} +]{Boolean}{boolenv} + +}{% not doc + \newcommand*{\DescribeBoolean}[2][] {\DTXD@margintagindex{#1}{#2}{Bool}{boolean}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % % \begin{macro}{\DescribeLength} \oarg{class} \marg{name} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=true, + toplevel=false, + idxtype=length, + idxgroup=Lengths, + printtype=\textit{Len} +]{Length}{length} + +}{% not doc + \newcommand*{\DescribeLength}[2][] {\DTXD@cmdmargintagindex{#1}{#2}{Len}{length}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % % \begin{macro}{\DescribeCounter} \oarg{class} \marg{name} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=counter, + idxgroup=Counters, + printtype=\textit{Ctr} +]{Counter}{counter} + +}{% not doc + \newcommand*{\DescribeCounter}[2][] {\DTXD@margintagindex{#1}{#2}{Ctr}{counter}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % % \begin{macro}{\DescribeHook} \oarg{class} \marg{name} % \changes{v1.03}{2021/12/18}{Added.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=hook, + idxgroup=Hooks, + printtype=\textit{Hook} +]{Hook}{hook} + +}{% not doc + \newcommand*{\DescribeHook}[2][] {\DTXD@margintagindex{#1}{#2}{Hook}{hook}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % @@ -2200,8 +2759,22 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % % The |class| may be used to categorize keys by their kev/value group. % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=key, + idxgroup=Keys, + printtype=\textit{Key} +]{Key}{key} + +}{% not doc + \newcommand*{\DescribeKey}[2][] {\DTXD@margintagindex{#1}{#2}{Key}{key}{usage}} + +}% not doc % \end{macrocode} % \end{macro} % @@ -2216,6 +2789,18 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \changes{v1.02}{2019/07/16}{\cs{raggedleft} margin par.} % \changes{v1.03}{2022/01/08}{Reduce hbox warnings.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=object, + idxgroup=Objects, + printtype=, +]{Object}{object} + +}{% not doc + \newcommand*{\DescribeObject}[2][]{% \@ifundefined{@captype}{% not float? \@bsphack% @@ -2251,6 +2836,8 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \@esphack% \ignorespaces% } + +}% not doc % \end{macrocode} % \end{macro} % @@ -2263,6 +2850,18 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \changes{v1.02}{2019/07/16}{\cs{raggedleft} margin par.} % \changes{v1.03}{2022/01/08}{Reduce hbox warnings.} % \begin{macrocode} +\IfPackageLoadedTF{doc}{% doc + +\NewDocElement[ + macrolike=false, + toplevel=false, + idxtype=other, + idxgroup=Other, + printtype=, +]{Other}{other} + +}{% not doc + \newcommand*{\DescribeOther}[2][]{% \@ifundefined{@captype}{% not float? \@bsphack% @@ -2289,6 +2888,8 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \@esphack% \ignorespaces% } + +}% not doc % \end{macrocode} % \end{macro} @@ -2625,9 +3226,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \subsection{The \env{dtxexample} environment} % -% Also see \cref{ex:dtxexample} on page \cpageref{ex:dtxexample}. +% Also see \cref{ex:dtxexample} on \cpageref{ex:dtxexample}. % -% \DescribeFile{dtxexample_cut.tex} Used to store then \cs{input} example code. +% \DescribeFile{dtxexample_cut.tex} Used to store the \cs{input} example code. % \changes{v1.00}{2019/01/11}{Cut file name changed to \filenm{dtxexample_cut.tex}} % % \DescribeObject[color]{DTXD@examplerulecolor} The color of the middle rule in the dtxexample. @@ -2668,31 +3269,41 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \NewDocumentEnvironment{dtxexample}{s +O{} m} {% start dtxexample % \end{macrocode} +% % Copy the environment's contents to the file |dtxexample_cut.tex|: % \begin{macrocode} \VerbatimOut[gobble=\DTXD@gobble,tabsize=4]{dtxexample_cut.tex}% }% start dtxexample % \end{macrocode} +% % When the environment closes: % \begin{macrocode} {% end dtxexample % \end{macrocode} +% % Finish the verbatim output: % \begin{macrocode} \endVerbatimOut \par \addvspace{\bigskipamount} % \end{macrocode} -% If unstarred, typeset the example in a minipage: +% +% If unstarred, typeset the example in a minipage, else use a float: % \begin{macrocode} -\IfBooleanTF{#1}{\vspace{\bigskipamount}}{\minipage{\linewidth}}% +\IfBooleanTF{#1}% + {% minipage + \minipage{\linewidth}% + \captionsetup{type=dtxexamplefloat}% + }% + {% float + \begin{dtxexamplefloat}% + }% % \end{macrocode} -% Emulated a float of type ``example'': % \begin{macrocode} -\captionsetup{type=dtxdexample}% \hrule\medskip \caption{#3} % \end{macrocode} +% % Typeset the contents as verbatim: % \begin{macrocode} \textcolor{DTXD@examplerulecolor}{\smallskip\hrule} @@ -2705,15 +3316,19 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% {\scriptsize\itshape\dtxexampleresultname} % \end{macrocode} +% % Possible add the optional cross-references or notes: % \begin{macrocode} \ifstrempty{#2} {} {{\itshape\small #2}} % \end{macrocode} -% If unstarred, close the \cs{minipage}. +% +% If unstarred, close the float or \cs{minipage}. % \begin{macrocode} -\IfBooleanTF{#1}{}{\endminipage}% +\IfBooleanTF{#1}% + {\endminipage}% + {\end{dtxexamplefloat}}% } % end dtxexample % \end{macrocode} % \end{environment} @@ -2725,10 +3340,12 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% \AfterEndEnvironment{dtxexample} {% % \end{macrocode} +% % Execute the code: % \begin{macrocode} \par\unskip\input{dtxexample_cut.tex}% % \end{macrocode} +% % Closing rule:: % \begin{macrocode} \medskip\hrule% @@ -2736,20 +3353,20 @@ Keywords={LaTeX, dtx, source, DescribeMacro}% % \end{macrocode} -% \DescribeMacro[dtxexample]{\DeclareFloatingEnvironment} A new float type for the examples. +% \DescribeMacro[dtxexamplefloat]{\DeclareFloatingEnvironment} A new float type for the examples. % \begin{macrocode} \DeclareFloatingEnvironment[ fileext=lox, listname={List of Examples}, name=Example, placement=hbp -]{dtxdexample} +]{dtxexamplefloat} % \end{macrocode} -% \DescribeMacro[dtxexample]{\captionsetup} Caption setup for the examples. +% \DescribeMacro[dtxexamplefloat]{\captionsetup} Caption setup for the examples. % \begin{macrocode} -\captionsetup*[dtxdexample]{ +\captionsetup*[dtxexamplefloat]{ format=hang, font=bf, justification=raggedright, @@ -2759,10 +3376,13 @@ position=top, } % \end{macrocode} -% \DescribeMacro[dtxexample]{\crefname} Name for \pkg{cleveref}. +% \DescribeMacro[dtxexamplefloat]{\crefname} Name for \pkg{cleveref}. +% \cs{crefname} here is required for documents not using the doc class: % \begin{macrocode} -\AtBeginDocument{ -\@ifpackageloaded{cleveref}{\crefname{dtxdexample}{example}{examples}}{} +\AddToHook{begindocument/before}{% Before .aux file is loaded. + \ifdef{\crefname}{ + \crefname{dtxexamplefloat}{example}{examples} + }{} } % \end{macrocode} diff --git a/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf b/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf index da1939ad6b..c5b4ee1fe9 100644 Binary files a/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf and b/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf differ diff --git a/macros/latex/contrib/hfutexam/CHANGELOG.md b/macros/latex/contrib/hfutexam/CHANGELOG.md index c0174e3a9e..6a7de473b7 100644 --- a/macros/latex/contrib/hfutexam/CHANGELOG.md +++ b/macros/latex/contrib/hfutexam/CHANGELOG.md @@ -1,5 +1,8 @@ # 更新日志 +## [1.6] - 2022/12/07 ++ `\fillblank`的默认高度现在均为`0.5cm`. + ## [1.5] - 2022/12/04 + 现在`\XiZhuRenQianMing`不设置或设置为空时即可不显示签名. diff --git a/macros/latex/contrib/hfutexam/README.md b/macros/latex/contrib/hfutexam/README.md index 6162cde72d..2ed1b04746 100644 --- a/macros/latex/contrib/hfutexam/README.md +++ b/macros/latex/contrib/hfutexam/README.md @@ -2,6 +2,6 @@ The package provides an exam class for Hefei University of Technology (China). -+ Package: An exam class for Jinan University ++ Package: An exam class for Hefei University of Technology + Author: Shenxing Zhang + License: The LaTeX Project Public License 1.3c diff --git a/macros/latex/contrib/hfutexam/hfutexam.cls b/macros/latex/contrib/hfutexam/hfutexam.cls index 4d560ba7b4..8131526917 100644 --- a/macros/latex/contrib/hfutexam/hfutexam.cls +++ b/macros/latex/contrib/hfutexam/hfutexam.cls @@ -7,15 +7,22 @@ % 编译模式: XeLaTeX % 你可以任意修改或再次分发该文件 \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{hfutexam}[2022/12/04 v1.5 HFUTExam document class by Zhang Shenxing] +\ProvidesClass{hfutexam}[2022/12/07 v1.6 HFUTExam document class by Zhang Shenxing] % 文档选项 shijuan, datizhi, cankaodaan, simple -\newif\ifHFUT@ShiJuan\HFUT@ShiJuantrue -\newif\ifHFUT@DaTiZhi\HFUT@DaTiZhifalse -\newif\ifHFUT@CanKaoDaAn\HFUT@CanKaoDaAnfalse -\newif\ifHFUT@Simple\HFUT@Simplefalse -\DeclareOption{datizhi}{\HFUT@ShiJuanfalse\HFUT@DaTiZhitrue} -\DeclareOption{cankaodaan}{\HFUT@ShiJuanfalse\HFUT@CanKaoDaAntrue} -\DeclareOption{simple}{\HFUT@ShiJuanfalse\HFUT@Simpletrue} +\newif\ifHFUT@ShiJuan +\newif\ifHFUT@DaTiZhi +\newif\ifHFUT@CanKaoDaAn +\newif\ifHFUT@Simple +\newcommand{\setalltypefalse}{% + \HFUT@ShiJuanfalse% + \HFUT@DaTiZhifalse% + \HFUT@CanKaoDaAnfalse% + \HFUT@Simplefalse +} +\setalltypefalse\HFUT@ShiJuantrue +\DeclareOption{datizhi}{\setalltypefalse\HFUT@DaTiZhitrue} +\DeclareOption{cankaodaan}{\setalltypefalse\HFUT@CanKaoDaAntrue} +\DeclareOption{simple}{\setalltypefalse\HFUT@Simpletrue} % 文档选项 nofangzheng \newif\ifHFUT@Fandol\HFUT@Fandoltrue \DeclareOption{nofangzheng}{\HFUT@Fandolfalse} @@ -100,19 +107,6 @@ % 分栏 \setlength\columnsep{0.8cm} % 分栏间距 \columnseprule=0.5pt % 分栏线宽度 -% 填空题 -\newlength{\ltemp} -\RequirePackage[normalem]{ulem} -\ifHFUT@ShiJuan% - \NewDocumentCommand\fillblank{O{3.5cm} O{0.5cm} m}{\uline{\makebox[#1]{\rule{0pt}{#2}#3}}}% - \else\ifHFUT@DaTiZhi% - \NewDocumentCommand\fillblank{O{3.5cm} O{1cm} m}{\uline{\makebox[#1]{\rule{0pt}{#2}#3}}}% - \else% - \NewDocumentCommand\fillblank{O{3.5cm} O{1cm} m}{% - \settodepth{\ltemp}{#3}% - \uline{\makebox[#1]{\rule{0pt}{#2}\raisebox{\ltemp}{#3}}}% - }% -\fi\fi % 页眉页脚 \RequirePackage{fancyhdr} \RequirePackage{lastpage} @@ -240,11 +234,18 @@ \indent 4. 考生务必认真填写班级、姓名、学号等信息。}\par% {\leavevmode\xleaders\hbox{\rule[4pt]{8pt}{0.5pt}\,}\hfill\null}% } -% 选择题, 根据选项内容长度自动排版 +% 填空题 +\newlength{\ltemp} \newlength{\lxxmax} \newlength{\lquar} \newlength{\lhalf} \newlength{\lfull} +\RequirePackage[normalem]{ulem} +\NewDocumentCommand\fillblank{O{3.5cm} O{0.5cm} m}{% + \settodepth{\ltemp}{#3}% + \uline{\makebox[#1]{\rule{0pt}{#2}\raisebox{\ltemp}{#3}}}% +} +% 选择题, 根据选项内容长度自动排版 \newcounter{lxxtype} \NewDocumentCommand\xx{O{0} m m m m}{% \setlength{\lfull}{\columnwidth}% diff --git a/macros/latex/contrib/hfutexam/hfutexam.pdf b/macros/latex/contrib/hfutexam/hfutexam.pdf index 47d4a72aab..a470ca1a02 100644 Binary files a/macros/latex/contrib/hfutexam/hfutexam.pdf and b/macros/latex/contrib/hfutexam/hfutexam.pdf differ diff --git a/macros/latex/contrib/hfutexam/hfutexam.tex b/macros/latex/contrib/hfutexam/hfutexam.tex index ffadfa2959..dc0f9769ab 100644 --- a/macros/latex/contrib/hfutexam/hfutexam.tex +++ b/macros/latex/contrib/hfutexam/hfutexam.tex @@ -36,6 +36,7 @@ arc=0pt, } \makeatother +\usepackage[hidelinks]{hyperref} \begin{document} \BiaoTi{合肥工业大学试卷(A)} @@ -55,7 +56,7 @@ \tigan{一、模板选项} \indent -本模板 (2022/12/04 v1.5) 旨在为将合肥工业大学试卷的 word 格式转为\LaTeX{}格式. +本模板 (2022/12/07 v1.6) 旨在为将合肥工业大学试卷的 word 格式转为\LaTeX{}格式. 使用时, 只需在文档开头写上 \begin{lstlisting} \documentclass[shijuan]{hfutexam} @@ -108,24 +109,22 @@ \tigan{填空题相关} \begin{enumerate}[resume] -\item \lstinline|\fillblank[长度][最低高度]{内容}| 用于生成填空题的空白, 内容可以为空. 其中长度默认值是~{\color{blue}{\lstinline|3.5cm|}}, 最低高度默认值是~{\color{blue}{\lstinline|1cm|}} (答题纸和参考答案)或~{\color{blue}{\lstinline|0.5cm|}} (其它). +\item \lstinline|\fillblank[长度][最低高度]{内容}| 用于生成填空题的空白, 内容可以为空. 其中长度默认值是~{\color{blue}{\lstinline|3.5cm|}}, 最低高度默认值是~{\color{blue}{\lstinline|0.5cm|}}. \end{enumerate} \textit{\color{blue}{填空题示例:}} \begin{lstlisting} -\textbf{请将你的答案对应填在横线上:} - +\textbf{请将你的答案对应填在横线上:}\\[0.5cm] \textbf{1.} \fillblank{}, \textbf{2.} \fillblank[5cm]{}, \textbf{3.} \fillblank{}. \end{lstlisting} \begin{tcolorbox} -\textbf{请将你的答案对应填在横线上:} - -\textbf{1.} \fillblank[3.5cm][1cm]{}, -\textbf{2.} \fillblank[5cm][1cm]{}, -\textbf{3.} \fillblank[3.5cm][1cm]{}. +\textbf{请将你的答案对应填在横线上:}\\[0.5cm] +\textbf{1.} \fillblank{}, +\textbf{2.} \fillblank[5cm]{}, +\textbf{3.} \fillblank{}. \end{tcolorbox} \tigan{选择题相关} @@ -200,9 +199,9 @@ \end{align*} \end{tcolorbox} -\textbf{如有疑问或建议, 欢迎联系我: {\color{red}{zhangshenxing@hfut.edu.cn}} 或 {\color{blue}{QQ362037052}}.} +\textbf{如有疑问或建议, 欢迎联系我: {\color{red}\href{mailto:zhangshenxing@hfut.edu.cn}{zhangshenxing@hfut.edu.cn}} 或 {\color{red}{QQ362037052}}.} -\textbf{CTAN: \color{blue}https://www.ctan.org/pkg/hfutexam} +\textbf{CTAN: {\color{red}\url{https://www.ctan.org/pkg/hfutexam}}} \newpage \tigan{一、填空题(每题3分,共18分)} diff --git a/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf index 3776c11ac8..330e2c8ed7 100644 Binary files a/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf and b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf differ diff --git a/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex index f9f20890d5..e9ca966fc3 100644 --- a/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex +++ b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex @@ -1,4 +1,4 @@ -\documentclass[cankaodaan]{hfutexam} +\documentclass[cankaodaan,blue]{hfutexam} \usepackage{extarrows} \newcommand{\diff}{\,\mathrm{d}} diff --git a/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf b/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf index ad9dc41ade..c1fdcc715a 100644 Binary files a/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf and b/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf differ diff --git a/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex b/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex index d5ad8907e4..c0d3d1fa84 100644 --- a/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex +++ b/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex @@ -21,12 +21,10 @@ %\scorebox 为打分框, 必须放在行首 \scorebox\tigan{一、填空题(每小题3分,共18分)} -\textbf{请将你的答案对应填在横线上:} - +\textbf{请将你的答案对应填在横线上:}\\[0.5cm] \textbf{1.} \fillblank{}, \textbf{2.} \fillblank{}, -\textbf{3.} \fillblank{}, - +\textbf{3.} \fillblank{}, \\[0.5cm] \textbf{4.} \fillblank{}, \textbf{5.} \fillblank{}, \textbf{6.} \fillblank{}. diff --git a/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf b/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf index 97f57ce402..b8e5045e71 100644 Binary files a/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf and b/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf differ diff --git a/macros/latex/contrib/hfutexam/hfutexam_simple.pdf b/macros/latex/contrib/hfutexam/hfutexam_simple.pdf index 18b857b946..b7008d98fe 100644 Binary files a/macros/latex/contrib/hfutexam/hfutexam_simple.pdf and b/macros/latex/contrib/hfutexam/hfutexam_simple.pdf differ diff --git a/macros/latex/contrib/jourcl/LICENSE b/macros/latex/contrib/jourcl/LICENSE new file mode 100644 index 0000000000..3b7b82d0da --- /dev/null +++ b/macros/latex/contrib/jourcl/LICENSE @@ -0,0 +1,427 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/macros/latex/contrib/jourcl/README.md b/macros/latex/contrib/jourcl/README.md new file mode 100644 index 0000000000..8d0ac26819 --- /dev/null +++ b/macros/latex/contrib/jourcl/README.md @@ -0,0 +1,63 @@ +# Journal Submissions Cover Letter + +[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-) + + +

+ logo +

+ +## Description +Paper submission in the journal is usually accompanied by a cover letter. The repository hosts a cover letter template for journal submissions written in Latex that is minimalistic in one way while pre-defined with several commands that drastically speed up the process of preparing a cover letter for journal submission. + +### Main Features of this template: +- Custom image +- Minimalistic design +- Pre-defined commands for journal name, author, date, etc. +- Many macros contained in this package speed up the process of preparing the necessary ingredients for the cover letter, +- Defined macros for recommending up to 3 reviewers and/or editors, +- ORCID logo and link to the submitting author's ORCID page, +- controls for adding a "Conflict of interest" statement and declaration. +- Predefined different valedictions for different types of submissions (e.g., Yours sincerely, Yours faithfully, Best regards, etc.) +- Custom greeting (e.g., "Dear Editor" for a regular submission, "Dear Editor-in-Chief" for a submission to a journal's special issue, etc.) + +## Disclaimer +This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk! + +## License +Material in this folder is licensed under a +[Creative Commons Attribution-ShareAlike 4.0 International License][cc-by-sa]. + +[![CC BY-SA 4.0][cc-by-sa-image]][cc-by-sa] + +[cc-by-sa]: http://creativecommons.org/licenses/by-sa/4.0/ +[cc-by-sa-image]: https://licensebuttons.net/l/by-sa/4.0/88x31.png +[cc-by-sa-shield]: https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg + +## Contributors + + + + + + + + + + + + + +
Tatookie
Tatookie

💻 🐛 🤔
Lucija Brezočnik
Lucija Brezočnik

💻
Iztok Fister Jr.
Iztok Fister Jr.

💻 🐛 🤔 🧑‍🏫
rhododendrom
rhododendrom

🎨
+ + + + + + + + + + + + diff --git a/macros/latex/contrib/jourcl/imgs/jourcl-logo.png b/macros/latex/contrib/jourcl/imgs/jourcl-logo.png new file mode 100644 index 0000000000..0670d134ca Binary files /dev/null and b/macros/latex/contrib/jourcl/imgs/jourcl-logo.png differ diff --git a/macros/latex/contrib/jourcl/jourcl.cls b/macros/latex/contrib/jourcl/jourcl.cls new file mode 100644 index 0000000000..5acedf9d24 --- /dev/null +++ b/macros/latex/contrib/jourcl/jourcl.cls @@ -0,0 +1,320 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{jourcl}[2022/11/14 Cover letter for journal submissions] + +% include dependencies +\RequirePackage{graphicx} +\RequirePackage{fancyhdr} +\RequirePackage{parskip} +\RequirePackage[utf8]{inputenc} +\RequirePackage[english]{babel} +\RequirePackage{framed} +\RequirePackage{lipsum} +\RequirePackage[iso,american]{isodate} +\RequirePackage{fontawesome5} + +% no indent for whole document +\setlength\parindent{0pt} + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} + +%---------------------------------------------------------------------- +% Position of reviewers +%---------------------------------------------------------------------- + +% Top position of reviewers +\DeclareOption{top}{% + \newcommand{\addreviewersPosition}{1} +} +% Top position of reviewers +\DeclareOption{afterToEditor}{% + \newcommand{\addreviewersPosition}{2} +} +% Position after introduction +\DeclareOption{afterIntroduction}{% + \newcommand{\addreviewersPosition}{3} +} +% Position after abstract +\DeclareOption{afterAbstract}{% + \newcommand{\addreviewersPosition}{4} +} +% Position bottom - After final +\DeclareOption{bottom}{% + \newcommand{\addreviewersPosition}{5} +} + +%---------------------------------------------------------------------- +% process options +\ProcessOptions\relax + +% styling of document +%---------------------------------------------------------------------- + +% load class +\LoadClass[a4paper,onecolumn]{article} + +\RequirePackage{orcidlink} + +% set margins +\addtolength{\oddsidemargin}{-.800in} +\addtolength{\evensidemargin}{-.800in} +\addtolength{\textwidth}{1.75in} +\addtolength{\topmargin}{-.800in} +\setlength{\headheight}{84.0pt} +\addtolength{\textheight}{1in} + +% set a little indendation for paragraphs +\setlength{\parindent}{0.1em} + +% space between paragraphs +\setlength{\parskip}{1em} + + +%---------------------------------------------------------------------- +% Path to logo image +\def\ImagePath#1{\def\@ImagePath{#1}} +\newcommand{\pImagePath}{\@ImagePath} + +%---------------------------------------------------------------------- +% new command for the information of author +\newcommand{\aboutme}[1]{ +%\noindent +\fancyfoot{} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +\pagestyle{fancy} + \fancyhf{} + % show logo of author's institution on the left side + \fancyhead[L]{\raisebox{\dimexpr-\height+\baselineskip}[0pt][0pt]{ + \includegraphics[width=7cm,height=4cm,keepaspectratio]{\pImagePath} + }} + % show address on the rigt side + \fancyhead[R]{\leavevmode\large + \begin{tabular}[t]{l@{}} + #1 + \end{tabular}} +} + +%---------------------------------------------------------------------- +% Function to check empty string +\def \ifempty#1{\def\temp{#1} \ifx\temp\empty } + +% Recommended persons +%---------------------------------------------------------------------- +% Custom Role of first recommended person +\def\FirstRecommended#1{\def\@FirstRecommended{#1}} +\newcommand{\pFirstRecommended}{\@FirstRecommended} +% name, surname of first recommended person +\def\FirstNameSurname#1{\def\@FirstNameSurname{#1}} +\newcommand{\pFirstNameSurname}{\@FirstNameSurname} +% institution of of first recommended person +\def\FirstInstitution#1{\def\@FirstInstitution{#1}} +\newcommand{\pFirstInstitution}{\@FirstInstitution} +% email of of first recommended person +\def\FirstEmail#1{\def\@FirstEmail{#1}} +\newcommand{\pFirstEmail}{\@FirstEmail} + +% Custom Role of second recommended person +\def\SecondRecommended#1{\def\@SecondRecommended{#1}} +\newcommand{\pSecondRecommended}{\@SecondRecommended} +% name, surname of second recommended person +\def\SecondNameSurname#1{\def\@SecondNameSurname{#1}} +\newcommand{\pSecondNameSurname}{\@SecondNameSurname} +% institution of second recommended person +\def\SecondInstitution#1{\def\@SecondInstitution{#1}} +\newcommand{\pSecondInstitution}{\@SecondInstitution} +% email of second recommended person +\def\SecondEmail#1{\def\@SecondEmail{#1}} +\newcommand{\pSecondEmail}{\@SecondEmail} + +% Custom Role of third recommended person +\def\ThirdRecommended#1{\def\@ThirdRecommended{#1}} +\newcommand{\pThirdRecommended}{\@ThirdRecommended} +% name, surname of third recommended person +\def\ThirdNameSurname#1{\def\@ThirdNameSurname{#1}} +\newcommand{\pThirdNameSurname}{\@ThirdNameSurname} +% institution of third recommended person +\def\ThirdInstitution#1{\def\@ThirdInstitution{#1}} +\newcommand{\pThirdInstitution}{\@ThirdInstitution} +% email of third recommended person +\def\ThirdEmail#1{\def\@ThirdEmail{#1}} +\newcommand{\pThirdEmail}{\@ThirdEmail} +%---------------------------------------------------------------------- +% \RecommendedPerson{Role}{Name Surname}{Institution}{Email} +%---------------------------------------------------------------------- +% command to render recommended person - check if empty, check if string is only whitespace, else table +\def \RecommendedPerson#1#2#3#4{ \ifempty{#1} % empty + \else + \sbox0{#1}% + \ifdim\wd0=0pt % + {} % + \else% + \ifdim0pt=\dimexpr\ht0+\dp0\relax + {} % + \else + { % + \begin{tabular}{p{1\linewidth}} + \centering #1 \\ + \centering #2 \\ + \centering #3 \\ + \centering #4 \\ + \end{tabular} + }% if #1 is not empty + \fi +\fi +} + +%---------------------------------------------------------------------- +% Your data +%---------------------------------------------------------------------- + +% Name and Surname of the sender +\def\NameSurname#1{\def\@NameSurname{#1}} +\newcommand{\pNameSurname}{\@NameSurname} +% Orcid ID of author +\def\AuthorOrcid#1{\def\@AuthorOrcid{#1}} +\newcommand{\pAuthorOrcid}{\@AuthorOrcid} +% name of the institution +\def\InstitutionName#1{\def\@InstitutionName{#1}} +\newcommand{\pInstitutionName}{\@InstitutionName} +% Street and House No. +\def\StreetNo#1{\def\@StreetNo{#1}} +\newcommand{\pStreetNo}{\@StreetNo} +% Postal code, City, Country +\def\CityPostal#1{\def\@CityPostal{#1}} +\newcommand{\pCityPostal}{\@CityPostal} + +% Email +\def\Email#1{\def\@Email{#1}} +\newcommand{\pEmail}{\@Email} +% Phone +\def\Phone#1{\def\@Phone{#1}} +\newcommand{\pPhone}{\@Phone} + +%---------------------------------------------------------------------- +% Submission data +%---------------------------------------------------------------------- + +% journal name +\def\JournalName#1{\def\@JournalName{#1}} +\newcommand{\pJournalName}{\@JournalName} + +% title of your paper +\def\Title#1{\def\@Title{#1}} +\newcommand{\pTitle}{\@Title} + +% name of the Editor +\def\toEditor#1{\def\@toEditor{#1}} +\newcommand{\ptoEditor}{\@toEditor} + +% name of the Editor +\def\Editor#1{\def\@Editor{#1}} +\newcommand{\pEditor}{\@Editor} + +% TODO make this optional +\def\SpecialIssue#1{\def\@SpecialIssue{#1}} +\newcommand{\pSpecialIssue}{\@SpecialIssue} + +%---------------------------------------------------------------------- +% Cover letter main part +%---------------------------------------------------------------------- + +% Command to add reviewers in cover letter +\newcommand{\addreviewers} { +% Recommended people +\begin{center} +\parbox{.32\linewidth}{ \RecommendedPerson{\pFirstRecommended}{\pFirstNameSurname}{\pFirstInstitution}{\pFirstEmail} } +\parbox{.32\linewidth}{ \RecommendedPerson{\pSecondRecommended}{\pSecondNameSurname}{\pSecondInstitution}{\pSecondEmail} } +\parbox{.32\linewidth}{ \RecommendedPerson{\pThirdRecommended}{\pThirdNameSurname}{\pThirdInstitution}{\pThirdEmail} } +\end{center} +} + +% Addressing the Person +\def\PersonAddressing#1{\def\@PersonAddressing{#1}} +\newcommand{\pPersonAddressing}{\@PersonAddressing} + +% Introduction - paragraph before abstract +\def\Introduction#1{\def\@Introduction{#1}} +\newcommand{\pIntroduction}{\@Introduction} + +% Abstract +\def\abstract#1{\def\@abstract{#1}} +\newcommand{\pabstract}{\@abstract} + +% Final - paragraph after abstract +\def\final#1{\def\@final{#1}} +\newcommand{\pfinal}{\@final} + +% Declaration of original work +\def\declaration#1{\def\@declaration{#1}} +\newcommand{\pdeclaration}{\@declaration} + +% Declare no conflict of interests +\def\conflictofinterest#1{\def\@conflictofinterest{#1}} +\newcommand{\pconflictofinterest}{\@conflictofinterest} + +% Valediction - Ending of the letter +\def\valediction#1{\def\@valediction{#1}} +\newcommand{\pvalediction}{\@valediction} + +% Different predefined valedictions +\newcommand{\yourssincerely}[1]{Yours sincerely,\\} +\newcommand{\yoursfaithfully}[1]{Yours faithfully,\\} +\newcommand{\yourstruly}[1]{Yours truly,\\} +\newcommand{\bestregards}[1]{Best regards,\\} + +% Signature +\def\signature#1{\def\@signature{#1}} +\newcommand{\psignature}{\@signature} + +\newcommand{\makecoverletter}{ +\large % Font size +\aboutme{ + \pNameSurname \orcidlink{\pAuthorOrcid}\\ + \faIcon{university} \pInstitutionName\\ + \pStreetNo\\ + \pCityPostal\\ + \faIcon{envelope} \pEmail \\ + \faIcon{phone-square-alt} \pPhone + } +%---------------------------------------------------------------------- + +\noindent\makebox[\linewidth]{\rule{0.9\paperwidth}{0.4pt}} + +% Today's date +\today + +%\if \addreviewersPosition1 \addreviewers +%\fi +\if\addreviewersPosition1\vspace{-.5cm}\addreviewers\vspace{-.75cm}\fi + +\ptoEditor + +\if\addreviewersPosition2\vspace{-.3cm}\addreviewers\vspace{-1cm}\fi + +\vspace*{1\baselineskip} +\pPersonAddressing, + +\pIntroduction + +\if\addreviewersPosition3\vspace{-.5cm}\addreviewers\vspace{-.75cm}\fi + +\begin{framed} +Abstract: \pabstract +\end{framed} + +\if\addreviewersPosition4\vspace{-.75cm}\addreviewers\vspace{-.75cm}\fi + +\pfinal\newline + +\if\addreviewersPosition5\vspace{-.75cm}\addreviewers\vspace{-.75cm}\fi + +\pdeclaration \newline + +\pconflictofinterest + +\vfill + +\pvalediction\par + +\psignature +} diff --git a/macros/latex/contrib/jourcl/jourcl.pdf b/macros/latex/contrib/jourcl/jourcl.pdf new file mode 100644 index 0000000000..5626b105b9 Binary files /dev/null and b/macros/latex/contrib/jourcl/jourcl.pdf differ diff --git a/macros/latex/contrib/jourcl/jourcl.tex b/macros/latex/contrib/jourcl/jourcl.tex new file mode 100644 index 0000000000..26cb100d9f --- /dev/null +++ b/macros/latex/contrib/jourcl/jourcl.tex @@ -0,0 +1,99 @@ +% options for the positioning of recommended Editors / Reviewers: top, afterToEditor, afterIntroduction, afterAbstract, bottom +\documentclass[afterAbstract]{jourcl} + +\ImagePath{imgs/jourcl-logo.png} + +% recommended Editors / Reviewers -- change according to your data +%---------------------------------------------------------------------- + +% If you have recommended Editors / Reviewers +% Example + +\FirstRecommended{Editor} +\FirstNameSurname{Name Surname} +\FirstInstitution{University of City, \\Faculty of Cover Letters} +\FirstEmail{name@organization.edu} +\SecondRecommended{Reviewer} +\SecondNameSurname{Name2 Surname2} +\SecondInstitution{University of City, \\Faculty of Cover Letters} +\SecondEmail{name2@organization.edu} +\ThirdRecommended{Editor} +\ThirdNameSurname{Name3 Surname3} +\ThirdInstitution{University of City, \\Faculty of Cover Letters} +\ThirdEmail{name3@organization.edu} + +% Else - leave blank +%\FirstRecommended{}\FirstNameSurname{}\FirstInstitution{}\FirstEmail{} +%\SecondRecommended{}\SecondNameSurname{}\SecondInstitution{}\SecondEmail{} +%\ThirdRecommended{}\ThirdNameSurname{}\ThirdInstitution{}\ThirdEmail{} + +%---------------------------------------------------------------------- +% Your data +%---------------------------------------------------------------------- +% change according to your data +\NameSurname{Name Surname} +% Orcid ID of author +\AuthorOrcid{0000-000=-0000-0000} +% name of the institution +\InstitutionName{University of City, \\Faculty of Cover Letters} +% address 1 - street name and house number +\StreetNo{RoadName Number 001} +% address 2 - postal code, city, country +\CityPostal{Postal City, Country} +% email of author +\Email{name.surname@organization.edu} +% phone of author +\Phone{00000000000} + +%---------------------------------------------------------------------- +% Article data +%---------------------------------------------------------------------- +% journal name +\JournalName{JournalName} +% title of your paper +\Title{A review of journal name title} +% name of the EiC +\Editor{Prof. Name Surname} +% TODO make this optional +\SpecialIssue{SI 2022} +% abstract of the submitted Article +\abstract{\lipsum[1]} + +%---------------------------------------------------------------------- +% Cover letter main part +%---------------------------------------------------------------------- +% No need to change the following part - here for customization + +% Custom "To the editor: Editor Name" +\toEditor{To the editor: \pEditor} + +% Addressing the Person +\PersonAddressing{Dear Editor} + +% introduction +\Introduction{We submit our paper titled: \pTitle, which we would like to be considered for publication in \pJournalName. Our paper belongs to the special issue \pSpecialIssue} + +% ending +\final{We believe that an interesting new perspective created by our paper would deserve the attention of a broad scientific audience. We hope that the manuscript will find your interest and that you will consider it for publication in \pJournalName.} + +% original work declaration +\declaration{This manuscript is the authors' original work and has not been published nor has it been submitted simultaneously elsewhere. All authors have checked the manuscript and have agreed to the submission.} + +% no conflicts of interest +\conflictofinterest{We have no conflicts of interest to disclose.} + +% change valediction in \valediction{ \OPTION_HERE } or \valediction{ Custom text } +% \yoursfaithfully % In case we do not know the name of the Editor +% \yourssincerely % In case we know the name of the Editor +% \yourstruly % American version of Yours faithfully +% \bestregards +\valediction{\yourssincerely} + +\signature{\pNameSurname, on behalf of all authors} + +%---------------------------------------------------------------------- +% Render document +%---------------------------------------------------------------------- +\begin{document} +\makecoverletter +\end{document} -- cgit v1.2.3