diff options
Diffstat (limited to 'macros')
20 files changed, 637 insertions, 255 deletions
diff --git a/macros/latex/contrib/bxorigcapt/README.md b/macros/latex/contrib/bxorigcapt/README.md index 577af79fa9..a17c825fad 100644 --- a/macros/latex/contrib/bxorigcapt/README.md +++ b/macros/latex/contrib/bxorigcapt/README.md @@ -12,9 +12,10 @@ Starting from version 0.3, this package also supports Polyglossia. ### System requirement * TeX format: LaTeX. - * TeX engine: Anything. + * TeX engine: Any engine with e-TeX extension. * Dependent packages: - babel or polyglossia + - etoolbox v2.1+ ### Installation @@ -24,59 +25,22 @@ Starting from version 0.3, this package also supports Polyglossia. This package is distributed under the MIT License. + The bxorigcapt Package ---------------------- -### Introduction - -Suppose you have designed a document class tailored for the Esperanto -language. The class has the following definition of caption names and you -like it: - - \newcommand\contentsname{Tabelo de Enhavo} - -If a document is written solely in Esperanto, then there is no need to -employ the Babel package. (Yes, the document class should select the -hyphenation rule for the language.) However, when you want to create -document that contains Esperanto and German, then you have to utilize -Babel, to have correct hyphenations for both languages. - - \usepackage[ngerman,esperanto]{babel} - -But unfortunately, this changes `\contentsname` from “Tabelo de Enhavo” -(what you have chosen) to “Enhavo” (what is declared in the language -definition file of Babel), which is unfavorable. - -In fact, when using a document class for a specific language, the most -suitable caption names *for that language* should be the ones provided by -the class. The bxorigcapt package realizes this natual request, that is, -it enables you to make the caption names declared in the current document -class treated as the caption names for a specific language. - -### Package Loading - - \usepackage[<option>,...]{bxorigcapt} - -Available options are: - - - a Babel language name: Specifies the target language. The default - target language is the main language of Babel. - - `warn`: Issues a warning (instead of an info) if Babel is never - loaded in the preamble. - -### Usage - -Once this package is loaded, the caption names provided by the document -class (actually the ones that are effective when this package is loaded) -will be used as the caption names for the target language (which is -specified by the package option). - -This package has no public commands. +See the manual bxorigcapt.pdf for detail. Revision History ---------------- + * Version 1.0 〈2022/04/10〉 + - Now e-TeX and etoolbox are required. + - Add option `main`. + * Version 0.4a 〈2022/04/08〉 + - Add option `nowarn`. + - Bug fix. * Version 0.4 〈2022/03/12〉 - Adjustment for new version of Babel. - Add option `warn`. diff --git a/macros/latex/contrib/bxorigcapt/bxorigcapt.pdf b/macros/latex/contrib/bxorigcapt/bxorigcapt.pdf Binary files differnew file mode 100644 index 0000000000..8206ebbd69 --- /dev/null +++ b/macros/latex/contrib/bxorigcapt/bxorigcapt.pdf diff --git a/macros/latex/contrib/bxorigcapt/bxorigcapt.sty b/macros/latex/contrib/bxorigcapt/bxorigcapt.sty index 14faeccb3a..7baf67ec5a 100644 --- a/macros/latex/contrib/bxorigcapt/bxorigcapt.sty +++ b/macros/latex/contrib/bxorigcapt/bxorigcapt.sty @@ -10,9 +10,9 @@ %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bxorigcapt}[2022/03/12 v0.4] +\ProvidesPackage{bxorigcapt}[2022/04/10 v1.0] \def\bxoc@pkgname{bxorigcapt} -\providecommand*\bxDebug[1]{} +\providecommand\bxDebug[1]{} %% code guard \edef\bxoc@restore@codes{% @@ -42,10 +42,17 @@ \let\bxoc@warn@or@info\PackageInfo %% handle options -% 'warn' +% 'warn'/'nowarn' \DeclareOption{warn}{% \let\bxoc@warn@or@info\PackageWarning } +\DeclareOption{nowarn}{% + \let\bxoc@warn@or@info\PackageInfo +} +% 'main' +\DeclareOption{main}{% + \let\bxoc@target@lang\relax +} % language options \DeclareOption*{% \edef\bxoc@target@lang{\CurrentOption}% @@ -57,45 +64,15 @@ %--------------------------------------- environment -%% switch 'bxoc@etoolbox@available' -\newif\ifbxoc@etoolbox@available -%% switch 'bxoc@polyglossia@available' -\newif\ifbxoc@polyglossia@available -\begingroup - \def\bxoc@next#1{% - \edef\bxoc@tmpa{\string#1}\edef\bxoc@tmpb{\meaning#1}% - \ifx\bxoc@tmpa\bxoc@tmpb \@tempswatrue \fi - } - %% set 'bxoc@etoolbox@available' - \@tempswafalse - \bxoc@next\eTeXversion - \if@tempswa - \IfFileExists{etoolbox.sty}{}{\@tempswafalse} - \fi - \if@tempswa - \bxDebug{etoolbox is available} - \global\bxoc@etoolbox@availabletrue - %% set 'bxoc@polyglossia@available' - \@tempswafalse - \bxoc@next\XeTeXversion - \bxoc@next\luatexversion - \if@tempswa - \IfFileExists{polyglossia.sty}{}{\@tempswafalse} - \fi - \if@tempswa - \bxDebug{Polyglossia is available} - \global\bxoc@polyglossia@availabletrue - \fi - \fi -\endgroup +%% packages +\RequirePackage{etoolbox}[2011/01/03]% v2.1 +\ifx\numdef\@undefined % etoolbox is aborted + \PackageWarningNoLine + {Package loading is aborted} +\expandafter\endinput\fi\relax %--------------------------------------- general -%% packages -\ifbxoc@etoolbox@available - \RequirePackage{etoolbox}\relax -\fi - %% \bxoc@name@list % The list of caption names. \@onlypreamble\bxoc@name@list @@ -116,7 +93,8 @@ %%<+> \bxorigcaptDeprecateCommand{<csname>,...} \@onlypreamble\bxorigcaptDeprecateCommand \newcommand*\bxorigcaptDeprecateCommand[1]{% - \edef\bxoc@deprecated@ldf@list{\bxoc@deprecated@ldf@list,#1}} + \eappto\bxoc@deprecated@ldf@list{,#1}% +} %--------------------------------------- hook @@ -133,7 +111,8 @@ {Both Babel and Polyglossia are loaded!\MessageBreak Such usage is not supported}% {All the function of \bxoc@pkgname\space - is invalidated.\MessageBreak\@ehc}% + is invalidated.\MessageBreak + \@ehc}% % annihilate \let\bxoc@babel@hook\relax \let\bxoc@check@conflict\relax @@ -157,36 +136,21 @@ \@onlypreamble\bxoc@babel@hook \let\bxoc@babel@hook\@empty \bxoc@if@babel@or@polyglossia@loaded{% - \ifbxoc@etoolbox@available - \AtEndPreamble{% + \AtEndPreamble{% + \bxoc@check@conflict + \bxoc@babel@hook + }% +}{%else + \AtEndPreamble{% + \bxoc@if@babel@or@polyglossia@loaded{% \bxoc@check@conflict \bxoc@babel@hook + }{%else + \bxoc@warn@or@info\bxoc@pkgname + {Neither Polyglossia nor Babel is\MessageBreak + loaded, reported}% }% - \else - \AtEndOfPackage{\bxoc@babel@hook}% - \fi -}{%else - \ifbxoc@etoolbox@available - \AtEndPreamble{% - \bxoc@if@babel@or@polyglossia@loaded{% - \bxoc@check@conflict - \bxoc@babel@hook - }{%else - \bxoc@warn@or@info\bxoc@pkgname - {Neither Polyglossia nor Babel is\MessageBreak - loaded, reported}% - }% - }% - \else - \AtBeginDocument{% - \@ifpackageloaded{babel}{% - \bxoc@babel@hook - }{%else - \bxoc@warn@or@info\bxoc@pkgname - {Babel is not loaded,\MessageBreak reported}% - }% - }% - \fi + }% } %--------------------------------------- deprecated ldf stuffs @@ -196,11 +160,11 @@ \def\bxoc@clear@deprecated@ldf{% \begingroup \@for\bxoc@tmpa:=\bxoc@deprecated@ldf@list\do{% - \ifx\@bxoc@tmpa\@empty\else - \expandafter\ifx\csname \bxoc@tmpa\endcsname\relax\else + \ifx\bxoc@tmpa\@empty\else + \ifcsdef{\bxoc@tmpa}{% \bxDebug{Smashed \@backslashchar\bxoc@tmpa}% - \global\expandafter\let\csname\bxoc@tmpa\endcsname\@empty - \fi + \global\cslet{\bxoc@tmpa}\@empty + }{}% \fi }% \endgroup @@ -209,7 +173,7 @@ \@onlypreamble\bxoc@clear@deprecated@ldf@a \def\bxoc@clear@deprecated@ldf@a{% \global\let\bxoc@clear@deprecated@ldf@a\relax - \gdef\bxorigcaptDeprecateCommand##1{% + \gdef\bxorigcaptDeprecateCommand##1{% modified \edef\bxoc@deprecated@ldf@list{##1}% \bxoc@clear@deprecated@ldf}} \g@addto@macro\bxoc@babel@hook{\bxoc@clear@deprecated@ldf} @@ -229,13 +193,13 @@ \@for\bxoc@tmpa:=\bxoc@name@list\do{% \edef\bxoc@next{% \noexpand\g@addto@macro\noexpand\bxoc@save@captions{% - \let\expandafter\noexpand\csname bxoc@@\bxoc@tmpa name\endcsname - \expandafter\noexpand\csname\bxoc@tmpa name\endcsname}% + \let\expandonce{\csname bxoc@@\bxoc@tmpa name\endcsname}% + \expandonce{\csname\bxoc@tmpa name\endcsname}}% }\bxoc@next \edef\bxoc@next{% \noexpand\g@addto@macro\noexpand\bxoc@restore@captions{% - \let\expandafter\noexpand\csname \bxoc@tmpa name\endcsname - \expandafter\noexpand\csname bxoc@@\bxoc@tmpa name\endcsname}% + \let\expandonce{\csname\bxoc@tmpa name\endcsname}% + \expandonce{\csname bxoc@@\bxoc@tmpa name\endcsname}}% }\bxoc@next } \endgroup @@ -258,31 +222,27 @@ \PackageError\bxoc@pkgname {The main language is not set}% {\@ehc}% - \def\bxoc@target@lang{?bxoc} - \@namedef{date\bxoc@target@lang}{}% + \def\bxoc@target@lang{?bxoc}% + \cslet{date\bxoc@target@lang}\@empty \fi \fi \bxDebug{target language = \bxoc@target@lang}% - \expandafter\ifx\csname date\bxoc@target@lang\endcsname\relax + \ifcsundef{date\bxoc@target@lang}{% \PackageError\bxoc@pkgname {Language '\bxoc@target@lang' not defined}% - \@ehc - \@namedef{date\bxoc@target@lang}{}% - \fi - \expandafter\ifx\csname captions\bxoc@target@lang\endcsname\relax - \@namedef{captions\bxoc@target@lang}{}% - \fi - \expandafter\g@addto@macro\csname date\bxoc@target@lang\endcsname{% - \bxoc@restore@date}% - \expandafter\g@addto@macro\csname captions\bxoc@target@lang\endcsname{% - \bxoc@restore@captions}% - \ifbxoc@etoolbox@available - % do not do 'ensure'! - \ifcsundef{bbl@e@\bxoc@target@lang}{}{%else - \bxDebug{ensure for \bxoc@target@lang\space invalidated}% - \csundef{bbl@e@\bxoc@target@lang}% - }% - \fi + {\@ehc}% + \cslet{date\bxoc@target@lang}\@empty + }{}% + \ifcsundef{captions\bxoc@target@lang}{% + \cslet{captions\bxoc@target@lang}\@empty + }{}% + \csappto{date\bxoc@target@lang}{\bxoc@restore@date}% + \csappto{captions\bxoc@target@lang}{\bxoc@restore@captions}% + % do not do 'ensure'! + \ifcsundef{bbl@e@\bxoc@target@lang}{}{%else + \bxDebug{ensure for \bxoc@target@lang\space invalidated}% + \csundef{bbl@e@\bxoc@target@lang}% + }% } %% Saves the current captions diff --git a/macros/latex/contrib/bxorigcapt/bxorigcapt.tex b/macros/latex/contrib/bxorigcapt/bxorigcapt.tex new file mode 100644 index 0000000000..83dffe4c8a --- /dev/null +++ b/macros/latex/contrib/bxorigcapt/bxorigcapt.tex @@ -0,0 +1,112 @@ +\documentclass[a4paper]{article} +\usepackage[scale=0.75]{geometry} +\usepackage[T1]{fontenc} +\usepackage{lmodern,textcomp} +\usepackage{color} +\definecolor{myblue}{rgb}{0,0,0.75} +\definecolor{mygreen}{rgb}{0,0.45,0} +\usepackage[colorlinks]{hyperref} +\hypersetup{linkcolor=myblue,urlcolor=mygreen, + pdftitle={The bxorigcapt package}, + pdfauthor={Takayuki YATO}} +\usepackage{bxtexlogo} +\bxtexlogoimport{*} +\usepackage{shortvrb} +\MakeShortVerb{\|} +\newcommand{\PkgVersion}{1.0} +\newcommand{\PkgDate}{2022/04/10} +\newcommand{\Pkg}[1]{\textsf{#1}} +\newcommand{\Meta}[1]{$\langle$#1$\rangle$} +\newcommand{\Note}{\par\noindent\emph{Note.}} +\newcommand{\Means}{:\quad} +%----------------------------------------------------------- +\begin{document} +\title{The \Pkg{bxorigcapt} package} +\author{Takayuki YATO\quad (aka.~``ZR'')} +\date{v\PkgVersion\quad[\PkgDate]} +\maketitle +%\tableofcontents +\begin{abstract} +This package forces the caption names (|\chaptername|, |\today|, etc.)\ % +declared by the document class in use to be used as the caption names +for a specific language introduced by the Babel package. + +Starting from version 0.3, this package also supports Polyglossia. +\end{abstract} + +%=========================================================== +\section{Introduction} +\label{sec:Introduction} + +Suppose you have designed a document class +tailored for the Esperanto language. +The class has the following definition of caption names +and you like it: +\begin{quote} +|\newcommand\contentsname{Tabelo de Enhavo}| +\end{quote} + +If a document is written solely in Esperanto, +then there is no need to employ the Babel package. +(Yes, the document class should select the hyphenation rule +for the language.) +However, when you want to create document +that contains Esperanto and German, +then you have to utilize Babel, +to have correct hyphenations for both languages. +\begin{quote} +|\usepackage[ngerman,esperanto]{babel}| +\end{quote} + +But unfortunately, this changes |\contentsname| +from ``Tabelo de Enhavo'' (what you have chosen) +to ``Enhavo'' +(what is declared in the language definition file of Babel), +which is unfavorable. + +In fact, when using a document class for a specific language, +the most suitable caption names \emph{for that language} +should be the ones provided by the class. +The \Pkg{bxorigcapt} package realizes this natural request, +that is, it enables you +to make the caption names declared in the current document class +treated as the caption names for a specific language. + + +%=========================================================== +\section{Package Loading} +\label{sec:Package-Loading} + +\begin{quote} +|\usepackage[|\Meta{option}|,...]{bxorigcapt}| +\end{quote} + +Available options are: +\begin{itemize} +\item |main| (default)\Means + Sets the main language of Babel to the default target language. +\item \emph{a Babel language name}\Means + Specifies the target language. +\item |warn|\Means + Issues a warning (instead of an info) + if Babel is never loaded in the preamble. +\item |nowarn| (default)\Means + Negation of |warn|. +\end{itemize} + + +%=========================================================== +\section{Usage} +\label{sec:Usage} + +Once this package is loaded, +the caption names provided by the document class +(actually the ones that are effective when this package is loaded) +will be used as the caption names for the target language +(which is specified by the package option). + +This package has no public commands. + + +%=========================================================== +\end{document} diff --git a/macros/latex/contrib/jacow/JACoW_LaTeX_A4.pdf b/macros/latex/contrib/jacow/JACoW_LaTeX_A4.pdf Binary files differindex daf5300703..51141f37b9 100644 --- a/macros/latex/contrib/jacow/JACoW_LaTeX_A4.pdf +++ b/macros/latex/contrib/jacow/JACoW_LaTeX_A4.pdf diff --git a/macros/latex/contrib/jacow/JACoW_LaTeX_A4.tex b/macros/latex/contrib/jacow/JACoW_LaTeX_A4.tex index 4dee33ef9d..a0b3fcce0d 100644 --- a/macros/latex/contrib/jacow/JACoW_LaTeX_A4.tex +++ b/macros/latex/contrib/jacow/JACoW_LaTeX_A4.tex @@ -1,20 +1,38 @@ -% !TeX spellcheck = en_GB +% +%%%% !BIB TS-program = biber +%%%% !BIB program = biber +% !BIB TS-program = bibtex +% !BIB program = bibtex +% !TeX spellcheck = en_US % !TeX program = lualatex % -% v 2.3 Feb 2019 Volker RW Schaa -% # changes in the collaboration therefore updated file "jacow-collaboration.tex" -% # all References with DOIs have their period/full stop before the DOI (after pp. or year) -% # in the author/affiliation block all ZIP codes in square brackets removed as it was not % understood as optional parameter and ZIP codes had bin put in brackets -% # References to the current IPAC are changed to "IPAC'19, Melbourne, Australia" -% # font for ‘url’ style changed to ‘newtxtt’ as it is easier to distinguish "O" and "0" +% v 2.7 Feb 2022 Volker RW Schaa +% +% maintenance release to fix problems with changes in required package +% - Option "keeplastbox" deprecated in "flushend" +% - Option "binary-units" removed from "siunitx" +% - Option "detect-mode" deprecated in "siunitx" release: v3.0.32 +% Use "mode=match" as a replacement. +% - Option "detect-weight" deprecated in "siunitx" release: v3.0.32 +% Use "reset-text-series=false, text-series-to-math=true" as a replacement. +% - "fixltx2e" is not required with releases after 2015 +% - "ifluatex" and "ifxetex" dropped for "iftex" +% - some biblatex macros addded to achieve better JACoW reference formatting +% +% no changes in +% # "jacow-collaboration.tex" +% # "annexes-Letter.tex" +% # "annexes-A4.tex" +% +% to generate the "JACoW_LaTeX_Letter.pdf" or "JACoW_LaTeX_A4.pdf" uncomment +% all line with "%===" (3 in total) % \documentclass[a4paper, %boxit, % check whether paper is inside correct margins %titlepage, % separate title page %refpage % separate references %biblatex, % biblatex is used - keeplastbox, % flushend option: not to un-indent last line in References - %nospread, % flushend option: do not fill with whitespace to balance columns + nospread, % flushend option: do not fill with whitespace to balance columns %hyphens, % allow \url to hyphenate at "-" (hyphens) %xetex, % use XeLaTeX to process the file %luatex, % use LuaLaTeX to process the file @@ -22,7 +40,7 @@ % % ONLY FOR \footnote in table/tabular % -\usepackage{pdfpages,multirow,ragged2e} % +%===\usepackage{pdfpages,multirow,ragged2e} % % % CHANGE SEQUENCE OF GRAPHICS EXTENSION TO BE EMBEDDED % ---------------------------------------------------- @@ -67,7 +85,7 @@ \begin{document} -\title{preparation OF papers for \NoCaseChange{JACoW} conferences\thanks{Work supported by ...}} +\title{preparation OF papers\\ for \NoCaseChange{JACoW} conferences\thanks{Work supported by ...}} \author{A. N. Author\thanks{email address}, H. Coauthor, Name of Institute or Affiliation, City, Country \\ P. Contributor\textsuperscript{1}, Name of Institute or Affiliation, City, Country \\ @@ -75,7 +93,6 @@ \maketitle -% \begin{abstract} Many conference series have adopted the same standards for electronic publication and have joined the Joint @@ -118,7 +135,7 @@ requirements. Manuscripts should have: \item Single-spaced text in two columns of \SI{82.5}{mm} (\SI{3.25}{in}) with \SI{5.3}{mm} (\SI{0.2}{in}) separation. More recent versions of Microsoft Word have a default spacing of 1.5 lines; authors must change this to 1 line. - \item The text located within the margins specified in Table~\ref{l2ea4-t1}. + \item The text located within the margins specified in Table~\ref{tab:margins}. \end{Itemize} \begin{table}[!hbt] \centering @@ -163,11 +180,11 @@ text (which should flow from top to bottom in each column). \begin{figure*}[!tbh] \centering - \includegraphics*[width=\textwidth]{JACpic2} + \includegraphics*[width=\textwidth]{TeamMeeting2019} \caption{Example of a full-width figure showing the JACoW Team at their annual - meeting in December 2018. This figure has a multi-line caption that has to be - justified rather than centred.} + meeting in December 2019 in Santos, Brazil. This figure has a multi-line + caption that has to be justified rather than centred.} \label{fig:jacow_team} \end{figure*} @@ -433,6 +450,7 @@ Authors are requested to go over the following checklist for electronic publicat Please also check the list of common oversights which can be found in \textbf{ANNEX C}. +\flushcolsend \section{CONCLUSION} Any conclusions should be in a separate section directly preceding @@ -478,8 +496,8 @@ this should be the last section of the paper. % for use as JACoW template the inclusion of the ANNEX parts have been commented out % to generate the complete documentation please remove the "%" of the next two commands % -%%%\newpage +%===\newpage -%%%\include{annexes-A4} +%===\include{annexes-A4} \end{document} diff --git a/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.pdf b/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.pdf Binary files differindex 50dab6fe47..62463719d8 100644 --- a/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.pdf +++ b/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.pdf diff --git a/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.tex b/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.tex index 1513cfabae..6da67fa07a 100644 --- a/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.tex +++ b/macros/latex/contrib/jacow/JACoW_LaTeX_Letter.tex @@ -1,21 +1,38 @@ +% +%%%% !BIB TS-program = biber +%%%% !BIB program = biber +% !BIB TS-program = bibtex +% !BIB program = bibtex % !TeX spellcheck = en_US +% !TeX program = lualatex +% +% v 2.7 Feb 2022 Volker RW Schaa +% +% maintenance release to fix problems with changes in required package +% - Option "keeplastbox" deprecated in "flushend" +% - Option "binary-units" removed from "siunitx" +% - Option "detect-mode" deprecated in "siunitx" release: v3.0.32 +% Use "mode=match" as a replacement. +% - Option "detect-weight" deprecated in "siunitx" release: v3.0.32 +% Use "reset-text-series=false, text-series-to-math=true" as a replacement. +% - "fixltx2e" is not required with releases after 2015 +% - "ifluatex" and "ifxetex" dropped for "iftex" +% - some biblatex macros addded to achieve better JACoW reference formatting % +% no changes in +% # "jacow-collaboration.tex" +% # "annexes-Letter.tex" +% # "annexes-A4.tex" % -% v 2.3 Feb 2019 Volker RW Schaa -% # changes in the collaboration therefore updated file "jacow-collaboration.tex" -% # all References with DOIs have their period/full stop before the DOI (after pp. or year) -% # in the author/affiliation block all ZIP codes in square brackets removed as it was not -% understood as optional parameter and ZIP codes had bin put in brackets -% # References to the current IPAC are changed to "IPAC'19, Melbourne, Australia" -% # font for "url" style changed to "newtxtt" as it is easier to distinguish "O" and "0" +% to generate the "JACoW_LaTeX_Letter.pdf" or "JACoW_LaTeX_A4.pdf" uncomment +% all line with "%===" (3 in total) % -\documentclass[letter, +\documentclass[letterpaper, %boxit, % check whether paper is inside correct margins %titlepage, % separate title page %refpage % separate references %biblatex, % biblatex is used - keeplastbox, % flushend option: not to un-indent last line in References - %nospread, % flushend option: do not fill with whitespace to balance columns + nospread, % flushend option: do not fill with whitespace to balance columns %hyphens, % allow \url to hyphenate at "-" (hyphens) %xetex, % use XeLaTeX to process the file %luatex, % use LuaLaTeX to process the file @@ -23,7 +40,7 @@ % % ONLY FOR \footnote in table/tabular % -\usepackage{pdfpages,multirow,ragged2e} % +%===\usepackage{pdfpages,multirow,ragged2e} % % % CHANGE SEQUENCE OF GRAPHICS EXTENSION TO BE EMBEDDED % ---------------------------------------------------- @@ -50,7 +67,6 @@ \usepackage[USenglish]{babel} - % % if BibLaTeX is used % @@ -69,7 +85,7 @@ \begin{document} -\title{preparation OF papers for \NoCaseChange{JACoW} conferences\thanks{Work supported by ...}} +\title{preparation OF papers\\ for \NoCaseChange{JACoW} conferences\thanks{Work supported by ...}} \author{A. N. Author\thanks{email address}, H. Coauthor, Name of Institute or Affiliation, City, Country \\ P. Contributor\textsuperscript{1}, Name of Institute or Affiliation, City, Country \\ @@ -77,7 +93,6 @@ \maketitle -% \begin{abstract} Many conference series have adopted the same standards for electronic publication and have joined the Joint @@ -142,14 +157,14 @@ requirements. Manuscripts should have: In order to produce good Adobe Acrobat PDF files, authors using the `jacow' \LaTeX{} template are asked to use only the fonts -defined in the `jacow' class file (v2.3 of 2019/01/15) in standard, +defined in the ‘jacow’ class file (v2.3 of 2019/01/15) in standard, bold (i.\,e., \verb|\textbf|) or italic (i.\,e., \verb|\textit|) form and symbols from the standard set of fonts. In Word use only Symbol and, depending on your platform, Times or Times New Roman fonts in standard, bold or italic form. The layout of the text on the page is illustrated in -Fig.~\ref{fig:paper_layout}. Note that the paper's title and the author list should +Fig.~\ref{fig:paper_layout}. Note that the paper’s title and the author list should be the width of the full page. Tables and figures may span the whole \SI{170}{mm} page width, if desired (see Fig.~\ref{fig:jacow_team}), but if they span both columns, they should be placed at either @@ -165,11 +180,11 @@ text (which should flow from top to bottom in each column). \begin{figure*}[!tbh] \centering - \includegraphics*[width=\textwidth]{JACpic2} + \includegraphics*[width=\textwidth]{TeamMeeting2019} \caption{Example of a full-width figure showing the JACoW Team at their annual - meeting in December 2018. This figure has a multi-line caption that has to be - justified rather than centred.} %US + meeting in December 2019 in Santos, Brazil. This figure has a multi-line + caption that has to be justified rather than centred.} \label{fig:jacow_team} \end{figure*} @@ -248,8 +263,8 @@ caption itself. Single-line captions are centered in the column, while captions that span more than one line should be justified. -The \LaTeX{} template uses the “booktabs” package to -format tables. +The \LaTeX{} template uses the ‘booktabs’ package to +format tables. When referring to a figure from within the text, the convention is to use the abbreviated form [e.\,g., Fig.~1] @@ -277,7 +292,7 @@ achieved in \LaTeX{} using \verb|\eqref{eq:label}|. Units should be written using the standard, roman font, not the italic font, as shown in Eq.~\eqref{eq:label}. An unbreakable space should precede a unit (in \LaTeX{} use a “\verb|\,|”, -the template uses the “siunitx” package to format units). +the template uses the ‘siunitx’ package to format units). Some examples are: \SI{3}{keV}, \SI{100}{kW}, \SI{7}{µm}. When a unit appears in a hyphenated, compound adjective that precedes a noun, it takes on the @@ -299,7 +314,7 @@ with ranges where appropriate~[1--4, 10]. A URL or DOI may be included as part of a reference, but its hyperlink should NOT be added. The usual practice is to use a monospaced font for the URL so as to help distinguish -it from normal text. In \LaTeX{} the “url” package is used with its +it from normal text. In \LaTeX{} the ‘url’ package is used with its default font now being switched to ``newtxtt'' which offers a better distinction between ``\texttt{O}'' and ``\texttt{0}''. @@ -357,7 +372,7 @@ and properly formatted references. Captions & & & \\[5pt] %\midrule Table & \SI{10}{pt} & $\ge$\SI{3}{pt} & \SI{3}{pt} \\ - Captions & & & \\[5pt] + Captions & & & \\[5pt] %\midrule Equations & \SI{10}{pt} base font & $\ge$\SI{6}{pt} & $\ge$\SI{6}{pt} \\[5pt] %\midrule @@ -391,7 +406,7 @@ both in the abstract and in the rest of the paper. Table~\ref{tab:styles} summarizes the fonts and spacing used in the styles of a JACoW template. In \LaTeX, these -are implemented in the “jacow” class file. +are implemented in the ‘jacow’ class file. \section{PAGE NUMBERS} @@ -435,6 +450,7 @@ Authors are requested to go over the following checklist for electronic publicat Please also check the list of common oversights which can be found in \textbf{ANNEX C}. +\flushcolsend \section{CONCLUSION} Any conclusions should be in a separate section directly preceding @@ -476,13 +492,12 @@ this should be the last section of the paper. \end{thebibliography} } % end \ifboolexpr - % % for use as JACoW template the inclusion of the ANNEX parts have been commented out % to generate the complete documentation please remove the "%" of the next two commands % -%%%%\newpage +%===\newpage -%%%%\include{annexes-Letter} +%===\include{annexes-Letter} \end{document} diff --git a/macros/latex/contrib/jacow/JACpic2.jpg b/macros/latex/contrib/jacow/JACpic2.jpg Binary files differdeleted file mode 100644 index dc611f7918..0000000000 --- a/macros/latex/contrib/jacow/JACpic2.jpg +++ /dev/null diff --git a/macros/latex/contrib/jacow/README b/macros/latex/contrib/jacow/README index 1680a41447..bb6596fd7c 100644 --- a/macros/latex/contrib/jacow/README +++ b/macros/latex/contrib/jacow/README @@ -6,9 +6,9 @@ Class File: jacow.cls Authors: John Jowett (CERN), Michel Goossens (CERN), Martin Comyn (TRIUMF), John Poole (CERN), Todd Satogata (BNL), Ulrike Fischer, Volker RW Schaa (GSI) -Version: 2.4 -Date: 01 April 2019 -Copyright: 1996-2019 by JACoW, Geneva, Switzerland +Version: 2.7 (maintenance release) +Date: 02 Februar 2022 +Copyright: 1996-2022 by JACoW, Geneva, Switzerland Homepage: http://www.jacow.org License: LPPL 1.3c Status: Maintained @@ -32,7 +32,7 @@ particular requirements for electronic publication at www.JACoW.org. The package consists of the following files class file - jacow.cls JACoW class file v2.4 of 2019/04/01 + jacow.cls JACoW class file v2.7 of 2022/02/02 templates JACoW_LaTeX_A4.tex basic A4/letter templates to demonstrate the @@ -57,9 +57,9 @@ The package consists of the following files figures/includes JACpic_mc.pdf a graphic showing the JACoW page format (being the smaller side of A4 and letter respectively) - JACpic2.jpg a graphic for a full width figure (spanning + TeamMeeting2019.jpg a graphic for a full width figure (spanning the two columns and multiline caption) showing - the participants of the 2017 JACoW Team Meeting + the participants of the 2019 JACoW Team Meeting jacow-collaboration.tex (an example) title page showing the JACoW Collaboration. jacow-collaboration.pdf This PDF is included in Annex A. diff --git a/macros/latex/contrib/jacow/TeamMeeting2019.jpg b/macros/latex/contrib/jacow/TeamMeeting2019.jpg Binary files differnew file mode 100644 index 0000000000..43e4a253a5 --- /dev/null +++ b/macros/latex/contrib/jacow/TeamMeeting2019.jpg diff --git a/macros/latex/contrib/jacow/jacow.cls b/macros/latex/contrib/jacow/jacow.cls index 36df55ad00..2f560b4164 100644 --- a/macros/latex/contrib/jacow/jacow.cls +++ b/macros/latex/contrib/jacow/jacow.cls @@ -15,18 +15,18 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. -%% +%% %% This work has the LPPL maintenance status "maintained". -%% +%% %% This Current Maintainer of this work is Volker RW Schaa. -%% +%% %% This work consists of the following files %% jacow.cls this class file -%% JACoW_LaTeX_A4.tex A4/letter templates to demonstrate the +%% JACoW_LaTeX_A4.tex A4/letter templates to demonstrate the %% JACoW_LaTeX_Letter.tex .. use and explain the various parameters %% .. and settings for a submission to %% .. a JACoW conference proceedings -%% JACoW_LaTeX_A4.pdf template in format A4 and European +%% JACoW_LaTeX_A4.pdf template in format A4 and European %% settings (citation and hyphenation) %% JACoW_LaTeX_Letter.pdf template in format letter and American %% setting (citation and hyphenation) @@ -41,7 +41,7 @@ %% editors for the various platform %% dependent templates (LaTeX, Word on PC and %% Mac, ODF). The PDF is included in the template -%% +%% % % v0.1 to 1.3 : JAC2000.cls % Special thanks to John Jowett and Michel Goossens from CERN and @@ -104,17 +104,17 @@ % Volker RW Schaa, 02 May 2014 % % v1.95 -% - only change to the version 1.94 are the extended documenation and license +% - only change to the version 1.94 are the extended documentation and license % statement (lppl1.3c) as preparation for publication on CTAN. % Volker RW Schaa, 02 May 2014 % % v1.96 -% - modification of bibatex style information. Since the JACoW template Feb-2016 +% - modification of bibatex style information. Since the JACoW template Feb-2016 % the bibliography requires the IEEEtran style. Heine provided an adapted % version using the required values of the template: % + ieee biblatex style instead of numeric-compv % + doi field is cleared for all entries -% + et al. is used when there are > 6 authors (maxnames=6). In that case, +% + et al. is used when there are > 6 authors (maxnames=6). In that case, % only the first author is mentioned (minnames=1) % + url field is cleared for articles and inproceedings % + giveninits=true reduces all given names to initials @@ -146,15 +146,34 @@ % v2.4 % - version 2.3 did not work for XeTeX/LuaTeX, therefore font change using % \def\UrlFont and switching the fontencoding to T1 (suggested by Ulrike Fischer) -% - package amsmath included to provide +% - package amsmath included to provide % Volker RW Schaa, 01 Apr 2019 +%% v2.5 +% - flushend dropped the option keeplastbox, therefore removed from jacow package +% option list +% - Option "binary-units" has been removed from siunitx release. +% - Option "detect-mode" has been deprecated in this (siunitx) release: v3.0.32 +% Use "mode=match" as a replacement. +% - Option "detect-weight" has been deprecated in this (siunitx) release: v3.0.32 +% Use "reset-text-series=false, text-series-to-math=true" as a replacement. +% - fixltx2e is not required with releases after 2015 +% Volker RW Schaa, 14 Oct 2021 +%% v2.6 +% - ifluatex/ifxetex dropped for iftex +% Volker RW Schaa, 11 Nov 2021 % -\def\fileversion{2.4} -\def\filedate{2019/04/01} -\def\docdate {2019/04/01} +%% v2.7 +% - addded some biblatex macros to achieve closer JACoW reference formatting +% than standard ieeetran +% Volker RW Schaa, 02 Feb 2022 +% +% +\def\fileversion{2.7} +\def\filedate{2022/02/02} +\def\docdate {2022/02/02} \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jacow}[\filedate\space Version \fileversion] +\ProvidesClass{jacow}[\filedate\space v\fileversion fixes for siunitx, stfloats, biblatex ref formatting] \typeout{------------------------------------------------------------------------} \typeout{LaTeX2e Class file for Accelerator Conference publication for LaTeX2e users} @@ -197,11 +216,10 @@ \RequirePackage{fix-cm} \LoadClass[10pt,twocolumn]{article} -\RequirePackage[keeplastbox]{flushend} %% modified +\RequirePackage[]{flushend} %% modified 2.5 % Tools: \RequirePackage{etoolbox} -\RequirePackage{ifxetex} -\RequirePackage{ifluatex} +\RequirePackage{iftex} \RequirePackage{textcase} % %Add thanks to the list of "\@nonchangecase"-commands from textcase: @@ -222,8 +240,14 @@ \protected@edef\reserved@a{\endgroup \noexpand\@skipmath#3#4$\valign$}% \reserved@a} - -\RequirePackage[detect-mode,detect-weight, binary-units=true]{siunitx} +% +% Option "binary-units" has been removed from (siunitx) +% Option "detect-mode" has been deprecated in this (siunitx) release: v3.0.32 +% Use "mode=match" as a replacement. +% Option "detect-weight" has been deprecated in this (siunitx) release: v3.0.32 +% Use "reset-text-series=false, text-series-to-math=true" as a replacement. +% +\RequirePackage[mode=match, reset-text-series=false, text-series-to-math=true]{siunitx} \RequirePackage{graphicx} \RequirePackage{booktabs} \RequirePackage[figureposition=bottom,tableposition=top,skip=5pt]{caption} @@ -264,7 +288,7 @@ {} { \catcode`\^^^=9 } - + \ifboolexpr{bool{xetex} or bool{luatex}} { \let\ori@vdots\vdots \RequirePackage{unicode-math} @@ -428,16 +452,110 @@ %% when to activate this? Paper format acus/letter % \DefineBibliographyExtras{american}{\stdpunctuation} % mod % Drop urls for article and inproceedings entries -%2.00 \DeclareFieldFormat -%2.00 [article,inproceedings] -%2.00 {url}{} +%2.7 +% check https://tex.stackexchange.com/questions/6743/biblatex-changing-the-order-of-entries +% https://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles/13076#13076 +% https://tex.stackexchange.com/questions/10203/biblatex-putting-thin-spaces-between-initials +% https://tex.stackexchange.com/questions/560346/how-to-suppress-annotation-field-from-bbl-file-in-biblatex +% https://tex.stackexchange.com/questions/496995/advanced-introduction-to-biblatex-coding-guidelines-for-database +%------------------------------------- +% +% if BibLaTeX is used +% +% modify macros so the formatted output corresponds to JACoW's idea of IEEEtran + % set vertical distance between items + \setlength\bibitemsep{3pt plus 1.5pt minus 0.5pt} + % remove stretchability from biblatex URLs/DOIs + \toks0\expandafter{\biburlsetup}\edef\biburlsetup{\the\toks0 \Urlmuskip =0mu\relax} + % Removing period after DOI + \renewcommand*{\finentrypunct}{\ifboolexpr{togl {bbx:doi} and not test {\iffieldundef{doi}}}{}{\addperiod}} + % format doi: as part of the link using the same font + \DeclareFieldFormat{doi}{% + \ifhyperref + {\href{https://doi.org/#1}{\nolinkurl{#1}}} + {\nolinkurl{doi:#1}}% + } + % + % make sure that there is no break between initial and lastname + % and thinspaces between muliple initials + % + \renewcommand*\bibnamedelimd{~} + \renewcommand\bibinitdelim{\addnbthinspace} + % + % format venue, event, date without round brackets + % https://tex.stackexchange.com/questions/446732/biblatex-field-venueeventdate-without-round-brackets + \renewbibmacro*{event+venue+date}{% + \printfield{eventtitle}% + \newunit + \printfield{eventtitleaddon}% + \newunit + \printfield{venue}% + \setunit*{\addcomma\space}% + \printeventdate% + \newunit% + } + \DeclareFieldFormat{eid}{% + {paper #1}% + } + % + \renewbibmacro*{volume+number+eid}{% + \printfield{volume}% + \newunit + \printfield{number}% + \newunit + \printfield{eid}% + } + % + % Clean up the bibtex rather than editing it for extensive JACoW BibTeX records + % + \AtEveryBibitem{% + \clearlist{address} + \clearfield{date} + \clearfield{eprint} + \clearfield{isbn} + \clearfield{issn} + % + % use/print "note" if "booktitle" is not given: example "data for this conference" + % + \iffieldundef{booktitle}{}{\clearfield{note}} + \clearlist{location} + \clearfield{month} + \clearfield{series} + \ifentrytype{book}{}{% Remove publisher and editor except for books + \clearlist{publisher} + \clearname{editor} + } + } + % + % print url if no doi + % + \renewbibmacro*{doi+eprint+url}{% + \printfield{doi}% + \newunit\newblock% + \iftoggle{bbx:eprint}{% + \usebibmacro{eprint}% + }{}% + \newunit\newblock% + \iffieldundef{doi}{% + \usebibmacro{url+urldate}}% + {}% + } + % format ISSN like URLs + \DeclareFieldFormat{issn}{% + {\texttt{ISSN:#1}}% + } + % format ISSN like URLs + \DeclareFieldFormat{issn}{% + {\texttt{ISSN:#1}}% + } % \setlength\bibitemsep{0pt} \setlength\bibparsep{0pt} \setlength\biblabelsep{5pt} \ifjacowrefpage\preto\blx@bibliography{\clearpage}\fi \AtBeginBibliography{\small\clubpenalty4000\widowpenalty4000}% - } + } % end if biblatex + % {\RequirePackage{cite} % Redefine to use smaller fonts \def\thebibliography#1{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}% @@ -461,7 +579,7 @@ %avoid bug of fixltx2e: %http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/4023 -\RequirePackage{fixltx2e}% +%\RequirePackage{fixltx2e}% \def\@outputdblcol{% \if@firstcolumn \global\@firstcolumnfalse diff --git a/macros/latex/contrib/msu-thesis/README.md b/macros/latex/contrib/msu-thesis/README.md index 856b9059bc..04bc59c94c 100644 --- a/macros/latex/contrib/msu-thesis/README.md +++ b/macros/latex/contrib/msu-thesis/README.md @@ -1,6 +1,6 @@ -# MSU Thesis Class Version 3.1b 2022/03/25 +# MSU Thesis Class Version 3.2 2022/04/16 -Copyright 2009-2022 by Alan Munn <amunn@msu.edu> +Copyright 2011-2022 by Alan Munn <amunn@msu.edu> This is a class file for producing dissertations and theses according to the Michigan State University Graduate School Guidelines for Electronic diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.cls b/macros/latex/contrib/msu-thesis/msu-thesis.cls index c30184d45a..cda76b9afe 100644 --- a/macros/latex/contrib/msu-thesis/msu-thesis.cls +++ b/macros/latex/contrib/msu-thesis/msu-thesis.cls @@ -158,11 +158,12 @@ % Version 3.0b 2021/07/14 Added msu@hchap counter for hyperref targets in appendices (unreleased) % Version 3.1 2022/03/03 Added support for List of Algorithms plus fixes for algorithm2e and algorithmicx etc % Version 3.1b 2022/03/25 Fixed numbering problem for single global appendix +% Version 3.2 2022/04/16 Fixed TOC formatting problem for per-chapter appendices % % Report bugs/problems/questions to <amunn@msu.edu> % -\def\msu@version{3.1b} -\def\msu@date{2022/03/25} +\def\msu@version{3.2} +\def\msu@date{2022/04/16} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{msu-thesis}[\msu@date\space Michigan State University Thesis Class version \msu@version] \newif\ifmsu@dissertation\msu@dissertationtrue % added v2.7 boolean for \msu@thesistype @@ -399,6 +400,10 @@ \cftinsertcode{CHAPAPPR}{ \cftsetindents{section}{1.5em}{2.3em} +\setlength{\cftchapterindent}{0em} +\setlength{\cftbeforechapterskip}{1.0em \@plus\p@} + \renewcommand\cftchapterfont{\msu@chapfont} + \renewcommand\cftchapterpagefont{\msu@chapfont} } % This code resets the changes made in the APP code back to normal % so that the bibliography will appear correctly in the TOC @@ -584,7 +589,6 @@ \interlinepenalty \@M \normalfont \printparttitle{\appendixpagename}\par}% - \cftinserthook{toc}{CHAPAPPR} % reset added 2021/06/10 \@endpart} % @@ -600,14 +604,19 @@ {\renewcommand{\appendixname}{Appendix} \renewcommand{\appendixtocname}{Appendix} \renewcommand{\appendixpagename}{Appendix} - \ifmsu@chapterapp\else\msu@singleappendixtrue\fi% make sure single appendix doesn't have a number if global 3.1b +% It's not clear if this should apply to per-chapter appendices also +% I think it probably should, even though it leads to ambiguity. +% Changing this in 3.2 2022/04/16 +% \ifmsu@chapterapp\else + \msu@singleappendixtrue +% \fi% make sure single appendix doesn't have a number if global 3.1b (always 3.2) \msu@apppage\settocdepth{part}\@resets@pp\anappendixtrue}% - {\@ppsaveapp\@pprestoresec\anappendixfalse} + {\@ppsaveapp\@pprestoresec\anappendixfalse\cftinserthook{toc}{CHAPAPPR}} % reset aded 2022/04/16 \renewenvironment{appendices}% {\msu@apppage\settocdepth{chapter} \@resets@pp\anappendixtrue}% - {\@ppsaveapp\@pprestoresec\anappendixfalse} + {\@ppsaveapp\@pprestoresec\anappendixfalse\cftinserthook{toc}{CHAPAPPR}} % reset added 2022/04/16 % The default numbering that memoir assumes is for appendices % is sequential throughout the document; the thesis office diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.pdf b/macros/latex/contrib/msu-thesis/msu-thesis.pdf Binary files differindex 3536ebd8c5..bba21d6b50 100644 --- a/macros/latex/contrib/msu-thesis/msu-thesis.pdf +++ b/macros/latex/contrib/msu-thesis/msu-thesis.pdf diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.tex b/macros/latex/contrib/msu-thesis/msu-thesis.tex index c6d0d6e1ab..a54568229a 100644 --- a/macros/latex/contrib/msu-thesis/msu-thesis.tex +++ b/macros/latex/contrib/msu-thesis/msu-thesis.tex @@ -2,8 +2,8 @@ \documentclass[11pt]{article} -\def\msuversion{3.1b} -\def\msudate{2022/03/25} +\def\msuversion{3.2} +\def\msudate{2022/04/16} \title{\textbf{Using the MSU Thesis Class}} \author{\textbf{Alan Munn}\\Department of Linguistics, Languages, and Cultures\\Michigan State University\\\texttt{\href{mailto:amunn@msu.edu}{amunn@msu.edu}}} \date{Version \msuversion\\\msudate} @@ -105,7 +105,7 @@ In addition to any options passed to the \pkg{memoir} class (e.g. |oldfontcomman \subsection{The \pkg{[lscape]} option} The Formatting Guide requires that any lansdscape pages be numbered in landscape mode (i.e. along the long edge of the page) rather than in portrait mode, and rotated in the final PDF. The |[lscape]| option enables this. The option loads both the \pkg{pdflscape} package and \pkg{tikz}, and is implemented as a class option so that you are not required to load those packages if they are not needed. \subsection{The \pkg{[chapterbib]} option} -This option enables per-chapter bibliographies. Each chapter must have its own bibliography. If you are using \pkg{natbib} for bibliographies, per-chapter bibliographies can be implemented using the \pkg{chapterbib} package. Please read its documentation carefully, as it requires each chapter to be a separate file. An newer alternative which I highly recommend is to use \pkg{biblatex} for your bibliography, which makes per-chapter bibliographies very simple. If you have per-chapter bibliographies you cannot have a global bibliography. +This option enables per-chapter bibliographies. Each chapter must have its own bibliography. If you are using \pkg{natbib} for bibliographies, per-chapter bibliographies can be implemented using the \pkg{chapterbib} package. Please read its documentation carefully, as it requires each chapter to be a separate file. A newer alternative which I highly recommend is to use \pkg{biblatex} for your bibliography, which makes per-chapter bibliographies very simple. If you have per-chapter bibliographies you cannot have a global bibliography. \subsection{The \pkg{[chapterapp]} option} This option enables per-chapter appendices. Any appendix must be associated with its own chapter. If you have per-chapter appendices you cannot have any global appendices. \subsection{The contents options} @@ -215,7 +215,7 @@ Your list of abbreviations here. \end{quote} \subsection{Algorithm packages\label{algorithms}} -Because the various algorithm formatting packages such as \pkg{algorithm2e} and \pkg{algorithmicx} (or its related packages) sometimes create incompatibilities with the \pkg{memoir} float methods, the class provides you with a floating |{algorithm}| environment and the corresponding list of algorithms, so you do not have to create your own list of algorithms. Here are some specific important points about using \pkg{algorithm2e} and \pkg{algorithmicx}. +Because the various algorithm formatting packages such as \pkg{algorithm2e} and \pkg{algorithmicx} (or its related packages) sometimes create incompatibilities with the \pkg{memoir} float methods, the class provides you with floating |{algorithm}| environment and the corresponding list of algorithms, so you do not have to create your own list of algorithms. Here are some specific important points about using \pkg{algorithm2e} and \pkg{algorithmicx}. \begin{itemize}[label=\textbullet] \item Do \emph{not} load the \pkg{algorithm} package. \item If you use the \pkg{algorithm2e} package you \emph{must} load it with the |[algo2e]| option (along with any other options you need). @@ -267,7 +267,7 @@ If you have large figures and tables that must be rotated, you should use the |[ The |landscape| environment makes all pages within it landscape, so if you have multiple landscape figures in a row, you can put all of them inside a single |landscape| environment. This option correctly rotates the landscape pages within the pdf document itself, which the thesis office seems to require. \subsection{Appendices} -Appendices in a thesis are usually at the end of the document, but before the bibliography. MSU requires appendices to be preceded by a cover page which says either ``Appendix'' (if there is only one) or ``Appendices'' if there is more than one. The class implements this with two environments: |{appendix}| for a single appendix and |{appendices}| for multiple appendices. If your thesis organization requires appendices per-chapter, you must use the |[chapterapp]| class option. In either case, the code for appendices is identical. +Appendices in a thesis are usually at the end of the document, but before the bibliography. MSU requires appendices to be preceded by a cover page which says either ``Appendix'' (if there is only one) or ``Appendices'' if there is more than one. The class implements this with two environments: |{appendix}| for a single appendix and |{appendices}| for multiple appendices. If your thesis organization requires appendices per-chapter, you must use the |[chapterapp]| class option. In either case, the code for appendices is identical, i.e., each appendix is introduced with the |\chapter| command. \subsubsection{Single appendix} If you have a single appendix, your code should look like this: @@ -295,10 +295,10 @@ Appendix text goes here \end{quote} \subsubsection{Appendices per chapter} -If you need to add an appendix or appendices to a chapter, you must use the \pkg{[chapterapp]} class option. The code for the appendices themselves is exactly as described above. Note that per-chapter appendices should \emph{not} be preceded by the |\backmatter| command, which should only precede the global bibliography or appendices. +If you need to add an appendix or appendices to a chapter, you must use the \pkg{[chapterapp]} class option. The code for the appendices themselves is exactly as described above. This means that the appendix itself is introduced by the |\chapter| command, \emph{not} a |\section| command (because the this seems to be how the thesis office wants things to look). Furthermore, per-chapter appendices should \emph{not} be preceded by the |\backmatter| command, which should only precede the global bibliography or appendices. \subsection{Bibliographies} -The class places no constraints on how you do your bibliography. If you have per-chapter bibliographies, you must use the |[chapterbib]| class option. Before any bibliography (whether global or per-chapter) you should use the |\makebibliographypage| command. Note that per-chapter bibliographies should \emph{not} be preceded by the |\backmatter| command, which should only precede the global bibliography or appendices. +The class places no constraints on how you do your bibliography. It doesn't care whether you are using the \pkg{chapterbib} package with \pkg{natbib} or the per-chapter bibliography functionality provided by \pkg{biblatex}. If you have per-chapter bibliographies, however, you \emph{must} use the |[chapterbib]| class option. This option lets the class know that you are using per-chapter bibliographies. Before any bibliography (whether global or per-chapter) you should use the |\makebibliographypage| command. Note that per-chapter bibliographies should \emph{not} be preceded by the |\backmatter| command, which should only precede the global bibliography or appendices. \subsubsection{Bibliography spacing}\label{bibspacing} Please note that although bibliography entries must be single spaced, there must be a space between each entry. This parameter is set by your bibliography package and not by the class itself. If you are using \pkg{natbib} or \pkg{biblatex} these spacing parameters are set for you by the class. If you are using another package for your bibliography you are responsible for adjusting the relevant spacing parameters. @@ -320,6 +320,7 @@ Despite there being no explicit formatting requirements for Chapter headings (ot \item Make sure you pay attention to any ``Overfull hbox'' warnings when you are producing your final copy. You should make sure you eliminate all of them or else the thesis office is likely to reject your thesis. One common way to eliminate such warnings is to place the command |\sloppy| at the beginning of the paragraph that triggers the warning. You should only use this technique at the very end when you are completely done with everything. Alternatively, rewording the text may also fix things. \item Remember to use the |\tableofcontents*| command so that your table of contents is not listed in the table of contents. \item Remember to use the |{appendix}| environment for single appendices, and the |{appendices}| environment for multiple appendices. Do not use the standard LaTeX |\appendix| command. +\item Remember also that \emph{all} appendices whether global or per-chapter should be |\chapter| commands in your source document. \item Remember to add the |\makebibliographypage| command before any bibliography in your document. \end{itemize} \subsection{Master’s Theses} @@ -331,9 +332,9 @@ The latest copy of \pkg{msu-thesis} will always be available on \href{https://c \subsection{Archiving your thesis for the future} Since the current version of the \pkg{msu-thesis} class satisfies the Graduate School requirements at any one time, as these requirements change, you may find that if you need to recompile your thesis after you have graduated that the formatting changes. To avoid this, I would recommend saving an archived version of the \pkg{msu-thesis.cls} file in the same folder as your thesis file. You only need to do this once you have completely finished your thesis however; there's no need to do it during the writing process. \subsection{Version history} -Previous versions of \pkg{msu-thesis} (versions 1.0--1.4b) were created for non-electronic submission and should not be used. Versions 1.5--1.6 (the first electronic submission versions) contained a |\makeabstract| command and a separate |msuabstract| environment. These have been removed as of version 1.7. Users who are upgrading from earlier versions to version 1.7 do not need to change these commands however but their use will trigger a warning.) Version 2.0 implemented landscape pages; version 2.1 added support for \pkg{hyperref}. Versions 2.2--2.5 mainly accommodated to the ever changing whims of the MSU Graduate School. Version 2.6 fixed some appendix bugs introduced by the previous whim accommodation. Version 2.7 fixed various small spacing issues, fixed a bug which prevented a new chapter page to be a landscape page, added support for the \pkg{apacite} package, and updated degree options. Version 2.8 fixed some spacing and capitalization issues and added support for the public abstract. Version 2.9 removed subscript/superscript size restrictions, added font size options and made small spacing changes to appease the thesis office. Version 3.0 added full support for per-chapter bibliographies and appendices, and automated bibliography spacing for |natbib| and |biblatex| produced bibliographies. Version 3.1 added support for an |{algorithm}| environment and a list of algorithms to combat incompatibilities with the \pkg{algorithm} and \pkg{algorithm2e} packages. +Previous versions of \pkg{msu-thesis} (versions 1.0--1.4b) were created for non-electronic submission and should not be used. Versions 1.5--1.6 (the first electronic submission versions) contained a |\makeabstract| command and a separate |msuabstract| environment. These have been removed as of version 1.7. Users who are upgrading from earlier versions to version 1.7 do not need to change these commands however but their use will trigger a warning.) Version 2.0 implemented landscape pages; version 2.1 added support for \pkg{hyperref}. Versions 2.2--2.5 mainly accommodated to the ever changing whims of the MSU Graduate School. Version 2.6 fixed some appendix bugs introduced by the previous whim accommodation. Version 2.7 fixed various small spacing issues, fixed a bug which prevented a new chapter page to be a landscape page, added support for the \pkg{apacite} package, and updated degree options. Version 2.8 fixed some spacing and capitalization issues and added support for the public abstract. Version 2.9 removed subscript/superscript size restrictions, added font size options and made small spacing changes to appease the thesis office. Version 3.0 added full support for per-chapter bibliographies and appendices, and automated bibliography spacing for |natbib| and |biblatex| produced bibliographies. Version 3.1 added support for an |{algorithm}| environment and a list of algorithms to combat incompatibilities with the \pkg{algorithm} and \pkg{algorithm2e} packages. Version 3.2 fixed some lingering problems with per-chapter appendices. \section{Acknowledgements} -Thanks to Lars Madsen, Ulrike Fischer and Peter Wilson for help with setting up parts of the memoir code for versions 1.0--1.4 (now eliminated due to changed requirements). Thanks to Wolfgang Sternefeld for supplying the \pkg{linguex} spacing fix code, Leo Liu for the landscape page numbering code, which greatly simplified my original version, and Florent Chervet for the \pkg{hyperref} code. Thanks also to the following students who have reported problems over the years: Irina Agafonova, Ali Al-jiboory, Julian Blank, Dmitriy Bryndin, Greg Christian, Kyle Crayne, Ciaron Hamilton, Matt Husband, Changkuk Jung, Adam Liter, William Muir, Alicia Parrish, Neil ver Planck, Adam Soliman, Erik Stitt, Eremey Valetov, Matthew Vincent, Michael Wojcik, Stephen Yuwono, and Yisu Zhou. A special thank you to Non Thongprong who graciously provided a copy of his entire thesis which allowed me to debug some especially subtle spacing inconsistencies. +Thanks to Lars Madsen, Ulrike Fischer and Peter Wilson for help with setting up parts of the memoir code for versions 1.0--1.4 (now eliminated due to changed requirements). Thanks to Wolfgang Sternefeld for supplying the \pkg{linguex} spacing fix code, Leo Liu for the landscape page numbering code, which greatly simplified my original version, and Florent Chervet for the \pkg{hyperref} code. Thanks also to the following students who have reported problems over the years: Irina Agafonova, Ali Al-jiboory, Julian Blank, Dmitriy Bryndin, Greg Christian, Kyle Crayne, Ciaron Hamilton, Matt Husband, Changkuk Jung, Adam Liter, William Muir, Alicia Parrish, Neil ver Planck, Adam Soliman, Erik Stitt, Eremey Valetov, Matthew Vincent, Michael Wojcik, Stephen Yowono, and Yisu Zhou. A special thank you to Non Thongprong who graciously provided a copy of his entire thesis which allowed me to debug some especially subtle spacing inconsistencies. \appendix \renewcommand{\thesection}{Appendix \Alph{section}} diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex index 198c170a03..4527ef5ae8 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex @@ -150,9 +150,14 @@ Your acknowledgements here. % % If each chapter has its own set of appendices, then load the class with the [chapterapp] option % and put your {appendix} or {appendices} environments at the end of each chapter. -% You should not use the \backmatter command before per-chapter material +% +% +% Even though it is very unintuitive, per-chapter appendices are STILL \chapter commands +% in your document! If you use \section it will not work properly. % -% There should only be ONE \backmatter command in your document, and it should separate only the thesis from the bibliography +% You should not use the \backmatter command before per-chapter material! +% There should only be ONE \backmatter command in your document, +% and it should separate only the thesis from the bibliography \backmatter % The next lines add the dots back into the References/Bibliography heading % of the TOC. Only uncomment this if you need to put the dots back in having removed them for Chapter headings. diff --git a/macros/xetex/latex/hanzibox/README.md b/macros/xetex/latex/hanzibox/README.md index e325df7a49..199b97f043 100644 --- a/macros/xetex/latex/hanzibox/README.md +++ b/macros/xetex/latex/hanzibox/README.md @@ -1,11 +1,11 @@ Boxed Chinese characters with Pinyin above and translation below based LaTeX3 ======= -`hanzibox` is a LaTeX package developed in LaTeX3, which provides `\hanzibox` and `\hanzidialog` macros. These two macros are used for typesetting Chinese character with or without a background grid such as a cross grid or star grid for Chinese character writting learning. +`hanzibox` is a LaTeX package developed in LaTeX3, which provides `\hanzibox`, `\hanzidialog` and `\writegrid` macros. These macros are used for typesetting Chinese character with or without a background grid such as a cross grid or star grid for Chinese character writting learning. And you can display the Hanyu Pinyin above the Chinese character and the translation below them as needed. -The `\hanzibox` macro can automatically invoke the `\xpinyin*` macro of the `xpinyin` package to get Hanyu Pinyin according to the Chinese characters. And the `\hanzibox` macro provides an asterisk version of `\hanzibox*`, whose function is achieved by automatically invoking the `xpinyin` package's `\pinyin` macro to get Hanyu Pinyin. The `\hanzidialog` macro is implemented by manually inserting the `\pinyin` macro of the `xpinyin` package in it's pinyin option. +The `\hanzibox` macro can automatically invoke the `\xpinyin*` macro of the `xpinyin` package to get Hanyu Pinyin according to the Chinese characters. And the `\hanzibox` macro provides an asterisk version of `\hanzibox*`, whose function is achieved by automatically invoking the `xpinyin` package's `\pinyin` macro to get Hanyu Pinyin. The `\hanzidialog` macro is implemented by manually inserting the `\pinyin` macro of the `xpinyin` package in it's pinyin option. The `\writegrid` macro is for write a composition anwser grid. `hanzibox` is a utility for learning to write and pronounce Chinese characters, and can be used for Chinese character learning plans, presentations, exercise booklets and other documentation work. @@ -31,7 +31,7 @@ Contributing 基于LaTeX3的带注音和译文的汉字练习宏包 ======= -`hanzibox`是一个用LaTeX3开发的LaTeX宏包,它提供了`\hanzibox`和`\hanzidialog` 两个命令。这两个命令分别用于排版汉字学习中带有或不带田字格、米字格等背景格子的汉字,并可以根据需要在汉字正上方显示拼音,在正下方显示译文。其中,`\hanzibox`命令能够根据汉字自动调用`xpinyin`宏包的`\xpinyin*`命令实现汉字注音。并且`\hanzibox`命令提供了`\hanzibox*`星号版本,其注音功能是通过自动调用`xpinyin`宏包的`\pinyin`命令实现的。`\hanzidialog`命令的注音功能是通过在拼音选项中手动插入`xpinyin`宏包`\pinyin`命令实现的。 +`hanzibox`是一个用LaTeX3开发的LaTeX宏包,它提供了`\hanzibox`、`\hanzidialog` 和`\writegrid`三个个命令。这三个命令分别用于排版汉字学习中带有或不带田字格、米字格等背景格子的汉字,并可以根据需要在汉字正上方显示拼音,在正下方显示译文。其中,`\hanzibox`命令能够根据汉字自动调用`xpinyin`宏包的`\xpinyin*`命令实现汉字注音。并且`\hanzibox`命令提供了`\hanzibox*`星号版本,其注音功能是通过自动调用`xpinyin`宏包的`\pinyin`命令实现的。`\hanzidialog`命令的注音功能是通过在拼音选项中手动插入`xpinyin`宏包`\pinyin`命令实现的。`\writegrid`命令用于排版作文题目的答题格子纸。 `hanzibox` 是一个用于学习汉字书写与发音的工具,可以用于汉字学习教案、演示文稿、习题册等文档工作。 @@ -55,7 +55,7 @@ Contributing Copyright and Licence --------------------- - Copyright (C) 2020-2021 by Nan Geng <nangeng@nwafu.edu.cn> + Copyright (C) 2020-2022 by Nan Geng <nangeng@nwafu.edu.cn> ---------------------------------------------------------------------- This work may be distributed and/or modified under the diff --git a/macros/xetex/latex/hanzibox/hanzibox.dtx b/macros/xetex/latex/hanzibox/hanzibox.dtx index 3a05212a3b..5124b0376f 100644 --- a/macros/xetex/latex/hanzibox/hanzibox.dtx +++ b/macros/xetex/latex/hanzibox/hanzibox.dtx @@ -7,11 +7,12 @@ Boxed Chinese characters with Pinyin above and translation below based LaTeX3 ======= -`hanzibox` is a LaTeX package developed in LaTeX3, which provides `\hanzibox` and `\hanzidialog` macros. These two macros are used for typesetting Chinese character with or without a background grid such as a cross grid or star grid for Chinese character writting learning. +`hanzibox` is a LaTeX package developed in LaTeX3, which provides `\hanzibox`, `\hanzidialog` and `\writegrid` macros. These macros are used for typesetting Chinese character with or without a background grid such as a cross grid or star grid for Chinese character writting learning. And you can display the Hanyu Pinyin above the Chinese character and the translation below them as needed. -The `\hanzibox` macro can automatically invoke the `\xpinyin*` macro of the `xpinyin` package to get Hanyu Pinyin according to the Chinese characters. And the `\hanzibox` macro provides an asterisk version of `\hanzibox*`, whose function is achieved by automatically invoking the `xpinyin` package's `\pinyin` macro to get Hanyu Pinyin. The `\hanzidialog` macro is implemented by manually inserting the `\pinyin` macro of the `xpinyin` package in it's pinyin option. +The `\hanzibox` macro can automatically invoke the `\xpinyin*` macro of the `xpinyin` package to get Hanyu Pinyin according to the Chinese characters. And the `\hanzibox` macro provides an asterisk version of `\hanzibox*`, whose function is achieved by automatically invoking the `xpinyin` package's `\pinyin` macro to get Hanyu Pinyin. The `\hanzidialog` macro is implemented by manually inserting the `\pinyin` macro of the `xpinyin` package in it's pinyin option. The `\writegrid` macro is for write a composition anwser grid. + `hanzibox` is a utility for learning to write and pronounce Chinese characters, and can be used for Chinese character learning plans, presentations, exercise booklets and other documentation work. @@ -37,7 +38,7 @@ Contributing 基于LaTeX3的带注音和译文的汉字练习宏包 ======= -`hanzibox`是一个用LaTeX3开发的LaTeX宏包,它提供了`\hanzibox`和`\hanzidialog` 两个命令。这两个命令分别用于排版汉字学习中带有或不带田字格、米字格等背景格子的汉字,并可以根据需要在汉字正上方显示拼音,在正下方显示译文。其中,`\hanzibox`命令能够根据汉字自动调用`xpinyin`宏包的`\xpinyin*`命令实现汉字注音。并且`\hanzibox`命令提供了`\hanzibox*`星号版本,其注音功能是通过自动调用`xpinyin`宏包的`\pinyin`命令实现的。`\hanzidialog`命令的注音功能是通过在拼音选项中手动插入`xpinyin`宏包`\pinyin`命令实现的。 +`hanzibox`是一个用LaTeX3开发的LaTeX宏包,它提供了`\hanzibox`、`\hanzidialog` 和`\writegrid`三个个命令。这三个命令分别用于排版汉字学习中带有或不带田字格、米字格等背景格子的汉字,并可以根据需要在汉字正上方显示拼音,在正下方显示译文。其中,`\hanzibox`命令能够根据汉字自动调用`xpinyin`宏包的`\xpinyin*`命令实现汉字注音。并且`\hanzibox`命令提供了`\hanzibox*`星号版本,其注音功能是通过自动调用`xpinyin`宏包的`\pinyin`命令实现的。`\hanzidialog`命令的注音功能是通过在拼音选项中手动插入`xpinyin`宏包`\pinyin`命令实现的。`\writegrid`命令用于排版作文题目的答题格子纸。 `hanzibox` 是一个用于学习汉字书写与发音的工具,可以用于汉字学习教案、演示文稿、习题册等文档工作。 @@ -61,7 +62,7 @@ Contributing Copyright and Licence --------------------- - Copyright (C) 2020-2021 by Nan Geng <nangeng@nwafu.edu.cn> + Copyright (C) 2020-2022 by Nan Geng <nangeng@nwafu.edu.cn> ---------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -100,7 +101,7 @@ Copyright and Licence \preamble - Copyright (C) 2020-2021 by Nan Geng <nangeng@nwafu.edu.cn> + Copyright (C) 2020-2022 by Nan Geng <nangeng@nwafu.edu.cn> -------------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -160,7 +161,7 @@ Copyright and Licence %</internal> %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01] %<package>\RequirePackage{expl3} -%<+package>\GetIdInfo$Id: hanzibox.dtx 2.2.0 2021-10-11 08:00:00 +0800 Nan Geng <nangeng@nwafu.edu.cn> $ +%<+package>\GetIdInfo$Id: hanzibox.dtx 2.3.0 2022-04-17 08:00:00 +0800 Nan Geng <nangeng@nwafu.edu.cn> $ %<package> {Boxed Chinese characters with Pinyin above and translation below.} %<package>\ProvidesExplPackage{\ExplFileName} %<package> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -193,7 +194,7 @@ Copyright and Licence % \changes{v2.0.0}{2021/09/25}{基于l3draw重新设计} % \changes{v2.0.0}{2021/09/28}{重新编写README.md内容} % -% \CheckSum{1222} +% \CheckSum{0} % \GetFileId{hanzibox.sty} % % \CharacterTable @@ -225,13 +226,15 @@ Copyright and Licence % % \begin{abstract} % -% \pkg{hanzibox} 是一个用\LaTeX3开发的 \LaTeX 宏包,它提供了\tn{hanzibox}和\tn{hanzidialog} -% 两个命令。这两个命令用于输出汉字学习中带有或不带田字格、米字格等背景格子的汉字, +% \pkg{hanzibox} 是一个用\LaTeX3开发的 \LaTeX 宏包,它提供 +% 了\tn{hanzibox}、\tn{hanzidialog}和\tn{writegrid}三 +% 个命令。这三个命令用于输出汉字学习中带有或不带田字格、米字格等背景格子的汉字, % 并可以根据需要在汉字正上方显示拼音,在正下方显示译文。 % 其中,\tn{hanzibox}命令能够根据汉字利用\pkg{xpinyin}宏包自动实现汉字注音。 % 同时,\tn{hanzibox}命令还提供了\tn{hanzibox*}星号版本,以实现汉字的手动注音功能。 % \tn{hanzidialog}命令的注音功能则是通过在其拼音选项中手动插入 -% \pkg{xpinyin}宏包的\tn{pinyin}命令实现。 +% \pkg{xpinyin}宏包的\tn{pinyin}命令实现。\tn{writegrid}命令用于排版 +% 作文题目的答题格子纸。 % % \end{abstract} % @@ -316,6 +319,29 @@ Copyright and Licence % \end{SideBySideExample} % \end{function} % +% \subsection{\tn{writegrid}命令} +% +% \begin{function}[added=2022-04-17,updated=2022-04-17]{\writegrid} +% \begin{syntax} +% \tn{writegrid} \oarg{外观选项} \Arg{行数} +% \end{syntax} +% 根据指定的\Arg{行数},用\oarg{外观选项}指定的外观参数和行间距及 +% 列数排版作文题目中的写作格子纸。\\ +% 其中,\oarg{外观选项}用于单个格子盒子外观,但要注意此时, +% \oarg{拼音选项}、\oarg{译文选项}及其相关选项无效。与作文 +% 直接相关的选项有\oarg{gridsepv}用于设置不同格子行的间距, +% \oarg{gridcols}用于设置每行的格子数 +% +% 排版样式可通过\tn{hanziboxset}命令或\tn{writegrid}\oarg{外观选项}的key-value进行设置。 +% +% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.65\linewidth,gobble=5] +% \centering +% \hanziboxset{framecolor=red, +% fillcolor=yellow!30} +% \writegrid{5} +% \end{SideBySideExample} +% \end{function} +% % \subsection{\tn{hanziboxset}命令} % % \begin{function}[added=2021-09-20,updated=2021-09-24]{\hanziboxset} @@ -619,6 +645,30 @@ Copyright and Licence % \end{SideBySideExample} % \end{function} % +% \subsection{作文格式选项} +% +% \begin{function}[added=2022-04-17,updated=2022-04-17]{gridsepv,gridcols} +% \begin{syntax} +% gridsepv = \meta{number} \init{4} +% gridcols = \meta{integer} \init{20} +% \end{syntax} +% \oarg{gridsepv}用于设置作文格子行间间距, +% $\text{行间距}=\text{单个盒子高度}\times\frac{1}{number}$, +% 默认值取4。 +% +% \oarg{gridcols}用于设置格子每行的列数,默认值取20。 +% +% 这两个选项对\tn{hanzibox}和\tn{hanzidialog}命令无效。 +% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.50\linewidth,gobble=5] +% \centering +% \hanziboxset{frametype=咪,framecolor=red, +% charf=\large,fillcolor=yellow!40} +% \writegrid{3}\\ +% \writegrid[gridsepv=0.5,gridcols=10]{3}\\ +% \writegrid[gridsepv=1.0,gridcols=15]{3} +% \end{SideBySideExample} +% \end{function} +% % \changes{v2.0.0}{2021/09/28}{在说明文档中添加应用实例} % \changes{v2.2.0}{2021/10/07}{为部分实例添加拼音四线格} % @@ -749,7 +799,7 @@ Copyright and Licence % % \changes{v2.1.1}{2021/10/07}{在格子纸示例中用coffin实现每行格子以提升编译速度} % -% \subsection{生成汉字书写格子纸} +% \subsection{生成汉字字帖格子纸} % % 可以通过将\tn{hanzibox}命令的\Arg{汉字}参数留空,并设置\verb!tran=false!, % 或将\tn{hanzibox}、\tn{hanzibox*}命令的\verb!hanzi!选项置为 @@ -806,6 +856,18 @@ Copyright and Licence % \ExplSyntaxOff % \end{SideBySideExample} % +% \subsection{生成作文题目格子纸} +% +% 可以使用本宏包提供的\tn{writegrid}命令生成作文题目中用于答题的 +% 格式纸。 +% +% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.48\linewidth,gobble=5] +% \hanziboxset{frametype=口,framecolor=black, +% charcolor=red,charf=\huge} +% \centering +% \writegrid[gridcols=8]{10} +% \end{SideBySideExample} +% % \subsection{生成诗词注音} % % 可以通过自动注音生成带有注音的诗词排版, @@ -995,7 +1057,20 @@ Copyright and Licence \@@_dialog:nnnn { #1 } { #2 } { #3 } { #4 } \group_end: } - +% \end{macrocode} +% \end{macro} +% +% \changes{v2.3.0}{2022/04/17}{添加\tn{writegrid}作文格子输出命令。} +% +% \begin{macro}{\writegrid} +% 自动注音汉字盒子命令。 +% \begin{macrocode} +\NewDocumentCommand{\writegrid}{ O{} m } + { + \group_begin: + \@@_writegrid:nn { #1 } { #2 } + \group_end: + } % \end{macrocode} % \end{macro} % @@ -1007,6 +1082,7 @@ Copyright and Licence % \changes{v2.2.0}{2021/10/07}{添加拼音线开关及拼音和译文颜色变量} % \changes{v2.2.0}{2021/10/08}{添加字符轮廓类型选择变量} % \changes{v2.2.0}{2021/10/09}{添加拼音汉字coffin变量} +% \changes{v2.3.0}{2022/04/17}{添加作文格子垂直间距系数变量及coffin变量。} % % \begin{variable}{\l_@@_autopinyin_bool, % \l_@@_withinitial_bool, @@ -1040,6 +1116,9 @@ Copyright and Licence % \l_@@_pinyin_hanzi_coffin, % \l_@@_tmpa_coffin, % \l_@@_tmpb_coffin, +% \l_@@_grid_coffin, +% \l_@@_grid_tmpa_coffin, +% \l_@@_grid_tmpb_coffin, % \hanziboxwidth, % \hanziboxheight, % \l_@@_pinyin_tl, @@ -1053,10 +1132,12 @@ Copyright and Licence % \l_@@_character_int, % \l_@@_translation_int, % \l_@@_charstroke_type_int, +% \l_@@_grid_cols_int, % \l_@@_tone_int, % \l_@@_pinyin_str, % \l_@@_initial_tl, % \l_@@_vowel_tl, +% \l_@@_grid_sep_v_tl, % } % 定义变量。 % @@ -1096,6 +1177,9 @@ Copyright and Licence \coffin_new:N \l_@@_pinyin_hanzi_coffin \coffin_new:N \l_@@_tmpa_coffin \coffin_new:N \l_@@_tmpb_coffin +\coffin_new:N \l_@@_grid_coffin +\coffin_new:N \l_@@_grid_tmpa_coffin +\coffin_new:N \l_@@_grid_tmpb_coffin \dim_new:N \hanziboxwidth \dim_new:N \hanziboxheight @@ -1111,11 +1195,13 @@ Copyright and Licence \int_new:N \l_@@_character_int \int_new:N \l_@@_translation_int \int_new:N \l_@@_charstroke_type_int +\int_new:N \l_@@_grid_cols_int \int_new:N \l_@@_tone_int \str_new:N \l_@@_pinyin_str \tl_new:N \l_@@_initial_tl \tl_new:N \l_@@_vowel_tl +\tl_new:N \l_@@_grid_sep_v_tl % \end{macrocode} % \end{variable} @@ -1985,6 +2071,25 @@ Copyright and Licence % \end{macrocode} % \end{macro} % +% \changes{v2.3.0}{2022/04/17}{添加作文格子垂直间距gridsepv选项} +% +% \begin{macro}{gridsepv} +% 作文格子垂直间距 +% \begin{macrocode} + gridsepv .tl_set:N = \l_@@_grid_sep_v_tl , + gridsepv .initial:n = 4.0 , +% \end{macrocode} +% \end{macro} +% +% \changes{v2.3.0}{2022/04/17}{添加作文格子列数gridcols选项} +% +% \begin{macro}{gridsepv} +% 作文格子每行列数 +% \begin{macrocode} + gridcols .int_set:N = \l_@@_grid_cols_int , + gridcols .initial:n = 20 , +% \end{macrocode} +% \end{macro} % % 处理未知选项。 % \begin{macrocode} @@ -2378,6 +2483,81 @@ Copyright and Licence % \end{macrocode} % \end{macro} % +% \changes{v2.3.0}{2022/04/17}{添加作文格子内部命令。} +% +% \begin{macro}{\@@_writegrid:nnn} +% 构造作文格子入口 +% \begin{macrocode} +\cs_new:Npn \@@_writegrid:nn #1#2 + { + \group_begin: + \keys_set:nn { hanzibox } { #1 } + + \tl_if_eq:NnT \l_@@_frame_type_tl { none } + { \tl_set:Nn \l_@@_frame_type_tl { 口 } } + + \hcoffin_set:Nn \l_@@_grid_tmpa_coffin + { + \draw_begin: + \draw_linewidth:n { \l_@@_frame_linewidth_dim } + \@@_aux_color_fill: + \color_stroke:n { hanziboxframecolor } + + \draw_path_scope_begin: + \@@_frame_type_c:n { \l_@@_frame_type_tl } + { 0 } { 0 } { \hanziboxwidth } { \hanziboxheight } { 1.0 } { 1.0 } + \int_decr:N \l_@@_grid_cols_int + \int_step_inline:nn { \l_@@_grid_cols_int } + { + \draw_transform_shift:n {\hanziboxwidth, 0.0 } + \@@_frame_type_c:n { \l_@@_frame_type_tl } + { 0 } { 0 } { \hanziboxwidth } { \hanziboxheight } { 1.0 } { 1.0 } + } + \draw_path_scope_end: + \draw_end: + } + + \hcoffin_set:Nn \l_@@_grid_tmpb_coffin + { + \coffin_typeset:Nnnnn \l_@@_grid_tmpa_coffin + { l } { b } { 0pt } { 0pt } + } + + \int_step_inline:nn { #2 - 1 } + { + \coffin_join:NnnNnnnn \l_@@_grid_tmpb_coffin { hc } { b } + \l_@@_grid_tmpa_coffin { hc } { t } { 0pt } + { -\hanziboxheight * \dim_ratio:nn { 1 pt }{ \l_@@_grid_sep_v_tl pt } } + } + + \dim_set:Nn \l_tmpa_dim + { + \coffin_wd:N \l_@@_grid_tmpb_coffin + } + \dim_set:Nn \l_tmpb_dim + { + \tex_dimexpr:D \coffin_ht:N \l_@@_grid_tmpb_coffin + + \coffin_dp:N \l_@@_grid_tmpb_coffin \scan_stop: + } + + \draw_begin: + \draw_linewidth:n { \l_@@_frame_linewidth_dim * 4 } + \@@_aux_color_fill: + \color_stroke:n { hanziboxframecolor } + + \draw_path_scope_begin: + \draw_path_rectangle_corners:nn { 0cm , 0cm } { \l_tmpa_dim, \l_tmpb_dim } + \draw_path_use_clear:n { draw } + \draw_transform_shift:n {\l_tmpa_dim / 2.0, \l_tmpb_dim / 2.0 } + \draw_coffin_use:Nnn \l_@@_grid_tmpb_coffin { hc } { vc } + \draw_path_scope_end: + \draw_end: + + \group_end: + } +% \end{macrocode} +% \end{macro} +% % \changes{v2.0.0}{2021/09/27}{对于无需分解声韵母的情况, % 直接使用xpinyin宏包的结果排版拼音。} % diff --git a/macros/xetex/latex/hanzibox/hanzibox.pdf b/macros/xetex/latex/hanzibox/hanzibox.pdf Binary files differindex d6711355a7..683ba00a51 100644 --- a/macros/xetex/latex/hanzibox/hanzibox.pdf +++ b/macros/xetex/latex/hanzibox/hanzibox.pdf |