summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-14 03:01:02 +0000
committerNorbert Preining <norbert@preining.info>2024-05-14 03:01:02 +0000
commitf37b07217a41ad15251ba603bade202897769a05 (patch)
tree81a43508517df44f8f920bdba15c92e32482b0fc /macros/latex/contrib
parent783a8e848cd9e9023287546627c43afbcae2d2f6 (diff)
CTAN sync 202405140301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx14
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin632184 -> 632177 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex6
-rw-r--r--macros/latex/contrib/rigidnotation/README.md31
-rw-r--r--macros/latex/contrib/rigidnotation/rigidnotation.dtx507
-rw-r--r--macros/latex/contrib/rigidnotation/rigidnotation.ins41
-rw-r--r--macros/latex/contrib/rigidnotation/rigidnotation.pdfbin0 -> 273004 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin95183 -> 91761 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty51
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex13
10 files changed, 623 insertions, 40 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 3ebd079924..cc85f0b20a 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2024/05/12}{2024bo}
+\ProvidesExplClass{easybook}{2024/05/13}{2024bp}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/05/12}{2024bo}
+\ProvidesExplPackage{easybase}{2024/05/13}{2024bp}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -436,7 +436,6 @@
}
}
\ctex_disable_package:n { nccfoots }
-\ctex_disable_package:n { setspace }
\ctex_disable_package:n { tocloft }
\ctex_disable_package:n { titlesec }
@@ -1053,6 +1052,7 @@
}
\cs_set_eq:NN \eb@@makefntext \@makefntext
\cs_set_eq:NN \eb@@footnotetext \@footnotetext
+\cs_set_eq:NN \eb@@mpfootnotetext \@mpfootnotetext
\ctex_at_end_package:nn { footmisc }
{
\eb_package_date_check:nn { footmisc } { 2022/02/10 }
@@ -1076,7 +1076,11 @@
hang,~symbol,~perpage,~marginal~or~flushmargin \\
options~of~'footmisc'~package.
}
-
+\ctex_at_end_package:nn { setspace }
+ {
+ \cs_set_eq:NN \@footnotetext \eb@@footnotetext
+ \cs_set_eq:NN \@mpfootnotetext \eb@@mpfootnotetext
+ }
\cs_set_protected:Npn \footref #1
{
\group_begin:
@@ -2553,7 +2557,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/12}{2024bo}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/13}{2024bp}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index d39bbfb09f..bea8bdcc6b 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 558f5dde4d..929e65a67e 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024bo,
- date = 2024/05/12,
+ version = v2024bp,
+ date = 2024/05/13,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -47,7 +47,7 @@
\addtokomafont{subsubsection}{\normalfont\sffamily}
\DeclareTOCStyleEntry[entryformat = \sffamily]{default}{section}
\DeclareFieldFormat[book]{title}{\textsf{#1}}
-\geometry{margin = 1in,marginparwidth = 0.6in}
+\geometry{margin = 1in,marginparwidth = 0.6in,footskip = 0.5in}
\SetEnumitemValue{label}{smallbullet}{\small\color{DarkBlue}\textbullet}
\setlist{nosep,topsep = \smallskipamount,labelsep = 0.5em}
\setlist[1]{labelindent = \parindent}
diff --git a/macros/latex/contrib/rigidnotation/README.md b/macros/latex/contrib/rigidnotation/README.md
new file mode 100644
index 0000000000..06e65991d9
--- /dev/null
+++ b/macros/latex/contrib/rigidnotation/README.md
@@ -0,0 +1,31 @@
+# The rigidnotation LaTeX package
+This package provides LaTeX macros to easily and concisely typeset vectors and matrices in a flexible way such as to follow the RIGID notation convention. The package enables the user to define custom commands that can then be used in any math-mode environment to efficiently and rigorously typeset the notational elements commonly used in robotics research (and many other fields) for position vectors, rotation matrices, pose matrices, etc.
+
+## Documentation
+This package is [available on CTAN](https://ctan.org/pkg/rigidnotation), and a PDF manual is accessible here.
+
+## Local Installation
+If you want to install the package manually on your local computer, you can follow the steps outlined below.
+1. Run `kpsewhich -var-value TEXMFHOME` to get the path to your TeX package home.
+Assuming that your TeX package home is `$TEXHOME`,
+2. Run `mkdir -p $TEXHOME/tex/latex/rigidnotation/` to create a directory for this package.
+3. Run `tex rigidnotation.ins` to generate the `rigidnotation.sty` macro file.
+3. Run `cp rigidnotation.sty $TEXHOME/tex/latex/rigidnotation/` to install the package.
+3. Run `pdflatex -interaction=nonstopmode rigidnotation.dtx` to build the documentation.
+5. Run `texhash $TEXHOME` to update the LaTeX package tree.
+
+## Requirements
+This package depends on [mathtools](https://ctan.org/pkg/mathtools) and [xparse](https://ctan.org/pkg/xparse) packages, both of which are widely used.
+
+## License
+Copyright (C) 2024 Philippe Nadeau
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in:
+
+http://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008-05-04 or later. \ No newline at end of file
diff --git a/macros/latex/contrib/rigidnotation/rigidnotation.dtx b/macros/latex/contrib/rigidnotation/rigidnotation.dtx
new file mode 100644
index 0000000000..565ac2bb50
--- /dev/null
+++ b/macros/latex/contrib/rigidnotation/rigidnotation.dtx
@@ -0,0 +1,507 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2024 Philippe Nadeau
+% --------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+% \fi
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{rigidnotation}[2024/05/13 1.0.0 Rigid Notation]
+%
+%<*driver>
+\documentclass{ltxdoc}
+% This package is required to build its own documentation!
+\usepackage{rigidnotation}
+\NewRigidNotation{Vel}{v}
+\NewRigidNotation{Acc}{a}
+\setlength{\fboxsep}{0pt}
+\setlength{\fboxrule}{0.1pt}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+\DocInput{rigidnotation.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \def\oargument#1{\texttt{[\meta{#1}]}}
+% \def\margument#1{\texttt{\{\meta{#1}\}}}
+%
+%
+% \changes{v1.0}{2024-05-13}{Initial version}
+%
+% \GetFileInfo{rigidnotation.sty}
+%
+% \DoNotIndex{}
+%
+% \title{The \textsf{rigidnotation} package\thanks{This document
+% corresponds to \textsf{rigidnotation}~\fileversion,
+% dated \filedate.}}
+% \author{Philippe Nadeau \\ \texttt{philippe.nadeau [at] robotics.utias.utoronto.ca}}
+% \date{\filedate}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This package provides \LaTeX\ macros to easily and concisely typeset vectors and matrices in a flexible way such as to follow the RIGID notation convention. The package enables the user to define custom commands that can then be used in any math-mode environment to efficiently and rigorously typeset the notational elements commonly used in robotics research (and many other fields) for position vectors, rotation matrices, pose matrices, etc.
+% \end{abstract}
+%
+% \section{Introduction}
+% A useful typesetting system should reduce to a minimum the number of keystrokes required by the user while enabling a flexible usage of the system and cater to various needs. This is the philosophy behind this package.
+%
+% This package makes it easy to typeset vectors and matrices following the RIGID convention, which is compliant with the \textit{ISO 800000 Standard on Quantities and Units}. To do so, this package defines a \textit{command factory} that can be used to concisely generate multiple commands, each one dedicated to a user-defined quantity (e.g. position vector, velocity vector, rotation matrix). The user can then call the generated commands within math-mode environments to typeset a concise representation of the quantity.
+%
+% For instance, |\Pos[\dot]{s}{b}{w}\Tran| produces
+% \begin{equation*}
+% \resizebox{1cm}{!}{$\Pos[\dot]{s}{b}{w}\Tran$}
+% \end{equation*}
+% which very concisely represents the time-derivative of the transposed position vector of subject $s$ with respect to basis $b$ when expressed in coordinate system $w$. When typing the keystrokes, the user can think: \textit{position of $s$ with respect to $b$ expressed in $w$, transposed}. Except for the accent, the order in which the elements are typed respects the order in which they can be spoken, making it easier to remember the order of the arguments.
+%
+% The \textit{subject} of a quantity is the elements to which the quantity pertains (e.g. the orientation of the subject, the velocity of the subject). The \textit{basis} is the element relative to which the quantity is observed/measured/defined (e.g. the velocity of the car/subject relative to the train/basis). A vector quantity is commonly pictured as an arrow pointing from the basis to the subject. To facilitate computations, quantities are \textit{expressed} in a \textit{coordinate system} such that they can be represented as a set of numbers. Sometime it makes sense to specify only a subset of the four elements: quantity, subject, basis, and coordinate system. This package allows the user to specify only the necessary elements. A \textit{concise mode} can also be enabled such that when the basis and coordinate system are the same, only the basis is denoted.
+%
+% \section{Usage}
+% The typical usage of the package involves defining quantities of interest in the preamble, like
+% \begin{verbatim}
+% \usepackage{rigidnotation}
+% \NewRigidNotation{Vel}{v} % Velocity
+% \NewRigidNotation{Acc}{a} % Acceleration
+% % Whether the concise notation is desired
+% \SetConciseNotation{\BooleanTrue}
+% \end{verbatim}
+% in which quantities representing velocities and accelerations are defined. Then, in any math-mode environment, variations of the following commands can be used:
+% \begin{verbatim}
+% \begin{equation*}
+% 1:\Vel \quad
+% 2:\Vel[\hat] \quad
+% 3:\Vel[\ddot]{s} \quad
+% 4:\SetConciseNotation \Vel{s}{b}{b} \quad
+% 5:\Vel{s}{b}{c} \quad
+% 6:\UnsetConciseNotation \Vel{s}{b}{b} \quad
+% 7:\Acc{s}{b}\Tran \quad
+% 8:\Acc{s}{b}^2 \quad
+% 9:\Rot{s}{b}\Inv \quad
+% \end{equation*}
+% \end{verbatim}
+% to produce
+% \begin{equation*}
+% 1:\Vel \quad
+% 2:\Vel[\hat] \quad
+% 3:\Vel[\ddot]{s} \quad
+% 4:\SetConciseNotation \Vel{s}{b}{b} \quad
+% 5:\Vel{s}{b}{c} \quad
+% 6:\UnsetConciseNotation \Vel{s}{b}{b} \quad
+% 7:\Acc{W}{b}\Tran \quad
+% 8:\Acc{W}{b}^2 \quad
+% 9:\Rot{W}{b}\Inv
+% \end{equation*}
+% where the concise notation was enabled for items 4 and 5 but disabled for element 6 (notice the difference). Also note that command |\Rot| was used even though it was not defined in the preamble. This is because the package comes with a few pre-defined quantities: |\Pos|, |\Rot|, and |\Pose|.
+%
+% \subsection{Commands}
+% In the following, arguments surrounded by square brackets are optional while those surrounded by curly brackets are mandatory like \oargument{optional} and \margument{mandatory} respectively.
+%
+% \vspace{5mm}\DescribeMacro{\NewRigidNotation}
+% \hspace{-6.5mm} \textbf{Arguments}:
+% \begin{enumerate}
+% \item \margument{name}: Name of the command to create.
+% \item \margument{symbol}: Symbol used to represent the quantity.
+% \end{enumerate}
+% \textbf{Description}:\\
+% Define a new command that can be used to typeset a physical or mathematical quantity according to the RIGID convention.
+% For instance, |\NewRigidNotation{Pos}{p}| can be used to create a new command |\Pos| for typesetting position vectors, with the |p| symbol being used to represent the quantity. After it has been defined, the new command can be used with the following arguments:
+% \begin{enumerate}
+% \item \oargument{accent}: Command to put an accent over the letter (e.g. |\hat|).
+% \item \oargument{subject}: The symbol of the \textit{subject} (e.g. vector endpoint).
+% \item \oargument{basis}: The symbol of the \textit{basis} (e.g. vector origin).
+% \item \oargument{coord}: Symbol for the coordinate system potentially used.
+% \end{enumerate}
+% Hence, this is a kind of meta-command or command factory: |\NewRigidNotation| creates a new command that can be used with arguments.
+%For instance, calling |\NewRigidNotation{Pos}{p}| defines a new command |\Pos| that can be used with zero or more arguments, as in |\Pos[\dot]{a}{b}{c}|, in which |a| is the subject symbol, |b| is the basis symbol, |c| is the coordinate system, and a dot ($\cdot$) will be placed above the |p| in the notation, producing $\Pos[\dot]{a}{b}{c}$.
+%
+% \vspace{5mm}\DescribeMacro{\SetConciseNotation}
+% \hspace{-6.5mm} \textbf{Arguments}:
+% \begin{enumerate}
+% \item \oargument{bool}: Either |\BooleanTrue| or |\BooleanFalse|.
+% \end{enumerate}
+% \textbf{Description}:\\
+% Sets whether to use the concise notation that omits to state the coordinate system when the basis and coordinate systems are the same. Calling |\SetConciseNotation| with no argument will enable the concise notation, which is the same as |\SetConciseNotation{\BooleanTrue}|. Note that, although the argument is optional, curly brackets are used.
+% Also note that the concise notation can be enabled/disabled multiple times throughout the document.
+%
+% \vspace{5mm}\DescribeMacro{\UnsetConciseNotation}
+% \hspace{-6.5mm} \textbf{Arguments}: None.\\
+% \textbf{Description}:\\
+% Informs the package that the concise notation should not be used. This is equivalent to |\SetConciseNotation{\BooleanFalse}| and is the default behaviour.
+%
+% \vspace{5mm}\DescribeMacro{\Tran}
+% \hspace{-6.5mm} Macro that typesets a $\cdot^\mathsf{T}$ in the right super-script position to denote the transpose\
+% as in $\Pos{a}{b}{c}\Tran$.
+%
+% \vspace{5mm}\DescribeMacro{\Inv}
+% \hspace{-6.5mm} Macro that typesets a $\cdot^{-1}$ in the right super-script position to denote the inverse\
+% as in $\Pos{a}{b}{c}\Inv$.
+%
+% \vspace{5mm}\DescribeMacro{\Herm}
+% \hspace{-6.5mm} Macro that typesets a $\cdot^\mathsf{H}$ in the right super-script position to denote the Hermitian\
+% as in $\Rot{a}{b}\Herm$.
+%
+% \vspace{5mm}\DescribeMacro{\Conj}
+% \hspace{-6.5mm} Macro that typesets a $\cdot^\ast$ in the right super-script position to denote the complex conjugate\
+% as in $\Pos\Conj$.
+%
+% \MaybeStop{}
+%
+% \section{Implementation}
+%
+% \begin{macro}{\SetConciseNotation}
+% Defines whether the concise notation is used or not.
+% When used the concise notation will ommit mentionning
+% the reference frame when the source and reference are the same.
+%
+% To use the concise notation, either call |\SetConciseNotation|
+% with no argument or with |\SetConciseNotation{\BooleanTrue}|.
+% \begin{macrocode}
+\usepackage{xparse}
+\usepackage{mathtools}
+
+%This box is used to measure the width of the post-script
+\newsavebox{\RN@postbox}
+\newlength{\RN@postboxwd}
+\newsavebox{\RN@expbox}
+\newlength{\RN@expboxwd}
+%Spacing before and after the symbol
+\def\RN@prespace{0.08em}
+\def\RN@postspace{0.23em}
+
+\NewDocumentCommand{\SetConciseNotation}{g}
+{
+ \newif\IfRN@C
+ \IfNoValueTF{#1}
+ {
+ \RN@Ctrue
+ }
+ {
+ \IfBooleanTF{#1}
+ {
+ \RN@Ctrue
+ }
+ {
+ \RN@Cfalse
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UnsetConciseNotation}
+% Disables the concise notation.
+% This is equivalent to |\SetConciseNotation{\BooleanFalse}|.
+% \begin{macrocode}
+\def\UnsetConciseNotation{\SetConciseNotation{\BooleanFalse}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\RN@makecmd}
+% \textbf{Arguments}:
+% \begin{enumerate}
+% \item \oargument{accent}: Command to put an accent over the letter (e.g. |\hat|).
+% \item \margument{qty}: Symbol for the quantity to represent.
+% \item \oargument{subject}: The symbol of the \textit{subject} (e.g. vector endpoint).
+% \item \oargument{basis}: The symbol of the \textit{basis} (e.g. vector origin).
+% \item \oargument{coord}: Symbol for the coordinate system potentially used.
+% \end{enumerate}
+% \textbf{Description}:\\
+% Defines a typesetting command from arguments. Main typesetting routine that should not be needed by the end-user. Instead, the end-user should use |\NewRigidNotation| to define typesetting commands. If the basis and coordinate system are the same, the coordinate system is omitted when the |RN@C| keyword is set.
+% \begin{macrocode}
+\NewDocumentCommand{\RN@makecmd}{omggg}
+{
+ \IfNoValueTF{#1}{\def\RN@symb{\boldsymbol{#2}}}{\def\RN@symb{#1{\boldsymbol{#2}}}}
+ \IfNoValueTF{#3}
+ {%subject is not specified
+ \IfNoValueTF{#4}
+ {%basis is not specified
+ \IfNoValueTF{#5}
+ {%subject, basis and coordinate system are not specified
+ \RN@symb
+ }
+ {%subject and basis are not specified, coordinate system is specified
+ \hspace{\RN@prespace}
+ \prescript{#5}{}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ }
+ }
+ {%basis is specified
+ \IfNoValueTF{#5}%
+ {%basis is specified, subject and coordinate system are not specified
+ \hspace{\RN@prespace}
+ \prescript{}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ }
+ {%basis and coordinate system are specified, subject is not specified
+ \IfEq{#4}{#5}
+ {
+ \IfRN@C
+ {%basis and coordinate system are the same and RN@C is set
+ \hspace{\RN@prespace}
+ \prescript{}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ }
+ {
+ \hspace{\RN@prespace}
+ \prescript{#5}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ }
+ }
+ {
+ \hspace{\RN@prespace}
+ \prescript{#5}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ }
+ }
+ }
+ %If there is no subject, no space is needed on the right of the symbol
+ \setlength{\RN@postboxwd}{0pt}
+ }
+ {%subject is specified
+ \IfNoValueTF{#4}
+ {%basis is not specified
+ \IfNoValueTF{#5}
+ {%subject is specified, basis and coordinate system are not specified
+ \RN@symb
+ \hspace{-\RN@postspace}
+ \prescript{}{#3}{}
+ }
+ {%basis is not specified, subject and coordinate system are specified
+ \hspace{\RN@prespace}
+ \prescript{#5}{}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ \hspace{-\RN@postspace}
+ \prescript{}{#3}{}
+ }
+ }
+ {%basis is specified
+ \IfNoValueTF{#5}
+ {%subject and basis are specified, coordinate system is not specified
+ \hspace{\RN@prespace}
+ \prescript{}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ \hspace{-\RN@postspace}
+ \prescript{}{#3}{}
+ }
+ {%subject, basis, and coordinate system are specified
+ \def\RN@argfour{#4}
+ \def\RN@argfive{#5}
+ \ifx\RN@argfour\RN@argfive
+ {
+ \IfRN@C
+ {%basis and coordinate system are the same and RN@C is set
+ \hspace{\RN@prespace}
+ \prescript{}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ \hspace{-\RN@postspace}
+ \prescript{}{#3}{}
+ }
+ \else
+ {
+ \hspace{\RN@prespace}
+ \prescript{#5}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ \hspace{-\RN@postspace}
+ \prescript{}{#3}{}
+ }
+ \fi
+ }
+ \else
+ {
+ \hspace{\RN@prespace}
+ \prescript{#5}{#4}{
+ \hspace{-\RN@prespace}
+ \RN@symb
+ }
+ \hspace{-\RN@postspace}
+ \prescript{}{#3}{}
+ }
+ \fi
+ }
+ }
+ %If there is a subject, we need to know the width
+ %of the symbol to bring the exponent closer
+ \sbox{\RN@postbox}{$#3$}
+ \setlength{\RN@postboxwd}{\wd\RN@postbox}
+ }
+ %If the following command is an exponent-type command,
+ %we bring it closer to the symbol.
+ %The next line has to be the last of the macro
+ \@ifnextchar^{\hspace{\RN@postspace}\hspace{-\RN@postboxwd}}{}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\NewRigidNotation}
+% \textbf{Arguments}:
+% \begin{enumerate}
+% \item \margument{cmd}: New command name.
+% \item \margument{sym}: Symbol for the quantity to represent.
+% \end{enumerate}
+% \textbf{Description}:
+% Defines a new command that can be used to typeset the given symbol using the RIGID convention.
+% This essentially expands |\NewRigidNotation{cmd}{sym}| into |\NewDocumentCommand{cmd}{oggg}{\RN@makecmd[#1]{sym}{#2}{#3}{#4}}| such that |\cmd| can be used afterward with up to four arguments.
+% \begin{macrocode}
+\NewDocumentCommand{\NewRigidNotation}{mm}%
+{%
+ \expandafter\NewDocumentCommand\csname #1\endcsname{oggg}%
+ {%
+ \expandafter\csname RN@makecmd\endcsname[##1]{#2}{##2}{##3}{##4}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Tran}
+% Macro that typesets a $\mathsf{T}$ in the right super-script position, closer to the quantity than normal, and with a smaller font size.
+% \begin{macrocode}
+\def\Tran{%
+ \sbox{\RN@expbox}{${\scriptscriptstyle\mathsf{T}}$}%
+ \setlength{\RN@expboxwd}{\wd\RN@expbox}%
+ \ifnum \RN@postboxwd>0%
+ \hspace{\RN@postspace}%
+ \hspace{-\RN@postboxwd}%
+ \ifnum \RN@postboxwd>\RN@expboxwd%
+ \mathmakebox[\RN@postboxwd][l]{%
+ {}^{\scriptscriptstyle\mathsf{T}}%
+ }%
+ \else%
+ \mathmakebox[\RN@expboxwd][l]{%
+ {}^{\scriptscriptstyle\mathsf{T}}%
+ }%
+ \fi%
+ \else%
+ ^{\scriptscriptstyle\mathsf{T}}%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Inv}
+% Macro that typesets a $\mathsf{-1}$ in the right super-script position, closer to the quantity than normal, and with a smaller font size.
+% \begin{macrocode}
+\def\Inv{%
+ \sbox{\RN@expbox}{${\scriptscriptstyle{-1}}$}%
+ \setlength{\RN@expboxwd}{\wd\RN@expbox}%
+ \ifnum \RN@postboxwd>0%
+ \hspace{\RN@postspace}%
+ \hspace{-\RN@postboxwd}%
+ \ifnum \RN@postboxwd>\RN@expboxwd%
+ \mathmakebox[\RN@postboxwd][l]{%
+ {}^{\scriptscriptstyle{-1}}%
+ }%
+ \else%
+ \mathmakebox[\RN@expboxwd][l]{%
+ {}^{\scriptscriptstyle{-1}}%
+ }%
+ \fi%
+ \else%
+ ^{\scriptscriptstyle{-1}}%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Herm}
+% Macro that typesets a $\mathsf{H}$ in the right super-script position, closer to the quantity than normal, and with a smaller font size.
+% \begin{macrocode}
+\def\Herm{%
+ \sbox{\RN@expbox}{${\scriptscriptstyle\mathsf{H}}$}%
+ \setlength{\RN@expboxwd}{\wd\RN@expbox}%
+ \ifnum \RN@postboxwd>0%
+ \hspace{\RN@postspace}%
+ \hspace{-\RN@postboxwd}%
+ \ifnum \RN@postboxwd>\RN@expboxwd%
+ \mathmakebox[\RN@postboxwd][l]{%
+ {}^{\scriptscriptstyle\mathsf{H}}%
+ }%
+ \else%
+ \mathmakebox[\RN@expboxwd][l]{%
+ {}^{\scriptscriptstyle\mathsf{H}}%
+ }%
+ \fi%
+ \else%
+ ^{\scriptscriptstyle\mathsf{H}}%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Conj}
+% Macro that typesets a $\ast$ in the right super-script position, closer to the quantity than normal, and with a smaller font size.
+% \begin{macrocode}
+\def\Conj{%
+ \sbox{\RN@expbox}{${\scriptscriptstyle\ast}$}%
+ \setlength{\RN@expboxwd}{\wd\RN@expbox}%
+ \ifnum \RN@postboxwd>0%
+ \hspace{\RN@postspace}%
+ \hspace{-\RN@postboxwd}%
+ \ifnum \RN@postboxwd>\RN@expboxwd%
+ \mathmakebox[\RN@postboxwd][l]{%
+ {}^{\scriptscriptstyle\ast}%
+ }%
+ \else%
+ \mathmakebox[\RN@expboxwd][l]{%
+ {}^{\scriptscriptstyle\ast}%
+ }%
+ \fi%
+ \else%
+ ^{\scriptscriptstyle\ast}%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{Default settings}
+% By default, the following commonly used commands are provided. They are used to typeset position vectors, rotation matrices and pose matrices respectively. By default, the concise notation is disabled.
+% \begin{macrocode}
+\NewRigidNotation{Pos}{p}
+\NewRigidNotation{Rot}{R}
+\NewRigidNotation{Pose}{T}
+\UnsetConciseNotation
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/rigidnotation/rigidnotation.ins b/macros/latex/contrib/rigidnotation/rigidnotation.ins
new file mode 100644
index 0000000000..2330745216
--- /dev/null
+++ b/macros/latex/contrib/rigidnotation/rigidnotation.ins
@@ -0,0 +1,41 @@
+%%
+%% Copyright (C) 2024 Philippe Nadeau
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX version 2008-05-04 or later.
+%%
+\input docstrip.tex
+\keepsilent
+\usedir{tex/latex/rigidnotation}
+\preamble
+This is a generated file.
+Copyright (C) 2024 Philippe Nadeau
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in:
+http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of
+LaTeX version 2008-05-04 or later.
+\endpreamble
+\generate{\file{rigidnotation.sty}{\from{rigidnotation.dtx}{package}}}
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space rigidnotation.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file rigidnotation.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/rigidnotation/rigidnotation.pdf b/macros/latex/contrib/rigidnotation/rigidnotation.pdf
new file mode 100644
index 0000000000..e22454cc13
--- /dev/null
+++ b/macros/latex/contrib/rigidnotation/rigidnotation.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index b7bbe5392d..5ad9b3e360 100644
--- a/macros/latex/contrib/spbmark/spbmark.pdf
+++ b/macros/latex/contrib/spbmark/spbmark.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty
index 67f5450dea..9646dc1e00 100644
--- a/macros/latex/contrib/spbmark/spbmark.sty
+++ b/macros/latex/contrib/spbmark/spbmark.sty
@@ -9,7 +9,7 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/05/02}{1.46g}
+\ProvidesExplPackage{spbmark}{2024/05/13}{1.46i}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
@@ -18,7 +18,6 @@
\cs_generate_variant:Nn \dim_gset:Nn { Nv }
\cs_generate_variant:Nn \dim_abs:n { V,v }
\cs_generate_variant:Nn \dim_compare:nNnTF { V,v }
-\cs_generate_variant:Nn \msg_warning:nnn { nnV }
\cs_generate_variant:Nn \str_case:nn { x }
\cs_generate_variant:Nn \tl_if_novalue:nF { V }
\cs_generate_variant:Nn \tl_if_blank:nF { v }
@@ -157,13 +156,13 @@
}
\cs_new:Npn \spb_box_super_move_up_i:n #1
- { \box_move_up:nn {#1} { \box_use:N \l__super_i_inner_box } }
+ { \box_move_up:nn {#1} { \box_use:N \g__super_i_inner_box } }
\cs_new:Npn \spb_box_sub_move_down_i:n #1
- { \box_move_down:nn {#1} { \box_use:N \l__sub_i_inner_box } }
+ { \box_move_down:nn {#1} { \box_use:N \g__sub_i_inner_box } }
\cs_new:Npn \spb_box_super_move_up_ii:n #1
- { \box_move_up:nn {#1} { \box_use:N \l__super_ii_box } }
+ { \box_move_up:nn {#1} { \box_use:N \g__super_ii_box } }
\cs_new:Npn \spb_box_sub_move_down_ii:n #1
- { \box_move_down:nn {#1} { \box_use:N \l__sub_ii_box } }
+ { \box_move_down:nn {#1} { \box_use:N \g__sub_ii_box } }
\cs_new:Npn \spb_box_vmove_i:nn #1
{
\str_case:nn {#1}
@@ -256,28 +255,28 @@
\cs_new_protected:Npn \spb_ht_dp_assign:nnnn #1#2#3#4
{
\tl_if_blank:vF { l__#1_height_#3_tl }
- { \box_set_ht:cv { l__#1_#3#4_box } { l__#1_height_#3_tl } }
+ { \box_set_ht:cv { g__#1_#3#4_box } { l__#1_height_#3_tl } }
\tl_if_blank:vF { l__#1_depth_i_tl }
- { \box_set_dp:cv { l__#2_#3#4_box } { l__#2_depth_#3_tl } }
+ { \box_set_dp:cv { g__#2_#3#4_box } { l__#2_depth_#3_tl } }
}
-\box_new:N \l__super_i_outer_box
-\box_new:N \l__super_i_inner_box
-\box_new:N \l__sub_i_outer_box
-\box_new:N \l__sub_i_inner_box
-\box_new:N \l__super_ii_box
-\box_new:N \l__sub_ii_box
+\box_new:N \g__super_i_outer_box
+\box_new:N \g__super_i_inner_box
+\box_new:N \g__sub_i_outer_box
+\box_new:N \g__sub_i_inner_box
+\box_new:N \g__super_ii_box
+\box_new:N \g__sub_ii_box
\dim_new:N \llastwd
\dim_new:N \clastwd
\dim_new:N \rlastwd
-\tl_set:Nn \superwd { \box_wd:N \l__super_ii_box }
-\tl_set:Nn \subwd { \box_wd:N \l__sub_ii_box }
+\tl_set:Nn \superwd { \box_wd:N \g__super_ii_box }
+\tl_set:Nn \subwd { \box_wd:N \g__sub_ii_box }
\tl_set:Nn \maxwd { \dim_max:VV \superwd \subwd }
-\tl_set:Nn \l__spb_box_super_wd_i_tl { \box_wd:N \l__super_i_inner_box }
-\tl_set:Nn \l__spb_box_sub_wd_i_tl { \box_wd:N \l__sub_i_inner_box }
+\tl_set:Nn \l__spb_box_super_wd_i_tl { \box_wd:N \g__super_i_inner_box }
+\tl_set:Nn \l__spb_box_sub_wd_i_tl { \box_wd:N \g__sub_i_inner_box }
\cs_new:Npn \spb_math_print_store_i:nn #1#2
{
- \hbox_gset:cn { l__#1_i_inner_box }
+ \hbox_gset:cn { g__#1_i_inner_box }
{
\ensuremath
{
@@ -289,7 +288,7 @@
}
\cs_new:Npn \spb_text_print_store_i:nn #1#2
{
- \hbox_gset:cn { l__#1_i_inner_box }
+ \hbox_gset:cn { g__#1_i_inner_box }
{
\use:c { spb@text#1script@save }
{ \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
@@ -298,16 +297,16 @@
}
\cs_new:Npn \spb_math_print_store_ii:nn #1#2
{
- \hbox_gset:Nn \l__super_ii_box
+ \hbox_gset:Nn \g__super_ii_box
{ \ensuremath{\spb@math@super@save{\l__spb_super_cmd_ii_tl{#1}}} }
- \hbox_gset:Nn \l__sub_ii_box
+ \hbox_gset:Nn \g__sub_ii_box
{ \ensuremath{\spb@math@sub@save{\l__spb_sub_cmd_ii_tl{#2}}} }
}
\cs_new:Npn \spb_text_print_store_ii:nn #1#2
{
- \hbox_gset:Nn \l__super_ii_box
+ \hbox_gset:Nn \g__super_ii_box
{ \spb@textsuperscript@save{\l__spb_super_cmd_ii_tl{#1}} }
- \hbox_gset:Nn \l__sub_ii_box
+ \hbox_gset:Nn \g__sub_ii_box
{ \spb@textsubscript@save{\l__spb_sub_cmd_ii_tl{#2}} }
}
\cs_set_eq:NN \spbifmath \use_ii:nn
@@ -408,7 +407,7 @@
\spb_mode_switch:nnn {#1} {##4} { i }
\spb_content_hbox_set:nn {#1} {##1}
\spb_ht_dp_assign:nnnn {#1} {#1} { i } { _outer }
- \box_use:c { l__#1_i_outer_box }
+ \box_use:c { g__#1_i_outer_box }
\exp_last_unbraced:Nx
\group_end:
{
@@ -422,7 +421,7 @@
{
\dim_gset:Nn \clastwd { (\llastwd + \rlastwd)/2 }
\tl_set:Nn \abs@hmove@i { \dim_abs:v { l__spb_#1_hmove_tl } }
- \hbox_set:cn { l__#1_i_outer_box }
+ \hbox_gset:cn { g__#1_i_outer_box }
{
\dim_compare:vNnTF { l__spb_#1_hmove_tl } < { 0pt }
{
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index e1d318026c..e631b4c210 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -2,13 +2,14 @@
\usepackage{siunitx,setspace,pifont,hologo}
\usepackage[spbmark]{altsubsup}
+\usepackage[margin = 1in,marginparwidth = 0.6in,footskip = 0.5in]{geometry}
\usepackage[noto]{newtxmath}
\setcnltx
{
package = spbmark,
title = the spbmark package,
- version = v1.46g,
- date = 2024/05/02,
+ version = v1.46i,
+ date = 2024/05/13,
authors = Qu Yi,
info = Customize superscript and subscript,
email = toquyi@163.com,
@@ -39,7 +40,7 @@
\newsplitarg{\splitoarg}{[}{]}
\newsplitarg{\splitmarg}{\{}{\}}
\newsplitarg{\splitdarg}{(}{)}
-\newnote{\newtag}[1][New]{\textcolor{red}{\ding{73}\ #1}}
+\newnote{\newtag}[1][New]{\textcolor{red}{#1}}
\renewcommand{\emph}[1]{\textcolor{red}{#1}}
\renewcommand{\cnltx@write@lastname}{}
\makeatother
@@ -49,11 +50,11 @@
The following macro package options will redefine the script commands of the \LaTeX{} kernel. If you do not specify the values of boolean options, they default to \code{true}. These options can also be changed in the preamble area and main body using the global control command \cs{spbset}.
\begin{options}
\keychoice{text}{true,\fbox{false}}\newtag[Changed]%
- \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. At this point, you can use the \cs{defspbstyle} command to define the style \code{textsp} and \code{textsb} to change the format of the text superscript and subscript.
+ \cs{textsuperscript} and \cs{textsubscript} are equivalent to the \cs{super} and \cs{sub} commands. You can also use the \cs{defspbstyle} command to define the style \code{textsp} and \code{textsb} to change the format of the text superscript and subscript.
\keychoice{math}{true,\fbox{false}}\newtag[Changed]%
- \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. At this point, you can use the \cs{defspbstyle} command to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscript and subscript.
+ \cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands. You can also use the \cs{defspbstyle} command to define the style \code{mathsp} and \code{mathsb} to change the format of the math superscript and subscript.
\keychoice{foot}{true,\fbox{false}}\newtag[Changed]%
- The format of the footnote mark match the superscript global move and format settings. At this point, you can use the \cs{defspbstyle} command to define the superscript style \code{fnmark} to change the format of the footnote mark.
+ The format of the footnote mark match the superscript global move and format settings. You can also use the \cs{defspbstyle} command to define the superscript style \code{fnmark} to change the format of the footnote mark.
\begin{example}[code-only]
\defspbstyle{textsp}{vmove=-1pt,cmd=\bfseries}
\defspbstyle{mathsb}{hmove=0.5em}