summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-06 03:01:07 +0000
committerNorbert Preining <norbert@preining.info>2022-03-06 03:01:07 +0000
commita2c331d17828388705046ea495e5fe5135bbcc83 (patch)
treebc7f9b50750ad2331f4495f511f6e71ac13bf680 /macros/latex/contrib
parent19a90b19f6ec33aec1291be08fecfece45735a22 (diff)
CTAN sync 202203060301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/chemmacros/HISTORY5
-rw-r--r--macros/latex/contrib/chemmacros/README2
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.pdfbin1017922 -> 1018644 bytes
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.tex18
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.sty360
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx6
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin582435 -> 582618 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex12
-rw-r--r--macros/latex/contrib/njustthesis/README.md4
-rw-r--r--macros/latex/contrib/njustthesis/njustthesis.pdfbin211883 -> 212861 bytes
-rw-r--r--macros/latex/contrib/spbmark/README.md2
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin81909 -> 85057 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty109
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex49
15 files changed, 293 insertions, 276 deletions
diff --git a/macros/latex/contrib/chemmacros/HISTORY b/macros/latex/contrib/chemmacros/HISTORY
index bad8cce61a..b746778d8b 100644
--- a/macros/latex/contrib/chemmacros/HISTORY
+++ b/macros/latex/contrib/chemmacros/HISTORY
@@ -446,3 +446,8 @@ Version history
which is why \ChemStyle is introduced
- add load-time option `stop' which can prevent
modules and styles from being loaded
+2022/03/05 - version 6.2 - enable giving translation keys per language
+ (lang)
+ - re-write translations module giving keys per
+ language rather than vice versa
+ - fix issue with phases/sub=true (issue #49)
diff --git a/macros/latex/contrib/chemmacros/README b/macros/latex/contrib/chemmacros/README
index 6434c4135a..303cc4f854 100644
--- a/macros/latex/contrib/chemmacros/README
+++ b/macros/latex/contrib/chemmacros/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the CHEMMACROS package v6.1 2022/02/13
+the CHEMMACROS package v6.2 2022/03/05
comprehensive support for typesetting chemistry documents
diff --git a/macros/latex/contrib/chemmacros/chemmacros-manual.pdf b/macros/latex/contrib/chemmacros/chemmacros-manual.pdf
index b23770c818..8e18c20935 100644
--- a/macros/latex/contrib/chemmacros/chemmacros-manual.pdf
+++ b/macros/latex/contrib/chemmacros/chemmacros-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/chemmacros/chemmacros-manual.tex b/macros/latex/contrib/chemmacros/chemmacros-manual.tex
index c099679864..08954ccb2f 100644
--- a/macros/latex/contrib/chemmacros/chemmacros-manual.tex
+++ b/macros/latex/contrib/chemmacros/chemmacros-manual.tex
@@ -1,5 +1,5 @@
% --------------------------------------------------------------------------
-% the CHEMMACROS package v6.1 2022/02/13
+% the CHEMMACROS package v6.2 2022/03/05
%
% comprehensive support for typesetting chemistry documents
%
@@ -305,7 +305,7 @@ important and \emph{breaking} differences:
\option{minimal} allows to load \chemmacros\ with smallest subset
necessary. Then additional modules can be added with the
\option{modules}.
- \item A new module \module{reactants} has been added, thanks to \leandriis.
+ \item A new module \module{reactants} has been added, thanks to \leandriis!
\end{itemize}
\part{Main Modules}\label{part:main-modules}
@@ -3350,11 +3350,6 @@ is provided. For a few keys also other translations are provided. If you
find that a translation for your language is missing you can provide it in the
preamble:
\begin{commands}
- % \command{DeclareTranslation}[\marg{language}\marg{key}\marg{translation}]
- % Defines a translation of key \meta{key} for the language \meta{language}.
- % No error will be raised if a translation of \meta{key} already exists.
- % This command can only be used in the preamble and is defined by the
- % \pkg{translations} package.
\command{DeclareChemTranslation}[\marg{key}\marg{language}\marg{translation}]
\sinceversion{5.6}A command which makes an abstraction from the
\pkg{translations} package. It should be used in documents for adding
@@ -3366,6 +3361,15 @@ preamble:
used by document authors as well, of course. It gets a csv list of
key\slash value pairs of translations. This command can only be used in
the preamble.
+ \command{AddChemTranslation}[\marg{language}\marg{key}\marg{translation}]
+ \sinceversion{6.2}Basically the same as \cs{DeclareChemTranslation} but
+ with focus on the language instead of the key and thus has a different
+ argument order. This command can only be used in the preamble.
+ \command{AddChemTranslations}[\marg{languagen}\Marg{\meta{key} = \meta{translation}}]
+ \sinceversion{6.2}Basically the same as \cs{DeclareChemTranslations} but
+ with focus on the language instead of the key. It lets you define the
+ translations of several keys for one language in one go. This command can
+ only be used in the preamble.
\end{commands}
If you send me an email (see section~\vref{sec:sugg-bug-reports}) with the
translations for your language I'll gladly add them to the next release of
diff --git a/macros/latex/contrib/chemmacros/chemmacros.sty b/macros/latex/contrib/chemmacros/chemmacros.sty
index 649aed58b6..f9b0bf50cd 100644
--- a/macros/latex/contrib/chemmacros/chemmacros.sty
+++ b/macros/latex/contrib/chemmacros/chemmacros.sty
@@ -1,5 +1,5 @@
% --------------------------------------------------------------------------
-% the CHEMMACROS package v6.1 2022/02/13
+% the CHEMMACROS package v6.2 2022/03/05
%
% comprehensive support for typesetting chemistry documents
%
@@ -26,13 +26,17 @@
% The Current Maintainers of this work are Clemens Niederberger and Sonja K.
% --------------------------------------------------------------------------
\RequirePackage {l3keys2e}
+
+\DeclareRelease {v4} {2015-02-08} {chemmacros-2015-02-08.sty}
+\DeclareRelease {v5} {2020-03-07} {chemmacros-2020-03-07.sty}
+
\ExplSyntaxOn
% --------------------------------------------------------------------------
% package information:
-\tl_const:Nn \c_chemmacros_date_tl {2022/02/13}
+\tl_const:Nn \c_chemmacros_date_tl {2022/03/05}
\tl_const:Nn \c_chemmacros_version_major_number_tl {6}
-\tl_const:Nn \c_chemmacros_version_minor_number_tl {1}
+\tl_const:Nn \c_chemmacros_version_minor_number_tl {2}
\tl_const:Nn \c_chemmacros_version_subrelease_tl {}
\tl_const:Nx \c_chemmacros_version_number_tl
{
@@ -52,6 +56,7 @@
{\c_chemmacros_date_tl}
{\c_chemmacros_version_tl}
{\c_chemmacros_info_tl \c_space_tl (CN~ &~ SK)}
+\DeclareCurrentRelease{}{\c_chemmacros_date_tl}
% --------------------------------------------------------------------------
% variants of kernel functions:
@@ -1033,7 +1038,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{lang}{2022/01/18 language settings for chemmacros}
+\ChemModule{lang}{2022/03/05 language settings for chemmacros}
\RequirePackage{translations}
@@ -1046,6 +1051,18 @@
Otherwise~ contact~ the~ author~ and~ he'll~ probably~ add~ your~ language.
}
+\msg_new:nnn {chemmacros} {missing-translation}
+ {
+ The~ tranlation~ for~ key~ `#1'~ and~ language~ `#2'~ is~ missing~
+ \mgs_context_line:
+ }
+
+\msg_new:nnn {chemmacros} {missing-translation-alt}
+ {
+ The~ tranlation~ for~ key~ `#2'~ and~ language~ `#1'~ is~ missing~
+ \mgs_context_line:
+ }
+
% --------------------------------------------------------------------------
% language settings:
\bool_new:N \l__chemmacros_language_auto_bool
@@ -1104,19 +1121,6 @@
}
% --------------------------------------------------------------------------
-\cs_new_protected:Npn \__chemmacros_declare_translation:nw #1#2=#3\q_stop
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { \tl_trim_spaces:n {#2} }
- \tl_set:Nx \l__chemmacros_tmpb_tl { \tl_trim_spaces:n {#3} }
- \use:x
- {
- \chemmacros_declare_translation:nnn
- { \exp_not:n {#1} }
- { \exp_not:V \l__chemmacros_tmpa_tl }
- { \exp_not:V \l__chemmacros_tmpb_tl }
- }
- }
-
% #1: key
% #2: lang
% #3: translation
@@ -1134,18 +1138,55 @@
% #2: csv list: { <lang1> = <translation1> , <lang2> = <translation2> }
\cs_new_protected:Npn \chemmacros_declare_translations:nn #1#2
{
- \clist_map_inline:nn {#2}
- { \__chemmacros_declare_translation:nw {#1} ##1 \q_stop }
+ \keyval_parse:nnn
+ { \msg_warning:nnnn {chemmacros} {missing-translation} {#1} }
+ { \chemmacros_declare_translation:nnn {#1} }
+ {#2}
+ }
+
+% #1: lang
+% #2: key
+% #3: translation
+\cs_new_protected:Npn \chemmacros_add_translation:nnn #1#2#3
+ { \chemmacros_declare_translation:nnn {#2} {#1} {#3} }
+
+% #1: language
+% #2: csv list: { <key1> = <translation1> , <key2> = <translation2> }
+\cs_new_protected:Npn \chemmacros_add_translations:nn #1#2
+ {
+ \keyval_parse:nnn
+ { \msg_warning:nnnn {chemmacros} {missing-translation-alt} {#1} }
+ { \chemmacros_add_translation:nnn {#1} }
+ {#2}
}
+% #1: key
+% #2: lang
+% #3: translation
\NewDocumentCommand \DeclareChemTranslations {mm}
{ \chemmacros_declare_translations:nn {#1} {#2} }
\@onlypreamble \DeclareChemTranslations
-
+
+% #1: key
+% #2: csv list: { <lang1> = <translation1> , <lang2> = <translation2> }
\NewDocumentCommand \DeclareChemTranslation {mmm}
{ \chemmacros_declare_translation:nnn {#1} {#2} {#3} }
\@onlypreamble \DeclareChemTranslation
+% #1: lang
+% #2: csv list: { <key1> = <translation1> , <key2> = <translation2> }
+\NewDocumentCommand \AddChemTranslations {mm}
+ { \chemmacros_add_translations:nn {#1} {#2} }
+\@onlypreamble \AddChemTranslations
+
+% #1: lang
+% #2: key
+% #3: translation
+\NewDocumentCommand \AddChemTranslation {mmm}
+ { \chemmacros_add_translation:nnn {#1} {#2} {#3} }
+\@onlypreamble \AddChemTranslation
+
+% --------------------------------------------------------------------------
\cs_new:Npn \__chemmacros_parse_translate_list_entry:nnn #1#2#3 {}
\cs_new_protected:Npn \__chemmacros_parse_translate_list_entry:www #1(#2)\q_mark#3\q_stop
@@ -1788,7 +1829,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{phases}{2020/11/29 phase descriptors}
+\ChemModule{phases}{2022/03/03 phase descriptors}
\bool_new:N \l__chemmacros_phases_sub_bool
\dim_new:N \l__chemmacros_phases_space_dim
@@ -1828,7 +1869,7 @@
{
\mode_leave_vertical:
\bool_if:NTF \l__chemmacros_phases_sub_bool
- { \chemmacros_formula:n { {}_{(#1)} } }
+ { \ensuremath { \c_math_subscript_token { \chemmacros_text:n { (#1) } } } }
{
\skip_horizontal:N \l__chemmacros_phases_space_dim
\chemmacros_text:n { (#1) }
@@ -2736,7 +2777,7 @@
{ \tl_set:Nx #2 { \use:c { @elements@atom@name@num@ \str_lowercase:n {#1} } } }
}
}
-\cs_generate_variant:Nn \chemmacros_get_atom_number:nN { V }
+\cs_generate_variant:Nn \chemmacros_get_atom_number:nN {V}
% #1: atomic number|element symbol|element name
% #2: tl to store the result in
@@ -2777,7 +2818,7 @@
{ \prg_return_true: }
{ \prg_return_false: }
}
-\cs_generate_variant:Nn \chemmacros_check_isotope:nnF { V }
+\cs_generate_variant:Nn \chemmacros_check_isotope:nnF {V}
% #1: atomic number|element symbol|element name
% #2: tl to store the result in
@@ -2794,7 +2835,7 @@
{ \seq_map_break: }
}
}
-\cs_generate_variant:Nn \chemmacros_get_main_isotope:nN { V }
+\cs_generate_variant:Nn \chemmacros_get_main_isotope:nN {V}
% #1: atomic number|element symbol|element name
% #2: seq to store the results in
@@ -2911,11 +2952,9 @@
#1
}
}
-\cs_generate_variant:Nn \chemmacros_isotope_write:nnn { VnV , VVV , nnV , nVV }
+\cs_generate_variant:Nn \chemmacros_isotope_write:nnn {VnV,VVV,nnV,nVV}
-% TODO: option for the layout of the written isotope: ^{12}_6C vs C-12
-
-\NewDocumentCommand \isotope { sm }
+\NewDocumentCommand \isotope {sm}
{ \chemmacros_isotope:nn {#1} {#2} }
% --------------------------------------------------------------------------
@@ -3205,7 +3244,7 @@
{ #2 } ;
\group_end:
}
-\cs_generate_variant:Nn \chemmacros_newman_back_node:nn { nf }
+\cs_generate_variant:Nn \chemmacros_newman_back_node:nn {nf}
% place front nodes:
\cs_new_protected:Npn \chemmacros_newman_front_node:nn #1#2
@@ -3236,7 +3275,7 @@
)
{ #2 } ;
}
-\cs_generate_variant:Nn \chemmacros_newman_front_node:nn { nf }
+\cs_generate_variant:Nn \chemmacros_newman_front_node:nn {nf}
% --------------------------------------------------------------------------
\ChemModuleEnd
@@ -4168,7 +4207,7 @@
#3
\end{#1}
}
-\cs_generate_variant:Nn \__chemmacros_reaction_write:nnn { nnV }
+\cs_generate_variant:Nn \__chemmacros_reaction_write:nnn {nnV}
\chemmacros_define_keys:nn {reactions}
{
@@ -5055,7 +5094,7 @@
\tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
}
}
-\cs_generate_variant:Nn \__chemmacros_nmr_nucleus:nn { VV }
+\cs_generate_variant:Nn \__chemmacros_nmr_nucleus:nn {VV}
\cs_new_protected:Npn \__chemmacros_nmr_nucleus:w #1,#2 \q_stop
{
@@ -5107,7 +5146,7 @@
\group_end:
}
-\cs_generate_variant:Nn \__chemmacros_nmr_base:nn { VV }
+\cs_generate_variant:Nn \__chemmacros_nmr_base:nn {VV}
\cs_new_protected:Npn \__chemmacros_nmr_frequency:n #1
{
@@ -5504,7 +5543,7 @@
}
\group_end:
}
-\cs_generate_variant:Nn \chemmacros_state:nnnnnn { nVVVVV }
+\cs_generate_variant:Nn \chemmacros_state:nnnnnn {nVVVVV}
\exp_args:NNe
\NewDocumentCommand \state { O{}e{\char_generate:nn {`_}{8}^}me{\char_generate:nn {`_}{8}^} }
@@ -6773,172 +6812,103 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{translations}{2022/01/26 translations for defined keys at one place}
-
-% --------------------------------------------------------------------------
-\chemmacros_declare_translations:nn {K-acid}
- {
- German = \mathrm {s} ,
- Danish = \mathrm {s} ,
- Dutch = \mathrm {z}
- }
-
-\chemmacros_declare_translations:nn {K-water}
- { Danish = \mathrm {v} }
-
-% --------------------------------------------------------------------------
-\chemmacros_declare_translations:nn {phase-sld}
- {
- fallback = s ,
- German = f
- }
-
-\chemmacros_declare_translations:nn {phase-lqd}
- {
- fallback = l ,
- German = f\/l
- }
-
-\chemmacros_declare_translations:nn {phase-gas}
- { fallback = g }
-
-\chemmacros_declare_translations:nn {phase-aq}
- { fallback = aq }
-
-% --------------------------------------------------------------------------
-\chemmacros_declare_translations:nn {solution}
- {
- fallback = solution~ in ,
- English = solution~ in ,
- German = L\"osung~ in ,
- }
+\ChemModule{translations}{2022/02/24 translations for defined keys at one place}
+
+\chemmacros_add_translations:nn {fallback} {
+ phase-sld = s ,
+ phase-lqd = l ,
+ phase-gas = g ,
+ phase-aq = aq ,
+ solution = solution~ in ,
+ list-of-reactions = List~ of~ Reactions ,
+ reaction = reaction ,
+ reactions = reactions ,
+ Reaction = Reaction ,
+ Reactions = Reactions ,
+ scheme-name = Scheme ,
+ scheme-list = List~ of~ Schemes ,
+ scheme = scheme ,
+ schemes = schemes ,
+ Scheme = Scheme ,
+ Schemes = Schemes
+}
-% --------------------------------------------------------------------------
-\chemmacros_declare_translations:nn {list-of-reactions}
- {
- fallback = List~ of~ Reactions ,
- English = List~ of~ Reactions ,
- German = Reaktionsverzeichnis ,
- Italian = Elenco~ delle~ reazioni ,
- French = Table~ des~ r\'{e}actions ,
- Dutch = Lijst~ van~ reacties ,
- Norwegian = Reaksjonsliste ,
- Nynorsk = Reaksjonsliste ,
- Danish = Reaktionsliste
- }
-
-\chemmacros_declare_translations:nn {reaction}
- {
- fallback = reaction ,
- English = reaction ,
- German = Reaktion ,
- Italian = reazione ,
- French = r\'{e}action ,
- Dutch = reactie ,
- Norwegian = reaksjon ,
- Nynorsk = reaksjon ,
- Danish = reaktion
- }
-
-\chemmacros_declare_translations:nn {reactions}
- {
- fallback = reactions ,
- English = reactions ,
- German = Reaktionen ,
- Italian = reazioni ,
- French = r\'{e}actions ,
- Dutch = reacties ,
- Norwegian = reaksjoner ,
- Nynorsk = reaksjonar ,
- Danish = reaktioner
- }
-
-\chemmacros_declare_translations:nn {Reaction}
- {
- fallback = Reaction ,
- English = Reaction ,
- German = Reaktion ,
- Italian = Reazione ,
- French = R\'{e}action ,
- Dutch = Reactie ,
- Norwegian = Reaksjon ,
- Nynorsk = Reaksjon ,
- Danish = Reaktion
- }
-
-\chemmacros_declare_translations:nn {Reactions}
- {
- fallback = Reactions ,
- English = Reactions ,
- German = Reaktionen ,
- Italian = Reazioni ,
- French = R\'{e}actions ,
- Dutch = Reacties ,
- Norwegian = Reaksjoner ,
- Nynorsk = Reaksjonar ,
- Danish = Reaktioner
- }
+\chemmacros_add_translations:nn {German} {
+ K-acid = \mathrm {s} ,
+ phase-sld = f ,
+ phase-lqd = f\/l ,
+ solution = L\"osung~ in ,
+ list-of-reactions = Reaktionsverzeichnis ,
+ reaction = Reaktion ,
+ reactions = Reaktionen ,
+ Reaction = Reaktion ,
+ Reactions = Reaktionen ,
+ scheme-name = Schema ,
+ scheme-list = Verzeichnis~ der~ Schemata ,
+ scheme = Schema ,
+ schemes = Schemata ,
+ Scheme = Schema ,
+ Schemes = Schemata
+}
-% --------------------------------------------------------------------------
-\chemmacros_declare_translations:nn {scheme-name}
- {
- fallback = Scheme ,
- English = Scheme ,
- German = Schema ,
- Norwegian = Skjema ,
- Nynorsk = Skjema ,
- Danish = Skema
- }
+\chemmacros_add_translations:nn {Danish} {
+ K-acid = \mathrm {s} ,
+ K-water = \mathrm {v} ,
+ list-of-reactions = Reaktionsliste ,
+ reaction = reaktion ,
+ reactions = reaktioner ,
+ Reaction = Reaktion ,
+ Reactions = Reaktioner ,
+ scheme-name = Skema ,
+ scheme-list = Skemaliste ,
+ scheme = skema ,
+ schemes = skemaer ,
+ Scheme = Skema ,
+ Schemes = Skemaer
+}
-\chemmacros_declare_translations:nn {scheme-list}
- {
- fallback = List~ of~ Schemes ,
- English = List~ of~ Schemes ,
- German = Verzeichnis~ der~ Schemata ,
- Norwegian = Skjemaliste ,
- Nynorsk = Skjemaliste ,
- Danish = Skemaliste
- }
+\chemmacros_add_translations:nn {Dutch} {
+ K-acid = \mathrm {z} ,
+ list-of-reactions = Lijst~ van~ reacties ,
+ reaction = reactie ,
+ reactions = reacties ,
+ Reaction = Reactie ,
+ Reactions = Reacties
+}
-\chemmacros_declare_translations:nn {scheme}
- {
- fallback = scheme ,
- English = scheme ,
- German = Schema ,
- Norwegian = skjema ,
- Nynorsk = skjema ,
- Danish = skema
- }
+\chemmacros_add_translations:nn {Italian} {
+ list-of-reactions = Elenco~ delle~ reazioni ,
+ reaction = reazione ,
+ reactions = reazioni ,
+ Reaction = Reazione ,
+ Reactions = Reazioni
+}
-\chemmacros_declare_translations:nn {Scheme}
- {
- fallback = Scheme ,
- English = Scheme ,
- German = Schema ,
- Norwegian = Skjema ,
- Nynorsk = Skjema ,
- Danish = Skema
- }
+\chemmacros_add_translations:nn {French} {
+ list-of-reactions = Table~ des~ r\'{e}actions ,
+ reaction = r\'{e}action ,
+ reactions = r\'{e}actions ,
+ Reaction = R\'{e}action ,
+ Reactions = R\'{e}actions
+}
-\chemmacros_declare_translations:nn {schemes}
- {
- fallback = schemes ,
- English = schemes ,
- German = Schemata ,
- Norwegian = skjema ,
- Nynorsk = skjema ,
- Danish = skemaer
- }
+\chemmacros_add_translations:nn {Norwegian} {
+ list-of-reactions = Reaksjonsliste ,
+ reaction = reaksjon ,
+ reactions = reaksjoner ,
+ Reaction = Reaksjon ,
+ Reactions = Reaksjoner ,
+ scheme-name = Skjema ,
+ scheme-list = Skjemaliste ,
+ scheme = skjema ,
+ schemes = skjema ,
+ Scheme = Skjema ,
+ Schemes = Skjema
+}
-\chemmacros_declare_translations:nn {Schemes}
- {
- fallback = Schemes ,
- English = Schemes ,
- German = Schemata ,
- Norwegian = Skjema ,
- Nynorsk = Skjema ,
- Danish = Skemaer
- }
+\chemmacros_add_translations:nn {Nynorsk} {
+ reactions = reaksjonar ,
+ Reactions = Reaksjonar
+}
-% --------------------------------------------------------------------------
\ChemModuleEnd
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index b8e72e8753..7300ee08f9 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,6 +1,6 @@
# Easybook document class
-Easybook is a pure academic template created based on the ctexbook book document class. It also has the functions of book and article document class. Combined with the general framework design of the dissertation of many universities in China, providing multiple commands and interfaces allows users to easily customize the thesis template. Its basic macro package easybase can also be used with CTeX and standard document classes.
+`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of book and article document class. Combined with the general framework design of the dissertation of many universities in China, providing multiple commands and interfaces allows users to easily customize the thesis template. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
## License
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index b9abdff6f6..7978bddf98 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/03/04}{1.638}
+\ProvidesExplClass{easybook}{2022/03/05}{1.639}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -303,7 +303,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/03/04}{1.638}
+\ProvidesExplPackage{easybase}{2022/03/05}{1.639}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2302,7 +2302,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/04}{1.638}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/05}{1.639}
{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 3197e48a69..3905c58b5a 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 eac5a47373..f4042c30ec 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,8 +21,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v1.638,
- date = 2022/03/04,
+ version = v1.639,
+ date = 2022/03/05,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = q1jx@foxmail.com,
@@ -1172,15 +1172,15 @@
\subsection{图表题注}
\begin{commands}
- \command*{captionsetup}[\oarg{题注类型}\marg{键值列表}]
+ \command*{captionsetup}[\oarg{条目名}\marg{键值列表}]
这是 \pkg*{caption} 宏包的接口命令,\meta{键值列表} 提供多个选项更改图表题注的格式。题注主要由三部分组成:标题标签即图表名与题注编号的组合,标题文本本身通常是内容的简短描述,以及将文本与标签分开的题注分隔符。可以在导言区设置整体格式,也可以在正文使用局部更改格式。
\end{commands}
\begin{commands}\noitemsep
\command{caption}[\sarg\oarg{目录标题}\marg{标题}]\default{}
- \command{captionof}[\sarg\marg{题注类型}\oarg{目录标题}\marg{标题}]\default{}
- \command{bicaption}[\sarg\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2}]
- 题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env*{figure} 和 \env*{table} 中使用,在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定题注类型。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
+ \command{captionof}[\sarg\marg{条目名}\oarg{目录标题}\marg{标题}]\default{}
+ \command{bicaption}[\sarg\oarg{目录标题1}\marg{标题1}\oarg{目录标题2}\marg{标题2}]
+ 题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env*{figure} 和 \env*{table} 中使用。在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定条目名。可以搭配 \pkg*{newfloat} 宏包创建更多类型的浮动环境并设置相应题注。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
\end{commands}
\subsection{化学式}
diff --git a/macros/latex/contrib/njustthesis/README.md b/macros/latex/contrib/njustthesis/README.md
index 7026370d43..18e08abdf4 100644
--- a/macros/latex/contrib/njustthesis/README.md
+++ b/macros/latex/contrib/njustthesis/README.md
@@ -2,6 +2,10 @@
Thesis template for [NJUST](https://njust.edu.cn).
+## License
+
+This work may be distributed and/or modified under the conditions of GPLv3+.
+
## Dependent
### Required
diff --git a/macros/latex/contrib/njustthesis/njustthesis.pdf b/macros/latex/contrib/njustthesis/njustthesis.pdf
index 9af23f7d75..93348293fb 100644
--- a/macros/latex/contrib/njustthesis/njustthesis.pdf
+++ b/macros/latex/contrib/njustthesis/njustthesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/README.md b/macros/latex/contrib/spbmark/README.md
index ed915ca1ca..93032ca368 100644
--- a/macros/latex/contrib/spbmark/README.md
+++ b/macros/latex/contrib/spbmark/README.md
@@ -1,6 +1,6 @@
# The spbmark package
-Spbmark provides three commands \super, \sub and \supersub to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.
+`spbmark` provides three commands `\super`, `\sub` and `\supersub` to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode.
## License
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index 93f58f43bd..16a9936fff 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 e78f1db659..86ebb2a100 100644
--- a/macros/latex/contrib/spbmark/spbmark.sty
+++ b/macros/latex/contrib/spbmark/spbmark.sty
@@ -9,14 +9,15 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2022/03/04}{1.39}
+\ProvidesExplPackage{spbmark}{2022/03/05}{1.4}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
\cs_generate_variant:Nn \box_set_dp:Nn { cv }
\cs_generate_variant:Nn \dim_max:nn { VV }
\cs_generate_variant:Nn \dim_gset:Nn { Nv }
-\cs_generate_variant:Nn \dim_compare:nNnTF { V }
+\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 }
@@ -120,9 +121,9 @@
novmove .meta:n = { spvmove = 0pt,sbvmove = 0pt }
}
\cs_new:Npn \spb_box_super_move_up_i:n #1
- { \box_move_up:nn {#1} { \box_use:N \l__super_i_box } }
+ { \box_move_up:nn {#1} { \box_use:N \l__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_box } }
+ { \box_move_down:nn {#1} { \box_use:N \l__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 } }
\cs_new:Npn \spb_box_sub_move_down_ii:n #1
@@ -216,30 +217,31 @@
{ \tl_set:Nn \l__sub_depth_ii_tl {#1} }
}
}
-\cs_new_protected:Npn \spb_ht_dp_assign:nnn #1#2#3
+\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_box } { l__#1_height_#3_tl } }
+ { \box_set_ht:cv { l__#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_box } { l__#2_depth_#3_tl } }
+ { \box_set_dp:cv { l__#2_#3#4_box } { l__#2_depth_#3_tl } }
}
-\box_new:N \l__super_i_box
-\box_new:N \l__sub_i_box
+\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
\dim_new:N \llastwd
\dim_new:N \clastwd
\dim_new:N \rlastwd
-\tl_set:Nn \l__spb_box_super_wd_i_tl { \box_wd:N \l__super_i_box }
-\tl_set:Nn \l__spb_box_sub_wd_i_tl { \box_wd:N \l__sub_i_box }
-\tl_set:Nn \l__spb_box_super_wd_ii_tl { \box_wd:N \l__super_ii_box }
-\tl_set:Nn \l__spb_box_sub_wd_ii_tl { \box_wd:N \l__sub_ii_box }
-\tl_set:Nn \l__spb_box_max_wd_tl
- { \dim_max:VV \l__spb_box_super_wd_ii_tl \l__spb_box_sub_wd_ii_tl }
+\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 \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 }
\cs_new:Npn \spb_math_print_store_i:nn #1#2
{
- \hbox_set:cn { l__#1_i_box }
+ \hbox_gset:cn { l__#1_i_inner_box }
{
\ensuremath
{
@@ -251,7 +253,7 @@
}
\cs_new:Npn \spb_text_print_store_i:nn #1#2
{
- \hbox_set:cn { l__#1_i_box }
+ \hbox_gset:cn { l__#1_i_inner_box }
{
\use:c { spb@text#1script@save }
{ \tl_use:c { l__spb_#1_cmd_i_tl }{#2} }
@@ -260,16 +262,16 @@
}
\cs_new:Npn \spb_math_print_store_ii:nn #1#2
{
- \hbox_set:Nn \l__super_ii_box
+ \hbox_gset:Nn \l__super_ii_box
{ \ensuremath{\spb@math@super@save{\l__spb_super_cmd_ii_tl{#1}}} }
- \hbox_set:Nn \l__sub_ii_box
+ \hbox_gset:Nn \l__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_set:Nn \l__super_ii_box
+ \hbox_gset:Nn \l__super_ii_box
{ \spb@textsuperscript@save{\l__spb_super_cmd_ii_tl{#1}} }
- \hbox_set:Nn \l__sub_ii_box
+ \hbox_gset:Nn \l__sub_ii_box
{ \spb@textsubscript@save{\l__spb_sub_cmd_ii_tl{#2}} }
}
\cs_set_eq:NN \spbifmath \use_ii:nn
@@ -306,32 +308,38 @@
\cs_new_protected:Npn \spb_both_newcmd_map:n #1
{
- \exp_args:Nc \NewDocumentCommand {#1}{O{}mO{}}
+ \exp_args:Nc \NewDocumentCommand {#1}{sO{}mO{}}
{
\group_begin:
\mode_leave_vertical:
\tl_gset:Nn \g__spb_mark_case_init_tl {#1}
\spb_define:n { unknown .undefine: }
- \spb_set:n { ##1,##3 }
- \spb_mode_switch:nnn {#1} {##2} { i }
- \spb_content_hbox_set:n {#1}
- \spb_ht_dp_assign:nnn {#1} {#1} { i }
- \box_use:c { l__#1_i_box }
+ \spb_set:n { ##2,##4 }
+ \spb_mode_switch:nnn {#1} {##3} { 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 }
\group_end:
}
}
-\cs_new_protected:Npn \spb_content_hbox_set:n #1
+\cs_new_protected:Npn \spb_content_hbox_set:nn #1#2
{
\dim_gset:Nn \clastwd { (\llastwd + \rlastwd)/2 }
- \hbox_set:cn { l__#1_i_box }
+ \tl_set:Nn \abs@hmove@i { \dim_abs:v { l__spb_#1_hmove_tl } }
+ \hbox_set:cn { l__#1_i_outer_box }
{
- \dim_compare:nNnTF { \tl_use:c { l__spb_#1_hmove_tl } } < { 0pt }
+ \dim_compare:vNnTF { l__spb_#1_hmove_tl } < { 0pt }
{
\hbox_overlap_left:n
{
\hbox_overlap_right:n
{ \spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
- \skip_horizontal:n { \dim_abs:n { \tl_use:c { l__spb_#1_hmove_tl } } }
+ \skip_horizontal:n { \abs@hmove@i }
+ }
+ \IfBooleanT{#2}
+ {
+ \dim_compare:nNnT { \abs@hmove@i } < { \rlastwd }
+ { \skip_horizontal:n { \rlastwd - \abs@hmove@i } }
}
}
{
@@ -340,22 +348,30 @@
{ \hss\spb_box_vmove_i:nn {#1} { \tl_use:c { l__spb_#1_vmove_tl } } }
}
}
- \dim_gset:Nn \llastwd
- { \tl_use:c { l__spb_box_#1_wd_i_tl } - \tl_use:c { l__spb_#1_hmove_tl } }
+ \dim_gset:Nv \llastwd { l__spb_box_#1_wd_i_tl }
}
\clist_map_inline:nn { super,sub } { \spb_both_newcmd_map:n {#1} }
\cs_new:Npn \spb_supersub_hmove_if_negative:TF #1#2
{ \dim_compare:VNnTF \l__spb_supersub_hmove_tl < { 0pt } {#1} {#2} }
-\NewDocumentCommand{\supersub}{O{}mmO{}}
+\tl_set:Nn \abs@hmove@ii { \dim_abs:V \l__spb_supersub_hmove_tl }
+\cs_new:Npn \spb_supersub_avoid_overlap:n #1
+ {
+ \IfBooleanT{#1}
+ {
+ \dim_compare:nNnT { \abs@hmove@ii } < { \maxwd }
+ { \skip_horizontal:n { \maxwd - \abs@hmove@ii } }
+ }
+ }
+\NewDocumentCommand{\supersub}{sO{}mmO{}}
{
\group_begin:
\mode_leave_vertical:
\tl_gset:Nn \g__spb_mark_case_init_tl { supersub }
\spb_define:n { unknown .undefine: }
- \spb_set:n {#1,#4}
- \spb_mode_switch:nnn {#2} {#3} { ii }
- \spb_ht_dp_assign:nnn { super } { sub } { ii }
+ \spb_set:n {#2,#5}
+ \spb_mode_switch:nnn {#3} {#4} { ii }
+ \spb_ht_dp_assign:nnnn { super } { sub } { ii } { }
\str_case:VnF \l__spb_supersub_halign_tl
{
{ l } { \use_i:nnn }
@@ -372,15 +388,16 @@
\hbox_overlap_left:n
{
\spb_hbox_overlap_vmove_ii:n { right }
- \skip_horizontal:n { \dim_abs:n { \l__spb_supersub_hmove_tl } }
+ \skip_horizontal:n { \abs@hmove@ii }
}
+ \spb_supersub_avoid_overlap:n {#1}
}
{
\hbox:n
{
\skip_horizontal:n { \l__spb_supersub_hmove_tl }
\spb_hbox_overlap_vmove_ii:n { right }
- \skip_horizontal:n { \l__spb_box_max_wd_tl }
+ \skip_horizontal:n { \maxwd }
}
}
}
@@ -390,16 +407,16 @@
\hbox_overlap_left:n
{
\spb_hbox_overlap_vmove_ii:n { center }
- \skip_horizontal:n
- { \dim_abs:n { \l__spb_supersub_hmove_tl + \l__spb_box_max_wd_tl/2 } }
+ \skip_horizontal:n { \abs@hmove@ii - \maxwd/2 }
}
+ \spb_supersub_avoid_overlap:n {#1}
}
{
\hbox:n
{
- \skip_horizontal:n { \l__spb_box_max_wd_tl/2 + \l__spb_supersub_hmove_tl }
+ \skip_horizontal:n { \maxwd/2 + \l__spb_supersub_hmove_tl }
\spb_hbox_overlap_vmove_ii:n { center }
- \skip_horizontal:n { \l__spb_box_max_wd_tl/2 }
+ \skip_horizontal:n { \maxwd/2 }
}
}
}
@@ -409,14 +426,14 @@
\hbox_overlap_left:n
{
\spb_hbox_overlap_vmove_ii:n { left }
- \skip_horizontal:n
- { \dim_abs:n { \l__spb_supersub_hmove_tl + \l__spb_box_max_wd_tl } }
+ \skip_horizontal:n { \abs@hmove@ii - \maxwd }
}
+ \spb_supersub_avoid_overlap:n {#1}
}
{
\hbox:n
{
- \skip_horizontal:n { \l__spb_box_max_wd_tl + \l__spb_supersub_hmove_tl }
+ \skip_horizontal:n { \maxwd + \l__spb_supersub_hmove_tl }
\spb_hbox_overlap_vmove_ii:n { left }
}
}
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index 7cdd0b2bfd..4405722a19 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -6,8 +6,8 @@
{
package = spbmark,
title = the spbmark package,
- version = v1.39,
- date = 2022/03/04,
+ version = v1.4,
+ date = 2022/03/05,
authors = Qu Yi,
info = Customize superscript and subscript,
email = q1jx@foxmail.com,
@@ -55,7 +55,7 @@ The following macro package options will redefine the script commands of the \La
\keybool{math}\Default{false}
\cs{sp} and \cs{sb} are equivalent to the \cs{super} and \cs{sub} commands.
\keybool{foot}\Default{false}
- The format of the footnote mark match the superscript move and format of the \cs{spbset} global setting.
+ The format of the footnote mark match the superscript global move and format settings.
\opt{both}
The values of \option{text} and \option{math} two options are \code{true} at the same time.
\opt{all}
@@ -69,26 +69,20 @@ The following macro package options will redefine the script commands of the \La
\section{User commands}
There are currently three commands to set superscript and subscript. Their format can be set temporarily using the optional parameters of the command, or set globally using a key-value list, see section \ref{sec:global control interface}.
\begin{commands}
- \command{super}[\oarg{kv list}\marg{content}\oarg{kv list}]
+ \command{super}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
This is a superscript output command. The two \meta{kv list} are equivalent.
- \command{sub}[\oarg{kv list}\marg{content}\oarg{kv list}]
+ \command{sub}[\sarg\oarg{kv list}\marg{content}\oarg{kv list}]
This is a subscript output command. The two \meta{kv list} are equivalent.
- \command{supersub}[\oarg{kv list}\marg{super cont}\marg{sub cont}\oarg{kv list}]
- This is a command that outputs both superscript and subscript at the same time. You can also use the shorter command \cs{spb} instead of it. The two \meta{kv list} are equivalent.
- \command{defspbstyle}[\marg{style name}\marg{kv list}]
- Defines the style of the superscript or subscript used for the \option{style} option.
- \command{spbifmath}[\marg{math code}\marg{text code}]
- In some cases, \code{math} or \code{text} output modes require different code for format or move. This command can be used when using the \code{match} option or changing the output mode locally, whitch should be used in the move or format options. It can switch the corresponding code according to different output modes.
When the horizontal movement distance of the marker is \emph{non-negative}, since the \cs{super} and \cs{sub} commands put the marker in a horizontal box, the horizontal position is staggered when using superscript and subscript \emph{consecutively}, which is a different mechanism than the sequential use of \code{\^{}} and \code{\_} symbols in math mode. The following three commands save the width of the previous marker, use it for negative move of the \option{hmove} option of the next marker, and provide the corresponding alignment.
It should be noted that the following commands should save the longer width of the marker, that is, the longer width of the marker in the front, the shorter width of the marker in the back. This is due to the fact that horizontal movement uses a negative distance to leave the marker in a zero-width box state.
\command{llastwd}\newtag%
- Save the width of the previous marker and provide left alignment.
+ Save the width of the previous marker and provide left alignment. This is actually the width of the previous marker, and is the same as the value of \cs{rlastwd} after the next command is used.
\command{clastwd}\newtag%
- Save the width of the previous marker and provide center alignment.
+ Save the width of the previous marker and provide center alignment.
\command{rlastwd}\newtag%
- Save the width of the previous marker and provide right alignment.
+ Save the width of the previous marker and provide right alignment. Actually this is the width of the next marker.
\begin{example}
A\super{bcd}\sub{e}B \\
A\super{bcd}\sub[hmove=-\llastwd]{e}B \\
@@ -96,6 +90,29 @@ There are currently three commands to set superscript and subscript. Their forma
A\super{bcd}\sub[hmove=-\clastwd]{e}B \\
A\super{bcd}\sub[hmove=-\rlastwd]{e}B \\
\end{example}
+ \command{supersub}[\sarg\oarg{kv list}\marg{super cont}\marg{sub cont}\oarg{kv list}]
+ This is a command that outputs both superscript and subscript at the same time. You can also use the shorter command \cs{spb} instead of it. The two \meta{kv list} are equivalent.
+ \command{superwd}
+ Save the width of the superscript in the previous super-subscript command.
+ \command{subwd}
+ Save the width of the subscript in the previous super-subscript command.
+ \command{maxwd}
+ Save the maximum width of superscript and subscript in the previous super-subscript command. That is, it is the larger of the \cs{superwd} and \cs{subwd} commands.
+
+ If horizontally move is negative and its absolute value is \emph{less} than the maximum width of the marker, then the marker overlaps the subsequent text. To avoid this use the command with the \emph{asterisk} parameter or adjust the horizontal distance with the marker length commands.
+ \begin{example}
+ \spbset{spvmove=5pt,vsep=1.8ex,spcmd=\color{blue}}
+ A\super[hmove=-8pt]{super}B \\
+ A\supersub[hmove=-8pt]{examsuper}{sub}B \\
+ A\super*[hmove=-8pt]{super}B \\
+ A\supersub*[hmove=-8pt]{examsuper}{sub}B \\
+ A\super[hmove=-8pt]{super}\hspace{\dimexpr(\llastwd-8pt)}B \\
+ A\supersub[hmove=-8pt]{examsuper}{sub}\hspace{\dimexpr(\maxwd-8pt)}B
+ \end{example}
+ \command{defspbstyle}[\marg{style name}\marg{kv list}]
+ Defines the style of the superscript or subscript used for the \option{style} option.
+ \command{spbifmath}[\marg{math code}\marg{text code}]
+ In some cases, \code{math} or \code{text} output modes require different code for format or move. This command can be used when using the \code{match} option or changing the output mode locally, whitch should be used in the move or format options. It can switch the corresponding code according to different output modes.
\command{spbshortkv}[\marg{short opt}\marg{key value}]\newtag%
Converts any existing key-value pair to a shorthand option. The value of key \code{\#1} indicates that the shorthand option needs to be assigned a value.
\begin{example}
@@ -110,9 +127,9 @@ There are currently three commands to set superscript and subscript. Their forma
The options common to \meta{kv list} of the three commands are as follows. They can also be used in \meta {key-value list} of the \cs{spbset} command. In this situation, in addition to \option{style} and \option{mode}, they will be set according to the type of the previous most recent command.
\begin{options}
\keyval{vmove}{fixed length}\Default{0pt}
- Vertical move of superscript or subscript. Represents the extra vertical distance \option{vsep} between superscript and subscript in the superscript and subscript commands.
+ Vertical move of superscript or subscript. Represents the extra vertical distance \option{vsep} between superscript and subscript in super-subscript command. The vertical movement starts at the marker horizontal baseline position.
\keyval{hmove}{fixed length}\Default{0pt}
- Horizontal move of superscript or subscript. Represents the common move in the superscript and subscript commands. Moved values can be expressed mathematically:
+ Horizontal move of superscript or subscript. Represents the \emph{common} move of superscript and subscript in super-subscript command. The starting point for horizontal movement is to the left of the marker. Moved values can be expressed mathematically:
\begin{example}
A\super{b}[vmove=0.4ex+4pt/2,hmove=2pt*3-11.5pt] \\
A\supersub[vsep={3pt,6pt-2bp}]{examsuper}{sub}