diff options
Diffstat (limited to 'macros/latex')
41 files changed, 857 insertions, 1028 deletions
diff --git a/macros/latex/contrib/acrotex-js/README.md b/macros/latex/contrib/acrotex-js/README.md index 2a2bb095aa..90c06a1c77 100644 --- a/macros/latex/contrib/acrotex-js/README.md +++ b/macros/latex/contrib/acrotex-js/README.md @@ -1,6 +1,6 @@ The acrotex-js Package Author: D. P. Story -Dated: 2021-06-18 +Dated: 2021-06-19 In the distribution of this package are two critical JavaScript files (aeb.js and aeb_pro.js) used by the packages insdljs, aeb_pro, thorshammer, and @@ -8,6 +8,8 @@ docassembly. Previously these JS files where distributed with the individual packages, now they are distributed by this package and must be installed according to the instructions in the docs folder. +What's New (2021-06-19) Move certain files from other packages: + acrobat-in-workflow.pdf and test_install.pdf dps diff --git a/macros/latex/contrib/acrotex-js/acrotex-js.dtx b/macros/latex/contrib/acrotex-js/acrotex-js.dtx index 950d7cb6a5..cf9af1fa08 100644 --- a/macros/latex/contrib/acrotex-js/acrotex-js.dtx +++ b/macros/latex/contrib/acrotex-js/acrotex-js.dtx @@ -14,7 +14,7 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01] %<package>\ProvidesPackage{acrotex-js} -%<package> [2021/06/18 v1.0 acrotex-js: A library of JavaScript files (dps)] +%<package> [2021/06/19 v1.1 acrotex-js: A library of JavaScript files (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -54,7 +54,7 @@ % \MakeShortVerb{|} % \InputIfFileExists{aebdonotindex.def}{\PackageInfo{web}{Inputting aebdonotindex.def}} % {\PackageInfo{web}{cannot find aebdonotindex.def}} -% \section*{Commentary} +% \section{Commentary} % This file is a dummy {\LaTeX} package. The output of \pkg{acrotex-js} produces no document % that is consumed by any {\LaTeX} engine. At the time of first publication of this ``package'' % distributes the JavaScript files \texttt{aeb.js} and \texttt{aeb\_pro.js} (found in the @@ -74,6 +74,20 @@ % In all cases, the JS files must be correctly installed for the above packages for them to perform as designed. % Refer to \texttt{docs/install\_jsfiles.pdf} for installation instructions. % +% \paragraph*{Files of this distribution.} +% \begin{itemize} +% \item Root-level folder: \texttt{acrotex-js.dtx}, \texttt{acrotex-js.ins}, \texttt{README.md} +% \item \texttt{docs} folder: \texttt{acrotex-js.pdf} (documentation), \texttt{install\_jsfile.pdf} +% (installation instructions, and +% \texttt{acrobat-in-workflow.pdf} (commentary on using \app{Acrobat} in your workflow). +% \item \texttt{js-files}: \texttt{aeb.js}, \texttt{aeb\_pro.js} (These are the JS files to be installed, +% follow the instructions of \texttt{install\_jsfile.pdf} in the \texttt{docs} folder. +% \item \texttt{js-test}: \texttt{test\_install.pdf} (After installing the JS files, test whether you've +% understood and following the instructions correctly, open this file in \app{Acrobat} and follow instructions +% contained therein.) +% \end{itemize} +% \changes{v1.1}{2021/06/19}{Moved \string\texttt{test\_install.pdf} and \string\texttt{acrobat-in-workflow.pdf} +% to this package from others} % \changes{v1.0}{2021/06/18}{First publication version} % \begin{macrocode} %<*package> diff --git a/macros/latex/contrib/acrotex/doc/acrobat-in-workflow.pdf b/macros/latex/contrib/acrotex-js/docs/acrobat-in-workflow.pdf Binary files differindex 48751ef44d..4dc7dda74d 100644 --- a/macros/latex/contrib/acrotex/doc/acrobat-in-workflow.pdf +++ b/macros/latex/contrib/acrotex-js/docs/acrobat-in-workflow.pdf diff --git a/macros/latex/contrib/acrotex/doc/acrobat-in-workflow.tex b/macros/latex/contrib/acrotex-js/docs/acrobat-in-workflow.tex index c5449528a0..453806f856 100644 --- a/macros/latex/contrib/acrotex/doc/acrobat-in-workflow.tex +++ b/macros/latex/contrib/acrotex-js/docs/acrobat-in-workflow.tex @@ -1,7 +1,7 @@ \RequirePackage[!use=preview,!use=efpmca,!use=usebw,!use=finalbuild]{spdef} \documentclass{article} \usepackage[fleqn]{amsmath} -\usepackage[web,useacrobat]{aeb_pro} +\usepackage[web={designv,forcolorpaper},useacrobat]{aeb_pro} \usepackage{eforms} \usepackage{graphicx} \usepackage{fancyvrb} @@ -229,5 +229,10 @@ the FDF file that contains its contents. \app{Acrobat} inputs this command on opening and the PDF is saved.\footnote{\cs{executeSave} must be the last post PDF creation action; otherwise, as later actions may not be executed.} +\paragraph*{The \pkg{docassembly} package.} This package uses the post PDF creation actions +described above, but is a stand alone package and is available to all {\LaTeX} workflows who own +the \app{Acrobat} application. The \pkg{docassembly} package defines the +\env{docassembly} environment and supports the same functionality of as {\AEBP}. The \pkg{docassembly} +package may be downloaded from CTAN at \url{https://ctan.org/pkg/docassembly}. \end{document} diff --git a/macros/latex/contrib/acrotex-js/docs/acrotex-js.pdf b/macros/latex/contrib/acrotex-js/docs/acrotex-js.pdf Binary files differindex fd3da4b47d..a26c51bf7c 100644 --- a/macros/latex/contrib/acrotex-js/docs/acrotex-js.pdf +++ b/macros/latex/contrib/acrotex-js/docs/acrotex-js.pdf diff --git a/macros/latex/contrib/acrotex-js/docs/install_jsfiles.tex b/macros/latex/contrib/acrotex-js/docs/install_jsfiles.tex index bae522243b..0d8c389ccb 100644 --- a/macros/latex/contrib/acrotex-js/docs/install_jsfiles.tex +++ b/macros/latex/contrib/acrotex-js/docs/install_jsfiles.tex @@ -6,7 +6,6 @@ % \usepackage[web]{aeb_pro} \usepackage{eforms} -\usepackage[altbullet]{lucidbry} \usepackage{pifont} \usepackage{fancyvrb} diff --git a/macros/latex/contrib/acrotex-js/js-test/test_install.pdf b/macros/latex/contrib/acrotex-js/js-test/test_install.pdf Binary files differnew file mode 100644 index 0000000000..c2b92f2565 --- /dev/null +++ b/macros/latex/contrib/acrotex-js/js-test/test_install.pdf diff --git a/macros/latex/contrib/acrotex-js/js-test/test_install.tex b/macros/latex/contrib/acrotex-js/js-test/test_install.tex new file mode 100644 index 0000000000..72af3a51e8 --- /dev/null +++ b/macros/latex/contrib/acrotex-js/js-test/test_install.tex @@ -0,0 +1,74 @@ +\documentclass{article} +\usepackage[designv]{web} +\usepackage{eforms} + +\ifpdf\def\x{% + \usepackage[T1]{fontenc} + \usepackage[altbullet]{lucidabr}} + \let\copyright\textcopyright +\else\def\x{% + \usepackage[altbullet]{lucidbry}} + \usepackage[active]{srcltx} +\fi\x + +\let\pkg\textsf + +\begin{defineJS}{\isImportAnFDFKnown} +console.clear(); console.show(); +if ( typeof aebImportAnFDF == "function" ) { + app.beep(0); + console.println(""); + console.println("aeb.js is successfully installed, congratulations!"); + console.println("You're ready to Rock with AcroTeX!"); +} else { + app.beep(0); app.beep(0); + console.println("aeb.js is not, repeat NOT, installed correctly!"); +} +\end{defineJS} +\begin{defineJS}{\isAddWatermarkFromFileKnown} +if ( typeof aebAddWatermarkFromFile == "function" ) { + app.beep(0); + console.println(""); + console.println("aeb_pro.js is successfully installed, congratulations!"); + console.println("You're ready to Rock with AcroTeX Pro, ho, ho!"); +} else { + app.beep(0); app.beep(0); + console.println("aeb_pro.js is not, repeat NOT, installed correctly!"); +} +\end{defineJS} + +\thispagestyle{empty} +\parindent0pt\parskip6pt + +\begin{document} +\begin{center}\bfseries + Testing the \pkg{AeB} and \pkg{AeB Pro} Installation +\end{center} + +This file is used to test for proper installation of \texttt{aeb.js} and +\texttt{aeb\_pro.js}. After following the instructions of +\texttt{js-files/install\_jsfiles.pdf} of the \pkg{acrotex-js} distribution, +test the installation by pressing the push buttons below. + + +To test the \textsf{AeB} installation, press this button: +\pushButton[\TU{Press to test the AeB installation}\CA{AeB}\A{\JS{\isImportAnFDFKnown}}]{btnTest}{}{11bp} + +To test the \textsf{AeB Pro} installation, press this button: +\pushButton[\TU{Press to test the AeB Pro installation}\CA{AeB Pro}\A{\JS{\isAddWatermarkFromFileKnown}}]{btnTest}{}{11bp} + +Congratulations if a successful installation is indicated. + +On failure, did you close \textsf{Acrobat} before opening this file? (The JS +files are only read once when the \textsf{Acrobat} application is opened.) +When all else fails, try rereading the installation instructions again +(\texttt{install\_jsfiles.pdf}), found in the \texttt{docs} folder of the \pkg{acrotex-js} package, but more +carefully this time. + +Still failing? Do you have \textsf{Acrobat DC}? Perhaps your \textsf{Acrobat} +needs to be configured. Try reading \texttt{acrobat-in-workflow.pdf}, found +in the \texttt{docs} folder of the \pkg{acrotex-js} package. + + + +\end{document} diff --git a/macros/latex/contrib/acrotex/README.md b/macros/latex/contrib/acrotex/README.md index 0b8915e7ff..08fe58aad6 100644 --- a/macros/latex/contrib/acrotex/README.md +++ b/macros/latex/contrib/acrotex/README.md @@ -1,6 +1,6 @@ The AcroTeX eDucation Bundle (AeB) Author: D. P. Story -Dated: 2021-05-29 +Dated: 2021-06-19 AeB contains the following: @@ -19,6 +19,11 @@ AeB contains the following: 6) Documentation for AeB (AcroTeX eDucatation Bundle) and eforms (including insdljs and dljslib). +What's New (2021-06-19) Move files out of this distribution to the + acrotex-js package, dated 2021/06/19 or later. The folder JavaScript + file aeb.js (and aeb_pro.js) are now distributed with acrotex-js. Installation + instructions are now included with that package. + What's New (2021-05-29) exerquiz: Internal changes to Begin Quiz and End Quiz actions to support eq-pin2corr package. Exerquiz now tracks duplication quiz names. diff --git a/macros/latex/contrib/acrotex/aeb.js b/macros/latex/contrib/acrotex/aeb.js deleted file mode 100644 index 09310d2e40..0000000000 --- a/macros/latex/contrib/acrotex/aeb.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - AEB Import FDF Methods - - Copyright (C) 2006--2016 AcroTeX.Net - D. P. Story - http://www.acrotex.net - - Version 1.0 -*/ -if ( typeof aebTrustedFunctions == "undefined") { - aebTrustedFunctions = app.trustedFunction( function ( doc, oFunction, oArgs ) - { - app.beginPriv(); - var retn = oFunction( oArgs, doc ) - app.endPriv(); - return retn; - }); -} -aebImportAnFDF = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - doc.importAnFDF(oArgs); - app.endPriv(); -}); diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.pdf b/macros/latex/contrib/acrotex/doc/aeb_man.pdf Binary files differindex d107b43e59..86e9159d5e 100644 --- a/macros/latex/contrib/acrotex/doc/aeb_man.pdf +++ b/macros/latex/contrib/acrotex/doc/aeb_man.pdf diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.tex b/macros/latex/contrib/acrotex/doc/aeb_man.tex index 9276c3cfdb..29337b17a0 100644 --- a/macros/latex/contrib/acrotex/doc/aeb_man.tex +++ b/macros/latex/contrib/acrotex/doc/aeb_man.tex @@ -243,10 +243,10 @@ \university{{\AcroT} Software Development Team} \email{dpstory@acrotex.net} \versionLabel{Dated:} -\version{2021/05/29} +\version{2021/06/19} \copyrightyears{1999-\the\year} \nocopyright -\prepared{2021/05/29} +\prepared{2021/06/19} \revisionLabel{Distribution Dated:} \copyrightStatus{True} @@ -477,9 +477,10 @@ instructions on how to get up and running. \section{Getting Started}\label{s:start} The distribution for the {\cAcroB} comes in a single ZIP file - \texttt{acrotex.zip}. This ZIP file contains program files - (\pkg{web}, \pkg{exerquiz}, \pkg{eforms}, \pkg{insdljs}, - \pkg{dljslib}, \pkg{taborder}, and \texttt{aeb.js}), this manual, and the + \texttt{acrotex.zip}.\footnote{Must modern {\TeX} have a mechanism for downloading and installing packages; consequently, + the ZIP file may ever been seen.} This ZIP file contains program files + (\pkg{web}, \pkg{exerquiz}, \pkg{eforms}, \pkg{insdljs}, \pkg{dljslib}, + and \pkg{taborder}), this manual, and the \href{eformman.pdf}{\pkg{eforms}} reference manual (\texttt{\href{\bUrl/eformman.pdf}{eformman.pdf}}). @@ -577,8 +578,19 @@ discuss the use of \app{Acrobat}, first to install the folder JavaScript file \subsubsection{Installing \texttt{aeb.js}} The JavaScript file \texttt{aeb.js} is only needed if you use the workflow of -\hyperref[eq:AcrobatWF]{display~\begin{NoHyper}\eqref{eq:AcrobatWF}\end{NoHyper}} -and \uif{Document JavaScripts} are needed to be embedded. +\hyperref[eq:AcrobatWF]{display~\begin{NoHyper}\eqref{eq:AcrobatWF}\end{NoHyper}} (page~\pageref{eq:AcrobatWF}) +and if \uif{Document JavaScripts} are needed in the document.\footnote{\pkg{exerquiz} makes heavy use of \uif{Document JavaScripts}} + +The JavaScript file \texttt{aeb.js} used to be distributed by the +\pkg{acrotex} package (\AEB), now it is available through the +\pkg{\href{https://ctan.org/pkg/acrotex-js}{acrotex-js}} +package, dated 2021/06/19 or later.\footnote{\url{https://ctan.org/pkg/acrotex-js}} Some {\TeX} systems +automatically download required packages, if that is so for your system, +\pkg{acrotex-js} may be already on your system. Find the folder containing +the \pkg{acrotex-js} distribution to locate the \texttt{aeb.js} file. Under +the \texttt{docs} folder of the distribution, find and read the file +\texttt{install\_jsfiles.pdf} for instructions on how to install +\texttt{aeb.js}. Increased security for the \app{Acrobat} application makes it necessary to install a folder JavaScript file. The JavaScript within \texttt{aeb.js} @@ -589,24 +601,14 @@ installation of this file is not needed if you use \app{pdftex}, \app{lualatex}, or \app{xelatex} (or any of its variants), or if you use a version of \app{Acrobat} prior to version 8.1. -The instructions for installing \texttt{aeb.js} are in the -\texttt{\href{install_jsfiles.pdf}{install\_jsfiles.pdf}}, which resides in -the \texttt{doc} folder of the \texttt{acrotex} installation. if you use the workflow of -\hyperref[eq:AcrobatWF]{display~\begin{NoHyper}\eqref{eq:AcrobatWF}\end{NoHyper}}, please refer to that document. - -After you've installed the JavaScript file, as directed by the -\texttt{\href{install_jsfiles.pdf}{install\_jsfiles.pdf}}, validate the -installation of the JavaScript files by navigating to the \texttt{examples} -subfolder and opening the file \texttt{test\_install.pdf} in \app{Acrobat}; -follow the directions contained on that one page document. - \subsubsection{Configuring \tops{\app}{}{Acrobat}} -If you have \app{Acrobat DC} that was purchased or updated after December 2020, -\app{Acrobat} needs to be configured for the workflow +If you have \app{Acrobat DC} that was purchased or updated after December +2020, \app{Acrobat} needs to be configured for the workflow \hyperref[eq:AcrobatWF]{display~\begin{NoHyper}\eqref{eq:AcrobatWF}\end{NoHyper}} to function correctly. For detailed discussion, refer to the document -\texttt{\href{acrobat-in-workflow.pdf}{acrobat-in-workflow.pdf}}. +\texttt{acrobat-in-workflow.pdf}, available from the \pkg{acrotex-js} +package. \subsection{Language Localizations} diff --git a/macros/latex/contrib/acrotex/doc/eformman.tex b/macros/latex/contrib/acrotex/doc/eformman.tex index de094e1492..7ad44ef209 100644 --- a/macros/latex/contrib/acrotex/doc/eformman.tex +++ b/macros/latex/contrib/acrotex/doc/eformman.tex @@ -1163,7 +1163,7 @@ package \textsf{aeb\_pro}, and the following \texttt{docassembly} code: \begin{Verbatim}[xleftmargin=\amtIndent] \begin{docassembly} -\signInfo{ +\sigInfo{ cSigFieldName: "mySig", ohandler: security.PPKLiteHandler, cert: "D_P_Story.pfx", password: "dps017", oInfo: { location: "Niceville, FL", diff --git a/macros/latex/contrib/acrotex/doc/install_jsfiles.pdf b/macros/latex/contrib/acrotex/doc/install_jsfiles.pdf Binary files differdeleted file mode 100644 index 7b2d3fab78..0000000000 --- a/macros/latex/contrib/acrotex/doc/install_jsfiles.pdf +++ /dev/null diff --git a/macros/latex/contrib/acrotex/doc/install_jsfiles.tex b/macros/latex/contrib/acrotex/doc/install_jsfiles.tex deleted file mode 100644 index 5639318335..0000000000 --- a/macros/latex/contrib/acrotex/doc/install_jsfiles.tex +++ /dev/null @@ -1,312 +0,0 @@ -\documentclass{article} -\usepackage[fleqn]{amsmath} -% -% the driver line is not necessary if you -% have aebpro.cfg configured to your driver. -% -\usepackage[web]{aeb_pro} -\usepackage{eforms} -\usepackage[altbullet]{lucidbry} -\usepackage{pifont} - -\usepackage{fancyvrb} - -\makeatletter -\renewcommand{\paragraph} - {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt} - {\normalfont\normalsize\bfseries}} -\renewcommand{\subparagraph} - {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}% - {\normalfont\normalsize\bfseries}} -\makeatother - -\mathindent\parindent - -\def\AEBP{\app{AeB Pro}} -\def\AEB{\app{AeB}} -\def\app#1{\textsf{#1}} -\def\amtIndent{\parindent} -\def\meta#1{$\langle\textit{\texttt{#1}}\rangle$} -\def\SC#1{{\small#1}} -\def\PDF{\SC{PDF}} -\let\opt\texttt - -\def\copyGetPath{\qquad\pushButton[\TU{Copy app.getPath to console} -\CA{getPath}\A{\JS{console.show();\r -console.println('\\napp.getPath("user");'); -}}]{cpyGtPth}{}{11bp}} - -\def\copyGetPathJS{\qquad\pushButton[\TU{Copy app.getPath to console} -\CA{getPath}\A{\JS{console.show();\r -console.println('\\napp.getPath("user", "javascript");'); -}}]{cpyGtPthJS}{}{11bp}} - -%\reversemarginpar -\def\jsSupInstr{How to install JavaScript support files} -\title{\jsSupInstr} -\author{D. P. Story} -\version{1.0} - -\chngDocObjectTo{\newDO}{doc} -\begin{docassembly} -var titleOfManual="How to install JavaScript files"; -var manualfilename="Manual_BG_Print_jsfiles.pdf"; -var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown -var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate; -var doc; -var buildIt=true; -if ( buildIt ) { - console.println("Creating new " + manualfilename + " file."); - doc = \appopenDoc({cPath: _pathToBlank, bHidden: true}); - var _path=this.path; - var pos=_path.lastIndexOf("/"); - _path=_path.substring(0,pos)+"/"+manualfilename; - \docSaveAs\newDO ({ cPath: _path }); - doc.closeDoc(); - doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true}); - f=doc.getField("ManualTitle"); - f.value=titleOfManual; - doc.flattenPages(); - \docSaveAs\newDO({ cPath: manualfilename }); - doc.closeDoc(); -} else { - console.println("Using the current "+manualfilename+" file."); -} -var _path=this.path; -var pos=_path.lastIndexOf("/"); -_path=_path.substring(0,pos)+"/"+manualfilename; -\addWatermarkFromFile({ - bOnTop:false, - bOnPrint:false, - cDIPath:_path -}); -\executeSave(); -\end{docassembly} - -\begin{document} - -\maketitle - -\section{Introduction} - -Because some of the \app{Acrobat} JavaScript methods have security -restrictions, they can be only executed in the console window, or as part -of a batch sequence, or from the JavaScript folder reserved by -\app{Acrobat} for that use. The developer (of {\LaTeX} packages or {\PDF} -form documents) may want to use these restricted JavaScript methods as -part of document assembly. To use the restricted methods, they must be -called from the user JavaScript folder. The scripts are contained in a -\SC{JS} file that \app{Acrobat} reads when it first starts up. - -In this article, we provide detailed steps for locating the user -JavaScript folder. For {\AEB} and {\AEBP}, the files \texttt{aeb.js} and -\texttt{aeb\_pro.js} are placed in the folder. Other JavaScript files may -be placed in the folder as well, for example, the \texttt{config.js} file -is one that is commonly used for general purposes. - -Before we get started, if you are using a version of \app{Acrobat} prior -to version~8.1, you need not read any further. The security restrictions -described below were not in effect for those versions. - -\section{Installing the JavaScript support files} - -The functionality of {\AEB} and {\AEBP} depends, to some extent, on the -proper installation of their JavaScript support files. -\begin{itemize} - \item \AEB: For authors using the $\app{dvips}+\app{Acrobat Distiller}$ - workflow, \texttt{aeb.js} is required; this file is not used by - \app{pdflatex} or \app{xelatex} users. - - \item \AEBP: For authors using the $\app{dvips}+\app{Acrobat - Distiller}$ workflow, \texttt{aeb\_pro.js} is required; for authors - that prefer \app{pdflatex}, \app{lualatex}, or \app{xelatex} as the - {\PDF} creator \emph{and who own} the \app{Acrobat} application, - the \texttt{aeb\_pro.js} is required with the \opt{useacrobat} - option of \AEBP. When using the \opt{nopro} option of \AEBP, the - JavaScript file \texttt{aeb\_pro.js} is not used. - -\end{itemize} -The placement of the JavaScript files has changed over the years and is a -function of the version number \meta{ver}. Start \app{Acrobat} and open the -console debugger window by pressing \texttt{Ctrl+J} (for \app{Windows OS}) -or \texttt{Cmd+J} (for \app{Mac OS}). Now execute the code -\texttt{app.getPath("user")} in the console window. To do this, press the -\textsf{getPath} button provided below, which copies the necessary code to -the console window. -\begin{equation} -\begin{minipage}{.8\linewidth} -\begin{Verbatim}[commandchars={!~@}] -app.getPath("user");!copyGetPath -\end{Verbatim} -\end{minipage}\label{display:getPath} -\end{equation} -Now, with the cursor on the line containing the script, press the -\texttt{Ctrl+Enter} (for \app{Windows OS}) or \texttt{Cmd+Enter} (for -\app{Mac~OS}) key. This will execute the JavaScript and return the `root' -path to the user's application data for \app{Acrobat}. - -The rest of the instructions depend on your operating system, -\app{Windows} or \app{Mac}. - -\subsection{For users of \app{Windows OS}} - -There are several cases, jump to the numbered paragraph that describes your -version (\meta{ver}) of \app{Acrobat}. - -%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/11.0 -%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/Privileged/11.0/JavaScripts - -\def\Stepi{\ding{182}\enspace} -\def\Stepii{\ding{183}\enspace} -\def\Stepiii{\ding{184}\enspace} - -\paragraph*{{\Stepi}For $\boldmath\text{\meta{ver}}$, $\boldmath 8.1 \le -\text{\meta{ver}} < 10.1.1$.} For the \app{Windows OS}, executing the script -in display~\eqref{display:getPath} returns a string of the -form:\footnote{This string is for \app{Windows OS} beyond \app{WinXP}.} -\begin{equation} -\begin{minipage}{.8\linewidth} -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/!meta(ver) -\end{Verbatim} -\end{minipage}\label{display:path} -\end{equation} -Navigate to this folder location. The correct location for the \SC{JS} -files is in the \texttt{JavaScripts} subfolder. If the folder does not -exist, create it. The final path for the JavaScript support files is then -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/!meta(ver)/JavaScripts -\end{Verbatim} -Finally, copy \texttt{aeb.js} (and \texttt{aeb\_pro.js}, if applicable) -into this folder. Close \app{Acrobat}, the next time \app{Acrobat} -is started, it will read in the \SC{JS} files. - -\paragraph*{{\Stepii}For $\boldmath\text{\meta{ver}}$, $\boldmath10.1.1 \le -\text{\meta{ver}} < 12$.} For these versions of \app{Acrobat} security has -have tightened up even more; the \texttt{JavaScripts} folder is now a -subfolder of a special \texttt{Privileged} folder. Execute -\texttt{app.getPath("user")} in the console window, as in -display~\eqref{display:getPath}. The method brings back a string similar to -the one in display~\eqref{display:path}. The correct path is obtained by -simply inserting \texttt{Privileged} into the path in -display~\eqref{display:path}, between \texttt{Acrobat} and \meta{ver}, as -displayed below. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/!textbf(Privileged)/!meta(ver)/JavaScripts -\end{Verbatim} -But this is a mere description of the correct location, the path must -exist! The path must be created, if it does not already exist. - -Navigate to the folder, one folder above the path shown in -display~\eqref{display:path}, that is, navigate to, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/ -\end{Verbatim} -If a \texttt{Privileged} folder exists, enter into it; otherwise, create -it, then enter it. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/Privileged -\end{Verbatim} -Now create a folder named \meta{ver}, unless it already exists, and enter -it. The version is always the major release \texttt{8.0}, \texttt{9.0}, -\texttt{10.0}, or \texttt{11.0}. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/Privileged/!meta(ver) -\end{Verbatim} -Finally, create the \texttt{JavaScript} folder, unless it already exists, -to obtain the final path to the user folder JavaScripts: -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/Privileged/!meta(ver)/JavaScripts -\end{Verbatim} -Copy \texttt{aeb.js} (and \texttt{aeb\_pro.js}, if applicable) into this -folder. Close \textsf{Acrobat}, the next time \textsf{Acrobat} is started, -it will read in the \SC{JS} files. - -\paragraph*{{\Stepiii}For $\boldmath\text{\meta{ver}}$, $\boldmath -\text{\meta{ver}} > 12 $.} Beginning with the next major version following -version~11, Adobe changed its versioning scheme. There are now two tracks, -\emph{subscription} and \emph{classic} (also called \emph{perpetual}). For -subscription, the version, as I understand it, will always be \texttt{DC} -(Document Cloud), and for the classic, for which you've purchased a -\emph{perpetual license}, the \meta{ver} is a calendar year. The first -classic version is \texttt{2015}, the next one is most likely \texttt{2017}, -since major releases occur about every two years. - -Execute the code of display~\eqref{display:getPath} by pressing the button -provided to obtain a path of the form, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/DC -\end{Verbatim} -for the subscription license or, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/2015 -\end{Verbatim} -for the classic (or perpetual) license. Of course, this last path is for -the first classic version. - -Now, to obtain the path to the \texttt{JavaScripts} folder, follow the -instructions for numbered paragraph \ding{183}, but with \meta{ver} equal -to either \texttt{DC} or \texttt{2015} (a calendar year). - -%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/Privileged/11.0/JavaScripts - -\subsection{For users of \app{Mac OS}} - -\app{Mac OS} does not have the security restrictions that \app{Windows OS} -does, as described in paragraphs \ding{183} and \ding{184}. - -Follow the instructions of paragraph \ding{182}, by first pressing the button -provided in display~\eqref{display:getPath}, then, in the console window, -execute this script as described in the paragraph following -display~\eqref{display:getPath}. After working through \ding{182}, one -obtains any of the following paths depending on the version (\meta{ver}) you -are using:\medskip - -\noindent -For $\text{\meta{ver}} = \texttt{8.0}, \texttt{9.0}, \texttt{10.0}, -\texttt{11.0}$: -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/!meta(ver)/JavaScripts -\end{Verbatim} -\medskip - -\noindent -For $\text{\meta{ver}} > 12$, the path is, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/DC/JavaScripts -\end{Verbatim} -for a subscription license, and, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/2015/JavaScripts -\end{Verbatim} -or more generally, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/!meta(year)/JavaScripts -\end{Verbatim} -for the perpetual license. - -In all cases, if the \texttt{JavaScripts} folder does not exist, it must -be created. Copy any \SC{JS} support files into the \texttt{JavaScripts} -folder. The script files are read the next time \app{Acrobat} is started. - -\section{Testing the placement of the JavaScript support files} - -Assuming you have successfully followed the instructions and created the -\texttt{JavaScripts} folder, test the validity of what you have done by -closing \app{Acrobat} then opening it again. Open the console window -(\texttt{Ctrl+J} or \texttt{Cmd+J}, for \app{Mac OS}) and execute this -command in the console window: -\begin{Verbatim}[xleftmargin=\amtIndent,commandchars={!~@}] -app.getPath("user","javascript");!quad!copyGetPathJS -\end{Verbatim} -If you have followed the instructions, the return string should read the -complete path to the \texttt{JavaScripts} folder. -\end{document} diff --git a/macros/latex/contrib/acrotex/examples/README.md b/macros/latex/contrib/acrotex/examples/README.md index 4157ef8c09..b54082edbe 100644 --- a/macros/latex/contrib/acrotex/examples/README.md +++ b/macros/latex/contrib/acrotex/examples/README.md @@ -24,4 +24,4 @@ The AcroTeX Blog (http://www.acrotex.net/blog/) is a great resource for all thin AeB and PDF. Don Story -2019/12/17 +2021-06-19 diff --git a/macros/latex/contrib/acrotex/examples/jquiztst.pdf b/macros/latex/contrib/acrotex/examples/jquiztst.pdf Binary files differindex 39f0d58d02..3e8294ea9f 100644 --- a/macros/latex/contrib/acrotex/examples/jquiztst.pdf +++ b/macros/latex/contrib/acrotex/examples/jquiztst.pdf diff --git a/macros/latex/contrib/acrotex/examples/jtxttst.pdf b/macros/latex/contrib/acrotex/examples/jtxttst.pdf Binary files differindex 9af5055e92..626f437c86 100644 --- a/macros/latex/contrib/acrotex/examples/jtxttst.pdf +++ b/macros/latex/contrib/acrotex/examples/jtxttst.pdf diff --git a/macros/latex/contrib/acrotex/examples/test_install.pdf b/macros/latex/contrib/acrotex/examples/test_install.pdf Binary files differdeleted file mode 100644 index 5a4d85c095..0000000000 --- a/macros/latex/contrib/acrotex/examples/test_install.pdf +++ /dev/null diff --git a/macros/latex/contrib/acrotex/examples/test_install.tex b/macros/latex/contrib/acrotex/examples/test_install.tex deleted file mode 100644 index b501c92838..0000000000 --- a/macros/latex/contrib/acrotex/examples/test_install.tex +++ /dev/null @@ -1,43 +0,0 @@ -\documentclass{article} -\usepackage[designiv]{web} -\usepackage{eforms} - -\begin{defineJS}{\isImportAnFDFKnown} -console.clear(); console.show(); -if ( typeof aebImportAnFDF == "function" ) { - app.beep(0); - console.println("aeb.js is successfully installed, congratulations!"); - console.println("\\nYou're ready to Rock with AcroTeX!"); -} else { - app.beep(0); app.beep(0); - console.println("aeb.js is not, repeat NOT, installed correctly!"); -} -\end{defineJS} - -\thispagestyle{empty} -\parindent0pt\parskip6pt - -\begin{document} - -This is a file to test your \textsf{AeB} installation. - -To test the \textsf{AeB} installation, press this button: -\pushButton[\CA{Test AeB}\A{\JS{\isImportAnFDFKnown}}]{btnTest}{}{11bp} - -Upon pressing the button, if you have installed the \texttt{aeb.js} file -correctly, a congratulatory message appears in the console window; if the -installation is not correct, a message informs you so. - -On failure, did you close \textsf{Acrobat} before opening this file? (The JS -files are only read once when the \textsf{Acrobat} application is opened.) -When all else fails, try rereading the installation instructions again -(\texttt{install\_jsfiles.pdf}), found in the \texttt{doc} folder, but more -carefully this time. - -Still failing? Do you have \textsf{Acrobat DC}? Perhaps your \textsf{Acrobat} -needs to be configured. Try reading \texttt{acrobat-in-workflow.pdf}, found -in the \texttt{doc} folder. - - - -\end{document} diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.pdf b/macros/latex/contrib/acrotex/examples/webeqtst.pdf Binary files differindex bffc715f5e..5c70119e6c 100644 --- a/macros/latex/contrib/acrotex/examples/webeqtst.pdf +++ b/macros/latex/contrib/acrotex/examples/webeqtst.pdf diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.tex b/macros/latex/contrib/acrotex/examples/webeqtst.tex index 2e3c59b907..8080e497e7 100644 --- a/macros/latex/contrib/acrotex/examples/webeqtst.tex +++ b/macros/latex/contrib/acrotex/examples/webeqtst.tex @@ -74,7 +74,6 @@ \tableofcontents - \section{Introduction} This is a sample file to give templates of the environments diff --git a/macros/latex/contrib/acrotex/exerquiz.dtx b/macros/latex/contrib/acrotex/exerquiz.dtx index 8dc8ce02c5..51a44283e2 100644 --- a/macros/latex/contrib/acrotex/exerquiz.dtx +++ b/macros/latex/contrib/acrotex/exerquiz.dtx @@ -4981,12 +4981,12 @@ if (typeof !oField=="undefined") % \end{macrocode} % (2021/05/21) Added a gate keeper into \uif{Begin Quiz}. Normally, all code % passes through, but this can be modified by redefining \DescribeMacro\BeginQuizG@te -% \cs{BeginQuizG@te}; restore any changes with \DescribeMacro\restorBeginQuiz -% \cs{restorBeginQuiz}. +% \cs{BeginQuizG@te}; restore any changes with \DescribeMacro\restoreBeginQuiz +% \cs{restoreBeginQuiz}. % \begin{macrocode} \newcommand{\BeginQuizG@te}{if (true)} \def\Norm@lBeginQuiz{if (true)} -\def\restorBeginQuiz{\let\BeginQuizG@te\Norm@lBeginQuiz} +\def\restoreBeginQuiz{\let\BeginQuizG@te\Norm@lBeginQuiz} \newcommand\@initQuiz{% \BeginQuizG@te\space\jsLB\jsR\jsT var\eqSP\curr@quiz=new Object();\jsR\jsT diff --git a/macros/latex/contrib/acrotex/insdljs.dtx b/macros/latex/contrib/acrotex/insdljs.dtx index 7f848638de..b32a727083 100644 --- a/macros/latex/contrib/acrotex/insdljs.dtx +++ b/macros/latex/contrib/acrotex/insdljs.dtx @@ -16,7 +16,7 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{insdljs} -%<package> [2021/05/13 v2.5.4 Insert Document Level JavaScripts (dps)] +%<package> [2021/06/19 v2.5.5 Insert Document Level JavaScripts (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -610,6 +610,28 @@ \ifpdf\ifx\pdfextension\@undefined\else \protected\def\pdfnames{\pdfextension names } \def\pdfpageref{\pdffeedback pageref}\fi\fi +% \end{macrocode} +% The critical JavaScript files are no longer distributed with this package, +% but are distributed by the \pkg{acrotex-js} package. This package must be +% installed, and the instructions in the \texttt{docs} folder followed to +% propery install the critical JavaScript file \texttt{aeb.js}. +% \changes{v2.5.5}{2021/06/19}{Require acrotex-js when dvips is used} +% \begin{macrocode} +\ifpdfmarkup +\IfFileExists{acrotex-js.sty}{\let\reqpkg\relax} +% \end{macrocode} +% If the style file \texttt{acrotex-js.sty} is detected, we assume the document +% author has correctly installed \texttt{aeb.js}, if not, we require +% this package, which may be automatically installed on some {\TeX} systems. +% \begin{macrocode} + {\PackageWarningNoLine{insdljs}{% + The acrotex-js package is required.\MessageBreak + Before continuing, install this package,\MessageBreak + read the documentation, and place\MessageBreak + aeb.js in the expected folder + }\def\reqpkg{\usepackage{acrotex-js}[2021/06/19]} + } +\expandafter\reqpkg\fi \RequirePackage{verbatim} % \end{macrocode} %\changes{v2.4.1}{2019/02/11}{Save \string\cs{comment}\space as \string\cs{dlcomment}} @@ -856,7 +878,7 @@ % \changes{v2.5}{2020/12/20}{Added \string\cs{Launch}} % A launch action % \begin{macrocode} -\providecommand{\Launch}[1]{/Launch/F(#1)} +\providecommand{\Launch}[1]{/S/Launch/F(#1)} % \end{macrocode} % \end{macro} % \begin{macrocode} @@ -935,7 +957,8 @@ % \changes{v2.5.4}{2021/05/13}{Added \string\cs{dl@EForAFMergeChange}} % \begin{macrocode} \def\dl@EForAF4#1_{\ifx\usedAdbFuncs\dl@YES EF\else AF\fi#1_} -\def\dl@EForAFMergeChange{\ifx\usedAdbFuncs\dl@YES EF\else AF\fi MergeChange} +\def\dl@EForAFMergeChange{% + \ifx\usedAdbFuncs\dl@YES EF\else AF\fi MergeChange} % \end{macrocode} % \subsection{Some JavaScript Support} % diff --git a/macros/latex/contrib/bilingualpages/README.md b/macros/latex/contrib/bilingualpages/README.md new file mode 100644 index 0000000000..405d4d177c --- /dev/null +++ b/macros/latex/contrib/bilingualpages/README.md @@ -0,0 +1,23 @@ +bilingualpages (v1.0.0): Parallel facing pages for bilingual texts. +=== +Copyright (C) 2021 Arlie Coles +This package can be redistributed and/or modified under the terms +of the LaTeX Project Public License 1.3c. +=== + +This package is a convenience package to facilitate parallel facing pages for bilingual texts. It wraps the paracol package such that aligned content can be presented on left and right facing pages via readable macros. + +Example: + +``` +\begin{bilingualpages} + \leftpage + Hello world! + \rightpage + Bonjour tout le monde! +\end{bilingualpages} +``` + +This will put "Hello world!" on the left page and "Bonjour tout le monde" on the right facing page in parallel. + +This material is subject to the LaTeX Project Public License 1.3c. diff --git a/macros/latex/contrib/bilingualpages/bilingualpages.sty b/macros/latex/contrib/bilingualpages/bilingualpages.sty new file mode 100644 index 0000000000..6defd32fea --- /dev/null +++ b/macros/latex/contrib/bilingualpages/bilingualpages.sty @@ -0,0 +1,15 @@ +% Author: Arlie Coles +% License: LaTeX Project Public License 1.3c + +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{paracol} +\ProvidesPackage{bilingual}[2021/06/19 Bilingual facing pages.] + +% Facing pages +\newenvironment{bilingualpages} +{\begin{paracol}[1]{2}} +{\end{paracol}} + +% Left and right pages +\newcommand{\leftpage}{\switchcolumn[0]} +\newcommand{\rightpage}{\switchcolumn[1]} diff --git a/macros/latex/contrib/docassembly/README.md b/macros/latex/contrib/docassembly/README.md index 56dd576cc8..6765966759 100644 --- a/macros/latex/contrib/docassembly/README.md +++ b/macros/latex/contrib/docassembly/README.md @@ -1,6 +1,15 @@ -docassembly -Dated: 2021-06-11 -Author: D. P. Story +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% docassembly.sty package, %% +%% Copyright (C) 2021 D. P. Story %% +%% dpstory@acrotex.net %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1.2 of %% +%% the License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Dated: 2021-06-18 Targeted audience: LaTeX authors who love their pdflatex, lualtex, xelatex, or dvips -> ps2pdf workflow, who also own Acrobat Pro application. diff --git a/macros/latex/contrib/docassembly/aeb_pro.js b/macros/latex/contrib/docassembly/aeb_pro.js deleted file mode 100644 index 5dbfe4d53a..0000000000 --- a/macros/latex/contrib/docassembly/aeb_pro.js +++ /dev/null @@ -1,177 +0,0 @@ -/* - AEB Pro Document Assembly Methods - - Copyright (C) 2012 -- 2021 AcroTeX.Net - D. P. Story - http://www.acrotex.net - - Version 1.6.1 - - v1.6.1 aebCreateTemplate now returns an object - v1.6 Added aebAddWatermarkFromText, aebLaunchURL - v1.5 Added aebCertifyInvisibleSign -*/ - -if ( typeof aebTrustedFunctions == "undefined") { - aebTrustedFunctions = app.trustedFunction( function ( doc, oFunction, oArgs ) - { - app.beginPriv(); - var retn = oFunction( oArgs, doc ); - app.endPriv(); - return retn; - }); -} -aebAddWatermarkFromFile = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebAddWatermarkFromFile.msg==undefined)?("Add Watermark from File Error: " + e.toString()):aebAddWatermarkFromFile.msg;} - app.beginPriv(); - try { doc.addWatermarkFromFile(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebAddWatermarkFromFile.msg=undefined; -}); -aebAddWatermarkFromText = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.addWatermarkFromText(oArgs); - app.endPriv(); -}); -aebImportIcon = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.importIcon(oArgs); - app.endPriv(); -}); -aebInsertPages = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebInsertPages.msg==undefined)?("Insert Pages Error: " + e.toString()):aebInsertPages.msg;} - app.beginPriv(); - try { doc.insertPages(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebInsertPages.msg=undefined; -}) -aebAppOpenDoc = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebAppOpenDoc.msg==undefined)?("App Open Doc Error: " + e.toString()):aebAppOpenDoc.msg;} - app.beginPriv(); - try { return app.openDoc(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebAppOpenDoc.msg=undefined; - return retn; -}) -aebImportTextData = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.importTextData(oArgs); - app.endPriv(); -}); -aebImportSound = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.importSound(oArgs); - app.endPriv(); -}); -aebSaveAs = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - app.execMenuItem("Save"); - app.endPriv(); -}); -aebDocSaveAs = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebDocSaveAs.msg==undefined)?("Doc SaveAs Error: " + e.toString()):aebDocSaveAs.msg;} - app.beginPriv(); - try { - return doc.saveAs(oArgs); - } catch(e){console.println(Msg(e));} - app.endPriv(); - aebDocSaveAs.msg=undefined; - -}); -aebExtractPages = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.extractPages(oArgs); - app.endPriv(); -}); -aebMailDoc = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.mailDoc(oArgs); - app.endPriv(); -}); -aebImportDataObject = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.importDataObject(oArgs); - app.endPriv(); -}); -aebSignatureSign = app.trustPropagatorFunction( function ( oArgs, field ) -{ - app.beginPriv(); - return field.signatureSign(oArgs); - app.endPriv(); -}); -aebSecurityHandlerLogin = app.trustPropagatorFunction( function ( oArgs, securityHandler ) -{ - app.beginPriv(); - return securityHandler.login(oArgs); - app.endPriv(); -}); -aebTimestampSign = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return doc.timestampSign(oArgs); - app.endPriv(); -}); -aebSecurityGetHandler = app.trustPropagatorFunction( function ( oArgs, security ) -{ - app.beginPriv(); - return security.getHandler(oArgs); - app.endPriv(); -}); -aebAppGetPath = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return app.getPath(oArgs); - app.endPriv(); - return retn; -}); -aebSignatureSetSeedValue = app.trustPropagatorFunction( function ( oArgs, field ) -{ - app.beginPriv(); - return field.signatureSetSeedValue( oArgs ) - app.endPriv(); -}); -aebCertifyInvisibleSign = app.trustPropagatorFunction( function ( oArgs, field ) -{ - app.beginPriv(); - return field.certifyInvisibleSign( oArgs ) - app.endPriv(); -}); -aebAddIcon=app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - doc.addIcon(oArgs); - app.endPriv(); -}); -aebCreateTemplate = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebCreateTemplate.msg==undefined)?("Create Template Error: " + e.toString()):aebCreateTemplate.msg;} - app.beginPriv(); - try { return doc.createTemplate(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebCreateTemplate.msg=undefined; - -}) -aebBrowseForDoc=app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - var retn = app.browseForDoc(oArgs); - app.endPriv(); -}); -aebLaunchURL=app.trustPropagatorFunction ( function ( oArgs ) -{ - app.beginPriv(); - var retn = app.launchURL(oArgs); - app.endPriv(); -}); diff --git a/macros/latex/contrib/docassembly/docassembly.dtx b/macros/latex/contrib/docassembly/docassembly.dtx index 53bf22dae8..429ee327e4 100644 --- a/macros/latex/contrib/docassembly/docassembly.dtx +++ b/macros/latex/contrib/docassembly/docassembly.dtx @@ -14,7 +14,7 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01] %<package>\ProvidesPackage{docassembly} -%<package> [2021/06/11 v1.0 docassembly: Post PDF creation assembly (dps)] +%<package> [2021/06/18 v1.1 docassembly: Post PDF creation assembly (dps)] %<*driver> \documentclass{ltxdoc} \usepackage{amstext} @@ -88,14 +88,16 @@ % or even the much hated \app{dvips \texttt{->} Adobe Distiller}). % \end{minipage}} % \end{center} -% This package requires \pkg{insdljs}, which loads \pkg{hyperref}. It also requires +% This package requires \pkg{insdljs},\footnote{Part of the \pkg{acrotex} bundle} which loads \pkg{hyperref}. It also requires % the successful installation of the file \texttt{aeb\_pro.js}, which is distributed -% with this package, as well as with the \pkg{aeb\_pro} package. Version 1.6.1 of +% by the \pkg{acrotex-js} package. Version 1.6.1 of % \texttt{aeb\_pro.js} is required.\footnote{If you already have \pkg{aeb\_pro} installed on your % system, be sure you have Version 1.6.1 of \texttt{aeb\_pro.js}, if not, use the version -% of \texttt{aeb\_pro.js} that comes with \pkg{docassembly}.} Installation of \texttt{aeb\_pro.js} -% is covered in \texttt{docs/install\_jsfiles.pdf}. +% of \texttt{aeb\_pro.js} that comes with \pkg{acrotex-js}.} Installation of \texttt{aeb\_pro.js} +% is explained in \texttt{install\_jsfiles.pdf}, found in the \texttt{docs} folder of the \pkg{acrotex-js} package. % +% \changes{v1.1}{2021/06/18}{The \string\texttt{aeb\_pro.js} file is now distributed by the +% \string\pkg{acrotex-js} package} % \changes{v1.0}{2021/06/11}{First publication version of this package} % % \section{Documentation} @@ -138,6 +140,26 @@ % Require \pkg{insdljs} for this little exercise. % \begin{macrocode} \RequirePackage{insdljs} +% \end{macrocode} +% The critical JavaScript files are no longer distributed with this package, +% but are distributed by the \pkg{acrotex-js} package. This package must be +% installed, and the instructions in the \texttt{docs} folder followed to +% propery install the critical JavaScript file \texttt{aeb\_pro.js}. +% \begin{macrocode} +\IfFileExists{acrotex-js.sty}{\let\reqpkg\relax} +% \end{macrocode} +% If the style file \texttt{acrotex-js.sty} is detected, we assume the document +% author has correctly installed \texttt{aeb\_pro.js}, if not, we require +% this package, which may be automatically installed on some {\TeX} systems. +% \begin{macrocode} + {\PackageWarningNoLine{docassembly} + {The acrotex-js package is required.\MessageBreak + Before continuing, install this package,\MessageBreak + read the documentation, and place\MessageBreak + aeb_pro.js in the expected folder} + \def\reqpkg{\usepackage{acrotex-js}} + } +\reqpkg \execJSOn % \end{macrocode} % diff --git a/macros/latex/contrib/docassembly/docs/docassembly.pdf b/macros/latex/contrib/docassembly/docs/docassembly.pdf Binary files differindex a343c72fb4..f4aba50587 100644 --- a/macros/latex/contrib/docassembly/docs/docassembly.pdf +++ b/macros/latex/contrib/docassembly/docs/docassembly.pdf diff --git a/macros/latex/contrib/docassembly/docs/install_jsfiles.pdf b/macros/latex/contrib/docassembly/docs/install_jsfiles.pdf Binary files differdeleted file mode 100644 index 53d92d55d4..0000000000 --- a/macros/latex/contrib/docassembly/docs/install_jsfiles.pdf +++ /dev/null diff --git a/macros/latex/contrib/docassembly/docs/install_jsfiles.tex b/macros/latex/contrib/docassembly/docs/install_jsfiles.tex deleted file mode 100644 index 6c46402905..0000000000 --- a/macros/latex/contrib/docassembly/docs/install_jsfiles.tex +++ /dev/null @@ -1,325 +0,0 @@ -\documentclass{article} -\usepackage[fleqn]{amsmath} -% -% the driver line is not necessary if you -% have aebpro.cfg configured to your driver. -% -\usepackage[web]{aeb_pro} -\usepackage{eforms} -\usepackage[altbullet]{lucidbry} -\usepackage{pifont} - -\usepackage{fancyvrb} - -\makeatletter -\renewcommand{\paragraph} - {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt} - {\normalfont\normalsize\bfseries}} -\renewcommand{\subparagraph} - {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}% - {\normalfont\normalsize\bfseries}} -\makeatother - -\mathindent\parindent - -\def\AEBP{\app{AeB Pro}} -\def\AEB{\app{AeB}} -\def\app#1{\textsf{#1}} -\def\amtIndent{\parindent} -\def\meta#1{$\langle\textit{\texttt{#1}}\rangle$} -\def\SC#1{{\small#1}} -\def\PDF{\SC{PDF}} -\let\opt\texttt -\let\pkg\textsf - -\def\copyGetPath{\qquad\pushButton[\TU{Copy app.getPath to console} -\CA{getPath}\A{\JS{console.show();\r -console.println('\\napp.getPath("user");'); -}}]{cpyGtPth}{}{11bp}} - -\def\copyGetPathJS{\qquad\pushButton[\TU{Copy app.getPath to console} -\CA{getPath}\A{\JS{console.show();\r -console.println('\\napp.getPath("user", "javascript");'); -}}]{cpyGtPthJS}{}{11bp}} - -%\reversemarginpar -\def\jsSupInstr{How to install JavaScript support files} -\title{\jsSupInstr} -\author{D. P. Story} -\version{1.0} - -\chngDocObjectTo{\newDO}{doc} -\begin{docassembly} -var titleOfManual="How to install JavaScript files"; -var manualfilename="Manual_BG_Print_jsfiles.pdf"; -var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown -var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate; -var doc; -var buildIt=false; -if ( buildIt ) { - console.println("Creating new " + manualfilename + " file."); - doc = \appopenDoc({cPath: _pathToBlank, bHidden: true}); - var _path=this.path; - var pos=_path.lastIndexOf("/"); - _path=_path.substring(0,pos)+"/"+manualfilename; - \docSaveAs\newDO ({ cPath: _path }); - doc.closeDoc(); - doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true}); - f=doc.getField("ManualTitle"); - f.value=titleOfManual; - doc.flattenPages(); - \docSaveAs\newDO({ cPath: manualfilename }); - doc.closeDoc(); -} else { - console.println("Using the current "+manualfilename+" file."); -} -\retnAbsPathAs(_path); -_path += "/"+manualfilename; -var _path=this.path; -var pos=_path.lastIndexOf("/"); -_path=_path.substring(0,pos)+"/"+manualfilename; -\addWatermarkFromFile({ - bOnTop:false, - bOnPrint:false, - cDIPath:_path -}); -\executeSave(); -\end{docassembly} - -\begin{document} - -\maketitle - -\begin{center} - \fcolorbox{blue}{white}{\begin{minipage}{.75\linewidth} - \textbf{\textcolor{red}{Note:}} These are the installation instructions - for Folder JavaScript files \texttt{aeb.js} and \texttt{aeb\_pro.js}. The \pkg{docassembly} package - uses \texttt{aeb\_pro.js}, so follow these instructions.\medskip - \end{minipage}} -\end{center} - -\section{Introduction} - - -\noindent -Because some of the \app{Acrobat} JavaScript methods have security -restrictions, they can be only executed in the console window, or as part -of a batch sequence, or from the JavaScript folder reserved by -\app{Acrobat} for that use. The developer (of {\LaTeX} packages or {\PDF} -form documents) may want to use these restricted JavaScript methods as -part of document assembly. To use the restricted methods, they must be -called from the user JavaScript folder. The scripts are contained in a -\SC{JS} file that \app{Acrobat} reads when it first starts up. - -In this article, we provide detailed steps for locating the user -JavaScript folder. For {\AEB} and {\AEBP}, the files \texttt{aeb.js} and -\texttt{aeb\_pro.js} are placed in the folder. Other JavaScript files may -be placed in the folder as well, for example, the \texttt{config.js} file -is one that is commonly used for general purposes. - -Before we get started, if you are using a version of \app{Acrobat} prior -to version~8.1, you need not read any further. The security restrictions -described below were not in effect for those versions. - -\section{Installing the JavaScript support files} - -The functionality of {\AEB} and {\AEBP} depends, to some extent, on the -proper installation of their JavaScript support files. -\begin{itemize} - \item \AEB: For authors using the $\app{dvips}+\app{Acrobat Distiller}$ - workflow, \texttt{aeb.js} is required; this file is not used by - \app{pdflatex} or \app{xelatex} users. - - \item \AEBP: For authors using the $\app{dvips}+\app{Acrobat - Distiller}$ workflow, \texttt{aeb\_pro.js} is required; for authors - that prefer \app{pdflatex}, \app{lualatex}, or \app{xelatex} as the - {\PDF} creator \emph{and who own} the \app{Acrobat} application, - the \texttt{aeb\_pro.js} is required with the \opt{useacrobat} - option of \AEBP. When using the \opt{nopro} option of \AEBP, the - JavaScript file \texttt{aeb\_pro.js} is not used. - -\end{itemize} -The placement of the JavaScript files has changed over the years and is a -function of the version number \meta{ver}. Start \app{Acrobat} and open the -console debugger window by pressing \texttt{Ctrl+J} (for \app{Windows OS}) -or \texttt{Cmd+J} (for \app{Mac OS}). Now execute the code -\texttt{app.getPath("user")} in the console window. To do this, press the -\textsf{getPath} button provided below, which copies the necessary code to -the console window. -\begin{equation} -\begin{minipage}{.8\linewidth} -\begin{Verbatim}[commandchars={!~@}] -app.getPath("user");!copyGetPath -\end{Verbatim} -\end{minipage}\label{display:getPath} -\end{equation} -Now, with the cursor on the line containing the script, press the -\texttt{Ctrl+Enter} (for \app{Windows OS}) or \texttt{Cmd+Enter} (for -\app{Mac~OS}) key. This will execute the JavaScript and return the `root' -path to the user's application data for \app{Acrobat}. - -The rest of the instructions depend on your operating system, -\app{Windows} or \app{Mac}. - -\subsection{For users of \app{Windows OS}} - -There are several cases, jump to the numbered paragraph that describes your -version (\meta{ver}) of \app{Acrobat}. - -%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/11.0 -%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/Privileged/11.0/JavaScripts - -\def\Stepi{\ding{182}\enspace} -\def\Stepii{\ding{183}\enspace} -\def\Stepiii{\ding{184}\enspace} - -\paragraph*{{\Stepi}For $\boldmath\text{\meta{ver}}$, $\boldmath 8.1 \le -\text{\meta{ver}} < 10.1.1$.} For the \app{Windows OS}, executing the script -in display~\eqref{display:getPath} returns a string of the -form:\footnote{This string is for \app{Windows OS} beyond \app{WinXP}.} -\begin{equation} -\begin{minipage}{.8\linewidth} -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/!meta(ver) -\end{Verbatim} -\end{minipage}\label{display:path} -\end{equation} -Navigate to this folder location. The correct location for the \SC{JS} -files is in the \texttt{JavaScripts} subfolder. If the folder does not -exist, create it. The final path for the JavaScript support files is then -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/!meta(ver)/JavaScripts -\end{Verbatim} -Finally, copy \texttt{aeb.js} (and \texttt{aeb\_pro.js}, if applicable) -into this folder. Close \app{Acrobat}, the next time \app{Acrobat} -is started, it will read in the \SC{JS} files. - -\paragraph*{{\Stepii}For $\boldmath\text{\meta{ver}}$, $\boldmath10.1.1 \le -\text{\meta{ver}} < 12$.} For these versions of \app{Acrobat} security has -have tightened up even more; the \texttt{JavaScripts} folder is now a -subfolder of a special \texttt{Privileged} folder. Execute -\texttt{app.getPath("user")} in the console window, as in -display~\eqref{display:getPath}. The method brings back a string similar to -the one in display~\eqref{display:path}. The correct path is obtained by -simply inserting \texttt{Privileged} into the path in -display~\eqref{display:path}, between \texttt{Acrobat} and \meta{ver}, as -displayed below. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/!textbf(Privileged)/!meta(ver)/JavaScripts -\end{Verbatim} -But this is a mere description of the correct location, the path must -exist! The path must be created, if it does not already exist. - -Navigate to the folder, one folder above the path shown in -display~\eqref{display:path}, that is, navigate to, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/ -\end{Verbatim} -If a \texttt{Privileged} folder exists, enter into it; otherwise, create -it, then enter it. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/Privileged -\end{Verbatim} -Now create a folder named \meta{ver}, unless it already exists, and enter -it. The version is always the major release \texttt{8.0}, \texttt{9.0}, -\texttt{10.0}, or \texttt{11.0}. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/Privileged/!meta(ver) -\end{Verbatim} -Finally, create the \texttt{JavaScript} folder, unless it already exists, -to obtain the final path to the user folder JavaScripts: -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/ - Acrobat/Privileged/!meta(ver)/JavaScripts -\end{Verbatim} -Copy \texttt{aeb.js} (and \texttt{aeb\_pro.js}, if applicable) into this -folder. Close \textsf{Acrobat}, the next time \textsf{Acrobat} is started, -it will read in the \SC{JS} files. - -\paragraph*{{\Stepiii}For $\boldmath\text{\meta{ver}}$, $\boldmath -\text{\meta{ver}} > 12 $.} Beginning with the next major version following -version~11, Adobe changed its versioning scheme. There are now two tracks, -\emph{subscription} and \emph{classic} (also called \emph{perpetual}). For -subscription, the version, as I understand it, will always be \texttt{DC} -(Document Cloud), and for the classic, for which you've purchased a -\emph{perpetual license}, the \meta{ver} is a calendar year. The first -classic version is \texttt{2015}, the next one is most likely \texttt{2017}, -since major releases occur about every two years. - -Execute the code of display~\eqref{display:getPath} by pressing the button -provided to obtain a path of the form, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/DC -\end{Verbatim} -for the subscription license or, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/2015 -\end{Verbatim} -for the classic (or perpetual) license. Of course, this last path is for -the first classic version. - -Now, to obtain the path to the \texttt{JavaScripts} folder, follow the -instructions for numbered paragraph \ding{183}, but with \meta{ver} equal -to either \texttt{DC} or \texttt{2015} (a calendar year). - -%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/Privileged/11.0/JavaScripts - -\subsection{For users of \app{Mac OS}} - -\app{Mac OS} does not have the security restrictions that \app{Windows OS} -does, as described in paragraphs \ding{183} and \ding{184}. - -Follow the instructions of paragraph \ding{182}, by first pressing the button -provided in display~\eqref{display:getPath}, then, in the console window, -execute this script as described in the paragraph following -display~\eqref{display:getPath}. After working through \ding{182}, one -obtains any of the following paths depending on the version (\meta{ver}) you -are using:\medskip - -\noindent -For $\text{\meta{ver}} = \texttt{8.0}, \texttt{9.0}, \texttt{10.0}, -\texttt{11.0}$: -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/!meta(ver)/JavaScripts -\end{Verbatim} -\medskip - -\noindent -For $\text{\meta{ver}} > 12$, the path is, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/DC/JavaScripts -\end{Verbatim} -for a subscription license, and, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/2015/JavaScripts -\end{Verbatim} -or more generally, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -/Users/!meta(user)/Library/Application\ Support/Adobe/ - Acrobat/!meta(year)/JavaScripts -\end{Verbatim} -for the perpetual license. - -In all cases, if the \texttt{JavaScripts} folder does not exist, it must -be created. Copy any \SC{JS} support files into the \texttt{JavaScripts} -folder. The script files are read the next time \app{Acrobat} is started. - -\section{Testing the placement of the JavaScript support files} - -Assuming you have successfully followed the instructions and created the -\texttt{JavaScripts} folder, test the validity of what you have done by -closing \app{Acrobat} then opening it again. Open the console window -(\texttt{Ctrl+J} or \texttt{Cmd+J}, for \app{Mac OS}) and execute this -command in the console window: -\begin{Verbatim}[xleftmargin=\amtIndent,commandchars={!~@}] -app.getPath("user","javascript");!quad!copyGetPathJS -\end{Verbatim} -If you have followed the instructions, the return string should read the -complete path to the \texttt{JavaScripts} folder. -\end{document} diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 8a99557d42..487fcdf96d 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -10,7 +10,7 @@ % % \iffalse %<*driver> -\documentclass{ctxdoc} +\documentclass[fontset = fandol]{ctxdoc} \OnlyDescription \begin{document} \DocInput{\jobname.dtx} @@ -28,7 +28,7 @@ % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/06/16\hskip\ccwd\relax v1.26e\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/06/18\hskip\ccwd\relax v1.26f\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} @@ -37,7 +37,7 @@ % \tableofcontents % % \section{使用说明} -% 使用 \cls{easybook} 文档类编写文档前您可能需要满足以下的条件 +% 使用 \cls{easybook} 文档类编写文档前您可能需要满足以下的条件: % \begin{itemize} % \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。 % \item 由于用到了一些 \LaTeX 和宏包较新的功能,建议安装最新的 \TeX 发行版,例如 \TeX Live 2021或 \hologo{MiKTeX} 21.2之后的版本。 @@ -75,7 +75,7 @@ % \end{frameverb} % % \subsection{编译方式} -% 假设您的 \TeX 源文件名为 \opt{easybook.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行 +% 假设您的 \TeX 源文件名为 \opt{easybook.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行: % \begin{frameverb} % xelatex -shell-escape easybook % bibtex easybook @@ -110,7 +110,7 @@ % \end{function} % % \begin{function}[rEXP,added = 2021-01-05]{newline} -% 部分和章标题的样式为另起一行,符合一般英文书籍的习惯。类似下面的效果 +% 部分和章标题的样式为另起一行,符合一般英文书籍的习惯。类似下面的效果: % \begin{flushleft}\sffamily\LARGE % Chapter 1\vskip 1.3pc % This is a title @@ -128,11 +128,11 @@ % 同时开启 \opt{newline} 和 \opt{scheme = plain} 选项以符合英文原生风格。 % \end{function} % -% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font} +% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-06-18]{font} % \begin{syntax} -% font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none> +% font = <adobe|fandol|mac|windows|linux|noto|(auto)|none> % \end{syntax} -% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。 +% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{auto} 是一个各系统通用选项,会检测系统环境选取对应字体。 % \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。} % \changes{v1.25}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。} % \end{function} @@ -157,7 +157,7 @@ % floatpage = <true|(false)> % \end{syntax} % 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。 -% \changes{v1.26e}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。} +% \changes{v1.26f}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。} % \end{function} % % \subsection{article 模式} @@ -239,7 +239,7 @@ % \tn{EBeforeAddBitoc*}\marg{加入目录英文标题前的代码} % \end{syntax} % \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。 -% \changes{v1.26e}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。} +% \changes{v1.26f}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。} % \end{function} % % \tn{EBeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。 @@ -250,7 +250,7 @@ % \begin{syntax} % \tn{ctexset}\marg{键值列表} % \end{syntax} -% \cls{easybook} 扩展了 \CTeX 宏集 \LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名 +% \cls{easybook} 扩展了 \CTeX 宏集 \LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名: % \begin{center} % \begin{tabular}{*{5}{c}} % \toprule @@ -482,7 +482,7 @@ % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。 % \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。} % \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EBNewTheorem}。} -% \changes{v1.26e}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。} +% \changes{v1.26f}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。} % \end{function} % % \begin{optdesc} @@ -504,16 +504,16 @@ % \end{optdesc} % % \subsubsection{新的定理样式} -% 预置定理的样式为 \opt{easy-theorem},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样 +% 预置定理的样式为 \opt{easy-theorem},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样: % \begin{ctexexam} % \EBNewTheorem{定理环境名}{中文标题}[style = other theorem] % \declaretheorem[style = easy-theorem,name = 定理名]{定理环境名} % \end{ctexexam} -% \tn{declaretheorem} 定义的定理环境需要手动增加盒子边框,可以如下进行设置 +% \tn{declaretheorem} 定义的定理环境需要手动增加盒子边框,可以如下进行设置: % \begin{ctexexam} % \tcolorboxenvironment{定理环境名}{tc-theorem} % \end{ctexexam} -% 定义一个新的定理样式可用于 \tn{declaretheorem} 的 \opt{style} 选项 +% 定义一个新的定理样式可用于 \tn{declaretheorem} 的 \opt{style} 选项: % \begin{ctexexam} % \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名} % \end{ctexexam} @@ -571,7 +571,7 @@ % \changes{v1.24}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 article 模式生效。} % \end{function} % -% 标签选项 \opt{chap-label}、\opt{sec-label} 和 \opt{subsec-label} 用于设置标志命令中的标签,包括标题编号和与标题内容之间的距离,它们比标志命令内容的选项更常用,可选参数是编号,必选参数是距离命令 +% 标签选项 \opt{chap-label}、\opt{sec-label} 和 \opt{subsec-label} 用于设置标志命令中的标签,包括标题编号和与标题内容之间的距离,它们比标志命令内容的选项更常用,可选参数是编号,必选参数是距离命令: % \begin{ctexexam} % \hdrset % { @@ -588,10 +588,10 @@ % \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>] % \end{syntax} % 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 -% \changes{v1.26e}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。} +% \changes{v1.26f}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。} % \end{function} % -% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用+号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子 +% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用+号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子: % \begin{ctexexam} % \hdrset % { @@ -689,7 +689,7 @@ % \begin{optdesc} % \item[lolskip] \opt{lolskip} 是代码目录中章之间的代码标题的距离,与 \CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 article 模式中此选项失效。 % \item[belowoffset] \opt{belowoffset} 选项为主文档目录标题下方的间距补偿,一般为负值,用于抵消 \opt{format} 中额外的垂直间距。\opt{(level)} 中的 \opt{belowoffset} 与之意义类似,代表 figure、table 和 lstlisting 三个级别,也可以使用 \opt{list} 统一设置,一般为正值。 -% \item[tocline] 目录标签整体使用 \opt{tocline} 设置,在图表标签的参数中 \#1 代表编号,代码标签中则是 \tn{thelstlisting} 代表编号,标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子 +% \item[tocline] 目录标签整体使用 \opt{tocline} 设置,在图表标签的参数中 \#1 代表编号,代码标签中则是 \tn{thelstlisting} 代表编号,标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子: % \begin{ctexexam} % \tocset % { @@ -735,7 +735,7 @@ % \ \tn{item} <列表内容> % \tn{end}\marg{环境名} % \end{syntax} -% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式,也可以直接使用可选参数的 \meta{键值列表},具体选项见 \pkg{enumitem} 宏包文档。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如 +% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式,也可以直接使用可选参数的 \meta{键值列表},具体选项见 \pkg{enumitem} 宏包文档。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如: % \changes{v1.24}{2021/04/08}{重新优化列表环境的配置。} % \end{function} % @@ -747,14 +747,14 @@ % % \subsubsection{排序列表} % \label{subsec:sort list} -% 使用 \opt{enumerate} 环境可创建排序列表,使用 \env{enumerate*} 环境产生行内部列表,可以使用 \textbf{A、a、I、i和1} 作为可选项为 \env{enumerate} 与 \env{enumerate*} 格式化标签。若生成 \textbf{Item I、Item II、Item III} 格式可以这样 +% 使用 \opt{enumerate} 环境可创建排序列表,使用 \env{enumerate*} 环境产生行内部列表,可以使用 \textbf{A、a、I、i和1} 作为可选项为 \env{enumerate} 与 \env{enumerate*} 格式化标签。若生成 \textbf{Item I、Item II、Item III} 格式可以这样: % \begin{ctexexam} % \begin{enumerate*}[(a)] % \begin{enumerate}[\bfseries{Item} I] % \end{ctexexam} % % \subsubsection{常规列表} -% 使用 \env{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,举一个用$\star$取代默认的符号的例子 +% 使用 \env{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,举一个用$\star$取代默认的符号的例子: % \begin{ctexexam} % \begin{itemize*}[$\star$] % \begin{itemize}[$\star$] @@ -777,7 +777,7 @@ % \ <定理内容> % \tn{end}\marg{环境名} % \end{syntax} -% 这些是已预置的定理环境,它们的盒子边框可使用 \opt{thmset/thmbox = false} 关闭,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境见小节 \ref{subsec:theorem of style}。环境名对应的定理标题名如下 +% 这些是已预置的定理环境,它们的盒子边框可使用 \opt{thmset/thmbox = false} 关闭,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境见小节 \ref{subsec:theorem of style}。环境名对应的定理标题名如下: % \begin{center} % \begin{tabular}{*{8}{c}} % \toprule @@ -796,7 +796,7 @@ % \ \tn{item} <习题内容> % \tn{end}\marg{exercise} % \end{syntax} -% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用+号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效。第三个 \meta{键值列表} 的选项与小节 \ref{subsec:sort list} 排序列表相同,\opt{number} 的编号格式也是如此。第一个 \meta{键值列表} 中包含的选项如下 +% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用+号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效。第三个 \meta{键值列表} 的选项与小节 \ref{subsec:sort list} 排序列表相同,\opt{number} 的编号格式也是如此。第一个 \meta{键值列表} 中包含的选项如下: % \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。} % \end{function} % @@ -1081,7 +1081,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/06/16}{1.26e}{beta} +\ProvidesExplClass{easybook}{2021/06/18}{1.26f}{beta} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool @@ -1101,17 +1101,17 @@ enmode .meta:n = { newline,scheme = plain }, font .choices:nn = - { adobe,founder,mac,windows,none } + { adobe,fandol,mac,windows,none } { \eb_put_ctexbook:n { fontset = \l_keys_choice_tl } }, font/noto .code:n = { \bool_set_true:N \l__eb_font_noto_bool \eb_put_ctexbook:n { fontset = none } }, - font/overleaf .code:n = { }, - font/linux .code:n = \eb_put_ctexbook:n { fontset = ubuntu }, + font/auto .code:n = { }, + font/linux .code:n = \eb_put_ctexbook:n { fontset = ubuntu }, font .value_required:n = true, - font .initial:n = overleaf, + font .initial:n = auto, paper .choice:, paper .value_required:n = true, @@ -1147,6 +1147,7 @@ } \ProcessKeysOptions{easybook} +\PassOptionsToPackage{no-math,quiet,CJKmath}{xeCJK} \eb_put_ctexbook:n { \g__eb_options_clist } \LoadClass[UTF8]{ctexbook} @@ -1327,7 +1328,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2021/06/16}{1.26e}{beta} +\ProvidesExplPackage{easybase}{2021/06/18}{1.26f}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn { nx } \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -1426,8 +1427,6 @@ { list = off } { bicaption }, { many } { tcolorbox }, { xindy } { imakeidx }, - { CJKmath } { xeCJK }, - { no-math } { fontspec }, { upint } { newtxmath } } { \PassOptionsToPackage #1 } @@ -1704,8 +1703,7 @@ { \bool_if:NTF \l__eb_mark_uppercase_bool { \eb@text@uppercase } - { \eb@text@nouppercase } - { \use:c { eb_fancyhf_#1_mark:n } {#2} } + { \eb@text@nouppercase }{\use:c { eb_fancyhf_#1_mark:n } {#2}} } \cs_new:Npn \eb@level@markdouble #1#2 { diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex fe384ab0a3..9355091fa9 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf Binary files differindex 7c3d32aef4..f42fbd6e6a 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf +++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex index 426944dffc..7ee72fbbab 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex +++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex @@ -1,5 +1,5 @@ %! TEX program = xelatex -\documentclass[allowbf,regionalref,puretext]{lebhart} +\documentclass[Chinese,English,French,allowbf,puretext]{lebhart} %%================================ %% 引入工具集 @@ -8,7 +8,7 @@ \usepackage{longtable} % breakable tables \usepackage{hologo} % more TeX logo -\UseLanguage{Chinese} +% \UseLanguage{Chinese} %%================================ %% 排版代码 @@ -32,7 +32,8 @@ } \providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$} \lstset{moretexcs=% - {color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,PJLdate,ProjLib + {color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,PJLdate,ProjLib, + mathfrak,mf,frak,mfA,mathbb,bb,N,Z,Q,R,C,F,A,mathcal,mc,cal,mathscr,ms,scr, } } \lstnewenvironment{code}% @@ -69,6 +70,7 @@ \providecommand{\PJLdraft}{\textsf{PJLdraft}} \providecommand{\PJLlang}{\textsf{PJLlang}} \providecommand{\PJLlogo}{\textsf{PJLlogo}} +\providecommand{\PJLmath}{\textsf{PJLmath}} \providecommand{\PJLpaper}{\textsf{PJLpaper}} \providecommand{\PJLthm}{\textsf{PJLthm}} @@ -79,7 +81,7 @@ \title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南} \author{许锦文} -\thanks{对应版本.~~\texttt{\ProjLib{}~2021/06/17}} +\thanks{对应版本.~~\texttt{\ProjLib{}~2021/06/19}} \date{2021年6月,北京} \maketitle @@ -113,11 +115,15 @@ \begin{itemize} \item 快速模式。功能会适当缩减,但能够提高编译速度,建议在撰写阶段使用。 \end{itemize} - \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} $|$ \texttt{useosf} + \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} ~$|$~ \texttt{useosf} \begin{itemize} \item 字体选项。顾名思义,会加载相应名称的字体。 \item \texttt{useosf} 选项用来启用“旧式”数字。 \end{itemize} + \item \texttt{nothms}、\texttt{nothmnum}、\texttt{regionalref} + \begin{itemize} + \item 来自 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。 + \end{itemize} \item \texttt{author} \begin{itemize} \item 加载 \PJLauthor{}。关于其详细功能,请参阅有关这一宏包的小节。 @@ -126,12 +132,8 @@ \begin{itemize} \item 加载 \PJLamssim{}。关于其详细功能,请参阅有关这一宏包的小节。 \end{itemize} - \item \texttt{nothms}、\texttt{regionalref} - \begin{itemize} - \item 来自 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。 - \end{itemize} \end{itemize} -另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \PJLpaper{} 的 \texttt{paperstyle} 和 \texttt{preview} 等。详细信息可以参阅对应的小节。 +另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{CN} / \texttt{chinese} / \texttt{Chinese} 等语言选项 (来自 \PJLlang{}),\texttt{paperstyle} 和 \texttt{preview} 等纸张选项 (来自 \PJLpaper{})。详细信息可以参阅对应的小节。 \section{具体组件} @@ -180,7 +182,17 @@ \subsection{PJLlang} -\PJLlang{} 提供了多语言支持,包括简体中文、繁体中文、英文、法文、德文、日文、俄文 (其中中文、日文、俄文需要相应的 \TeX{} 引擎与字体支持)。可以通过下列命令来选定语言: +\PJLlang{} 提供了多语言支持,包括简体中文、繁体中文、英文、法文、德文、日文、俄文 (其中中文、日文、俄文需要相应的 \TeX{} 引擎与字体支持)。 + +\medskip +\PJLlang{} 提供语言选项,这些选项的名称有三种,分别是缩写(如 \texttt{EN})、小写(如 \texttt{english})、首字母大写(如 \texttt{English})。具体的选项名称可以参见下文的 \meta{language name}。其中,第一个指定的语言 \meta{first language} 会被作为默认语言,相当于在文档开头指定 \lstinline|\UseLanguage{|\meta{first language}\lstinline|}|。 + +\begin{tip} + 为了提高编译速度,建议使用语言选项,并将其作为全局参数传递。这样,只会对指定语言进行设置,节省了 \TeX{} 内存,从而能显著提高编译速度。 +\end{tip} + +\medskip +在文档中,可以通过下列命令来选定语言: \begin{itemize} \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}|,用于指定语言,在其后将使用对应的语言设定。 \begin{itemize} @@ -192,6 +204,7 @@ \end{itemize} \end{itemize} +\medskip \meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可): \begin{itemize}\setstretch{1.15} \item 简体中文:\texttt{CN}、\texttt{Chinese}、\texttt{SChinese} 或 \texttt{SimplifiedChinese} @@ -207,6 +220,7 @@ \item 俄语:\texttt{RU} 或 \texttt{Russian} \end{itemize} +\medskip 另外,还可以通过下面的方式来填加相应语言的设置: \begin{itemize} \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}| @@ -220,7 +234,7 @@ \end{itemize} 例如,\lstinline|\AddLanguageSetting(German){\color{orange}}| 可以让所有德语以橙色显示(当然,还需要再加上 \lstinline|\AddLanguageSetting{\color{black}}| 来修正其他语言的颜色)。 - +\clearpage \subsection{PJLlogo} \PJLlogo{} 提供了 \lstinline|\ProjLib| 命令用于绘制 Logo,效果为:\ProjLib{}。它与普通的文字指令效果类似,可以用于不同的字号: @@ -253,6 +267,53 @@ \end{center} % \end{longtable} +\subsection{PJLmath} + +\PJLmath{} 提供下列捷径: +\begin{enumerate}[label=\roman*)] + \item \lstinline|\mathfrak{|$\cdot$\lstinline|}| $\longrightarrow$ \lstinline|\mf|$\cdot$ 或 \lstinline|\frak|$\cdot$。例如,\lstinline|\mfA| (或 \lstinline|\mf{A}|) 与 \lstinline|\mathfrak{A}| 效果相同. 这对大写、小写字母都有效: + \begin{align*} + \mfa\mfb\mfc\mfd\mfe\mff\mfg\mfh\mfi\mfj\mfk\mfl\mfm\mfn&\mfo\mfp\mfq\mfr\mfs\mft\mfu\mfv\mfw\mfx\mfy\mfz\\ + \mfA\mfB\mfC\mfD\mfE\mfF\mfG\mfH\mfI\mfJ\mfK\mfL\mfM\mfN&\mfO\mfP\mfQ\mfR\mfS\mfT\mfU\mfV\mfW\mfX\mfY\mfZ + \end{align*} + \item \lstinline|\mathbb{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\bb|$\cdot$。这只针对大写字母或数字 \( 1 \). + \begin{equation*} + \bbA\bbB\bbC\bbD\bbE\bbF\bbG\bbH\bbI\bbJ\bbK\bbL\bbM\bbN\bbO\bbP\bbQ\bbR\bbS\bbT\bbU\bbV\bbW\bbX\bbY\bbZ\bb1 + \end{equation*} + 对于常见的代数结构有这些特殊命令:\lstinline|\N|, \lstinline|\Z|, \lstinline|\Q|, \lstinline|\R|, \lstinline|\C|, \lstinline|\F|, \lstinline|\A|. + \[ + \N\Z\Q\R\C\F\A + \] + \item \lstinline|\mathcal{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\mc|$\cdot$ 或 \lstinline|\cal|$\cdot$。这只针对大写字母。 + \begin{equation*} + \mcA\mcB\mcC\mcD\mcE\mcF\mcG\mcH\mcI\mcJ\mcK\mcL\mcM\mcN\mcO\mcP\mcQ\mcR\mcS\mcT\mcU\mcV\mcW\mcX\mcY\mcZ + \end{equation*} + \item \lstinline|\mathscr{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\ms|$\cdot$ 或 \lstinline|\scr|$\cdot$。这只针对大写字母。 + \begin{equation*} + \msA\msB\msC\msD\msE\msF\msG\msH\msI\msJ\msK\msL\msM\msN\msO\msP\msQ\msR\msS\msT\msU\msV\msW\msX\msY\msZ + \end{equation*} +\end{enumerate} + +% 另外,\PJLmath{} 还提供一些学科相关的命令。 + +% \subsubsection{Number theory} + +% \begin{longtable}[l]{ p{3.5cm} p{5cm} p{5cm} } +% \verb|\legendre| & \verb|\legendre{a}{p}| $\rightarrow \legendre{a}{p}$ & automatic sizing \\ +% & \verb|\legendre[z]{a}{p}| $\rightarrow \legendre[z]{a}{p}$ & \\ +% \verb|\tlegendre| & \verb|\tlegendre{a}{p}| $\rightarrow \tlegendre{a}{p}$ & text style \\ +% \verb|\dlegendre| & \verb|\dlegendre{a}{p}| $\rightarrow \dlegendre{a}{p}$ & display style \\ +% \end{longtable} + +% There's also a starred version of \verb|\pmod|, which eliminate the spacing before it: + +% \verb|a\pmod*{4}| $\rightarrow a\pmod*{4}$. + +% Compared with: + +% \verb|a\pmod{4}| $\rightarrow a\pmod{4}$. + +\clearpage \subsection{PJLpaper} \PJLpaper{} 主要用于调节纸张颜色。它支持下列选项: @@ -282,6 +343,10 @@ \begin{itemize} \item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。 \end{itemize} + \item \texttt{nothmnum} + \begin{itemize} + \item 使定理类环境均不编号。 + \end{itemize} \item \texttt{regionalref} \begin{itemize} \item 在智能引用时,定理类环境的名称随当前语言而变化(默认情况下,引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem)。在 \texttt{fast} 模式下,这一选项默认启用。 diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf Binary files differindex 47ba1e28f6..b3ffa5dc5e 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf +++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.tex b/macros/latex/contrib/projlib/ProjLib-doc-en.tex index 707cf5c8d4..1f232fe5e6 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-en.tex +++ b/macros/latex/contrib/projlib/ProjLib-doc-en.tex @@ -1,5 +1,5 @@ %! TEX program = xelatex -\documentclass[allowbf,regionalref,puretext]{lebhart} +\documentclass[English,French,allowbf,regionalref,puretext]{lebhart} %%================================ %% Import toolkit @@ -30,7 +30,8 @@ } \providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$} \lstset{moretexcs=% - {color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,PJLdate,ProjLib + {color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,PJLdate,ProjLib, + mathfrak,mf,frak,mfA,mathbb,bb,N,Z,Q,R,C,F,A,mathcal,mc,cal,mathscr,ms,scr, } } \lstnewenvironment{code}% @@ -67,6 +68,7 @@ \providecommand{\PJLdraft}{\textsf{PJLdraft}} \providecommand{\PJLlang}{\textsf{PJLlang}} \providecommand{\PJLlogo}{\textsf{PJLlogo}} +\providecommand{\PJLmath}{\textsf{PJLmath}} \providecommand{\PJLpaper}{\textsf{PJLpaper}} \providecommand{\PJLthm}{\textsf{PJLthm}} @@ -77,7 +79,7 @@ \title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual} \author{Jinwen Xu} -\thanks{Corresponding to: \texttt{\ProjLib{}~2021/06/17}} +\thanks{Corresponding to: \texttt{\ProjLib{}~2021/06/19}} \date{June 2021, Beijing} \maketitle @@ -109,13 +111,17 @@ Just add the following line to your preamble: \begin{itemize} \item \texttt{draft} or \texttt{fast} \begin{itemize} - \item Fast mode. The functionality is appropriately reduced to get faster compilation speed, recommended to use during the writing phase. + \item Fast mode. The functionality will be appropriately reduced to get faster compilation speed, recommended to use during the writing phase. \end{itemize} - \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} $|$ \texttt{useosf} + \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf} \begin{itemize} \item Font options. As the name suggest, font with corresponding name will be loaded. \item The \texttt{useosf} option is used to enable the old-style figures. \end{itemize} + \item \texttt{nothms}, \texttt{nothmnum}, \texttt{regionalref} + \begin{itemize} + \item Options from \PJLthm{}, please refer to the section on this package for details. + \end{itemize} \item \texttt{author} \begin{itemize} \item Load \PJLauthor{}. For more information about its functionality, see the section on this package. @@ -124,12 +130,8 @@ Just add the following line to your preamble: \begin{itemize} \item Load \PJLamssim{}. For more information about its functionality, see the section on this package. \end{itemize} - \item \texttt{nothms}, \texttt{regionalref} - \begin{itemize} - \item Options from \PJLthm{}, please refer to the section on this package for details. - \end{itemize} \end{itemize} -In addition, there are also some options of the components that can (and should) be passed as global options of the document class, such as \texttt{paperstyle} and \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding section. +In addition, there are also some options of the components that should be passed as global options of your document class, such as the language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French} etc.\,of \PJLlang{}, \\and \texttt{paperstyle}, \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding sections. \section{The components} @@ -178,13 +180,24 @@ For details on how to select a language, please refer to the section on \PJLlang \subsection{PJLlang} -\PJLlang{} offers multi-language support, including simplified Chinese, traditional Chinese, English, French, German, Japanese, and Russian (among them, Chinese, Japanese, and Russian require appropriate \TeX{} engines and fonts to support). The language can be selected by the following macros: +\PJLlang{} offers multi-language support, including simplified Chinese, traditional Chinese, English, French, German, Japanese, and Russian (among them, Chinese, Japanese, and Russian require appropriate \TeX{} engines and fonts to support). + +\medskip +\PJLlang{} provides language options. The names of these options have three types, which are abbreviations (such as \texttt{EN}), lowercase (such as \texttt{english}), and capital letters (such as \texttt{English}). For the option names of a specific language, please refer to \meta{language name} below. Among them, the first specified language \meta{first language} will be used as the default language, which is equivalent to specifying \lstinline|\UseLanguage{|\meta{first language}\lstinline|}| at the beginning of your document. + +\begin{tip} + It is recommended to use these language options and pass them as global options. In this way, only the specified language is set, thus saving the \TeX{} memory and significantly improving the compilation speed. +\end{tip} + +\medskip +The language can be selected by the following macros: \begin{itemize} \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding setting of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English" is selected by default. \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, which uses the specified language settings to typeset \meta{content}. Compared with \lstinline|\UseLanguage|, it will not modify the line spacing, so line spacing would remain stable when CJK and Western texts are mixed. \end{itemize} +\medskip \meta{language name} can be (it is not case sensitive, for example, \texttt{French} and \texttt{french} have the same effect): \begin{itemize} \item Simplified Chinese: \texttt{CN}, \texttt{Chinese}, \texttt{SChinese} or \texttt{SimplifiedChinese} @@ -200,7 +213,7 @@ For details on how to select a language, please refer to the section on \PJLlang \item Russian: \texttt{RU} or \texttt{Russian} \end{itemize} -% \medskip +\medskip In addition, you can also add new settings to selected language: \begin{itemize} \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}| @@ -214,7 +227,7 @@ In addition, you can also add new settings to selected language: \end{itemize} For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages). - +\clearpage \subsection{PJLlogo} \PJLlogo{} offers the \lstinline|\ProjLib| macro to draw the logo, which looks like \ProjLib{}. It is similar to ordinary text macros and can be used with different font size macros: @@ -247,7 +260,34 @@ For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make al \end{center} % \end{longtable} -\clearpage +\subsection{PJLmath} + +\PJLmath{} offers the following shortcuts: +\begin{enumerate}[label=\roman*)] + \item \lstinline|\mathfrak{|$\cdot$\lstinline|}| $\longrightarrow$ \lstinline|\mf|$\cdot$ or \lstinline|\frak|$\cdot$ . For example, \lstinline|\mfA| (or \lstinline|\mf{A}|) has the same effect as \lstinline|\mathfrak{A}|. This works for both upper and lower case, producing: + \begin{align*} + \mfa\mfb\mfc\mfd\mfe\mff\mfg\mfh\mfi\mfj\mfk\mfl\mfm\mfn&\mfo\mfp\mfq\mfr\mfs\mft\mfu\mfv\mfw\mfx\mfy\mfz\\ + \mfA\mfB\mfC\mfD\mfE\mfF\mfG\mfH\mfI\mfJ\mfK\mfL\mfM\mfN&\mfO\mfP\mfQ\mfR\mfS\mfT\mfU\mfV\mfW\mfX\mfY\mfZ + \end{align*} + \item \lstinline|\mathbb{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\bb|$\cdot$ . This only works for uppercase alphabet and the number \( 1 \). + \begin{equation*} + \bbA\bbB\bbC\bbD\bbE\bbF\bbG\bbH\bbI\bbJ\bbK\bbL\bbM\bbN\bbO\bbP\bbQ\bbR\bbS\bbT\bbU\bbV\bbW\bbX\bbY\bbZ\bb1 + \end{equation*} + There are also special command for well-known algebraic structures: \lstinline|\N|, \lstinline|\Z|, \lstinline|\Q|, \lstinline|\R|, \lstinline|\C|, \lstinline|\F|, \lstinline|\A|. + \[ + \N\Z\Q\R\C\F\A + \] + \item \lstinline|\mathcal{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\mc|$\cdot$ or \lstinline|\cal|$\cdot$ . This only works for uppercase alphabet. + \begin{equation*} + \mcA\mcB\mcC\mcD\mcE\mcF\mcG\mcH\mcI\mcJ\mcK\mcL\mcM\mcN\mcO\mcP\mcQ\mcR\mcS\mcT\mcU\mcV\mcW\mcX\mcY\mcZ + \end{equation*} + \item \lstinline|\mathscr{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\ms|$\cdot$ or \lstinline|\scr|$\cdot$ . This only works for uppercase alphabet. + \begin{equation*} + \msA\msB\msC\msD\msE\msF\msG\msH\msI\msJ\msK\msL\msM\msN\msO\msP\msQ\msR\msS\msT\msU\msV\msW\msX\msY\msZ + \end{equation*} +\end{enumerate} + +% \clearpage \subsection{PJLpaper} \PJLpaper{} is mainly used to adjust the paper color. It has the following options: @@ -279,14 +319,19 @@ It is recommended to use them as global options of the document class. In this w \begin{itemize} \item \texttt{nothms} \begin{itemize} - \item The theorem-like environments will not be defined. You may use this option if you wish to apply your own theorem styles. + \item Theorem-like environments will not be defined. You may use this option if you wish to apply your own theorem styles. + \end{itemize} + \item \texttt{nothmnum} + \begin{itemize} + \item Theorem-like environments will not be numbered. \end{itemize} \item \texttt{regionalref} \begin{itemize} - \item When referencing, the name of the theorem-like environment changes with the current language (by default, the name will always remain the same; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''). In \texttt{fast} mode, this option is automatically enabled. + \item When referencing, name of the theorem-like environment will change with the current language (by default, the name will always remain the same; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''). In \texttt{fast} mode, this option is automatically enabled. \end{itemize} \end{itemize} +\medskip Preset environments include: \texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, ~~\texttt{definition-theorem}, ~~\texttt{example}, ~~\texttt{exercise}, ~~\texttt{fact}, ~~\texttt{hypothesis}, ~~\texttt{lemma}, \\\texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode. For details on how to select a language, please refer to the section on \PJLlang{}. \begin{tip} @@ -306,13 +351,14 @@ Preset environments include: \texttt{assumption}, \texttt{axiom}, \texttt{conjec % \begin{tip} % If you want to define an environment with an asterisk \lstinline|*| after the name, you don't need to write an asterisk in the \meta{name of environment} above. See the example below. % \end{tip} +\medskip If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use: \begin{itemize} \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}| \end{itemize} For \meta{language name}, please refer to the section on \PJLlang{}. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| . -\medskip +\bigskip And then define this environment in one of following five ways: \vspace{-.3\baselineskip} \begin{itemize} @@ -332,6 +378,7 @@ And then define this environment in one of following five ways: \begin{itemize} \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within} \end{itemize} + \clearpage \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\ \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)| \begin{itemize} @@ -385,7 +432,7 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm \end{itemize} -\medskip % \clearpage +\clearpage \section{Usage example} \subsection{Standard classes} diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx index 52dd38e55b..84b8e15894 100644 --- a/macros/latex/contrib/projlib/ProjLib.dtx +++ b/macros/latex/contrib/projlib/ProjLib.dtx @@ -18,52 +18,57 @@ % %<*ProjLib> \ProvidesPackage{ProjLib} - [2021/06/17 The collective interface of ProjLib toolkit] + [2021/06/19 The collective interface of ProjLib toolkit] %</ProjLib> % %<*PJLamssim> \ProvidesPackage{PJLamssim} - [2021/06/17 Simulate some features of amsart] + [2021/06/19 Simulate some features of amsart] %</PJLamssim> % %<*PJLauthor> \ProvidesPackage{PJLauthor} - [2021/06/17 Enhanced author information block] + [2021/06/19 Enhanced author information block] %</PJLauthor> % %<*PJLdate> \ProvidesPackage{PJLdate} - [2021/06/17 Convert yyyy-mm-dd to normal datetime format] + [2021/06/19 Convert yyyy-mm-dd to normal datetime format] %</PJLdate> % %<*PJLdraft> \ProvidesPackage{PJLdraft} - [2021/06/17 Some useful macros for the draft stage] + [2021/06/19 Some useful macros for the draft stage] %</PJLdraft> % %<*PJLlang> \ProvidesPackage{PJLlang} - [2021/06/17 Multi-language configuration] + [2021/06/19 Multi-language configuration] %</PJLlang> % %<*PJLlogo> \ProvidesPackage{PJLlogo} - [2021/06/17 The ProjLib logo] + [2021/06/19 The ProjLib logo] %</PJLlogo> % +%<*PJLmath> +\ProvidesPackage{PJLmath} + [2021/06/19 Useful math macros and shortcuts] +%</PJLmath> +% %<*PJLpaper> \ProvidesPackage{PJLpaper} - [2021/06/17 Paper style configuration] + [2021/06/19 Paper style configuration] %</PJLpaper> % %<*PJLthm> \ProvidesPackage{PJLthm} - [2021/06/17 Theorem setup and configuration] + [2021/06/19 Theorem setup and configuration] %</PJLthm> % %<*PJLtoolkit> \ProvidesPackage{PJLtoolkit} - [2021/06/17 Collective interface of ProjLib Toolkit] + [2021/06/19 Collective interface of ProjLib Toolkit] %</PJLtoolkit> % \RequirePackage{kvoptions} @@ -453,8 +458,77 @@ prefix = @PJLlang@ } \DeclareBoolOption[false]{polyglossia} + +\newif\if@PJLlang@enable@all\@PJLlang@enable@alltrue +\newif\if@PJLlang@enable@EN\@PJLlang@enable@ENfalse +\newif\if@PJLlang@enable@FR\@PJLlang@enable@FRfalse +\newif\if@PJLlang@enable@DE\@PJLlang@enable@DEfalse +\newif\if@PJLlang@enable@IT\@PJLlang@enable@ITfalse +\newif\if@PJLlang@enable@PT\@PJLlang@enable@PTfalse +\newif\if@PJLlang@enable@BR\@PJLlang@enable@BRfalse +\newif\if@PJLlang@enable@ES\@PJLlang@enable@ESfalse +\newif\if@PJLlang@enable@CN\@PJLlang@enable@CNfalse +\newif\if@PJLlang@enable@TC\@PJLlang@enable@TCfalse +\newif\if@PJLlang@enable@JP\@PJLlang@enable@JPfalse +\newif\if@PJLlang@enable@RU\@PJLlang@enable@RUfalse +\DeclareVoidOption{EN}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}} +\DeclareVoidOption{english}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}} +\DeclareVoidOption{English}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}} +\DeclareVoidOption{FR}{\@PJLlang@enable@allfalse\@PJLlang@enable@FRtrue\providecommand{\PJLlang@mainlang}{FR}} +\DeclareVoidOption{french}{\@PJLlang@enable@allfalse\@PJLlang@enable@FRtrue\providecommand{\PJLlang@mainlang}{FR}} +\DeclareVoidOption{French}{\@PJLlang@enable@allfalse\@PJLlang@enable@FRtrue\providecommand{\PJLlang@mainlang}{FR}} +\DeclareVoidOption{DE}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}} +\DeclareVoidOption{german}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}} +\DeclareVoidOption{ngerman}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}} +\DeclareVoidOption{German}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}} +\DeclareVoidOption{IT}{\@PJLlang@enable@allfalse\@PJLlang@enable@ITtrue\providecommand{\PJLlang@mainlang}{IT}} +\DeclareVoidOption{italian}{\@PJLlang@enable@allfalse\@PJLlang@enable@ITtrue\providecommand{\PJLlang@mainlang}{IT}} +\DeclareVoidOption{Italian}{\@PJLlang@enable@allfalse\@PJLlang@enable@ITtrue\providecommand{\PJLlang@mainlang}{IT}} +\DeclareVoidOption{PT}{\@PJLlang@enable@allfalse\@PJLlang@enable@PTtrue\providecommand{\PJLlang@mainlang}{PT}} +\DeclareVoidOption{portuguese}{\@PJLlang@enable@allfalse\@PJLlang@enable@PTtrue\providecommand{\PJLlang@mainlang}{PT}} +\DeclareVoidOption{Portuguese}{\@PJLlang@enable@allfalse\@PJLlang@enable@PTtrue\providecommand{\PJLlang@mainlang}{PT}} +\DeclareVoidOption{BR}{\@PJLlang@enable@allfalse\@PJLlang@enable@BRtrue\providecommand{\PJLlang@mainlang}{BR}} +\DeclareVoidOption{brazilian}{\@PJLlang@enable@allfalse\@PJLlang@enable@BRtrue\providecommand{\PJLlang@mainlang}{BR}} +\DeclareVoidOption{Brazilian}{\@PJLlang@enable@allfalse\@PJLlang@enable@BRtrue\providecommand{\PJLlang@mainlang}{BR}} +\DeclareVoidOption{ES}{\@PJLlang@enable@allfalse\@PJLlang@enable@EStrue\providecommand{\PJLlang@mainlang}{ES}} +\DeclareVoidOption{spanish}{\@PJLlang@enable@allfalse\@PJLlang@enable@EStrue\providecommand{\PJLlang@mainlang}{ES}} +\DeclareVoidOption{Spanish}{\@PJLlang@enable@allfalse\@PJLlang@enable@EStrue\providecommand{\PJLlang@mainlang}{ES}} +\DeclareVoidOption{CN}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{chinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{Chinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{schinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{SChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{simplifiedchinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{SimplifiedChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}} +\DeclareVoidOption{TC}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}} +\DeclareVoidOption{tchinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}} +\DeclareVoidOption{TChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}} +\DeclareVoidOption{traditionalchinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}} +\DeclareVoidOption{TraditionalChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}} +\DeclareVoidOption{JP}{\@PJLlang@enable@allfalse\@PJLlang@enable@JPtrue\providecommand{\PJLlang@mainlang}{JP}} +\DeclareVoidOption{japanese}{\@PJLlang@enable@allfalse\@PJLlang@enable@JPtrue\providecommand{\PJLlang@mainlang}{JP}} +\DeclareVoidOption{Japanese}{\@PJLlang@enable@allfalse\@PJLlang@enable@JPtrue\providecommand{\PJLlang@mainlang}{JP}} +\DeclareVoidOption{RU}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}} +\DeclareVoidOption{russian}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}} +\DeclareVoidOption{Russian}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}} \ProcessKeyvalOptions*\relax +\providecommand{\PJLlang@mainlang}{EN} + +\if@PJLlang@enable@all + \@PJLlang@enable@ENtrue + \@PJLlang@enable@FRtrue + \@PJLlang@enable@DEtrue + \@PJLlang@enable@ITtrue + \@PJLlang@enable@PTtrue + \@PJLlang@enable@BRtrue + \@PJLlang@enable@EStrue + \@PJLlang@enable@CNtrue + \@PJLlang@enable@TCtrue + \@PJLlang@enable@JPtrue + \@PJLlang@enable@RUtrue +\fi + \newcommand\englishABBR{EN} \newcommand\frenchABBR{FR} \newcommand\ngermanABBR{DE} @@ -690,7 +764,19 @@ \endgroup% } -\UseLanguage{English} +\IfStrEqCase{\PJLlang@mainlang}{% + {EN}{\UseLanguage{EN}}% + {FR}{\UseLanguage{FR}}% + {DE}{\UseLanguage{DE}}% + {IT}{\UseLanguage{IT}}% + {PT}{\UseLanguage{PT}}% + {BR}{\UseLanguage{BR}}% + {ES}{\UseLanguage{ES}}% + {CN}{\UseLanguage{CN}}% + {TC}{\UseLanguage{TC}}% + {JP}{\UseLanguage{JP}}% + {RU}{\UseLanguage{RU}}% +} %</PJLlang> % %<*PJLlogo> @@ -742,6 +828,288 @@ \DeclareRobustCommand*{\ProjLibText}{\ProjLib@generic{j}} %</PJLlogo> % +%<*PJLmath> +\RequirePackage{mathtools} +\RequirePackage{mathrsfs} +\@ifpackageloaded{unicode-math}{}{\RequirePackage{amssymb}} + +%%================================ +%% Shorthands +%%================================ +\def\N{\ensuremath{\mathbb{N}}} +\def\Z{\ensuremath{\mathbb{Z}}} +\def\Q{\ensuremath{\mathbb{Q}}} +\def\R{\ensuremath{\mathbb{R}}} +\def\C{\ensuremath{\mathbb{C}}} +\def\F{\ensuremath{\mathbb{F}}} +\def\A{\ensuremath{\mathbb{A}}} + +\def\bb#1{\ensuremath{\mathbb{#1}}} +\def\bbA{\ensuremath{\mathbb{A}}} +\def\bbB{\ensuremath{\mathbb{B}}} +\def\bbC{\ensuremath{\mathbb{C}}} +\def\bbD{\ensuremath{\mathbb{D}}} +\def\bbE{\ensuremath{\mathbb{E}}} +\def\bbF{\ensuremath{\mathbb{F}}} +\def\bbG{\ensuremath{\mathbb{G}}} +\def\bbH{\ensuremath{\mathbb{H}}} +\def\bbI{\ensuremath{\mathbb{I}}} +\def\bbJ{\ensuremath{\mathbb{J}}} +\def\bbK{\ensuremath{\mathbb{K}}} +\def\bbL{\ensuremath{\mathbb{L}}} +\def\bbM{\ensuremath{\mathbb{M}}} +\def\bbN{\ensuremath{\mathbb{N}}} +\def\bbO{\ensuremath{\mathbb{O}}} +\def\bbP{\ensuremath{\mathbb{P}}} +\def\bbQ{\ensuremath{\mathbb{Q}}} +\def\bbR{\ensuremath{\mathbb{R}}} +\def\bbS{\ensuremath{\mathbb{S}}} +\def\bbT{\ensuremath{\mathbb{T}}} +\def\bbU{\ensuremath{\mathbb{U}}} +\def\bbV{\ensuremath{\mathbb{V}}} +\def\bbW{\ensuremath{\mathbb{W}}} +\def\bbX{\ensuremath{\mathbb{X}}} +\def\bbY{\ensuremath{\mathbb{Y}}} +\def\bbZ{\ensuremath{\mathbb{Z}}} + +\def\mc#1{\ensuremath{\mathcal{#1}}} +\def\mcA{\ensuremath{\mathcal{A}}} +\def\mcB{\ensuremath{\mathcal{B}}} +\def\mcC{\ensuremath{\mathcal{C}}} +\def\mcD{\ensuremath{\mathcal{D}}} +\def\mcE{\ensuremath{\mathcal{E}}} +\def\mcF{\ensuremath{\mathcal{F}}} +\def\mcG{\ensuremath{\mathcal{G}}} +\def\mcH{\ensuremath{\mathcal{H}}} +\def\mcI{\ensuremath{\mathcal{I}}} +\def\mcJ{\ensuremath{\mathcal{J}}} +\def\mcK{\ensuremath{\mathcal{K}}} +\def\mcL{\ensuremath{\mathcal{L}}} +\def\mcM{\ensuremath{\mathcal{M}}} +\def\mcN{\ensuremath{\mathcal{N}}} +\def\mcO{\ensuremath{\mathcal{O}}} +\def\mcP{\ensuremath{\mathcal{P}}} +\def\mcQ{\ensuremath{\mathcal{Q}}} +\def\mcR{\ensuremath{\mathcal{R}}} +\def\mcS{\ensuremath{\mathcal{S}}} +\def\mcT{\ensuremath{\mathcal{T}}} +\def\mcU{\ensuremath{\mathcal{U}}} +\def\mcV{\ensuremath{\mathcal{V}}} +\def\mcW{\ensuremath{\mathcal{W}}} +\def\mcX{\ensuremath{\mathcal{X}}} +\def\mcY{\ensuremath{\mathcal{Y}}} +\def\mcZ{\ensuremath{\mathcal{Z}}} + +\def\cal#1{\ensuremath{\mathcal{#1}}} +\def\calA{\ensuremath{\mathcal{A}}} +\def\calB{\ensuremath{\mathcal{B}}} +\def\calC{\ensuremath{\mathcal{C}}} +\def\calD{\ensuremath{\mathcal{D}}} +\def\calE{\ensuremath{\mathcal{E}}} +\def\calF{\ensuremath{\mathcal{F}}} +\def\calG{\ensuremath{\mathcal{G}}} +\def\calH{\ensuremath{\mathcal{H}}} +\def\calI{\ensuremath{\mathcal{I}}} +\def\calJ{\ensuremath{\mathcal{J}}} +\def\calK{\ensuremath{\mathcal{K}}} +\def\calL{\ensuremath{\mathcal{L}}} +\def\calM{\ensuremath{\mathcal{M}}} +\def\calN{\ensuremath{\mathcal{N}}} +\def\calO{\ensuremath{\mathcal{O}}} +\def\calP{\ensuremath{\mathcal{P}}} +\def\calQ{\ensuremath{\mathcal{Q}}} +\def\calR{\ensuremath{\mathcal{R}}} +\def\calS{\ensuremath{\mathcal{S}}} +\def\calT{\ensuremath{\mathcal{T}}} +\def\calU{\ensuremath{\mathcal{U}}} +\def\calV{\ensuremath{\mathcal{V}}} +\def\calW{\ensuremath{\mathcal{W}}} +\def\calX{\ensuremath{\mathcal{X}}} +\def\calY{\ensuremath{\mathcal{Y}}} +\def\calZ{\ensuremath{\mathcal{Z}}} + +\def\mf#1{\ensuremath{\mathfrak{#1}}} +\def\mfa{\ensuremath{\mathfrak{a}}} +\def\mfb{\ensuremath{\mathfrak{b}}} +\def\mfc{\ensuremath{\mathfrak{c}}} +\def\mfd{\ensuremath{\mathfrak{d}}} +\def\mfe{\ensuremath{\mathfrak{e}}} +\def\mff{\ensuremath{\mathfrak{f}}} +\def\mfg{\ensuremath{\mathfrak{g}}} +\def\mfh{\ensuremath{\mathfrak{h}}} +\def\mfi{\ensuremath{\mathfrak{i}}} +\def\mfj{\ensuremath{\mathfrak{j}}} +\def\mfk{\ensuremath{\mathfrak{k}}} +\def\mfl{\ensuremath{\mathfrak{l}}} +\def\mfm{\ensuremath{\mathfrak{m}}} +\def\mfn{\ensuremath{\mathfrak{n}}} +\def\mfo{\ensuremath{\mathfrak{o}}} +\def\mfp{\ensuremath{\mathfrak{p}}} +\def\mfq{\ensuremath{\mathfrak{q}}} +\def\mfr{\ensuremath{\mathfrak{r}}} +\def\mfs{\ensuremath{\mathfrak{s}}} +\def\mft{\ensuremath{\mathfrak{t}}} +\def\mfu{\ensuremath{\mathfrak{u}}} +\def\mfv{\ensuremath{\mathfrak{v}}} +\def\mfw{\ensuremath{\mathfrak{w}}} +\def\mfx{\ensuremath{\mathfrak{x}}} +\def\mfy{\ensuremath{\mathfrak{y}}} +\def\mfz{\ensuremath{\mathfrak{z}}} +\def\mfA{\ensuremath{\mathfrak{A}}} +\def\mfB{\ensuremath{\mathfrak{B}}} +\def\mfC{\ensuremath{\mathfrak{C}}} +\def\mfD{\ensuremath{\mathfrak{D}}} +\def\mfE{\ensuremath{\mathfrak{E}}} +\def\mfF{\ensuremath{\mathfrak{F}}} +\def\mfG{\ensuremath{\mathfrak{G}}} +\def\mfH{\ensuremath{\mathfrak{H}}} +\def\mfI{\ensuremath{\mathfrak{I}}} +\def\mfJ{\ensuremath{\mathfrak{J}}} +\def\mfK{\ensuremath{\mathfrak{K}}} +\def\mfL{\ensuremath{\mathfrak{L}}} +\def\mfM{\ensuremath{\mathfrak{M}}} +\def\mfN{\ensuremath{\mathfrak{N}}} +\def\mfO{\ensuremath{\mathfrak{O}}} +\def\mfP{\ensuremath{\mathfrak{P}}} +\def\mfQ{\ensuremath{\mathfrak{Q}}} +\def\mfR{\ensuremath{\mathfrak{R}}} +\def\mfS{\ensuremath{\mathfrak{S}}} +\def\mfT{\ensuremath{\mathfrak{T}}} +\def\mfU{\ensuremath{\mathfrak{U}}} +\def\mfV{\ensuremath{\mathfrak{V}}} +\def\mfW{\ensuremath{\mathfrak{W}}} +\def\mfX{\ensuremath{\mathfrak{X}}} +\def\mfY{\ensuremath{\mathfrak{Y}}} +\def\mfZ{\ensuremath{\mathfrak{Z}}} + +\def\frak#1{\ensuremath{\mathfrak{#1}}} +\def\fraka{\ensuremath{\mathfrak{a}}} +\def\frakb{\ensuremath{\mathfrak{b}}} +\def\frakc{\ensuremath{\mathfrak{c}}} +\def\frakd{\ensuremath{\mathfrak{d}}} +\def\frake{\ensuremath{\mathfrak{e}}} +\def\frakf{\ensuremath{\mathfrak{f}}} +\def\frakg{\ensuremath{\mathfrak{g}}} +\def\frakh{\ensuremath{\mathfrak{h}}} +\def\fraki{\ensuremath{\mathfrak{i}}} +\def\frakj{\ensuremath{\mathfrak{j}}} +\def\frakk{\ensuremath{\mathfrak{k}}} +\def\frakl{\ensuremath{\mathfrak{l}}} +\def\frakm{\ensuremath{\mathfrak{m}}} +\def\frakn{\ensuremath{\mathfrak{n}}} +\def\frako{\ensuremath{\mathfrak{o}}} +\def\frakp{\ensuremath{\mathfrak{p}}} +\def\frakq{\ensuremath{\mathfrak{q}}} +\def\frakr{\ensuremath{\mathfrak{r}}} +\def\fraks{\ensuremath{\mathfrak{s}}} +\def\frakt{\ensuremath{\mathfrak{t}}} +\def\fraku{\ensuremath{\mathfrak{u}}} +\def\frakv{\ensuremath{\mathfrak{v}}} +\def\frakw{\ensuremath{\mathfrak{w}}} +\def\frakx{\ensuremath{\mathfrak{x}}} +\def\fraky{\ensuremath{\mathfrak{y}}} +\def\frakz{\ensuremath{\mathfrak{z}}} +\def\frakA{\ensuremath{\mathfrak{A}}} +\def\frakB{\ensuremath{\mathfrak{B}}} +\def\frakC{\ensuremath{\mathfrak{C}}} +\def\frakD{\ensuremath{\mathfrak{D}}} +\def\frakE{\ensuremath{\mathfrak{E}}} +\def\frakF{\ensuremath{\mathfrak{F}}} +\def\frakG{\ensuremath{\mathfrak{G}}} +\def\frakH{\ensuremath{\mathfrak{H}}} +\def\frakI{\ensuremath{\mathfrak{I}}} +\def\frakJ{\ensuremath{\mathfrak{J}}} +\def\frakK{\ensuremath{\mathfrak{K}}} +\def\frakL{\ensuremath{\mathfrak{L}}} +\def\frakM{\ensuremath{\mathfrak{M}}} +\def\frakN{\ensuremath{\mathfrak{N}}} +\def\frakO{\ensuremath{\mathfrak{O}}} +\def\frakP{\ensuremath{\mathfrak{P}}} +\def\frakQ{\ensuremath{\mathfrak{Q}}} +\def\frakR{\ensuremath{\mathfrak{R}}} +\def\frakS{\ensuremath{\mathfrak{S}}} +\def\frakT{\ensuremath{\mathfrak{T}}} +\def\frakU{\ensuremath{\mathfrak{U}}} +\def\frakV{\ensuremath{\mathfrak{V}}} +\def\frakW{\ensuremath{\mathfrak{W}}} +\def\frakX{\ensuremath{\mathfrak{X}}} +\def\frakY{\ensuremath{\mathfrak{Y}}} +\def\frakZ{\ensuremath{\mathfrak{Z}}} + +\def\ms#1{\ensuremath{\mathscr{#1}}} +\def\msA{\ensuremath{\mathscr{A}}} +\def\msB{\ensuremath{\mathscr{B}}} +\def\msC{\ensuremath{\mathscr{C}}} +\def\msD{\ensuremath{\mathscr{D}}} +\def\msE{\ensuremath{\mathscr{E}}} +\def\msF{\ensuremath{\mathscr{F}}} +\def\msG{\ensuremath{\mathscr{G}}} +\def\msH{\ensuremath{\mathscr{H}}} +\def\msI{\ensuremath{\mathscr{I}}} +\def\msJ{\ensuremath{\mathscr{J}}} +\def\msK{\ensuremath{\mathscr{K}}} +\def\msL{\ensuremath{\mathscr{L}}} +\def\msM{\ensuremath{\mathscr{M}}} +\def\msN{\ensuremath{\mathscr{N}}} +\def\msO{\ensuremath{\mathscr{O}}} +\def\msP{\ensuremath{\mathscr{P}}} +\def\msQ{\ensuremath{\mathscr{Q}}} +\def\msR{\ensuremath{\mathscr{R}}} +\def\msS{\ensuremath{\mathscr{S}}} +\def\msT{\ensuremath{\mathscr{T}}} +\def\msU{\ensuremath{\mathscr{U}}} +\def\msV{\ensuremath{\mathscr{V}}} +\def\msW{\ensuremath{\mathscr{W}}} +\def\msX{\ensuremath{\mathscr{X}}} +\def\msY{\ensuremath{\mathscr{Y}}} +\def\msZ{\ensuremath{\mathscr{Z}}} + +\def\scr#1{\ensuremath{\mathscr{#1}}} +\def\scrA{\ensuremath{\mathscr{A}}} +\def\scrB{\ensuremath{\mathscr{B}}} +\def\scrC{\ensuremath{\mathscr{C}}} +\def\scrD{\ensuremath{\mathscr{D}}} +\def\scrE{\ensuremath{\mathscr{E}}} +\def\scrF{\ensuremath{\mathscr{F}}} +\def\scrG{\ensuremath{\mathscr{G}}} +\def\scrH{\ensuremath{\mathscr{H}}} +\def\scrI{\ensuremath{\mathscr{I}}} +\def\scrJ{\ensuremath{\mathscr{J}}} +\def\scrK{\ensuremath{\mathscr{K}}} +\def\scrL{\ensuremath{\mathscr{L}}} +\def\scrM{\ensuremath{\mathscr{M}}} +\def\scrN{\ensuremath{\mathscr{N}}} +\def\scrO{\ensuremath{\mathscr{O}}} +\def\scrP{\ensuremath{\mathscr{P}}} +\def\scrQ{\ensuremath{\mathscr{Q}}} +\def\scrR{\ensuremath{\mathscr{R}}} +\def\scrS{\ensuremath{\mathscr{S}}} +\def\scrT{\ensuremath{\mathscr{T}}} +\def\scrU{\ensuremath{\mathscr{U}}} +\def\scrV{\ensuremath{\mathscr{V}}} +\def\scrW{\ensuremath{\mathscr{W}}} +\def\scrX{\ensuremath{\mathscr{X}}} +\def\scrY{\ensuremath{\mathscr{Y}}} +\def\scrZ{\ensuremath{\mathscr{Z}}} + +%%================================ +%% Symbols for number theory +%%================================ +\ifdefined\@@pmod\else +\let\@@pmod\pmod +\DeclareRobustCommand{\pmod}{\@ifstar\@pmods\@@pmod} +\def\@pmods#1{\mkern4mu({\operator@font mod}\mkern 6mu#1)} +\fi + +\newcommand{\genlegendre}[4]{% + \genfrac{(}{)}{}{#1}{#3}{#4}% + \if\relax\detokenize{#2}\relax\else_{\!#2}\fi% +} +\newcommand{\legendre}[3][]{\genlegendre{}{#1}{#2}{#3}} +\newcommand{\dlegendre}[3][]{\genlegendre{0}{#1}{#2}{#3}} +\newcommand{\tlegendre}[3][]{\genlegendre{1}{#1}{#2}{#3}} +%</PJLmath> +% %<*PJLpaper> \RequirePackage{ifthen} @@ -822,6 +1190,7 @@ prefix = @PJLthm@ } \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{nothmnum} \DeclareBoolOption[false]{draft} \DeclareBoolOption[false]{fast} \DeclareBoolOption[false]{regionalref} @@ -1034,17 +1403,17 @@ % \newtheorem*{#2TC#3}{\csname#2nameTC\endcsname}% % \newtheorem*{#2JP#3}{\csname#2nameJP\endcsname}% % \newtheorem*{#2RU#3}{\csname#2nameRU\endcsname}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameEN\endcsname}{\newtheorem*{#2EN#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameFR\endcsname}{\newtheorem*{#2FR#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameDE\endcsname}{\newtheorem*{#2DE#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameIT\endcsname}{\newtheorem*{#2IT#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2namePT\endcsname}{\newtheorem*{#2PT#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameBR\endcsname}{\newtheorem*{#2BR#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameES\endcsname}{\newtheorem*{#2ES#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameCN\endcsname}{\newtheorem*{#2CN#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameTC\endcsname}{\newtheorem*{#2TC#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameJP\endcsname}{\newtheorem*{#2JP#3}}% - \expandafter\PassFirstToSecond\expandafter{\csname#2nameRU\endcsname}{\newtheorem*{#2RU#3}}% + \if@PJLlang@enable@EN\expandafter\PassFirstToSecond\expandafter{\csname#2nameEN\endcsname}{\newtheorem*{#2EN#3}}\fi% + \if@PJLlang@enable@FR\expandafter\PassFirstToSecond\expandafter{\csname#2nameFR\endcsname}{\newtheorem*{#2FR#3}}\fi% + \if@PJLlang@enable@DE\expandafter\PassFirstToSecond\expandafter{\csname#2nameDE\endcsname}{\newtheorem*{#2DE#3}}\fi% + \if@PJLlang@enable@IT\expandafter\PassFirstToSecond\expandafter{\csname#2nameIT\endcsname}{\newtheorem*{#2IT#3}}\fi% + \if@PJLlang@enable@PT\expandafter\PassFirstToSecond\expandafter{\csname#2namePT\endcsname}{\newtheorem*{#2PT#3}}\fi% + \if@PJLlang@enable@BR\expandafter\PassFirstToSecond\expandafter{\csname#2nameBR\endcsname}{\newtheorem*{#2BR#3}}\fi% + \if@PJLlang@enable@ES\expandafter\PassFirstToSecond\expandafter{\csname#2nameES\endcsname}{\newtheorem*{#2ES#3}}\fi% + \if@PJLlang@enable@CN\expandafter\PassFirstToSecond\expandafter{\csname#2nameCN\endcsname}{\newtheorem*{#2CN#3}}\fi% + \if@PJLlang@enable@TC\expandafter\PassFirstToSecond\expandafter{\csname#2nameTC\endcsname}{\newtheorem*{#2TC#3}}\fi% + \if@PJLlang@enable@JP\expandafter\PassFirstToSecond\expandafter{\csname#2nameJP\endcsname}{\newtheorem*{#2JP#3}}\fi% + \if@PJLlang@enable@RU\expandafter\PassFirstToSecond\expandafter{\csname#2nameRU\endcsname}{\newtheorem*{#2RU#3}}\fi% }{% \IfValueTF{#5}{% \newcounter{#2#3}[{#5}]% @@ -1057,17 +1426,17 @@ {\newcounter{#2#3}}% }% %--------------------------------------------------------------- - \CreateTheoremNumberedLikeAliasCounter{#2}{EN}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{FR}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{DE}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{IT}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{PT}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{BR}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{ES}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{CN}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{TC}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{JP}{#3}% - \CreateTheoremNumberedLikeAliasCounter{#2}{RU}{#3}% + \if@PJLlang@enable@EN\CreateTheoremNumberedLikeAliasCounter{#2}{EN}{#3}\fi% + \if@PJLlang@enable@FR\CreateTheoremNumberedLikeAliasCounter{#2}{FR}{#3}\fi% + \if@PJLlang@enable@DE\CreateTheoremNumberedLikeAliasCounter{#2}{DE}{#3}\fi% + \if@PJLlang@enable@IT\CreateTheoremNumberedLikeAliasCounter{#2}{IT}{#3}\fi% + \if@PJLlang@enable@PT\CreateTheoremNumberedLikeAliasCounter{#2}{PT}{#3}\fi% + \if@PJLlang@enable@BR\CreateTheoremNumberedLikeAliasCounter{#2}{BR}{#3}\fi% + \if@PJLlang@enable@ES\CreateTheoremNumberedLikeAliasCounter{#2}{ES}{#3}\fi% + \if@PJLlang@enable@CN\CreateTheoremNumberedLikeAliasCounter{#2}{CN}{#3}\fi% + \if@PJLlang@enable@TC\CreateTheoremNumberedLikeAliasCounter{#2}{TC}{#3}\fi% + \if@PJLlang@enable@JP\CreateTheoremNumberedLikeAliasCounter{#2}{JP}{#3}\fi% + \if@PJLlang@enable@RU\CreateTheoremNumberedLikeAliasCounter{#2}{RU}{#3}\fi% %--------------------------------------------------------------- }% \NewDocumentEnvironment{#2#3}{} @@ -1361,6 +1730,17 @@ \newaliascnt{PJLthm@highest}{section} } \if@PJLthm@nothms\else +\if@PJLthm@nothmnum +\CreateTheorem*{theorem} +\CreateTheorem*{lemma} +\CreateTheorem*{proposition} +\CreateTheorem*{corollary} +\CreateTheorem*{definition-proposition} +\CreateTheorem*{definition-theorem} +\CreateTheorem*{property} +\CreateTheorem*{fact} +\CreateTheorem*{conjecture} +\else \CreateTheorem{theorem}<PJLthm@highest> \CreateTheorem{lemma}[theorem] \CreateTheorem{proposition}[theorem] @@ -1370,6 +1750,7 @@ \CreateTheorem{property}[theorem] \CreateTheorem{fact}[theorem] \CreateTheorem{conjecture}[theorem] +\fi \CreateTheorem*{theorem*} \CreateTheorem*{lemma*} \CreateTheorem*{proposition*} @@ -1381,6 +1762,18 @@ \CreateTheorem*{conjecture*} \theoremstyle{definition} +\if@PJLthm@nothmnum +\CreateTheorem*{definition} +\CreateTheorem*{axiom} +\CreateTheorem*{assumption} +\CreateTheorem*{convention} +\CreateTheorem*{hypothesis} +\CreateTheorem*{notation} +\CreateTheorem*{example} +\CreateTheorem*{problem} +\CreateTheorem*{question} +\CreateTheorem*{exercise} +\else \CreateTheorem{definition}[theorem] \CreateTheorem{axiom}[theorem] \CreateTheorem{assumption}[theorem] @@ -1391,6 +1784,7 @@ \CreateTheorem{problem}[theorem] \CreateTheorem{question}[theorem] \CreateTheorem{exercise}[theorem] +\fi \CreateTheorem*{definition*} \CreateTheorem*{axiom*} \CreateTheorem*{assumption*} @@ -1403,9 +1797,14 @@ \CreateTheorem*{exercise*} \theoremstyle{remark} +\if@PJLthm@nothmnum +\CreateTheorem*{remark} +\CreateTheorem*{observation} +\else \CreateTheorem{remark}<PJLthm@highest> -\CreateTheorem*{remark*} \CreateTheorem{observation}<PJLthm@highest> +\fi +\CreateTheorem*{remark*} \CreateTheorem*{observation*} \fi @@ -1509,6 +1908,7 @@ \DeclareBoolOption[false]{author} \DeclareBoolOption[false]{amssim} \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{nothmnum} \DeclareBoolOption[false]{regionalref} \DeclareBoolOption[false]{useosf} \DeclareBoolOption[false]{palatino} @@ -1528,6 +1928,9 @@ \if@PJLtoolkit@nothms \PassOptionsToPackage{nothms}{PJLthm} \fi +\if@PJLtoolkit@nothmnum + \PassOptionsToPackage{nothmnum}{PJLthm} +\fi \if@PJLtoolkit@regionalref \PassOptionsToPackage{regionalref}{PJLthm} \fi @@ -1541,6 +1944,7 @@ \RequirePackage{PJLdate} \RequirePackage{PJLdraft} \RequirePackage{PJLlogo} +\RequirePackage{PJLmath} \RequirePackage{PJLpaper} \RequirePackage{PJLthm} @@ -1550,14 +1954,14 @@ % \RequirePackage{inputenc} % \fi % -\RequirePackage{mathtools} +% \RequirePackage{mathtools} % \PJL@font@alreadyset should contain the current font name % A message can then be shown as: Font "(font name)" has been set \ifdefined\PJL@font@alreadyset\else \if@PJLtoolkit@palatino - \RequirePackage{amssymb} + % \RequirePackage{amssymb} \RequirePackage{mathpazo} \PassOptionsToPackage{defaultsups}{newpxtext} \RequirePackage{newpxtext} @@ -1568,7 +1972,7 @@ \fi \if@PJLtoolkit@times - \RequirePackage{amssymb} + % \RequirePackage{amssymb} \PassOptionsToPackage{defaultsups}{newtxtext} \RequirePackage{newtxtext} \RequirePackage{newtxmath} @@ -1578,7 +1982,7 @@ \fi \if@PJLtoolkit@garamond - \RequirePackage{amssymb} + % \RequirePackage{amssymb} \if@PJLtoolkit@useosf\else \PassOptionsToPackage{lining}{ebgaramond} \fi @@ -1589,7 +1993,7 @@ \fi \if@PJLtoolkit@biolinum - \RequirePackage{amssymb} + % \RequirePackage{amssymb} % \RequirePackage{mathpazo} % \RequirePackage[sansmath]{libertinust1math} \ifPDFTeX diff --git a/macros/latex/contrib/projlib/ProjLib.ins b/macros/latex/contrib/projlib/ProjLib.ins index a0d0c5099d..29806981d2 100644 --- a/macros/latex/contrib/projlib/ProjLib.ins +++ b/macros/latex/contrib/projlib/ProjLib.ins @@ -46,6 +46,7 @@ and version 1.3c or later is part of all distributions of LaTeX version \generate{\file{PJLdraft.sty}{\from{ProjLib.dtx}{PJLdraft}}} \generate{\file{PJLlang.sty}{\from{ProjLib.dtx}{PJLlang}}} \generate{\file{PJLlogo.sty}{\from{ProjLib.dtx}{PJLlogo}}} +\generate{\file{PJLmath.sty}{\from{ProjLib.dtx}{PJLmath}}} \generate{\file{PJLpaper.sty}{\from{ProjLib.dtx}{PJLpaper}}} \generate{\file{PJLthm.sty}{\from{ProjLib.dtx}{PJLthm}}} \generate{\file{PJLtoolkit.sty}{\from{ProjLib.dtx}{PJLtoolkit}}} @@ -63,6 +64,7 @@ and version 1.3c or later is part of all distributions of LaTeX version \Msg{* PJLdraft.sty *} \Msg{* PJLlang.sty *} \Msg{* PJLlogo.sty *} +\Msg{* PJLmath.sty *} \Msg{* PJLpaper.sty *} \Msg{* PJLthm.sty *} \Msg{* PJLtoolkit.sty *} diff --git a/macros/latex/contrib/projlib/README.md b/macros/latex/contrib/projlib/README.md index 8a38c50415..d2c257b43b 100644 --- a/macros/latex/contrib/projlib/README.md +++ b/macros/latex/contrib/projlib/README.md @@ -24,6 +24,8 @@ The collection includes: - Currently support Chinese (simplified and traditional), English, French, German, Italien, Japanese, Portuguese (European and Brazilian), Russian and Spanish 1. `PJLlogo.sty` - Draw the ProjLib logo +1. `PJLmath.sty` + - Useful math macros and shortcuts 1. `PJLpaper.sty` - Paper style configuration: yellow theme, dark theme and nord theme 1. `PJLthm.sty` |