summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/chemmacros/HISTORY448
-rw-r--r--macros/latex/contrib/chemmacros/README12
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.pdfbin998610 -> 1017922 bytes
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.tex327
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.sty1104
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx138
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin576202 -> 578140 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex53
-rw-r--r--macros/latex/contrib/ninecolors/README4
-rw-r--r--macros/latex/contrib/ninecolors/README.txt4
-rw-r--r--macros/latex/contrib/ninecolors/ninecolors.pdfbin32344 -> 49039 bytes
-rw-r--r--macros/latex/contrib/ninecolors/ninecolors.sty741
-rw-r--r--macros/latex/contrib/ninecolors/ninecolors.tex200
13 files changed, 1880 insertions, 1151 deletions
diff --git a/macros/latex/contrib/chemmacros/HISTORY b/macros/latex/contrib/chemmacros/HISTORY
new file mode 100644
index 0000000000..bad8cce61a
--- /dev/null
+++ b/macros/latex/contrib/chemmacros/HISTORY
@@ -0,0 +1,448 @@
+--------------------------------------------------------------------------
+the CHEMMACROS package
+
+ comprehensive support for typesetting chemistry documents
+
+--------------------------------------------------------------------------
+Web: https://github.org/cgnieder/chemmacros/
+E-Mail: clemens@cnltx.de
+--------------------------------------------------------------------------
+If you have any ideas, questions, suggestions or bugs to report, please
+feel free to contact us.
+--------------------------------------------------------------------------
+Copyright 2011--2021 Clemens Niederberger
+ 2022-- Clemens Niederberger & Sonja K.
+
+This work 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.3 or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainers of this work are Clemens Niederberger and Sonja K.
+--------------------------------------------------------------------------
+Version history
+2011/05/15 - version 1.0 - CTAN release
+2011/06/22 - version 1.1 - "LaTeXified" whole package for safer usage
+ - less user work required (like loading package
+ after another)
+ - more particle macros
+ - latin phrases
+ - extra units
+ - acid/base commands
+ - \mech
+ - \NMR
+ - \mhName, \setmhName, \newreaction, phases
+ - \renewstate, \setstatesubscript
+ - improved orbitals
+ - simpler package options, option german, bpchem
+ - bug fixes
+2011/10/28 - version 2.0 - rewritten in expl3
+ - customization via \chemsetup
+ - new commands \p, \fplus, \fminus, \fpch, \fmch,
+ \fscrp, \fsrcm, \fdelp, \fdelm, \orbital, \chemsetup
+ - various commands have a new syntax
+ - removed: \setmhName, \setredoxdist,
+ \setstatesubscript, \porb, \phorb, \pxorb, \pyorb,
+ \pzorb, \setorbheight, \solid, \liquid
+ - reaction environments work with hyperref and
+ varioref
+2011/11/03 - version 2.0a - minor bug fixes
+ - new feature for \Nu
+ - new command \ba
+2012/01/28 - version 3.0 - bundled with packages `formula' and `ghs'
+ - new commands \Ka, \Kb, \Kw
+ - commands can detect if font series is bold
+ - new package option "detect-bold"
+ - new package option "method" => choose between
+ `mhchem' and `formula' for internal uses.
+ - new package option "ghs" => load `ghs' or don't
+ - new package option "synchronize"
+ - new package option "strict"
+ - new command \iupac
+ - new command \listofreactions, reaction environments
+ with optional argument
+ - \cis, \trans, \tert without \xspace
+2012/01/30 - version 3.0a - bugfix in formula.sty
+ - renamed formula => chemformula
+ and ghs => ghsystem to make the names unique
+ (following a request by Karl Berry for TeXlive)
+2012/02/03 - version 3.0b - new command \DeclareChemParticle, updated
+ documentation
+2012/02/05 - version 3.0c - renamed pictogram files (following a request by
+ Karl Berry for TeXlive)
+ - new package option "Nu"
+2012/02/10 - version 3.0d - several bugfixes in chemformula
+ - bugfixes with \DeclareChemParticle
+ - new command \RenewChemParticle
+ - new option phases / pos
+ - new commands \DeclareChemPhase, \RenewChemPhase,
+ \phase
+ - changed default behaviour of phases
+ - removed optional argument from \sld and \lqd
+ - new arrow type <>
+2012/02/19 - version 3.1 - new commands \DeclareChemIUPAC and \RenewChemIUPAC
+ - new option "option/iupac"
+ - deprecated option: "option/EZ"
+ - deprecated commands:
+ \newreaction => \DeclareChemReaction
+ \setnewstate => \DeclareChemState
+ \renewstate => \RenewChemState
+ \Rcip => \R
+ \Scip => \S
+ \Dfi => \D
+ \Lfi => \L
+ - new arrow types -/>, </- and <o>
+ - new commands \DeclareChemArrow, \RenewChemArrow and
+ \ShowChemArrow
+2012/02/26 - version 3.1a - "operator" p rewritten to follow IUPAC
+ recommendations
+ - new option "acid-base/p-style"
+ - deprecated option: "option/detect-bold"
+2012/03/03 - version 3.1b - arrow types are stored in a sequence to automate the
+ search and replace in the right order
+ - new arrow type ==
+ - IUPAC compliance for stoichiometric factors
+ - new handling of super- and subscripts to correct
+ various flaws: clear distinction between isotope and
+ formula
+ - new option charge-vshift
+ - IUPAC compliance for \Delta and \ox
+2012/03/14 - version 3.1c - compatibility with KOMA's global option
+ "version = <value>"
+ - bugfix in the list of reactions
+ - improved arrow labels
+2012/03/20 - version 3.2 - new: option input via @{<options>}
+ - improved list of reactions: resetting the "reaction"
+ counter now doesn't cause errors any more
+ - \AddRxnDesc added which allows to add descriptions
+ to each reaction in the "reactions" environment
+2012/05/07 - version 3.3 - new environment `experimental' that allows some
+ formatting for the for displaying of measurement
+ results
+ - more greek letters for the \iupac command
+ - \ch now bypasses \ref{}, \label{}, and \intertext{}
+ - small adjustments of the iupac commands \| and \-
+ - bug fix: option `upgreek' is now working and was
+ renamed to `greek'
+ - proper language support
+2012/05/13 - version 3.3a - Italian translations of the H, EUH and P statements
+ - \hapto and \bridge
+2012/05/18 - version 3.3b - compatibility with MiKTeX
+2012/05/18 - version 3.3c - fix in the `ghsystem/language' option
+2012/07/24 - version 3.3d - additional picture file type `pdf'
+ - default bond length set to 1.1667ex
+ - bug fix in the bonds
+ - added kerning to cip commands, new option
+ `iupac/cip-kern'
+ - bug fix: messages needed to be defined before the
+ options
+2012/08/21 - version 3.3e - new option ox/align=center|right
+ - a new option to \NMR and to \J
+2012/09/11 - version 3.4 - cleaned a little, minor bug fixes
+ - switched to internal scratch variables
+ - new command \bond, more bond types
+ - new commands \DeclareChemBond, \DeclareChemBondAlias,
+ \RenewChemBond and \ShowChemBond
+ - radical point thicker, new options `radical-style'
+ and `radical-radius'
+2012/10/03 - version 3.4a - bug fix in coupling constant \J
+2013/01/04 - version 3.4b - bug fix in the sub- and superscript handling
+2013/01/28 - version 3.5 - disallow breaks at bonds
+ - allow breaks after arrows
+ - made some spaces in chemformulas stretch- and
+ shrinkable
+ - various internal code improvements
+ - changed defaults for horizontal spaces that have in
+ set in ex into corresponding values in em.
+ - improvements to the placement of sub- and superscripts
+2013/02/19 - version 3.5a - bug fix: `ghsystem' recognizes language again
+2013/02/26 - version 3.6 - support for use with the `breqn' package
+ - chemformula: math escaping also via \(\)
+ - chemformula internal: clearer escaping macros
+ - new options: `radical-vshift', `radical-hshift'
+ and `radical-space'
+ - bug fix: `radical-...' options are now correctly set
+ - stoichiometric factors: add leading 0 if missing
+ - new option: `stoich-paren-parse'
+ - internal changes: be way more rigid about protected
+ and expandable macros
+ - internal changes: clearer distinction between
+ private macros and accessable module macros
+ - internal changes: clearer distinction between
+ document commands and module level commands
+ - chemformula's !()() syntax now also works with babel's
+ French
+2013/02/27 - version 3.6a - bug fix: escaped text and math stays escaped, i.e.
+ also arrow code like `<=>'
+2013/04/19 - version 3.6b - chemformula: new key `arrow-min-length'
+ - bug fix: stoichiometric fractions correctly displayed
+ - changed appearance of \cip to use upright parentheses
+2013/07/06 - version 4.0 - `chemformula' doesn't automatically load
+ `chemmacros' any more but can be used stand-alone
+ - option `bpchem' has been dropped
+ - improved detection of bold font series
+ - changed wrongly used \mbox in definition of \Ka,
+ \Kb and \Kw into \ensuremath
+ - adapt \mch and \pch to match `chemformula's
+ charges
+ - dropped option `method=mhchem'
+ - support for `kpfonts' and `newtxmath' upright
+ greek letters added, greek alphabet complete both
+ for uppercase and lowercase; this is handled by
+ the new package in the family: `chemgreek'
+ - \OX and \redox now work in `amsmath's environment
+ by ignoring the measuring phase
+ - language management with the help of the
+ `translations' package =>
+ recognize document language automatically and use
+ it if it a) is known to `chemmacros' and b) has
+ not been overwritten by the `language' option;
+ this also made minor changes to `ghsystem'
+ necessary; additionally this lead to changes in
+ the way phases are defined
+ - status of \Dfi and \Lfi changed from `deprecated'
+ to `dropped'
+ - new option `charges/partial-format'
+ - fixed wrongly written contents to the lor when
+ used together with `hyperref'
+ - new option `reaction/list-heading'
+ - option `charges/append' deprecated
+2013/08/07 - version 4.0a - extra pair of braces in definition of
+ \standardstate
+ - added missing \exp_not:n to the definitions of
+ \chemmacros_declare_phase:Nn and kin
+2013/08/24 - version 4.1 - changed `0' values in TikZ coordinates into `0pt'
+ see http://tex.stackexchange.com/q/128792/5049 and
+ http://tex.stackexchange.com/q/118467/5049 for
+ reference
+2013/10/28 - version 4.2 - changed particles with electron pairs to use
+ \chlewis
+ - changed \Delta in thermodynamic state variables
+ into \ChemDelta for IUPAC compliance and defined
+ it as an operator
+ - change in the syntax of \DeclareChemState and
+ \RenewChemState and improved both internal
+ definition and user interface
+2013/10/31 - version 4.2a - bug bix in \hapto and \bridge
+2013/11/04 - version 4.2b - new IUPAC commands: \fac/\mer
+2013/11/20 - version 4.2c - step bundle version due to changes in `chemgreek'
+2013/12/15 - version 4.2d - small changes to the translating mechansim which
+ now seems to be more logical: `language=auto'
+ detects the current `babel' language and
+ `language=<lang>' overwrites to the chosen
+ language
+ - new options `acid-base/K-acid', `acid-base/K-base'
+ and `acid-base/K-water'
+ - adapt \ox to updates in `l3fp'
+2014/01/09 - version 4.2e - step bundle version due to changes in `ghsystem'
+2014/01/24 - version 4.3 - \NewChemIUPAC, \LetChemIUPAC
+ - \NewChemParticle
+ - \NewChemNMR
+ - \NewChemPhase
+ - \NewChemReaction, \RenewChemReaction
+ - \NewChemState
+ - added macro names with more meaningfule names to
+ each of the one-letter name commands
+ - changed behaviour of \DeclareChem to match
+ \DeclareRobustCommand, i.e., no check if command
+ is defined; added a \NewChem variant to each that
+ /does/ check; use \NewChem instead of \DeclareChem
+ for definitions
+ - new iupac command \dento
+ - new option choice `nmr/pos=super'
+ - bug fix in appearance of coupling nuclei
+ - new possibilities for formatting the output of the
+ NMR coupling constants output with \J:
+ `coupling-pos=side/sub', `coupling-nuclei-pre',
+ coupling-nuclei-post', `coupling-bonds-pre',
+ coupling-bonds-post', `coupling-symbol'
+ - internal changes to the greek letter mapping
+ selection mechanism
+ - deprecate package option `strict'
+ - deprecate package option `cmversion': also all
+ backwards compatibility for version 1 has been
+ dropped
+ - drop command \mhName
+2014/01/29 - version 4.4 - bug fix in the display of the coupling constant
+ - bug fix in phase definitions (need to adapt to
+ changes in `translations'
+ - new option `nmr/atom-number-cs'
+ - new option `nmr/coupling-pos-cs'
+2014/04/08 - version 4.5 - new option `acid-base/subscript'
+ - added Dutch translations
+2014/06/30 - version 4.5a - adapt to deprecated expl3 functions
+2014/08/08 - version 4.6 - from bundle to packages: packages `chemformula',
+ `ghsystem' and `chemgreek' no longer belong to the
+ bundle but now are packages of their own.
+2015/02/08 - version 4.7 - fix \iupac so active letters like | still work
+ inside other macros (\section, ...)
+ - Change the default subscripts of the equilibrium
+ constants to match the usage in the IUPAC Green
+ Book
+ - allow \NewChemPhase and friends after \begin{document}
+ - new optional argument to phase commands
+ - new options `nmr/method' and `nmr/connector'
+2015/09/11 - version 5.0 - the former chemmacros.sty is now chemmacros4.sty
+ and can be loaded through the `compatibility'
+ option
+ - chemmacros is now organized in separate modules
+ which either are preloaded or can be loaded by the
+ user with \usechemmodule
+ - various changes, see
+ http://www.mychemistry.eu/2015/06/chemmacros-development/
+ and the manual section 3.4. Upgrading from version
+ < 5.0 for details
+2015/09/23 - version 5.1 - add option `method' to `chemformula' module
+ - make module `scheme' compatible with `floatrow'
+ - add module hooks `before' and `after'
+2015/10/14 - version 5.2 - warn if compatibility version requested is higher
+ than the current version number
+ - enable to specify a minimal compatibility version
+ for a module
+ - add info message to `all' module
+ - add values `newest' and `latest' to the
+ compatibility option
+ - check for mhchem and chemformula and choose the
+ formula method accordingly
+ - fixes in the module hook mechanism
+ - fix in \chemmacros_if_module_loaded:n
+ - new internal module `errorcheck'
+2016/01/13 - version 5.3 - removed options `german' and `ngerman' (lang)
+ - remove deprecated pre-v5 macros (several modules)
+ - new option `atom-number-space' (spectroscopy)
+ - add \chemprime and ' shorthand (nomenclature)
+ - new option `space' (particles)
+ - TikZ decoration `wave' (tikz)
+2016/01/23 - version 5.3a - compatibility with chemscheme package (scheme)
+ - IUPAC shorthands only defined within \iupac
+ (nomenclature)
+2016/02/10 - version 5.4 - \NewChemEqConstant and family, new option
+ `eq-constant' (acid-base)
+ - added \ignorespacesafterend to environments
+ (reactions)
+ - fixed erroneous definition of \NewChemMacroset
+ (base)
+ - new option `explicit-zero-sign' (redox)
+2016/03/08 - version 5.5 - new module `polymers'
+2016/05/02 - version 5.6 - generalization of the formula method concept, new
+ methods `chemist' and `chemfig' (chemformula)
+ - use `tocbasic' for the list of reactions if
+ available (reactions)
+ - fix reaction environments to obey \thereaction
+ (reactions)
+ - add cleveref and fancyref support (reactions)
+ - add cleveref and fancyref support (scheme)
+ - \DeclareChemTranslation and
+ \DeclareChemTranslations
+ - moved translations from lang module to the
+ corresponding modules they belong to
+2016/05/04 - version 5.6a - fix small but annoying bugs (base and chemformula)
+2016/06/07 - version 5.7 - \iupac gets an optional argument for setting
+ options (nomenclature)
+ - \latin always defined by chemmacros (nomenclature)
+ - fix conflict with `achemso' (nomenclature)
+ - allow `chemscheme'/`chemstyle' to be loaded after
+ chemmacros (errorcheck)
+ - translation keys get internal prefix (translations)
+2016/06/08 - version 5.7a - rename functions which erroneously were assigned
+ to the `chemformula' module
+ - correct wrong dates in module files
+2016/10/05 - version 5.7b - small improvement of the errorcheck module
+2016/12/28 - version 5.7c - bug fix: typo in \chemmacros_tex_if:nnTF usage
+ (scheme)
+2017/04/17 - version 5.8 - new option `nmr-base-format' (spectroscopy)
+ - change \hapto and \dento to follow iupacs rules
+ according to IUPAC Red Book 2005. IR-10.2.5.2 The
+ eta convention (p.216) and IR-9.2.4.2 The
+ kappa convention (p.155f) (nomenclature)
+ - fix error in \chemmacros_allow_hyphens: definition
+ (nomenclature)
+ - new options `cip-inner-format', `cip-outer-format'
+ and `cip-number-format' (nomenclature)
+2017/06/13 - version 5.8a - changes to compatibility test: it now works also
+ for subreleases
+ - change behaviour of \ChemCompatibilityTo and
+ \ChemCompatibilityBetween in order to cope with
+ the changed compatibility test; adapt all files
+ reflecting those changes
+ - change behaviour of
+ \__chemmacros_break_point_insert:nnn so it does
+ nothing as last token in \iupac (nomenclature)
+2017/08/28 - version 5.8b - fix missing hyperref check
+2018/03/02 - version 5.8c - fix bug in \chemmacros_p:n (acid/base)
+ - smash sub- and superscripts of polymer delimiters
+ (polymers)
+2019/09/23 - version 5.8d - add some Norwegian translations (reactions, scheme)
+2019/09/27 - version 5.8e - change `O{}' argument of reactions into `!O{}'
+ (reactions)
+2019/09/30 - version 5.8f - fix bug introduced in the last version
+2019/11/17 - version 5.9 - correction: torr -> Torr (units)
+ - define latin phrases on the go instead of at begin
+ document
+2020/01/16 - version 5.9a - adapt to renaming of string case changing functions
+2020/02/03 - version 5.10 - define \torr as well as \Torr (units)
+ - prefer lazy boolean evaluation
+ - prefer the kernel commands to
+ \chemmacros_leave_vmode: and \chemmacros_tex_if:
+2020/03/07 - version 5.11 - let \chemmacros_iupac:nn think we're in the
+ document – fixes issue #30 (nomenclature)
+ - add option redox/format (redox)
+2020/03/07 - version 5.11a - fix issue #34 (spectroscopy)
+ - fix issue #41 (scheme)
+2022/01/16 - version 6.0 - merge modules into on file
+ - drop compatibility mode
+ - add reactants module and welcome Sonja K. to the
+ maintenance team
+ - fix issue #42
+ - use LaTeX's new hook mechanism
+ - get rid of scrlfile dependency
+ - update to l3text
+ - rename \Torr -> \torr (units)
+ - new iupac command \normal
+ - resolve issue #45
+ - adapt to siunitx 3.0, implement units that have
+ been removed from siunitx (units)
+ - Danish translations
+ - new `translations' module, move all translation
+ declarations there
+2022/01/18 - version 6.0a - fix issue #46
+ - fix bug related to package option `modules='
+2022/02/13 - version 6.1 - extend syntax of \state command (thermodynamics)
+ - add `reactants' module to the `errorcheck' module
+ - fix bug in Danish translation
+ - rename module `chemformula' > `formula'
+ - put reactions in the `chemfig' method in between
+ \schemestart and \schemestop (formula)
+ - replace deprecated \Lewis with \Charge in method
+ `chemfig' (formula)
+ - choose the formula method if either `mhchem' or
+ `chemformula' are loaded; choose `chemformula' if
+ there is a conflict (formula)
+ - use last instead of first found method for
+ defining floats (scheme)
+ - new option `scheme/float-method' (schemes}
+ - new option `reactions/own-counter' (reactions)
+ - new oprion `reactions/autoref-name' (reactions)
+ - deprecate option `reactions/tocbasic' (reactions)
+ - make \autoref work with reaction environments
+ through some possibly dangerous patches
+ (reactions)
+ - fix support for cleveref and fancyref with
+ reactions (reactions)
+ - reorganization of deprecation, removal, and
+ patching
+ - rename `nomenclature/format' into
+ `nomenclature/latin-format' (nomenclature)
+ - new option `nomenclature/iupac-format'
+ (nomenclature)
+ - properly implement and document user modules
+ (i.e., styles) as opposed to chemmacros' own
+ modules; since v6 \ChemModule has a new function
+ which is why \ChemStyle is introduced
+ - add load-time option `stop' which can prevent
+ modules and styles from being loaded
diff --git a/macros/latex/contrib/chemmacros/README b/macros/latex/contrib/chemmacros/README
index fa7047a4a3..6434c4135a 100644
--- a/macros/latex/contrib/chemmacros/README
+++ b/macros/latex/contrib/chemmacros/README
@@ -1,26 +1,26 @@
--------------------------------------------------------------------------
-the CHEMMACROS package v6.0a 2022/01/18
+the CHEMMACROS package v6.1 2022/02/13
comprehensive support for typesetting chemistry documents
--------------------------------------------------------------------------
-Clemens Niederberger
Web: https://github.com/cgnieder/chemmacros/
-E-Mail: contact@mychemistry.eu
+E-Mail: clemens@cnltx.de
--------------------------------------------------------------------------
-Copyright 2011--2022 Clemens Niederberger
+Copyright 2011--2021 Clemens Niederberger
+ 2022-- Clemens Niederberger & Sonja K.
This work 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.3 or later is part of all distributions of LaTeX
+and version 1.3c or later is part of all distributions of LaTeX
version 2008/05/04 or later.
This work has the LPPL maintenance status `maintained'.
-The Current Maintainer of this work is Clemens Niederberger.
+The Current Maintainers of this work are Clemens Niederberger and Sonja K.
--------------------------------------------------------------------------
The chemmacros package consists of the following files
== STYLE FILES ==
diff --git a/macros/latex/contrib/chemmacros/chemmacros-manual.pdf b/macros/latex/contrib/chemmacros/chemmacros-manual.pdf
index 516e7cf6f2..b23770c818 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 3504f8cfa8..c099679864 100644
--- a/macros/latex/contrib/chemmacros/chemmacros-manual.tex
+++ b/macros/latex/contrib/chemmacros/chemmacros-manual.tex
@@ -1,35 +1,34 @@
-% arara: pdflatex: { interaction: nonstopmode }
-% arara: biber
-% arara: pdflatex: { interaction: nonstopmode }
-% arara: pdflatex: { interaction: nonstopmode }
% --------------------------------------------------------------------------
-% the CHEMMACROS package
+% the CHEMMACROS package v6.1 2022/02/13
%
% comprehensive support for typesetting chemistry documents
%
% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.com/cgnieder/chemmacros/
-% contact@mychemistry.eu
+% Web: https://github.org/cgnieder/chemmacros/
+% E-Mail: chemmacros@cnltx.de
% --------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
+% feel free to contact us.
% --------------------------------------------------------------------------
-% Copyright 2011--2022 Clemens Niederberger
+% Copyright 2011--2021 Clemens Niederberger
+% 2022-- Clemens Niederberger & Sonja K.
%
% This work 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.3 or later is part of all distributions of LaTeX
+% and version 1.3c or later is part of all distributions of LaTeX
% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
-% The Current Maintainer of this work is Clemens Niederberger.
+% The Current Maintainers of this work are Clemens Niederberger and Sonja K.
% --------------------------------------------------------------------------
+% arara: pdflatex: { interaction: nonstopmode }
+% arara: biber
+% arara: pdflatex: { interaction: nonstopmode }
+% arara: pdflatex: { interaction: nonstopmode }
\documentclass{chemmacros-manual}
\usepackage[T1]{fontenc}
@@ -95,24 +94,24 @@
urldate = {2012-03-20} ,
date = {2012-03-20}
}
-@online{mychemistry:chemmacros-dev,
+@online{cnltx:chemmacros-dev,
author = {Clemens Niederberger} ,
title = {chemmacros development} ,
- url = {http://www.mychemistry.eu/2015/06/chemmacros-development/} ,
+ url = {http://www.cnltx.de/2015/06/chemmacros-development/} ,
urldate = {2015-07-16} ,
date = {2015-06-14}
}
-@online{mychemistry:modular-chemmacros,
+@online{cnltx:modular-chemmacros,
author = {Clemens Niederberger} ,
title = {modular chemmacros} ,
- url = {http://www.mychemistry.eu/2015/06/modular-chemmacros/} ,
+ url = {http://www.cnltx.de/2015/06/modular-chemmacros/} ,
urldate = {2015-07-16} ,
date = {2015-06-08}
}
-@online{mychemistry:chemmacros-update-how,
+@online{cnltx:chemmacros-update-how,
author = {Clemens Niederberger} ,
title = {a new chemmacros -- but how?} ,
- url = {http://www.mychemistry.eu/2015/07/a-new-chemmacros-but-how/} ,
+ url = {http://www.cnltx.de/2015/07/a-new-chemmacros-but-how/} ,
urldate = {2015-07-16} ,
date = {2015-07-15}
}
@@ -196,18 +195,21 @@ Since version~6.0 the different modules of \chemmacros\ are divided into three
groups:
\begin{enumerate}
\item Core modules which provide underlying functionality or basic
- functionality which is not of direct interest from a user perspective but
- might be if you plan to write a module yourself (see
- section~\ref{sec:own-modules} for details).
+ functionality and which are not of direct interest from a user perspective
+ but might be if you plan to write a module yourself (see
+ section~\ref{sec:own-modules} for details). These modules are described in
+ part~\ref{part:core-modules} of this manual.
\item Main modules which provide all the stuff for typesetting and which are
- always loaded.
+ always loaded. These modules are described in
+ part~\ref{part:main-modules} of this manual.
\item Additional modules which are also loaded in the default setup. They
are not loaded if \chemmacros\ is loaded with the minimal setup:
- \cs*{usepackage}\Oarg{minimal}\Marg{chemmacros}.
+ \cs*{usepackage}\Oarg{minimal}\Marg{chemmacros}. These modules are described in
+ part~\ref{part:additional-modules} of this manual.
\end{enumerate}
\subsection{\chemmacros' Options}\label{sec:using-chemm-opti}
-Prior to v5.0 \chemmacros\ had quite a number of package options.
+Prior to v5.0 \chemmacros\ had quite a number of load-time options.
\chemmacros\ v6.0 has only two:
\begin{options}
\keybool{minimal}\Default{false}
@@ -216,7 +218,7 @@ Prior to v5.0 \chemmacros\ had quite a number of package options.
When \option{minimal} is used this option allows to load additional
modules.
\end{options}
-These are load-time option that only can be used in the optional argument of
+These options only can be used in the optional argument of
\cs*{usepackage}. \emph{All} other of \chemmacros' options are set using the
command
\begin{commands}
@@ -275,7 +277,7 @@ descriptions and are also set without specifying a module:
Some internal modules may also define core options, \eg, the \chemmodule{lang}
module, see section~\vref{sec:lang-module}.
-\subsection{Support Package \chemformula}
+\subsection{Support Package \chemformula}\label{sec:supp-pack-chemf}
\chemformula\ provides means of typesetting chemical formulas and reactions.
You will see its macros \cs{ch} and \cs{chcpd} every now and then in this
manual. When using \chemmacros\ you can consider the \chemformula\
@@ -283,8 +285,7 @@ package~\cite{pkg:chemformula} to be loaded as \chemmacros\ makes use of it in
various places. \chemmacros\ and \chemformula\ are tightly intertwined.
Nevertheless you should be able to use the \pkg{mhchem}~\cite{pkg:mhchem}
package with \chemmacros\ without problems. Please see
-section~\vref{sec:using-mhchem} for details and \latin{caveat}s. \emph{The
- recommendation is to use \chemformula.}
+section~\vref{sec:using-mhchem} for details and \latin{caveat}s.
A historical note: \chemformula\ started as a part of \chemmacros\ in
January~2012. Since July~2013 it is a completely independent package -- from
@@ -398,7 +399,7 @@ This is how \cs{Ka} is defined:
\section{The \chemmodule*{charges} Module}\label{sec:charges-module}
-The \chemmodule{charges} module loads the module \chemmodule{chemformula}.
+The \chemmodule{charges} module loads the module \chemmodule{formula}.
\subsection{Charge Symbols}
\begin{commands}
@@ -934,7 +935,7 @@ You can change the appearance with this option:
\section{The \chemmodule*{particles} Module}\label{sec:particles-module}
The \chemmodule{particles} module loads the modules \chemmodule{charges} and
-\chemmodule{chemformula}.
+\chemmodule{formula}.
\subsection{Provided Particle Macros}
The \chemmodule{particles} defines a number of macros which can be used for
@@ -975,22 +976,22 @@ nucleophiles.
\command{NewChemParticle}[\marg{cs}\marg{formula}]
Defines a new macro \meta{cs}. \meta{formula} is any valid \chemformula\
input (this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Raises an error if \meta{cs} already
+ see~\vref{sec:formula-module}). Raises an error if \meta{cs} already
exists.
\command{RenewChemParticle}[\marg{cs}\marg{formula}]
Redefines a new macro \meta{cs}. \meta{formula} is any valid \chemformula\
input (this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Raises an error if \meta{cs} doesn't
+ see~\vref{sec:formula-module}). Raises an error if \meta{cs} doesn't
exist.
\command{DeclareChemParticle}[\marg{cs}\marg{formula}]
Defines a macro \meta{cs}. \meta{formula} is any valid \chemformula\
input (this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Silently overwrites \meta{cs} if it
+ see~\vref{sec:formula-module}). Silently overwrites \meta{cs} if it
exists.
\command{ProvideChemParticle}[\marg{cs}\marg{formula}]
Defines a new macro \meta{cs}. \meta{formula} is any valid \chemformula\
input (this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Does nothing if \meta{cs} already
+ see~\vref{sec:formula-module}). Does nothing if \meta{cs} already
exists.
\end{commands}
An example of usage is the definition of the existing particle macros:
@@ -1005,22 +1006,22 @@ The following set defines macros like \cs{Nuc}
\command{NewChemNucleophile}[\marg{cs}\marg{formula}]
Defines a new macro \meta{cs}. \meta{formula} is any valid \chemformula\
input (this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Note that \meta{formula} will get a
+ see~\vref{sec:formula-module}). Note that \meta{formula} will get a
trailing negative charge! Raises an error if \meta{cs} already exists.
\command{RenewChemNucleophile}[\marg{cs}\marg{formula}]
Redefines a new macro \meta{cs}. \meta{formula} is any valid \chemformula\
(this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Note that \meta{formula} will get a
+ see~\vref{sec:formula-module}). Note that \meta{formula} will get a
trailing negative charge! Raises an error if \meta{cs} doesn't exist.
\command{DeclareChemNucleophile}[\marg{cs}\marg{formula}]
Defines a macro \meta{cs}. \meta{formula} is any valid \chemformula\
(this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Note that \meta{formula} will get a
+ see~\vref{sec:formula-module}). Note that \meta{formula} will get a
trailing negative charge! Silently overwrites \meta{cs} if it exists.
\command{ProvideChemNucleophile}[\marg{cs}\marg{formula}]
Defines a new macro \meta{cs}. \meta{formula} is any valid \chemformula\
(this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}). Note that \meta{formula} will get a
+ see~\vref{sec:formula-module}). Note that \meta{formula} will get a
trailing negative charge! Does nothing if \meta{cs} already exists.
\end{commands}
An example of usage is the definition of the existing nucleophile macros:
@@ -1033,7 +1034,7 @@ A macro defined this way will have an optional argument for the
\section{The \chemmodule*{phases} Module}\label{sec:phases-module}
-The \chemmodule{phases} module loads the \chemmodule{chemformula} modul.
+The \chemmodule{phases} module loads the \chemmodule{formula} modul.
\subsection{Basics}
@@ -1145,20 +1146,21 @@ then. It loads the package \pkg{amstext}~\cite{pkg:amstext}.
\command{standardstate}
Again self-explaining: \standardstate
\command{changestate}
- The uppercase delta used in \state[superscript=]{H} for example.
+ The uppercase delta used in \state^{}{H} for example.
\end{commands}
-\section{The \chemmodule*{chemformula} Module}\label{sec:chemformula-module}
+\section{The \chemmodule*{formula} Module}\label{sec:formula-module}
-The \chemmodule{chemformula} module loads the \pkg{amstext}
+The \chemmodule{formula} module loads the \pkg{amstext}
package~\cite{pkg:amstext} and the \chemmodule{charges} module.
\subsection{For Users}
There are different packages which provide means for typesetting chemical
formulas:
\begin{itemize}
- \item \pkg{chemformula}~\cite{pkg:chemformula}. This is probably well known
- to users of \chemmacros.
+ \item \pkg{chemformula}~\cite{pkg:chemformula}. This package started as a
+ part of \chemmacros\ and thus goes naturally together with \chemmacros,
+ see also \vref{sec:supp-pack-chemf}.
\item \pkg{mhchem}~\cite{pkg:mhchem}. This is the \enquote{older brother} of
\chemformula.
\item \pkg{chemfig}~\cite{pkg:chemfig}. The easiest and most complete of the
@@ -1197,9 +1199,9 @@ you'll have to choose manually. \emph{All automatic choices only happen at the
end of the preamble}.
\subsection{Using the \pkg*{chemformula} Package}
-If you set \keyis{formula}{chemformula} the \chemmodule{chemformula} module
+If you set \keyis{formula}{chemformula} the \chemmodule{formula} module
makes it possible that you can set all \chemformula\ options via the
-\cs{chemsetup} command using the module \module{chemformula}, for example:
+\cs{chemsetup} command using the module \module{formula}, for example:
\begin{sourcecode}
\chemsetup[chemformula]{format=\sffamily}
\end{sourcecode}
@@ -1211,7 +1213,7 @@ provided by the \chemmodule{reactions} module.
\emph{This method is the recommended choice!}
\subsection{Using the \pkg*{mhchem} Package}\sinceversion{5.1}\label{sec:using-mhchem}
-If you set \keyis{formula}{mhchem} the \chemmodule{chemformula} module makes
+If you set \keyis{formula}{mhchem} the \chemmodule{formula} module makes
it possible that you can set all of \pkg{mhchem}'s options via the
\cs{chemsetup} command using the module \module{mhchem}, for example:
\begin{sourcecode}
@@ -1632,7 +1634,7 @@ implements the following macro based on the same idea:
\end{example}
\section{The \chemmodule*{reactions} Module}\label{sec:reactions-module}
-The \chemmodule{reactions} module loads the \chemmodule{chemformula} module
+The \chemmodule{reactions} module loads the \chemmodule{formula} module
and the \pkg{mathtools} package~\cite{pkg:mathtools}.
\subsection{Predefined Environments}
@@ -1644,12 +1646,12 @@ You can use these environments for numbered\ldots
environment body. A wrapper around the \env*{equation} environment. The
environment body is parsed with \cs{ch} or \cs{ce} depending on the value
of the \option{formula} option, see
- section~\vref{sec:chemformula-module}.
+ section~\vref{sec:formula-module}.
\environment{reactions}
Several aligned reactions. A wrapper around \pkg{amsmath}'s \env*{align}
environment. The environment body is parsed with \cs{ch} or \cs{ce}
depending on the value of the \option{formula} option, see
- section~\vref{sec:chemformula-module}.
+ section~\vref{sec:formula-module}.
\end{environments}
\ldots and their starred versions for unnumbered reactions.
@@ -1657,12 +1659,12 @@ You can use these environments for numbered\ldots
\environment{reaction*}
A wrapper around the \env*{equation*} environment. The environment body
is parsed with \cs{ch} or \cs{ce} depending on the value of the
- \option{formula} option, see section~\vref{sec:chemformula-module}.
+ \option{formula} option, see section~\vref{sec:formula-module}.
\environment{reactions*}
A wrapper around \pkg{amsmath}'s \env*{align*} environment. The
environment body is parsed with \cs{ch} or \cs{ce} depending on the value
of the \option{formula} option, see
- section~\vref{sec:chemformula-module}.
+ section~\vref{sec:formula-module}.
\end{environments}
With those environments you can create (un)numbered reaction equations similar
@@ -1729,6 +1731,14 @@ or use the following options:
\end{reaction}
\end{example}
+You\sinceversion{6.1} can also make reactions share a counter with math
+equations (by using the \code{equation} counter).
+\begin{options}
+ \keybool{own-counter}\Module{reactions}\Default{true}
+ If set to false the reaction environments will use the \code{equation}
+ counter instead of the \code{reaction} counter.
+\end{options}
+
The use of \AmS math's \cs{intertext} is possible:
\begin{example}
\begin{reactions}
@@ -1739,9 +1749,22 @@ The use of \AmS math's \cs{intertext} is possible:
See reaction~\ref{rxn:test}.
\end{example}
-If\sinceversion{5.6} you are using either \pkg{cleveref} or \pkg{fancyref} the
-\env{reaction} counter is supported already. For \pkg{fancyref} use the
-prefix \code{rct}.
+\subsection{Cross-Referencing}
+If\sinceversion{5.6} you are using either \pkg{cleveref}~\cite{pkg:cleveref}
+or \pkg{fancyref}~\cite{pkg:fancyref} and have set \keyis{own-counter}{true}
+the \env{reaction} counter is supported by both packages and already set up by
+\chemmacros.
+
+For \pkg{fancyref} use the prefix \code{rct} by defining the following:
+\begin{sourcecode}
+ \newcommand*\fancyrefrctlabelprefix{rct}
+\end{sourcecode}
+
+Also \pkg{hyperref}'s \cs*{autoref} is supported.
+\begin{options}
+ \keyval{autoref-name}{name}\Module{reactions}\Default{\cs*{ChemTranslate}\Marg{reaction}}
+ \sinceversion{6.1}Change the name used by \pkg{hyperref}'s \cs*{autoref}.
+\end{options}
\subsection{Own Reactions}
You can create new types of reactions with the command:
@@ -1816,14 +1839,10 @@ The output of this list can be modified by two options:
The\sinceversion{5.2} macro that is called at the beginning of the list.
Inside of \meta{code} \code{\#1} refers to the actual heading of the list.
The default setting is not entirely true: if a macro \cs*{chapter} is
- defined \code{\cs*{chapter}\sarg\Marg{\#1}} is used.
- \keybool{tocbasic}\Module{reactions}\Default{false}
- \sinceversion{5.6}If you use a \KOMAScript\ class \emph{or} if you load
- the \pkg{tocbasic} package \emph{or} if you set this option to \code{true}
- the list of reactions will be set up using the \pkg{tocbasic} package.
- This \emph{disables} the \option{list-heading-cmd} option. For a
- \KOMAScript\ class this means that the list of reactions obeys
- \KOMAScript's \option*{listof} option.
+ defined \code{\cs*{chapter}\sarg\Marg{\#1}} is used. \par
+ This command has no effect if a \KOMAScript\ class or the package
+ \pkg{tocbasic} is used. The list of reactions then obeys \KOMAScript's
+ \option*{listof} option.
\end{options}
Instead of using the option \option{list-name} you also could redefine
\cs{reactionlistname}.
@@ -1865,13 +1884,14 @@ names are declared in the preamble removing the need to repeat the same
module options the output style (order of name number and data) can be altered
globally (or locally) to suit your needs, while the data itself is input using
an easy to use key-value approach and processed by the \pkg{siunitx}
-package. The \module{reactants} module responds to the language declared with
-the \pkg{babel} package and also offers methods to integrate the acronyms of
-used reactants or solvents into the list of acronyms.
+package~\cite{pkg:siunitx}. The \module{reactants} module responds to the
+language declared with the \pkg{babel} package and also offers methods to
+integrate the acronyms of used reactants or solvents into the list of
+acronyms.
The module requires and loads the packages \pkg{chemnum}~\cite{pkg:chemnum}
-and \pkg{siunitx}~\cite{pkg:siunitx}. Depending on the selected options the
-packages \pkg{acro}~\cite{pkg:acro},
+and \pkg{siunitx}. Depending on the selected options the packages
+\pkg{acro}~\cite{pkg:acro},
\pkg{glossaries-extra}~\cite{pkg:glossaries-extra},
\pkg{hyperref}~\cite{pkg:hyperref}, \pkg{longtable}~\cite{pkg:longtable}
and/or \pkg{xltabular}~\cite{pkg:xltabular} might be needed for this module
@@ -1928,8 +1948,8 @@ Common declarations will look like this:
\cs{Reactant} can be used in order to start a sentence with an upper case
version of a compound's name. The corresponding text must be defined
through \cs{DeclareChemReactant}'s \option{upper-name} option. Further
- variants of \cs{reactant} with different suffixes, such as \code{*},
- \code{+}, \code{l}, \code{s} or \code{plain} will be described later.
+ variants of \cs{reactant} with different suffixes, such as \sarg,
+ \parg, \code{l}, \code{s} or \code{plain} will be described later.
\command{solvent}[\oarg{data and units}\marg{ID}]
Analogous to \cs{reactants}. Can be used to insert solvent names and
corresponding data in the text. Format and order depend on the on the
@@ -1979,9 +1999,9 @@ Typical uses will look like this:
which they were declared in the preamble or in an external document.
\keybool{switch}\Module{reactants}\Default{false}
While \cs{reactants} will output name and number of a reactant, its
- starred variant \cs{reactant*}, will by default result in the name without
- the corresponding number. Setting \keyis{switch}{true}, globally or
- locally, reverses this behavior and outputs a reactant's number without
+ starred variant \cs{reactant}\sarg, will by default result in the name
+ without the corresponding number. Setting \keyis{switch}{true}, globally
+ or locally, reverses this behavior and outputs a reactant's number without
its name.
\end{options}
Other options are described at later places when the corresponding behavior is
@@ -1997,7 +2017,9 @@ argument that can be used to easily input this data:
\begin{commands}
\command{reactant}[\oarg{data and units}\marg{ID}]
+ \phantom{X}\vspace*{-\baselineskip}
\command{solvent}[\oarg{data and units}\marg{ID}]
+ \phantom{X}\vspace*{-\baselineskip}
\end{commands}
\begin{table}[bp]
@@ -2011,16 +2033,16 @@ argument that can be used to easily input this data:
\toprule
\tablehead{Key} & \tablehead{default unit} & \tablehead{option} \\
\midrule
- mass & \unit{\gram} & mass-unit \\
- volume & \unit{\milli\liter} & volume-unit \\
- fraction & w/w\% & fraction-unit \\
- amount & \unit{\milli\mole} & amount-unit \\
- equiv & eq & equiv-unit \\
- purity & \% & purity-unit \\
- concentration & \unit{\Molar} & concentration-unit \\
- solvent & n.a. & \\
+ mass & \unit{\gram} & mass-unit \\
+ volume & \unit{\milli\liter} & volume-unit \\
+ fraction & w/w\% & fraction-unit \\
+ amount & \unit{\milli\mole} & amount-unit \\
+ equiv & eq & equiv-unit \\
+ purity & \% & purity-unit \\
+ concentration & \unit{\Molar} & concentration-unit \\
+ solvent & n.a. & \\
\midrule
- solution-name & solution in & solution \\
+ solution-name & solution in & solution \\
\bottomrule
\end{tabular}
\end{table}
@@ -2044,7 +2066,7 @@ solvent. This text automatically adapts to the document language set via
the German translation are included in the package. If you write in a
different language (or just don't like the predefined text), you can use the
command \cs{DeclareChemTranslation}\marg{key}\marg{language}\marg{translation}
-(with \keyis{\meta{key}}{solution}) as described in
+(with \keyis*{\meta{key}}{solution}) as described in
section~\vref{sec:lang-module} in order to supply your own translation.
\begin{example}
@@ -2159,11 +2181,11 @@ contents of the categories are typeset.
Using the \cs{reactants} command inside of section headings or captions can
mess up the order in which the molecules are numbered, especially when also
using a table of contents and/or a list of figures/tables. To prevent this,
-the \module{reactants} module offers the \code{+} suffixed variant of
-\cs{reactants}, comparable to \pkg{chemnum}'s \cs{cmpd+} command.
+the \module{reactants} module offers the \parg\ suffixed variant of
+\cs{reactants}, comparable to \pkg{chemnum}'s \cs{cmpd}\parg\ command.
\begin{commands}
- \command{reactant+}[\oarg{data and units}\marg{ID}]
+ \command{reactant}[\parg\oarg{data and units}\marg{ID}]
This command is used to insert name, number, and, if present, data of a
predefined reactant with the \meta{ID} in a section heading or caption.
\end{commands}
@@ -2241,7 +2263,7 @@ uses either \pkg{longtable} or \pkg{xltabular} to typeset this list:
are responsible for formatting the list of reactants. Be aware that with
\code{longtable}, the column widths are hard coded, thus you could
experience overfull box warnings if you use exceptionally long \meta{ID}s
- in combination with the starred variant \cs{printreactants*}, which is
+ in combination with the starred variant \cs{printreactants}\sarg, which is
responsible for adding the \meta{ID} in resulting list, as well.
\end{options}
@@ -2269,7 +2291,7 @@ The following command is provided to set oxidation numbers:
Places \meta{number} as right superscript to \meta{atom}; \meta{number}
has to be a (rational) number! \meta{atom} is treated as a \chemformula\
formula, like it would be in \cs{chcpd} (this depends on the setting of
- the \option{formula} option, see~\vref{sec:chemformula-module}).
+ the \option{formula} option, see~\vref{sec:formula-module}).
\end{commands}
\begin{example}
@@ -2476,7 +2498,7 @@ The \chemmodule{scheme} module loads the \pkg{chemnum}
package~\cite{pkg:chemnum} and defines a floating environment
\showenv{scheme}. That is, it \emph{only} defines this float if no
environment \env{scheme} exists at the end of the preamble. The module checks
-for different available float defining methods, in \emph{this} order:
+for different available float defining methods:
\begin{itemize}
\item If the current class is a \KOMAScript\ class \cs*{DeclareNewTOC} will
be used.
@@ -2491,9 +2513,19 @@ for different available float defining methods, in \emph{this} order:
\item If neither of the above the \enquote{manual} method is used. This
means the environment is defined the same way like \env*{figure} is
defined in the \cls*{article} class or the \cls*{book} class, depending if
- \cs*{chapter} is defined or not.
+ \cs*{chapter} is defined or not (the \enquote{traditional} way).
+ \item \sinceversion{6.1}If no unique choice is possible the \emph{last} of
+ the detected methods will be used. For example, if you use the
+ \cls{memoir} class \emph{and} load the \pkg{float} then the method of
+ \pkg{float} will be used.
\end{itemize}
+\begin{options}
+ \keychoice{float-method}{KOMA,memoir,tocbasic,newfloat,floatrow,float,traditional}\Module{scheme}
+ \sinceversion{6.1}You can also decide for yourself which method you want
+ \chemmacros\ to use by setting this option accordingly.
+\end{options}
+
The list name and the caption name both are translated to the language
specified according to the \option{lang} option and the provided translations,
see section~\vref{sec:lang-module} for details. If you want to manually change
@@ -2509,13 +2541,18 @@ The list of schemes is printed as expected with
\command{listofschemes}
\end{commands}
-If\sinceversion{5.6} you are using either \pkg{cleveref} or \pkg{fancyref} the
-\env{scheme} environment (or rather its captions) are supported already. For
-\pkg{fancyref} use the prefix \code{sch}.
+If\sinceversion{5.6} you are using either \pkg{cleveref}~\cite{pkg:cleveref}
+or \pkg{fancyref}~\cite{pkg:fancyref} the \env{scheme} counter is supported by
+both packages and already set up by \chemmacros.
+
+For \pkg{fancyref} use the prefix \code{sch} by defining the following:
+\begin{sourcecode}
+ \newcommand*\fancyrefschlabelprefix{sch}
+\end{sourcecode}
\section{The \chemmodule*{spectroscopy} Module}\label{sec:spectroscopy-module}
-The \chemmodule{spectroscopy} module loads the \chemmodule{chemformula} module
+The \chemmodule{spectroscopy} module loads the \chemmodule{formula} module
and the \pkg{siunitx} package~\cite{pkg:siunitx}.
\subsection{The \cs*{NMR} Command}
@@ -2535,7 +2572,7 @@ input.
\pkg{siunitx} number input, \meta{unit} is a valid \pkg{siunitx} unit
input. \meta{solvent} is any valid \chemformula\ input as in \cs{chcpd}
(this depends on the setting of the \option{formula} option,
- see~\vref{sec:chemformula-module}).
+ see~\vref{sec:formula-module}).
\end{commands}
\emph{All} Argument are optional! Without arguments we get:
@@ -2682,7 +2719,7 @@ number of options.
(printed by \cs{\#}).
\keybool{parse}\Module{spectroscopy}\Default{true}
Treat the solvent as \chemformula\ formula (this depends on the setting of
- the \option{formula} option, see~\vref{sec:chemformula-module}) or not.
+ the \option{formula} option, see~\vref{sec:formula-module}) or not.
\keyval{delta}{tokens}\Module{spectroscopy}\Default
The \meta{tokens} are added after $\delta$.
\keybool{list}\Module{spectroscopy}\Default{false}
@@ -2932,9 +2969,9 @@ package~\cite{pkg:siunitx}.
This macro can be used to write the thermodynamic state variables.
\begin{example}
- \state{A}, \state[subscript-left=f]{G} ,
- \state[subscript-right=\ch{Na}]{E},
- \state[superscript-right=\qty{1000}{\celsius}]{H}
+ \state{A}, \state_f{G} ,
+ \state{E}_{\ch{Na}},
+ \state{H}^{\qty{1000}{\celsius}}
\end{example}
These options are available:
@@ -2957,6 +2994,13 @@ These options are available:
An alias of \option{subscript-left}.
\end{options}
+Since version~6.1\sinceversion{6.1} you can input the sub- and superscripts in
+a more intuitive way instead of using the options -- the latter are still
+available, though:
+\begin{example}
+ \state_a^b{X}_c^d
+\end{example}
+
\subsection{Thermodynamic Variables}
The \chemmodule{thermodynamics} module provides a few commands for specific
@@ -3123,11 +3167,11 @@ units. Like all \pkg{siunitx} units they're only valid inside
\command{Molar} \unit{\Molar}
\command{MolMass} \unit{\MolMass}
\command{normal} \unit{\normal}
- \command{torr} \unit{\torr}
- \par
-\sinceversion{6.0} Since some units still frequently used in chemistry were removed from version 3 of \pkg{siunitx},
- \chemmacros\ also defines these in the same way, older versions of \pkg{siunitx} used to do.
- These units are:
+ \command{torr} \unit{\torr}\par
+ %%%
+ \sinceversion{6.0}Since some units still frequently used in chemistry were
+ removed from version 3 of \pkg{siunitx} \chemmacros\ also defines these in
+ the same way, older versions of \pkg{siunitx} used to do. These units are:
\command{angstrom} \unit{\angstrom}
\command{atomicmassunit} \unit{\atomicmassunit}
\command{bar} \unit{\bar}
@@ -3136,8 +3180,7 @@ units. Like all \pkg{siunitx} units they're only valid inside
\end{commands}
-\part{Core Modules}
-
+\part{Core Modules}\label{part:core-modules}
The modules described in this part are always loaded and mainly concern module
writers.
@@ -3175,7 +3218,7 @@ modules. In the macro descriptions below \TF\ denotes that a \code{T}, an
\explcommand{chemmacros_allow_break:}
Inserts a penalty of \num{0}.
\explcommand{chemmacros_skip_nobreak:N}[ \meta{skip/length variable}]
- Insert a horizontal skip where a linebreak is disallowed.
+ Inserts a horizontal skip where a linebreak is disallowed.
\expandable\explcommand{chemmacros_if_is_int:n}[\TF\ \marg{input} \marg{true}
\marg{false}]
Checks if \meta{input} is an integer or something else.
@@ -3183,7 +3226,7 @@ modules. In the macro descriptions below \TF\ denotes that a \code{T}, an
Checks if the current font weight is one of \chemboldchecks{or}.
\explcommand{chemmacros_bold:n}[ \marg{text}]
Checks if the current font weight is bold and if yes places \meta{text} in
- \cs*{textbf} if in text mode or in \cs*{bm} if in math mode. If no
+ \cs*{textbf} if in text mode or in \cs*{bm} if in math mode. If no,
\meta{text} simply is placed in the input stream as is.
\explcommand{chemmacros_text:n}[ \marg{text}]
Ensures that \meta{text} is placed in text mode.
@@ -3240,24 +3283,22 @@ This is how the macros \cs{NewChemParticle}, \cs{RenewChemParticle},
The following macros strictly speaking are not provided by the
\chemmodule{base} module but this place fits best for their description.
\begin{commands}
- \expandable\explcommand{chemmacros_if_module_exist:n}[\TF\ \marg{module}
+ \expandable\explcommand{chemmacros_module_if_exist:n}[\TF\ \marg{module}
\marg{true} \marg{false}]
Checks if a file with the correct name for a module \meta{module} can be
found.
- \expandable\explcommand{chemmacros_if_module_loaded:n}[\TF\ \marg{module}
+ \expandable\explcommand{chemmacros_module_if_loaded:n}[\TF\ \marg{module}
\marg{true} \marg{false}]
Checks if the module \meta{module} has already been loaded or not.
- \explcommand{chemmacros_load_module:n}[ \marg{module}]
- Loads module \meta{module} if it hasn't been loaded, yet.
- \explcommand{chemmacros_load_modules:n}[ \marg{csv list of modules}]
- Loads every module in \meta{csv list of modules} if they haven't been
- loaded, yet. This is the code level variant of \cs{usechemmodule}.
- \explcommand{chemmacros_before_module:nn}[ \marg{module} \marg{code}]
+ \explcommand{chemmacros_module_load:n}[ \marg{module}]
+ Loads module \meta{module} if it hasn't been loaded, yet. The module must
+ exist as a separate file as described in section~\ref{sec:own-modules}.
+ \explcommand{chemmacros_module_before:nn}[ \marg{module} \marg{code}]
Saves\sinceversion{5.1} \meta{code} and inserts it right before
\meta{module} is loaded. If \meta{module} is never loaded then
\meta{code} is never inserted. If \meta{module} already is loaded when
the command is used then \meta{code} also is never inserted.
- \explcommand{chemmacros_after_module:nn}[ \marg{module} \marg{code}]
+ \explcommand{chemmacros_module_after:nn}[ \marg{module} \marg{code}]
Saves\sinceversion{5.1} \meta{code} and inserts it right after
\meta{module} is loaded. If \meta{module} is never loaded then
\meta{code} is never inserted. If \meta{module} already is loaded when
@@ -3371,13 +3412,13 @@ following macros are available:
A token list variable that holds the language which is used by
\explcs{chemmacros_translate:n} for translation, \emph{after begin
document}.
- \command{ChemTranslate}[\marg{translation key}]
+ \expandable\command{ChemTranslate}[\marg{translation key}]
A version of \explcs{chemmacros_translate:n} for those who prefer
traditional \LaTeXe\ programming over expl3.
- \explcommand{chemmacros_declare_translation:nnn}[\marg{language}\marg{key}%
+ \explcommand{chemmacros_declare_translation:nnn}[ \marg{language} \marg{key}
\marg{translation}]
The expl3 version of \cs{DeclareChemTranslation}.
- \explcommand{chemmacros_declare_translations:nn}[\marg{key}\Marg{\meta{language}
+ \explcommand{chemmacros_declare_translations:nn}[ \marg{key} \Marg{\meta{language}
= \meta{translation}}]
The expl3 version of \cs{DeclareChemTranslations}.
\end{commands}
@@ -3507,47 +3548,42 @@ me (see section~\vref{sec:submitting-module}) so they can be added to the
\appendix
\part{Appendix}
-\section{Own Modules}\label{sec:own-modules}
+\section{Own Modules Called Styles}\label{sec:own-modules}
\subsection{How To}
If you have additional functionality which you think might be useful as a
\chemmacros\ module then you can easily write one yourself. The module must
be a file in a path where \TeX\ can find it following a certain naming
scheme. The file for a module \chemmodule*{foo} \emph{must be named}
-\code{chemmacros.module.foo.code.tex}.
+\code{chemmacros.style.foo.code.tex}.
\begin{commands}
- \command{ChemModule}[\sarg\marg{name}\marg{description}\oarg{minimal
- compatibility version}]
- Register module \meta{name}. The optional argument \meta{minimal
- compatibility version} ensures that this module is only loaded if the
- option \option{compatibility} has a high enough version number. If it is
- omitted the module can be loaded in each version~5.0 or higher.
+ \command{ChemStyle}[\sarg\marg{name}\oarg{version description}]
+ Register module \meta{name} where the optional argument is passed to the
+ optional argument of \cs*{ProvidesFile}.
\end{commands}
The first line in the file then should look similar to this:
\begin{sourcecode}
- \ChemModule{foo}{2015/07/14 description of foo}
+ \ChemStyle{foo}[2022-02-07 description of foo]
\end{sourcecode}
-This registers module \chemmodule*{foo} which means \chemmacros\ will accept
-this file as a valid module.
+This registers the style \chemmodule*{foo} which means \chemmacros\ will
+accept this file as a valid style.
+
+Such a style can then be loaded to your document via
+\begin{commands}
+ \command{usechemstyle}[\marg{csv list of style names}]
+ which should be used in the preamble of your document.
+\end{commands}
Since \chemmacros\ is written using expl3 \cs{ChemModule} starts an expl3
programming environment. If you don't want that but rather want to write your
module using traditional \LaTeXe\ methods then use the starred variant:
\begin{sourcecode}
- \ChemModule*{foo}{2015/07/14 description of foo}
+ \ChemStyle*{foo}[2022-02-07 description of foo]
\end{sourcecode}
In both variants \code{@} has category code~11 (letter).
-Since new modules very likely might rely on code provided first in a certain
-version of \chemmacros\ you might want to make sure that your module only is
-loaded when the compatibility mode is high enough to provide the features you
-want:
-\begin{sourcecode}
- \ChemModule{foo}{2015/10/14 description of foo}[5.2]
-\end{sourcecode}
-
If you decide to write your module \chemmodule*{foo} using expl3 and add
options you want to be able to set using
\cs{chemsetup}\Oarg{foo}\marg{options} please make sure you define (and set)
@@ -3608,8 +3644,9 @@ the usual support forums
\end{itemize}
You can also open an issue on
\url{https://github.com/cgnieder/chemmacros/issues/} possibly adding the label
-\emph{support}.
-
+\emph{support} or write an email to
+\href{mailto:chemmacros@cnltx.de}{chemmacros@cnltx.de}.
+
\subsection{Suggestions}
If you have any suggestions on how \chemmacros\ could be improved then please
go to \url{https://github.com/cgnieder/chemmacros/issues/} and open a new
@@ -3619,8 +3656,8 @@ issue possibly adding the label \emph{suggestion}.
If you find any bugs, \ie, errors (something not working as described,
conflicts with other packages, \ldots) then please go to
\url{https://github.com/cgnieder/chemmacros/issues/} and open a new issue
-describing the error including a minimal working example and possibly adding
-the label \emph{bug}.
+describing the error including a \emph{minimal working example} and possibly
+adding the label \emph{bug}.
\printbibliography
diff --git a/macros/latex/contrib/chemmacros/chemmacros.sty b/macros/latex/contrib/chemmacros/chemmacros.sty
index c9a913e922..649aed58b6 100644
--- a/macros/latex/contrib/chemmacros/chemmacros.sty
+++ b/macros/latex/contrib/chemmacros/chemmacros.sty
@@ -1,40 +1,39 @@
% --------------------------------------------------------------------------
-% the CHEMMACROS package
+% the CHEMMACROS package v6.1 2022/02/13
%
% comprehensive support for typesetting chemistry documents
%
% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
+% Web: https://github.org/cgnieder/chemmacros/
+% E-Mail: chemmacros@cnltx.de
% --------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
+% feel free to contact us.
% --------------------------------------------------------------------------
-% Copyright 2011--2022 Clemens Niederberger
+% Copyright 2011--2021 Clemens Niederberger
+% 2022-- Clemens Niederberger & Sonja K.
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% 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.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
-% The Current Maintainer of this work is Clemens Niederberger.
+% The Current Maintainers of this work are Clemens Niederberger and Sonja K.
% --------------------------------------------------------------------------
-\RequirePackage{l3keys2e}
+\RequirePackage {l3keys2e}
\ExplSyntaxOn
% --------------------------------------------------------------------------
% package information:
-\tl_const:Nn \c_chemmacros_date_tl {2022/01/18}
+\tl_const:Nn \c_chemmacros_date_tl {2022/02/13}
\tl_const:Nn \c_chemmacros_version_major_number_tl {6}
-\tl_const:Nn \c_chemmacros_version_minor_number_tl {0}
-\tl_const:Nn \c_chemmacros_version_subrelease_tl {a}
+\tl_const:Nn \c_chemmacros_version_minor_number_tl {1}
+\tl_const:Nn \c_chemmacros_version_subrelease_tl {}
\tl_const:Nx \c_chemmacros_version_number_tl
{
\c_chemmacros_version_major_number_tl .
@@ -52,7 +51,7 @@
{chemmacros}
{\c_chemmacros_date_tl}
{\c_chemmacros_version_tl}
- {\c_chemmacros_info_tl \c_space_tl (CN)}
+ {\c_chemmacros_info_tl \c_space_tl (CN~ &~ SK)}
% --------------------------------------------------------------------------
% variants of kernel functions:
@@ -69,7 +68,7 @@
\cs_generate_variant:Nn \int_to_arabic:n {V}
-\cs_generate_variant:Nn \msg_error:nnnnn {nnnx}
+\cs_generate_variant:Nn \msg_error:nnnnn {nnnx,nnnxx}
\cs_generate_variant:Nn \msg_error:nnnn {nnnx}
\cs_generate_variant:Nn \msg_error:nnn {nnV}
\cs_generate_variant:Nn \msg_warning:nnn {nnV}
@@ -122,29 +121,36 @@
\clist_new:N \l_chemmacros_modules_clist
\clist_set:Nn \l_chemmacros_modules_clist
{
- base, errorcheck, lang, greek, chemformula, charges, acid-base, symbols,
+ base, errorcheck, lang, greek, formula, charges, acid-base, symbols,
particles, phases, nomenclature, tikz, xfrac, translations
}
\clist_const:Nn \c_chemmacros_all_modules_clist
{
- base, errorcheck, lang, greek, chemformula, charges, acid-base, symbols,
+ base, errorcheck, lang, greek, formula, charges, acid-base, symbols,
particles, phases, nomenclature, tikz, isotopes, mechanisms, newman,
orbital, polymers, reactions, redox, xfrac, scheme, spectroscopy,
thermodynamics, units, reactants, translations
}
-\keys_define:nn {chemmacros/package-options}
+\tl_new:N \g__chemmacros_module_stop_tl
+
+\cs_new_protected:Npn \chemmacros_stop_module:n #1
+ { \tl_gput_right:Nn \g__chemmacros_module_stop_tl {{#1}} }
+
+\keys_define:nn {chemmacros/load-time}
{
minimal .bool_set:N = \l__chemmacros_minimal_bool ,
minimal .initial:n = false ,
modules .code:n =
\clist_if_in:NnF \l_chemmacros_modules_clist {#1}
{ \clist_put_right:Nn \l_chemmacros_modules_clist {#1} } ,
+ stop .code:n =
+ \clist_map_inline:nn {#1} { \chemmacros_stop_module:n {##1} } ,
unknown .code:n = \__chemmacros_loadtime_warning:n {unknown-option}
}
-\ProcessKeysPackageOptions {chemmacros/package-options}
+\ProcessKeysPackageOptions {chemmacros/load-time}
\keys_define:nn {chemmacros}
{
@@ -152,8 +158,8 @@
modules .code:n =
\msg_warning:nn {chemmacros} {module-mechanism}
\__chemmacros_loadtime_warning:n {load-time-option} ,
- package-options / minimal .meta:nn = {chemmacros} {minimal} ,
- package-options / modules .meta:nn = {chemmacros} {modules}
+ load-time / minimal .meta:nn = {chemmacros} {minimal} ,
+ load-time / modules .meta:nn = {chemmacros} {modules}
}
\NewDocumentCommand \usechemmodule {m}
@@ -219,8 +225,14 @@
\msg_new:nnn {chemmacros} {forbidden-module}
{
You've~ requested~ the~ chemmacros~ module~ `modules'~ \msg_line_context: .~
- This~ module~ is~ a~ pseudo~ module~ which~ may~ not~ be~ loaded~ through~
- the~ module~ loading~ mechansim.
+ This~ module~ is~ a~ pseudo~ module~ which~ may~ not~ be~ loaded~ through~
+ the~ module~ loading~ mechansim.
+ }
+
+\msg_new:nnn {chemmacros} {before-module}
+ {
+ The~ module~ `#1'~ has~ already~ been~ loaded.~ The~ code~ cannot~ be~
+ inserted~ before~ it~ \msg_line_context:
}
% ----------------------------------------------------------------------------
@@ -232,9 +244,87 @@
}
% ----------------------------------------------------------------------------
+% deprecation & removal
+\msg_new:nnn {chemmacros} {deprecated}
+ {
+ On~ line~ \msg_line_number: : \\
+ The~ #1~ `#2'~ is~ deprecated.~ Use~ #1~ `#3'~ instead .
+ }
+
+\msg_new:nnn {chemmacros} {deprecated-function}
+ { The~ command~ #1~ is~ deprecated.~ Use~ #2 instead . }
+
+\msg_new:nnn {chemmacros} {removed-function}
+ { The~ command~ #1~ has~ been~ removed. }
+
+\msg_new:nnn {chemmacros} {removed}
+ {
+ On~ line~ \msg_line_number: : \\
+ The~ #1~ `#2'~ has~ been~ removed~ from~ chemmacros. \\
+ If~ you~ need~ it~ back~ please~ open~ an~ issue~ on~ \\
+ https://github.com/cgnieder/chemmacros/issues
+ \tl_if_blank:nF {#3} { \\ #3 }
+ }
+
+% #1: type
+% #2: old
+% #3: new
+\cs_new_protected:Npn \__chemmacros_deprecation_warning:nnn #1#2#3
+ { \msg_warning:nnnnn {chemmacros} {deprecated} {#1} {#2} {#3} }
+\cs_generate_variant:Nn \__chemmacros_deprecation_warning:nnn {nne,nV}
+
+% #1: type
+% #2: old
+% #3: additional text
+\cs_new_protected:Npn \chemmacros_removal_warning:nnn #1#2#3
+ { \msg_warning:nnnnn {chemmacros} {removed} {#1} {#2} {#3} }
+\cs_generate_variant:Nn \chemmacros_removal_warning:nnn {nV}
+
+% #1: type
+% #2: old
+\cs_new_protected:Npn \chemmacros_removal_warning:nn #1#2
+ { \msg_warning:nnnn {chemmacros} {removed} {#1} {#2} }
+\cs_generate_variant:Nn \chemmacros_removal_warning:nn {nV}
+
+% #1: new
+\cs_new_protected:Npn \chemmacros_deprecate_option:n #1
+ { \__chemmacros_deprecation_warning:nVn {option} \l_keys_key_str {#1} }
+
+\cs_new_protected:Npn \chemmacros_deprecate_option:
+ { \__chemmacros_deprecation_warning:nV {option} \l_keys_key_str }
+
+% #1: additional text
+\cs_new_protected:Npn \chemmacros_remove_option:n #1
+ { \chemmacros_removal_warning:nVn {option} \l_keys_key_str {#1} }
+
+\cs_new_protected:Npn \chemmacros_remove_option:
+ { \chemmacros_removal_warning:nV {option} \l_keys_key_str }
+
+% #1: old
+% #2: new
+\cs_new_protected:Npn \chemmacros_deprecate_function:NN #1#2
+ {
+ \cs_set_protected:Npn #1
+ {
+ \msg_error:nnnn {chemmacros} {deprecated-function} {#1} {#2}
+ #2
+ }
+ }
+
+% #1: old
+\cs_new_protected:Npn \chemmacros_remove_function:N #1
+ {
+ \cs_set_protected:Npn #1
+ { \msg_error:nnn {chemmacros} {removed-function} {#1} }
+ }
+
+\NewDocumentCommand \DeclareChemDeprecated {mm}
+ { \chemmacros_deprecate_function:NN #1 #2 }
+
+% ----------------------------------------------------------------------------
% this is for external file modules called "styles":
\tl_const:Nn \c__chemmacros_module_extension_tl {code.tex}
-\tl_const:Nn \c__chemmacros_module_prefix_tl {chemmacros}
+\tl_const:Nn \c__chemmacros_module_prefix_tl {chemmacros.style}
\tl_new:N \g__chemmacros_modules_loaded_tl
@@ -256,7 +346,8 @@
\chemmacros_module_if_exist:nTF {#1}
{
\__chemmacros_module_hook_use:nn {#1} {before}
- \msg_info:nnn {chemmacros} {loading-module} {#1}
+ \msg_log:nnn {chemmacros} {loading-module} {#1}
+ \msg_term:nnn {chemmacros} {loading-module} {#1}
\@onefilewithoptions
{\c__chemmacros_module_prefix_tl.#1}[][]
\c__chemmacros_module_extension_tl
@@ -297,8 +388,8 @@
% #2: code
\cs_new_protected:Npn \chemmacros_module_before:nn #1#2
{
- % TODO: error in T case?
- \chemmacros_module_if_loaded:nF {#1}
+ \chemmacros_module_if_loaded:nTF {#1}
+ { \msg_error:nnn {chemmacros} {before-module} {#1} }
{ \__chemmacros_add_to_module_hook:nnn {#1} {before} {#2} }
}
@@ -328,14 +419,9 @@
\cs_generate_variant:Nn \__chemmacros_module_hook_use:nn {V}
% --------------------------------------------------------------------------
-\tl_new:N \l__chemmacros_module_date_tl
-\tl_new:N \l__chemmacros_module_version_tl
-
-\tl_set_eq:NN \l__chemmacros_module_date_tl \c_chemmacros_date_tl
-\tl_set_eq:NN \l__chemmacros_module_version_tl \c_chemmacros_version_tl
-
\cs_new_protected:Npn \__chemmacros_module:nn #1#2
{
+ \str_if_in:NnT \g__chemmacros_module_stop_tl {{#1}} { \file_input_stop: }
\tl_gput_right:Nn \g__chemmacros_modules_loaded_tl {{#1}}
\str_if_eq:xxF
{\c__chemmacros_module_prefix_tl.#1.\c__chemmacros_module_extension_tl}
@@ -345,24 +431,38 @@
{#1}
{\@currname.\@currext}
}
- \ProvidesFile
- {\c__chemmacros_module_prefix_tl.#1.\c__chemmacros_module_extension_tl}
- [
- \l__chemmacros_module_date_tl
- \c_space_tl
- v \l__chemmacros_module_version_tl
- \c_space_tl
- chemmacros~ style~ file~ `#1'~ (#2)
- ]
+ \tl_if_blank:nTF {#2}
+ {
+ \ProvidesFile
+ {\c__chemmacros_module_prefix_tl.#1.\c__chemmacros_module_extension_tl}
+ }
+ {
+ \ProvidesFile
+ {\c__chemmacros_module_prefix_tl.#1.\c__chemmacros_module_extension_tl}
+ [#2]
+ }
}
+% define a chemmacros style:
+% standard modules are written in the expl3 programming environment, the
+% starred version only uses a 2e programming environment, i.e., with @ as a
+% letter
+% #1: name
+% #2: description
+\NewDocumentCommand \ChemStyle {smo}
+ {
+ \IfNoValueTF {#3}
+ { \__chemmacros_module:nn {#2} {#3} }
+ { \__chemmacros_module:nn {#2} {} }
+ \bool_if:nF {#1} { \ExplSyntaxOn }
+ }
+
+% command for loading styles:
+\NewDocumentCommand \usechemstyle {m} { \chemmacros_modules_load:n {#1} }
+
% --------------------------------------------------------------------------
% define internal chemmacros modules:
\tl_new:N \g_chemmacros_module_tl
-\tl_new:N \g__chemmacros_module_stop_tl
-
-\cs_new_protected:Npn \chemmacros_stop_module:n #1
- { \tl_gput_right:Nn \g__chemmacros_module_stop_tl {{#1}} }
% #1: name
% #2: description
@@ -370,8 +470,8 @@
{
\str_if_in:NnT \g__chemmacros_module_stop_tl {{#1}}
{ \__chemmacros_gobble_module:w }
- \msg_log:nnnn {chemmacros} {loading-module} {#1} {#2}
- \msg_term:nnnn {chemmacros} {loading-module} {#1} {#2}
+ \msg_log:nnn {chemmacros} {loading-module} {#1}
+ \msg_term:nnn {chemmacros} {loading-module} {#1}
\tl_gput_right:Nn \g__chemmacros_modules_loaded_tl {{#1}}
\tl_gset:Nn \g_chemmacros_module_tl {#1}
\__chemmacros_module_hook_use:nn {#1} {before}
@@ -392,22 +492,12 @@
\ChemModule{base}{2022/01/10 basic chemmacros module}
% --------------------------------------------------------------------------
-\msg_new:nnn {chemmacros} {command-deprecated}
- {
- The~ command~ \token_to_str:N #1 \c_space_tl is~ deprecated.~ Use~
- \token_to_str:N #2 \c_space_tl instead.
- }
-
-% define a deprecated command with hints to the corresponding new one:
-\cs_new_protected:Npn \chemmacros_define_deprecated:NN #1#2
+\msg_new:nnn {chemmacros} {patch-failed}
{
- \cs_set_protected:Npn #1
- { \msg_warning:nnnn {chemmacros} {command-deprecated} {#1} {#2} #2 }
+ I~ failed~ to~ patch~ \token_to_str:N #1 .~ Please~ contact~ the~ package~
+ author.
}
-\NewDocumentCommand \DeclareChemDeprecated {mm}
- { \chemmacros_define_deprecated:NN #1 #2 }
-
% --------------------------------------------------------------------------
% define a macro set:
% \NewChem... \RenewChem... \DeclareChem... \ProvideChem...
@@ -519,7 +609,7 @@
\cs_new_protected:Npn \chemmacros_set_keys:nn #1#2
{ \keys_set:nn {chemmacros/#1} {#2} }
-\cs_generate_variant:Nn \chemmacros_set_keys:nn {x,nx}
+\cs_generate_variant:Nn \chemmacros_set_keys:nn {e,ne}
\cs_new_protected:Npn \chemmacros_set_keys_groups:nnn #1#2#3
{ \keys_set_groups:nnn {chemmacros/#1} {#2} {#3} }
@@ -595,6 +685,8 @@
{ \prg_return_true: }
{ \prg_return_false: }
}
+
+% --------------------------------------------------------------------------
\cs_new_protected:Npn \chemmacros_cs_if_free_new:Npn #1
{
\cs_if_exist:NF #1
@@ -609,6 +701,15 @@
}
\cs_generate_variant:Nn \chemmacros_cs_if_free_new_protected:Npn {c}
+% --------------------------------------------------------------------------
+\cs_new_protected:Npn \chemmacros_patch_cmd:Nnn #1#2#3
+ {
+ \patchcmd #1 {#2} {#3}
+ {}
+ { \msg_warning:nnn {chemmacros} {patch-failed} {#1} }
+ }
+
+% --------------------------------------------------------------------------
% #1: counter
% #2: singular
% #3: plural
@@ -729,7 +830,7 @@
\seq_new:N \l__chemmacros_if_bf_seq
-\seq_set_split:Nnn \l__chemmacros_if_bf_seq { , }
+\seq_set_split:Nnn \l__chemmacros_if_bf_seq {,}
{
b , bc , bm , bx , bux ,
eb , ebc , ebx , mb ,
@@ -748,9 +849,6 @@
{#1}
}
-\cs_new_protected:Npn \chemmacros_detect_bold:n
- { \error \chemmacros_bold:n }
-
% --------------------------------------------------------------------------
\RequirePackage{amstext}
@@ -808,7 +906,7 @@
}
\ChemModuleEnd
-\ChemModule{errorcheck}{2022/01/16 error checking for unloaded modules}
+\ChemModule{errorcheck}{2022/01/23 error checking for unloaded modules}
\msg_new:nnn {chemmacros} {undefined}
{
@@ -881,6 +979,24 @@
\chemmacros_command_requires_module:Nn \listofreactions {reactions}
\chemmacros_command_requires_module:Nn \AddRxnDesc {reactions}
+% reactants module
+\chemmacros_command_requires_module:Nn \DeclareChemReactant {reactants}
+\chemmacros_command_requires_module:Nn \reactant {reactants}
+\chemmacros_command_requires_module:Nn \reactants {reactants}
+\chemmacros_command_requires_module:Nn \reactantl {reactants}
+\chemmacros_command_requires_module:Nn \Reactant {reactants}
+\chemmacros_command_requires_module:Nn \solvent {reactants}
+\chemmacros_command_requires_module:Nn \solvents {reactants}
+\chemmacros_command_requires_module:Nn \solventl {reactants}
+\chemmacros_command_requires_module:Nn \Solvent {reactants}
+\chemmacros_command_requires_module:Nn \reactantplain {reactants}
+\chemmacros_command_requires_module:Nn \Reactantplain {reactants}
+\chemmacros_command_requires_module:Nn \submainreactantplain {reactants}
+\chemmacros_command_requires_module:Nn \Submainreactantplain {reactants}
+\chemmacros_command_requires_module:Nn \solventplain {reactants}
+\chemmacros_command_requires_module:Nn \Solventplain {reactants}
+\chemmacros_command_requires_module:Nn \printreactants {reactants}
+
% redox module
\chemmacros_command_requires_module:Nn \ox {redox}
\chemmacros_command_requires_module:Nn \OX {redox}
@@ -1092,7 +1208,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{chemformula}{2020/11/29 integration of chemical formulas}
+\ChemModule{formula}{2022/01/29 integration of chemical formulas}
\RequirePackage{amstext}
@@ -1108,10 +1224,14 @@
method~ `chemformula'.
}
+\msg_new:nnn {chemmacros} {formula-method}
+ { Using~ the~ formula~ method~ `#1'. }
+
\msg_new:nnn {chemmacros} {formula-conflict}
{
- You~ have~ loaded~ multiple~ formula~ method~ packages~ but~ haven't~
- chosen~ which~ method~ to~ use!~ I~ will~ use~ `chemformula'. \\
+ You~ have~ loaded~ both~ `chemformula'~ and~ `mhchem'~ as~ formula~
+ package~ but~ haven't~ chosen~ which~ formula~ method~ to~ use! \\
+ I~ will~ use~ `chemformula'. \\
You~ should~ decide~ for~ only~ one~ of~ the~ packages~ for~ having~ a~
consistent~ layout.
}
@@ -1120,10 +1240,12 @@
% generic functions for usage in other packages; those are to be set in each
% method setup:
\cs_new_protected:Npn \chemmacros_reaction:n #1 {#1}
-\cs_new_protected:Npn \chemmacros_chemformula:n #1 {#1}
-\cs_generate_variant:Nn \chemmacros_chemformula:n { x,V }
+\cs_new_protected:Npn \chemmacros_formula:n #1 {#1}
+\cs_generate_variant:Nn \chemmacros_formula:n { x,V,e }
+
+\chemmacros_deprecate_function:NN \chemmacros_chemformula:n \chemmacros_formula:n
-\cs_new_protected:Npn \chemmacros@formula #1 { \chemmacros_chemformula:n {#1} }
+\cs_new_protected:Npn \chemmacros@formula #1 { \chemmacros_formula:n {#1} }
\cs_new_protected:Npn \chemmacros@reaction #1 { \chemmacros_reaction:n {#1} }
% --------------------------------------------------------------------------
@@ -1133,22 +1255,22 @@
\tl_new:N \g_chemmacros_formula_method_tl
\tl_gset:Nn \g_chemmacros_formula_method_tl {chemformula}
-\prop_new:N \l__chemmacros_method_packages_prop
+\prop_new:N \l__chemmacros_formula_methods_prop
% #1: package/method name
% #2: preparations
-\cs_new_protected:Npn \chemmacros_add_method_package:nn #1#2
- { \prop_put:Nnn \l__chemmacros_method_packages_prop {#1} {#2} }
+\cs_new_protected:Npn \chemmacros_add_formula_method:nn #1#2
+ { \prop_put:Nnn \l__chemmacros_formula_methods_prop {#1} {#2} }
-\cs_new_protected:Npn \chemmacros_setup_method_package:n #1
+\cs_new_protected:Npn \chemmacros_setup_formula_method:n #1
{
- \prop_item:Nn \l__chemmacros_method_packages_prop {#1}
+ \prop_item:Nn \l__chemmacros_formula_methods_prop {#1}
\tl_gset:Nn \g_chemmacros_formula_method_tl {#1}
}
-\prg_new_conditional:Npnn \chemmacros_if_method_package:n #1 {p,T,F,TF}
+\prg_new_conditional:Npnn \chemmacros_if_formula_method:n #1 {p,T,F,TF}
{
- \prop_if_in:NnTF \l__chemmacros_method_packages_prop {#1}
+ \prop_if_in:NnTF \l__chemmacros_formula_methods_prop {#1}
{ \prg_return_true: }
{ \prg_return_false: }
}
@@ -1158,7 +1280,7 @@
\bool_if:NF \l__chemmacros_formula_method_set_bool
{
\bool_set_false:N \l__chemmacros_tmpa_bool
- \prop_map_inline:Nn \l__chemmacros_method_packages_prop
+ \clist_map_inline:nn {chemformula,mhchem}
{
\chemmacros_if_package_loaded:nT {##1}
{
@@ -1181,11 +1303,11 @@
\cs_new_protected:Npn \chemmacros_set_formula_method:n #1
{
- \chemmacros_if_method_package:nTF {#1}
- { \chemmacros_setup_method_package:n {#1} }
+ \chemmacros_if_formula_method:nTF {#1}
+ { \chemmacros_setup_formula_method:n {#1} }
{
\msg_warning:nnn {chemmacros} {unknown-formula-method} {#1}
- \chemmacros_setup_method_package:n {chemformula}
+ \chemmacros_setup_formula_method:n {chemformula}
}
\bool_set_true:N \l__chemmacros_formula_method_set_bool
}
@@ -1193,19 +1315,19 @@
% --------------------------------------------------------------------------
% add formula methods:
-\chemmacros_add_method_package:nn {chemformula}
+\chemmacros_add_formula_method:nn {chemformula}
{
- \chemmacros_integrate_package:nnn {} {chemformula} {2015/09/08}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1
+ \chemmacros_integrate_package:nnn {} {chemformula} {2022/01/23}
+ \cs_set_protected:Npn \chemmacros_formula:n #1
{ \chemformula_chcpd:nn {} {#1} }
\cs_set_protected:Npn \chemmacros_reaction:n #1
{ \chemformula_ch:nn {} {#1} }
}
-\chemmacros_add_method_package:nn {mhchem}
+\chemmacros_add_formula_method:nn {mhchem}
{
\chemmacros_integrate_package:nnn {version=4} {mhchem} {}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1 { \ce {#1} }
+ \cs_set_protected:Npn \chemmacros_formula:n #1 { \ce {#1} }
\cs_set_protected:Npn \chemmacros_reaction:n #1 { \ce {#1} }
\chemmacros_module_after:nn {charges}
{
@@ -1219,10 +1341,10 @@
}
}
-\chemmacros_add_method_package:nn {chemist}
+\chemmacros_add_formula_method:nn {chemist}
{
\RequirePackage {chemist}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1
+ \cs_set_protected:Npn \chemmacros_formula:n #1
{ \chemmacros_text:n { \ChemForm {#1} } }
\cs_set_protected:Npn \chemmacros_reaction:n #1
{ \chemmacros_text:n { \ChemForm {#1} } }
@@ -1239,17 +1361,16 @@
}
}
-\chemmacros_add_method_package:nn {chemfig}
+\chemmacros_add_formula_method:nn {chemfig}
{
\RequirePackage {chemfig}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1
- { \printatom {#1} }
+ \cs_set_protected:Npn \chemmacros_formula:n #1 { \printatom {#1} }
\cs_set_protected:Npn \chemmacros_reaction:n #1
- { \printatom {#1} }
+ { \schemestart #1 \schemestop }
\chemmacros_module_after:nn {charges}
{
\cs_set_protected:Npn \chemmacros_elpair:n #1
- { \Lewis { 0: , \printatom {#1} } }
+ { \Charge { 0=\: } {#1} }
\cs_set_protected:Npn \chemmacros_plus: { + }
\cs_set_protected:Npn \chemmacros_minus: { - }
\cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
@@ -1264,17 +1385,11 @@
{ formula .code:n = \chemmacros_set_formula_method:n {#1} }
\hook_gput_code:nnn {begindocument/before} {chemmacros}
- {
- \bool_if:NF \l__chemmacros_formula_method_set_bool
- {
- \msg_info:nn {chemmacros} {default-formula-method}
- \chemmacros_set_formula_method:n {chemformula}
- }
- }
+ { \chemmacros_check_formula_method: }
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{charges}{2020/11/29 charges}
+\ChemModule{charges}{2022/01/29 charges}
% --------------------------------------------------------------------------
% circled charge signs: they are defined in the `chemformula' package:
@@ -1339,7 +1454,7 @@
\cs_new_protected:Npn \chemmacros_formal_minus: { \chemformula_formal_minus: }
\cs_new_protected:Npn \chemmacros_charge:n #1
- { \chemmacros_chemformula:n { {}^{#1} } }
+ { \chemmacros_formula:n { {}^{#1} } }
\cs_new_protected:Npn \chemmacros_new_charge_command:Nn #1#2
{
@@ -1403,7 +1518,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{acid-base}{2022/01/13 acid/base}
+\ChemModule{acid-base}{2022/01/29 acid/base}
% --------------------------------------------------------------------------
% equilibrium constants:
@@ -1487,8 +1602,8 @@
}
\NewDocumentCommand \p {m} { \chemmacros_p:n {#1} }
-\NewDocumentCommand \pH {} { \chemmacros_p:n { \chemmacros_chemformula:n {H} } }
-\NewDocumentCommand \pOH {} { \chemmacros_p:n { \chemmacros_chemformula:n {OH} } }
+\NewDocumentCommand \pH {} { \chemmacros_p:n { \chemmacros_formula:n {H} } }
+\NewDocumentCommand \pOH {} { \chemmacros_p:n { \chemmacros_formula:n {OH} } }
\NewDocumentCommand \pKa {o}
{
@@ -1573,7 +1688,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{particles}{2020/11/29 particles}
+\ChemModule{particles}{2022/01/29 particles}
% --------------------------------------------------------------------------
% particles
@@ -1583,7 +1698,7 @@
\use:x
{
\cs_set_protected:Npn \exp_not:N #1
- { \chemmacros_chemformula:n { \exp_not:V \l__chemmacros_tmpa_tl } }
+ { \chemmacros_formula:n { \exp_not:V \l__chemmacros_tmpa_tl } }
}
}
@@ -1634,9 +1749,9 @@
{
\chemmacros_elpair:n { #2 }
\skip_horizontal:N \l__chemmacros_nucleophile_dim
- \chemmacros_chemformula:n { {}^{-} }
+ \chemmacros_formula:n { {}^{-} }
}
- { \chemmacros_chemformula:n { #2^{-} } }
+ { \chemmacros_formula:n { #2^{-} } }
}
\DeclareDocumentCommand #1 {o}
{
@@ -1713,7 +1828,7 @@
{
\mode_leave_vertical:
\bool_if:NTF \l__chemmacros_phases_sub_bool
- { \chemformula_subscript:n { (#1) } }
+ { \chemmacros_formula:n { {}_{(#1)} } }
{
\skip_horizontal:N \l__chemmacros_phases_space_dim
\chemmacros_text:n { (#1) }
@@ -1730,7 +1845,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{nomenclature}{2022/01/10 chemical names}
+\ChemModule{nomenclature}{2022/01/29 chemical names}
\bool_new:N \l__chemmacros_iupac_restricted_bool
\bool_new:N \l__chemmacros_iupac_strict_bool
@@ -1900,43 +2015,14 @@
{ \chemmacros_let_iupac:NN #1 #2 }
% --------------------------------------------------------------------------
-\chemmacros_define_keys:nn {nomenclature}
- {
- iupac .choice: ,
- iupac / restricted .code:n =
- \bool_set_true:N \l__chemmacros_iupac_restricted_bool
- \bool_set_false:N \l__chemmacros_iupac_strict_bool ,
- iupac / auto .code:n =
- \bool_set_false:N \l__chemmacros_iupac_restricted_bool
- \bool_set_false:N \l__chemmacros_iupac_strict_bool ,
- iupac / strict .code:n =
- \bool_set_false:N \l__chemmacros_iupac_restricted_bool
- \bool_set_true:N \l__chemmacros_iupac_strict_bool ,
- iupac .initial:n = auto
- }
-
-% --------------------------------------------------------------------------
% stereo descriptors and other nomenclature commands
% Cahn-Ingold-Prelog
\dim_new:N \l__chemmacros_cip_kern_dim
\dim_set:Nn \l__chemmacros_cip_kern_dim {.075em}
-\chemmacros_define_keys:nn {nomenclature}
- { cip-kern .dim_set:N = \l__chemmacros_cip_kern_dim }
-
\tl_new:N \l__chemmacros_cip_inner_tl
\tl_new:N \l__chemmacros_cip_outer_tl
\tl_new:N \l__chemmacros_cip_number_tl
-
-\chemmacros_define_keys:nn {nomenclature}
- {
- cip-inner-format .tl_set:N = \l__chemmacros_cip_inner_tl ,
- cip-inner-format .initial:n = \itshape ,
- cip-outer-format .tl_set:N = \l__chemmacros_cip_outer_tl ,
- cip-outer-format .initial:n = \upshape ,
- cip-number-format .tl_set:N = \l__chemmacros_cip_number_tl ,
- cip-number-format .initial:n = \upshape
- }
\cs_new_protected:Npn \__chemmacros_cip:n #1
{
@@ -2005,29 +2091,18 @@
% coordination chemistry
\bool_new:N \l__chemmacros_bridge_super_bool
-\chemmacros_define_keys:nn {nomenclature}
- {
- bridge-number .choice: ,
- bridge-number / sub .code:n =
- \bool_set_false:N \l__chemmacros_bridge_super_bool ,
- bridge-number / super .code:n =
- \bool_set_true:N \l__chemmacros_bridge_super_bool ,
- coord-use-hyphen .bool_set:N = \l__chemmacros_coord_use_hyphen_bool ,
- coord-use-hyphen .initial:n = true
- }
-
% #1: boolean - if true hyphen is turned on
% #2: boolean - if true superscript will be used
% #3: symbol
% #4: sub-/superscript
\cs_new_protected:Npn \chemmacros_coordination_symbol:nnnn #1#2#3#4
{
- \chemmacros_chemformula:n {#3}
+ \chemmacros_formula:n {#3}
\tl_if_blank:nF {#4}
{
\bool_if:nTF {#2}
- { \chemmacros_chemformula:n { {}^{#4} } }
- { \chemmacros_chemformula:n { {}_{#4} } }
+ { \chemmacros_formula:n { {}^{#4} } }
+ { \chemmacros_formula:n { {}_{#4} } }
}
\bool_if:nT
{#1}
@@ -2127,13 +2202,6 @@
\skip_new:N \l__chemmacros_iupac_break_skip
\skip_set:Nn \l__chemmacros_iupac_break_skip { .03em plus .07em }
-\chemmacros_define_keys:nn {nomenclature}
- {
- hyphen-pre-space .dim_set:N = \l__chemmacros_iupac_hyphen_pre_dim ,
- hyphen-post-space .dim_set:N = \l__chemmacros_iupac_hyphen_post_dim ,
- break-space .skip_set:N = \l__chemmacros_iupac_break_skip
- }
-
\cs_new_protected:Npn \chemmacros_break_point_hyphen:
{
\__chemmacros_break_point_insert:nnn
@@ -2255,17 +2323,8 @@
\NewDocumentCommand \RemoveChemIUPACShorthand {m}
{ \chemmacros_remove_shorthand:N #1 }
-\NewChemIUPACShorthand ^ \chemmacros_superscript:n
-\NewChemIUPACShorthand | \chemmacros_break_point:
-\NewChemIUPACShorthand - \chemmacros_break_point_hyphen:
-\NewChemIUPACShorthand ( \chemmacros_break_point_opening_paren:
-\NewChemIUPACShorthand ) \chemmacros_break_point_closing_paren:
-\NewChemIUPACShorthand [ \chemmacros_break_point_opening_bracket:
-\NewChemIUPACShorthand ] \chemmacros_break_point_closing_bracket:
-\NewChemIUPAC \chemprime { \ensuremath {{}^{\prime}} }
-\NewChemIUPACShorthand ' \chemprime
-\NewChemIUPAC \nonbreakinghyphen { \mbox{-} \nobreak \hspace{0pt} }
-\NewChemIUPACShorthand = \nonbreakinghyphen
+% --------------------------------------------------------------------------
+\tl_new:N \l__chemmacros_iupac_format_tl
\cs_new_protected:Npn \chemmacros_iupac:nn #1#2
{
@@ -2278,7 +2337,7 @@
\tl_set_rescan:Nnn \l__chemmacros_tmpa_tl
{ \chemmacros_activate_all_iupac_shorthands: }
{#2}
- \l__chemmacros_tmpa_tl
+ \l__chemmacros_iupac_format_tl { \l__chemmacros_tmpa_tl }
\group_end:
}
@@ -2288,6 +2347,18 @@
\NewDocumentCommand \iupac {O{}m} { \chemmacros_iupac:nn {#1} {#2} }
% --------------------------------------------------------------------------
+\NewChemIUPACShorthand ^ \chemmacros_superscript:n
+\NewChemIUPACShorthand | \chemmacros_break_point:
+\NewChemIUPACShorthand - \chemmacros_break_point_hyphen:
+\NewChemIUPACShorthand ( \chemmacros_break_point_opening_paren:
+\NewChemIUPACShorthand ) \chemmacros_break_point_closing_paren:
+\NewChemIUPACShorthand [ \chemmacros_break_point_opening_bracket:
+\NewChemIUPACShorthand ] \chemmacros_break_point_closing_bracket:
+\NewChemIUPAC \chemprime { \ensuremath {{}^{\prime}} }
+\NewChemIUPACShorthand ' \chemprime
+\NewChemIUPAC \nonbreakinghyphen { \mbox{-} \nobreak \hspace{0pt} }
+\NewChemIUPACShorthand = \nonbreakinghyphen
+
% R(ectus)/S(inister):
\NewChemIUPAC \rectus { \cip {R} }
\NewChemIUPAC \sinister { \cip {S} }
@@ -2371,12 +2442,6 @@
\NewChemMacroset {Latin} {mm}
{ \chemmacros_define_latin:Nn #1 {#2} }
-
-\chemmacros_define_keys:nn {nomenclature}
- {
- format .tl_set:N = \l__chemmacros_latin_format_tl ,
- format .initial:n = \emph ,
- }
\cs_new_protected:Npn \chemmacros_write_latin:n #1
{
@@ -2405,6 +2470,43 @@
\NewChemLatin \insitu {in~situ}
% --------------------------------------------------------------------------
+\chemmacros_define_keys:nn {nomenclature}
+ {
+ iupac .choice: ,
+ iupac / restricted .code:n =
+ \bool_set_true:N \l__chemmacros_iupac_restricted_bool
+ \bool_set_false:N \l__chemmacros_iupac_strict_bool ,
+ iupac / auto .code:n =
+ \bool_set_false:N \l__chemmacros_iupac_restricted_bool
+ \bool_set_false:N \l__chemmacros_iupac_strict_bool ,
+ iupac / strict .code:n =
+ \bool_set_false:N \l__chemmacros_iupac_restricted_bool
+ \bool_set_true:N \l__chemmacros_iupac_strict_bool ,
+ iupac .initial:n = auto ,
+ iupac-format .tl_set:N = \l__chemmacros_iupac_format_tl ,
+ cip-kern .dim_set:N = \l__chemmacros_cip_kern_dim ,
+ cip-inner-format .tl_set:N = \l__chemmacros_cip_inner_tl ,
+ cip-inner-format .initial:n = \itshape ,
+ cip-outer-format .tl_set:N = \l__chemmacros_cip_outer_tl ,
+ cip-outer-format .initial:n = \upshape ,
+ cip-number-format .tl_set:N = \l__chemmacros_cip_number_tl ,
+ cip-number-format .initial:n = \upshape ,
+ bridge-number .choice: ,
+ bridge-number / sub .code:n =
+ \bool_set_false:N \l__chemmacros_bridge_super_bool ,
+ bridge-number / super .code:n =
+ \bool_set_true:N \l__chemmacros_bridge_super_bool ,
+ coord-use-hyphen .bool_set:N = \l__chemmacros_coord_use_hyphen_bool ,
+ coord-use-hyphen .initial:n = true ,
+ hyphen-pre-space .dim_set:N = \l__chemmacros_iupac_hyphen_pre_dim ,
+ hyphen-post-space .dim_set:N = \l__chemmacros_iupac_hyphen_post_dim ,
+ break-space .skip_set:N = \l__chemmacros_iupac_break_skip ,
+ latin-format .tl_set:N = \l__chemmacros_latin_format_tl ,
+ latin-format .initial:n = \emph ,
+ format .code:n = \chemmacros_deprecate_option:n {latin-format}
+ }
+
+% --------------------------------------------------------------------------
% hyperref support
% ?? unsure about adding IUPAC commands
\hook_gput_code:nnn {package/hyperref/after} {chemmacros}
@@ -2453,7 +2555,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{tikz}{2020/11/29 upright greek symbols}
+\ChemModule{tikz}{2020/11/29 ease usage of TikZ in chemmacros}
\ExplSyntaxOff
\RequirePackage{tikz}
@@ -2485,7 +2587,7 @@
\dim_new:N \l__chemmacros_el_length_dim
% full tip for pairs
-\pgfarrowsdeclare { el } { el }
+\pgfarrowsdeclare {el} {el}
{
\dim_set:Nn \l__chemmacros_el_length_dim
{ 2.5pt + 2.5\pgflinewidth }
@@ -2495,10 +2597,10 @@
{
\dim_set:Nn \l__chemmacros_el_length_dim
{ 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
+ \pgfsetdash {} {0pt}
\pgfsetroundjoin
\pgfsetroundcap
- \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathmoveto { \pgfpoint {0pt} {0pt} }
\pgfpathlineto
{
\pgfpoint
@@ -2506,19 +2608,19 @@
{ .3\l__chemmacros_el_length_dim }
}
\pgfpathlineto
- { \pgfpoint { -.5\l__chemmacros_el_length_dim } { 0pt } }
+ { \pgfpoint { -.5\l__chemmacros_el_length_dim } {0pt} }
\pgfpathlineto
{
\pgfpoint
{ -\l__chemmacros_el_length_dim }
{ -.3\l__chemmacros_el_length_dim }
}
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathlineto { \pgfpoint {0pt} {0pt} }
\pgfusepathqfillstroke
}
% half tip on the left
-\pgfarrowsdeclare { left~el } { left~el }
+\pgfarrowsdeclare {left~ el} {left~ el}
{
\dim_set:Nn \l__chemmacros_el_length_dim
{ 2.5pt + 2.5\pgflinewidth }
@@ -2528,23 +2630,23 @@
{
\dim_set:Nn \l__chemmacros_el_length_dim
{ 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
+ \pgfsetdash {} {0pt}
\pgfsetroundjoin
\pgfsetroundcap
- \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathmoveto { \pgfpoint {0pt} {0pt} }
\pgfpathlineto
{
\pgfpoint
{ -\l__chemmacros_el_length_dim }
{ .3\l__chemmacros_el_length_dim }
}
- \pgfpathlineto { \pgfpoint { -.5\l__chemmacros_el_length_dim } { 0pt } }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathlineto { \pgfpoint { -.5\l__chemmacros_el_length_dim } {0pt} }
+ \pgfpathlineto { \pgfpoint {0pt} {0pt} }
\pgfusepathqfillstroke
}
% half tip in the right
-\pgfarrowsdeclare { right~el } { right~el }
+\pgfarrowsdeclare {right~ el} {right~ el}
{
\dim_set:Nn \l__chemmacros_el_length_dim
{ 2.5pt + 2.5\pgflinewidth }
@@ -2554,18 +2656,18 @@
{
\dim_set:Nn \l__chemmacros_el_length_dim
{ 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
+ \pgfsetdash {} {0pt}
\pgfsetroundjoin
\pgfsetroundcap
- \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathmoveto { \pgfpoint {0pt} {0pt} }
\pgfpathlineto
{
\pgfpoint
{ -\l__chemmacros_el_length_dim }
{ -.3\l__chemmacros_el_length_dim }
}
- \pgfpathlineto { \pgfpoint { -.5\l__chemmacros_el_length_dim } { 0pt } }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathlineto { \pgfpoint { -.5\l__chemmacros_el_length_dim } {0pt} }
+ \pgfpathlineto { \pgfpoint {0pt} {0pt} }
\pgfusepathqfillstroke
}
% --------------------------------------------------------------------------
@@ -2609,7 +2711,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{isotopes}{2020/11/29 a macro to easily print element isotopes}
+\ChemModule{isotopes}{2022/01/29 a macro to easily print element isotopes}
\RequirePackage{elements}
@@ -2802,9 +2904,9 @@
\cs_new_protected:Npn \chemmacros_isotope_write:nnn #1#2#3
{
\bool_if:NTF \l__chemmacros_isotope_super_bool
- { \chemmacros_chemformula:n { ^{#1}_{#2}#3 } }
+ { \chemmacros_formula:n { ^{#1}_{#2}#3 } }
{
- \chemmacros_chemformula:n {#3}
+ \chemmacros_formula:n {#3}
\tl_use:N \l__chemmacros_isotope_side_connect_tl
#1
}
@@ -3818,11 +3920,38 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{reactions}{2022/01/13 reaction environments}
+\ChemModule{reactions}{2022/02/05 reaction environments}
-\RequirePackage{mathtools}
+\newcounter {reaction}
+\hook_gput_code:nnn {package/hyperref/after} {chemmacros}
+ {
+ \cs_if_exist:NTF \chapter
+ { \cs_set:Npn \theHreaction { \theHchapter . \thereaction } }
+ { \cs_set:Npn \theHreaction { \theHsection . \thereaction } }
+ }
+
+\bool_new:N \l__chemmacros_reactions_counter_bool
+\bool_new:N \l__chemmacros_reactions_tocbasic_bool
+
+\cs_new_eq:NN \l@reaction \l@figure
+\cs_if_exist:NT \KOMAClassName
+ { \bool_set_true:N \l__chemmacros_reactions_tocbasic_bool }
+
+\tl_new:N \g__chemmacros_reaction_description_tl
+\tl_new:N \l__chemmacros_reactions_tag_open_tl
+\tl_new:N \l__chemmacros_reactions_tag_close_tl
+\tl_new:N \l__chemmacros_reactions_before_tag_tl
+\tl_new:N \l__chemmacros_reaction_lorname_tl
+\tl_new:N \reactionlistname
+\tl_new:N \reactionautorefname
+\tl_new:N \l__chemmacros_reactions_args_tl
% --------------------------------------------------------------------------
+\RequirePackage{mathtools}
+% redefine mathtools' command \MT_define_tagform:nwnn to ensure we add an
+% entry to the list of reactions even if the user redefines the reaction tag
+% this should probably be done via patching...
+
\cs_new_protected:Npn \__chemmacros_record_for_lor:nnnnn #1#2#3#4#5
{
\tl_if_eq:nnT {#1} {reaction}
@@ -3844,9 +3973,6 @@
}
}
-% redefine mathtools' command \MT_define_tagform:nwnn to ensure we add an
-% entry to the list of reactions even if the user redefines the reaction tag
-% this should probably be done via patching...
\hook_gput_code:nnn {package/mathtools/after} {chemmacros}
{
\cs_set_protected:Npn \MT_define_tagform:nwnn #1[#2]#3#4
@@ -3855,15 +3981,21 @@
{
% this is the original part:
\maketag@@@{#3\ignorespaces#2{##1}\unskip\@@italiccorr#4}
- % this is added => this disturbs hyperref:
+ % this is added (but disturbs hyperref):
\__chemmacros_record_for_lor:nnnnn
{#1} {#3} {#2} {##1} {#4}
}
}
}
-\tl_new:N \g__chemmacros_reaction_description_tl
+% --------------------------------------------------------------------------
+% create new tagform
+\newtagform {reaction}
+ [\l__chemmacros_reactions_before_tag_tl]
+ {\l__chemmacros_reactions_tag_open_tl}
+ {\l__chemmacros_reactions_tag_close_tl}
+% --------------------------------------------------------------------------
\cs_new_protected:Npn \chemmacros_add_reaction_description:n #1
{
\tl_if_blank:nF {#1}
@@ -3873,31 +4005,10 @@
\NewDocumentCommand \AddRxnDesc {m}
{ \chemmacros_add_reaction_description:n {#1} }
+% --------------------------------------------------------------------------
% define \listofreactions
-\tl_new:N \l__chemmacros_reaction_lorname_tl
-\tl_new:N \reactionlistname
-\tl_new:N \l__chemmacros_reaction_heading_tl
-
-\cs_new:Npn \__chemmacros_reaction_heading:n #1
- { \l__chemmacros_reaction_heading_tl {#1} }
-\cs_generate_variant:Nn \__chemmacros_reaction_heading:n { V }
-
-\tl_set:Nn \l__chemmacros_reaction_lorname_tl
- { \chemmacros_translate:n {Reaction} }
-
-\tl_set:Nn \reactionlistname { \chemmacros_translate:n {list-of-reactions} }
-
-\chemmacros_define_keys:nn {reactions}
- {
- list-name .tl_set:N = \reactionlistname ,
- list-entry .tl_set:N = \l__chemmacros_reaction_lorname_tl ,
- list-heading-cmd .code:n =
- \cs_set_protected:Npn \__chemmacros_reaction_heading:n ##1 {#1}
- }
-
-\cs_if_exist:NTF \chapter
- { \chemmacros_set_keys:nn {reactions} { list-heading-cmd = \chapter* {#1} } }
- { \chemmacros_set_keys:nn {reactions} { list-heading-cmd = \section* {#1} } }
+\cs_new_protected:Npn \__chemmacros_reaction_heading:n #1 {#1}
+\cs_generate_variant:Nn \__chemmacros_reaction_heading:n {V}
\cs_new_protected:Npn \listofreactions
{
@@ -3905,39 +4016,15 @@
\@starttoc {lor}
}
-\cs_new_eq:NN \l@reaction \l@figure
-
-\bool_new:N \l__chemmacros_reactions_tocbasic_bool
-\cs_if_exist:NT \KOMAClassName
- { \bool_set_true:N \l__chemmacros_reactions_tocbasic_bool }
-
-\tl_new:N \l__chemmacros_reactions_tag_open_tl
-\tl_new:N \l__chemmacros_reactions_tag_close_tl
-\tl_new:N \l__chemmacros_reactions_before_tag_tl
-
-\chemmacros_define_keys:nn {reactions}
- {
- tocbasic .bool_set:N = \l__chemmacros_reactions_tocbasic_bool ,
- tag-open .tl_set:N = \l__chemmacros_reactions_tag_open_tl ,
- tag-open .initial:n = \{ ,
- tag-close .tl_set:N = \l__chemmacros_reactions_tag_close_tl ,
- tag-close .initial:n = \} ,
- before-tag .tl_set:N = \l__chemmacros_reactions_before_tag_tl
- }
-
\hook_gput_code:nnn {package/tocbasic/after} {chemmacros}
{
- \bool_lazy_or:nnT
- { \chemmacros_if_package_loaded_p:n {tocbasic} }
- { \l__chemmacros_reactions_tocbasic_bool }
- {
- \RequirePackage {tocbasic}
- \addtotoclist [float] {lor}
- \cs_set_protected:Npn \listofreactions { \listoftoc {lor} }
- \cs_new:Npn \listoflorname { \reactionlistname }
- }
+ \addtotoclist [float] {lor}
+ \cs_set_protected:Npn \listofreactions { \listoftoc {lor} }
+ \cs_new:Npn \listoflorname { \reactionlistname }
}
+% --------------------------------------------------------------------------
+% cleveref:
\ChemCleverefSupport {reaction}
{ \chemmacros_translate:n {reaction} }
[ \chemmacros_translate:n {Reaction} ]
@@ -3948,84 +4035,106 @@
{
\creflabelformat {reaction}
{
- #2
\l__chemmacros_reactions_tag_open_tl
- #1
+ #2 #1 #3
\l__chemmacros_reactions_tag_close_tl
- #3
}
}
-\ChemFancyrefSupport {rct}
- { \chemmacros_translate:n {reaction} }
- [ \chemmacros_translate:n {Reaction} ]
-
-% create new tagform
-\newtagform {reaction}
- [\l__chemmacros_reactions_before_tag_tl]
- {\l__chemmacros_reactions_tag_open_tl}
- {\l__chemmacros_reactions_tag_close_tl}
-
-\newcounter {chemmacros_save_reaction}
-\newcounter {reaction}
-
-\cs_new_protected:Npn \__chemmacros_begin_reaction:
+% fancyref:
+\hook_gput_code:nnn {package/fancyref/after} {chemmacros}
{
- \patchcmd \thereaction {reaction} {equation} {} {}
- \cs_set_eq:NN \theequation \thereaction
- \cs_set_eq:NN \r@equation \r@reaction
- \cs_set_eq:NN \p@equation \p@reaction
- \cs_set:Npn \theHequation { R . \theHsection . \theequation }
- \setcounter {chemmacros_save_reaction} { \value {equation} }
- \setcounter {equation} { \value {reaction} }
- \chemmacros_if_package_loaded:nT {cleveref}
- { \crefalias {equation} {reaction} }
- \usetagform {reaction}
+ \cs_set:Npn \fancyrefrctlabelprefix {rct}
+ \cs_set:Npn \frefrctname { \chemmacros_translate:n {reaction} }
+ \cs_set:Npn \Frefrctname { \chemmacros_translate:n {Reaction} }
+ \frefformat {vario} { \fancyrefrctlabelprefix }
+ {
+ \frefrctname \fancyrefdefaultspacing
+ \textup {
+ \l__chemmacros_reactions_tag_open_tl
+ #1
+ \l__chemmacros_reactions_tag_close_tl
+ }
+ #3
+ }
+ \Frefformat {vario} { \fancyrefrctlabelprefix }
+ {
+ \Frefrctname \fancyrefdefaultspacing
+ \textup {
+ \l__chemmacros_reactions_tag_open_tl
+ #1
+ \l__chemmacros_reactions_tag_close_tl
+ }
+ #3
+ }
+ \frefformat {plain} { \fancyrefrctlabelprefix }
+ { \frefrctname \fancyrefdefaultspacing #1 }
+ \Frefformat {plain} { \fancyrefrctlabelprefix }
+ { \Frefrctname \fancyrefdefaultspacing #1 }
}
-% switch back to equation tags
-\cs_new_protected:Npn \__chemmacros_end_reaction:
+% --------------------------------------------------------------------------
+% begin and end reaction environments: switch to reaction counter:
+\cs_new_protected:Npn \__chemmacros_begin_reaction:
{
- \setcounter {reaction} { \value {equation} }
- \setcounter {equation} { \value {chemmacros_save_reaction} }
+ \bool_if:NT \l__chemmacros_reactions_counter_bool
+ {
+ \cs_set_eq:NN \r@equation \r@reaction
+ \cs_set_eq:NN \p@equation \p@reaction
+ \cs_set_eq:NN \c@equation \c@reaction
+ \chemmacros_patch_cmd:Nnn \thereaction {reaction} {equation}
+ \chemmacros_if_package_loaded:nT {cleveref}
+ { \crefalias {equation} {reaction} }
+ % this only works if nobody steps counters inside reactions:
+ \bool_if:NT \l__chemmacros_hyperref_bool
+ {
+ \chemmacros_patch_cmd:Nnn \hyper@refstepcounter
+ { \This@name }
+ { \This@name {reaction} \@gobble }
+ \chemmacros_patch_cmd:Nnn \hyper@refstepcounter
+ { \hyper@makecurrent }
+ { \hyper@makecurrent {reaction} \@gobble }
+ }
+ \usetagform {reaction}
+ }
}
-\tl_new:N \l__chemmacros_reactions_args_tl
+\cs_new_protected:Npn \__chemmacros_end_reaction:
+ { }
+% --------------------------------------------------------------------------
\cs_new_protected:Npn \__chemmacros_reactions_build_args:n #1
{ \tl_put_right:Nn \l__chemmacros_reactions_args_tl { {## #1} } }
\cs_new_protected:Npn \chemmacros_define_reaction:nnn #1#2#3
{
+ \tl_clear:N \l__chemmacros_reactions_args_tl
\int_compare:nNnT {#3+0} > {0}
- {
- \tl_clear:N \l__chemmacros_reactions_args_tl
- \int_step_function:nnnN {2} {1} {#3+1} \__chemmacros_reactions_build_args:n
- }
- \chemmacros_declare_reaction_env:nnnV {#1} {#2} {#3} \l__chemmacros_reactions_args_tl
+ { \int_step_function:nnnN {2} {1} {#3+1} \__chemmacros_reactions_build_args:n }
+ \__chemmacros_declare_reaction_env:nnnV {#1} {#2} {#3} \l__chemmacros_reactions_args_tl
}
% #1: chem
% #2: math
% #3: args number
% #4: argument list ({#2}{#3}...)
-\cs_new_protected:Npn \chemmacros_declare_reaction_env:nnnn #1#2#3#4
+\cs_new_protected:Npn \__chemmacros_declare_reaction_env:nnnn #1#2#3#4
{
\exp_args:Nnx \DeclareDocumentEnvironment {#1}
{ \int_compare:nT { #3+0 = 0 } {!} O{} \prg_replicate:nn {#3+0} {m} }
{
\chemmacros_add_reaction_description:n {##1}
\__chemmacros_begin_reaction:
- \chemmacros_reaction_read:nnw {#2} {#4}
+ \__chemmacros_reaction_read:nnw {#2} {#4}
}
{
\__chemmacros_end_reaction:
\ignorespacesafterend
}
}
-\cs_generate_variant:Nn \chemmacros_declare_reaction_env:nnnn {nnnV}
+\cs_generate_variant:Nn \__chemmacros_declare_reaction_env:nnnn {nnnV}
-\cs_new_protected:Npn \chemmacros_reaction_read:nnw #1#2#3 \end
+\cs_new_protected:Npn \__chemmacros_reaction_read:nnw #1#2#3 \end
{
\tl_clear:N \l__chemmacros_tmpa_tl
\seq_clear:N \l__chemmacros_tmpc_seq
@@ -4049,17 +4158,40 @@
{ \l__chemmacros_tmpa_int = \l__chemmacros_tmpb_int }
{ \tl_put_right:Nn \l__chemmacros_tmpa_tl {\\} }
}
- \chemmacros_reaction_write:nnV {#1} {#2} \l__chemmacros_tmpa_tl
+ \__chemmacros_reaction_write:nnV {#1} {#2} \l__chemmacros_tmpa_tl
\end
}
-\cs_new_protected:Npn \chemmacros_reaction_write:nnn #1#2#3
+\cs_new_protected:Npn \__chemmacros_reaction_write:nnn #1#2#3
{
\begin{#1}#2
#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}
+ {
+ list-name .tl_set:N = \reactionlistname ,
+ list-name .initial:n = \chemmacros_translate:n {list-of-reactions} ,
+ autoref-name .tl_set:N = \reactionautorefname ,
+ autoref-name .initial:n = \chemmacros_translate:n {Reaction} ,
+ list-entry .tl_set:N = \l__chemmacros_reaction_lorname_tl ,
+ list-entry .initial:n = \chemmacros_translate:n {Reaction} ,
+ list-heading-cmd .cs_set:Np = \__chemmacros_reaction_heading:n #1 ,
+ tocbasic .code:n = \chemmacros_deprecate_option: ,
+ own-counter .bool_set:N = \l__chemmacros_reactions_counter_bool ,
+ own-counter .initial:n = true ,
+ tag-open .tl_set:N = \l__chemmacros_reactions_tag_open_tl ,
+ tag-open .initial:n = \{ ,
+ tag-close .tl_set:N = \l__chemmacros_reactions_tag_close_tl ,
+ tag-close .initial:n = \} ,
+ before-tag .tl_set:N = \l__chemmacros_reactions_before_tag_tl
+ }
+
+\cs_if_exist:NTF \chapter
+ { \chemmacros_set_keys:nn {reactions} { list-heading-cmd = \chapter* {#1} } }
+ { \chemmacros_set_keys:nn {reactions} { list-heading-cmd = \section* {#1} } }
\NewChemMacroset* {Reaction} {mO{}m}
{ \chemmacros_define_reaction:nnn {#1} {#3} {#2} }
@@ -4068,10 +4200,10 @@
\NewChemReaction {reaction*} {equation*}
\NewChemReaction {reactions} {align}
\NewChemReaction {reactions*} {align*}
-
+
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{redox}{2020/11/29 oxidation numbers, redox reactions}
+\ChemModule{redox}{2022/01/29 oxidation numbers, redox reactions}
\RequirePackage{mathtools,relsize}
@@ -4215,7 +4347,7 @@
{ \relsize {-3} \__chemmacros_ox_process_number:n {#1} }
}
}
- \hbox_set:Nn \l__chemmacros_tmpb_box { \chemmacros_chemformula:n {#2} }
+ \hbox_set:Nn \l__chemmacros_tmpb_box { \chemmacros_formula:n {#2} }
\chemmacros_math:n
{
\bool_if:NT \l__chemmacros_ox_super_bool
@@ -4573,17 +4705,11 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{scheme}{2022/01/13 a scheme floating environment}
+\ChemModule{scheme}{2022/02/05 a scheme floating environment}
\RequirePackage {chemnum}
\RequirePackage {etoolbox}
-\msg_new:nnn {chemmacros} {patch-failed}
- {
- Patching~ \token_to_str:N #1 \c_space_tl failed.~
- Please~ inform~ the~ chemmacros~ package~ authors.
- }
-
\bool_new:N \l__chemmacros_float_def_bool
\tl_new:N \l__chemmacros_float_method_tl
\seq_new:N \l__chemmacros_float_methods_seq
@@ -4591,17 +4717,27 @@
\prop_new:N \l__chemmacros_float_definitions_prop
\msg_new:nnn {chemmacros} {float-method}
- { Detected~ float~ defining~ method~ `#1'. }
+ { Using~ float~ defining~ method~ `#1'. }
+
+\msg_new:nnn {chemmacros} {unknown-method}
+ {
+ The~ float~ method~ `#1'~ is~ not~ known~ \msg_line_contect: .~ Ckeck~
+ for~ a~ typo.
+ }
% --------------------------------------------------------------------------
% #1: name
% #2: check
+% #3: code
\cs_new_protected:Npn \chemmacros_define_float_method:nnn #1#2#3
{
\seq_put_right:Nn \l__chemmacros_float_methods_seq {#1}
\prop_put:Nnn \l__chemmacros_float_methods_prop {#1} {#2}
\prop_put:Nnn \l__chemmacros_float_definitions_prop {#1}
- { \cs_set_protected:Npn \__chemmacros_define_float:nn ##1##2 {#3} }
+ {
+ \cs_set_protected:Npn \__chemmacros_define_float:nn ##1##2
+ { \msg_info:nnn {chemmacros} {float-method} {#1} #3 }
+ }
}
% the order in which the methods are defined determines in which order the
@@ -4692,30 +4828,111 @@
{ \listof {#1} {\chemmacros_translate:n {#1-list}} }
}
+\chemmacros_define_float_method:nnn {traditional}
+ { \c_false_bool }
+ {
+ \bool_lazy_or:nnTF
+ { \chemmacros_if_class_loaded_p:n {book} }
+ { \chemmacros_if_class_loaded_p:n {report} }
+ {
+ \newcounter {#1} [chapter]
+ \cs_set:cpn {the#1}
+ { \ifnum \c@chapter>\z@ \thechapter.\fi \arabic {#1} }
+ }
+ {
+ \newcounter {#1}
+ \cs_set:cpn {the#1} { \arabic {#1} }
+ }
+ \cs_new:cpn {fps@#1} {tbp}
+ \cs_new:cpn {ftype@#1} {8}
+ \cs_new:cpn {ext@#1} {#2}
+ \cs_new:cpx {fnum@#1} {
+ \exp_not:c {#1name}
+ \exp_not:N \nobreakspace
+ \exp_not:c {the#1}}
+ \cs_new:cpn {#1name} {\chemmacros_translate:n {#1-name}}
+ \cs_new:cpn {list#1name} {\chemmacros_translate:n {#1-list}}
+ \newenvironment {#1}
+ {\@float{#1}}
+ {\end@float}
+ \newenvironment {#1*}
+ {\@dblfloat{#1}}
+ {\end@dblfloat}
+ \bool_lazy_or:nnTF
+ { \chemmacros_if_class_loaded_p:n {book} }
+ { \chemmacros_if_class_loaded_p:n {report} }
+ {
+ \cs_new_protected:cpn {listof#1s}
+ {
+ \legacy_if:nTF {@twocolumn}
+ { \@restonecoltrue\onecolumn }
+ { \@restonecolfalse }
+ \chapter* { \use:c {list#1name} }
+ \use:x
+ {
+ \exp_not:N \@mkboth
+ { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
+ { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
+ }
+ \@starttoc {#2}
+ \legacy_if:nT {@restonecol} { \twocolumn }
+ }
+ \chemmacros_patch_cmd:Nnn \@chapter
+ { \addtocontents }
+ { \addtocontents {#2} { \protect \addvspace {10\p@} } \addtocontents }
+ }
+ {
+ \cs_new_protected:cpn {listof#1s}
+ {
+ \section* {\use:c {list#1name}}
+ \use:x
+ {
+ \exp_not:N \@mkboth
+ { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
+ { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
+ }
+ \@starttoc {#2}
+ }
+ }
+ \cs_new_eq:cN {l@#1} \l@figure
+ }
+
+% --------------------------------------------------------------------------
+\chemmacros_define_keys:nn {scheme}
+ {
+ float-method .code:n =
+ \seq_if_in:NnTF \l__chemmacros_float_methods_seq {#1}
+ {
+ \bool_set_true:N \l__chemmacros_float_def_bool
+ \tl_set:Nn \l__chemmacros_float_method_tl {#1}
+ }
+ { \msg_error:nnn {chemmacros} {unknown-method} {#1} }
+ }
+
% --------------------------------------------------------------------------
% checks if one of the above defined methods is active. The first one found
-% will be used.
+% will be used.
\cs_new_protected:Npn \chemmacros_check_float_method:n #1
{
\prop_get:NnNT \l__chemmacros_float_methods_prop {#1}
\l__chemmacros_tmpa_tl
{
- \bool_lazy_and:nnT
- { !\l__chemmacros_float_def_bool }
- { \l__chemmacros_tmpa_tl }
+ \bool_if:nT { \l__chemmacros_tmpa_tl }
{
\bool_set_true:N \l__chemmacros_float_def_bool
\tl_set:Nn \l__chemmacros_float_method_tl {#1}
- \msg_info:nnn {chemmacros} {float-method} {#1}
}
}
}
\cs_new_protected:Npn \chemmacros_check_float_methods:
{
- \seq_map_function:NN
- \l__chemmacros_float_methods_seq
- \chemmacros_check_float_method:n
+ \bool_if:NF \l__chemmacros_float_def_bool
+ {
+ \seq_map_function:NN
+ \l__chemmacros_float_methods_seq
+ \chemmacros_check_float_method:n
+ }
}
\hook_gput_code:nnn {begindocument/before} {chemmacros}
@@ -4727,19 +4944,8 @@
}
}
-% --------------------------------------------------------------------------
-\ChemCleverefSupport {scheme}
- { \chemmacros_translate:n {scheme} }
- [ \chemmacros_translate:n {Scheme} ]
- { \chemmacros_translate:n {schemes} }
- [ \chemmacros_translate:n {Schemes} ]
-
-\ChemFancyrefSupport {sch}
- { \chemmacros_translate:n {scheme} }
- [ \chemmacros_translate:n {Scheme} ]
-
-% --------------------------------------------------------------------------
% #1: env name
+% #2: file ending
\cs_new_protected:Npn \chemmacros_define_float:nn #1#2
{
\bool_lazy_and:nnT
@@ -4755,81 +4961,31 @@
\__chemmacros_define_float:nn {#1} {#2}
}
{
- \bool_lazy_or:nnTF
- { \chemmacros_if_class_loaded_p:n {book} }
- { \chemmacros_if_class_loaded_p:n {report} }
- {
- \newcounter {#1} [chapter]
- \cs_set:cpn {the#1}
- { \ifnum \c@chapter>\z@ \thechapter.\fi \arabic {#1} }
- }
- {
- \newcounter {#1}
- \cs_set:cpn {the#1} { \arabic {#1} }
- }
- \cs_new:cpn {fps@#1} {tbp}
- \cs_new:cpn {ftype@#1} {8}
- \cs_new:cpn {ext@#1} {#2}
- \cs_new:cpx {fnum@#1} {
- \exp_not:c {#1name}
- \exp_not:N \nobreakspace
- \exp_not:c {the#1}}
- \cs_new:cpn {#1name} {\chemmacros_translate:n {#1-name}}
- \cs_new:cpn {list#1name} {\chemmacros_translate:n {#1-list}}
- \newenvironment {#1}
- {\@float{#1}}
- {\end@float}
- \newenvironment {#1*}
- {\@dblfloat{#1}}
- {\end@dblfloat}
- \bool_lazy_or:nnTF
- { \chemmacros_if_class_loaded_p:n {book} }
- { \chemmacros_if_class_loaded_p:n {report} }
- {
- \cs_new_protected:cpn {listof#1s}
- {
- \legacy_if:nTF {@twocolumn}
- { \@restonecoltrue\onecolumn }
- { \@restonecolfalse }
- \chapter* { \use:c {list#1name} }
- \use:x
- {
- \exp_not:N \@mkboth
- { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
- { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
- }
- \@starttoc {#2}
- \legacy_if:nT {@restonecol} { \twocolumn }
- }
- \patchcmd \@chapter
- { \addtocontents }
- { \addtocontents {#2} { \protect \addvspace {10\p@} } \addtocontents }
- {}
- { \msg_warning:nnn {chemmacros} {patch-failed} { \@chapter } }
- }
- {
- \cs_new_protected:cpn {listof#1s}
- {
- \section* {\use:c {list#1name}}
- \use:x
- {
- \exp_not:N \@mkboth
- { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
- { \exp_not:N \MakeUppercase \exp_not:c {list#1name} }
- }
- \@starttoc {#2}
- }
- }
- \cs_new_eq:cN {l@#1} \l@figure
+ \prop_get:NnN \l__chemmacros_float_definitions_prop
+ {traditional}
+ \l__chemmacros_tmpa_tl
+ \tl_use:N \l__chemmacros_tmpa_tl
+ \__chemmacros_define_float:nn {#1} {#2}
}
+ \cs_set:cpn {#1name} {\chemmacros_translate:n {#1-name}}
+ \cs_set:cpn {list#1name} {\chemmacros_translate:n {#1-list}}
}
- \cs_set:cpn {#1name} {\chemmacros_translate:n {#1-name}}
- \cs_set:cpn {list#1name} {\chemmacros_translate:n {#1-list}}
}
+
+% --------------------------------------------------------------------------
+\ChemCleverefSupport {scheme}
+ { \chemmacros_translate:n {scheme} }
+ [ \chemmacros_translate:n {Scheme} ]
+ { \chemmacros_translate:n {schemes} }
+ [ \chemmacros_translate:n {Schemes} ]
+
+\ChemFancyrefSupport {sch}
+ { \chemmacros_translate:n {scheme} }
+ [ \chemmacros_translate:n {Scheme} ]
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{spectroscopy}{2021/07/24 environment for spectroscopic data}
+\ChemModule{spectroscopy}{2022/01/29 environment for spectroscopic data}
\RequirePackage{siunitx}
@@ -4939,11 +5095,11 @@
\tl_put_right:Nn \g__chemmacros_nmr_element_coupled_tl { \} }
}
\tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl {#2}
- \chemmacros_chemformula:n { ^{#1} }
+ \chemmacros_formula:n { ^{#1} }
\tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
{
\bool_if:NTF \l__chemmacros_nmr_parse_bool
- { \chemmacros_chemformula:V \g__chemmacros_nmr_element_coupled_tl }
+ { \chemmacros_formula:V \g__chemmacros_nmr_element_coupled_tl }
{ \g__chemmacros_nmr_element_coupled_tl }
}
\tl_use:N \l__chemmacros_nmr_element_method_connector_tl
@@ -5090,7 +5246,7 @@
\bool_if:NT \l__chemmacros_nmr_comma_bool
{ , ~ }
\bool_if:NT \l__chemmacros_nmr_solvent_bool
- { \chemmacros_chemformula:n {#4} }
+ { \chemmacros_formula:n {#4} }
\bool_if:NT \l__chemmacros_nmr_delimiters_bool
{ ) }
\tl_if_blank:nT {#1} {:~}
@@ -5118,7 +5274,7 @@
\bool_if:NT \l__chemmacros_nmr_solvent_bool
{
\bool_if:NTF \l__chemmacros_nmr_parse_bool
- { \chemmacros_chemformula:n {#4} }
+ { \chemmacros_formula:n {#4} }
{#4}
}
\bool_if:NT \l__chemmacros_nmr_delimiters_bool
@@ -5184,12 +5340,12 @@
{
\__chemmacros_nmr_number:n {#1}
\chemmacros_skip_nobreak:N \l__chemmacros_nmr_space_skip
- \chemmacros_chemformula:V \g__chemmacros_nmr_element_tl
+ \chemmacros_formula:V \g__chemmacros_nmr_element_tl
}
\cs_new_protected:Npn \chemmacros_nmr_position:n #1
{
- \chemmacros_chemformula:x
+ \chemmacros_formula:e
{
\exp_not:V \g__chemmacros_nmr_element_tl
\bool_if:NF \l__chemmacros_nmr_position_side_bool
@@ -5229,7 +5385,7 @@
\c_math_subscript_token
{
\l__chemmacros_nmr_coupling_nuclei_pre_tl
- \chemmacros_chemformula:n {#2}
+ \chemmacros_formula:n {#2}
\l__chemmacros_nmr_coupling_nuclei_post_tl
}
}
@@ -5238,7 +5394,7 @@
\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
{
\l__chemmacros_nmr_coupling_nuclei_pre_tl
- \chemmacros_chemformula:n {#2}
+ \chemmacros_formula:n {#2}
\l__chemmacros_nmr_coupling_nuclei_post_tl
}
}
@@ -5321,16 +5477,17 @@
unit .groups:n = {variables}
}
-\cs_new_protected:Npn \chemmacros_state:nn #1#2
+\cs_new_protected:Npn \chemmacros_state:nnnnnn #1#2#3#4#5#6
{
- % pre (\Delta)
- % post
- % superscript-left
- % superscript-right (\standardstate)
- % subscript-left
- % subscript-right
\group_begin:
- \chemmacros_set_keys:nn {thermodynamics} {#1}
+ \chemmacros_set_keys:ne {thermodynamics}
+ {
+ \exp_not:n {#1} ,
+ \tl_if_novalue:nF {#2} { subscript-left = \exp_not:n {#2} , }
+ \tl_if_novalue:nF {#3} { superscript-left = \exp_not:n {#3} , }
+ \tl_if_novalue:nF {#5} { subscript-right = \exp_not:n {#5} , }
+ \tl_if_novalue:nF {#6} { superscript-right = \exp_not:n {#6} }
+ }
\ensuremath
{
\chemmacros_text:V \l__chemmacros_state_pre_tl
@@ -5338,7 +5495,7 @@
{ \chemmacros_text:V \l__chemmacros_state_sp_left_tl }
\c_math_subscript_token
{ \chemmacros_text:V \l__chemmacros_state_sb_left_tl }
- #2
+ #4
\c_math_superscript_token
{ \chemmacros_text:V \l__chemmacros_state_sp_right_tl }
\c_math_subscript_token
@@ -5347,10 +5504,11 @@
}
\group_end:
}
-\cs_generate_variant:Nn \chemmacros_state:nn { nV }
+\cs_generate_variant:Nn \chemmacros_state:nnnnnn { nVVVVV }
-\DeclareDocumentCommand \state { O{}m }
- { \chemmacros_state:nn {#1} {#2} }
+\exp_args:NNe
+\NewDocumentCommand \state { O{}e{\char_generate:nn {`_}{8}^}me{\char_generate:nn {`_}{8}^} }
+ { \use:c {chemmacros_state:nnnnnn} {#1} {#2} {#3} {#4} {#5} {#6} }
\cs_new_protected:Npn \chemmacros_declare_state:Nn #1#2
{
@@ -5374,17 +5532,23 @@
\DeclareDocumentCommand #1 { sO{}D(){}m }
{
\group_begin:
- \chemmacros_set_keys:xn
+ \chemmacros_set_keys:en
{thermodynamics/\chemmacros_remove_backslash:N #1}
{#2}
\tl_if_blank:nF {##3}
{
- \chemmacros_set_keys:nx {thermodynamics}
+ \chemmacros_set_keys:ne {thermodynamics}
{ subscript-\l__chemmacros_state_sb_pos_tl = \exp_not:n {##3} }
}
\ensuremath
{
- \chemmacros_state:nV {##2} \l__chemmacros_state_symbol_tl
+ \chemmacros_state:nVVVVV
+ {##2}
+ \c_novalue_tl
+ \c_novalue_tl
+ \l__chemmacros_state_symbol_tl
+ \c_novalue_tl
+ \c_novalue_tl
\chemmacros_set_keys_groups:nnn {thermodynamics} {variables} {##2}
\IfBooleanF {##1} { = \qty {##4} { \l__chemmacros_state_unit_tl } }
}
@@ -6452,8 +6616,8 @@
% #1: star: include ID in table
\NewDocumentCommand \printreactants {s}
{
- \group_begin:
- \chemmacros_set_keys:nn {reactants} { switch = false }
+ \group_begin:
+ \chemmacros_set_keys:nn {reactants} { switch = false }
\int_step_variable:nNn
{ \seq_count:N \g_chemnum_initiated_compounds_seq }
\l__chemmacros_reactants_tmpa_tl
@@ -6509,60 +6673,54 @@
\chemmacros_if_package_loaded:nTF {xltabular}
{
\bool_if:nTF {#1}
- {
- \begin
- {xltabular}
- { \textwidth }
- { @{}ll>{\raggedright\arraybackslash}X@{} }
- }
- {
- \begin
- {xltabular}
- { \textwidth }
- { @{}l>{\raggedright\arraybackslash}X@{} }
- }
- \seq_use:Nn \l__chemmacros_reactants_tmpa_seq { }
- \end{xltabular}
- }
- {
+ {
+ \begin {xltabular}
+ { \textwidth }
+ { @{}ll>{\raggedright\arraybackslash}X@{} }
+ }
+ {
+ \begin {xltabular}
+ { \textwidth }
+ { @{}l>{\raggedright\arraybackslash}X@{} }
+ }
+ \seq_use:Nn \l__chemmacros_reactants_tmpa_seq { }
+ \end{xltabular}
+ }
+ {
\msg_expandable_error:nnnn
{chemmacros}
{package-not-loaded}
{ \printreactants }
{xltabular}
- }
- }
+ }
+ }
{longtable}
{
\chemmacros_if_package_loaded:nTF {longtable}
{
\bool_if:nTF {#1}
- {
- \begin
- {longtable}[l]
- { @{}ll>{\raggedright\arraybackslash}p{0.6\textwidth}@{} }
- }
- {
- \begin
- {longtable}[l]
+ {
+ \begin {longtable}[l]
+ { @{}ll>{\raggedright\arraybackslash}p{0.6\textwidth}@{} }
+ }
+ {
+ \begin {longtable}[l]
{ @{}l>{\raggedright\arraybackslash}p{0.9\textwidth}@{} }
- }
- \seq_use:Nn \l__chemmacros_reactants_tmpa_seq { }
- \end{longtable}
- }
- {
+ }
+ \seq_use:Nn \l__chemmacros_reactants_tmpa_seq { }
+ \end{longtable}
+ }
+ {
\msg_expandable_error:nnnn
{chemmacros}
{package-not-loaded}
{ \printreactants }
{longtable}
- }
- }
- }
- }
- {
- \msg_warning:nn {chemmacros} {missing-printreactants-style}
- }
+ }
+ }
+ }
+ }
+ { \msg_warning:nn {chemmacros} {missing-printreactants-style} }
\group_end:
}
@@ -6615,7 +6773,7 @@
% --------------------------------------------------------------------------
\ChemModuleEnd
-\ChemModule{translations}{2022/01/16 translations for defined keys at one place}
+\ChemModule{translations}{2022/01/26 translations for defined keys at one place}
% --------------------------------------------------------------------------
\chemmacros_declare_translations:nn {K-acid}
@@ -6625,7 +6783,7 @@
Dutch = \mathrm {z}
}
-\chemmacros_declare_translations:nn {K-acid}
+\chemmacros_declare_translations:nn {K-water}
{ Danish = \mathrm {v} }
% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index d242a6773b..0e348a84ed 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/02/12}{1.624}
+\ProvidesExplClass{easybook}{2022/02/13}{1.625}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -48,8 +48,6 @@
\bool_set_false:N \l__eb_class_mode_book_bool
\eb_put_ctexbook:n { oneside }
},
- book .meta:n = { class = book },
- article .meta:n = { class = article },
config .clist_gset:N = \g__eb_config_file_clist,
floatpage .bool_set:N = \l__eb_float_page_bool,
theorem .bool_set:N = \l__eb_theorem_support_bool,
@@ -305,7 +303,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/02/12}{1.624}
+\ProvidesExplPackage{easybase}{2022/02/13}{1.625}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -384,13 +382,13 @@
\msg_new:nnn { easybase } { package-repeat-load-ii }
{ The~macro~package~'#1'~has~been~loaded~repeatedly. }
\cs_set_eq:NN \eb@usepackage@save \usepackage
-\RenewDocumentCommand{\usepackage}{O{}m}
+\RenewDocumentCommand{\usepackage}{O{}mO{}}
{
\PassOptionsToPackage{#1}{#2}
\eb_seq_map_inline:nn {#2}
{
\eb_if_package_loaded:nnF {##1} {#1}
- { \eb@usepackage@save{##1} }
+ { \eb@usepackage@save{##1}[#3] }
}
}
\NewDocumentCommand{\LoadPackage}{O{}m}
@@ -492,7 +490,7 @@
\msg_new:nnn { easybase } { no-chapter }
{
Your~document~class~is~in~'article'~mode. \\
- The~\string\chapter\ command~will~not~be~used.
+ The~'\string\chapter'\ command~will~not~be~used.
}
\LoadPackage
@@ -1425,12 +1423,7 @@
\CTEX@addtocline{#1}{##2}
\tl_if_empty:oF {##4} { \CTEX@addbitocline{#1}{##4} }
\tl_set:Nn \l__eb__bitoc_mark_title_level_tl {#1}
- \str_case:nn {#1}
- {
- { chapter } { \chaptermark{##2} }
- { section } { \sectionmark{##2} }
- { subsection } { \subsectionmark{##2} }
- }
+ \use:c { #1mark }{##2}
}{
\stepcounter{bi#1}
\use:c {#1}[##2]{##3}
@@ -1472,16 +1465,19 @@
}
}
-\tl_set:Nx \l__eb_toc_title_level_tl
- { \bool_if:NTF \l__eb_class_mode_book_bool { chapter } { section } }
\tl_new:N \eb@bitoc@title
\keys_define:nn { eb/listoc }
{
- section .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { section },
- chapter .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { chapter },
- none .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { none },
- article .meta:n = section,
- book .meta:n = chapter,
+ level .tl_set:N = \eb@toc@title@level,
+ level .initial:n =
+ {
+ \bool_if:NTF \l__eb_class_mode_book_bool
+ { \bichapter* }
+ { \bisection* }
+ },
+ section .meta:n = { level = \bisection* },
+ chapter .meta:n = { level = \bichapter* },
+ none .code:n = { },
multoc .int_set:N = \l__eb_toc_columns_int,
multoc .default:n = 2,
multoc .initial:n = 1,
@@ -1502,48 +1498,7 @@
{ \tl_clear:N \eb@bitoc@title }
{ \tl_set:Nn \eb@bitoc@title {#2} }
}
-
-\cs_new_protected:Npn \eb_toc_title_level_initial:
- {
- \bool_if:NF \l__eb_class_mode_book_bool
- {
- \tl_if_eq:NnT \l__eb_toc_title_level_tl { chapter }
- { \tl_set:Nn \l__eb_toc_title_level_tl { section } }
- }
- }
-\cs_new_protected:Npn \eb_title_mark_intoc:n #1
- {
- \str_case:Vn \l__eb_toc_title_level_tl
- {
- { chapter } { \bichapter*{#1}{\eb@bitoc@title} }
- { section } { \bisection*{#1}{\eb@bitoc@title} }
- }
- }
-\cs_new_protected:Npn \eb_title_mark_notoc:n #1
- {
- \str_case:Vn \l__eb_toc_title_level_tl
- {
- { chapter } { \chapter*{\phantomsection #1}\chaptermark{#1} }
- { section } { \section*{\phantomsection #1}\sectionmark{#1} }
- }
- }
-\cs_new_protected:Npn \eb_title_number_intoc_spec:nn #1#2
- {
- \eb_toc_title_level_initial:
- \IfBooleanTF{#1}
- {
- \str_case:Vn \l__eb_toc_title_level_tl
- {
- { chapter } { \bichapter{\eb@toc@title}{\eb@bitoc@title} }
- { section } { \bisection{\eb@toc@title}{\eb@bitoc@title} }
- }
- }{
- \IfBooleanTF{#2}
- {\eb_title_mark_notoc:n { \eb@toc@title }}
- {\eb_title_mark_intoc:n { \eb@toc@title }}
- }
- }
-\cs_new_protected:Npn \eb_biber_title_level_spec:n #1
+\cs_new_protected:Npn \eb_biber_toc_title:n #1
{
\bool_if:NTF \l__eb_class_mode_book_bool
{ \bichapter*{#1}{\eb@bib@bitoc@title} }
@@ -1560,18 +1515,23 @@
}
{ \@starttoc{#1} }
}
-\cs_new_protected:Npn \eb_toc_if_title_between_hook:n #1
+\cs_new_protected:Npn \eb_toc_if_title_between_hook:nn #1#2
+ {
+ \IfBooleanF{#1}
+ {\tl_use:c { l__eb_toc_#2_between_hook_tl }}
+ }
+\cs_new_protected:Npn \eb_toc_title_level_cmd:n #1
{
- \tl_if_eq:NnF \l__eb_toc_title_level_tl { none }
- { \tl_use:c { l__eb_toc_#1_between_hook_tl } }
+ \IfBooleanF{#1}
+ {\eb@toc@title@level{\eb@toc@title}{\eb@bitoc@title}}
}
\cs_new_protected:Npn \eb_toc_list_parse:nnnnn #1#2#3#4#5
{
\group_begin:
\tl_set_eq:Nc \eb@toc@title { list#4name }
\IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
- \eb_title_number_intoc_spec:nn {#2} {#1}
- \eb_toc_if_title_between_hook:n {#4}
+ \eb_toc_title_level_cmd:n {#1}
+ \eb_toc_if_title_between_hook:nn {#1} {#4}
\eb_toc_start_multi_column_ext:n {#5}
\group_end:
}
@@ -1588,20 +1548,25 @@
}
{ \eb_list_content_cmd_set:nn #1 }
\cs_set_eq:NN \listoflistings \listoflstlistings
-\RenewDocumentCommand{\tableofcontents}{t+oD(){}}
+\RenewDocumentCommand{\tableofcontents}{st+oD(){}}
{
\group_begin:
\tl_set_eq:NN \eb@toc@title \contentsname
\tl_set:Nn \eb@bitoc@title { Contents }
- \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}}
- \eb_toc_title_level_initial:
- \eb_title_mark_notoc:n { \eb@toc@title }
- \eb_toc_if_title_between_hook:n { main }
- \eb_toc_start_multi_column_ext:n { toc }#3
- \IfBooleanT{#1}
- {
- \eb_title_mark_notoc:n { \eb@bitoc@title }
- \eb_toc_if_title_between_hook:n { main }
+ \tl_set:Nn \eb@toc@title@level
+ {
+ \bool_if:NTF \l__eb_class_mode_book_bool
+ { \chapter* }
+ { \section* }
+ }
+ \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
+ \IfBooleanF{#1}{\eb@toc@title@level{\eb@toc@title}{}}
+ \eb_toc_if_title_between_hook:nn {#1} { main }
+ \eb_toc_start_multi_column_ext:n { toc }#4
+ \IfBooleanT{#2}
+ {
+ \IfBooleanF{#1}{\eb@toc@title@level{\eb@bitoc@title}{}}
+ \eb_toc_if_title_between_hook:nn {#1} { main }
\eb_toc_start_multi_column_ext:n { tec }
}
\group_end:
@@ -1619,7 +1584,7 @@
\IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
\cs_set_protected:Npn \imki@indexheaders
{
- \eb_title_number_intoc_spec:nn {#2} {#1}
+ \eb_toc_title_level_cmd:n {#1}
\cs_set_eq:NN \thispagestyle \use_none:n
\cs_undefine:N \imki@firstpagestyle
}
@@ -1727,7 +1692,7 @@
caption-listing = #1
},
caption-every .initial:n = 1.2,
- every .meta:n =
+ every .meta:n =
{
line = #1,table = #1,math = #1,
caption-every = #1,footnote = #1
@@ -2025,7 +1990,7 @@
\IfValueT{##3}{ \keys_set:nn { eb/listoc } {##3} }
\cs_set_protected:Npn \bibsection
{
- \eb_title_number_intoc_spec:nn {##2} {##1}
+ \eb_toc_title_level_cmd:n {##1}
\int_compare:nNnT { \l__eb_toc_columns_int } > { 1 }
{ \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
}
@@ -2054,7 +2019,7 @@
\LoadPackage[backend = biber]{biblatex}
\clist_map_function:NN \l__eb_bib_datafile_clist \addbibresource
\tl_gset:Nn \blx@default@theheading { bibintoc }
- \defbibheading{bibintoc}[\bibname]{\eb_biber_title_level_spec:n {##1}}
+ \defbibheading{bibintoc}[\bibname]{\eb_biber_toc_title:n {##1}}
\skip_zero:N \bibitemsep
}
\eb_at_end_preamble:n
@@ -2281,25 +2246,22 @@
\keys_set_known:nn { ctex }
{
contentsname = 目\hspace{1em}录,
- indexname = 索\hspace{1em}引,
- abstractname = 摘\hspace{1em}要,
- listfigurename = 图片索引,
- listtablename = 表格索引,
- lstlistlistingname = 代码索引,
+ listfigurename = 插图清单,
+ listtablename = 附表清单,
+ lstlistlistingname = 代码清单,
lstlistingname = 代码
}
}
{
\keys_set_known:nn { ctex }
{
- abstractname = Abstract,
lstlistlistingname = List~of~Codes,
lstlistingname = Code
}
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/12}{1.624}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/13}{1.625}
{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 2afdd2a192..a1d8867b06 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 c007570fa9..55f6bfda13 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.624,
- date = 2022/02/12,
+ version = v1.625,
+ date = 2022/02/13,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -331,24 +331,24 @@
\subsection{目录命令}
\begin{commands}
- \command{tableofcontents}[\parg\oarg{键值列表}\darg{附加代码}]
- 文档主目录命令。带有 \parg{} 号参数的命令输出双语目录,需要与双语目录标题命令 \cs{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令。
- \command{listoffigures}[\sarg\parg\oarg{键值列表}]
- 输出图片目录命令。带有星号的目录命令不将目录标题添加进文档主目录,带有 \parg{} 号的目录命令可以使当前标题编号。
- \command{listoftables}[\sarg\parg\oarg{键值列表}]
- 输出表格目录命令。带有星号的目录命令不将目录标题添加进文档主目录,带有 \parg{} 号的目录命令可以使当前标题编号。
- \command{listoflstlistings}[\sarg\parg\oarg{键值列表}]
- 输出代码目录命令。带有星号的目录命令不将目录标题添加进文档主目录,带有 \parg{} 号的目录命令可以使当前标题编号。
+ \command{tableofcontents}[\sarg\oarg{键值列表}\darg{附加代码}]
+ 文档主目录命令。带有星号参数的命令不输出目录标题。带有 \parg{} 号参数的命令输出双语目录,需要与双语目录标题命令 \cs{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用。附加代码是中文与英文主目录之间的代码,可以插入目录样式和换页等命令。
+ \command{listoffigures}[\sarg\oarg{键值列表}]
+ 输出图片目录命令。带有星号参数的命令不输出目录标题。
+ \command{listoftables}[\sarg\oarg{键值列表}]
+ 输出表格目录命令。带有星号参数的命令不输出目录标题。
+ \command{listoflstlistings}[\sarg\oarg{键值列表}]
+ 输出代码目录命令。带有星号参数的命令不输出目录标题。
\end{commands}
-上面目录命令的可选参数改进了原本单一的功能,其中 \meta{键值列表} 的选项如下:
+如果需要部分而不是全文的目录或其它类型的目录,可以查看 \pkg*{titletoc} 宏包的相关命令。上面目录命令的可选参数改进了原本单一的功能,其中 \meta{键值列表} 的选项如下:
\begin{options}
- \opt{chapter}
- 使当前目录标题按照 \code{chapter} 章级别输出。
- \opt{section}
- 使当前目录标题按照 \code{section} 节级别输出。
- \opt{none}
- 使当前目录没有 \code{chapter} 或 \code{section} 级别的标题,仅输出目录原始内容。
+ \keyval{level}{标题命令}\newtag
+ 设定输出目录标题的命令。如果使用 \option{title} 选项设置了双语标题则需要配合双语标题命令。
+ \begin{ctexexam}
+ \tableofcontents[level = \chapter*]
+ \listoffigures[level = \bichapter,title = {图片索引,List of Figures}]
+ \end{ctexexam}
\keyval{multoc}{整数}\Default{2}
与 \module*{style} 模块的 \option{multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同类型目录的排版栏数。\meta{整数} 为目录栏数,不指定栏数值则默认为双栏。
\kvsplit{title}{中文目录标题,英文目录标题}
@@ -356,10 +356,10 @@
\keychoice{bilist}{mix,new}\Default{new}
确定文档主目录中双语标题列表的输出排列方式。选项 \code{mix} 使每个英文标题条目在中文目录中跟随对应的中文标题输出,\code{new} 则新建一个英文目录输出英文标题。
\keyval{format}{目录标题格式}
- 在 \cls*{book} 模式且 \option{chapter} 选项开启或者 \cls*{article} 模式的情况下,\option{format} 用于设置目录标题的格式。
- \keyval{aftertitle}{目录标题格式}
- 目录标题文本之后插入的代码。
- \keyval{pagestyle}{标题页的页面格式}\Default{empty}
+ 设置目录标题的格式,在标题级别为 \code{chapter} 或者 \cls*{article} 模式且标题级别为 \code{section} 时有效。
+ \keyval{aftertitle}{标题后代码}
+ 目录标题文本之后插入的代码,生效情形同上。
+ \keyval{pagestyle}{页面风格}\Default{empty}
目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 C\TeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。
\end{options}
@@ -937,7 +937,7 @@
\keyval{lolskip}{弹性长度}\Default{10pt}
代码目录中每章第一个条目上方增加的垂直距离。与 C\TeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
\keyval{between}{代码钩子}
- 目录标题与内容间的钩子,一般插入负的垂直距离代码用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。
+ 目录标题与内容间的钩子(作用于标题下方间距之后),一般插入负的垂直距离代码用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。
\keybool{dotalign}\Default{true}
引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间距,否则会与页码相连。
\keyval{pagenumwd}{刚性长度}\Default{1.55em}
@@ -1231,7 +1231,7 @@
索引标签命令 \cs*{index} 的 \meta{索引名} 与索引打印命令 \cs{printindex} 一致,可以存在多个索引表。
\command*{makeindex}[\oarg{键值列表}]
使用 \cs*{makeindex} 命令开启索引收集。这个命令可以重复使用打印多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表就没必要再使用。
- \command{printindex}[\sarg\parg\oarg{键值列表}\darg{索引名}]
+ \command{printindex}[\sarg\oarg{键值列表}\darg{索引名}]
现在索引表生成命令 \cs{printindex} 被重新定义,\meta{键值列表} 中的选项与\ref{sec:document command} 其它目录命令相同,但是原本接口命令 \cs*{indexsetup} 的部分选项失效。
\end{commands}
@@ -1277,7 +1277,12 @@
\item 文档类移除预置的定理环境,改为由用户自行定义环境。
\item 考虑到功能性和实用性不强弃用摘要环境 \env*{outline} 和习题环境 \env*{exercise}。
\end{version}
- \shortversion{v = 1.624,date = 2022/02/12,changes = 增加目录条目下方执行的代码选项 \option{tocbelow}。}
+ \begin{version}[v = 1.625,date = 2022/02/13]
+ \added
+ \item 增加目录条目下方执行的代码选项 \option{tocbelow}。
+ \changed
+ \item 目录改用标题级别选项 \option{level} 设定标题命令,不输出标题则使用星号参数。
+ \end{version}
\end{changelog}
\nocite{*}
diff --git a/macros/latex/contrib/ninecolors/README b/macros/latex/contrib/ninecolors/README
deleted file mode 100644
index 94934f0087..0000000000
--- a/macros/latex/contrib/ninecolors/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Ninecolors: Select colors with proper WCAG color contrast
-Author : Jianrui Lyu <tolvjr@163.com>
-Repository: https://github.com/lvjr/ninecolors
-License : The LaTeX Project Public License 1.3
diff --git a/macros/latex/contrib/ninecolors/README.txt b/macros/latex/contrib/ninecolors/README.txt
new file mode 100644
index 0000000000..489711d012
--- /dev/null
+++ b/macros/latex/contrib/ninecolors/README.txt
@@ -0,0 +1,4 @@
+Ninecolors: Select Colors with Proper WCAG Color Contrast
+Author : Jianrui Lyu <tolvjr@163.com> and Nan Geng <nangeng@nwafu.edu.cn>
+Repository: https://github.com/lvjr/ninecolors
+License : The LaTeX Project Public License 1.3
diff --git a/macros/latex/contrib/ninecolors/ninecolors.pdf b/macros/latex/contrib/ninecolors/ninecolors.pdf
index 99648b72b1..9e4093584e 100644
--- a/macros/latex/contrib/ninecolors/ninecolors.pdf
+++ b/macros/latex/contrib/ninecolors/ninecolors.pdf
Binary files differ
diff --git a/macros/latex/contrib/ninecolors/ninecolors.sty b/macros/latex/contrib/ninecolors/ninecolors.sty
index 012310dfe2..e7ac2d7352 100644
--- a/macros/latex/contrib/ninecolors/ninecolors.sty
+++ b/macros/latex/contrib/ninecolors/ninecolors.sty
@@ -1,379 +1,412 @@
%%% -*- coding: utf-8 -*-
%%% ----------------------------------------------------------------------------
%%% Ninecolors: Select colors with proper WCAG color contrast
-%%% Author : Jianrui Lyu <tolvjr@163.com>
+%%% Author : Jianrui Lyu <tolvjr@163.com> and Nan Geng <nangeng@nwafu.edu.cn>
%%% Repository: https://github.com/lvjr/ninecolors
%%% License : The LaTeX Project Public License 1.3
%%% ----------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{ninecolors}[2021/05/24 v2021C Select colors with proper color contrast]
+\ProvidesExplPackage{ninecolors}{2022-02-13}{v2022D}
+ {Select colors with proper color contrast}
+
+%% We have to make ninecolors package support TeX Live 2020,
+%% because tabularray still supports TeX Live 2020 and it depends on this package.
+%% Therefore we need to load xparse package first.
+
\RequirePackage{xcolor}
\RequirePackage{xparse}
-\ExplSyntaxOn
+%% Old versions of l3color don't work if color model contains a colon.
+%% This bug has been fixed in LaTeX3 release 2021-07-12.
+%% See https://github.com/latex3/latex3/issues/962
+%% and https://github.com/lvjr/ninecolors/issues/1
+%% Therefore we only define latex3 colors in newer LaTeX3 releases.
+%% Note that l3color was moved from l3experimental to l3kernel on 2021-02-18,
+%% hence we don't need to load l3color package first.
-\tl_new:N \l__ninecolors_sat_tl
+\bool_new:N \l__ninecolors_define_latex_three_bool
-\keys_define:nn {ninecolors}
+\@ifpackagelater{expl3}{2021-07-12} % need expl3 which is loaded by xparse
+ { \bool_set_true:N \l__ninecolors_define_latex_three_bool } { }
+
+\cs_new_protected_nopar:Npn \__ninecolors_define_colors_mono:
{
- saturation .tl_set:N = \l__ninecolors_sat_tl,
- saturation .initial:n = medium,
+ \__ninecolors_define_one:nnn {gray1} {gray} {0.14}
+ \__ninecolors_define_one:nnn {gray2} {gray} {0.23}
+ \__ninecolors_define_one:nnn {gray3} {gray} {0.30}
+ \__ninecolors_define_one:nnn {gray4} {gray} {0.38}
+ \__ninecolors_define_one:nnn {gray5} {gray} {0.46}
+ \__ninecolors_define_one:nnn {gray6} {gray} {0.55}
+ \__ninecolors_define_one:nnn {gray7} {gray} {0.64}
+ \__ninecolors_define_one:nnn {gray8} {gray} {0.75}
+ \__ninecolors_define_one:nnn {gray9} {gray} {0.87}
}
-\NewDocumentCommand \NineColors {m}
+\cs_new_protected_nopar:Npn \__ninecolors_define_colors_low:
{
- \keys_set:nn {ninecolors} {#1}
- \cs:w ninecolors@define@color@ \l__ninecolors_sat_tl \cs_end:
+ \__ninecolors_define_one:nnn {red1} {rgb:Hsb} {0,0.67,0.26}
+ \__ninecolors_define_one:nnn {red2} {rgb:Hsb} {0,0.67,0.41}
+ \__ninecolors_define_one:nnn {red3} {rgb:Hsb} {0,0.67,0.54}
+ \__ninecolors_define_one:nnn {red4} {rgb:Hsb} {0,0.67,0.67}
+ \__ninecolors_define_one:nnn {red5} {rgb:Hsb} {0,0.60,0.77}
+ \__ninecolors_define_one:nnn {red6} {rgb:Hsb} {0,0.46,0.81}
+ \__ninecolors_define_one:nnn {red7} {rgb:Hsb} {0,0.34,0.86}
+ \__ninecolors_define_one:nnn {red8} {rgb:Hsb} {0,0.22,0.90}
+ \__ninecolors_define_one:nnn {red9} {rgb:Hsb} {0,0.11,0.95}
+ \__ninecolors_define_one:nnn {brown1} {rgb:Hsb} {30,0.67,0.19}
+ \__ninecolors_define_one:nnn {brown2} {rgb:Hsb} {30,0.67,0.31}
+ \__ninecolors_define_one:nnn {brown3} {rgb:Hsb} {30,0.67,0.41}
+ \__ninecolors_define_one:nnn {brown4} {rgb:Hsb} {30,0.67,0.51}
+ \__ninecolors_define_one:nnn {brown5} {rgb:Hsb} {30,0.67,0.62}
+ \__ninecolors_define_one:nnn {brown6} {rgb:Hsb} {30,0.67,0.74}
+ \__ninecolors_define_one:nnn {brown7} {rgb:Hsb} {30,0.49,0.80}
+ \__ninecolors_define_one:nnn {brown8} {rgb:Hsb} {30,0.32,0.86}
+ \__ninecolors_define_one:nnn {brown9} {rgb:Hsb} {30,0.15,0.93}
+ \__ninecolors_define_one:nnn {yellow1} {rgb:Hsb} {60,0.67,0.15}
+ \__ninecolors_define_one:nnn {yellow2} {rgb:Hsb} {60,0.67,0.23}
+ \__ninecolors_define_one:nnn {yellow3} {rgb:Hsb} {60,0.67,0.31}
+ \__ninecolors_define_one:nnn {yellow4} {rgb:Hsb} {60,0.67,0.39}
+ \__ninecolors_define_one:nnn {yellow5} {rgb:Hsb} {60,0.67,0.47}
+ \__ninecolors_define_one:nnn {yellow6} {rgb:Hsb} {60,0.67,0.56}
+ \__ninecolors_define_one:nnn {yellow7} {rgb:Hsb} {60,0.67,0.66}
+ \__ninecolors_define_one:nnn {yellow8} {rgb:Hsb} {60,0.59,0.77}
+ \__ninecolors_define_one:nnn {yellow9} {rgb:Hsb} {60,0.27,0.88}
+ \__ninecolors_define_one:nnn {olive1} {rgb:Hsb} {90,0.67,0.16}
+ \__ninecolors_define_one:nnn {olive2} {rgb:Hsb} {90,0.67,0.25}
+ \__ninecolors_define_one:nnn {olive3} {rgb:Hsb} {90,0.67,0.33}
+ \__ninecolors_define_one:nnn {olive4} {rgb:Hsb} {90,0.67,0.42}
+ \__ninecolors_define_one:nnn {olive5} {rgb:Hsb} {90,0.67,0.51}
+ \__ninecolors_define_one:nnn {olive6} {rgb:Hsb} {90,0.67,0.60}
+ \__ninecolors_define_one:nnn {olive7} {rgb:Hsb} {90,0.67,0.71}
+ \__ninecolors_define_one:nnn {olive8} {rgb:Hsb} {90,0.48,0.81}
+ \__ninecolors_define_one:nnn {olive9} {rgb:Hsb} {90,0.22,0.90}
+ \__ninecolors_define_one:nnn {green1} {rgb:Hsb} {120,0.67,0.16}
+ \__ninecolors_define_one:nnn {green2} {rgb:Hsb} {120,0.67,0.26}
+ \__ninecolors_define_one:nnn {green3} {rgb:Hsb} {120,0.67,0.35}
+ \__ninecolors_define_one:nnn {green4} {rgb:Hsb} {120,0.67,0.44}
+ \__ninecolors_define_one:nnn {green5} {rgb:Hsb} {120,0.67,0.53}
+ \__ninecolors_define_one:nnn {green6} {rgb:Hsb} {120,0.67,0.63}
+ \__ninecolors_define_one:nnn {green7} {rgb:Hsb} {120,0.67,0.74}
+ \__ninecolors_define_one:nnn {green8} {rgb:Hsb} {120,0.42,0.83}
+ \__ninecolors_define_one:nnn {green9} {rgb:Hsb} {120,0.19,0.91}
+ \__ninecolors_define_one:nnn {teal1} {rgb:Hsb} {150,0.67,0.16}
+ \__ninecolors_define_one:nnn {teal2} {rgb:Hsb} {150,0.67,0.26}
+ \__ninecolors_define_one:nnn {teal3} {rgb:Hsb} {150,0.67,0.34}
+ \__ninecolors_define_one:nnn {teal4} {rgb:Hsb} {150,0.67,0.43}
+ \__ninecolors_define_one:nnn {teal5} {rgb:Hsb} {150,0.67,0.52}
+ \__ninecolors_define_one:nnn {teal6} {rgb:Hsb} {150,0.67,0.62}
+ \__ninecolors_define_one:nnn {teal7} {rgb:Hsb} {150,0.67,0.73}
+ \__ninecolors_define_one:nnn {teal8} {rgb:Hsb} {150,0.44,0.82}
+ \__ninecolors_define_one:nnn {teal9} {rgb:Hsb} {150,0.20,0.91}
+ \__ninecolors_define_one:nnn {cyan1} {rgb:Hsb} {180,0.67,0.16}
+ \__ninecolors_define_one:nnn {cyan2} {rgb:Hsb} {180,0.67,0.25}
+ \__ninecolors_define_one:nnn {cyan3} {rgb:Hsb} {180,0.67,0.33}
+ \__ninecolors_define_one:nnn {cyan4} {rgb:Hsb} {180,0.67,0.42}
+ \__ninecolors_define_one:nnn {cyan5} {rgb:Hsb} {180,0.67,0.51}
+ \__ninecolors_define_one:nnn {cyan6} {rgb:Hsb} {180,0.67,0.60}
+ \__ninecolors_define_one:nnn {cyan7} {rgb:Hsb} {180,0.67,0.71}
+ \__ninecolors_define_one:nnn {cyan8} {rgb:Hsb} {180,0.47,0.81}
+ \__ninecolors_define_one:nnn {cyan9} {rgb:Hsb} {180,0.21,0.90}
+ \__ninecolors_define_one:nnn {azure1} {rgb:Hsb} {210,0.67,0.22}
+ \__ninecolors_define_one:nnn {azure2} {rgb:Hsb} {210,0.67,0.35}
+ \__ninecolors_define_one:nnn {azure3} {rgb:Hsb} {210,0.67,0.47}
+ \__ninecolors_define_one:nnn {azure4} {rgb:Hsb} {210,0.67,0.59}
+ \__ninecolors_define_one:nnn {azure5} {rgb:Hsb} {210,0.67,0.71}
+ \__ninecolors_define_one:nnn {azure6} {rgb:Hsb} {210,0.56,0.78}
+ \__ninecolors_define_one:nnn {azure7} {rgb:Hsb} {210,0.41,0.83}
+ \__ninecolors_define_one:nnn {azure8} {rgb:Hsb} {210,0.27,0.88}
+ \__ninecolors_define_one:nnn {azure9} {rgb:Hsb} {210,0.13,0.94}
+ \__ninecolors_define_one:nnn {blue1} {rgb:Hsb} {240,0.67,0.34}
+ \__ninecolors_define_one:nnn {blue2} {rgb:Hsb} {240,0.67,0.53}
+ \__ninecolors_define_one:nnn {blue3} {rgb:Hsb} {240,0.67,0.70}
+ \__ninecolors_define_one:nnn {blue4} {rgb:Hsb} {240,0.58,0.77}
+ \__ninecolors_define_one:nnn {blue5} {rgb:Hsb} {240,0.48,0.81}
+ \__ninecolors_define_one:nnn {blue6} {rgb:Hsb} {240,0.39,0.84}
+ \__ninecolors_define_one:nnn {blue7} {rgb:Hsb} {240,0.29,0.87}
+ \__ninecolors_define_one:nnn {blue8} {rgb:Hsb} {240,0.19,0.91}
+ \__ninecolors_define_one:nnn {blue9} {rgb:Hsb} {240,0.10,0.95}
+ \__ninecolors_define_one:nnn {violet1} {rgb:Hsb} {270,0.67,0.29}
+ \__ninecolors_define_one:nnn {violet2} {rgb:Hsb} {270,0.67,0.45}
+ \__ninecolors_define_one:nnn {violet3} {rgb:Hsb} {270,0.67,0.60}
+ \__ninecolors_define_one:nnn {violet4} {rgb:Hsb} {270,0.67,0.75}
+ \__ninecolors_define_one:nnn {violet5} {rgb:Hsb} {270,0.54,0.79}
+ \__ninecolors_define_one:nnn {violet6} {rgb:Hsb} {270,0.43,0.82}
+ \__ninecolors_define_one:nnn {violet7} {rgb:Hsb} {270,0.32,0.86}
+ \__ninecolors_define_one:nnn {violet8} {rgb:Hsb} {270,0.21,0.90}
+ \__ninecolors_define_one:nnn {violet9} {rgb:Hsb} {270,0.11,0.95}
+ \__ninecolors_define_one:nnn {magenta1} {rgb:Hsb} {300,0.67,0.23}
+ \__ninecolors_define_one:nnn {magenta2} {rgb:Hsb} {300,0.67,0.37}
+ \__ninecolors_define_one:nnn {magenta3} {rgb:Hsb} {300,0.67,0.49}
+ \__ninecolors_define_one:nnn {magenta4} {rgb:Hsb} {300,0.67,0.61}
+ \__ninecolors_define_one:nnn {magenta5} {rgb:Hsb} {300,0.67,0.74}
+ \__ninecolors_define_one:nnn {magenta6} {rgb:Hsb} {300,0.51,0.80}
+ \__ninecolors_define_one:nnn {magenta7} {rgb:Hsb} {300,0.37,0.84}
+ \__ninecolors_define_one:nnn {magenta8} {rgb:Hsb} {300,0.24,0.89}
+ \__ninecolors_define_one:nnn {magenta9} {rgb:Hsb} {300,0.12,0.94}
+ \__ninecolors_define_one:nnn {purple1} {rgb:Hsb} {330,0.67,0.25}
+ \__ninecolors_define_one:nnn {purple2} {rgb:Hsb} {330,0.67,0.39}
+ \__ninecolors_define_one:nnn {purple3} {rgb:Hsb} {330,0.67,0.52}
+ \__ninecolors_define_one:nnn {purple4} {rgb:Hsb} {330,0.67,0.65}
+ \__ninecolors_define_one:nnn {purple5} {rgb:Hsb} {330,0.63,0.76}
+ \__ninecolors_define_one:nnn {purple6} {rgb:Hsb} {330,0.48,0.81}
+ \__ninecolors_define_one:nnn {purple7} {rgb:Hsb} {330,0.35,0.85}
+ \__ninecolors_define_one:nnn {purple8} {rgb:Hsb} {330,0.23,0.90}
+ \__ninecolors_define_one:nnn {purple9} {rgb:Hsb} {330,0.11,0.95}
+ }
+
+\cs_new_protected_nopar:Npn \__ninecolors_define_colors_medium:
+ {
+ \__ninecolors_define_one:nnn {red1} {rgb:Hsb} {0,0.79,0.28}
+ \__ninecolors_define_one:nnn {red2} {rgb:Hsb} {0,0.79,0.44}
+ \__ninecolors_define_one:nnn {red3} {rgb:Hsb} {0,0.79,0.58}
+ \__ninecolors_define_one:nnn {red4} {rgb:Hsb} {0,0.79,0.72}
+ \__ninecolors_define_one:nnn {red5} {rgb:Hsb} {0,0.72,0.84}
+ \__ninecolors_define_one:nnn {red6} {rgb:Hsb} {0,0.54,0.87}
+ \__ninecolors_define_one:nnn {red7} {rgb:Hsb} {0,0.40,0.90}
+ \__ninecolors_define_one:nnn {red8} {rgb:Hsb} {0,0.26,0.93}
+ \__ninecolors_define_one:nnn {red9} {rgb:Hsb} {0,0.13,0.97}
+ \__ninecolors_define_one:nnn {brown1} {rgb:Hsb} {30,0.79,0.21}
+ \__ninecolors_define_one:nnn {brown2} {rgb:Hsb} {30,0.79,0.33}
+ \__ninecolors_define_one:nnn {brown3} {rgb:Hsb} {30,0.79,0.43}
+ \__ninecolors_define_one:nnn {brown4} {rgb:Hsb} {30,0.79,0.54}
+ \__ninecolors_define_one:nnn {brown5} {rgb:Hsb} {30,0.79,0.66}
+ \__ninecolors_define_one:nnn {brown6} {rgb:Hsb} {30,0.79,0.78}
+ \__ninecolors_define_one:nnn {brown7} {rgb:Hsb} {30,0.63,0.86}
+ \__ninecolors_define_one:nnn {brown8} {rgb:Hsb} {30,0.41,0.90}
+ \__ninecolors_define_one:nnn {brown9} {rgb:Hsb} {30,0.20,0.95}
+ \__ninecolors_define_one:nnn {yellow1} {rgb:Hsb} {60,0.79,0.15}
+ \__ninecolors_define_one:nnn {yellow2} {rgb:Hsb} {60,0.79,0.23}
+ \__ninecolors_define_one:nnn {yellow3} {rgb:Hsb} {60,0.79,0.31}
+ \__ninecolors_define_one:nnn {yellow4} {rgb:Hsb} {60,0.79,0.39}
+ \__ninecolors_define_one:nnn {yellow5} {rgb:Hsb} {60,0.79,0.48}
+ \__ninecolors_define_one:nnn {yellow6} {rgb:Hsb} {60,0.79,0.57}
+ \__ninecolors_define_one:nnn {yellow7} {rgb:Hsb} {60,0.79,0.66}
+ \__ninecolors_define_one:nnn {yellow8} {rgb:Hsb} {60,0.79,0.77}
+ \__ninecolors_define_one:nnn {yellow9} {rgb:Hsb} {60,0.46,0.89}
+ \__ninecolors_define_one:nnn {olive1} {rgb:Hsb} {90,0.79,0.16}
+ \__ninecolors_define_one:nnn {olive2} {rgb:Hsb} {90,0.79,0.25}
+ \__ninecolors_define_one:nnn {olive3} {rgb:Hsb} {90,0.79,0.34}
+ \__ninecolors_define_one:nnn {olive4} {rgb:Hsb} {90,0.79,0.42}
+ \__ninecolors_define_one:nnn {olive5} {rgb:Hsb} {90,0.79,0.51}
+ \__ninecolors_define_one:nnn {olive6} {rgb:Hsb} {90,0.79,0.61}
+ \__ninecolors_define_one:nnn {olive7} {rgb:Hsb} {90,0.79,0.72}
+ \__ninecolors_define_one:nnn {olive8} {rgb:Hsb} {90,0.76,0.83}
+ \__ninecolors_define_one:nnn {olive9} {rgb:Hsb} {90,0.34,0.92}
+ \__ninecolors_define_one:nnn {green1} {rgb:Hsb} {120,0.79,0.17}
+ \__ninecolors_define_one:nnn {green2} {rgb:Hsb} {120,0.79,0.26}
+ \__ninecolors_define_one:nnn {green3} {rgb:Hsb} {120,0.79,0.35}
+ \__ninecolors_define_one:nnn {green4} {rgb:Hsb} {120,0.79,0.44}
+ \__ninecolors_define_one:nnn {green5} {rgb:Hsb} {120,0.79,0.53}
+ \__ninecolors_define_one:nnn {green6} {rgb:Hsb} {120,0.79,0.63}
+ \__ninecolors_define_one:nnn {green7} {rgb:Hsb} {120,0.79,0.74}
+ \__ninecolors_define_one:nnn {green8} {rgb:Hsb} {120,0.64,0.85}
+ \__ninecolors_define_one:nnn {green9} {rgb:Hsb} {120,0.28,0.93}
+ \__ninecolors_define_one:nnn {teal1} {rgb:Hsb} {150,0.79,0.16}
+ \__ninecolors_define_one:nnn {teal2} {rgb:Hsb} {150,0.79,0.26}
+ \__ninecolors_define_one:nnn {teal3} {rgb:Hsb} {150,0.79,0.35}
+ \__ninecolors_define_one:nnn {teal4} {rgb:Hsb} {150,0.79,0.43}
+ \__ninecolors_define_one:nnn {teal5} {rgb:Hsb} {150,0.79,0.53}
+ \__ninecolors_define_one:nnn {teal6} {rgb:Hsb} {150,0.79,0.62}
+ \__ninecolors_define_one:nnn {teal7} {rgb:Hsb} {150,0.79,0.73}
+ \__ninecolors_define_one:nnn {teal8} {rgb:Hsb} {150,0.68,0.85}
+ \__ninecolors_define_one:nnn {teal9} {rgb:Hsb} {150,0.30,0.93}
+ \__ninecolors_define_one:nnn {cyan1} {rgb:Hsb} {180,0.79,0.16}
+ \__ninecolors_define_one:nnn {cyan2} {rgb:Hsb} {180,0.79,0.25}
+ \__ninecolors_define_one:nnn {cyan3} {rgb:Hsb} {180,0.79,0.34}
+ \__ninecolors_define_one:nnn {cyan4} {rgb:Hsb} {180,0.79,0.42}
+ \__ninecolors_define_one:nnn {cyan5} {rgb:Hsb} {180,0.79,0.51}
+ \__ninecolors_define_one:nnn {cyan6} {rgb:Hsb} {180,0.79,0.61}
+ \__ninecolors_define_one:nnn {cyan7} {rgb:Hsb} {180,0.79,0.71}
+ \__ninecolors_define_one:nnn {cyan8} {rgb:Hsb} {180,0.77,0.83}
+ \__ninecolors_define_one:nnn {cyan9} {rgb:Hsb} {180,0.32,0.92}
+ \__ninecolors_define_one:nnn {azure1} {rgb:Hsb} {210,0.79,0.24}
+ \__ninecolors_define_one:nnn {azure2} {rgb:Hsb} {210,0.79,0.38}
+ \__ninecolors_define_one:nnn {azure3} {rgb:Hsb} {210,0.79,0.51}
+ \__ninecolors_define_one:nnn {azure4} {rgb:Hsb} {210,0.79,0.64}
+ \__ninecolors_define_one:nnn {azure5} {rgb:Hsb} {210,0.79,0.77}
+ \__ninecolors_define_one:nnn {azure6} {rgb:Hsb} {210,0.67,0.85}
+ \__ninecolors_define_one:nnn {azure7} {rgb:Hsb} {210,0.50,0.88}
+ \__ninecolors_define_one:nnn {azure8} {rgb:Hsb} {210,0.33,0.92}
+ \__ninecolors_define_one:nnn {azure9} {rgb:Hsb} {210,0.17,0.96}
+ \__ninecolors_define_one:nnn {blue1} {rgb:Hsb} {240,0.79,0.41}
+ \__ninecolors_define_one:nnn {blue2} {rgb:Hsb} {240,0.79,0.64}
+ \__ninecolors_define_one:nnn {blue3} {rgb:Hsb} {240,0.77,0.83}
+ \__ninecolors_define_one:nnn {blue4} {rgb:Hsb} {240,0.65,0.85}
+ \__ninecolors_define_one:nnn {blue5} {rgb:Hsb} {240,0.54,0.87}
+ \__ninecolors_define_one:nnn {blue6} {rgb:Hsb} {240,0.43,0.90}
+ \__ninecolors_define_one:nnn {blue7} {rgb:Hsb} {240,0.33,0.92}
+ \__ninecolors_define_one:nnn {blue8} {rgb:Hsb} {240,0.22,0.94}
+ \__ninecolors_define_one:nnn {blue9} {rgb:Hsb} {240,0.11,0.97}
+ \__ninecolors_define_one:nnn {violet1} {rgb:Hsb} {270,0.79,0.33}
+ \__ninecolors_define_one:nnn {violet2} {rgb:Hsb} {270,0.79,0.52}
+ \__ninecolors_define_one:nnn {violet3} {rgb:Hsb} {270,0.79,0.69}
+ \__ninecolors_define_one:nnn {violet4} {rgb:Hsb} {270,0.76,0.83}
+ \__ninecolors_define_one:nnn {violet5} {rgb:Hsb} {270,0.62,0.86}
+ \__ninecolors_define_one:nnn {violet6} {rgb:Hsb} {270,0.49,0.88}
+ \__ninecolors_define_one:nnn {violet7} {rgb:Hsb} {270,0.37,0.91}
+ \__ninecolors_define_one:nnn {violet8} {rgb:Hsb} {270,0.25,0.94}
+ \__ninecolors_define_one:nnn {violet9} {rgb:Hsb} {270,0.13,0.97}
+ \__ninecolors_define_one:nnn {magenta1} {rgb:Hsb} {300,0.79,0.25}
+ \__ninecolors_define_one:nnn {magenta2} {rgb:Hsb} {300,0.79,0.39}
+ \__ninecolors_define_one:nnn {magenta3} {rgb:Hsb} {300,0.79,0.52}
+ \__ninecolors_define_one:nnn {magenta4} {rgb:Hsb} {300,0.79,0.65}
+ \__ninecolors_define_one:nnn {magenta5} {rgb:Hsb} {300,0.79,0.78}
+ \__ninecolors_define_one:nnn {magenta6} {rgb:Hsb} {300,0.62,0.86}
+ \__ninecolors_define_one:nnn {magenta7} {rgb:Hsb} {300,0.44,0.89}
+ \__ninecolors_define_one:nnn {magenta8} {rgb:Hsb} {300,0.29,0.93}
+ \__ninecolors_define_one:nnn {magenta9} {rgb:Hsb} {300,0.14,0.96}
+ \__ninecolors_define_one:nnn {purple1} {rgb:Hsb} {330,0.79,0.27}
+ \__ninecolors_define_one:nnn {purple2} {rgb:Hsb} {330,0.79,0.42}
+ \__ninecolors_define_one:nnn {purple3} {rgb:Hsb} {330,0.79,0.56}
+ \__ninecolors_define_one:nnn {purple4} {rgb:Hsb} {330,0.79,0.70}
+ \__ninecolors_define_one:nnn {purple5} {rgb:Hsb} {330,0.76,0.83}
+ \__ninecolors_define_one:nnn {purple6} {rgb:Hsb} {330,0.57,0.87}
+ \__ninecolors_define_one:nnn {purple7} {rgb:Hsb} {330,0.42,0.90}
+ \__ninecolors_define_one:nnn {purple8} {rgb:Hsb} {330,0.27,0.93}
+ \__ninecolors_define_one:nnn {purple9} {rgb:Hsb} {330,0.14,0.96}
}
-\@namedef{ninecolors@define@mono}{%
- \definecolor{gray1}{gray}{0.14}
- \definecolor{gray2}{gray}{0.23}
- \definecolor{gray3}{gray}{0.30}
- \definecolor{gray4}{gray}{0.38}
- \definecolor{gray5}{gray}{0.46}
- \definecolor{gray6}{gray}{0.55}
- \definecolor{gray7}{gray}{0.64}
- \definecolor{gray8}{gray}{0.75}
- \definecolor{gray9}{gray}{0.87}
-}
+\cs_new_protected_nopar:Npn \__ninecolors_define_colors_high:
+ {
+ \__ninecolors_define_one:nnn {red1} {rgb:Hsb} {0,0.89,0.30}
+ \__ninecolors_define_one:nnn {red2} {rgb:Hsb} {0,0.89,0.46}
+ \__ninecolors_define_one:nnn {red3} {rgb:Hsb} {0,0.89,0.61}
+ \__ninecolors_define_one:nnn {red4} {rgb:Hsb} {0,0.89,0.76}
+ \__ninecolors_define_one:nnn {red5} {rgb:Hsb} {0,0.87,0.90}
+ \__ninecolors_define_one:nnn {red6} {rgb:Hsb} {0,0.62,0.93}
+ \__ninecolors_define_one:nnn {red7} {rgb:Hsb} {0,0.45,0.95}
+ \__ninecolors_define_one:nnn {red8} {rgb:Hsb} {0,0.30,0.96}
+ \__ninecolors_define_one:nnn {red9} {rgb:Hsb} {0,0.15,0.98}
+ \__ninecolors_define_one:nnn {brown1} {rgb:Hsb} {30,0.89,0.22}
+ \__ninecolors_define_one:nnn {brown2} {rgb:Hsb} {30,0.89,0.34}
+ \__ninecolors_define_one:nnn {brown3} {rgb:Hsb} {30,0.89,0.46}
+ \__ninecolors_define_one:nnn {brown4} {rgb:Hsb} {30,0.89,0.57}
+ \__ninecolors_define_one:nnn {brown5} {rgb:Hsb} {30,0.89,0.69}
+ \__ninecolors_define_one:nnn {brown6} {rgb:Hsb} {30,0.89,0.82}
+ \__ninecolors_define_one:nnn {brown7} {rgb:Hsb} {30,0.77,0.91}
+ \__ninecolors_define_one:nnn {brown8} {rgb:Hsb} {30,0.51,0.94}
+ \__ninecolors_define_one:nnn {brown9} {rgb:Hsb} {30,0.25,0.97}
+ \__ninecolors_define_one:nnn {yellow1} {rgb:Hsb} {60,0.89,0.15}
+ \__ninecolors_define_one:nnn {yellow2} {rgb:Hsb} {60,0.89,0.23}
+ \__ninecolors_define_one:nnn {yellow3} {rgb:Hsb} {60,0.89,0.31}
+ \__ninecolors_define_one:nnn {yellow4} {rgb:Hsb} {60,0.89,0.39}
+ \__ninecolors_define_one:nnn {yellow5} {rgb:Hsb} {60,0.89,0.48}
+ \__ninecolors_define_one:nnn {yellow6} {rgb:Hsb} {60,0.89,0.57}
+ \__ninecolors_define_one:nnn {yellow7} {rgb:Hsb} {60,0.89,0.66}
+ \__ninecolors_define_one:nnn {yellow8} {rgb:Hsb} {60,0.89,0.77}
+ \__ninecolors_define_one:nnn {yellow9} {rgb:Hsb} {60,0.89,0.90}
+ \__ninecolors_define_one:nnn {olive1} {rgb:Hsb} {90,0.89,0.16}
+ \__ninecolors_define_one:nnn {olive2} {rgb:Hsb} {90,0.89,0.26}
+ \__ninecolors_define_one:nnn {olive3} {rgb:Hsb} {90,0.89,0.34}
+ \__ninecolors_define_one:nnn {olive4} {rgb:Hsb} {90,0.89,0.43}
+ \__ninecolors_define_one:nnn {olive5} {rgb:Hsb} {90,0.89,0.52}
+ \__ninecolors_define_one:nnn {olive6} {rgb:Hsb} {90,0.89,0.61}
+ \__ninecolors_define_one:nnn {olive7} {rgb:Hsb} {90,0.89,0.72}
+ \__ninecolors_define_one:nnn {olive8} {rgb:Hsb} {90,0.89,0.84}
+ \__ninecolors_define_one:nnn {olive9} {rgb:Hsb} {90,0.52,0.94}
+ \__ninecolors_define_one:nnn {green1} {rgb:Hsb} {120,0.89,0.17}
+ \__ninecolors_define_one:nnn {green2} {rgb:Hsb} {120,0.89,0.27}
+ \__ninecolors_define_one:nnn {green3} {rgb:Hsb} {120,0.89,0.35}
+ \__ninecolors_define_one:nnn {green4} {rgb:Hsb} {120,0.89,0.44}
+ \__ninecolors_define_one:nnn {green5} {rgb:Hsb} {120,0.89,0.54}
+ \__ninecolors_define_one:nnn {green6} {rgb:Hsb} {120,0.89,0.64}
+ \__ninecolors_define_one:nnn {green7} {rgb:Hsb} {120,0.89,0.75}
+ \__ninecolors_define_one:nnn {green8} {rgb:Hsb} {120,0.89,0.87}
+ \__ninecolors_define_one:nnn {green9} {rgb:Hsb} {120,0.39,0.95}
+ \__ninecolors_define_one:nnn {teal1} {rgb:Hsb} {150,0.89,0.17}
+ \__ninecolors_define_one:nnn {teal2} {rgb:Hsb} {150,0.89,0.26}
+ \__ninecolors_define_one:nnn {teal3} {rgb:Hsb} {150,0.89,0.35}
+ \__ninecolors_define_one:nnn {teal4} {rgb:Hsb} {150,0.89,0.44}
+ \__ninecolors_define_one:nnn {teal5} {rgb:Hsb} {150,0.89,0.53}
+ \__ninecolors_define_one:nnn {teal6} {rgb:Hsb} {150,0.89,0.63}
+ \__ninecolors_define_one:nnn {teal7} {rgb:Hsb} {150,0.89,0.74}
+ \__ninecolors_define_one:nnn {teal8} {rgb:Hsb} {150,0.89,0.86}
+ \__ninecolors_define_one:nnn {teal9} {rgb:Hsb} {150,0.43,0.95}
+ \__ninecolors_define_one:nnn {cyan1} {rgb:Hsb} {180,0.89,0.16}
+ \__ninecolors_define_one:nnn {cyan2} {rgb:Hsb} {180,0.89,0.25}
+ \__ninecolors_define_one:nnn {cyan3} {rgb:Hsb} {180,0.89,0.34}
+ \__ninecolors_define_one:nnn {cyan4} {rgb:Hsb} {180,0.89,0.42}
+ \__ninecolors_define_one:nnn {cyan5} {rgb:Hsb} {180,0.89,0.51}
+ \__ninecolors_define_one:nnn {cyan6} {rgb:Hsb} {180,0.89,0.61}
+ \__ninecolors_define_one:nnn {cyan7} {rgb:Hsb} {180,0.89,0.71}
+ \__ninecolors_define_one:nnn {cyan8} {rgb:Hsb} {180,0.89,0.83}
+ \__ninecolors_define_one:nnn {cyan9} {rgb:Hsb} {180,0.50,0.94}
+ \__ninecolors_define_one:nnn {azure1} {rgb:Hsb} {210,0.89,0.26}
+ \__ninecolors_define_one:nnn {azure2} {rgb:Hsb} {210,0.89,0.41}
+ \__ninecolors_define_one:nnn {azure3} {rgb:Hsb} {210,0.89,0.55}
+ \__ninecolors_define_one:nnn {azure4} {rgb:Hsb} {210,0.89,0.69}
+ \__ninecolors_define_one:nnn {azure5} {rgb:Hsb} {210,0.89,0.83}
+ \__ninecolors_define_one:nnn {azure6} {rgb:Hsb} {210,0.77,0.91}
+ \__ninecolors_define_one:nnn {azure7} {rgb:Hsb} {210,0.58,0.93}
+ \__ninecolors_define_one:nnn {azure8} {rgb:Hsb} {210,0.39,0.95}
+ \__ninecolors_define_one:nnn {azure9} {rgb:Hsb} {210,0.20,0.98}
+ \__ninecolors_define_one:nnn {blue1} {rgb:Hsb} {240,0.89,0.48}
+ \__ninecolors_define_one:nnn {blue2} {rgb:Hsb} {240,0.89,0.73}
+ \__ninecolors_define_one:nnn {blue3} {rgb:Hsb} {240,0.84,0.90}
+ \__ninecolors_define_one:nnn {blue4} {rgb:Hsb} {240,0.70,0.92}
+ \__ninecolors_define_one:nnn {blue5} {rgb:Hsb} {240,0.58,0.93}
+ \__ninecolors_define_one:nnn {blue6} {rgb:Hsb} {240,0.47,0.94}
+ \__ninecolors_define_one:nnn {blue7} {rgb:Hsb} {240,0.36,0.96}
+ \__ninecolors_define_one:nnn {blue8} {rgb:Hsb} {240,0.25,0.97}
+ \__ninecolors_define_one:nnn {blue9} {rgb:Hsb} {240,0.13,0.98}
+ \__ninecolors_define_one:nnn {violet1} {rgb:Hsb} {270,0.89,0.37}
+ \__ninecolors_define_one:nnn {violet2} {rgb:Hsb} {270,0.89,0.57}
+ \__ninecolors_define_one:nnn {violet3} {rgb:Hsb} {270,0.89,0.75}
+ \__ninecolors_define_one:nnn {violet4} {rgb:Hsb} {270,0.85,0.90}
+ \__ninecolors_define_one:nnn {violet5} {rgb:Hsb} {270,0.68,0.92}
+ \__ninecolors_define_one:nnn {violet6} {rgb:Hsb} {270,0.54,0.94}
+ \__ninecolors_define_one:nnn {violet7} {rgb:Hsb} {270,0.41,0.95}
+ \__ninecolors_define_one:nnn {violet8} {rgb:Hsb} {270,0.28,0.97}
+ \__ninecolors_define_one:nnn {violet9} {rgb:Hsb} {270,0.14,0.98}
+ \__ninecolors_define_one:nnn {magenta1} {rgb:Hsb} {300,0.89,0.26}
+ \__ninecolors_define_one:nnn {magenta2} {rgb:Hsb} {300,0.89,0.41}
+ \__ninecolors_define_one:nnn {magenta3} {rgb:Hsb} {300,0.89,0.54}
+ \__ninecolors_define_one:nnn {magenta4} {rgb:Hsb} {300,0.89,0.67}
+ \__ninecolors_define_one:nnn {magenta5} {rgb:Hsb} {300,0.89,0.80}
+ \__ninecolors_define_one:nnn {magenta6} {rgb:Hsb} {300,0.76,0.91}
+ \__ninecolors_define_one:nnn {magenta7} {rgb:Hsb} {300,0.52,0.94}
+ \__ninecolors_define_one:nnn {magenta8} {rgb:Hsb} {300,0.33,0.96}
+ \__ninecolors_define_one:nnn {magenta9} {rgb:Hsb} {300,0.17,0.98}
+ \__ninecolors_define_one:nnn {purple1} {rgb:Hsb} {330,0.89,0.29}
+ \__ninecolors_define_one:nnn {purple2} {rgb:Hsb} {330,0.89,0.45}
+ \__ninecolors_define_one:nnn {purple3} {rgb:Hsb} {330,0.89,0.59}
+ \__ninecolors_define_one:nnn {purple4} {rgb:Hsb} {330,0.89,0.73}
+ \__ninecolors_define_one:nnn {purple5} {rgb:Hsb} {330,0.89,0.88}
+ \__ninecolors_define_one:nnn {purple6} {rgb:Hsb} {330,0.66,0.92}
+ \__ninecolors_define_one:nnn {purple7} {rgb:Hsb} {330,0.47,0.94}
+ \__ninecolors_define_one:nnn {purple8} {rgb:Hsb} {330,0.31,0.96}
+ \__ninecolors_define_one:nnn {purple9} {rgb:Hsb} {330,0.16,0.98}
+ }
-\@namedef{ninecolors@define@color@low}{%
- \definecolor{red1}{rgb:Hsb}{0,0.67,0.26}
- \definecolor{red2}{rgb:Hsb}{0,0.67,0.41}
- \definecolor{red3}{rgb:Hsb}{0,0.67,0.54}
- \definecolor{red4}{rgb:Hsb}{0,0.67,0.67}
- \definecolor{red5}{rgb:Hsb}{0,0.60,0.77}
- \definecolor{red6}{rgb:Hsb}{0,0.46,0.81}
- \definecolor{red7}{rgb:Hsb}{0,0.34,0.86}
- \definecolor{red8}{rgb:Hsb}{0,0.22,0.90}
- \definecolor{red9}{rgb:Hsb}{0,0.11,0.95}
- \definecolor{brown1}{rgb:Hsb}{30,0.67,0.19}
- \definecolor{brown2}{rgb:Hsb}{30,0.67,0.31}
- \definecolor{brown3}{rgb:Hsb}{30,0.67,0.41}
- \definecolor{brown4}{rgb:Hsb}{30,0.67,0.51}
- \definecolor{brown5}{rgb:Hsb}{30,0.67,0.62}
- \definecolor{brown6}{rgb:Hsb}{30,0.67,0.74}
- \definecolor{brown7}{rgb:Hsb}{30,0.49,0.80}
- \definecolor{brown8}{rgb:Hsb}{30,0.32,0.86}
- \definecolor{brown9}{rgb:Hsb}{30,0.15,0.93}
- \definecolor{yellow1}{rgb:Hsb}{60,0.67,0.15}
- \definecolor{yellow2}{rgb:Hsb}{60,0.67,0.23}
- \definecolor{yellow3}{rgb:Hsb}{60,0.67,0.31}
- \definecolor{yellow4}{rgb:Hsb}{60,0.67,0.39}
- \definecolor{yellow5}{rgb:Hsb}{60,0.67,0.47}
- \definecolor{yellow6}{rgb:Hsb}{60,0.67,0.56}
- \definecolor{yellow7}{rgb:Hsb}{60,0.67,0.66}
- \definecolor{yellow8}{rgb:Hsb}{60,0.59,0.77}
- \definecolor{yellow9}{rgb:Hsb}{60,0.27,0.88}
- \definecolor{olive1}{rgb:Hsb}{90,0.67,0.16}
- \definecolor{olive2}{rgb:Hsb}{90,0.67,0.25}
- \definecolor{olive3}{rgb:Hsb}{90,0.67,0.33}
- \definecolor{olive4}{rgb:Hsb}{90,0.67,0.42}
- \definecolor{olive5}{rgb:Hsb}{90,0.67,0.51}
- \definecolor{olive6}{rgb:Hsb}{90,0.67,0.60}
- \definecolor{olive7}{rgb:Hsb}{90,0.67,0.71}
- \definecolor{olive8}{rgb:Hsb}{90,0.48,0.81}
- \definecolor{olive9}{rgb:Hsb}{90,0.22,0.90}
- \definecolor{green1}{rgb:Hsb}{120,0.67,0.16}
- \definecolor{green2}{rgb:Hsb}{120,0.67,0.26}
- \definecolor{green3}{rgb:Hsb}{120,0.67,0.35}
- \definecolor{green4}{rgb:Hsb}{120,0.67,0.44}
- \definecolor{green5}{rgb:Hsb}{120,0.67,0.53}
- \definecolor{green6}{rgb:Hsb}{120,0.67,0.63}
- \definecolor{green7}{rgb:Hsb}{120,0.67,0.74}
- \definecolor{green8}{rgb:Hsb}{120,0.42,0.83}
- \definecolor{green9}{rgb:Hsb}{120,0.19,0.91}
- \definecolor{teal1}{rgb:Hsb}{150,0.67,0.16}
- \definecolor{teal2}{rgb:Hsb}{150,0.67,0.26}
- \definecolor{teal3}{rgb:Hsb}{150,0.67,0.34}
- \definecolor{teal4}{rgb:Hsb}{150,0.67,0.43}
- \definecolor{teal5}{rgb:Hsb}{150,0.67,0.52}
- \definecolor{teal6}{rgb:Hsb}{150,0.67,0.62}
- \definecolor{teal7}{rgb:Hsb}{150,0.67,0.73}
- \definecolor{teal8}{rgb:Hsb}{150,0.44,0.82}
- \definecolor{teal9}{rgb:Hsb}{150,0.20,0.91}
- \definecolor{cyan1}{rgb:Hsb}{180,0.67,0.16}
- \definecolor{cyan2}{rgb:Hsb}{180,0.67,0.25}
- \definecolor{cyan3}{rgb:Hsb}{180,0.67,0.33}
- \definecolor{cyan4}{rgb:Hsb}{180,0.67,0.42}
- \definecolor{cyan5}{rgb:Hsb}{180,0.67,0.51}
- \definecolor{cyan6}{rgb:Hsb}{180,0.67,0.60}
- \definecolor{cyan7}{rgb:Hsb}{180,0.67,0.71}
- \definecolor{cyan8}{rgb:Hsb}{180,0.47,0.81}
- \definecolor{cyan9}{rgb:Hsb}{180,0.21,0.90}
- \definecolor{azure1}{rgb:Hsb}{210,0.67,0.22}
- \definecolor{azure2}{rgb:Hsb}{210,0.67,0.35}
- \definecolor{azure3}{rgb:Hsb}{210,0.67,0.47}
- \definecolor{azure4}{rgb:Hsb}{210,0.67,0.59}
- \definecolor{azure5}{rgb:Hsb}{210,0.67,0.71}
- \definecolor{azure6}{rgb:Hsb}{210,0.56,0.78}
- \definecolor{azure7}{rgb:Hsb}{210,0.41,0.83}
- \definecolor{azure8}{rgb:Hsb}{210,0.27,0.88}
- \definecolor{azure9}{rgb:Hsb}{210,0.13,0.94}
- \definecolor{blue1}{rgb:Hsb}{240,0.67,0.34}
- \definecolor{blue2}{rgb:Hsb}{240,0.67,0.53}
- \definecolor{blue3}{rgb:Hsb}{240,0.67,0.70}
- \definecolor{blue4}{rgb:Hsb}{240,0.58,0.77}
- \definecolor{blue5}{rgb:Hsb}{240,0.48,0.81}
- \definecolor{blue6}{rgb:Hsb}{240,0.39,0.84}
- \definecolor{blue7}{rgb:Hsb}{240,0.29,0.87}
- \definecolor{blue8}{rgb:Hsb}{240,0.19,0.91}
- \definecolor{blue9}{rgb:Hsb}{240,0.10,0.95}
- \definecolor{violet1}{rgb:Hsb}{270,0.67,0.29}
- \definecolor{violet2}{rgb:Hsb}{270,0.67,0.45}
- \definecolor{violet3}{rgb:Hsb}{270,0.67,0.60}
- \definecolor{violet4}{rgb:Hsb}{270,0.67,0.75}
- \definecolor{violet5}{rgb:Hsb}{270,0.54,0.79}
- \definecolor{violet6}{rgb:Hsb}{270,0.43,0.82}
- \definecolor{violet7}{rgb:Hsb}{270,0.32,0.86}
- \definecolor{violet8}{rgb:Hsb}{270,0.21,0.90}
- \definecolor{violet9}{rgb:Hsb}{270,0.11,0.95}
- \definecolor{magenta1}{rgb:Hsb}{300,0.67,0.23}
- \definecolor{magenta2}{rgb:Hsb}{300,0.67,0.37}
- \definecolor{magenta3}{rgb:Hsb}{300,0.67,0.49}
- \definecolor{magenta4}{rgb:Hsb}{300,0.67,0.61}
- \definecolor{magenta5}{rgb:Hsb}{300,0.67,0.74}
- \definecolor{magenta6}{rgb:Hsb}{300,0.51,0.80}
- \definecolor{magenta7}{rgb:Hsb}{300,0.37,0.84}
- \definecolor{magenta8}{rgb:Hsb}{300,0.24,0.89}
- \definecolor{magenta9}{rgb:Hsb}{300,0.12,0.94}
- \definecolor{purple1}{rgb:Hsb}{330,0.67,0.25}
- \definecolor{purple2}{rgb:Hsb}{330,0.67,0.39}
- \definecolor{purple3}{rgb:Hsb}{330,0.67,0.52}
- \definecolor{purple4}{rgb:Hsb}{330,0.67,0.65}
- \definecolor{purple5}{rgb:Hsb}{330,0.63,0.76}
- \definecolor{purple6}{rgb:Hsb}{330,0.48,0.81}
- \definecolor{purple7}{rgb:Hsb}{330,0.35,0.85}
- \definecolor{purple8}{rgb:Hsb}{330,0.23,0.90}
- \definecolor{purple9}{rgb:Hsb}{330,0.11,0.95}
-}
+\cs_new_protected_nopar:Npn \__ninecolors_define_colors:n #1
+ {
+ \cs_set_eq:NN \__ninecolors_define_one:nnn \definecolor
+ \use:c { __ninecolors_define_colors_ #1 : }
+ \bool_if:NT \l__ninecolors_define_latex_three_bool
+ {
+ \cs_set_eq:NN \__ninecolors_define_one:nnn \color_set:nnn
+ \use:c { __ninecolors_define_colors_ #1 : }
+ }
+ }
-\@namedef{ninecolors@define@color@medium}{%
- \definecolor{red1}{rgb:Hsb}{0,0.79,0.28}
- \definecolor{red2}{rgb:Hsb}{0,0.79,0.44}
- \definecolor{red3}{rgb:Hsb}{0,0.79,0.58}
- \definecolor{red4}{rgb:Hsb}{0,0.79,0.72}
- \definecolor{red5}{rgb:Hsb}{0,0.72,0.84}
- \definecolor{red6}{rgb:Hsb}{0,0.54,0.87}
- \definecolor{red7}{rgb:Hsb}{0,0.40,0.90}
- \definecolor{red8}{rgb:Hsb}{0,0.26,0.93}
- \definecolor{red9}{rgb:Hsb}{0,0.13,0.97}
- \definecolor{brown1}{rgb:Hsb}{30,0.79,0.21}
- \definecolor{brown2}{rgb:Hsb}{30,0.79,0.33}
- \definecolor{brown3}{rgb:Hsb}{30,0.79,0.43}
- \definecolor{brown4}{rgb:Hsb}{30,0.79,0.54}
- \definecolor{brown5}{rgb:Hsb}{30,0.79,0.66}
- \definecolor{brown6}{rgb:Hsb}{30,0.79,0.78}
- \definecolor{brown7}{rgb:Hsb}{30,0.63,0.86}
- \definecolor{brown8}{rgb:Hsb}{30,0.41,0.90}
- \definecolor{brown9}{rgb:Hsb}{30,0.20,0.95}
- \definecolor{yellow1}{rgb:Hsb}{60,0.79,0.15}
- \definecolor{yellow2}{rgb:Hsb}{60,0.79,0.23}
- \definecolor{yellow3}{rgb:Hsb}{60,0.79,0.31}
- \definecolor{yellow4}{rgb:Hsb}{60,0.79,0.39}
- \definecolor{yellow5}{rgb:Hsb}{60,0.79,0.48}
- \definecolor{yellow6}{rgb:Hsb}{60,0.79,0.57}
- \definecolor{yellow7}{rgb:Hsb}{60,0.79,0.66}
- \definecolor{yellow8}{rgb:Hsb}{60,0.79,0.77}
- \definecolor{yellow9}{rgb:Hsb}{60,0.46,0.89}
- \definecolor{olive1}{rgb:Hsb}{90,0.79,0.16}
- \definecolor{olive2}{rgb:Hsb}{90,0.79,0.25}
- \definecolor{olive3}{rgb:Hsb}{90,0.79,0.34}
- \definecolor{olive4}{rgb:Hsb}{90,0.79,0.42}
- \definecolor{olive5}{rgb:Hsb}{90,0.79,0.51}
- \definecolor{olive6}{rgb:Hsb}{90,0.79,0.61}
- \definecolor{olive7}{rgb:Hsb}{90,0.79,0.72}
- \definecolor{olive8}{rgb:Hsb}{90,0.76,0.83}
- \definecolor{olive9}{rgb:Hsb}{90,0.34,0.92}
- \definecolor{green1}{rgb:Hsb}{120,0.79,0.17}
- \definecolor{green2}{rgb:Hsb}{120,0.79,0.26}
- \definecolor{green3}{rgb:Hsb}{120,0.79,0.35}
- \definecolor{green4}{rgb:Hsb}{120,0.79,0.44}
- \definecolor{green5}{rgb:Hsb}{120,0.79,0.53}
- \definecolor{green6}{rgb:Hsb}{120,0.79,0.63}
- \definecolor{green7}{rgb:Hsb}{120,0.79,0.74}
- \definecolor{green8}{rgb:Hsb}{120,0.64,0.85}
- \definecolor{green9}{rgb:Hsb}{120,0.28,0.93}
- \definecolor{teal1}{rgb:Hsb}{150,0.79,0.16}
- \definecolor{teal2}{rgb:Hsb}{150,0.79,0.26}
- \definecolor{teal3}{rgb:Hsb}{150,0.79,0.35}
- \definecolor{teal4}{rgb:Hsb}{150,0.79,0.43}
- \definecolor{teal5}{rgb:Hsb}{150,0.79,0.53}
- \definecolor{teal6}{rgb:Hsb}{150,0.79,0.62}
- \definecolor{teal7}{rgb:Hsb}{150,0.79,0.73}
- \definecolor{teal8}{rgb:Hsb}{150,0.68,0.85}
- \definecolor{teal9}{rgb:Hsb}{150,0.30,0.93}
- \definecolor{cyan1}{rgb:Hsb}{180,0.79,0.16}
- \definecolor{cyan2}{rgb:Hsb}{180,0.79,0.25}
- \definecolor{cyan3}{rgb:Hsb}{180,0.79,0.34}
- \definecolor{cyan4}{rgb:Hsb}{180,0.79,0.42}
- \definecolor{cyan5}{rgb:Hsb}{180,0.79,0.51}
- \definecolor{cyan6}{rgb:Hsb}{180,0.79,0.61}
- \definecolor{cyan7}{rgb:Hsb}{180,0.79,0.71}
- \definecolor{cyan8}{rgb:Hsb}{180,0.77,0.83}
- \definecolor{cyan9}{rgb:Hsb}{180,0.32,0.92}
- \definecolor{azure1}{rgb:Hsb}{210,0.79,0.24}
- \definecolor{azure2}{rgb:Hsb}{210,0.79,0.38}
- \definecolor{azure3}{rgb:Hsb}{210,0.79,0.51}
- \definecolor{azure4}{rgb:Hsb}{210,0.79,0.64}
- \definecolor{azure5}{rgb:Hsb}{210,0.79,0.77}
- \definecolor{azure6}{rgb:Hsb}{210,0.67,0.85}
- \definecolor{azure7}{rgb:Hsb}{210,0.50,0.88}
- \definecolor{azure8}{rgb:Hsb}{210,0.33,0.92}
- \definecolor{azure9}{rgb:Hsb}{210,0.17,0.96}
- \definecolor{blue1}{rgb:Hsb}{240,0.79,0.41}
- \definecolor{blue2}{rgb:Hsb}{240,0.79,0.64}
- \definecolor{blue3}{rgb:Hsb}{240,0.77,0.83}
- \definecolor{blue4}{rgb:Hsb}{240,0.65,0.85}
- \definecolor{blue5}{rgb:Hsb}{240,0.54,0.87}
- \definecolor{blue6}{rgb:Hsb}{240,0.43,0.90}
- \definecolor{blue7}{rgb:Hsb}{240,0.33,0.92}
- \definecolor{blue8}{rgb:Hsb}{240,0.22,0.94}
- \definecolor{blue9}{rgb:Hsb}{240,0.11,0.97}
- \definecolor{violet1}{rgb:Hsb}{270,0.79,0.33}
- \definecolor{violet2}{rgb:Hsb}{270,0.79,0.52}
- \definecolor{violet3}{rgb:Hsb}{270,0.79,0.69}
- \definecolor{violet4}{rgb:Hsb}{270,0.76,0.83}
- \definecolor{violet5}{rgb:Hsb}{270,0.62,0.86}
- \definecolor{violet6}{rgb:Hsb}{270,0.49,0.88}
- \definecolor{violet7}{rgb:Hsb}{270,0.37,0.91}
- \definecolor{violet8}{rgb:Hsb}{270,0.25,0.94}
- \definecolor{violet9}{rgb:Hsb}{270,0.13,0.97}
- \definecolor{magenta1}{rgb:Hsb}{300,0.79,0.25}
- \definecolor{magenta2}{rgb:Hsb}{300,0.79,0.39}
- \definecolor{magenta3}{rgb:Hsb}{300,0.79,0.52}
- \definecolor{magenta4}{rgb:Hsb}{300,0.79,0.65}
- \definecolor{magenta5}{rgb:Hsb}{300,0.79,0.78}
- \definecolor{magenta6}{rgb:Hsb}{300,0.62,0.86}
- \definecolor{magenta7}{rgb:Hsb}{300,0.44,0.89}
- \definecolor{magenta8}{rgb:Hsb}{300,0.29,0.93}
- \definecolor{magenta9}{rgb:Hsb}{300,0.14,0.96}
- \definecolor{purple1}{rgb:Hsb}{330,0.79,0.27}
- \definecolor{purple2}{rgb:Hsb}{330,0.79,0.42}
- \definecolor{purple3}{rgb:Hsb}{330,0.79,0.56}
- \definecolor{purple4}{rgb:Hsb}{330,0.79,0.70}
- \definecolor{purple5}{rgb:Hsb}{330,0.76,0.83}
- \definecolor{purple6}{rgb:Hsb}{330,0.57,0.87}
- \definecolor{purple7}{rgb:Hsb}{330,0.42,0.90}
- \definecolor{purple8}{rgb:Hsb}{330,0.27,0.93}
- \definecolor{purple9}{rgb:Hsb}{330,0.14,0.96}
-}
+\__ninecolors_define_colors:n { mono }
+\__ninecolors_define_colors:n { medium }
-\@namedef{ninecolors@define@color@high}{%
- \definecolor{red1}{rgb:Hsb}{0,0.89,0.30}
- \definecolor{red2}{rgb:Hsb}{0,0.89,0.46}
- \definecolor{red3}{rgb:Hsb}{0,0.89,0.61}
- \definecolor{red4}{rgb:Hsb}{0,0.89,0.76}
- \definecolor{red5}{rgb:Hsb}{0,0.87,0.90}
- \definecolor{red6}{rgb:Hsb}{0,0.62,0.93}
- \definecolor{red7}{rgb:Hsb}{0,0.45,0.95}
- \definecolor{red8}{rgb:Hsb}{0,0.30,0.96}
- \definecolor{red9}{rgb:Hsb}{0,0.15,0.98}
- \definecolor{brown1}{rgb:Hsb}{30,0.89,0.22}
- \definecolor{brown2}{rgb:Hsb}{30,0.89,0.34}
- \definecolor{brown3}{rgb:Hsb}{30,0.89,0.46}
- \definecolor{brown4}{rgb:Hsb}{30,0.89,0.57}
- \definecolor{brown5}{rgb:Hsb}{30,0.89,0.69}
- \definecolor{brown6}{rgb:Hsb}{30,0.89,0.82}
- \definecolor{brown7}{rgb:Hsb}{30,0.77,0.91}
- \definecolor{brown8}{rgb:Hsb}{30,0.51,0.94}
- \definecolor{brown9}{rgb:Hsb}{30,0.25,0.97}
- \definecolor{yellow1}{rgb:Hsb}{60,0.89,0.15}
- \definecolor{yellow2}{rgb:Hsb}{60,0.89,0.23}
- \definecolor{yellow3}{rgb:Hsb}{60,0.89,0.31}
- \definecolor{yellow4}{rgb:Hsb}{60,0.89,0.39}
- \definecolor{yellow5}{rgb:Hsb}{60,0.89,0.48}
- \definecolor{yellow6}{rgb:Hsb}{60,0.89,0.57}
- \definecolor{yellow7}{rgb:Hsb}{60,0.89,0.66}
- \definecolor{yellow8}{rgb:Hsb}{60,0.89,0.77}
- \definecolor{yellow9}{rgb:Hsb}{60,0.89,0.90}
- \definecolor{olive1}{rgb:Hsb}{90,0.89,0.16}
- \definecolor{olive2}{rgb:Hsb}{90,0.89,0.26}
- \definecolor{olive3}{rgb:Hsb}{90,0.89,0.34}
- \definecolor{olive4}{rgb:Hsb}{90,0.89,0.43}
- \definecolor{olive5}{rgb:Hsb}{90,0.89,0.52}
- \definecolor{olive6}{rgb:Hsb}{90,0.89,0.61}
- \definecolor{olive7}{rgb:Hsb}{90,0.89,0.72}
- \definecolor{olive8}{rgb:Hsb}{90,0.89,0.84}
- \definecolor{olive9}{rgb:Hsb}{90,0.52,0.94}
- \definecolor{green1}{rgb:Hsb}{120,0.89,0.17}
- \definecolor{green2}{rgb:Hsb}{120,0.89,0.27}
- \definecolor{green3}{rgb:Hsb}{120,0.89,0.35}
- \definecolor{green4}{rgb:Hsb}{120,0.89,0.44}
- \definecolor{green5}{rgb:Hsb}{120,0.89,0.54}
- \definecolor{green6}{rgb:Hsb}{120,0.89,0.64}
- \definecolor{green7}{rgb:Hsb}{120,0.89,0.75}
- \definecolor{green8}{rgb:Hsb}{120,0.89,0.87}
- \definecolor{green9}{rgb:Hsb}{120,0.39,0.95}
- \definecolor{teal1}{rgb:Hsb}{150,0.89,0.17}
- \definecolor{teal2}{rgb:Hsb}{150,0.89,0.26}
- \definecolor{teal3}{rgb:Hsb}{150,0.89,0.35}
- \definecolor{teal4}{rgb:Hsb}{150,0.89,0.44}
- \definecolor{teal5}{rgb:Hsb}{150,0.89,0.53}
- \definecolor{teal6}{rgb:Hsb}{150,0.89,0.63}
- \definecolor{teal7}{rgb:Hsb}{150,0.89,0.74}
- \definecolor{teal8}{rgb:Hsb}{150,0.89,0.86}
- \definecolor{teal9}{rgb:Hsb}{150,0.43,0.95}
- \definecolor{cyan1}{rgb:Hsb}{180,0.89,0.16}
- \definecolor{cyan2}{rgb:Hsb}{180,0.89,0.25}
- \definecolor{cyan3}{rgb:Hsb}{180,0.89,0.34}
- \definecolor{cyan4}{rgb:Hsb}{180,0.89,0.42}
- \definecolor{cyan5}{rgb:Hsb}{180,0.89,0.51}
- \definecolor{cyan6}{rgb:Hsb}{180,0.89,0.61}
- \definecolor{cyan7}{rgb:Hsb}{180,0.89,0.71}
- \definecolor{cyan8}{rgb:Hsb}{180,0.89,0.83}
- \definecolor{cyan9}{rgb:Hsb}{180,0.50,0.94}
- \definecolor{azure1}{rgb:Hsb}{210,0.89,0.26}
- \definecolor{azure2}{rgb:Hsb}{210,0.89,0.41}
- \definecolor{azure3}{rgb:Hsb}{210,0.89,0.55}
- \definecolor{azure4}{rgb:Hsb}{210,0.89,0.69}
- \definecolor{azure5}{rgb:Hsb}{210,0.89,0.83}
- \definecolor{azure6}{rgb:Hsb}{210,0.77,0.91}
- \definecolor{azure7}{rgb:Hsb}{210,0.58,0.93}
- \definecolor{azure8}{rgb:Hsb}{210,0.39,0.95}
- \definecolor{azure9}{rgb:Hsb}{210,0.20,0.98}
- \definecolor{blue1}{rgb:Hsb}{240,0.89,0.48}
- \definecolor{blue2}{rgb:Hsb}{240,0.89,0.73}
- \definecolor{blue3}{rgb:Hsb}{240,0.84,0.90}
- \definecolor{blue4}{rgb:Hsb}{240,0.70,0.92}
- \definecolor{blue5}{rgb:Hsb}{240,0.58,0.93}
- \definecolor{blue6}{rgb:Hsb}{240,0.47,0.94}
- \definecolor{blue7}{rgb:Hsb}{240,0.36,0.96}
- \definecolor{blue8}{rgb:Hsb}{240,0.25,0.97}
- \definecolor{blue9}{rgb:Hsb}{240,0.13,0.98}
- \definecolor{violet1}{rgb:Hsb}{270,0.89,0.37}
- \definecolor{violet2}{rgb:Hsb}{270,0.89,0.57}
- \definecolor{violet3}{rgb:Hsb}{270,0.89,0.75}
- \definecolor{violet4}{rgb:Hsb}{270,0.85,0.90}
- \definecolor{violet5}{rgb:Hsb}{270,0.68,0.92}
- \definecolor{violet6}{rgb:Hsb}{270,0.54,0.94}
- \definecolor{violet7}{rgb:Hsb}{270,0.41,0.95}
- \definecolor{violet8}{rgb:Hsb}{270,0.28,0.97}
- \definecolor{violet9}{rgb:Hsb}{270,0.14,0.98}
- \definecolor{magenta1}{rgb:Hsb}{300,0.89,0.26}
- \definecolor{magenta2}{rgb:Hsb}{300,0.89,0.41}
- \definecolor{magenta3}{rgb:Hsb}{300,0.89,0.54}
- \definecolor{magenta4}{rgb:Hsb}{300,0.89,0.67}
- \definecolor{magenta5}{rgb:Hsb}{300,0.89,0.80}
- \definecolor{magenta6}{rgb:Hsb}{300,0.76,0.91}
- \definecolor{magenta7}{rgb:Hsb}{300,0.52,0.94}
- \definecolor{magenta8}{rgb:Hsb}{300,0.33,0.96}
- \definecolor{magenta9}{rgb:Hsb}{300,0.17,0.98}
- \definecolor{purple1}{rgb:Hsb}{330,0.89,0.29}
- \definecolor{purple2}{rgb:Hsb}{330,0.89,0.45}
- \definecolor{purple3}{rgb:Hsb}{330,0.89,0.59}
- \definecolor{purple4}{rgb:Hsb}{330,0.89,0.73}
- \definecolor{purple5}{rgb:Hsb}{330,0.89,0.88}
- \definecolor{purple6}{rgb:Hsb}{330,0.66,0.92}
- \definecolor{purple7}{rgb:Hsb}{330,0.47,0.94}
- \definecolor{purple8}{rgb:Hsb}{330,0.31,0.96}
- \definecolor{purple9}{rgb:Hsb}{330,0.16,0.98}
-}
+\tl_new:N \l__ninecolors_sat_tl
-\@nameuse{ninecolors@define@mono}
-\@nameuse{ninecolors@define@color@medium}
+\keys_define:nn {ninecolors}
+ {
+ saturation .choice:,
+ saturation .value_required:n = true,
+ saturation .choices:nn = { low, medium, high }
+ { \tl_set_eq:NN \l__ninecolors_sat_tl \l_keys_choice_tl },
+ saturation .initial:n = medium,
+ }
-\ExplSyntaxOff
+\NewDocumentCommand \NineColors {m}
+ {
+ \keys_set:nn {ninecolors} {#1}
+ \exp_args:NV \__ninecolors_define_colors:n \l__ninecolors_sat_tl
+ }
diff --git a/macros/latex/contrib/ninecolors/ninecolors.tex b/macros/latex/contrib/ninecolors/ninecolors.tex
index 675cb08beb..65e1aec6f8 100644
--- a/macros/latex/contrib/ninecolors/ninecolors.tex
+++ b/macros/latex/contrib/ninecolors/ninecolors.tex
@@ -2,72 +2,48 @@
\documentclass{article}
\usepackage[a4paper,margin=1.5cm]{geometry}
+\newcommand*{\myversion}{2022D}
+\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
+\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
+
\usepackage{ninecolors}
\usepackage{arev}
\usepackage{pgffor}
+\usepackage{l3draw}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
urlcolor=blue3,
}
-\newcommand*{\myversion}{2021C}
-\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
-\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
-
-\begin{document}
-
-\title{\textcolor{blue3}{Ninecolors: select colors with proper WCAG color contrast}%
- \footnote{\url{https://github.com/lvjr/ninecolors}}}
-\author{Jianrui Lyu (tolvjr@163.com)}
-\date{\mydate}
-\maketitle
-
-\textcolor{red4}{Ninecolors} package carefully selects and defines 9 colors for 13 hues each.
-All colors with the same suffix number have equal luminance level.
-Also color black is of level 0, and color white is of level 10.
-
-\bigskip
+\setlength{\parindent}{0pt}
+%\setlength{\parskip}{4pt plus 1pt minus 1pt}
-\newcommand{\NineTestBack}{%
+\newcommand\NineTestBack{%
\foreach \l in {1,...,9}
{
\noindent
\foreach \n in {gray,red,brown,yellow,olive,green,teal,cyan,azure,blue,violet,magenta,purple}
{%
\xdef\mycolor{\ifnum \l < 5 white\else black\fi}%
- \colorbox{\n\l}{\color{\mycolor}\texttt\strut\n\l}%
+ \colorbox{\n\l}{\color{\mycolor}\strut\n\l}%
}
\par
}}
-\NineTestBack
-
-\bigskip
-\newcommand{\NineTestFore}{%
+\newcommand\NineTestFore{%
\foreach \l in {1,...,9}
{
\noindent
\foreach \n in {gray,red,brown,yellow,olive,green,teal,cyan,azure,blue,violet,magenta,purple}
{%
\xdef\mycolor{\ifnum \l < 5 gray9\else black\fi}%
- \colorbox{\mycolor}{\color{\n\l}\texttt\strut\n\l}%
+ \colorbox{\mycolor}{\color{\n\l}\strut\n\l}%
}
\par
}}
-\NineTestFore
-
-\bigskip
-\hrule
-\bigskip
-
-By simply choosing two colors in the above list, which differ in level by at least 5,
-as foreground and background colors, you will get proper
-\href{https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html}{WCAG Color Contrast}.
-
-\bigskip
-\newcommand{\NineTestContrast}{%
+\newcommand\NineTestContrast{%
\colorbox{blue9}{%
\strut\color{green3}The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
}
@@ -83,22 +59,107 @@ as foreground and background colors, you will get proper
\colorbox{brown3}{%
\strut\color{violet9}The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
}}
-\NineTestContrast
+
+\newcommand\NineTestSaturation[1]{{%
+ \NineColors{saturation=#1}
+ \noindent\centering
+ \colorbox{white}{\makebox[4em]{\strut #1}}%
+ \foreach \n in {red,brown,yellow,olive,green,teal,cyan,azure,blue,violet,magenta,purple}
+ {%
+ \colorbox{\n5}{\makebox[3em]{\strut\rule[-2ex]{0pt}{5.5ex}TEST}}%
+ }
+ \par
+}}
+
+\newcommand\NineTestAllSaturations{%
+ \NineTestSaturation{high}%
+ \NineTestSaturation{medium}%
+ \NineTestSaturation{low}%
+}
+
+\ExplSyntaxOn
+
+\cs_generate_variant:Nn \color_fill:n { x }
+\cs_generate_variant:Nn \color_stroke:n { x }
+
+\newcommand\NineTestDraw{
+ \foreach \l [evaluate=\l~as~\m~using~int(10-\l)] in {1,...,9}
+ {
+ \noindent
+ \foreach \n in {gray,red,brown,yellow,olive,green,teal,
+ cyan,azure,blue,violet,magenta,purple}
+ {
+ \draw_begin:
+ \draw_scope_begin:
+ \color_stroke:x { \n\m }
+ \color_fill:x { \n\l }
+ \draw_path_circle:nn { 0, 0 } { 10pt }
+ \draw_path_use_clear:n { stroke, fill }
+ \draw_scope_end:
+ \draw_end:
+ \qquad
+ }
+ \par
+ \vspace*{0.5ex}
+ }
+}
+
+\ExplSyntaxOff
+
+\begin{document}
+
+\title{\textcolor{blue3}{Ninecolors: Select Colors with Proper WCAG Color Contrast}%
+ \footnote{\url{https://github.com/lvjr/ninecolors}}}
+\author{Jianrui Lyu (tolvjr@163.com) \\ Nan Geng (nangeng@nwafu.edu.cn)}
+\date{\mydate}
+\maketitle
+
+\section{LaTeX2 Colors with Medium Saturation}
+
+\textcolor{red4}{Ninecolors} package carefully selects and defines 9 colors for 13 hues each.
+All colors with the same suffix number have equal luminance level.
+Also color black is of level 0, and color white is of level 10.
+
+\bigskip
+
+\NineTestBack
+
+\medskip
+
+\NineTestFore
+
+\bigskip
+
+By simply choosing two colors in the above list, which differ in level by at least 5,
+as foreground and background colors, you will get proper
+\href{https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html}{WCAG Color Contrast}.
\bigskip
-\hrule
+
+\NineTestContrast
+
\bigskip
If you need to select more contrasting foreground and background colors, which may have other hues,
you could visit \href{https://lvjr.bitbucket.io/contrast.html}{WCAG Color Contrast Tool}
-page which is designed by the author.
+page which is designed by the first author.
-\newpage\vspace*{31mm}
-\NineColors{saturation=low}
+\newpage
+
+\section{LaTeX2 Colors with Low Saturation}
You can change the saturation of colors by {\color{red3}\verb!\NineColors!} command.
By default {\color{red3}\verb!saturation=medium!}.
-Colors in this page have been changed by {\color{red3}\verb!\NineColors{saturation=low}!}.
+
+\bigskip
+
+\NineTestAllSaturations
+
+\bigskip
+
+\NineColors{saturation=low}
+Colors in the remaining part of the page have been changed by
+{\color{red3}\verb!\NineColors{saturation=low}!}.
\bigskip
@@ -110,13 +171,11 @@ Also color black is of level 0, and color white is of level 10.
\NineTestBack
-\bigskip
+\medskip
\NineTestFore
\bigskip
-\hrule
-\bigskip
By simply choosing two colors in the above list, which differ in level by at least 5,
as foreground and background colors, you will get proper
@@ -127,19 +186,27 @@ as foreground and background colors, you will get proper
\NineTestContrast
\bigskip
-\hrule
-\bigskip
If you need to select more contrasting foreground and background colors, which may have other hues,
you could visit \href{https://lvjr.bitbucket.io/contrast.html}{WCAG Color Contrast Tool}
-page which is designed by the author.
+page which is designed by the first author.
-\newpage\vspace*{31mm}
-\NineColors{saturation=high}
+\newpage
+
+\section{LaTeX2 Colors with High Saturation}
You can change the saturation of colors by {\color{red3}\verb!\NineColors!} command.
By default {\color{red3}\verb!saturation=medium!}.
-Colors in this page have been changed by {\color{red3}\verb!\NineColors{saturation=high}!}.
+
+\bigskip
+
+\NineTestAllSaturations
+
+\bigskip
+
+\NineColors{saturation=high}
+Colors in the remaining part of the page have been changed by
+{\color{red3}\verb!\NineColors{saturation=high}!}.
\bigskip
@@ -151,13 +218,11 @@ Also color black is of level 0, and color white is of level 10.
\NineTestBack
-\bigskip
+\medskip
\NineTestFore
\bigskip
-\hrule
-\bigskip
By simply choosing two colors in the above list, which differ in level by at least 5,
as foreground and background colors, you will get proper
@@ -168,11 +233,32 @@ as foreground and background colors, you will get proper
\NineTestContrast
\bigskip
-\hrule
-\bigskip
If you need to select more contrasting foreground and background colors, which may have other hues,
you could visit \href{https://lvjr.bitbucket.io/contrast.html}{WCAG Color Contrast Tool}
-page which is designed by the author.
+page which is designed by the first author.
+
+\newpage
+
+\section{LaTeX3 Colors for Fun}
+
+\NineColors{saturation=medium}
+
+If you are using a LaTeX3 release not older than 2021-07-12,
+\textcolor{red4}{Ninecolors} package will define LaTeX3 colors of the same names for you.
+
+\bigskip
+
+For example, you can change the color of drawing operations by
+{\color{red3}\verb!\color_fill:n {⟨color expression⟩}!} command
+for fills,
+{\color{red3}\verb!\color_stroke:n {⟨color expression⟩}!} command
+for strokes.
+%between {\color{red3}\verb!\ExplSyntaxOn!} and
+%{\color{red3}\verb!\ExplSyntaxOff!}.
+
+\bigskip
+
+\NineTestDraw
\end{document}