summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-17 03:03:06 +0000
committerNorbert Preining <norbert@preining.info>2022-01-17 03:03:06 +0000
commita98801f61d66bae07d8786d2891bed0bece7d96e (patch)
treeeaeffebf1cb88d5521feddcf6370007a42de9611
parenta574e957682cad50981ddb567c2a106213dc8672 (diff)
CTAN sync 202201170303
-rw-r--r--CTAN.sites15
-rw-r--r--FILES.byname495
-rw-r--r--FILES.byname.gzbin2412723 -> 2412327 bytes
-rw-r--r--FILES.last07days655
-rw-r--r--macros/latex/contrib/chemmacros/README34
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.cls383
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.pdfbin996938 -> 1014895 bytes
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros-manual.tex1665
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.history397
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.acid-base.code.tex167
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.all.code.tex75
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.base.code.tex487
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.charges.code.tex157
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.chemformula.code.tex243
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.errorcheck.code.tex130
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.greek.code.tex70
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.isotopes.code.tex238
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.lang.code.tex177
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.mechanisms.code.tex165
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.newman.code.tex212
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.nomenclature.code.tex978
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.orbital.code.tex576
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.particles.code.tex141
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.phases.code.tex140
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.polymers.code.tex182
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.reactions.code.tex445
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.redox.code.tex458
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.scheme.code.tex333
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.spectroscopy.code.tex515
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.symbols.code.tex89
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.thermodynamics.code.tex147
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.tikz.code.tex187
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.units.code.tex68
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.module.xfrac.code.tex137
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros.sty6802
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros4.sty4100
-rw-r--r--macros/latex/contrib/chemmacros/chemmacros5.sty330
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx55
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin594993 -> 595578 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex32
-rw-r--r--systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl2
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb160
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.md52
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha5122
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc14
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.xzbin2338904 -> 2340064 bytes
-rw-r--r--systems/win32/miktex/tm/packages/next/pr.ini8
-rw-r--r--systems/win32/miktex/tm/packages/pr.ini8
-rw-r--r--timestamp2
49 files changed, 8147 insertions, 13531 deletions
diff --git a/CTAN.sites b/CTAN.sites
index d46e6497f6..87eff8e698 100644
--- a/CTAN.sites
+++ b/CTAN.sites
@@ -101,6 +101,9 @@ by country):
mirror.unpad.ac.id (Indonesia)
URL: https://mirror.unpad.ac.id/ctan/
+ repo.ugm.ac.id (Indonesia)
+ URL: http://repo.ugm.ac.id/ctan/
+
ctan.asis.ai (Iran)
URL: rsync://ctan.asis.ai/ctan/
@@ -316,10 +319,6 @@ by country):
URL: rsync://packages.oth-regensburg.de/ctan/
URL: https://packages.oth-regensburg.de/ctan/
- sendinnsky.selfhost.co (Germany)
- URL: ftp://sendinnsky.selfhost.co/
- URL: http://sendinnsky.selfhost.co/tex-archive/
-
sunsite.informatik.rwth-aachen.de (Germany)
URL: ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/ctan/
URL: http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/
@@ -357,10 +356,6 @@ by country):
ctan.gust.org.pl (Poland)
URL: https://ctan.gust.org.pl/tex-archive/
- ctan.mirrors.tworzy.net (Poland)
- URL: http://ctan.mirrors.tworzy.net/
- URL: https://ctan.mirrors.tworzy.net/
-
repo.skni.umcs.pl (Poland)
URL: https://repo.skni.umcs.pl/ctan/
URL: http://repo.skni.umcs.pl/ctan/
@@ -486,10 +481,6 @@ by country):
URL: http://ctan.mirror.rafal.ca/
URL: https://ctan.mirror.rafal.ca/
- mirror.0xem.ma (Canada)
- URL: http://mirror.0xem.ma/tex-archive/
- URL: https://mirror.0xem.ma/tex-archive/
-
mirror.csclub.uwaterloo.ca (Canada)
URL: ftp://mirror.csclub.uwaterloo.ca/CTAN/
URL: http://mirror.csclub.uwaterloo.ca/CTAN/
diff --git a/FILES.byname b/FILES.byname
index d525431172..8d0bf71ab6 100644
--- a/FILES.byname
+++ b/FILES.byname
@@ -5108,7 +5108,7 @@
1990/10/02 | 5440 | dviware/vutex/vaxvms.hlp
1990/10/02 | 812 | dviware/vutex/vaxvms.ins
1990/10/02 | 127576 | dviware/vutex/vutex.web
-2022/01/15 | 187488 | FILES.last07days
+2022/01/16 | 184134 | FILES.last07days
2021/07/24 | 1139410 | fonts/aboensis/Aboensis.glyphs
2021/07/24 | 18907382 | fonts/aboensis/aboensis.pdf
2021/07/24 | 137860 | fonts/aboensis/Aboensis-Regular.otf
@@ -197272,7 +197272,7 @@
2013/04/01 | 14776 | macros/context/contrib/context-visualcounter/tex/context/third/visualcounter/t-visualcounter.mkvi
2018/03/05 | 11 | macros/context/contrib/context-visualcounter/VERSION
2018/03/22 | 276789 | macros/context/contrib/context-visualcounter.zip
-2022/01/10 | 118034978 | macros/context/latest/cont-tmf.zip
+2022/01/15 | 118179445 | macros/context/latest/cont-tmf.zip
2016/04/21 | 32846 | macros/cstex/base/cmexb.tar.gz
2016/06/26 | 1728262 | macros/cstex/base/csfonts-t1.tar.gz
2007/03/01 | 187106 | macros/cstex/base/csfonts.tar.gz
@@ -205943,40 +205943,11 @@
2020/01/16 | 47530 | macros/latex/contrib/chemgreek/chemgreek.sty
2020/01/16 | 1374 | macros/latex/contrib/chemgreek/README
2020/01/16 | 721642 | macros/latex/contrib/chemgreek.zip
-2020/11/22 | 135526 | macros/latex/contrib/chemmacros/chemmacros4.sty
-2020/11/22 | 10594 | macros/latex/contrib/chemmacros/chemmacros5.sty
-2020/11/22 | 25122 | macros/latex/contrib/chemmacros/chemmacros.history
-2020/11/22 | 12893 | macros/latex/contrib/chemmacros/chemmacros-manual.cls
-2020/11/22 | 996938 | macros/latex/contrib/chemmacros/chemmacros-manual.pdf
-2020/11/22 | 148746 | macros/latex/contrib/chemmacros/chemmacros-manual.tex
-2020/11/22 | 5439 | macros/latex/contrib/chemmacros/chemmacros.module.acid-base.code.tex
-2020/11/22 | 2413 | macros/latex/contrib/chemmacros/chemmacros.module.all.code.tex
-2020/11/22 | 14647 | macros/latex/contrib/chemmacros/chemmacros.module.base.code.tex
-2020/11/22 | 5864 | macros/latex/contrib/chemmacros/chemmacros.module.charges.code.tex
-2020/11/22 | 9371 | macros/latex/contrib/chemmacros/chemmacros.module.chemformula.code.tex
-2020/11/22 | 4764 | macros/latex/contrib/chemmacros/chemmacros.module.errorcheck.code.tex
-2020/11/22 | 2657 | macros/latex/contrib/chemmacros/chemmacros.module.greek.code.tex
-2020/11/22 | 8003 | macros/latex/contrib/chemmacros/chemmacros.module.isotopes.code.tex
-2020/11/22 | 6265 | macros/latex/contrib/chemmacros/chemmacros.module.lang.code.tex
-2020/11/22 | 4890 | macros/latex/contrib/chemmacros/chemmacros.module.mechanisms.code.tex
-2020/11/22 | 7294 | macros/latex/contrib/chemmacros/chemmacros.module.newman.code.tex
-2020/11/22 | 30362 | macros/latex/contrib/chemmacros/chemmacros.module.nomenclature.code.tex
-2020/11/22 | 21350 | macros/latex/contrib/chemmacros/chemmacros.module.orbital.code.tex
-2020/11/22 | 4612 | macros/latex/contrib/chemmacros/chemmacros.module.particles.code.tex
-2020/11/22 | 4562 | macros/latex/contrib/chemmacros/chemmacros.module.phases.code.tex
-2020/11/22 | 6226 | macros/latex/contrib/chemmacros/chemmacros.module.polymers.code.tex
-2020/11/22 | 14384 | macros/latex/contrib/chemmacros/chemmacros.module.reactions.code.tex
-2020/11/22 | 15398 | macros/latex/contrib/chemmacros/chemmacros.module.redox.code.tex
-2020/11/22 | 11011 | macros/latex/contrib/chemmacros/chemmacros.module.scheme.code.tex
-2020/11/22 | 18793 | macros/latex/contrib/chemmacros/chemmacros.module.spectroscopy.code.tex
-2020/11/22 | 3002 | macros/latex/contrib/chemmacros/chemmacros.module.symbols.code.tex
-2020/11/22 | 6070 | macros/latex/contrib/chemmacros/chemmacros.module.thermodynamics.code.tex
-2020/11/22 | 6325 | macros/latex/contrib/chemmacros/chemmacros.module.tikz.code.tex
-2020/11/22 | 2332 | macros/latex/contrib/chemmacros/chemmacros.module.units.code.tex
-2020/11/22 | 4288 | macros/latex/contrib/chemmacros/chemmacros.module.xfrac.code.tex
-2020/11/22 | 8424 | macros/latex/contrib/chemmacros/chemmacros.sty
-2020/11/22 | 2542 | macros/latex/contrib/chemmacros/README
-2020/11/22 | 1111749 | macros/latex/contrib/chemmacros.zip
+2022/01/16 | 1014895 | macros/latex/contrib/chemmacros/chemmacros-manual.pdf
+2022/01/16 | 155017 | macros/latex/contrib/chemmacros/chemmacros-manual.tex
+2022/01/16 | 222952 | macros/latex/contrib/chemmacros/chemmacros.sty
+2022/01/16 | 1482 | macros/latex/contrib/chemmacros/README
+2022/01/16 | 1072575 | macros/latex/contrib/chemmacros.zip
2021/01/21 | 592375 | macros/latex/contrib/chemnum/chemnum_en.pdf
2021/01/21 | 53463 | macros/latex/contrib/chemnum/chemnum_en.tex
2021/01/21 | 74927 | macros/latex/contrib/chemnum/chemnum.sty
@@ -208633,12 +208604,12 @@
2008/02/10 | 19110 | macros/latex/contrib/ean13isbn/License.txt
2021/01/24 | 422 | macros/latex/contrib/ean13isbn/README
2021/01/24 | 322624 | macros/latex/contrib/ean13isbn.zip
-2022/01/15 | 78474 | macros/latex/contrib/easybook/easybook.dtx
+2022/01/16 | 78696 | macros/latex/contrib/easybook/easybook.dtx
2022/01/02 | 2085 | macros/latex/contrib/easybook/easybook.ins
-2022/01/15 | 594993 | macros/latex/contrib/easybook/easybook.pdf
-2022/01/15 | 82357 | macros/latex/contrib/easybook/easybook.tex
+2022/01/16 | 595578 | macros/latex/contrib/easybook/easybook.pdf
+2022/01/16 | 82639 | macros/latex/contrib/easybook/easybook.tex
2021/11/17 | 795 | macros/latex/contrib/easybook/README.md
-2022/01/15 | 636587 | macros/latex/contrib/easybook.zip
+2022/01/16 | 637256 | macros/latex/contrib/easybook.zip
2009/06/17 | 82589 | macros/latex/contrib/easy/doc/docbib.pdf
2009/06/17 | 78378 | macros/latex/contrib/easy/doc/docbmat.pdf
2009/06/17 | 99132 | macros/latex/contrib/easy/doc/doceqn.pdf
@@ -278915,7 +278886,7 @@
2020/04/22 | 5992 | systems/texlive/tlnet/archive/bearwear.source.r54826.tar.xz
2021/12/18 | 703476 | systems/texlive/tlnet/archive/beaulivre.doc.r61338.tar.xz
2021/12/18 | 3944 | systems/texlive/tlnet/archive/beaulivre.r61338.tar.xz
-2022/01/15 | 883704 | systems/texlive/tlnet/archive/beebe.r61603.tar.xz
+2022/01/16 | 884948 | systems/texlive/tlnet/archive/beebe.r61609.tar.xz
2019/02/28 | 709916 | systems/texlive/tlnet/archive/begingreek.doc.r36294.tar.xz
2019/02/28 | 1664 | systems/texlive/tlnet/archive/begingreek.r36294.tar.xz
2019/02/28 | 7448 | systems/texlive/tlnet/archive/begingreek.source.r36294.tar.xz
@@ -280106,7 +280077,7 @@
2022/01/10 | 1264 | systems/texlive/tlnet/archive/collection-bibtexextra.r61549.tar.xz
2021/12/17 | 956 | systems/texlive/tlnet/archive/collection-binextra.r61328.tar.xz
2020/03/04 | 596 | systems/texlive/tlnet/archive/collection-context.r54074.tar.xz
-2021/11/28 | 1928 | systems/texlive/tlnet/archive/collection-fontsextra.r61165.tar.xz
+2022/01/16 | 1932 | systems/texlive/tlnet/archive/collection-fontsextra.r61613.tar.xz
2020/03/04 | 560 | systems/texlive/tlnet/archive/collection-fontsrecommended.r54074.tar.xz
2021/12/03 | 536 | systems/texlive/tlnet/archive/collection-fontutils.r61207.tar.xz
2020/03/04 | 568 | systems/texlive/tlnet/archive/collection-formatsextra.r54074.tar.xz
@@ -280226,6 +280197,8 @@
2019/02/28 | 266164 | systems/texlive/tlnet/archive/concmath.doc.r17219.tar.xz
2019/02/28 | 2640 | systems/texlive/tlnet/archive/concmath-fonts.doc.r17218.tar.xz
2019/02/28 | 15176 | systems/texlive/tlnet/archive/concmath-fonts.r17218.tar.xz
+2022/01/16 | 1854880 | systems/texlive/tlnet/archive/concmath-otf.doc.r61613.tar.xz
+2022/01/16 | 130408 | systems/texlive/tlnet/archive/concmath-otf.r61613.tar.xz
2019/02/28 | 2176 | systems/texlive/tlnet/archive/concmath.r17219.tar.xz
2019/02/28 | 9604 | systems/texlive/tlnet/archive/concmath.source.r17219.tar.xz
2019/02/28 | 1064 | systems/texlive/tlnet/archive/concprog.doc.r18791.tar.xz
@@ -281475,9 +281448,9 @@
2021/07/19 | 313228 | systems/texlive/tlnet/archive/easing.doc.r59975.tar.xz
2021/07/19 | 2220 | systems/texlive/tlnet/archive/easing.r59975.tar.xz
2021/07/19 | 7876 | systems/texlive/tlnet/archive/easing.source.r59975.tar.xz
-2022/01/15 | 616348 | systems/texlive/tlnet/archive/easybook.doc.r61606.tar.xz
-2022/01/15 | 17076 | systems/texlive/tlnet/archive/easybook.r61606.tar.xz
-2022/01/15 | 17136 | systems/texlive/tlnet/archive/easybook.source.r61606.tar.xz
+2022/01/16 | 616464 | systems/texlive/tlnet/archive/easybook.doc.r61616.tar.xz
+2022/01/16 | 17052 | systems/texlive/tlnet/archive/easybook.r61616.tar.xz
+2022/01/16 | 17112 | systems/texlive/tlnet/archive/easybook.source.r61616.tar.xz
2019/02/28 | 4540 | systems/texlive/tlnet/archive/easy.doc.r19440.tar.xz
2020/09/08 | 175976 | systems/texlive/tlnet/archive/easyfig.doc.r56291.tar.xz
2020/09/08 | 1936 | systems/texlive/tlnet/archive/easyfig.r56291.tar.xz
@@ -282432,9 +282405,9 @@
2021/08/05 | 377600 | systems/texlive/tlnet/archive/fontsize.doc.r60161.tar.xz
2021/08/05 | 4984 | systems/texlive/tlnet/archive/fontsize.r60161.tar.xz
2021/08/05 | 15124 | systems/texlive/tlnet/archive/fontsize.source.r60161.tar.xz
-2020/10/08 | 1189088 | systems/texlive/tlnet/archive/fontspec.doc.r56594.tar.xz
-2020/10/08 | 26788 | systems/texlive/tlnet/archive/fontspec.r56594.tar.xz
-2020/10/08 | 83048 | systems/texlive/tlnet/archive/fontspec.source.r56594.tar.xz
+2022/01/16 | 1221668 | systems/texlive/tlnet/archive/fontspec.doc.r61617.tar.xz
+2022/01/16 | 26664 | systems/texlive/tlnet/archive/fontspec.r61617.tar.xz
+2022/01/16 | 82844 | systems/texlive/tlnet/archive/fontspec.source.r61617.tar.xz
2021/10/21 | 11168 | systems/texlive/tlnet/archive/fonts-tlwg.doc.r60817.tar.xz
2021/10/21 | 5031944 | systems/texlive/tlnet/archive/fonts-tlwg.r60817.tar.xz
2021/10/21 | 7644464 | systems/texlive/tlnet/archive/fonts-tlwg.source.r60817.tar.xz
@@ -283748,11 +283721,11 @@
2019/07/26 | 27900 | systems/texlive/tlnet/archive/kantlipsum.source.r51727.tar.xz
2019/02/28 | 142148 | systems/texlive/tlnet/archive/karnaugh.doc.r21338.tar.xz
2019/02/28 | 323304 | systems/texlive/tlnet/archive/karnaughmap.doc.r36989.tar.xz
-2019/02/28 | 239480 | systems/texlive/tlnet/archive/karnaugh-map.doc.r44131.tar.xz
+2022/01/16 | 287964 | systems/texlive/tlnet/archive/karnaugh-map.doc.r61614.tar.xz
2019/02/28 | 3320 | systems/texlive/tlnet/archive/karnaughmap.r36989.tar.xz
-2019/02/28 | 4836 | systems/texlive/tlnet/archive/karnaugh-map.r44131.tar.xz
+2022/01/16 | 6116 | systems/texlive/tlnet/archive/karnaugh-map.r61614.tar.xz
2019/02/28 | 11192 | systems/texlive/tlnet/archive/karnaughmap.source.r36989.tar.xz
-2019/02/28 | 8056 | systems/texlive/tlnet/archive/karnaugh-map.source.r44131.tar.xz
+2022/01/16 | 9980 | systems/texlive/tlnet/archive/karnaugh-map.source.r61614.tar.xz
2019/02/28 | 4420 | systems/texlive/tlnet/archive/karnaugh.r21338.tar.xz
2019/02/28 | 139420 | systems/texlive/tlnet/archive/kastrup.doc.r15878.tar.xz
2019/02/28 | 1388 | systems/texlive/tlnet/archive/kastrup.r15878.tar.xz
@@ -286068,9 +286041,9 @@
2019/03/21 | 1088508 | systems/texlive/tlnet/archive/njurepo.doc.r50492.tar.xz
2019/03/21 | 10944 | systems/texlive/tlnet/archive/njurepo.r50492.tar.xz
2019/03/21 | 21544 | systems/texlive/tlnet/archive/njurepo.source.r50492.tar.xz
-2021/12/14 | 857040 | systems/texlive/tlnet/archive/njuthesis.doc.r61293.tar.xz
-2021/12/14 | 9812 | systems/texlive/tlnet/archive/njuthesis.r61293.tar.xz
-2021/12/14 | 31848 | systems/texlive/tlnet/archive/njuthesis.source.r61293.tar.xz
+2022/01/16 | 1060088 | systems/texlive/tlnet/archive/njuthesis.doc.r61618.tar.xz
+2022/01/16 | 10560 | systems/texlive/tlnet/archive/njuthesis.r61618.tar.xz
+2022/01/16 | 40628 | systems/texlive/tlnet/archive/njuthesis.source.r61618.tar.xz
2022/01/10 | 637816 | systems/texlive/tlnet/archive/njuvisual.doc.r61555.tar.xz
2022/01/10 | 169212 | systems/texlive/tlnet/archive/njuvisual.r61555.tar.xz
2022/01/10 | 176228 | systems/texlive/tlnet/archive/njuvisual.source.r61555.tar.xz
@@ -287318,8 +287291,8 @@
2019/02/28 | 340 | systems/texlive/tlnet/archive/pst2pdf.x86_64-linux.r29333.tar.xz
2019/02/28 | 340 | systems/texlive/tlnet/archive/pst2pdf.x86_64-solaris.r29333.tar.xz
2019/02/28 | 100796 | systems/texlive/tlnet/archive/pst-3d.doc.r17257.tar.xz
-2021/09/27 | 962220 | systems/texlive/tlnet/archive/pst-3dplot.doc.r60619.tar.xz
-2021/09/27 | 21852 | systems/texlive/tlnet/archive/pst-3dplot.r60619.tar.xz
+2022/01/16 | 2734884 | systems/texlive/tlnet/archive/pst-3dplot.doc.r61615.tar.xz
+2022/01/16 | 21856 | systems/texlive/tlnet/archive/pst-3dplot.r61615.tar.xz
2019/02/28 | 3460 | systems/texlive/tlnet/archive/pst-3d.r17257.tar.xz
2019/02/28 | 948 | systems/texlive/tlnet/archive/pst-3d.source.r17257.tar.xz
2019/02/28 | 57048 | systems/texlive/tlnet/archive/pst-abspos.doc.r15878.tar.xz
@@ -289277,7 +289250,7 @@
2020/05/17 | 592 | systems/texlive/tlnet/archive/texlive-scripts.amd64-freebsd.r55172.tar.xz
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.amd64-netbsd.r55172.tar.xz
2020/05/17 | 592 | systems/texlive/tlnet/archive/texlive-scripts.armhf-linux.r55172.tar.xz
-2022/01/15 | 402536 | systems/texlive/tlnet/archive/texlive-scripts.doc.r61603.tar.xz
+2022/01/16 | 402676 | systems/texlive/tlnet/archive/texlive-scripts.doc.r61609.tar.xz
2020/01/27 | 916 | systems/texlive/tlnet/archive/texlive-scripts-extra.aarch64-linux.r53577.tar.xz
2020/01/27 | 924 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-freebsd.r53577.tar.xz
2020/01/27 | 916 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-netbsd.r53577.tar.xz
@@ -289301,7 +289274,7 @@
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.i386-linux.r55172.tar.xz
2020/05/17 | 592 | systems/texlive/tlnet/archive/texlive-scripts.i386-netbsd.r55172.tar.xz
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.i386-solaris.r55172.tar.xz
-2022/01/15 | 108216 | systems/texlive/tlnet/archive/texlive-scripts.r61603.tar.xz
+2022/01/16 | 108224 | systems/texlive/tlnet/archive/texlive-scripts.r61609.tar.xz
2021/02/25 | 572 | systems/texlive/tlnet/archive/texlive-scripts.universal-darwin.r57908.tar.xz
2021/04/12 | 36308 | systems/texlive/tlnet/archive/texlive-scripts.win32.r58829.tar.xz
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.x86_64-cygwin.r55172.tar.xz
@@ -291077,16 +291050,16 @@
2020/07/18 | 47816 | systems/texlive/tlnet/archive/zztex.doc.r55862.tar.xz
2020/07/18 | 101724 | systems/texlive/tlnet/archive/zztex.r55862.tar.xz
2021/12/06 | 105168 | systems/texlive/tlnet/install-tl
-2022/01/15 | 6811638 | systems/texlive/tlnet/install-tl-unx.tar.gz
-2022/01/15 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
-2022/01/15 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2022/01/16 | 6811727 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2022/01/16 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2022/01/16 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2021/04/11 | 4945 | systems/texlive/tlnet/install-tl-windows.bat
-2022/01/15 | 20874509 | systems/texlive/tlnet/install-tl-windows.exe
-2022/01/15 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
-2022/01/15 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2022/01/15 | 25631632 | systems/texlive/tlnet/install-tl.zip
-2022/01/15 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2022/01/15 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2022/01/16 | 20874648 | systems/texlive/tlnet/install-tl-windows.exe
+2022/01/16 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2022/01/16 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2022/01/16 | 25631634 | systems/texlive/tlnet/install-tl.zip
+2022/01/16 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2022/01/16 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
2021/04/01 | 1229 | systems/texlive/tlnet/README.md
2021/04/01 | 0 | systems/texlive/tlnet/TEXLIVE_2021
2021/07/03 | 7181 | systems/texlive/tlnet/tlpkg/gpg/pubring.gpg
@@ -291096,7 +291069,7 @@
2021/07/03 | 1280 | systems/texlive/tlnet/tlpkg/gpg/trustdb.gpg
2022/01/12 | 49482 | systems/texlive/tlnet/tlpkg/installer/config.guess
2010/11/11 | 11651 | systems/texlive/tlnet/tlpkg/installer/COPYING.MinGW-runtime.txt
-2022/01/14 | 6608 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+2022/01/15 | 6615 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2020/04/15 | 223687 | systems/texlive/tlnet/tlpkg/installer/curl/curl-ca-bundle.crt
2020/04/15 | 2606592 | systems/texlive/tlnet/tlpkg/installer/curl/curl.exe
2017/04/16 | 2629 | systems/texlive/tlnet/tlpkg/installer/installer-options.txt
@@ -291138,12 +291111,12 @@
2021/05/16 | 20371 | systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
2021/12/21 | 5429 | systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
2021/12/21 | 27582 | systems/texlive/tlnet/tlpkg/TeXLive/TLPaper.pm
-2022/01/15 | 17063777 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2022/01/15 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2022/01/16 | 17065106 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2022/01/16 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
2021/12/21 | 86654 | systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
-2022/01/15 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
-2022/01/15 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2022/01/15 | 2338904 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2022/01/16 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2022/01/16 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2022/01/16 | 2340064 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2021/12/21 | 58848 | systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
2021/12/21 | 42112 | systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
2021/12/21 | 16130 | systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
@@ -296200,7 +296173,7 @@
2020/10/03 | 318630 | systems/win32/miktex/tm/packages/filehook.tar.lzma
2012/12/04 | 924573 | systems/win32/miktex/tm/packages/fileinfo.tar.lzma
2011/09/21 | 281409 | systems/win32/miktex/tm/packages/filemod.tar.lzma
-2022/01/15 | 631204 | systems/win32/miktex/tm/packages/files.csv.lzma
+2022/01/16 | 631204 | systems/win32/miktex/tm/packages/files.csv.lzma
2001/05/14 | 5617 | systems/win32/miktex/tm/packages/finbib.tar.lzma
2015/10/20 | 44379 | systems/win32/miktex/tm/packages/findhyph.tar.lzma
2011/10/21 | 89323 | systems/win32/miktex/tm/packages/fink.tar.lzma
@@ -297698,9 +297671,9 @@
2018/01/12 | 157226 | systems/win32/miktex/tm/packages/miktex-zip-bin-x64.tar.lzma
2021/12/09 | 39714 | systems/win32/miktex/tm/packages/miktex-zlib-bin-2.9.tar.lzma
2021/12/09 | 43639 | systems/win32/miktex/tm/packages/miktex-zlib-bin-x64-2.9.tar.lzma
-2022/01/15 | 260698 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
-2022/01/15 | 1406212 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
-2022/01/15 | 1300317 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
+2022/01/16 | 260690 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
+2022/01/16 | 1404512 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
+2022/01/16 | 1300697 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
2021/12/09 | 13527 | systems/win32/miktex/tm/packages/miktex-zzip-bin-2.9.tar.lzma
2021/12/09 | 14417 | systems/win32/miktex/tm/packages/miktex-zzip-bin-x64-2.9.tar.lzma
2016/07/15 | 35914 | systems/win32/miktex/tm/packages/mil3.tar.lzma
@@ -297924,189 +297897,189 @@
2018/04/09 | 400132 | systems/win32/miktex/tm/packages/newunicodechar.tar.lzma
2011/09/19 | 101312 | systems/win32/miktex/tm/packages/newvbtm.tar.lzma
2021/03/17 | 232249 | systems/win32/miktex/tm/packages/newverbs.tar.lzma
-2022/01/15 | 631997 | systems/win32/miktex/tm/packages/next/files.csv.lzma
-2022/01/15 | 51534 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
-2022/01/15 | 57341 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
-2022/01/15 | 959837 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
-2022/01/15 | 1087177 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
-2022/01/15 | 28758 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
-2022/01/15 | 31554 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
-2022/01/15 | 30172 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
-2022/01/15 | 35241 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
-2022/01/15 | 56675 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
-2022/01/15 | 65087 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
-2022/01/15 | 86664 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
-2022/01/15 | 95331 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
-2022/01/15 | 68780 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
-2022/01/15 | 77066 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
-2022/01/15 | 27268 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
-2022/01/15 | 31336 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
-2022/01/15 | 332746 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
-2022/01/15 | 394301 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
-2022/01/15 | 32958 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
-2022/01/15 | 37095 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
-2022/01/15 | 51503 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
-2022/01/15 | 57257 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
-2022/01/15 | 256459 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
-2022/01/15 | 281546 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
-2022/01/15 | 179828 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
-2022/01/15 | 196134 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
-2022/01/15 | 54991 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
-2022/01/15 | 62427 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
-2022/01/15 | 21322 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
-2022/01/15 | 24092 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
-2022/01/15 | 470363 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
-2022/01/15 | 46096 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
-2022/01/15 | 52041 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
-2022/01/15 | 285739 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
-2022/01/15 | 326303 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
-2022/01/15 | 41390 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
-2022/01/15 | 45773 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
-2022/01/15 | 120221 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
-2022/01/15 | 135131 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
-2022/01/15 | 1304427 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
-2022/01/15 | 1452740 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
-2022/01/15 | 99702 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
-2022/01/15 | 113014 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
-2022/01/15 | 43669 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
-2022/01/15 | 48845 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
-2022/01/15 | 25105 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
-2022/01/15 | 28556 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
-2022/01/15 | 57029 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
-2022/01/15 | 63365 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
-2022/01/15 | 136038 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
-2022/01/15 | 155304 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
-2022/01/15 | 73463 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
-2022/01/15 | 79036 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
-2022/01/15 | 71989 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
-2022/01/15 | 81531 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
-2022/01/15 | 259310 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
-2022/01/15 | 296107 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
-2022/01/15 | 22154 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
-2022/01/15 | 25063 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
-2022/01/15 | 97080 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
-2022/01/15 | 112663 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
-2022/01/15 | 64576 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
-2022/01/15 | 73281 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
-2022/01/15 | 96925 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
-2022/01/15 | 115647 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
-2022/01/15 | 38469 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
-2022/01/15 | 43822 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
-2022/01/15 | 483936 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
-2022/01/15 | 566722 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
-2022/01/15 | 152077 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
-2022/01/15 | 168843 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
-2022/01/15 | 95483 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
-2022/01/15 | 109560 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
-2022/01/15 | 16501 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
-2022/01/15 | 18359 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
-2022/01/15 | 28321 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
-2022/01/15 | 30513 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
-2022/01/15 | 630240 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
-2022/01/15 | 681612 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
-2022/01/15 | 532454 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
-2022/01/15 | 599014 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
-2022/01/15 | 477922 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
-2022/01/15 | 527824 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
-2022/01/15 | 93941 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
-2022/01/15 | 103438 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
-2022/01/15 | 1731303 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
-2022/01/15 | 1992376 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
-2022/01/15 | 68014 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
-2022/01/15 | 74060 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
-2022/01/15 | 27699 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
-2022/01/15 | 32155 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
-2022/01/15 | 7758 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
-2022/01/15 | 8783 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
-2022/01/15 | 199663 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
-2022/01/15 | 216350 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
-2022/01/15 | 251406 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
-2022/01/15 | 286565 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
-2022/01/15 | 99181 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
-2022/01/15 | 104677 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
-2022/01/15 | 126846 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
-2022/01/15 | 139122 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
-2022/01/15 | 246043 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
-2022/01/15 | 276121 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
-2022/01/15 | 199684 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
-2022/01/15 | 181569 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
-2022/01/15 | 68652 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
-2022/01/15 | 76282 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
-2022/01/15 | 31400 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
-2022/01/15 | 35175 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
-2022/01/15 | 38565 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
-2022/01/15 | 43927 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
-2022/01/15 | 43451 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
-2022/01/15 | 47910 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
-2022/01/15 | 45891 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
-2022/01/15 | 52311 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
-2022/01/15 | 198989 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
-2022/01/15 | 213501 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
-2022/01/15 | 36057 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
-2022/01/15 | 41265 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
-2022/01/15 | 753219 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
-2022/01/15 | 824780 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
-2022/01/15 | 200082 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
-2022/01/15 | 202746 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
-2022/01/15 | 210220 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
-2022/01/15 | 244845 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
-2022/01/15 | 78965 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
-2022/01/15 | 88163 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
-2022/01/15 | 1180763 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
-2022/01/15 | 1322448 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
-2022/01/15 | 20195 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
-2022/01/15 | 23948 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
-2022/01/15 | 31575 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
-2022/01/15 | 37390 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
-2022/01/15 | 64736 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
-2022/01/15 | 72884 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
-2022/01/15 | 50851 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
-2022/01/15 | 58660 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
-2022/01/15 | 691229 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin.tar.lzma
-2022/01/15 | 752398 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin-x64.tar.lzma
-2022/01/15 | 1355962 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
-2022/01/15 | 1499384 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
-2022/01/15 | 42768 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
-2022/01/15 | 52551 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
-2022/01/15 | 57444 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
-2022/01/15 | 63757 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
-2022/01/15 | 25538 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
-2022/01/15 | 27503 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
-2022/01/15 | 16579 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
-2022/01/15 | 18483 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
-2022/01/15 | 64578 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
-2022/01/15 | 70971 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
-2022/01/15 | 157601 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
-2022/01/15 | 172572 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
-2022/01/15 | 58706 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
-2022/01/15 | 67224 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
-2022/01/15 | 101457 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
-2022/01/15 | 109143 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
-2022/01/15 | 2672853 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
-2022/01/15 | 2797479 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
-2022/01/15 | 55337 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
-2022/01/15 | 62338 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
-2022/01/15 | 37117 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
-2022/01/15 | 41209 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
-2022/01/15 | 28694 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
-2022/01/15 | 34032 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
-2022/01/15 | 67764 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
-2022/01/15 | 71916 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
-2022/01/15 | 317772 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
-2022/01/15 | 355357 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
-2022/01/15 | 55734 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin.tar.lzma
-2022/01/15 | 57403 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin-x64.tar.lzma
-2022/01/15 | 591454 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
-2022/01/15 | 629343 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
-2022/01/15 | 39736 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
-2022/01/15 | 43699 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
-2022/01/15 | 260592 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
-2022/01/15 | 1405830 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
-2022/01/15 | 1301492 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
-2022/01/15 | 13513 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
-2022/01/15 | 14412 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
+2022/01/16 | 631997 | systems/win32/miktex/tm/packages/next/files.csv.lzma
+2022/01/16 | 51535 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
+2022/01/16 | 57341 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
+2022/01/16 | 959840 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
+2022/01/16 | 1087177 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
+2022/01/16 | 28754 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
+2022/01/16 | 31551 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
+2022/01/16 | 30173 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
+2022/01/16 | 35242 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
+2022/01/16 | 56674 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
+2022/01/16 | 65086 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
+2022/01/16 | 86664 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
+2022/01/16 | 95330 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
+2022/01/16 | 68782 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
+2022/01/16 | 77066 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
+2022/01/16 | 27269 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
+2022/01/16 | 31336 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
+2022/01/16 | 332744 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
+2022/01/16 | 394302 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
+2022/01/16 | 32958 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
+2022/01/16 | 37097 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
+2022/01/16 | 51501 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
+2022/01/16 | 57256 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
+2022/01/16 | 256461 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
+2022/01/16 | 281545 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
+2022/01/16 | 179828 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
+2022/01/16 | 196135 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
+2022/01/16 | 54989 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
+2022/01/16 | 62427 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
+2022/01/16 | 21322 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
+2022/01/16 | 24092 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
+2022/01/16 | 470364 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
+2022/01/16 | 46095 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
+2022/01/16 | 52043 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
+2022/01/16 | 285739 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
+2022/01/16 | 326302 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
+2022/01/16 | 41391 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
+2022/01/16 | 45775 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
+2022/01/16 | 120220 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
+2022/01/16 | 135133 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
+2022/01/16 | 1304426 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
+2022/01/16 | 1452739 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
+2022/01/16 | 99701 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
+2022/01/16 | 113014 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
+2022/01/16 | 43670 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
+2022/01/16 | 48844 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
+2022/01/16 | 25104 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
+2022/01/16 | 28556 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
+2022/01/16 | 57029 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
+2022/01/16 | 63367 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
+2022/01/16 | 136039 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
+2022/01/16 | 155304 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
+2022/01/16 | 73462 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
+2022/01/16 | 79037 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
+2022/01/16 | 71991 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
+2022/01/16 | 81532 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
+2022/01/16 | 259313 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
+2022/01/16 | 296106 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
+2022/01/16 | 22154 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
+2022/01/16 | 25063 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
+2022/01/16 | 97082 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
+2022/01/16 | 112664 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
+2022/01/16 | 64575 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
+2022/01/16 | 73280 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
+2022/01/16 | 96923 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
+2022/01/16 | 115647 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
+2022/01/16 | 38468 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
+2022/01/16 | 43822 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
+2022/01/16 | 483936 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
+2022/01/16 | 566721 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
+2022/01/16 | 152076 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
+2022/01/16 | 168843 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
+2022/01/16 | 95484 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
+2022/01/16 | 109562 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
+2022/01/16 | 16500 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
+2022/01/16 | 18359 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
+2022/01/16 | 28321 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
+2022/01/16 | 30513 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
+2022/01/16 | 630239 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
+2022/01/16 | 681613 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
+2022/01/16 | 532455 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
+2022/01/16 | 599013 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
+2022/01/16 | 477924 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
+2022/01/16 | 527828 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
+2022/01/16 | 93942 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
+2022/01/16 | 103440 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
+2022/01/16 | 1731303 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
+2022/01/16 | 1992377 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
+2022/01/16 | 68015 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
+2022/01/16 | 74059 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
+2022/01/16 | 27699 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
+2022/01/16 | 32155 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
+2022/01/16 | 7757 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
+2022/01/16 | 8782 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
+2022/01/16 | 199663 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
+2022/01/16 | 216349 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
+2022/01/16 | 251406 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
+2022/01/16 | 286565 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
+2022/01/16 | 99181 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
+2022/01/16 | 104678 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
+2022/01/16 | 126843 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
+2022/01/16 | 139122 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
+2022/01/16 | 246042 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
+2022/01/16 | 276122 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
+2022/01/16 | 199684 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
+2022/01/16 | 181570 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
+2022/01/16 | 68652 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
+2022/01/16 | 76281 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
+2022/01/16 | 31399 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
+2022/01/16 | 35175 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
+2022/01/16 | 38565 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
+2022/01/16 | 43928 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
+2022/01/16 | 43451 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
+2022/01/16 | 47911 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
+2022/01/16 | 45892 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
+2022/01/16 | 52310 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
+2022/01/16 | 198989 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
+2022/01/16 | 213500 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
+2022/01/16 | 36057 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
+2022/01/16 | 41266 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
+2022/01/16 | 753220 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
+2022/01/16 | 824782 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
+2022/01/16 | 200083 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
+2022/01/16 | 202745 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
+2022/01/16 | 210222 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
+2022/01/16 | 244846 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
+2022/01/16 | 78966 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
+2022/01/16 | 88163 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
+2022/01/16 | 1180762 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
+2022/01/16 | 1322450 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
+2022/01/16 | 20195 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
+2022/01/16 | 23948 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
+2022/01/16 | 31575 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
+2022/01/16 | 37390 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
+2022/01/16 | 64736 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
+2022/01/16 | 72884 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
+2022/01/16 | 50850 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
+2022/01/16 | 58660 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
+2022/01/16 | 691228 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin.tar.lzma
+2022/01/16 | 752398 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin-x64.tar.lzma
+2022/01/16 | 1355965 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
+2022/01/16 | 1499385 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
+2022/01/16 | 42770 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
+2022/01/16 | 52551 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
+2022/01/16 | 57446 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
+2022/01/16 | 63757 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
+2022/01/16 | 25537 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
+2022/01/16 | 27503 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
+2022/01/16 | 16578 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
+2022/01/16 | 18484 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
+2022/01/16 | 64578 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
+2022/01/16 | 70971 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
+2022/01/16 | 157601 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
+2022/01/16 | 172572 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
+2022/01/16 | 58708 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
+2022/01/16 | 67223 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
+2022/01/16 | 101459 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
+2022/01/16 | 109142 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
+2022/01/16 | 2672852 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
+2022/01/16 | 2797477 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
+2022/01/16 | 55339 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
+2022/01/16 | 62338 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
+2022/01/16 | 37117 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
+2022/01/16 | 41208 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
+2022/01/16 | 28693 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
+2022/01/16 | 34032 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
+2022/01/16 | 67763 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
+2022/01/16 | 71915 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
+2022/01/16 | 317773 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
+2022/01/16 | 355357 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
+2022/01/16 | 55734 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin.tar.lzma
+2022/01/16 | 57402 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin-x64.tar.lzma
+2022/01/16 | 591458 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
+2022/01/16 | 629342 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
+2022/01/16 | 39737 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
+2022/01/16 | 43697 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
+2022/01/16 | 260713 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
+2022/01/16 | 1405492 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
+2022/01/16 | 1301304 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
+2022/01/16 | 13512 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
+2022/01/16 | 14412 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
2019/03/12 | 1412 | systems/win32/miktex/tm/packages/nextpage.tar.lzma
-2022/01/15 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
+2022/01/16 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
2018/07/06 | 145915 | systems/win32/miktex/tm/packages/nexus-otf.tar.lzma
2017/03/30 | 191149 | systems/win32/miktex/tm/packages/nfssext-cfr.tar.lzma
2012/12/20 | 612251 | systems/win32/miktex/tm/packages/nicefilelist.tar.lzma
@@ -298549,7 +298522,7 @@
2020/10/20 | 342254 | systems/win32/miktex/tm/packages/preview.tar.lzma
2019/06/20 | 375963 | systems/win32/miktex/tm/packages/prftree.tar.lzma
2021/04/23 | 274028 | systems/win32/miktex/tm/packages/principia.tar.lzma
-2022/01/15 | 922 | systems/win32/miktex/tm/packages/pr.ini
+2022/01/16 | 922 | systems/win32/miktex/tm/packages/pr.ini
2010/09/27 | 248469 | systems/win32/miktex/tm/packages/printlen.tar.lzma
2008/06/17 | 77313 | systems/win32/miktex/tm/packages/proba.tar.lzma
2017/07/12 | 988486 | systems/win32/miktex/tm/packages/probsoln.tar.lzma
@@ -300288,7 +300261,7 @@
2004/06/04 | 404 | tds/tds.sed
2004/06/23 | 65418 | tds/tds.tex
2019/05/29 | 304264 | tds.zip
-2022/01/16 | 186 | timestamp
+2022/01/17 | 186 | timestamp
2002/08/26 | 61898 | usergrps/dante/antrag.pdf
2002/08/26 | 118217 | usergrps/dante/antrag.ps
2021/11/11 | 917 | usergrps/dante/dtk/doc/beispiel.bib
diff --git a/FILES.byname.gz b/FILES.byname.gz
index d4402412bb..ee465bb772 100644
--- a/FILES.byname.gz
+++ b/FILES.byname.gz
Binary files differ
diff --git a/FILES.last07days b/FILES.last07days
index 4b5852f7a5..217989c31d 100644
--- a/FILES.last07days
+++ b/FILES.last07days
@@ -1,287 +1,307 @@
-2022/01/15 | 99702 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
-2022/01/15 | 99181 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
-2022/01/15 | 97080 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
-2022/01/15 | 96925 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
-2022/01/15 | 959837 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
-2022/01/15 | 95483 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
-2022/01/15 | 95331 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
-2022/01/15 | 93941 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
+2022/01/16 | 9980 | systems/texlive/tlnet/archive/karnaugh-map.source.r61614.tar.xz
+2022/01/16 | 99701 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
+2022/01/16 | 99181 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
+2022/01/16 | 97082 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
+2022/01/16 | 96923 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
+2022/01/16 | 959840 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
+2022/01/16 | 95484 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
+2022/01/16 | 95330 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
+2022/01/16 | 93942 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
+2022/01/16 | 922 | systems/win32/miktex/tm/packages/pr.ini
+2022/01/16 | 884948 | systems/texlive/tlnet/archive/beebe.r61609.tar.xz
+2022/01/16 | 88163 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
+2022/01/16 | 8782 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
+2022/01/16 | 86664 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
+2022/01/16 | 82844 | systems/texlive/tlnet/archive/fontspec.source.r61617.tar.xz
+2022/01/16 | 82639 | macros/latex/contrib/easybook/easybook.tex
+2022/01/16 | 824782 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
+2022/01/16 | 81532 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
+2022/01/16 | 79037 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
+2022/01/16 | 78966 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
+2022/01/16 | 78696 | macros/latex/contrib/easybook/easybook.dtx
+2022/01/16 | 7757 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
+2022/01/16 | 77066 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
+2022/01/16 | 76281 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
+2022/01/16 | 753220 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
+2022/01/16 | 752398 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin-x64.tar.lzma
+2022/01/16 | 74059 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
+2022/01/16 | 73462 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
+2022/01/16 | 73280 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
+2022/01/16 | 72884 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
+2022/01/16 | 71991 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
+2022/01/16 | 71915 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
+2022/01/16 | 70971 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
+2022/01/16 | 691228 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin.tar.lzma
+2022/01/16 | 68782 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
+2022/01/16 | 68652 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
+2022/01/16 | 681613 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
+2022/01/16 | 6811727 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2022/01/16 | 68015 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
+2022/01/16 | 67763 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
+2022/01/16 | 67223 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
+2022/01/16 | 65086 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
+2022/01/16 | 64736 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
+2022/01/16 | 64578 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
+2022/01/16 | 64575 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
+2022/01/16 | 63757 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
+2022/01/16 | 637256 | macros/latex/contrib/easybook.zip
+2022/01/16 | 63367 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
+2022/01/16 | 631997 | systems/win32/miktex/tm/packages/next/files.csv.lzma
+2022/01/16 | 631204 | systems/win32/miktex/tm/packages/files.csv.lzma
+2022/01/16 | 630239 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
+2022/01/16 | 629342 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
+2022/01/16 | 62427 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
+2022/01/16 | 62338 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
+2022/01/16 | 616464 | systems/texlive/tlnet/archive/easybook.doc.r61616.tar.xz
+2022/01/16 | 6116 | systems/texlive/tlnet/archive/karnaugh-map.r61614.tar.xz
+2022/01/16 | 599013 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
+2022/01/16 | 595578 | macros/latex/contrib/easybook/easybook.pdf
+2022/01/16 | 591458 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
+2022/01/16 | 58708 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
+2022/01/16 | 58660 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
+2022/01/16 | 57446 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
+2022/01/16 | 57402 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin-x64.tar.lzma
+2022/01/16 | 57341 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
+2022/01/16 | 57256 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
+2022/01/16 | 57029 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
+2022/01/16 | 56674 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
+2022/01/16 | 566721 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
+2022/01/16 | 55734 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin.tar.lzma
+2022/01/16 | 55339 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
+2022/01/16 | 54989 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
+2022/01/16 | 532455 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
+2022/01/16 | 527828 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
+2022/01/16 | 52551 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
+2022/01/16 | 52310 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
+2022/01/16 | 52043 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
+2022/01/16 | 51535 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
+2022/01/16 | 51501 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
+2022/01/16 | 50850 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
+2022/01/16 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2022/01/16 | 48844 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
+2022/01/16 | 483936 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
+2022/01/16 | 47911 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
+2022/01/16 | 477924 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
+2022/01/16 | 470364 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
+2022/01/16 | 46095 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
+2022/01/16 | 45892 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
+2022/01/16 | 45775 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
+2022/01/16 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2022/01/16 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2022/01/16 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2022/01/16 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2022/01/16 | 43928 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
+2022/01/16 | 43822 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
+2022/01/16 | 43697 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
+2022/01/16 | 43670 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
+2022/01/16 | 43451 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
+2022/01/16 | 42770 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
+2022/01/16 | 41391 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
+2022/01/16 | 41266 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
+2022/01/16 | 41208 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
+2022/01/16 | 40628 | systems/texlive/tlnet/archive/njuthesis.source.r61618.tar.xz
+2022/01/16 | 402676 | systems/texlive/tlnet/archive/texlive-scripts.doc.r61609.tar.xz
+2022/01/16 | 39737 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
+2022/01/16 | 394302 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
+2022/01/16 | 38565 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
+2022/01/16 | 38468 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
+2022/01/16 | 37390 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
+2022/01/16 | 37117 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
+2022/01/16 | 37097 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
+2022/01/16 | 36057 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
+2022/01/16 | 355357 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
+2022/01/16 | 35242 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
+2022/01/16 | 35175 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
+2022/01/16 | 34032 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
+2022/01/16 | 332744 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
+2022/01/16 | 32958 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
+2022/01/16 | 326302 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
+2022/01/16 | 32155 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
+2022/01/16 | 317773 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
+2022/01/16 | 31575 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
+2022/01/16 | 31551 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
+2022/01/16 | 31399 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
+2022/01/16 | 31336 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
+2022/01/16 | 30513 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
+2022/01/16 | 30173 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
+2022/01/16 | 296106 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
+2022/01/16 | 287964 | systems/texlive/tlnet/archive/karnaugh-map.doc.r61614.tar.xz
+2022/01/16 | 28754 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
+2022/01/16 | 28693 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
+2022/01/16 | 286565 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
+2022/01/16 | 285739 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
+2022/01/16 | 28556 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
+2022/01/16 | 28321 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
+2022/01/16 | 281545 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
+2022/01/16 | 2797477 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
+2022/01/16 | 27699 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
+2022/01/16 | 276122 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
+2022/01/16 | 27503 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
+2022/01/16 | 2734884 | systems/texlive/tlnet/archive/pst-3dplot.doc.r61615.tar.xz
+2022/01/16 | 27269 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
+2022/01/16 | 2672852 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
+2022/01/16 | 26664 | systems/texlive/tlnet/archive/fontspec.r61617.tar.xz
+2022/01/16 | 260713 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
+2022/01/16 | 260690 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
+2022/01/16 | 259313 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
+2022/01/16 | 256461 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
+2022/01/16 | 25631634 | systems/texlive/tlnet/install-tl.zip
+2022/01/16 | 25537 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
+2022/01/16 | 251406 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
+2022/01/16 | 25104 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
+2022/01/16 | 25063 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
+2022/01/16 | 246042 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
+2022/01/16 | 244846 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
+2022/01/16 | 24092 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
+2022/01/16 | 23948 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
+2022/01/16 | 2340064 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2022/01/16 | 222952 | macros/latex/contrib/chemmacros/chemmacros.sty
+2022/01/16 | 22154 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
+2022/01/16 | 21856 | systems/texlive/tlnet/archive/pst-3dplot.r61615.tar.xz
+2022/01/16 | 216349 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
+2022/01/16 | 213500 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
+2022/01/16 | 21322 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
+2022/01/16 | 210222 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
+2022/01/16 | 20874648 | systems/texlive/tlnet/install-tl-windows.exe
+2022/01/16 | 202745 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
+2022/01/16 | 20195 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
+2022/01/16 | 200083 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
+2022/01/16 | 199684 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
+2022/01/16 | 199663 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
+2022/01/16 | 1992377 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
+2022/01/16 | 198989 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
+2022/01/16 | 196135 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
+2022/01/16 | 1932 | systems/texlive/tlnet/archive/collection-fontsextra.r61613.tar.xz
+2022/01/16 | 1854880 | systems/texlive/tlnet/archive/concmath-otf.doc.r61613.tar.xz
+2022/01/16 | 18484 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
+2022/01/16 | 18359 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
+2022/01/16 | 181570 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
+2022/01/16 | 179828 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
+2022/01/16 | 1731303 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
+2022/01/16 | 172572 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
+2022/01/16 | 17112 | systems/texlive/tlnet/archive/easybook.source.r61616.tar.xz
+2022/01/16 | 17065106 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2022/01/16 | 17052 | systems/texlive/tlnet/archive/easybook.r61616.tar.xz
+2022/01/16 | 168843 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
+2022/01/16 | 16578 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
+2022/01/16 | 16500 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
+2022/01/16 | 157601 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
+2022/01/16 | 155304 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
+2022/01/16 | 155017 | macros/latex/contrib/chemmacros/chemmacros-manual.tex
+2022/01/16 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2022/01/16 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2022/01/16 | 152076 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
+2022/01/16 | 1499385 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
+2022/01/16 | 1482 | macros/latex/contrib/chemmacros/README
+2022/01/16 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2022/01/16 | 1452739 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
+2022/01/16 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2022/01/16 | 14412 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
+2022/01/16 | 1405492 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
+2022/01/16 | 1404512 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
+2022/01/16 | 139122 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
+2022/01/16 | 136039 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
+2022/01/16 | 1355965 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
+2022/01/16 | 135133 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
+2022/01/16 | 13512 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
+2022/01/16 | 1322450 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
+2022/01/16 | 1304426 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
+2022/01/16 | 130408 | systems/texlive/tlnet/archive/concmath-otf.r61613.tar.xz
+2022/01/16 | 1301304 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
+2022/01/16 | 1300697 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
+2022/01/16 | 126843 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
+2022/01/16 | 1221668 | systems/texlive/tlnet/archive/fontspec.doc.r61617.tar.xz
+2022/01/16 | 120220 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
+2022/01/16 | 1180762 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
+2022/01/16 | 115647 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
+2022/01/16 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
+2022/01/16 | 113014 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
+2022/01/16 | 112664 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
+2022/01/16 | 109562 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
+2022/01/16 | 109142 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
+2022/01/16 | 1087177 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
+2022/01/16 | 108224 | systems/texlive/tlnet/archive/texlive-scripts.r61609.tar.xz
+2022/01/16 | 1072575 | macros/latex/contrib/chemmacros.zip
+2022/01/16 | 1060088 | systems/texlive/tlnet/archive/njuthesis.doc.r61618.tar.xz
+2022/01/16 | 10560 | systems/texlive/tlnet/archive/njuthesis.r61618.tar.xz
+2022/01/16 | 104678 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
+2022/01/16 | 103440 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
+2022/01/16 | 1014895 | macros/latex/contrib/chemmacros/chemmacros-manual.pdf
+2022/01/16 | 101459 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
2022/01/15 | 9356 | macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
2022/01/15 | 9309 | macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
2022/01/15 | 9241 | macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
-2022/01/15 | 922 | systems/win32/miktex/tm/packages/pr.ini
-2022/01/15 | 883704 | systems/texlive/tlnet/archive/beebe.r61603.tar.xz
-2022/01/15 | 88163 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
-2022/01/15 | 8783 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
2022/01/15 | 8673 | macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
-2022/01/15 | 86664 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
2022/01/15 | 8591 | support/pkgcheck/CHANGES.md
-2022/01/15 | 824780 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
-2022/01/15 | 82357 | macros/latex/contrib/easybook/easybook.tex
-2022/01/15 | 81531 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
2022/01/15 | 806 | macros/unicodetex/latex/njuthesis/README.md
2022/01/15 | 7931 | macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
-2022/01/15 | 79036 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
-2022/01/15 | 78965 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
-2022/01/15 | 78474 | macros/latex/contrib/easybook/easybook.dtx
2022/01/15 | 77966 | support/pkgcheck/docs/pkgcheck.pdf
-2022/01/15 | 7758 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
-2022/01/15 | 77066 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
-2022/01/15 | 76282 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
-2022/01/15 | 753219 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
2022/01/15 | 7529 | macros/unicodetex/latex/fontspec/fontspec-doc-style.sty
-2022/01/15 | 752398 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin-x64.tar.lzma
-2022/01/15 | 74060 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
2022/01/15 | 73687 | graphics/pgf/contrib/karnaugh-map/karnaugh-map.dtx
-2022/01/15 | 73463 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
-2022/01/15 | 73281 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
-2022/01/15 | 72884 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
-2022/01/15 | 71989 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
2022/01/15 | 7191 | macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
-2022/01/15 | 71916 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
-2022/01/15 | 70971 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
2022/01/15 | 6966792 | support/pkgcheck/bin/pkgcheck
-2022/01/15 | 691229 | systems/win32/miktex/tm/packages/next/miktex-ptex-bin.tar.lzma
-2022/01/15 | 68780 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
-2022/01/15 | 68652 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
2022/01/15 | 683 | graphics/pgf/contrib/karnaugh-map/karnaugh-map.ins
-2022/01/15 | 681612 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
-2022/01/15 | 6811638 | systems/texlive/tlnet/install-tl-unx.tar.gz
-2022/01/15 | 68014 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
-2022/01/15 | 67764 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
-2022/01/15 | 67224 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
+2022/01/15 | 6615 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2022/01/15 | 657454 | macros/unicodetex/latex/fontspec/fontspec-code.pdf
2022/01/15 | 6540 | systems/texlive/tlnet/archive/collection-latexextra.r61607.tar.xz
-2022/01/15 | 65087 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
-2022/01/15 | 64736 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
2022/01/15 | 6469 | macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
-2022/01/15 | 64578 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
-2022/01/15 | 64576 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
2022/01/15 | 6420 | systems/texlive/tlnet/archive/dbshow.r61605.tar.xz
2022/01/15 | 6385 | macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
-2022/01/15 | 63757 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
-2022/01/15 | 636587 | macros/latex/contrib/easybook.zip
-2022/01/15 | 63365 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
-2022/01/15 | 631997 | systems/win32/miktex/tm/packages/next/files.csv.lzma
-2022/01/15 | 631204 | systems/win32/miktex/tm/packages/files.csv.lzma
-2022/01/15 | 630240 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
-2022/01/15 | 629343 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
-2022/01/15 | 62427 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
-2022/01/15 | 62338 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
-2022/01/15 | 616348 | systems/texlive/tlnet/archive/easybook.doc.r61606.tar.xz
2022/01/15 | 606613 | macros/unicodetex/latex/fontspec/fontspec.pdf
-2022/01/15 | 599014 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
-2022/01/15 | 594993 | macros/latex/contrib/easybook/easybook.pdf
-2022/01/15 | 591454 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
-2022/01/15 | 58706 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
-2022/01/15 | 58660 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
-2022/01/15 | 57444 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
-2022/01/15 | 57403 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin-x64.tar.lzma
-2022/01/15 | 57341 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
-2022/01/15 | 57257 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
-2022/01/15 | 57029 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
-2022/01/15 | 56675 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
-2022/01/15 | 566722 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
-2022/01/15 | 55734 | systems/win32/miktex/tm/packages/next/miktex-xml2pmx-bin.tar.lzma
-2022/01/15 | 55337 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
2022/01/15 | 549 | macros/unicodetex/latex/fontspec/fontspec.cfg
-2022/01/15 | 54991 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
-2022/01/15 | 532454 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
-2022/01/15 | 527824 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
-2022/01/15 | 52551 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
-2022/01/15 | 52311 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
-2022/01/15 | 52041 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
-2022/01/15 | 51534 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
-2022/01/15 | 51503 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
-2022/01/15 | 50851 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
2022/01/15 | 5023 | macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
2022/01/15 | 4929 | macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
2022/01/15 | 4912 | systems/texlive/tlnet/archive/coop-writing.r61607.tar.xz
-2022/01/15 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
-2022/01/15 | 48845 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
-2022/01/15 | 483936 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
-2022/01/15 | 47910 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
-2022/01/15 | 477922 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
-2022/01/15 | 470363 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
-2022/01/15 | 46096 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
-2022/01/15 | 45891 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
-2022/01/15 | 45773 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
-2022/01/15 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2022/01/15 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
-2022/01/15 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2022/01/15 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2022/01/15 | 44619 | macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
-2022/01/15 | 43927 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
-2022/01/15 | 43822 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
-2022/01/15 | 43699 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
-2022/01/15 | 43669 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
-2022/01/15 | 43451 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
2022/01/15 | 430060 | systems/texlive/tlnet/archive/dbshow.doc.r61605.tar.xz
-2022/01/15 | 42768 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
-2022/01/15 | 41390 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
2022/01/15 | 4127 | macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
-2022/01/15 | 41265 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
-2022/01/15 | 41209 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
2022/01/15 | 41026 | macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
2022/01/15 | 4037 | macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
-2022/01/15 | 402536 | systems/texlive/tlnet/archive/texlive-scripts.doc.r61603.tar.xz
-2022/01/15 | 39736 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
2022/01/15 | 3968 | macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
-2022/01/15 | 394301 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
-2022/01/15 | 38565 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
-2022/01/15 | 38469 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
-2022/01/15 | 37390 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
-2022/01/15 | 37117 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
-2022/01/15 | 37095 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
2022/01/15 | 3622 | macros/unicodetex/latex/fontspec/fontspec.dtx
-2022/01/15 | 36057 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
-2022/01/15 | 355357 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
-2022/01/15 | 35241 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
-2022/01/15 | 35175 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
-2022/01/15 | 34032 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
2022/01/15 | 33 | support/pkgcheck/docs/title.tex
-2022/01/15 | 332746 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
-2022/01/15 | 32958 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
-2022/01/15 | 326303 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
-2022/01/15 | 32155 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
-2022/01/15 | 317772 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
2022/01/15 | 3177230 | support/pkgcheck.zip
-2022/01/15 | 31575 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
-2022/01/15 | 31554 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
-2022/01/15 | 31400 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
-2022/01/15 | 31336 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
2022/01/15 | 30842 | macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
2022/01/15 | 3057 | macros/unicodetex/latex/fontspec/fontspec-lua.dtx
-2022/01/15 | 30513 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
-2022/01/15 | 30172 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
2022/01/15 | 297445 | graphics/pgf/contrib/karnaugh-map.zip
-2022/01/15 | 296107 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
2022/01/15 | 290348 | systems/texlive/tlnet/archive/coop-writing.doc.r61607.tar.xz
2022/01/15 | 289937 | graphics/pgf/contrib/karnaugh-map/karnaugh-map.pdf
-2022/01/15 | 28758 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
-2022/01/15 | 28694 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
-2022/01/15 | 286565 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
-2022/01/15 | 285739 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
-2022/01/15 | 28556 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
2022/01/15 | 2835 | macros/unicodetex/latex/fontspec/README.md
-2022/01/15 | 28321 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
-2022/01/15 | 281546 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
-2022/01/15 | 2797479 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
-2022/01/15 | 27699 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
-2022/01/15 | 276121 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
-2022/01/15 | 27503 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
-2022/01/15 | 27268 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
2022/01/15 | 27017 | macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
2022/01/15 | 2683 | macros/unicodetex/latex/njuthesis/njuthesis.ins
-2022/01/15 | 2672853 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
-2022/01/15 | 260698 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
-2022/01/15 | 260592 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
-2022/01/15 | 259310 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
2022/01/15 | 25854 | macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
-2022/01/15 | 256459 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
-2022/01/15 | 25631632 | systems/texlive/tlnet/install-tl.zip
-2022/01/15 | 25538 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
-2022/01/15 | 251406 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
-2022/01/15 | 25105 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
-2022/01/15 | 25063 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
-2022/01/15 | 246043 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
-2022/01/15 | 244845 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
2022/01/15 | 24188 | systems/texlive/tlnet/archive/dbshow.source.r61605.tar.xz
-2022/01/15 | 24092 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
-2022/01/15 | 23948 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
-2022/01/15 | 2338904 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2022/01/15 | 22430 | macros/unicodetex/latex/fontspec/CHANGES.md
-2022/01/15 | 22154 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
-2022/01/15 | 216350 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
2022/01/15 | 2156 | macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
-2022/01/15 | 213501 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
-2022/01/15 | 21322 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
2022/01/15 | 21159 | macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
-2022/01/15 | 210220 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
-2022/01/15 | 20874509 | systems/texlive/tlnet/install-tl-windows.exe
2022/01/15 | 20768 | macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
-2022/01/15 | 202746 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
-2022/01/15 | 20195 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
-2022/01/15 | 200082 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
-2022/01/15 | 199684 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
-2022/01/15 | 199663 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
-2022/01/15 | 1992376 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
-2022/01/15 | 198989 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
2022/01/15 | 1980 | macros/unicodetex/latex/fontspec/fontspec.ins
-2022/01/15 | 196134 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
2022/01/15 | 19106 | macros/unicodetex/latex/fontspec/LICENSE
2022/01/15 | 19105 | macros/unicodetex/latex/njuthesis/LICENSE
-2022/01/15 | 18483 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
-2022/01/15 | 18359 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
-2022/01/15 | 181569 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
-2022/01/15 | 179828 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
2022/01/15 | 17570 | macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
-2022/01/15 | 1731303 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
-2022/01/15 | 172572 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
2022/01/15 | 17168 | systems/texlive/tlnet/archive/coop-writing.source.r61607.tar.xz
-2022/01/15 | 17136 | systems/texlive/tlnet/archive/easybook.source.r61606.tar.xz
-2022/01/15 | 17076 | systems/texlive/tlnet/archive/easybook.r61606.tar.xz
-2022/01/15 | 17063777 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2022/01/15 | 168843 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
2022/01/15 | 1687 | macros/unicodetex/latex/fontspec/fontspec-example.tex
2022/01/15 | 166445 | macros/unicodetex/latex/njuthesis/njuthesis.dtx
-2022/01/15 | 16579 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
-2022/01/15 | 16501 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
-2022/01/15 | 157601 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
-2022/01/15 | 155304 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
-2022/01/15 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
-2022/01/15 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
-2022/01/15 | 152077 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
-2022/01/15 | 1499384 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
-2022/01/15 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2022/01/15 | 1452740 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
-2022/01/15 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
-2022/01/15 | 14412 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
-2022/01/15 | 1406212 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
-2022/01/15 | 1405830 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
2022/01/15 | 1403657 | install/macros/unicodetex/latex/fontspec.tds.zip
-2022/01/15 | 139122 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
2022/01/15 | 1390 | graphics/pgf/contrib/karnaugh-map/README.md
2022/01/15 | 13674 | macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
-2022/01/15 | 136038 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
-2022/01/15 | 1355962 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
-2022/01/15 | 13513 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
-2022/01/15 | 135131 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
2022/01/15 | 1342043 | macros/unicodetex/latex/fontspec.zip
-2022/01/15 | 1322448 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
-2022/01/15 | 1304427 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
-2022/01/15 | 1301492 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
-2022/01/15 | 1300317 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
2022/01/15 | 12895 | macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
2022/01/15 | 12795 | macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
-2022/01/15 | 126846 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
2022/01/15 | 1246 | macros/unicodetex/latex/fontspec/fontspec.ltx
2022/01/15 | 12465 | macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
2022/01/15 | 12279 | macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
2022/01/15 | 1217 | macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
-2022/01/15 | 120221 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
2022/01/15 | 1181 | macros/unicodetex/latex/fontspec/fontspec-code.ltx
-2022/01/15 | 1180763 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
-2022/01/15 | 115647 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
-2022/01/15 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
-2022/01/15 | 113014 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
-2022/01/15 | 112663 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
+2022/01/15 | 118179445 | macros/context/latest/cont-tmf.zip
2022/01/15 | 1106415 | macros/unicodetex/latex/njuthesis.zip
-2022/01/15 | 109560 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
-2022/01/15 | 109143 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
-2022/01/15 | 1087177 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
-2022/01/15 | 108216 | systems/texlive/tlnet/archive/texlive-scripts.r61603.tar.xz
2022/01/15 | 1060301 | macros/unicodetex/latex/njuthesis/njuthesis.pdf
-2022/01/15 | 104677 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
-2022/01/15 | 103438 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
-2022/01/15 | 101457 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
2022/01/14 | 93396 | graphics/pstricks/contrib/pst-3dplot/tex/pst-3dplot.tex
2022/01/14 | 88140 | graphics/pstricks/contrib/pst-3dplot/doc/pst-3dplot-doc.tex
2022/01/14 | 8558660 | systems/texlive/tlnet/archive/pdfmanagement-testphase.doc.r61599.tar.xz
2022/01/14 | 695636 | systems/texlive/tlnet/archive/latex-base-dev.source.r61598.tar.xz
2022/01/14 | 6761 | fonts/concmath-otf/concmath-otf.sty
2022/01/14 | 669 | graphics/pstricks/contrib/pst-3dplot/README
-2022/01/14 | 6608 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2022/01/14 | 65788 | systems/texlive/tlnet/archive/latex-amsmath-dev.source.r61598.tar.xz
2022/01/14 | 6529 | graphics/pstricks/contrib/pst-3dplot/Changes
2022/01/14 | 62580 | systems/texlive/tlnet/archive/siunitx.r61597.tar.xz
@@ -2253,7 +2273,6 @@
2022/01/10 | 127304 | systems/texlive/tlnet/archive/iexec.doc.r61551.tar.xz
2022/01/10 | 1264 | systems/texlive/tlnet/archive/collection-bibtexextra.r61549.tar.xz
2022/01/10 | 12463000 | systems/texlive/tlnet/archive/pstricks.doc.r61548.tar.xz
-2022/01/10 | 118034978 | macros/context/latest/cont-tmf.zip
2022/01/10 | 1144 | macros/latex/contrib/keyfloat/README.txt
2022/01/10 | 111819 | macros/latex/contrib/zref-clever/zref-clever.tex
2022/01/10 | 1069860 | macros/latex/contrib/zref-clever/zref-clever-code.pdf
@@ -2263,213 +2282,3 @@
2022/01/10 | 101132 | systems/texlive/tlnet/archive/kdpcover.doc.r61552.tar.xz
2022/01/10 | 10040 | macros/latex/contrib/bibarts/README.txt
2022/01/10 | 100054 | fonts/newtx/doc/newtxdoc.tex
-2022/01/09 | 998688 | systems/win32/miktex/tm/packages/econ-bst__source.tar.lzma
-2022/01/09 | 9786 | systems/win32/miktex/tm/packages/biblatex-publist.tar.lzma
-2022/01/09 | 977127 | systems/win32/miktex/tm/packages/tkz-euclide__doc.tar.lzma
-2022/01/09 | 9609 | systems/win32/miktex/tm/packages/tasks.tar.lzma
-2022/01/09 | 9608 | systems/win32/miktex/tm/packages/wrapfig.tar.lzma
-2022/01/09 | 957 | macros/latex/contrib/njuvisual/README.md
-2022/01/09 | 9369 | systems/win32/miktex/tm/packages/srdp-mathematik__source.tar.lzma
-2022/01/09 | 920446 | macros/latex/contrib/njuvisual.zip
-2022/01/09 | 892259 | systems/win32/miktex/tm/packages/mcf2graph__doc.tar.lzma
-2022/01/09 | 8869 | systems/win32/miktex/tm/packages/translations__source.tar.lzma
-2022/01/09 | 86112 | systems/texlive/tlnet/archive/hvlogos.doc.r61538.tar.xz
-2022/01/09 | 8540 | macros/latex/contrib/kdpcover/kdpcover-vol-1.pdf
-2022/01/09 | 847978 | systems/win32/miktex/tm/packages/kaytannollista-latexia.tar.lzma
-2022/01/09 | 84670 | systems/win32/miktex/tm/packages/hvlogos__doc.tar.lzma
-2022/01/09 | 8210 | systems/win32/miktex/tm/packages/fnpct__source.tar.lzma
-2022/01/09 | 769 | graphics/pgf/contrib/pgf-interference/README
-2022/01/09 | 7625 | systems/win32/miktex/tm/packages/enotez.tar.lzma
-2022/01/09 | 7540 | systems/win32/miktex/tm/packages/enotez__source.tar.lzma
-2022/01/09 | 7500 | systems/texlive/tlnet/archive/tasks.r61541.tar.xz
-2022/01/09 | 7256 | macros/latex/contrib/kdpcover/kdpcover-signature.pdf
-2022/01/09 | 72344 | macros/generic/polexpr/polexprsturm.tex
-2022/01/09 | 72175 | systems/win32/miktex/tm/packages/spectralsequences.tar.lzma
-2022/01/09 | 7156 | macros/latex/contrib/kdpcover/kdpcover-vol-3.pdf
-2022/01/09 | 6862 | systems/win32/miktex/tm/packages/tasks__source.tar.lzma
-2022/01/09 | 68296 | systems/texlive/tlnet/archive/latexindent.r61535.tar.xz
-2022/01/09 | 6804 | macros/generic/polexpr/polexprexpr.tex
-2022/01/09 | 67680 | systems/win32/miktex/tm/packages/latexindent.tar.lzma
-2022/01/09 | 6723 | macros/latex/contrib/kdpcover/kdpcover-vol-4.pdf
-2022/01/09 | 6504 | macros/latex/contrib/kdpcover/kdpcover-vol-2.pdf
-2022/01/09 | 64908 | systems/win32/miktex/tm/packages/texlogsieve__doc.tar.lzma
-2022/01/09 | 6381520 | systems/win32/miktex/tm/packages/newtx.tar.lzma
-2022/01/09 | 6343 | systems/win32/miktex/tm/packages/wrapfig__source.tar.lzma
-2022/01/09 | 631942 | macros/latex/contrib/njuvisual/njuvisual.pdf
-2022/01/09 | 6296 | systems/win32/miktex/tm/packages/texlogsieve__source.tar.lzma
-2022/01/09 | 6266 | systems/win32/miktex/tm/packages/libertinust1math__source.tar.lzma
-2022/01/09 | 6253 | systems/win32/miktex/tm/packages/aalok.tar.lzma
-2022/01/09 | 61966 | systems/win32/miktex/tm/packages/siunitx.tar.lzma
-2022/01/09 | 603957 | systems/win32/miktex/tm/packages/newtx__doc.tar.lzma
-2022/01/09 | 595008 | graphics/pgf/contrib/pgf-interference/pgf-interference-de.pdf
-2022/01/09 | 5946 | systems/win32/miktex/tm/packages/tipauni.tar.lzma
-2022/01/09 | 592974 | graphics/pgf/contrib/pgf-interference/pgf-interference-en.pdf
-2022/01/09 | 592952 | systems/win32/miktex/tm/packages/easybook__doc.tar.lzma
-2022/01/09 | 58706 | macros/generic/polexpr/polexpr-examples.pdf
-2022/01/09 | 5646 | systems/win32/miktex/tm/packages/garamond-math__source.tar.lzma
-2022/01/09 | 56072 | systems/win32/miktex/tm/packages/tkz-base__source.tar.lzma
-2022/01/09 | 5598 | systems/win32/miktex/tm/packages/marathi.tar.lzma
-2022/01/09 | 5522 | systems/win32/miktex/tm/packages/dbshow.tar.lzma
-2022/01/09 | 5368 | macros/latex/contrib/xurl/doc/xurl.tex
-2022/01/09 | 523 | macros/latex/contrib/xurl/Changes
-2022/01/09 | 5160 | systems/win32/miktex/tm/packages/cellspace__source.tar.lzma
-2022/01/09 | 515035 | systems/win32/miktex/tm/packages/translations__doc.tar.lzma
-2022/01/09 | 5095 | macros/latex/contrib/biblatex-contrib/biblatex-readbbl/doc/biblatex-readbbl.tex
-2022/01/09 | 50799 | macros/latex/contrib/xurl.zip
-2022/01/09 | 4957 | graphics/pstricks/base/Changes
-2022/01/09 | 495524 | systems/texlive/tlnet/archive/tasks.doc.r61541.tar.xz
-2022/01/09 | 492305 | systems/win32/miktex/tm/packages/tasks__doc.tar.lzma
-2022/01/09 | 490805 | systems/win32/miktex/tm/packages/fnpct__doc.tar.lzma
-2022/01/09 | 4879 | macros/latex/contrib/kdpcover/kdpcover.cls
-2022/01/09 | 4822581 | systems/win32/miktex/tm/packages/tcolorbox__doc.tar.lzma
-2022/01/09 | 4767 | macros/generic/polexpr/README.md
-2022/01/09 | 47472 | macros/latex/contrib/xurl/doc/xurl.pdf
-2022/01/09 | 467830 | systems/win32/miktex/tm/packages/enotez__doc.tar.lzma
-2022/01/09 | 4675 | macros/latex/contrib/xurl/latex/xurl.sty
-2022/01/09 | 45340 | systems/win32/miktex/tm/packages/spectralsequences__source.tar.lzma
-2022/01/09 | 4417 | systems/win32/miktex/tm/packages/swfigure.tar.lzma
-2022/01/09 | 43805 | systems/win32/miktex/tm/packages/acro.tar.lzma
-2022/01/09 | 4347 | macros/latex/contrib/ffcode/ffcode.tex
-2022/01/09 | 41 | macros/latex/contrib/biblatex-contrib/biblatex-readbbl/Changes
-2022/01/09 | 40 | macros/latex/contrib/iexec/DEPENDS.txt
-2022/01/09 | 407963 | systems/win32/miktex/tm/packages/garamond-math.tar.lzma
-2022/01/09 | 4062540 | systems/texlive/tlnet/archive/latexindent.win32.r61535.tar.xz
-2022/01/09 | 4044 | systems/win32/miktex/tm/packages/yb-book.tar.lzma
-2022/01/09 | 397140 | systems/win32/miktex/tm/packages/tipauni__doc.tar.lzma
-2022/01/09 | 39428 | macros/generic/polexpr/polexprcore.tex
-2022/01/09 | 3939 | systems/win32/miktex/tm/packages/pascaltriangle__source.tar.lzma
-2022/01/09 | 3938 | systems/win32/miktex/tm/packages/pascaltriangle.tar.lzma
-2022/01/09 | 38770 | systems/win32/miktex/tm/packages/easybook__source.tar.lzma
-2022/01/09 | 38712 | macros/generic/polexpr/polexpr.sty
-2022/01/09 | 384491 | systems/win32/miktex/tm/packages/dbshow__doc.tar.lzma
-2022/01/09 | 379161 | systems/win32/miktex/tm/packages/biblatex-publist__doc.tar.lzma
-2022/01/09 | 377 | macros/latex/contrib/biblatex-contrib/biblatex-readbbl/README
-2022/01/09 | 3757 | macros/latex/contrib/kdpcover/kdpcover.tex
-2022/01/09 | 36765 | systems/win32/miktex/tm/packages/tkz-euclide.tar.lzma
-2022/01/09 | 367403 | systems/win32/miktex/tm/packages/codebox__doc.tar.lzma
-2022/01/09 | 3556 | systems/win32/miktex/tm/packages/chhaya.tar.lzma
-2022/01/09 | 340363 | systems/win32/miktex/tm/packages/cellspace__doc.tar.lzma
-2022/01/09 | 3401 | macros/latex/contrib/ffcode/ffcode.sty
-2022/01/09 | 335456 | systems/win32/miktex/tm/packages/tkz-base__doc.tar.lzma
-2022/01/09 | 334685 | systems/win32/miktex/tm/packages/wrapfig__doc.tar.lzma
-2022/01/09 | 32923 | systems/win32/miktex/tm/packages/texlogsieve.tar.lzma
-2022/01/09 | 326424 | systems/win32/miktex/tm/packages/econ-bst__doc.tar.lzma
-2022/01/09 | 32594 | fonts/newtx/map/newtx.map
-2022/01/09 | 321417 | systems/win32/miktex/tm/packages/sapthesis__doc.tar.lzma
-2022/01/09 | 318172 | systems/texlive/tlnet/archive/sapthesis.doc.r61542.tar.xz
-2022/01/09 | 3145 | macros/latex/contrib/iexec/iexec.tex
-2022/01/09 | 3096292 | systems/win32/miktex/tm/packages/luatexja__doc.tar.lzma
-2022/01/09 | 30443 | systems/win32/miktex/tm/packages/mcf2graph__source.tar.lzma
-2022/01/09 | 30272 | systems/texlive/tlnet/archive/sapthesis.r61542.tar.xz
-2022/01/09 | 29900 | macros/latex/contrib/biblatex-contrib/biblatex-readbbl.zip
-2022/01/09 | 29644 | macros/generic/polexpr/polexpr-examples.tex
-2022/01/09 | 29569 | systems/win32/miktex/tm/packages/srdp-mathematik.tar.lzma
-2022/01/09 | 289459 | systems/win32/miktex/tm/packages/garamond-math__doc.tar.lzma
-2022/01/09 | 2843 | systems/win32/miktex/tm/packages/hvlogos.tar.lzma
-2022/01/09 | 2806 | systems/win32/miktex/tm/packages/kdpcover.tar.lzma
-2022/01/09 | 27 | macros/latex/contrib/ffcode/DEPENDS.txt
-2022/01/09 | 2744 | macros/latex/contrib/iexec/iexec.sty
-2022/01/09 | 2741 | systems/win32/miktex/tm/packages/cellspace.tar.lzma
-2022/01/09 | 2735519 | graphics/pstricks/base/doc/pst-news22.pdf
-2022/01/09 | 2703 | systems/win32/miktex/tm/packages/muling.tar.lzma
-2022/01/09 | 2647 | systems/win32/miktex/tm/packages/hvlogos__source.tar.lzma
-2022/01/09 | 26087 | systems/win32/miktex/tm/packages/mcf2graph.tar.lzma
-2022/01/09 | 2595 | systems/win32/miktex/tm/packages/kdpcover__source.tar.lzma
-2022/01/09 | 25895 | macros/latex/contrib/biblatex-contrib/biblatex-readbbl/doc/biblatex-readbbl.pdf
-2022/01/09 | 2552 | systems/texlive/tlnet/archive/hvlogos.r61538.tar.xz
-2022/01/09 | 254557 | macros/generic/polexpr/polexpr.html
-2022/01/09 | 2543388 | systems/win32/miktex/tm/packages/leadsheets__doc.tar.lzma
-2022/01/09 | 244447 | systems/win32/miktex/tm/packages/yb-book__doc.tar.lzma
-2022/01/09 | 23740 | macros/latex/contrib/njuvisual/njuvisual.dtx
-2022/01/09 | 23359 | systems/win32/miktex/tm/packages/acro__source.tar.lzma
-2022/01/09 | 232304 | systems/win32/miktex/tm/packages/tcolorbox.tar.lzma
-2022/01/09 | 2309 | fonts/newtx/tex/ot1ntxtosf.fd
-2022/01/09 | 2309 | fonts/newtx/tex/ly1ntxtosf.fd
-2022/01/09 | 23052 | systems/win32/miktex/tm/packages/miktex-misc.tar.lzma
-2022/01/09 | 22829 | systems/win32/miktex/tm/packages/aalok__source.tar.lzma
-2022/01/09 | 2275 | fonts/newtx/tex/t1ntxtosf.fd
-2022/01/09 | 2247 | fonts/newtx/tex/ot1ntxosf.fd
-2022/01/09 | 22471 | systems/win32/miktex/tm/packages/marathi__source.tar.lzma
-2022/01/09 | 2242 | fonts/newtx/tex/ly1ntxtlf.fd
-2022/01/09 | 2241 | fonts/newtx/tex/ot1ntxtlf.fd
-2022/01/09 | 2233 | systems/win32/miktex/tm/packages/iexec__source.tar.lzma
-2022/01/09 | 2213 | fonts/newtx/tex/t1ntxosf.fd
-2022/01/09 | 2211 | fonts/newtx/tex/t1ntxtlf.fd
-2022/01/09 | 2203 | fonts/newtx/tex/ot1ntxlf.fd
-2022/01/09 | 2203 | fonts/newtx/tex/ly1ntxlf.fd
-2022/01/09 | 218898 | systems/win32/miktex/tm/packages/luatexja__source.tar.lzma
-2022/01/09 | 2171 | systems/win32/miktex/tm/packages/yb-book__source.tar.lzma
-2022/01/09 | 2169 | fonts/newtx/tex/t1ntxlf.fd
-2022/01/09 | 21563 | systems/win32/miktex/tm/packages/swfigure__source.tar.lzma
-2022/01/09 | 21267 | systems/win32/miktex/tm/packages/leadsheets__source.tar.lzma
-2022/01/09 | 20093 | systems/win32/miktex/tm/packages/econ-bst.tar.lzma
-2022/01/09 | 1960 | fonts/newtx/tex/ly1ntxosf.fd
-2022/01/09 | 1932 | macros/latex/contrib/biblatex-contrib/biblatex-readbbl/latex/biblatex-readbbl.sty
-2022/01/09 | 1931 | systems/win32/miktex/tm/packages/iexec.tar.lzma
-2022/01/09 | 191323 | macros/latex/contrib/ffcode.zip
-2022/01/09 | 19105 | macros/latex/contrib/njuvisual/LICENSE
-2022/01/09 | 190702 | systems/win32/miktex/tm/packages/luatexja.tar.lzma
-2022/01/09 | 187051 | macros/latex/contrib/ffcode/ffcode.pdf
-2022/01/09 | 18576 | graphics/pgf/contrib/pgf-interference/pgf-interference.sty
-2022/01/09 | 18136 | systems/win32/miktex/tm/packages/chhaya__source.tar.lzma
-2022/01/09 | 1811 | macros/latex/contrib/kdpcover/README.md
-2022/01/09 | 1765051 | systems/win32/miktex/tm/packages/spectralsequences__doc.tar.lzma
-2022/01/09 | 1756 | fonts/newtx/tex/ly1ntxth-tosf.fd
-2022/01/09 | 1755 | fonts/newtx/tex/ot1ntxth-tosf.fd
-2022/01/09 | 1733 | fonts/newtx/tex/t1ntxth-tosf.fd
-2022/01/09 | 17228 | systems/win32/miktex/tm/packages/leadsheets.tar.lzma
-2022/01/09 | 1717 | fonts/newtx/tex/ot1ntxth-tlf.fd
-2022/01/09 | 1717 | fonts/newtx/tex/ot1ntxth-osf.fd
-2022/01/09 | 1717 | fonts/newtx/tex/ly1ntxth-tlf.fd
-2022/01/09 | 1717 | fonts/newtx/tex/ly1ntxth-osf.fd
-2022/01/09 | 1696 | fonts/newtx/tex/t1ntxth-osf.fd
-2022/01/09 | 1687 | fonts/newtx/tex/t1ntxth-tlf.fd
-2022/01/09 | 1679 | fonts/newtx/tex/ot1ntxth-lf.fd
-2022/01/09 | 1679 | fonts/newtx/tex/ly1ntxth-lf.fd
-2022/01/09 | 16592 | systems/win32/miktex/tm/packages/easybook.tar.lzma
-2022/01/09 | 1656 | fonts/newtx/tex/t1ntxth-lf.fd
-2022/01/09 | 1638245 | systems/win32/miktex/tm/packages/csvsimple__doc.tar.lzma
-2022/01/09 | 161890 | systems/win32/miktex/tm/packages/pascaltriangle__doc.tar.lzma
-2022/01/09 | 161853 | systems/win32/miktex/tm/packages/aalok__doc.tar.lzma
-2022/01/09 | 1590254 | systems/win32/miktex/tm/packages/swfigure__doc.tar.lzma
-2022/01/09 | 155479 | macros/generic/polexpr.zip
-2022/01/09 | 15490 | systems/win32/miktex/tm/packages/tkz-base.tar.lzma
-2022/01/09 | 1537473 | systems/win32/miktex/tm/packages/libertinust1math__doc.tar.lzma
-2022/01/09 | 150972 | systems/win32/miktex/tm/packages/marathi__doc.tar.lzma
-2022/01/09 | 14630 | systems/win32/miktex/tm/packages/sapthesis.tar.lzma
-2022/01/09 | 143 | macros/latex/contrib/kdpcover/DEPENDS.txt
-2022/01/09 | 141715 | systems/win32/miktex/tm/packages/kaytannollista-latexia__source.tar.lzma
-2022/01/09 | 14102 | systems/win32/miktex/tm/packages/sapthesis__source.tar.lzma
-2022/01/09 | 139334 | systems/win32/miktex/tm/packages/srdp-mathematik__doc.tar.lzma
-2022/01/09 | 13845 | systems/win32/miktex/tm/packages/tipauni__source.tar.lzma
-2022/01/09 | 137947 | systems/win32/miktex/tm/packages/muling__doc.tar.lzma
-2022/01/09 | 13535 | graphics/pgf/contrib/pgf-interference/pgf-interference-de.tex
-2022/01/09 | 135094 | macros/latex/contrib/kdpcover.zip
-2022/01/09 | 13476 | systems/win32/miktex/tm/packages/biblatex-publist__source.tar.lzma
-2022/01/09 | 13387124 | graphics/pstricks/base.zip
-2022/01/09 | 13275 | graphics/pstricks/base/doc/pst-news22.tex
-2022/01/09 | 13248 | graphics/pgf/contrib/pgf-interference/pgf-interference-en.tex
-2022/01/09 | 13084 | systems/win32/miktex/tm/packages/translations.tar.lzma
-2022/01/09 | 127955 | macros/latex/contrib/iexec.zip
-2022/01/09 | 1274 | macros/latex/contrib/ffcode/README.md
-2022/01/09 | 126650 | systems/win32/miktex/tm/packages/iexec__doc.tar.lzma
-2022/01/09 | 1264 | macros/latex/contrib/iexec/README.md
-2022/01/09 | 125289 | graphics/pstricks/base/generic/pstricks.tex
-2022/01/09 | 1252687 | systems/win32/miktex/tm/packages/libertinust1math.tar.lzma
-2022/01/09 | 124370 | macros/latex/contrib/iexec/iexec.pdf
-2022/01/09 | 12403 | systems/win32/miktex/tm/packages/muling__source.tar.lzma
-2022/01/09 | 123267 | systems/win32/miktex/tm/packages/latexindent__source.tar.lzma
-2022/01/09 | 1223192 | systems/win32/miktex/tm/packages/acro__doc.tar.lzma
-2022/01/09 | 1209610 | systems/win32/miktex/tm/packages/siunitx__doc.tar.lzma
-2022/01/09 | 11988 | systems/win32/miktex/tm/packages/fnpct.tar.lzma
-2022/01/09 | 11982 | systems/win32/miktex/tm/packages/dbshow__source.tar.lzma
-2022/01/09 | 11805 | systems/win32/miktex/tm/packages/codebox__source.tar.lzma
-2022/01/09 | 11468 | systems/win32/miktex/tm/packages/csvsimple.tar.lzma
-2022/01/09 | 1146268 | systems/texlive/tlnet/archive/latexindent.doc.r61535.tar.xz
-2022/01/09 | 1141401 | macros/latex/contrib/njuvisual/njuvisual-curves.dtx
-2022/01/09 | 110989 | systems/win32/miktex/tm/packages/kdpcover__doc.tar.lzma
-2022/01/09 | 110419 | systems/win32/miktex/tm/packages/chhaya__doc.tar.lzma
-2022/01/09 | 108146 | systems/win32/miktex/tm/packages/siunitx__source.tar.lzma
-2022/01/09 | 1050430 | systems/win32/miktex/tm/packages/tkz-euclide__source.tar.lzma
-2022/01/09 | 104774 | macros/latex/contrib/kdpcover/kdpcover.pdf
-2022/01/09 | 1024864 | systems/win32/miktex/tm/packages/latexindent__doc.tar.lzma
diff --git a/macros/latex/contrib/chemmacros/README b/macros/latex/contrib/chemmacros/README
index f701e7d2de..ceda07d4e3 100644
--- a/macros/latex/contrib/chemmacros/README
+++ b/macros/latex/contrib/chemmacros/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the CHEMMACROS package v5.11a 2020/11/21
+the CHEMMACROS package v6.0 2022/01/16
comprehensive support for typesetting chemistry documents
@@ -8,7 +8,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/chemmacros/
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2011--2020 Clemens Niederberger
+Copyright 2011--2022 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
@@ -25,40 +25,12 @@ The Current Maintainer of this work is Clemens Niederberger.
The chemmacros package consists of the following files
== STYLE FILES ==
chemmacros.sty
- chemmacros4.sty
- chemmacros5.sty,
== DOCUMENTATION FILES ==
chemmacros-manual.tex
chemmacros-manual.pdf
chemmacros-manual.cls
README
- chemmacros.history
- == MODULE CODE FILES ==
- chemmacros.module.acid.code.tex
- chemmacros.module.all.code.tex
- chemmacros.module.base.code.tex
- chemmacros.module.charges.code.tex
- chemmacros.module.chemformula.code.tex
- chemmacros.module.errorcheck.code.tex
- chemmacros.module.greek.code.tex
- chemmacros.module.isotopes.code.tex
- chemmacros.module.lang.code.tex
- chemmacros.module.mechanisms.code.tex
- chemmacros.module.newman.code.tex
- chemmacros.module.nomenclature.code.tex
- chemmacros.module.orbital.code.tex
- chemmacros.module.particles.code.tex
- chemmacros.module.phases.code.tex
- chemmacros.module.polymers.code.tex
- chemmacros.module.reactions.code.tex
- chemmacros.module.redox.code.tex
- chemmacros.module.scheme.code.tex
- chemmacros.module.spectroscopy.code.tex
- chemmacros.module.symbols.code.tex
- chemmacros.module.thermodynamics.code.tex
- chemmacros.module.tikz.code.tex
- chemmacros.module.units.code.tex
- chemmacros.module.xfrac.code.tex
+ HISTORY
--------------------------------------------------------------------------
If you have any ideas, questions, suggestions or bugs to report, please
feel free to contact me.
diff --git a/macros/latex/contrib/chemmacros/chemmacros-manual.cls b/macros/latex/contrib/chemmacros/chemmacros-manual.cls
deleted file mode 100644
index 7a243d4bfc..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros-manual.cls
+++ /dev/null
@@ -1,383 +0,0 @@
-% --------------------------------------------------------------------------
-% the CHEMFORMULA package
-%
-% typeset chemical compounds and reactions
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.com/cgnieder/chemformula/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ProvidesClass{chemmacros-manual}[2020/02/03]
-
-\LoadClass[load-preamble,add-index]{cnltx-doc}
-\RequirePackage{imakeidx}
-\RequirePackage[utf8]{inputenc}
-
-\RequirePackage[compatibility=newest]{chemmacros}
-\setcnltx{
- package = {chemmacros},
- info = {comprehensive support for typesetting chemistry documents},
- url = https://github.com/cgnieder/chemmacros ,
- authors = Clemens Niederberger ,
- email = contact@mychemistry.eu ,
- abstract = {%
- \centering
- \includegraphics{chemmacros-logo.pdf}
- \par
- } ,
- quote-format = \small\biolinumLF ,
- add-cmds = {
- abinitio, activatechemgreekmapping, AddRxnDesc, anti, aq, aqi,
- ba, bond, bridge,
- cd, ch, changechemgreeksymbol, charrow, chcpd, chemabove, chemalpha,
- chembeta, ChemCleverefSupport, chemdelta, chemDelta,
- ChemFancyrefSupport, chemformula@bondlength, chemgamma, ChemModule,
- chemomega, chemphi, chemPhi, chemsetup, chlewis, chname , cip, cis, ch,
- CNMR,
- data, DeclareChemArrow, DeclareChemBond, DeclareChemBondAlias,
- DeclareChemCharge, DeclareChemEqConstant, declarechemgreekmapping,
- DeclareChemIUPAC, DeclareChemIUPACShorthand, DeclareChemLatin,
- DeclareChemNMR, DeclareChemNucleophile, DeclareChemPartialCharge,
- DeclareChemParticle, DeclareChemPhase, DeclareChemReaction,
- DeclareChemState,
- delm, delp, Delta, dexter, Dfi,
- el, ElPot, endo, entgegen, Enthalpy, enthalpy, entropy,
- fdelm, fdelp, fmch, fminus, fpch, fplus, fscrm, fscrp,
- gas, ghs, ghslistall, ghspic, gibbs, gram,
- hapto, HNMR, Helmholtz, hydrogen,
- IfChemCompatibilityF, IfChemCompatibilityT, IfChemCompatibilityTF, insitu,
- invacuo, isotope, iupac,
- Ka, Kb, Kw,
- laevus, Lfi, listofreactions, lqd,
- makepolymerdelims, mch, mega, meta, mhName,
- NewChemArrow, NewChemBond, NewChemBondAlias,
- NewChemCharge, NewChemEqConstant, newchemgreekmapping, NewChemIUPAC,
- NewChemIUPACShorthand, NewChemLatin, NewChemMacroset, NewChemNMR,
- NewChemNucleophile, NewChemPartialCharge, NewChemParticle, NewChemPhase,
- NewChemReaction, NewChemState,
- newman, nitrogen, NMR, Nu, Nuc,
- orbital, ortho, ox, OX, oxygen,
- para, pch, per, pH, phase, phosphorus, photon, pKa, pKb, pOH, pos,
- positron, Pot, ProvideChemArrow, ProvideChemBond, ProvideChemCharge,
- ProvideChemEqConstant, ProvideChemIUPAC, ProvideChemIUPACShorthand,
- ProvideChemLatin, ProvideChemNMR, ProvideChemNucleophile,
- ProvideChemPartialCharge, ProvideChemParticle, ProvideChemPhase,
- ProvideChemReaction,
- ProvideChemState, prt,
- Rad, redox, RemoveChemIUPACShorthand, RenewChemArrow, RenewChemBond,
- RenewChemCharge, RenewChemEqConstant, renewchemgreekmapping,
- RenewChemIUPAC, RenewChemIUPACShorthand, RenewChemLatin, RenewChemNMR,
- RenewChemNucleophile, RenewChemPartialCharge, RenewChemParticle,
- RenewChemPhase, RenewChemState,
- Sf, scrm, scrp, second, selectchemgreekmapping, setchemformula,
- ShowChemArrow, ShowChemBond, sld, Sod, state, sulfur,
- trans,
- usechemmodule,
- val,
- zusammen
- } ,
- add-silent-cmds = {
- addplot,
- bottomrule,
- cancel, cdot, ce, cee, celsius, centering, chemfig, chemname, clap,
- cnsetup, code, color, cstack, cstsetup,
- DeclareInstance, DeclareSIUnit, definecolor, draw,
- electronvolt, endtikzpicture,
- footnotesize,
- glqq, grqq,
- hertz, hspace,
- includegraphics, intertext, IUPAC,
- joule,
- kelvin, kilo,
- latin, lc, lewis, Lewis, liquid, ltn,
- metre, midrule, milli, mmHg, mole,
- nano, nicefrac, num, numrange,
- ominus, oplus,
- percent, pgfarrowsdeclarealias, pgfarrowsrenewalias,
- renewtagform, rightarrow,
- sample, scriptscriptstyle, setchemfig, sfrac, shade,
- shadedraw, shorthandoff, si, SI, sisetup, square, subsection,
- textcolor, textendash, textsuperscript, tikz, tikzpicture, tiny, toprule,
- upbeta, upeta, upgamma, usetikzlibrary,
- volt, vphantom, vspave,
- xspace,
- z@, z@skip
- } ,
- index-setup = { othercode = \footnotesize , level = \section } ,
- makeindex-setup = { columns = 2 , columnsep = 1em }
-}
-
-\RequirePackage{booktabs,array,longtable}
-
-\RequirePackage{chemfig,cancel,varioref,csquotes}
-
-\RequirePackage[
- a4paper,
- top = .1\paperheight,
- bottom = .1\paperheight,
- left = .2\paperwidth,
- right = .1\paperwidth
-]{geometry}
-
-\def\libertine@figurestyle{LF}
-\RequirePackage{amsmath}
-\undef\lvert \undef\lVert
-\undef\rvert \undef\rVert
-\RequirePackage[libertine]{newtxmath}
-\def\libertine@figurestyle{OsF}
-
-\RequirePackage[biblatex]{embrac}
-\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
-\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
-
-\RequirePackage[accsupp]{acro}
-\acsetup{
- long-format = \scshape ,
- short-format = \scshape
-}
-
-\RequirePackage{fontawesome}
-\RequirePackage{datetime2}
-\DTMsetup{useregional=numeric,datesep=/}
-\newrobustcmd*\chemmacros@add@version[2]{%
- \csdef{chemmacros@ver@#2}{%
- \DTMdate{#1}%
- \csgdef{chemmacros@ver@#2used}{}%
- \csdef{chemmacros@ver@#2}{\DTMdate{#1}}%
- }%
-}
-
-\newrobustcmd*\chemmacros@date[1]{%
- \ifcsdef{chemmacros@ver@#1used}{}{ (\csuse{chemmacros@ver@#1})}}
-\newrobustcmd*\chemmacros@ifnew[1]{\ifcsstring{c_chemmacros_version_tl}{#1}}
-\newrobustcmd*\chemmacros@NEW{\faStarO\ New}
-
-\renewrobustcmd*\sinceversion[1]{%
- \chemmacros@ifnew{#1}%
- {\cnltx@version@note{\textcolor{red}{\chemmacros@NEW}}}%
- {\cnltx@version@note{\GetTranslation{cnltx-introduced}~#1\chemmacros@date{#1}}}%
-}
-\renewrobustcmd*\changedversion[1]{%
- \cnltx@version@note{\GetTranslation{cnltx-changed}~#1\chemmacros@date{#1}}%
-}
-
-\newnote*\sincechanged[2]{%
- \GetTranslation{cnltx-introduced}~#1\chemmacros@date{#1},
- changed with version~#2\chemmacros@date{#2}\chemmacros@ifnew{#2}{ \chemmacros@NEW}{}%
-}
-
-\RenewDocumentEnvironment{commands}{}
- {%
- \cnltx@set@catcode_{12}%
- \let\command\cnltx@command
- \cnltxlist
- }
- {\endcnltxlist}
-
-\RequirePackage{tcolorbox,xsimverb}
-\tcbuselibrary{skins,breakable}
-\tcbset{enhanced,enhanced jigsaw}
-
-\newtcolorbox{bewareofthedog}{
- colback = white ,
- colframe = red ,
- underlay={%
- \path[draw=none]
- (interior.south west)
- rectangle node[red]{\Huge\bfseries !}
- ([xshift=-4mm]interior.north west);
- }%
-}
-
-\newtcolorbox{cnltxcode}[1][]{
- boxrule = 1pt ,
- colback = cnltxbg ,
- colframe = cnltx ,
- arc = 5pt ,
- beforeafter skip = .5\baselineskip ,%
- #1%
-}
-
-\newcommand*\chemmacros@readoptions[1]{%
- \catcode`\^^M=13
- \chemmacros@read@options{#1}%
-}
-
-\begingroup
-\catcode`\^^M=13
-\gdef\chemmacros@read@options#1#2^^M{%
- \endgroup
- \ifblank{#2}{}{\chemmacros@read@options@#2}%
- #1%
- \XSIMfilewritestart*{\jobname.tmp}%
-}%
-\endgroup
-\def\chemmacros@read@options@[#1]{\pgfqkeys{/cnltx}{#1}}
-
-\RenewDocumentEnvironment{sourcecode}{}
- {%
- \begingroup
- \chemmacros@readoptions{%
- \setlength\cnltx@sidebysidewidth
- {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
- \expanded{%
- \noexpand\lstset{
- style=cnltx,
- \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
- {linewidth=\cnltx@sidebysidewidth,}{}%
- \expandonce\cnltx@local@listings@options
- }%
- }%
- \XSIMgobblechars{2}%
- }%
- }
- {%
- \XSIMfilewritestop
- \cnltxcode[breakable]%
- \lstinputlisting[style=cnltx]{\jobname.tmp}%
- \endcnltxcode
- }
-
-\RenewDocumentEnvironment{example}{}
- {%
- \begingroup
- \chemmacros@readoptions{%
- \setlength\cnltx@sidebysidewidth
- {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
- \expanded{%
- \noexpand\lstset{
- style=cnltx,
- \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
- {linewidth=\cnltx@sidebysidewidth,}{}%
- \expandonce\cnltx@local@listings@options
- }%
- }%
- \XSIMgobblechars{2}%
- }%
- }
- {%
- \XSIMfilewritestop
- \ifbool{cnltx@sidebyside}
- {%
- \cnltxcode
- \noindent
- \minipage[c]{\cnltx@sidebysidewidth}%
- \cnltx@pre@source@hook
- \lstinputlisting[style=cnltx] {\jobname.tmp}%
- \cnltx@after@source@hook
- \endminipage\hfill
- \minipage[c]{\cnltx@sidebysidewidth}%
- \cnltx@pre@example@hook
- \input {\jobname.tmp}%
- \cnltx@after@example@hook
- \endminipage
- }
- {%
- \cnltxcode[breakable]%
- \cnltx@pre@source@hook
- \lstinputlisting{\jobname.tmp}%
- \cnltx@after@source@hook
- \tcblower
- \cnltx@pre@example@hook
- \input {\jobname.tmp}%
- \cnltx@after@example@hook
- }%
- \endcnltxcode
- }
-
-\RequirePackage[
- backend=biber,
- style=cnltx,
- sortlocale=en_US,
- indexing=cite]{biblatex}
-\RequirePackage{csquotes,varioref}
-\defbibheading{bibliography}{\section{References}}
-
-\RequirePackage[biblatex]{embrac}[2012/06/29]
-\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
-\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
-
-\chemmacros@add@version{2012-01-28}{3.0}
-\chemmacros@add@version{2012-01-30}{3.0a}
-\chemmacros@add@version{2012-02-03}{3.0b}
-\chemmacros@add@version{2012-02-05}{3.0c}
-\chemmacros@add@version{2012-02-10}{3.0d}
-\chemmacros@add@version{2012-02-19}{3.1}
-\chemmacros@add@version{2012-02-26}{3.1a}
-\chemmacros@add@version{2012-03-03}{3.1b}
-\chemmacros@add@version{2012-03-14}{3.1c}
-\chemmacros@add@version{2012-03-20}{3.2}
-\chemmacros@add@version{2012-05-07}{3.3}
-\chemmacros@add@version{2012-05-13}{3.3a}
-\chemmacros@add@version{2012-05-18}{3.3b}
-\chemmacros@add@version{2012-05-18}{3.3c}
-\chemmacros@add@version{2012-07-24}{3.3d}
-\chemmacros@add@version{2012-08-21}{3.3e}
-\chemmacros@add@version{2012-09-11}{3.4}
-\chemmacros@add@version{2012-10-03}{3.4a}
-\chemmacros@add@version{2013-01-04}{3.4b}
-\chemmacros@add@version{2013-01-28}{3.5}
-\chemmacros@add@version{2013-02-19}{3.5a}
-\chemmacros@add@version{2013-02-26}{3.6}
-\chemmacros@add@version{2013-02-27}{3.6a}
-\chemmacros@add@version{2013-04-19}{3.6b}
-\chemmacros@add@version{2013-07-06}{4.0}
-\chemmacros@add@version{2013-08-07}{4.0a}
-\chemmacros@add@version{2013-08-24}{4.1}
-\chemmacros@add@version{2013-10-28}{4.2}
-\chemmacros@add@version{2013-10-31}{4.2a}
-\chemmacros@add@version{2013-11-04}{4.2b}
-\chemmacros@add@version{2013-11-20}{4.2c}
-\chemmacros@add@version{2013-12-15}{4.2d}
-\chemmacros@add@version{2014-01-09}{4.2e}
-\chemmacros@add@version{2014-01-24}{4.3}
-\chemmacros@add@version{2014-01-29}{4.4}
-\chemmacros@add@version{2014-04-08}{4.5}
-\chemmacros@add@version{2014-06-30}{4.5a}
-\chemmacros@add@version{2014-08-08}{4.6}
-\chemmacros@add@version{2015-02-08}{4.7}
-\chemmacros@add@version{2015-09-11}{5.0}
-\chemmacros@add@version{2015-09-23}{5.1}
-\chemmacros@add@version{2015-10-14}{5.2}
-\chemmacros@add@version{2016-01-13}{5.3}
-\chemmacros@add@version{2016-01-23}{5.3a}
-\chemmacros@add@version{2016-02-10}{5.4}
-\chemmacros@add@version{2016-03-08}{5.5}
-\chemmacros@add@version{2016-05-02}{5.6}
-\chemmacros@add@version{2016-05-04}{5.6a}
-\chemmacros@add@version{2016-06-07}{5.7}
-\chemmacros@add@version{2016-06-08}{5.7a}
-\chemmacros@add@version{2016-10-05}{5.7b}
-\chemmacros@add@version{2016-12-28}{5.7c}
-\chemmacros@add@version{2017-04-17}{5.8}
-\chemmacros@add@version{2017-06-13}{5.8a}
-\chemmacros@add@version{2017-08-28}{5.8b}
-\chemmacros@add@version{2018-03-02}{5.8c}
-\chemmacros@add@version{2019-09-23}{5.8d}
-\chemmacros@add@version{2019-09-27}{5.8e}
-\chemmacros@add@version{2019-09-30}{5.8f}
-\chemmacros@add@version{2019-11-17}{5.9}
-\chemmacros@add@version{2020-01-16}{5.9a}
-\chemmacros@add@version{2020-02-03}{5.10}
-\chemmacros@add@version{2020-03-07}{5.11}
-
-\endinput
diff --git a/macros/latex/contrib/chemmacros/chemmacros-manual.pdf b/macros/latex/contrib/chemmacros/chemmacros-manual.pdf
index bb12caa2fa..d1edf60aac 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 0bc8a5b437..d3cbb31d96 100644
--- a/macros/latex/contrib/chemmacros/chemmacros-manual.tex
+++ b/macros/latex/contrib/chemmacros/chemmacros-manual.tex
@@ -1,4 +1,4 @@
-% !arara: pdflatex
+% !arara: pdflatex: { interaction: nonstopmode }
% !arara: biber
% arara: pdflatex: { interaction: nonstopmode }
% arara: pdflatex: { interaction: nonstopmode }
@@ -16,7 +16,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -32,64 +32,8 @@
% --------------------------------------------------------------------------
\documentclass{chemmacros-manual}
-\DeclareAcronym{ghs}{
- short = ghs ,
- long = Globally Harmonized System of Classification and Labelling of
- Chemicals ,
- pdfstring = GHS ,
- accsupp = GHS
-}
-\DeclareAcronym{eu}{
- short = EU ,
- long = European Union ,
- pdfstring = EU ,
- accsupp = EU
-}
-\DeclareAcronym{iupac}{
- short = iupac ,
- long = International Union of Pure and Applied Chemistry ,
- pdfstring = IUPAC ,
- accsupp = IUPAC
-}
-\DeclareAcronym{UN}{
- short = un ,
- long = United Nations ,
- pdfstring = UN ,
- accsupp = UN
-}
-\DeclareAcronym{dvi}{
- short = dvi ,
- long = device independent file format ,
- pdfstring = DVI ,
- accsupp = DVO
-}
-\DeclareAcronym{pdf}{
- short = pdf ,
- long = portable document file ,
- pdfstring = PDF ,
- accsupp = PDF
-}
-\DeclareAcronym{id}{
- short = id ,
- long = identification string ,
- pdfstring = ID ,
- accsupp = ID
-}
-
-\chemsetup{
- modules = {all,polymers} ,
- greek = newtx ,
- formula = chemformula ,
- chemformula/format = \libertineLF
-}
-
-\sisetup{
- detect-mode=false,
- mode=text,
- text-rm=\libertineLF
-}
+\usepackage[T1]{fontenc}
-\defbibheading{bibliography}{\section{References}}
\addbibresource{\jobname.bib}
\addbibresource{cnltx.bib}
@@ -172,147 +116,33 @@
urldate = {2015-07-16} ,
date = {2015-07-15}
}
+@package{pkg:glossaries-extra,
+ title = {glossaries-extra},
+ author = {Nicola L. C. Talbot},
+ date = {2020-04-01},
+ version = {1.45},
+ url = {https://ctan.org/pkg/glossaries-extra/}
+}
+@package{pkg:xltabular,
+ title = {xltabular},
+ author = {Herbert Voß and Rolf Niepraschk},
+ date = {2020-11-04},
+ version = {0.2e},
+ url = {https://ctan.org/pkg/xltabular/}
+}
\end{filecontents*}
-\DeclareInstance{xfrac}{chemformula-text-frac}{text}
- {
- scale-factor = 1 ,
- denominator-bot-sep = -.2ex ,
- denominator-format = \scriptsize #1 ,
- numerator-top-sep = -.2ex ,
- numerator-format = \scriptsize #1 ,
- slash-right-kern = .05em ,
- slash-left-kern = .05em
- }
-
-\usetikzlibrary{calc,positioning,decorations.pathmorphing,patterns}
-
-% \newpackagename\chemmacros{chemmacros}
-\newcommand*\chemmacrosversion{\csname c_chemmacros_version_tl\endcsname}
\newpackagename\chemformula{chemformula}
\newpackagename\ghsystem{ghsystem}
\newpackagename\chemgreek{chemgreek}
-\renewcommand*\AmS{\hologo{AmS}}
-\newcommand*\TikZ{Ti\textit{k}Z}
-\newcommand*\tablehead[1]{\textrm{\bfseries#1}}
-
-\providecommand*\XyM{%
- X\kern-.30em
- \smash{\raise.50ex\hbox{\char'7}}%
- \kern-.30em M%
-}
-\providecommand*\XyMTeX{\XyM\kern-.1em\TeX}
-
-% \NewChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution
-% \NewChemPhase{\cd}{cd}% condensed phase
-% \NewChemPhase{\lc}{lc}% liquid crystal
-
\newname\hensel{Martin Hensel}
\newname\pedersen{Bj\o rn Pedersen}
-
-\newcommand*\iupaccs[3][]{%
- \command{#2}[\quad\iupac{\csuse{#2}}]
- #3\ifblank{#1}{}{\ifblank{#3}{}{ }An alias for this command is \cs{#1}.}%
-}
-
-% \undef\module
-% \undef\moduleidx
-\newidxcmd\chemmodule{\code{#1}}[ (module)]
-\newidxcmd\tikzdecoration{\code{#1}}[ (\TikZ\ decoration)]
-\AtEndPreamble{%
- \pdfstringdefDisableCommands{%
- \def\chemmodule*#1{\textquotedblleft#1\textquotedblright}%
- }%
-}
-\newidxcmd\sym{\code{#1}}[ (symbol)]
-
-\makeatletter
-\def\cnltx@bash@listings@style{
- language = bash,
- basicstyle = {\sourceformat\color{black}},
- % numbers = left,
- % numberstyle = \tiny,
- xleftmargin = 1em,
- numbersep = .75em,
- gobble = \cnltx@gobble ,
- columns = fullflexible,
- literate =
- {ä}{{\"a}}1
- {ö}{{\"o}}1
- {ü}{{\"u}}1
- {Ä}{{\"A}}1
- {Ö}{{\"O}}1
- {Ü}{{\"U}}1
- {ß}{{\ss}}1 ,
- breaklines = true,
- keepspaces = true,
- breakindent = 1em,
- commentstyle = \color{comment},
- keywordstyle = \color{black}\bfseries ,
- stringstyle = \color{black} ,
- showstringspaces = false ,
- morekeywords = texdoc
-}
-
-\cnltx@expandargs(nx)\lstdefinestyle
- {bash}
- {\expandonce\cnltx@bash@listings@style}
-
-\newcommand*\prompt{}
-\patchcmd\lst@NewLine
- {\hbox{}}% search
- {\hbox{}\prompt}% replace
- {}% success
- {}% failure
-\newsourcecodeenv[
- code-only,
- sourcecode-options = {
- style = bash ,
- deleteindex = [5][keyword5] ,
- deleteindex = [6][keyword6]
- },
- pre-code = \def\prompt{\textasciitilde\space\$\space}
-]{lbash}
-\makeatother
+\newname\leandriis{Sonja K.}
\renewcommand*\dictumauthorformat[1]{#1}
\renewcommand*\raggeddictumtext{}
-\newcommand*\TF{\textcolor{red}{\uline{\code{\textcolor{cs}{\textit{TF}}}}}}
-
-\makeatletter
-\newrobustcmd*\explcsformat[1]{%
- \code{\textbackslash\textcolor{cs}{\detokenize{#1}}}%
-}
-\newidxcmd\explcs{\explcsformat{#1}}[ (expl3)]
-
-\cnltx@deflistitem{\cnltx@explcommand}{\explcs}
-\renewenvironment{commands}
- {%
- \let\command\cnltx@command
- \let\explcommand\cnltx@explcommand
- \cnltxlist
- }
- {\endcnltxlist}
-\newenvironment{tikzcode}
- {%
- \def\arrowtip{\@cnltx@option@item\code}%
- \cnltxlist
- }
- {\endcnltxlist}
-
-\newrobustcmd*\showenv[1]{\beginenv*\code{\{}\env{#1}\code{\}}}
-\makeatother
-
-\ExplSyntaxOn
-\cs_new_protected:Npn \chemboldchecks #1
- {
- \seq_set_map:NNn \l_tmpa_seq \l__chemmacros_if_bf_seq { \code {##1} }
- \seq_use:Nnnn \l_tmpa_seq {,~} {,~} {~#1~}
- }
-\ExplSyntaxOff
-
\AtBeginDocument{\renewcommand*\reftextfaraway[1]{starting on page~\pageref{#1}}}
\usepackage{bookmark}
@@ -320,14 +150,9 @@
\begin{document}
\part{Preliminaries}
-\section{Licence, Requirements and \textsc{README}}\label{sec:licence-requ-readme}
+\section{License}\label{sec:licence-requ-readme}
\license
-\chemmacros\ loads the packages \pkg{expl3}~\cite{bnd:l3kernel} and
-\pkg{xparse}~\cite{bnd:l3packages}. Depending on your usage other packages
-will be loaded. They are mentioned when the corresponding module using the
-package is described.
-
\section{Motivation and Background}\label{sec:motiv-backgr}
This package grew from a small collection of personal helper macros back
in~2010 into a rather big package supporting various different chemical
@@ -367,44 +192,33 @@ will also allow for easy and quick extension in the future. In a way it is a
logical consequence from \chemmacros' history: since version~2.0, \ie, since
the fall of~2011 \chemmacros\ already had modular options.
-The different modules of \chemmacros\ are divided into two groups:
+Since version~6.0 the different modules of \chemmacros\ are divided into three
+groups:
\begin{enumerate}
- \item Internal modules which provide underlying functionality or basic
+ \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).
- \item User modules which provide all the stuff for typesetting.
+ \item Main modules which provide all the stuff for typesetting and which are
+ always loaded.
+ \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}.
\end{enumerate}
-Both groups each are subdivided into two groups: preloaded modules and modules
-which have to be loaded by the programmer (internal modules) or by the
-document author (user modules). Those modules are described in
-parts~\ref{part:preloaded-modules} (preloaded modules)
-and~\ref{part:additional-modules} (additional modules) of this manual.
-
-The above means that not all functionality is available per default. If you
-want to load \emph{all} modules no matter what then you can say:
-\begin{sourcecode}
- \usechemmodule{all}
-\end{sourcecode}
-or
-\begin{sourcecode}
- \chemsetup{modules=all}
-\end{sourcecode}
-which will load all modules which are part of \chemmacros\ (also see
-section~\vref{sec:all-module}). Own modules (see
-section~\vref{sec:own-modules}) are \emph{not} loaded through this, though,
-and still have to be loaded additionally.
-
-In part~\vref{part:preloaded-modules} the preloaded modules are described,
-first the user modules then the internal ones, in
-part~\vref{part:additional-modules} the other available modules are described,
-again the user modules first. In each section the modules are described in
-an alphabetical order.
-
-\subsection{Using \chemmacros' Options}\label{sec:using-chemm-opti}
+
+\subsection{\chemmacros' Options}\label{sec:using-chemm-opti}
Prior to v5.0 \chemmacros\ had quite a number of package options.
-\chemmacros\ v5.0 or higher has none! All of \chemmacros' options are set
-using the command
+\chemmacros\ v6.0 has only two:
+\begin{options}
+ \keybool{minimal}\Default{false}
+ Loads \chemmacros\ with the basic preset of modules.
+ \keyval{modules}{comma separated list of module names}\Default
+ 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
+\cs*{usepackage}. \emph{All} other of \chemmacros' options are set using the
+command
\begin{commands}
\command{chemsetup}[\oarg{module}\marg{option list}]
\chemmacros' setup command.
@@ -448,6 +262,19 @@ set in two ways:
The second way allows to set options belonging to different modules with one
call of \cs{chemsetup}.
+\chemmacros\ has some core options which don't belong to any of the modules
+described in parts~\ref{part:main-modules} and~\ref{part:additional-modules}.
+Those options have no module denoted in the left margin next to their
+descriptions and are also set without specifying a module:
+\begin{sourcecode}
+ \chemsetup{
+ option1 = value ,
+ option2 = value
+ }
+\end{sourcecode}
+Some internal modules may also define core options, \eg, the \chemmodule{lang}
+module, see section~\vref{sec:lang-module}.
+
\subsection{Support Package \chemformula}
\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
@@ -455,206 +282,37 @@ manual. When using \chemmacros\ you can consider the \chemformula\
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. Please see section~\vref{sec:using-mhchem} for
-details and \latin{caveat}s. \emph{The recommendation is to use
- \chemformula.}
+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.}
A historical note: \chemformula\ started as a part of \chemmacros\ in
January~2012. Since July~2013 it is a completely independent package -- from
\chemformula's point of view. It is maintained independently and has a manual
of its own.
-\subsection{Upgrading from version $<5.0$}
-People upgrading from versions $<5.0$ will find that almost everything they
-know from earlier versions is the same in versions $\geq5.0$. But there are
+\subsection{Upgrading from version $5.x$}
+People upgrading from versions $<6.0$ will find that almost everything they
+know from earlier versions is the same in versions $6.x$. But there are
important and \emph{breaking} differences:
\begin{itemize}
- \item \chemmacros\ has no package options any more, all options are set via
- \cs{chemsetup}, also see section~\vref{sec:using-chemm-opti}.
- \item Not all of the features are available per default any more, for some
- the corresponding module has to be loaded explicitly, see
- section~\ref{sec:general-options}. If suddenly some commands or
- environments seem to be undefined this is the most likely reason.
- \item Some option modules have been renamed (\eg, \module*{iupac} is now
- \module{nomenclature}). If you experience strange errors when you upgrade
- your document this is the most likely source.
- \item The command family \cs*{NewChem\ldots}, \cs*{RenewChem\ldots} and
- \cs*{DeclareChem\ldots} has a new member \cs*{ProvideChem\ldots}.
- \item In \cs{iupac} the macro \cs*{-} no longer gives a dash with breaking
- point. Instead \sym*{-} can be used directly\footnote{\cs*{-} is provided
- up to and including v5.2 but is dropped in higher versions.}.
- \item The macro \cs{ox} has another default behaviour (\keyis{pos}{super})
- and the starred version has another effect (\keyis{pos}{top}) than the
- same macro in earlier versions. Now the default behaviour follows
- \acs{iupac} recommendations. A second change is that the atom is now
- treated as a \chemformula\ input (this depends on the setting of the
- \option{formula} option, see~\vref{sec:chemformula-module}).
- \item The syntax of \cs{NewChemReaction} and friends is now different from
- what it used to be. If you have defined your own reaction environments
- you need to adapt!
- \item \chemmacros\ offers a macro \cs{state} which is similar to but
- different from the earlier macro \cs*{State}. \cs*{State} is deprecated.
- There are also differences in the syntax of \cs{enthalpy} \vs\ the earlier
- \cs*{Enthalpy}, \cs{entropy} \vs\ \cs*{Entropy} and \cs{gibbs} \vs\
- \cs*{Gibbs}. The uppercase versions are deprecated. The macro
- \cs{NewChemState} also has a different syntax now.
- \item At various places in the code improvements and fixes have been made,
- too many to list them here. You should keep an open eye and first of all
- read the manual closely.
+ \item The compatibility mode and all its commands have been dropped.
+ \item The option \option{modules} now is a load-time option and cannot be
+ set through \cs{chemsetup} any more. The command \cs{usechemmodule} has
+ been dropped.
+ \item Per default \emph{all} modules are now loaded. A new option
+ \option{minimal} allows to load \chemmacros\ with smallest subset
+ necessary. Then additional modules can be added with the
+ \option{modules}.
+ \item A new module \module{reactants} has been added, thanks to \leandriis.
\end{itemize}
-\subsection{Compatibility Mode}
-
-\subsubsection{For Users}
-It is actually not true that \chemmacros' has no package options any more. It
-has one very important package option:
-\begin{options}
- \keychoice{compatibility}{\meta{version},newest,latest}\Default{\chemmacrosversion}
- Let's you specify the version of \chemmacros\ you want to use. Any
- version earlier than 5.0 will load v4.7. \ie, the last version before
- \chemmacros\ got its modular structure\footnote{Mostly: the loaded v4.7
- has got a few fixes}. Not using the option will always load the newest
- version.
-
- Both values \code{newest} and \code{latest} will choose the latest version
- available.
-\end{options}
-
-In your document you can check for the compatibility mode. For the following
-functions it is important to understand the rules: \emph{greater} means
-\emph{newer}. The version number is \emph{not} a usual decimal number! The
-syntax for \meta{version} is \meta{major}\code{.}\meta{minor}\meta{optional
- subrelease}. This means that a version~5.11 is \emph{newer} than a
-version~5.7! In the same way \emph{less} means \emph{older}. As last
-example: 5.10~is \emph{newer} (greater) than~5.1. \meta{optional subrelease}
-is a lowercase letter which might or might not be present in a version number.
-Version~5.7b is newer than~5.7a which in turn is newer than~5.7.
-\begin{commands}
- \expandable\command{IfChemCompatibilityTF}[\marg{comp}\marg{version}%
- \marg{true}\marg{false}]
- Checks the value given through the option \option{compatibility} against
- \meta{version} using \meta{comp} and either leaves \meta{true} or
- \meta{false} in the input stream. \meta{comp} can be one of \code{<},
- \code{<=}, \code{=}, \code{>=} or \code{>}.
- \expandable\command{IfChemCompatibilityT}[\marg{comp}\marg{version}\marg{true}]
- Checks the value given through the option \option{compatibility} against
- \meta{version} using \meta{comp} and leaves \meta{true} in the input
- stream if the check is logically true. \meta{comp} can be one of
- \code{<}, \code{<=}, \code{=}, \code{>=} or \code{>}.
- \expandable\command{IfChemCompatibilityF}[\marg{comp}\marg{version}\marg{false}]
- Checks the value given through the option \option{compatibility} against
- \meta{version} using \meta{comp} and leaves \meta{false} in the input
- stream if the check is logically false. \meta{comp} can be one of
- \code{<}, \code{<=}, \code{=}, \code{>=} or \code{>}.
-\end{commands}
-
-A possible usage:
-\begin{sourcecode}
- \IfChemCompatibilityT{>=}{5.0}{\usechemmodule{all}}
-\end{sourcecode}
-
-Loading \chemmacros\ with \keyis{compatibility}{4.7} also allows to use the
-package options from that version:
-\begin{sourcecode}
- \usepackage[compatibility=4.7,language=german]{chemmacros}
-\end{sourcecode}
-
-\subsubsection{For Module Writers}
-For future versions the aim is not to make such breaking changes again. While
-we never know what the future actually will bring \chemmacros\ now has the
-tools for tying code to a version number:
-\begin{commands}
- \expandable\explcommand{chemmacros_if_compatibility:nn}[\TF\ \marg{comp}
- \marg{version} \marg{true} \marg{false}]
- expl3 version of \cs{IfChemCompatibilityTF}.
-\end{commands}
-
-In modules one can try adding code for a certain version or range of versions:
-\begin{commands}
- \command{ChemCompatibility}[\marg{version} \meta{code} \cs{EndChemCompatibility}]
- Leaves \meta{code} in the input stream if the compatibility version $x$
- given by \option{compatibility} matches \meta{version}
- ($x=\text{\meta{version}}$).
- \command{ChemCompatibilityFrom}[\marg{version} \meta{code} \cs{EndChemCompatibility}]
- Leaves \meta{code} in the input stream if the compatibility version $x$
- given by \option{compatibility} matches \meta{version} or newer. This
- means \meta{version} is the \emph{oldest} version allowed
- ($x\geq\text{\meta{version}}$).
- \command{ChemCompatibilityTo}[\marg{version} \meta{code} \cs{EndChemCompatibility}]
- \changedversion{5.8a}Leaves \meta{code} in the input stream if the
- compatibility version $x$ given by \option{compatibility} matches any
- version up to and \emph{excluding} \meta{version}. This means
- \meta{version} is the \emph{oldest} version \emph{not} allowed
- ($x<\text{\meta{version}}$).
- \command{ChemCompatibilityBetween}[\marg{version 1}\marg{version 2} \meta{code}
- \cs{EndChemCompatibility}]
- \changedversion{5.8a}Leaves \meta{code} in the input stream if the
- compatibility version $x$ given by \option{compatibility} lies between and
- \emph{including} \meta{version 1} up to and \emph{excluding} \meta{version 2}
- ($\text{\meta{version 1}}\leq x<\text{\meta{version 2}}$).
- \command{EndChemCompatibility}
- This macro \emph{must} end each of the \cs*{ChemCompatibility\ldots}
- macros.
-\end{commands}
-
-You may refer to the current version of \chemmacros\ with the following
-tokenlists:
-\begin{commands}
- \explcommand{c_chemmacros_date_tl}
- The current release date: \enquote{\csname
- c_chemmacros_date_tl\endcsname}.
- \explcommand{c_chemmacros_version_major_number_tl}
- The current major version: \enquote{\csname
- c_chemmacros_version_major_number_tl\endcsname}.
- \explcommand{c_chemmacros_version_minor_number_tl}
- The current minor version: \enquote{\csname
- c_chemmacros_version_minor_number_tl\endcsname}.
- \explcommand{c_chemmacros_version_number_tl}
- The current version number: \enquote{\csname
- c_chemmacros_version_number_tl\endcsname}.
- \explcommand{c_chemmacros_version_subrelease_tl}
- The current sub-release: \enquote{\csname
- c_chemmacros_version_subrelease_tl\endcsname}.
- \explcommand{c_chemmacros_version_tl}
- The current version: \enquote{\csname c_chemmacros_version_tl\endcsname}.
- \explcommand{c_chemmacros_info_tl}
- The package information: \enquote{\csname
- c_chemmacros_info_tl\endcsname}.
-\end{commands}
-
-\section{General Options}\label{sec:general-options}
-
-\chemmacros\ has some core options which don't belong to any of the modules
-described in parts~\ref{part:preloaded-modules}
-and~\ref{part:additional-modules}. Those options have no module denoted in
-the left margin next to their descriptions and are also set without specifying
-a module:
-\begin{sourcecode}
- \chemsetup{
- option1 = value ,
- option2 = value
- }
-\end{sourcecode}
-
-Two of those options are explained now:
-\begin{options}
- \keyval{modules}{comma separated list of module names}\Default
- With this option you can specify which modules you want to load.
- Alternatively you can use \cs{usechemmodule}\marg{comma separated list of
- module names}.
- \keyval{greek}{mapping}\Default
- Explicitly specify which mapping should be used by the \chemgreek\
- package~\cite{pkg:chemgreek}. For details about what this means please
- refer to section~\vref{sec:greek-module}.
-\end{options}
-
-Some internal modules may also define core options, \eg, the \chemmodule{lang}
-module, see section~\vref{sec:lang-module}.
+\part{Main Modules}\label{part:main-modules}
-\part{The Preloaded Modules}\label{part:preloaded-modules}
+The modules described in this part are always loaded by \chemmacros, even in
+the minimal setup.
-\section{User Modules}
-\subsection{The \chemmodule*{acid-base} Module}\label{sec:acid-base-module}
+\section{The \chemmodule*{acid-base} Module}\label{sec:acid-base-module}
Easy representation of \pH, \pKa \ldots
\begin{commands}
@@ -738,11 +396,11 @@ This is how \cs{Ka} is defined:
\NewChemEqConstant\Ka{K-acid}{\mathrm{a}}
\end{sourcecode}
-\subsection{The \chemmodule*{charges} Module}\label{sec:charges-module}
+\section{The \chemmodule*{charges} Module}\label{sec:charges-module}
The \chemmodule{charges} module loads the module \chemmodule{chemformula}.
-\subsubsection{Charge Symbols}
+\subsection{Charge Symbols}
\begin{commands}
\command{fplus} \fplus\ formal positive charge
\command{fminus} \fminus\ formal negative charge
@@ -760,7 +418,7 @@ The \chemmodule{charges} module loads the module \chemmodule{chemformula}.
usage in \pkg{chemfig}'s formulas).
\end{commands}
-\subsubsection{Ion Charges}\label{sec:ion-charges}
+\subsection{Ion Charges}\label{sec:ion-charges}
Simple displaying of (real) charges. It is worth noting that these commands
really are relicts from a time when \chemmacros\ tried hard to be compliant
with \pkg{mhchem} and \chemformula\ didn't exist, yet. \textbf{They are still
@@ -781,7 +439,7 @@ with \pkg{mhchem} and \chemformula\ didn't exist, yet. \textbf{They are still
A\pch\ B\mch[3] C\fpch[2] D\fmch
\end{example}
-\subsubsection{Partial Charges and Similar Stuff}\label{sec:part-charg-simil}
+\subsection{Partial Charges and Similar Stuff}\label{sec:part-charg-simil}
The next ones probably are seldomly needed but nevertheless useful:
\begin{commands}
@@ -800,10 +458,10 @@ section~\vref{sec:redox-module}) or with the \pkg{chemfig} package:
redox/pos = top
}
\ch{"\ox{\delp,H}" -{} "\ox{\delm,Cl}"} \hspace*{1cm}
- \chemfig{\chemabove[3pt]{\lewis{246,Br}}{\delm}-\chemabove[3pt]{H}{\delp}}
+ \chemfig{\chemabove[3pt]{\charge{90=\|,180=\|,270=\|}{Br}}{\delm}-\chemabove[3pt]{H}{\delp}}
\end{example}
-\subsubsection{Charge Options}
+\subsection{Charge Options}
\begin{options}
\keychoice{circled}{formal,\default{all},none}\Module{charges}\Default{formal}
@@ -820,7 +478,7 @@ section~\vref{sec:redox-module}) or with the \pkg{chemfig} package:
section~\ref{sec:own-charge-macros}).
\end{options}
-\subsubsection{Own Charge Macros}\label{sec:own-charge-macros}
+\subsection{Own Charge Macros}\label{sec:own-charge-macros}
Just in case the existing macros don't fit you needs there are commands for
defining new ones or modifying the existing ones. These commands define
macros like those described in section~\vref{sec:ion-charges}.
@@ -863,13 +521,13 @@ An example of usage is the definition of the existing partial charge macros:
\NewChemPartialCharge\fdelm{\fminus}
\end{sourcecode}
-\subsection{The \chemmodule*{nomenclature} Module}\label{sec:nomenclature-module}
+\section{The \chemmodule*{nomenclature} Module}\label{sec:nomenclature-module}
The \chemmodule{nomenclature} module loads the \chemmodule{tikz} module. It
also loads the package \pkg{scrlfile} which is part of the
\KOMAScript\ bundle~\cite{bnd:koma-script}.
-\subsubsection{The \cs*{iupac} Command}
+\subsection{The \cs*{iupac} Command}
Similar to the \pkg{bpchem} package~\cite{pkg:bpchem} \chemmacros\ provides a
command\footnote{The idea and initial implementation is shamelessly borrowed
@@ -981,9 +639,9 @@ Table~\vref{tab:iupac_modes} demonstrates the different modes.
\end{tabular}
\end{table}
-\subsubsection{Macros Defined (Not Only) For Usage in \cs*{iupac}}
+\subsection{Macros Defined (Not Only) For Usage in \cs*{iupac}}
-\paragraph{One-letter Macros}\label{sec:one-letter-commands}
+\subsection{One-letter Macros}\label{sec:one-letter-commands}
For some of the macros explained in this section one-letter commands are
defined -- with a \latin{caveat} in mind, though: they are not actively
recommended. One-letter commands seldomly have meaningful names and often
@@ -995,7 +653,7 @@ the command \cs{p} (for things like \pH) which is and will remain an official
command (see section~\vref{sec:acid-base-module}). For all other one-letter
macros alternatives with more meaningful names exist.
-\paragraph{Greek Letters}\label{par:greek_letters}
+\subsection{Greek Letters}\label{par:greek_letters}
Greek letters in compound names are typeset upright. Here are a few examples
for the existing macros:
@@ -1042,7 +700,7 @@ to use which use above mentioned commands to print Greek letters inside
-chloro|poly(1,4-phenylene|methylene)}
\end{example}
-\paragraph{Hetero Atoms and added Hydrogen}
+\subsection{Hetero Atoms and added Hydrogen}
Attachments to hetero atoms and added hydrogen atoms are indicated by italic
letters~\cite{iupac:greenbook}. \chemmacros\ defines a few macros for the
@@ -1062,7 +720,7 @@ most common ones.
\iupac{\oxygen-ethyl hexanethioate}
\end{example}
-\paragraph{Cahn-Ingold-Prelog}\label{par:cip}
+\subsection{Cahn-Ingold-Prelog}\label{par:cip}
\begin{commands}
\command{cip}[\marg{conf}]
Typeset Cahn-Ingol-Prelog descriptors, \eg: \cs{cip}\Marg{R,S}
@@ -1087,18 +745,18 @@ further:
\keyval{cip-inner-format}{format}\Default{\cs*{itshape}}
\sinceversion{5.8}The format of the entries in \cs{cip}. This format
works additive to the outer format.
- \keyval{cip-number-format}{format}\Default{\cs*{itshape}}
- \sinceversion{5.8}The format of numbers in \cs{cip}. This format works
+ \keyval{cip-number-format}{format}\Default{\cs*{upshape}}
+ \changedversion{6.0}The format of numbers in \cs{cip}. This format works
additive to the outer format and is applied to arabic figures only.
\end{options}
-\paragraph{Fischer}
+\subsection{Fischer}
\begin{commands}
\iupaccs[D]{dexter}{The dexter descriptor.}
\iupaccs[L]{laevus}{The laevus descriptor.}
\end{commands}
-\paragraph{cis/trans, zusammen/entgegen, syn/anti \& tert}
+\subsection{cis/trans, zusammen/entgegen, syn/anti \& tert}
\begin{itemize}
\item \cs{cis} \iupac{\cis} \quad \cs{trans} \iupac{\trans}
\item \cs{fac} \iupac{\fac} \quad \cs{mer} \iupac{\mer}
@@ -1110,7 +768,7 @@ further:
An alias for \cs{entgegen} is \cs{E} and an alias for \cs{zusammen} is
\cs{Z}.
-\paragraph{ortho/meta/para}
+\subsection{ortho/meta/para}
\begin{center}
\cs{ortho} \iupac{\ortho} \quad
\cs{meta} \iupac{\meta} \quad
@@ -1128,7 +786,7 @@ Although these commands are provided I like to cite
names.
\end{cnltxquote}
-\paragraph{Absolute Configuration}
+\subsection{Absolute Configuration}
\begin{commands}
\command{Rconf}[\oarg{letter}]
\cs{Rconf}: \Rconf \quad \cs{Rconf}\oarg{}: \Rconf[]
@@ -1136,7 +794,7 @@ Although these commands are provided I like to cite
\cs{Sconf}: \Sconf \quad \cs{Sconf}\oarg{}: \Sconf[]
\end{commands}
-\paragraph{Coordination Chemistry}
+\subsection{Coordination Chemistry}
\chemmacros\ provides a few commands useful in coordination chemistry:
\begin{commands}
@@ -1164,7 +822,7 @@ Two options allow customization:
The default behaviour\sinceversion{5.8} of \cs{hapto} and \cs{dento} has
changed with version~5.8 to follow \ac{iupac} recommendations.
-\paragraph{Examples}
+\subsection{Examples}
\begin{example}
\iupac{\dexter-Wein|s\"aure} =
\iupac{\cip{2S,3S}-Wein|s\"aure} \par
@@ -1177,7 +835,7 @@ changed with version~5.8 to follow \ac{iupac} recommendations.
\iupac{1,3-Di|methyl|benzene}
\end{example}
-\subsubsection{Own \cs*{iupac} Macros And Shorthands}
+\subsection{Own \cs*{iupac} Macros And Shorthands}
If you find any commands missing you can define them using
\begin{commands}
@@ -1237,7 +895,7 @@ existing ones:
Deletes an existing \ac{iupac} shorthand.
\end{commands}
-\subsubsection{Latin Phrases}
+\subsection{Latin Phrases}
\chemmacros\ provides a command for typesetting latin phrases:
\begin{commands}
@@ -1273,12 +931,12 @@ You can change the appearance with this option:
\changedversion{5.7}Sets the format for the latin phrases.
\end{options}
-\subsection{The \chemmodule*{particles} Module}\label{sec:particles-module}
+\section{The \chemmodule*{particles} Module}\label{sec:particles-module}
The \chemmodule{particles} module loads the modules \chemmodule{charges} and
\chemmodule{chemformula}.
-\subsubsection{Provided Particle Macros}
+\subsection{Provided Particle Macros}
The \chemmodule{particles} defines a number of macros which can be used for
typesetting common particles in the running text. Most of them don't make
much sense in \pkg{chemformula}~\cite{pkg:chemformula}'s \cs{ch}, though,
@@ -1309,7 +967,7 @@ Both options can of course also be set with \cs{chemsetup}.
\ba\ \Nuc
\end{example}
-\subsubsection{Defining Own Particle Macros}\label{sec:defin-own-part}
+\subsection{Defining Own Particle Macros}\label{sec:defin-own-part}
There are two sets of macros, one for defining particles and one for defining
nucleophiles.
@@ -1373,11 +1031,11 @@ An example of usage is the definition of the existing nucleophile macros:
A macro defined this way will have an optional argument for the
\option{elpair} option.
-\subsection{The \chemmodule*{phases} Module}\label{sec:phases-module}
+\section{The \chemmodule*{phases} Module}\label{sec:phases-module}
The \chemmodule{phases} module loads the \chemmodule{chemformula} modul.
-\subsubsection{Basics}
+\subsection{Basics}
These commands are intended to indicate the phase of a compound.
\begin{center}
@@ -1414,7 +1072,7 @@ There are two options to customize the output:
All those phase commands have an optional argument:
\begin{example}[side-by-side]
- \ch{H2O "\lqd[\SI{5}{\celsius}]"}
+ \ch{H2O "\lqd[\qty{5}{\celsius}]"}
\end{example}
There is also a generic phase command:
@@ -1424,7 +1082,7 @@ There is also a generic phase command:
denote a phase for which there is no phase command, yet.
\end{commands}
-\subsubsection{Define Own Phases}
+\subsection{Define Own Phases}
Depending on the subject of your document you might need to indicate other
states of aggregation. You can easily define them.
\begin{commands}
@@ -1456,7 +1114,7 @@ states of aggregation. You can easily define them.
\ch{NaOH\aqi} \ch{H2O\cd} \ch{U\phase{cr}} \ch{A\lc}
\end{example}
-\subsubsection{Language Dependencies}\label{sec:lang-depend}
+\subsection{Language Dependencies}\label{sec:lang-depend}
For each phase command a translation into the custom language can be defined.
If a phase is declared with \cs{NewChemPhase} no translation exists and
for every \pkg{babel} language the literal string is used that was provided
@@ -1477,7 +1135,7 @@ phase command you defined without leading backslash.
See section~\vref{sec:lang-module} for predefined translations and general
language options of \chemmacros.
-\subsection{The \chemmodule*{symbols} Module}\label{sec:symbols-module}
+\section{The \chemmodule*{symbols} Module}\label{sec:symbols-module}
The \chemmodule{symbols} module defines a few symbols chemists need now and
then. It loads the package \pkg{amstext}~\cite{pkg:amstext}.
@@ -1490,136 +1148,12 @@ then. It loads the package \pkg{amstext}~\cite{pkg:amstext}.
The uppercase delta used in \state[superscript=]{H} for example.
\end{commands}
-\section{Internal Modules}
-\subsection{The \chemmodule*{base} Module}\label{sec:base-module}
-
-The \chemmodule{base} module is the core module of \chemmacros. It defines
-some tools which can (and should) be used in other modules. This means this
-section is only interesting for you if you plan to write a module yourself
-(see section~\vref{sec:own-modules} for details).
-
-This module requires the packages \pkg{bm}~\cite{pkg:bm},
-\pkg{amstext}~\cite{pkg:amstext}, and \pkg{etoolbox}~\cite{pkg:etoolbox}.
-
-This module also provides \cs{chemsetup} and the option \option{modules}.
-
-It also provides a number of (expl3) macros which may be used in other
-modules. In the macro descriptions below \TF\ denotes that a \code{T}, an
-\code{F} and a \code{TF} variant exist. In case of an expandable conditional
-(\expandablesymbol) also the predicate variant is available.
-\begin{commands}
- \expandable\explcommand{chemmacros_if_loaded:nn}[\TF\
- \Marg{package|class} \marg{name} \marg{true} \marg{false}]
- Checks if package (or class) \meta{name} has been loaded. Also works after
- begin document.
- \expandable\explcommand{chemmacros_if_package_loaded:n}[\TF\ \marg{name}
- \marg{true} \marg{false}]
- Checks if package \meta{name} has been loaded. Also works after begin
- document.
- \expandable\explcommand{chemmacros_if_class_loaded:n}[\TF\ \marg{name}
- \marg{true} \marg{false}]
- Checks if class \meta{name} has been loaded. Also works after begin
- document.
- \explcommand{chemmacros_nobreak:}
- Inserts a penalty of \num{10000}.
- \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.
- \expandable\explcommand{chemmacros_if_is_int:n}[\TF\ \marg{input} \marg{true}
- \marg{false}]
- Checks if \meta{input} is an integer or something else.
- \explcommand{chemmacros_if_bold:}[\TF\ \marg{true} \marg{false}]
- 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
- \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.
- \explcommand{chemmacros_math:n}[ \marg{text}]
- Ensures that \meta{text} is placed in math mode.
- \explcommand{chemmacros_new_macroset:nnn}[ \marg{name} \marg{arg spec}
- \marg{internal command call}]
- \changedversion{5.3b}A command to define a set of macros
- \cs*{NewChem\meta{name}}, \cs*{RenewChem\meta{name}},
- \cs*{DeclareChem\meta{name}} and \cs*{ProvideChem\meta{name}} where the
- first letter of \meta{name} is converted to uppercase, other letters are
- kept unchanged. \meta{arg spec} is any valid argument specification for
- \pkg{xparse}'s \\
- \cs{DeclareDocumentCommand}~\cite{bnd:l3packages}. \meta{internal command
- call} should be a macro which makes definitions \emph{without} error
- checks, \ie, define new macros or redefine existing ones like \cs*{def}
- does. This macro just should get the arguments passed on to. Have a look
- at the example below.
- \explcommand{chemmacros_new_environment_macroset:nnn}[ \marg{name} \marg{arg spec}
- \marg{internal command call}]
- Like \explcs{chemmacros_new_macroset:nnn} but for environments.
- \command{NewChemMacroset}[\sarg\marg{name}\marg{arg spec}\marg{internal
- command call}]
- A non-expl3 version of \explcs{chemmacros_new_macroset:nnn} for \LaTeXe\
- programmers. The starred version calls
- \explcs{chemmacros_new_environment_macroset:nnn}.
- \explcommand{chemmacros_add_cleveref_support:nnnnn}[ \marg{counter}
- \marg{singular} \marg{plural} \marg{uppercase singular} \marg{uppercase
- plural}]
- A\sinceversion{5.6} command to add suiting names for a counter for the
- \pkg{cleveref} package's \cs*{cref} commands. This command acts at the
- end of the preamble and only if a user hasn't provided definitions with
- \cs*{crefname} already.
- \command{ChemCleverefSupport}[\marg{counter}\marg{singular}\oarg{uppercase
- singular}\marg{plural}\oarg{uppercase plural}]
- \sinceversion{5.6}\LaTeXe-version of
- \explcs{chemmacros_add_cleveref_support:nnnnn}.
- \explcommand{chemmacros_add_fancyref_support:nnn}[ \marg{prefix} \marg{name}
- \marg{uppercase name}]
- A\sinceversion{5.6} command to add suiting names for a counter for the
- \pkg{fancyref} package's \cs*{fref} commands. This command acts at the
- end of the preamble and doesn't override definitions made by the users.
- \command{ChemFancyrefSupport}[\marg{prefix}\marg{name}\oarg{uppercase name}]
- \sinceversion{5.6}\LaTeXe-version of
- \explcs{chemmacros_add_fancyref_support:nnnnn}.
-\end{commands}
-This is how the macros \cs{NewChemParticle}, \cs{RenewChemParticle},
-\cs{DeclareChemParticle} and \cs{ProvideChemParticle} were defined:
-\begin{sourcecode}
- \NewChemMacroset {Particle} {mm}
- { \chemmacros_define_particle:Nn #1 {#2} }
-\end{sourcecode}
-
-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}
- \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}
- \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}]
- 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}]
- 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
- the command is used then \meta{code} is inserted immediately.
-\end{commands}
-
-\subsection{The \chemmodule*{chemformula} Module}\label{sec:chemformula-module}
+\section{The \chemmodule*{chemformula} Module}\label{sec:chemformula-module}
The \chemmodule{chemformula} module loads the \pkg{amstext}
package~\cite{pkg:amstext} and the \chemmodule{charges} module.
-\subsubsection{For Users}
+\subsection{For Users}
There are different packages which provide means for typesetting chemical
formulas:
\begin{itemize}
@@ -1662,7 +1196,7 @@ the package is loaded or not. In this case if you want to use another method
you'll have to choose manually. \emph{All automatic choices only happen at the
end of the preamble}.
-\paragraph{Using the \pkg*{chemformula} Package}
+\subsection{Using the \pkg*{chemformula} Package}
If you set \keyis{formula}{chemformula} the \chemmodule{chemformula} module
makes it possible that you can set all \chemformula\ options via the
\cs{chemsetup} command using the module \module{chemformula}, for example:
@@ -1676,7 +1210,7 @@ provided by the \chemmodule{reactions} module.
\emph{This method is the recommended choice!}
-\paragraph{Using the \pkg*{mhchem} Package}\sinceversion{5.1}\label{sec:using-mhchem}
+\subsection{Using the \pkg*{mhchem} Package}\sinceversion{5.1}\label{sec:using-mhchem}
If you set \keyis{formula}{mhchem} the \chemmodule{chemformula} 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:
@@ -1703,7 +1237,7 @@ There are some \latin{caveat}s if you use this method:
\chemmacros' mechanism).
\end{itemize}
-\paragraph{Using the \pkg*{chemfig} Package}\sinceversion{5.6}\label{sec:using-chemfig}
+\subsection{Using the \pkg*{chemfig} Package}\sinceversion{5.6}\label{sec:using-chemfig}
Everywhere where \chemmacros\ typesets chemical formulas \pkg{chemfig}'s macro
\cs{printatom} is used, for example in the reaction environments provided by
the \chemmodule{reactions} module.
@@ -1723,7 +1257,7 @@ There are some \latin{caveat}s if you use this method:
methods \pkg{chemformula} or \pkg{mhchem} instead.
\end{itemize}
-\paragraph{Using the \pkg*{chemist} Package}\sinceversion{5.6}\label{sec:using-chemist}
+\subsection{Using the \pkg*{chemist} Package}\sinceversion{5.6}\label{sec:using-chemist}
Everywhere where \chemmacros\ typesets chemical formulas \pkg{chemist}'s macro
\cs{ChemForm} is used, for example in the reaction environments provided by
the \chemmodule{reactions} module.
@@ -1745,7 +1279,7 @@ There are some \latin{caveat}s if you use this method:
a number of chemical reaction environments itself.}.
\end{itemize}
-\subsubsection{For Module Writers}
+\subsection{For Module Writers}
There are two macros for module writers:
\begin{commands}
@@ -1763,12 +1297,7 @@ There are two macros for module writers:
\cs*{chemmacros@reaction}.
\end{commands}
-\subsection{The \chemmodule*{errorcheck} Module}\label{sec:errorcheck-module}
-The\sinceversion{5.2} \chemmodule{errorcheck} module provides some rudimentary
-support for giving users more meaningful messages when they use a command or
-environment provided by a module that they haven't loaded.
-
-\subsection{The \chemmodule*{greek} Module}\label{sec:greek-module}
+\section{The \chemmodule*{greek} Module}\label{sec:greek-module}
The \chemmodule{greek} module loads the \pkg{chemgreek}
package~\cite{pkg:chemgreek}.
@@ -1805,135 +1334,11 @@ yourself, for example:
\end{sourcecode}
For further details on mappings please refer to \chemgreek's manual.
-\subsection{The \chemmodule*{lang} Module}\label{sec:lang-module}
-
-The \chemmodule{lang} module provides language support for \chemmacros. It
-loads the package \pkg{translations}~\cite{pkg:translations}.
-
-\subsubsection{Information For Users}\label{sec:information-users}
-
-This module defines the following option:
-\begin{options}
- \keychoice{language}{auto,\meta{language}}\Default{auto}
- If set to \code{auto} \chemmacros\ will detect the language used by
- \pkg{babel}~\cite{pkg:babel} or \pkg{polyglossia}~\cite{pkg:polyglossia}
- automatically, the fallback translation is English and will be used if no
- translation for the actual language is available. Any language known to
- the \pkg{translations} package is a valid value for \meta{language}.
-\end{options}
-
-The language chosen via \option{language} is used for translation of certain
-strings in different places all over \chemmacros. They are mentioned in the
-places when the corresponding function of \chemmacros\ is explained.
-
-Translation is done with the help of the \pkg{translations} package, available
-translation keys are listed in section~\vref{sec:avail-transl-keys}.
-
-\subsubsection{Available Translation Keys}\label{sec:avail-transl-keys}
-
-Table~\vref{tab:translation-keys} lists all predefined translations of the
-available keys. \emph{Some of the translations have changed in
- version~5.6\changedversion{5.6}.} The \chemmodule{lang} module doesn't
-provide the translations themselves -- they are provided by the corresponding
-modules. A translation key is a unique string\footnote{That is, a string
- using the definition for strings used for expl3, i.e., converted to a series
- of category code~12 characters..} of characters. Each key is used to
-identify a replacement text which depends on the current language or the
-language set through the \option{language} option. For each key at least the
-English fallback translation is provided, for most also the German translation
-is provided. For a few keys also other translations are provided. If you
-find that a translation for your language is missing you can provide it in the
-preamble:
-\begin{commands}
- % \command{DeclareTranslation}[\marg{language}\marg{key}\marg{translation}]
- % Defines a translation of key \meta{key} for the language \meta{language}.
- % No error will be raised if a translation of \meta{key} already exists.
- % This command can only be used in the preamble and is defined by the
- % \pkg{translations} package.
- \command{DeclareChemTranslation}[\marg{key}\marg{language}\marg{translation}]
- \sinceversion{5.6}A command which makes an abstraction from the
- \pkg{translations} package. It should be used in documents for adding
- missing translations that are needed. This command can only be used in
- the preamble.
- \command{DeclareChemTranslations}[\marg{key}\Marg{\meta{language} =
- \meta{translation}}]
- \sinceversion{5.6}A command rather meant for module writers but can be
- used by document authors as well, of course. It gets a csv list of
- key\slash value pairs of translations. This command can only be used in
- the preamble.
-\end{commands}
-If you send me an email (see section~\vref{sec:sugg-bug-reports}) with the
-translations for your language I'll gladly add them to the next release of
-\chemmacros!
-
-\emph{Please do not use \pkg{translations}' \cs{DeclareTranslation} for
- declaring translations.}
-
-\ForAllChemTranslationsDo{
- \appto\chemtranslationtable{\texttt{#1} & #2 & \texttt{\detokenize{#3}} \\}
-}
-
-\begin{longtable}{lll}
- \caption{Translation keys predefined by \chemmacros\ (except
- \code{phase-aqi}, \code{phase-cd} and \code{phase-lc} which were defined
- in this document).}
- \label{tab:translation-keys} \\
- \toprule
- \bfseries key & \bfseries language & \bfseries translation \\
- \midrule
- \endfirsthead
- \toprule
- \bfseries key & \bfseries language & \bfseries translation \\
- \midrule
- \endhead
- \bottomrule
- \endlastfoot
- \midrule
- & & \hfill\emph{continues} \\
- \endfoot
- \chemtranslationtable
-\end{longtable}
-
-\subsubsection{Information For Module Writers}
-
-In addition to the commands from section~\vref{sec:avail-transl-keys} the
-following macros are available:
-\begin{commands}
- \expandable\explcommand{chemmacros_translate:n}[ \marg{translation key}]
- Translates the given key to the language which is detected automatically
- or given by the user. Should be used in \chemmacros' macros instead of
- \pkg{translations}' \cs*{GetTranslation}.
- \explcommand{l_chemmacros_language_tl}
- 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}]
- 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}%
- \marg{translation}]
- The expl3 version of \cs{DeclareChemTranslation}.
- \explcommand{chemmacros_declare_translations:nn}[\marg{key}\Marg{\meta{language}
- = \meta{translation}}]
- The expl3 version of \cs{DeclareChemTranslations}.
-\end{commands}
-
-\clearpage
-
\part{Additional Modules}\label{part:additional-modules}
-\section{User Modules}
-\subsection{The \chemmodule*{all} \emph{pseudo}-module}\label{sec:all-module}
-
-The \chemmodule{all} module is a pseudo module: it doesn't define any
-functionality at all. It does however load all other modules. So you can say
-\begin{sourcecode}
- \chemsetup{ modules = all }
-\end{sourcecode}
-to ensure that every module is available. This \emph{will not} load personal
-modules!
+The modules described in this part are not part of \chemmacros' minimal setup.
-\subsection{The \chemmodule*{isotopes} Module}\label{sec:isotopes-module}
+\section{The \chemmodule*{isotopes} Module}\label{sec:isotopes-module}
The \chemmodule{isotope} module loads the \pkg{elements}
package~\cite{pkg:elements}. This module defines one user command:
@@ -1981,7 +1386,7 @@ There are options which allow you to determine how the isotope is printed:
\isotope{C}
\end{example}
-\subsection{The \chemmodule*{mechanisms} Module}\label{sec:mechanisms-module}
+\section{The \chemmodule*{mechanisms} Module}\label{sec:mechanisms-module}
The module \chemmodule{mechanisms} loads the package
\pkg{amstext}~\cite{pkg:amstext}. It provides one macro:
@@ -2017,7 +1422,7 @@ The module \chemmodule{mechanisms} loads the package
\mech[cb]
\end{commands}
-\subsection{The \chemmodule*{newman} Module}\label{sec:newman-module}
+\section{The \chemmodule*{newman} Module}\label{sec:newman-module}
The \chemmodule{newman} module provides a command for drawing Newman
projections. It loads the \chemmodule{tikz} module.
\begin{commands}
@@ -2067,7 +1472,7 @@ Several options allow customization:
\newman{1,2,3,4,5,6} \newman(170){1,2,3,4,5,6}
\end{example}
-\subsection{The \chemmodule*{orbital} Module}\label{sec:orbital-module}
+\section{The \chemmodule*{orbital} Module}\label{sec:orbital-module}
The \chemmodule{orbital} module loads the \chemmodule{tikz} module. It
provides the following command to create orbitals:
\begin{commands}
@@ -2162,16 +1567,16 @@ changed.
\vspace{1cm}
\end{example}
-\subsection{The \chemmodule*{polymers} Module}\label{sec:polymers-module}
+\section{The \chemmodule*{polymers} Module}\label{sec:polymers-module}
The\sinceversion{5.5} \chemmodule{polymers} module loads the
\chemmodule{nomenclature} and the \chemmodule{tikz} modules.
-\subsubsection{Nomenclature}
+\subsection{Nomenclature}
The \chemmodule{polymers} module defines a number of \ac{iupac} macros for
usage inside \cs{iupac} which are used in polymer chemistry.
-\paragraph{Copolymers}
+\subsection{Copolymers}
\begin{commands}
\iupaccs[co]{copolymer}{unspecified copolymer.}
\iupaccs[stat]{statistical}{statistical copolymer.}
@@ -2182,7 +1587,7 @@ usage inside \cs{iupac} which are used in polymer chemistry.
\iupaccs{graft}{graft copolymer.}
\end{commands}
-\paragraph{Non-linear (Co) Polymers and Polymer Assemblies}
+\subsection{Non-linear (Co) Polymers and Polymer Assemblies}
\begin{commands}
\iupaccs{blend}{The blend qualifier.}
\iupaccs{comb}{The comb qualifier.}
@@ -2195,7 +1600,7 @@ usage inside \cs{iupac} which are used in polymer chemistry.
\iupaccs{star}{The star qualifier.}
\end{commands}
-\subsubsection{Polymer Denotations in \pkg*{chemfig}'s Molecules}
+\subsection{Polymer Denotations in \pkg*{chemfig}'s Molecules}
The \pkg{chemfig} manual proposes some code defining the macros
\cs*{setpolymerdelim} and \cs*{makebraces} which make it possible to add
delimiters to \pkg{chemfig} molecules. The \chemmodule{polymers} module
@@ -2226,11 +1631,11 @@ implements the following macro based on the same idea:
\makepolymerdelims[delimiters=()]{5pt}[27pt]{op}{cl}
\end{example}
-\subsection{The \chemmodule*{reactions} Module}\label{sec:reactions-module}
+\section{The \chemmodule*{reactions} Module}\label{sec:reactions-module}
The \chemmodule{reactions} module loads the \chemmodule{chemformula} module
and the \pkg{mathtools} package~\cite{pkg:mathtools}.
-\subsubsection{Predefined Environments}
+\subsection{Predefined Environments}
You can use these environments for numbered\ldots
\begin{environments}
@@ -2338,7 +1743,7 @@ 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}.
-\subsubsection{Own Reactions}
+\subsection{Own Reactions}
You can create new types of reactions with the command:
\begin{commands}
\command{NewChemReaction}[\marg{name}\oarg{number of arguments}\marg{math name}]
@@ -2385,7 +1790,7 @@ With this the \env{reactionsat} environment is defined.
\end{reactionsat*}
\end{example}
-\subsubsection{List of Reactions}
+\subsection{List of Reactions}
The \chemmodule{reactions} module also provides a command to display a list of
the reactions created with the \env{reaction} environment.
@@ -2448,13 +1853,405 @@ this case you can use
\end{reactions}
\end{example}
-\subsection{The \chemmodule*{redox} Module}\label{sec:redox-module}
+\section{The \chemmodule*{reactants} Module}\label{sec:reactants-module}
+\sinceversion{6.0}Idea for this module is by \leandriis, who also does the
+main development of the module. Many thanks for all her work!
+
+\subsection{Idea and Getting Started}
+The \module{reactants} module offers a simplified input syntax for chemical
+reactants in the description of reaction procedures. Reactant and solvent
+names are declared in the preamble removing the need to repeat the same
+\ac{iupac} names multiple times throughout the document. With the help of
+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.
+
+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},
+\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
+and will be explicitly mentioned in the corresponding sections of this manual.
+
+\subsection{Basic Commands}
+
+\begin{commands}
+ \command{DeclareChemReactant}[\marg{ID}\marg{properties}]
+ This command defines the reactant \meta{ID} with the properties
+ \meta{properties}. \emph{Should be used in the preamble. Must be used in
+ the preamble when \pkg{acro} is used as acronym support package.}
+ \command{DeclareChemReactant}[\Marg{\meta{main ID}.\meta{sub ID}}\marg{properties}]
+ Analogously to \pkg{chemnum}'s \cs{cmpd} command, both the
+ \cs{DeclareChemReactant} and \cs{reactant} commands accept a combined
+ \meta{ID} consisting of a \meta{main ID} and \meta{sub ID} part. The
+ default separator is a \code{.} here, but this can be changed using
+ \pkg{chemnum}'s \keyis{main-sub-sep}{token} option.
+\end{commands}
+Valid \meta{properties} include the following key-value pairs:
+\begin{options}
+ \keyval{name}{name}
+ Mandatory property: the name of the substance.
+ \keyval{short}{abbreviation}
+ Optional property: a short form of the name, used when the
+ \module{reactants} module is used in combination with the
+ \option{acronym-support} option, see section~\vref{sec:acronyms-in-reactants}.
+ \keyval{bookmark}{replacement in \ac{pdf} bookmarks}
+ Optional property: replaces \meta{name} in a \ac{pdf} bookmark. This
+ might be advisable when reactants are used in section titles and the
+ \pkg{hyperref} package is used as well, see
+ section~\vref{sec:reactants-in-headings}.
+ \keyval{upper-name}{upper case version of the name}
+ Optional property: The upper case version of a compound's name, e.g. for
+ the use in the beginning of a sentence.
+ \keyval{upper-bookmark}{upper case version of the bookmark text}
+ Optional property: The upper case version of the \meta{name} in a \ac{pdf} bookmark.
+\end{options}
+
+Common declarations will look like this:
+\begin{sourcecode}
+ \DeclareChemReactant{thf}{name={tetrahydrofuran}, short={THF}}
+ \DeclareChemReactant{H2SO4}{name={\ch{H2SO4}}}
+ \DeclareChemReactant{dichloropentane}{name={\iupac{2,4-di|chloro|pentane}}}
+\end{sourcecode}
+
+\begin{commands}
+ \command{reactant}[\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 the text. The order of the
+ information in the output can be controlled through the
+ \option{reactant-output-style} option, see
+ section~\vref{sec:output-styles}. The upper case version of this command
+ \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.
+ \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
+ \option{solvent-output-style} option. The upper case version of this
+ command \cs{Solvent} can be used in order to start a sentence with an
+ upper case version of a solvent's name. The corresponding text must be
+ defined through \cs{DeclareChemReactant}'s \option{upper-name} option.
+ \code{s} and \code{l} suffixed variants exist and are discussed later.
+\end{commands}
+
+\meta{data and units} accepts a comma separated list of key-value pairs. Valid keys,
+acceptable values as well as their defaults are listed in table~\vref{tab:reactant-data}.
+
+Typical uses will look like this:
+\begin{sourcecode}
+ \reactant{dichloropentane}
+ \reactant[volume=5]{dichloropentane}
+ \reactant[volume=0.5, volume-unit=\L]{dichloropentane}
+ \solvent{thf}
+ \solvent[volume=200]{thf}
+ \solvent[volume=1.5, volume-unit=\L]{thf}
+\end{sourcecode}
+
+\begin{commands}
+ \command{printreactants}
+ Prints a list of number and name of all reactants used throughout the
+ document. The resulting list is sorted by number and also includes
+ compounds numbered with \pkg{chemnum}'s \cs{cmpd} command. The starred
+ variant also includes the \meta{ID} in the list of reactants. Using
+ \option{printreactants-style} different styles can be selected. (See
+ section~\vref{sec:list-of-reactants}).
+\end{commands}
+
+\subsection{Options}
+\begin{options}
+ \keybool{initiate}\Module{reactants}\Default{false}
+ The \pkg{chemnum} package that is internally used for numbering the
+ reactants offers two ways of initiating a new label: either when \cs{cmpd}
+ is first used or through \cs{initcmpd}. The \module{reactants} module
+ also offers these two methods with initiating a new label upon the first
+ use of a reactant being the default. If you prefer to initiate a
+ new label through the \cs{DeclareChemReactant} command set this option to
+ true.
+
+ Reactants are automatically numbered in the order of their first
+ appearance, while \option{initiate} numbers the compounds in the order in
+ 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
+ its name.
+\end{options}
+Other options are described at later places when the corresponding behavior is
+described.
+
+\subsubsection{Data and Units}
+
+Describing synthetic procedures often requires adding a lot of data with the
+corresponding units to each reactant/solvent that is used. In order to allow
+for a uniform representation of numbers and units, as well as making the code
+more readable, the \cs{reactant} and \cs{solvent} commands offer an optional
+argument that can be used to easily input this data:
+
+\begin{commands}
+ \command{reactant}[\oarg{data and units}\marg{ID}]
+ \command{solvent}[\oarg{data and units}\marg{ID}]
+\end{commands}
+
+\begin{table}[bp]
+ \newcolumntype{K}{>{\collectcell\code}l<{\endcollectcell}}
+ \newcolumntype{O}{>{\collectcell\option}l<{\endcollectcell}}
+ \centering
+ \caption{Overview of available keys as well as the default units and the
+ option to locally or globally change that default unit.}
+ \label{tab:reactant-data}
+ \begin{tabular}{KlO}
+ \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. & \\
+ \midrule
+ solution-name & solution in & solution \\
+ \bottomrule
+ \end{tabular}
+\end{table}
+
+\meta{data and units} accepts a comma separated list of key-value pairs with
+the available keys and their default units/values listed in
+table~\vref{tab:reactant-data}. Key-value pairs can be input in any order as
+they are categorized and rearranged internally according to the order in which
+they are listed in table~\vref{tab:reactant-data}. Customization of this order
+is thus far somewhat limited. The available customization possibilities are
+described in section~\vref{sec:output-styles}. Since numbers and their
+corresponding units are processed using \pkg{siunitx}, the usual \cs{sisetup}
+command can be used to alter, for example, the output decimal separator
+according to your needs. Be aware, though, that you must surround a number
+with a set of \code{\{\}} if you use a comma as input decimal
+separator. Otherwise the decimal places will be truncated without a warning.
+
+\option{solution} here refers to the text that links concentration and
+solvent. This text automatically adapts to the document language set via
+\pkg{babel} or \pkg{polyglossia}. Currently, the English fallback, as well as
+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
+section~\vref{sec:lang-module} in order to supply your own translation.
+
+\begin{example}
+ % in the preamble:
+ % \DeclareChemReactant{nBuLi}{name={\iupac{\textit{n}=butyllithium}}}
+ % \DeclareChemReactant{Br2benzene}{name={\iupac{1,4=di|bromo|benzene}}}
+ % \DeclareChemReactant{HBr}{name={\ch{HBr\aq}}}
+
+ \reactant[volume=5.00, amount=12.5, equiv=1.00, concentration=2.5, solvent=hexane]{nBuLi}\par
+ \reactant[mass=3.9, amount=15.6, equiv=1.3, purity=95]{Br2benzene}\par
+ \reactant[volume=2.0, amount=43.8, equiv=3.5, fraction=65]{HBr}
+\end{example}
+
+The options that change the units of the properties can be set with
+\cs{chemsetup} or in the optional argument of \cs{reactant}. Accepted units
+are units defined by the \pkg{siunitx} package or by the \module{units} module.
+\begin{options}
+ \keyval{mass-unit}{unit}\Module{reactants}\Default{\cs*{gram}}
+ Change the unit of the \code{mass} property.
+ \keyval{volume-unit}{unit}\Module{reactants}\Default{\cs*{milli}\cs*{liter}}
+ Change the unit of the \code{volume} property.
+ \keyval{fraction-unit}{unit}\Module{reactants}\Default{\code{w/w \cs*{percent}}}
+ Change the unit of the \code{fraction} property.
+ \keyval{amount-unit}{unit}\Module{reactants}\Default{\cs*{milli}\cs*{mole}}
+ Change the unit of the \code{amount} property.
+ \keyval{equiv-unit}{unit}\Module{reactants}\Default{\code{eq}}
+ Change the unit of the \code{equiv} property.
+ \keyval{concentration-unit}{unit}\Module{reactants}\Default{\cs*{Molar}}
+ Change the unit of the \code{concentration} property.
+ \keyval{purity-unit}{unit}\Module{reactants}\Default{\cs*{percent}}
+ Change the unit of the \code{purity} property.
+\end{options}
+
+\begin{example}
+ \reactant[volume=5.5]{thf} \par
+ \reactant[volume=5, volume-unit=\cubic\centi\metre]{thf}
+\end{example}
+
+\subsubsection{Output Styles}\label{sec:output-styles}
+
+The \module{reactants} module categorizes the data into different categories
+that are later used to determine the order in which this information is
+displayed. This behavior can be controlled using the following predefined
+output styles:
+
+\begin{options}
+ \keychoice{reactant-output-style}{name-main-other,main-name-other,main-other-name}%
+ \Module{reactants}\\[-\baselineskip]
+ \Default{name-main-other}
+ Select one of the three predefined styles to determine the output style of
+ the data and their units in the \cs{reactant} command.
+ \keychoice{solvent-output-style}{main-name,name-main}\Module{reactants}\Default{main-name}
+ Select one of the two predefined styles to determine the output style of
+ the data and their units in the \cs{solvent} command.
+\end{options}
+
+\code{name} here refers to the combination of name and number (or if just one
+of them is available, to either name or number).
+
+\code{main} here refers to the \code{mass} or \code{volume} of a reactant or
+solvent. If needed, \code{equiv} and/or \code{amount} can also be assigned to
+the main category.
+
+\code{other} here refers to all the other data that is give to the reactant
+command.
+
+The names of the \option{reactant-output-style} and
+\option{solvent-output-style} choice options refer to the order in which the
+contents of the categories are typeset.
+
+\begin{example}
+ \chemsetup[reactants]{reactant-output-style=name-main-other}
+ \reactant[volume=5, amount=4]{dichloropentane}\par
+ \chemsetup[reactants]{reactant-output-style=main-name-other}
+ \reactant[volume=5, amount=4]{dichloropentane}\par
+ \chemsetup[reactants]{reactant-output-style=main-other-name}
+ \reactant[volume=5, amount=4]{dichloropentane}
+
+ \chemsetup[reactants]{solvent-output-style=name-main}
+ \solvent[volume=5]{thf}\par
+ \chemsetup[reactants]{solvent-output-style=main-name}
+ \solvent[volume=5]{thf}
+\end{example}
+
+\begin{options}
+ \keychoice{main}{default,amount,equiv}\Module{reactants}\Default{default}
+ By default, only \code{mass} and \code{volume} are assigned to the
+ \code{main} category. Using the \option{main} option, \code{equiv} or
+ \code{amount} can be added to the main category.
+\end{options}
+\chemsetup[reactants]{reactant-output-style=main-name-other}
+
+\begin{example}
+ \chemsetup[reactants]{main=amount}
+ \reactant[equiv=2.0, amount=5]{dichloropentane}\par
+ \chemsetup[reactants]{main=equiv}
+ \reactant[equiv=2.0, amount=5]{dichloropentane}\par
+ \chemsetup[reactants]{main=default}
+ \reactant[equiv=2.0, amount=5]{dichloropentane}
+\end{example}
+
+\begin{options}
+ \keybool{equivalents}\Module{reactants}\Default{true}
+ Can be used to prevent \code{equiv} from being output while still keeping
+ the corresponding information in the input code. If you used the
+ \keyis{main}{equiv} option, the \keyis{equivalents}{false} option will be
+ ignored for the corresponding entries.
+\end{options}
+
+\subsection{Use in Section Headings}\label{sec:reactants-in-headings}
+
+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}, comparably to \pkg{chemnum}'s \cs{cmpd+} command.
+
+\begin{commands}
+ \command{reactant+}[\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}
+
+If you also use the \pkg{hyperref} package in combination with \ac{pdf}
+bookmarks, you might want to use the optional \option{bookmark} property of
+\cs{DeclareChemReactant} to supply an alternative text to \option{name} to be
+displayed inside of the \ac{pdf} bookmarks. To later use such a predefined
+solvent or reactant, use one of the following three commands, that are defined
+analogously to \pkg{chemnum}`s \cs{cmpdplain}. All three commands also exist
+in the upper case variant (\cs{Reactantplain}, \cs{Sumbainreactantplain} and
+\cs{Solventplain}) which can be used to display the upper case version of a
+reactant or solvent's name. he upper case version of the name must be declared
+previously through \cs{DeclareChemReactant}'s \option{upper-name} and
+\option{upper-bookmark} options.
+
+\begin{commands}
+ \command{reactantplain}[\marg{ID}]
+ Outputs the value of \option{bookmark} inside of the \ac{pdf} bookmark,
+ while using the reactant's \option{name} inside of the section headings.
+ \command{submainreactantplain}[\marg{mainID}\marg{subID}]
+ Outputs the value of \option{bookmark} inside of the \ac{pdf} bookmark,
+ while using the reactant's \option{name} inside of the section
+ headings. Must be used if your \meta{ID} consists of a \meta{mainID}
+ and a \meta{subID} part.
+ \command{solventplain}[\marg{ID}]
+ Outputs the value of \option{bookmark} inside of the \ac{pdf} bookmark,
+ while using the solvent's \option{name} inside of the section headings.
+\end{commands}
+
+
+\subsection{Acronyms as Reactant/Solvent Names}\label{sec:acronyms-in-reactants}
+
+In order to integrate solvent/reactant acronyms into one combined list of
+acronyms, the reactants module offers two different options. While using
+either of these two options, the user can also explicitly decide if the
+\option{name} or the \option{short} version of the reactant/solvent should be
+used in the text. Inspired by the \cs{acs} and \cs{acl} commands from the
+\pkg{acro} or the \pkg{glossaries-extra} package, the \module{reactants}
+module also offers the following \code{s} and \code{l} suffixed variants:
+
+\begin{commands}
+ \command{reactants}[\marg{ID}]
+ Output the \option{short} version of the reactant's name.
+ \command{reactantl}[\marg{ID}]
+ Output the \option{name} version of the reactant's name.
+ \command{solvents}[\marg{ID}]
+ Output the \option{short} version of the solvent's name.
+ \command{solventl}[\marg{ID}]
+ Output the \option{name} version of the solvent's name.
+\end{commands}
+
+\begin{options}
+ \keychoice{acronym-support}{acro,glossaries,none}\Module{reactants}\Default{none}
+ Can be used to select, which of the two packages \pkg{acro} or
+ \pkg{glossaries-extra} is used in the background in order to format and
+ sort acronyms.
+\end{options}
+
+\begin{example}
+ % in the preamble:
+ % \DeclareChemReactant{dcm}{name={dichloromethane}, short={DCM}}
+ \solvent{dcm}\par
+ \solventl{dcm}\par
+ \solvents{dcm}
+\end{example}
+
+\subsection{List of Reactants}\label{sec:list-of-reactants}
+As mentioned before, \cs{printreactants} can be used to print a list of all
+used reactants and their numbers. The \module{reactants} module internally
+uses either \pkg{longtable} or \pkg{xltabular} to typeset this list:
+\begin{options}
+ \keychoice{printreactants-style}{xltabular,longtable,none}\Module{reactants}\Default{none}
+ Can be used to switch between \pkg{longtable} and \pkg{xltabular} which
+ 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
+ responsible for adding the \meta{ID} in resulting list, as well.
+\end{options}
+
+\section{The \chemmodule*{redox} Module}\label{sec:redox-module}
The \chemmodule{redox} module loads the modules \chemmodule{tikz} and
\chemmodule{xfrac}. It also loads the packages
\pkg{mathtools}~\cite{pkg:mathtools} and \pkg{relsize}~\cite{pkg:relsize}.
-\subsubsection{Oxidation Numbers}\label{sec:oxidation-numbers}
+\subsection{Oxidation Numbers}\label{sec:oxidation-numbers}
Regarding the typesetting of oxidation numbers
\citetitle{iupac:greenbook}~\cite{iupac:greenbook} says the following:
@@ -2559,7 +2356,7 @@ The fraction is displayed with the help of the \pkg{xfrac}
package~\cite{bnd:l3packages}. For more details on how \chemmacros\ uses it
read section~\vref{sec:xfrac-module}.
-\subsubsection{Redox Reactions}\label{sec:redox-reactions}
+\subsection{Redox Reactions}\label{sec:redox-reactions}
\chemmacros\ provides two commands to visualize the transfer of electrons in
redox reactions. Both commands are using \TikZ.
@@ -2626,7 +2423,7 @@ The default length of the vertical lines can be customized with the option
\OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox}
\end{example}
-\paragraph{Examples}
+\subsection{Examples}
\begin{example}
\vspace{7mm}
\ch{
@@ -2673,7 +2470,7 @@ The default length of the vertical lines can be customized with the option
\vspace{7mm}
\end{example}
-\subsection{The \chemmodule*{scheme} Module}\label{sec:scheme-module}
+\section{The \chemmodule*{scheme} Module}\label{sec:scheme-module}
The \chemmodule{scheme} module loads the \pkg{chemnum}
package~\cite{pkg:chemnum} and defines a floating environment
@@ -2716,12 +2513,12 @@ 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}.
-\subsection{The \chemmodule*{spectroscopy} Module}\label{sec:spectroscopy-module}
+\section{The \chemmodule*{spectroscopy} Module}\label{sec:spectroscopy-module}
The \chemmodule{spectroscopy} module loads the \chemmodule{chemformula} module
and the \pkg{siunitx} package~\cite{pkg:siunitx}.
-\subsubsection{The \cs*{NMR} Command}
+\subsection{The \cs*{NMR} Command}
When you're trying to find out if a compound is the one you think it is often
NMR spectroscopy is used. The experimental data are typeset similar to this:
@@ -2752,7 +2549,7 @@ The first argument specifies the kind of NMR:
\NMR{13,C}
\end{example}
-The second argument sets the frequency (in \si{\mega\hertz}):
+The second argument sets the frequency (in \unit{\mega\hertz}):
\begin{example}[side-by-side]
\NMR(400)
\end{example}
@@ -2771,7 +2568,7 @@ The third argument specifies the solvent:
\NMR[CDCl3]
\end{example}
-\subsubsection{Short Cuts}
+\subsection{Short Cuts}
It is possible to define short cut commands for specific nuclei.
\begin{commands}
@@ -2798,7 +2595,7 @@ This defines a command with the same arguments as \cs{NMR} \emph{except} for
\HNMR*(400)
\end{example}
-\subsubsection{An Environment to Typeset Experimental Data}
+\subsection{An Environment to Typeset Experimental Data}
The \chemmodule{spectroscopy} module provides an environment to ease the input
of experimental data.
@@ -2840,11 +2637,10 @@ of experimental data.
\end{experimental}
\end{example}
-\paragraph{Customization}\label{sec:experimental-customization}
+\subsection{Customization}\label{sec:experimental-customization}
The output of the environment and of the NMR commands can be customized be a
-number of options. For historical reasons they all belong to the module
-\module{nmr}.
+number of options.
\begin{options}
\keyval{unit}{unit}\Module{spectroscopy}\Default{\cs*{mega}\cs*{hertz}}
The used default unit.
@@ -2890,11 +2686,11 @@ number of options. For historical reasons they all belong to the module
\keyval{delta}{tokens}\Module{spectroscopy}\Default
The \meta{tokens} are added after $\delta$.
\keybool{list}\Module{spectroscopy}\Default{false}
- The environment \env{nmr}[<options>]{} is formatted as a list
+ The environment \env{experimental} is formatted as a list
\keyval{list-setup}{setup}\Module{spectroscopy}
Setup of the list. See below for the default settings.
\keybool{use-equal}\Module{spectroscopy}\Default{false}
- Add egual sign after \cs{NMR} and \cs{data}.
+ Add equal sign after \cs{NMR} and \cs{data}.
\end{options}
The default setup of the list:
@@ -2923,17 +2719,17 @@ can be used like \cs{data} for the NMR data.
\end{experimental}
\end{example}
-\paragraph{An Example}
+\subsection{An Example}
The code below is shown with different specifications for \meta{options}.
Of course options can also be chosen with \cs{chemsetup}.
\begin{sourcecode}
\sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}
\begin{experimental}[<optionen>]
- \data*{yield} \SI{17}{\milli\gram} yellow needles (\SI{0.04}{\milli\mole},
- \SI{13}{\percent}).
+ \data*{yield} \qty{17}{\milli\gram} yellow needles (\qty{0.04}{\milli\mole},
+ \qty{13}{\percent}).
%
- \data{mp.} \SI{277}{\celsius} (DSC).
+ \data{mp.} \qty{277}{\celsius} (DSC).
%
\NMR(600)[CDCl3] \val{2.01} (s, \#{24}, \pos{5}), \val{2.31} (s, \#{12},
\pos{1}), \val{6.72--6.74} (m, \#{2}, \pos{11}), \val{6.82} (s, \#{8},
@@ -2947,10 +2743,10 @@ Of course options can also be chosen with \cs{chemsetup}.
\pos{2}), \val{140.6} (q, \#{2}, \pos{10}), \val{140.8} (q, \#{8}, \pos{4}),
\val{141.8} (q, \#{4}, \pos{6}), \val{145.6} (q, \#{2}, \pos{7}).
%
- \data{MS}[DCP, EI, \SI{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
+ \data{MS}[DCP, EI, \qty{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
(1), \val{462} (1), \val{249} (13), \val{120} (41), \val{105} (100).
%
- \data{MS}[\ch{MeOH + H2O + KI}, ESI, \SI{10}{\electronvolt}] \val{720} (100,
+ \data{MS}[\ch{MeOH + H2O + KI}, ESI, \qty{10}{\electronvolt}] \val{720} (100,
\ch{M+ + OH-}), \val{368} (\ch{M+ + 2 OH-}).
%
\data{IR}[KBr] \val{3443} (w), \val{3061} (w), \val{2957} (m), \val{2918}
@@ -2962,14 +2758,14 @@ Of course options can also be chosen with \cs{chemsetup}.
(w), \val{724} (m), \val{663} (w), \val{586} (w), \val{562} (w), \val{515}
(w).
%
- \data*{UV-Vis} \SI{386}{\nano\metre} ($\varepsilon = \val{65984}$),
- \SI{406}{\nano\metre} ($\varepsilon = \val{65378}$).
+ \data*{UV-Vis} \qty{386}{\nano\metre} ($\varepsilon = \val{65984}$),
+ \qty{406}{\nano\metre} ($\varepsilon = \val{65378}$).
%
\data*{quantum yield} $\Phi = \val{0.74+-0.1}$\,.
\end{experimental}
\end{sourcecode}
-\paragraph{Nearly Standard}
+\subsection{Nearly Standard}
Output with these options:
\begin{sourcecode}
@@ -2978,10 +2774,10 @@ Output with these options:
\begin{experimental}[delta=(ppm),pos-number=sub,use-equal]
\sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}
- \data*{yield} \SI{17}{\milli\gram} yellow needles (\SI{0.04}{\milli\mole},
- \SI{13}{\percent}).
+ \data*{yield} \qty{17}{\milli\gram} yellow needles (\qty{0.04}{\milli\mole},
+ \qty{13}{\percent}).
%
- \data{mp.} \SI{277}{\celsius} (DSC).
+ \data{mp.} \qty{277}{\celsius} (DSC).
%
\NMR(600)[CDCl3] \val{2.01} (s, \#{24}, \pos{5}), \val{2.31} (s, \#{12},
\pos{1}), \val{6.72--6.74} (m, \#{2}, \pos{11}), \val{6.82} (s, \#{8},
@@ -2995,10 +2791,10 @@ Output with these options:
\pos{2}), \val{140.6} (q, \#{2}, \pos{10}), \val{140.8} (q, \#{8}, \pos{4}),
\val{141.8} (q, \#{4}, \pos{6}), \val{145.6} (q, \#{2}, \pos{7}).
%
- \data{MS}[DCP, EI, \SI{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
+ \data{MS}[DCP, EI, \qty{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
(1), \val{462} (1), \val{249} (13), \val{120} (41), \val{105} (100).
%
- \data{MS}[\ch{MeOH + H2O + KI}, ESI, \SI{10}{\electronvolt}] \val{720} (100,
+ \data{MS}[\ch{MeOH + H2O + KI}, ESI, \qty{10}{\electronvolt}] \val{720} (100,
\ch{M+ + OH-}), \val{368} (\ch{M+ + 2 OH-}).
%
\data{IR}[KBr] \val{3443} (w), \val{3061} (w), \val{2957} (m), \val{2918}
@@ -3010,13 +2806,13 @@ Output with these options:
(w), \val{724} (m), \val{663} (w), \val{586} (w), \val{562} (w), \val{515}
(w).
%
- \data*{UV-Vis} \SI{386}{\nano\metre} ($\varepsilon = \val{65984}$),
- \SI{406}{\nano\metre} ($\varepsilon = \val{65378}$).
+ \data*{UV-Vis} \qty{386}{\nano\metre} ($\varepsilon = \val{65984}$),
+ \qty{406}{\nano\metre} ($\varepsilon = \val{65378}$).
%
\data*{quantum yield} $\Phi = \val{0.74+-0.1}$\,.
\end{experimental}
-\paragraph{Formatted List}
+\subsection{Formatted List}
Output with these options:
\begin{sourcecode}
@@ -3025,10 +2821,10 @@ Output with these options:
\begin{experimental}[format=\bfseries,delta=(ppm),list=true,use-equal]
\sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}
- \data*{yield} \SI{17}{\milli\gram} yellow needles (\SI{0.04}{\milli\mole},
- \SI{13}{\percent}).
+ \data*{yield} \qty{17}{\milli\gram} yellow needles (\qty{0.04}{\milli\mole},
+ \qty{13}{\percent}).
%
- \data{mp.} \SI{277}{\celsius} (DSC).
+ \data{mp.} \qty{277}{\celsius} (DSC).
%
\NMR(600)[CDCl3] \val{2.01} (s, \#{24}, \pos{5}), \val{2.31} (s, \#{12},
\pos{1}), \val{6.72--6.74} (m, \#{2}, \pos{11}), \val{6.82} (s, \#{8},
@@ -3042,10 +2838,10 @@ Output with these options:
\pos{2}), \val{140.6} (q, \#{2}, \pos{10}), \val{140.8} (q, \#{8}, \pos{4}),
\val{141.8} (q, \#{4}, \pos{6}), \val{145.6} (q, \#{2}, \pos{7}).
%
- \data{MS}[DCP, EI, \SI{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
+ \data{MS}[DCP, EI, \qty{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
(1), \val{462} (1), \val{249} (13), \val{120} (41), \val{105} (100).
%
- \data{MS}[\ch{MeOH + H2O + KI}, ESI, \SI{10}{\electronvolt}] \val{720} (100,
+ \data{MS}[\ch{MeOH + H2O + KI}, ESI, \qty{10}{\electronvolt}] \val{720} (100,
\ch{M+ + OH-}), \val{368} (\ch{M+ + 2 OH-}).
%
\data{IR}[KBr] \val{3443} (w), \val{3061} (w), \val{2957} (m), \val{2918}
@@ -3057,13 +2853,13 @@ Output with these options:
(w), \val{724} (m), \val{663} (w), \val{586} (w), \val{562} (w), \val{515}
(w).
%
- \data*{UV-Vis} \SI{386}{\nano\metre} ($\varepsilon = \val{65984}$),
- \SI{406}{\nano\metre} ($\varepsilon = \val{65378}$).
+ \data*{UV-Vis} \qty{386}{\nano\metre} ($\varepsilon = \val{65984}$),
+ \qty{406}{\nano\metre} ($\varepsilon = \val{65378}$).
%
\data*{quantum yield} $\Phi = \val{0.74+-0.1}$\,.
\end{experimental}
-\paragraph{Crazy}
+\subsection{Crazy}
Output for these options:
\begin{sourcecode}
@@ -3084,10 +2880,10 @@ Output for these options:
coupling-unit=\mega\gram\per\square\second,
list-setup=,use-equal]
\sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}
- \data*{yield} \SI{17}{\milli\gram} yellow needles (\SI{0.04}{\milli\mole},
- \SI{13}{\percent}).
+ \data*{yield} \qty{17}{\milli\gram} yellow needles (\qty{0.04}{\milli\mole},
+ \qty{13}{\percent}).
%
- \data{mp.} \SI{277}{\celsius} (DSC).
+ \data{mp.} \qty{277}{\celsius} (DSC).
%
\NMR(600)[CDCl3] \val{2.01} (s, \#{24}, \pos{5}), \val{2.31} (s, \#{12},
\pos{1}), \val{6.72--6.74} (m, \#{2}, \pos{11}), \val{6.82} (s, \#{8},
@@ -3101,10 +2897,10 @@ Output for these options:
\pos{2}), \val{140.6} (q, \#{2}, \pos{10}), \val{140.8} (q, \#{8}, \pos{4}),
\val{141.8} (q, \#{4}, \pos{6}), \val{145.6} (q, \#{2}, \pos{7}).
%
- \data{MS}[DCP, EI, \SI{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
+ \data{MS}[DCP, EI, \qty{60}{\electronvolt}] \val{703} (2, \ch{M+}), \val{582}
(1), \val{462} (1), \val{249} (13), \val{120} (41), \val{105} (100).
%
- \data{MS}[\ch{MeOH + H2O + KI}, ESI, \SI{10}{\electronvolt}] \val{720} (100,
+ \data{MS}[\ch{MeOH + H2O + KI}, ESI, \qty{10}{\electronvolt}] \val{720} (100,
\ch{M+ + OH-}), \val{368} (\ch{M+ + 2 OH-}).
%
\data{IR}[KBr] \val{3443} (w), \val{3061} (w), \val{2957} (m), \val{2918}
@@ -3116,18 +2912,18 @@ Output for these options:
(w), \val{724} (m), \val{663} (w), \val{586} (w), \val{562} (w), \val{515}
(w).
%
- \data*{UV-Vis} \SI{386}{\nano\metre} ($\varepsilon = \val{65984}$),
- \SI{406}{\nano\metre} ($\varepsilon = \val{65378}$).
+ \data*{UV-Vis} \qty{386}{\nano\metre} ($\varepsilon = \val{65984}$),
+ \qty{406}{\nano\metre} ($\varepsilon = \val{65378}$).
%
\data*{quantum yield} $\Phi = \val{0.74+-0.1}$\,.
\end{experimental}
-\subsection{The \chemmodule*{thermodynamics} Module}\label{sec:thermodynamics-module}
+\section{The \chemmodule*{thermodynamics} Module}\label{sec:thermodynamics-module}
The \chemmodule{thermodynamics} module loads the \pkg{siunitx}
package~\cite{pkg:siunitx}.
-\subsubsection{The \cs*{state} Macro}
+\subsection{The \cs*{state} Macro}
\begin{commands}
\command{state}[\oarg{options}\marg{symbol}]
@@ -3138,7 +2934,7 @@ 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=\SI{1000}{\celsius}]{H}
+ \state[superscript-right=\qty{1000}{\celsius}]{H}
\end{example}
These options are available:
@@ -3161,7 +2957,7 @@ These options are available:
An alias of \option{subscript-left}.
\end{options}
-\subsubsection{Thermodynamic Variables}
+\subsection{Thermodynamic Variables}
The \chemmodule{thermodynamics} module provides a few commands for specific
thermodynamic variables:
@@ -3232,7 +3028,7 @@ its settings:
\enthalpy{-1234.56e3}
\end{example}
-\subsubsection{Create New Variables or Redefine Existing Ones}
+\subsection{Create New Variables or Redefine Existing Ones}
\begin{commands}
\command{NewChemState}[\marg{cs}\marg{options}]
@@ -3298,7 +3094,7 @@ an absolute variable:
\enthalpy{-12.3} \Enthalpy{-12.3}
\end{example}
-\subsection{The \chemmodule*{units} Module}\label{sec:units-module}
+\section{The \chemmodule*{units} Module}\label{sec:units-module}
The \chemmodule{units} module loads the \pkg{siunitx}
package~\cite{pkg:siunitx}.
@@ -3308,38 +3104,290 @@ command
\begin{commands}
\command*{DeclareSIUnit}[\marg{cs}\marg{unit}]
Define \meta{cs} to be a valid unit command inside \pkg{siunitx}' macros
- \cs*{SI} and \cs*{si} which represents \meta{unit}.
+ \cs*{qty} and \cs*{unit} which represents \meta{unit}.
\end{commands}
to add arbitrary units. \chemmacros\ uses that command to provide some
units. Like all \pkg{siunitx} units they're only valid inside
-\cs*{SI}\marg{num}\marg{unit} and \cs*{si}\marg{unit}.
+\cs*{qty}\marg{num}\marg{unit} and \cs*{unit}\marg{unit}.
\begin{commands}
- \command{atmosphere} \si{\atmosphere}
- \command{atm} \si{\atm}
- \command{calory} \si{\calory}
- \command{cal} \si{\cal}
- \command{cmc} \si{\cmc} \par
+ \command{atmosphere} \unit{\atmosphere}
+ \command{atm} \unit{\atm}
+ \command{calory} \unit{\calory}
+ \command{cal} \unit{\cal}
+ \command{cmc} \unit{\cmc} \par
The units \cs{cmc}, \cs{molar}, and \cs{Molar} are defined by the
package \pkg{chemstyle} as well. \chemmacros\ only defines them, if
\pkg{chemstyle} is not loaded.
- \command{molar} \si{\molar}
- \command{moLar} \si{\moLar}
- \command{Molar} \si{\Molar}
- \command{MolMass} \si{\MolMass}
- \command{normal} \si{\normal}
- \command{Torr} \si{\Torr}
+ \command{molar} \unit{\molar}
+ \command{moLar} \unit{\moLar}
+ \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{angstrom} \unit{\angstrom}
+ \command{atomicmassunit} \unit{\atomicmassunit}
+ \command{bar} \unit{\bar}
+ \command{elementarycharge} \unit{\elementarycharge}
+ \command{mmHg} \unit{\mmHg}
+\end{commands}
+
+
+\part{Core Modules}
+
+The modules described in this part are always loaded and mainly concern module
+writers.
+
+\section{The \chemmodule*{base} Module}\label{sec:base-module}
+
+The \chemmodule{base} module is the core module of \chemmacros. It defines
+some tools which can (and should) be used in other modules. This means this
+section is only interesting for you if you plan to write a module yourself
+(see section~\vref{sec:own-modules} for details).
+
+This module requires the packages \pkg{bm}~\cite{pkg:bm},
+\pkg{amstext}~\cite{pkg:amstext}, and \pkg{etoolbox}~\cite{pkg:etoolbox}.
+
+This module also provides \cs{chemsetup} and the option \option{modules}.
+
+It also provides a number of (expl3) macros which may be used in other
+modules. In the macro descriptions below \TF\ denotes that a \code{T}, an
+\code{F} and a \code{TF} variant exist. In case of an expandable conditional
+(\expandablesymbol) also the predicate variant is available.
+\begin{commands}
+ \expandable\explcommand{chemmacros_if_loaded:nn}[\TF\
+ \Marg{package|class} \marg{name} \marg{true} \marg{false}]
+ Checks if package (or class) \meta{name} has been loaded. Also works after
+ begin document.
+ \expandable\explcommand{chemmacros_if_package_loaded:n}[\TF\ \marg{name}
+ \marg{true} \marg{false}]
+ Checks if package \meta{name} has been loaded. Also works after begin
+ document.
+ \expandable\explcommand{chemmacros_if_class_loaded:n}[\TF\ \marg{name}
+ \marg{true} \marg{false}]
+ Checks if class \meta{name} has been loaded. Also works after begin
+ document.
+ \explcommand{chemmacros_nobreak:}
+ Inserts a penalty of \num{10000}.
+ \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.
+ \expandable\explcommand{chemmacros_if_is_int:n}[\TF\ \marg{input} \marg{true}
+ \marg{false}]
+ Checks if \meta{input} is an integer or something else.
+ \explcommand{chemmacros_if_bold:}[\TF\ \marg{true} \marg{false}]
+ 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
+ \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.
+ \explcommand{chemmacros_math:n}[ \marg{text}]
+ Ensures that \meta{text} is placed in math mode.
+ \explcommand{chemmacros_new_macroset:nnn}[ \marg{name} \marg{arg spec}
+ \marg{internal command call}]
+ \changedversion{5.3b}A command to define a set of macros
+ \cs*{NewChem\meta{name}}, \cs*{RenewChem\meta{name}},
+ \cs*{DeclareChem\meta{name}} and \cs*{ProvideChem\meta{name}} where the
+ first letter of \meta{name} is converted to uppercase, other letters are
+ kept unchanged. \meta{arg spec} is any valid argument specification for
+ \pkg{xparse}'s \\
+ \cs{DeclareDocumentCommand}~\cite{bnd:l3packages}. \meta{internal command
+ call} should be a macro which makes definitions \emph{without} error
+ checks, \ie, define new macros or redefine existing ones like \cs*{def}
+ does. This macro just should get the arguments passed on to. Have a look
+ at the example below.
+ \explcommand{chemmacros_new_environment_macroset:nnn}[ \marg{name} \marg{arg spec}
+ \marg{internal command call}]
+ Like \explcs{chemmacros_new_macroset:nnn} but for environments.
+ \command{NewChemMacroset}[\sarg\marg{name}\marg{arg spec}\marg{internal
+ command call}]
+ A non-expl3 version of \explcs{chemmacros_new_macroset:nnn} for \LaTeXe\
+ programmers. The starred version calls
+ \explcs{chemmacros_new_environment_macroset:nnn}.
+ \explcommand{chemmacros_add_cleveref_support:nnnnn}[ \marg{counter}
+ \marg{singular} \marg{plural} \marg{uppercase singular} \marg{uppercase
+ plural}]
+ A\sinceversion{5.6} command to add suiting names for a counter for the
+ \pkg{cleveref} package's \cs*{cref} commands. This command acts at the
+ end of the preamble and only if a user hasn't provided definitions with
+ \cs*{crefname} already.
+ \command{ChemCleverefSupport}[\marg{counter}\marg{singular}\oarg{uppercase
+ singular}\marg{plural}\oarg{uppercase plural}]
+ \sinceversion{5.6}\LaTeXe-version of
+ \explcs{chemmacros_add_cleveref_support:nnnnn}.
+ \explcommand{chemmacros_add_fancyref_support:nnn}[ \marg{prefix} \marg{name}
+ \marg{uppercase name}]
+ A\sinceversion{5.6} command to add suiting names for a counter for the
+ \pkg{fancyref} package's \cs*{fref} commands. This command acts at the
+ end of the preamble and doesn't override definitions made by the users.
+ \command{ChemFancyrefSupport}[\marg{prefix}\marg{name}\oarg{uppercase name}]
+ \sinceversion{5.6}\LaTeXe-version of
+ \explcs{chemmacros_add_fancyref_support:nnnnn}.
+\end{commands}
+This is how the macros \cs{NewChemParticle}, \cs{RenewChemParticle},
+\cs{DeclareChemParticle} and \cs{ProvideChemParticle} were defined:
+\begin{sourcecode}
+ \NewChemMacroset {Particle} {mm}
+ { \chemmacros_define_particle:Nn #1 {#2} }
+\end{sourcecode}
+
+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}
+ \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}
+ \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}]
+ 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}]
+ 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
+ the command is used then \meta{code} is inserted immediately.
+\end{commands}
+
+\section{The \chemmodule*{errorcheck} Module}\label{sec:errorcheck-module}
+The\sinceversion{5.2} \chemmodule{errorcheck} module provides some rudimentary
+support for giving users more meaningful messages when they use a command or
+environment provided by a module that they haven't loaded.
+
+\section{The \chemmodule*{lang} and \chemmodule*{translations} Modules}\label{sec:lang-module}
+
+The \chemmodule{lang} module provides language support for \chemmacros. It
+loads the package \pkg{translations}~\cite{pkg:translations}.
+
+\subsection{Information For Users}\label{sec:information-users}
+
+This module defines the following option:
+\begin{options}
+ \keychoice{language}{auto,\meta{language}}\Default{auto}
+ If set to \code{auto} \chemmacros\ will detect the language used by
+ \pkg{babel}~\cite{pkg:babel} or \pkg{polyglossia}~\cite{pkg:polyglossia}
+ automatically, the fallback translation is English and will be used if no
+ translation for the actual language is available. Any language known to
+ the \pkg{translations} package is a valid value for \meta{language}.
+\end{options}
+
+The language chosen via \option{language} is used for translation of certain
+strings in different places all over \chemmacros. They are mentioned in the
+places when the corresponding function of \chemmacros\ is explained.
+
+Translation is done with the help of the \pkg{translations} package, available
+translation keys are listed in section~\vref{sec:avail-transl-keys}.
+
+\subsection{Available Translation Keys}\label{sec:avail-transl-keys}
+
+Table~\vref{tab:translation-keys} lists all predefined translations of the
+available keys. \emph{Some of the translations have changed in
+ version~5.6\changedversion{5.6}.} All available translations are provided
+ by the \chemmodule{translations} module.
+ A translation key is a unique string\footnote{That is, a string
+ using the definition for strings used for expl3, i.e., converted to a series
+ of category code~12 characters..} of characters. Each key is used to
+identify a replacement text which depends on the current language or the
+language set through the \option{language} option. For each key at least the
+English fallback translation is provided, for most also the German translation
+is provided. For a few keys also other translations are provided. If you
+find that a translation for your language is missing you can provide it in the
+preamble:
+\begin{commands}
+ % \command{DeclareTranslation}[\marg{language}\marg{key}\marg{translation}]
+ % Defines a translation of key \meta{key} for the language \meta{language}.
+ % No error will be raised if a translation of \meta{key} already exists.
+ % This command can only be used in the preamble and is defined by the
+ % \pkg{translations} package.
+ \command{DeclareChemTranslation}[\marg{key}\marg{language}\marg{translation}]
+ \sinceversion{5.6}A command which makes an abstraction from the
+ \pkg{translations} package. It should be used in documents for adding
+ missing translations that are needed. This command can only be used in
+ the preamble.
+ \command{DeclareChemTranslations}[\marg{key}\Marg{\meta{language} =
+ \meta{translation}}]
+ \sinceversion{5.6}A command rather meant for module writers but can be
+ used by document authors as well, of course. It gets a csv list of
+ key\slash value pairs of translations. This command can only be used in
+ the preamble.
\end{commands}
+If you send me an email (see section~\vref{sec:sugg-bug-reports}) with the
+translations for your language I'll gladly add them to the next release of
+\chemmacros!
+
+\emph{Please do not use \pkg{translations}' \cs{DeclareTranslation} for
+ declaring translations.}
+
+\ForAllChemTranslationsDo{
+ \appto\chemtranslationtable{\texttt{#1} & #2 & \texttt{\detokenize{#3}} \\}
+}
-By the way: \cs*{mmHg} \si{\mmHg} already is defined by \pkg{siunitx}.
+\begin{longtable}{lll}
+ \caption{Translation keys predefined by \chemmacros\ (except
+ \code{phase-aqi}, \code{phase-cd} and \code{phase-lc} which were defined
+ in this document).}
+ \label{tab:translation-keys} \\
+ \toprule
+ \bfseries key & \bfseries language & \bfseries translation \\
+ \midrule
+ \endfirsthead
+ \toprule
+ \bfseries key & \bfseries language & \bfseries translation \\
+ \midrule
+ \endhead
+ \bottomrule
+ \endlastfoot
+ \midrule
+ & & \hfill\emph{continues} \\
+ \endfoot
+ \chemtranslationtable
+\end{longtable}
+
+\subsection{Information For Module Writers}
-\section{Internal Modules}
+In addition to the commands from section~\vref{sec:avail-transl-keys} the
+following macros are available:
+\begin{commands}
+ \expandable\explcommand{chemmacros_translate:n}[ \marg{translation key}]
+ Translates the given key to the language which is detected automatically
+ or given by the user. Should be used in \chemmacros' macros instead of
+ \pkg{translations}' \cs*{GetTranslation}.
+ \explcommand{l_chemmacros_language_tl}
+ 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}]
+ 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}%
+ \marg{translation}]
+ The expl3 version of \cs{DeclareChemTranslation}.
+ \explcommand{chemmacros_declare_translations:nn}[\marg{key}\Marg{\meta{language}
+ = \meta{translation}}]
+ The expl3 version of \cs{DeclareChemTranslations}.
+\end{commands}
-\subsection{The \chemmodule*{tikz} Module}\label{sec:tikz-module}
+\section{The \chemmodule*{tikz} Module}\label{sec:tikz-module}
The \chemmodule{tikz} module loads the \pkg{tikz} package~\cite{pkg:pgf} and
the \TikZ\ library \code{calc}.
-\subsubsection{For Users}
+\subsection{For Users}
The \chemmodule{tikz} module defines a few arrow tips:
\begin{tikzcode}
\arrowtip{el}
@@ -3362,7 +3410,7 @@ defining a new decoration \tikzdecoration{wave}.
\end{tikzpicture}
\end{example}
-\subsubsection{For Module Writers}
+\subsection{For Module Writers}
The \chemmodule{tikz} module provides some macros for common \TikZ\
functions. This allows to use expl3's powerful function variants for
expansion control.
@@ -3388,7 +3436,7 @@ expansion control.
Defined as \verbcode+node[{#1}]+.
\end{commands}
-\subsection{The \chemmodule*{xfrac} Module}\label{sec:xfrac-module}
+\section{The \chemmodule*{xfrac} Module}\label{sec:xfrac-module}
The \chemmodule{xfrac} module loads the package
\pkg{xfrac}~\cite{bnd:l3packages}. For the following explanations it will be
@@ -3500,10 +3548,6 @@ want:
\ChemModule{foo}{2015/10/14 description of foo}[5.2]
\end{sourcecode}
-You should be aware that your module \emph{will not be loaded} with
-\verbcode+\usechemmodule{all}+! The pseudo-module \chemmodule{all} contains a
-manually maintained list of the modules that are loaded by it.
-
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)
@@ -3551,9 +3595,9 @@ maintenance (according to the \enquote{maintainer} status of the \lppl).
Please do \emph{not} submit your module via pull request but send me the files
directly. In the best case you also have a short piece of documentation.
-\section{Suggestions, Bug Reports, Support}\label{sec:sugg-bug-reports}
+\section{Support, Suggestions and Bug Reports}\label{sec:sugg-bug-reports}
-\paragraph{Support}
+\subsection{Support}
If you need support or help with anything regarding \chemmacros\ please use
the usual support forums
\begin{itemize}
@@ -3562,22 +3606,21 @@ the usual support forums
\item \url{http://www.latex-community.org/forum/} or
\item \url{http://tex.stackexchange.com/} if you speak English
\end{itemize}
-or go the \emph{dedicated support forum}
-\begin{itemize}
- \item \url{http://www.mychemistry.eu/forums/forum/chemmacros/}
-\end{itemize}
-where you can be sure that I will see the question.
+You can also open an issue on
+\url{https://github.com/cgnieder/chemmacros/issues/} possibly adding the label
+\emph{support}.
-\paragraph{Suggestions}
-If you have any suggestions on how \chemmacros\ could be improved, adding
-missing features \etc, please feel free to contact me via
-\email{contact@mychemistry.eu}.
+\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
+issue possibly adding the label \emph{suggestion}.
-\paragraph{Bug reports}
+\subsection{Bug reports}
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.
+describing the error including a minimal working example and possibly adding
+the label \emph{bug}.
\printbibliography
diff --git a/macros/latex/contrib/chemmacros/chemmacros.history b/macros/latex/contrib/chemmacros/chemmacros.history
deleted file mode 100644
index 0ecb03994c..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.history
+++ /dev/null
@@ -1,397 +0,0 @@
---------------------------------------------------------------------------
-the CHEMMACROS package
-
- comprehensive support for typesetting chemistry documents
-
---------------------------------------------------------------------------
-Clemens Niederberger
---------------------------------------------------------------------------
-https://github.org/cgnieder/chemmacros/
-contact@mychemistry.eu
---------------------------------------------------------------------------
-If you have any ideas, questions, suggestions or bugs to report, please
-feel free to contact me.
---------------------------------------------------------------------------
-Copyright 2011--2020 Clemens Niederberger
-
-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 Maintainer of this work is Clemens Niederberger.
---------------------------------------------------------------------------
-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)
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.acid-base.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.acid-base.code.tex
deleted file mode 100644
index 341a60fc58..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.acid-base.code.tex
+++ /dev/null
@@ -1,167 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `acid-base'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{acid-base}{2018/02/22 acid/base}
-
-\chemmacros_load_modules:n {charges}
-
-% --------------------------------------------------------------------------
-% equilibrium constants:
-
-\tl_new:N \l__chemmacros_equilibrium_constant_tl
-\tl_set:Nn \l__chemmacros_equilibrium_constant_tl {K}
-\prop_new:N \l__chemmacros_eq_constants_prop
-
-\prg_new_conditional:Npnn \chemmacros_if_eq_constant:Nn #1#2 {T,F,TF}
- {
- \cs_if_exist:NTF #1
- {
- \tl_if_eq:xnTF
- { \prop_item:Nn \l__chemmacros_eq_constants_prop {#1} }
- {#2}
- { \prg_return_true: }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-\cs_generate_variant:Nn \tl_if_eq:nnTF {x}
-
-% #1: cs
-% #2: translation id and option name
-% #3: default translation
-\cs_new_protected:Npn \chemmacros_define_eq_constant:Nnn #1#2#3
- {
- \chemmacros_if_eq_constant:NnF {#1} {#2}
- {
- \cs_new_protected:Npn #1 {}
- \prop_put:Nnn \l__chemmacros_eq_constants_prop {#1} {#2}
- \tl_new:c {l__chemmacros_#2_tl}
- \chemmacros_define_keys:nn {acid-base}
- { #2 .tl_set:c = l__chemmacros_#2_tl }
- }
- \tl_set:cn
- {l__chemmacros_#2_tl}
- { \chemmacros_translate:n {#2} }
- \chemmacros_if_compatibility:nnTF {>=} {5.7}
- { \chemmacros_declare_translation:nnn {#2} {fallback} {#3} }
- { \DeclareTranslationFallback {#2} {#3} }
- \cs_set_protected:Npn #1
- {
- \ensuremath
- {
- \chemmacros_bold:n
- {
- \l__chemmacros_equilibrium_constant_tl
- \c_math_subscript_token
- { \tl_use:c {l__chemmacros_#2_tl} }
- }
- }
- }
- }
-
-\NewChemMacroset {EqConstant} {mmm}
- { \chemmacros_define_eq_constant:Nnn #1 {#2} {#3} }
-
-\NewChemEqConstant \Ka {K-acid} { \mathrm{a} }
-\NewChemEqConstant \Kb {K-base} { \mathrm{b} }
-\NewChemEqConstant \Kw {K-water} { \mathrm{w} }
-
-\chemmacros_if_compatibility:nnT {>=} {5.4}
- {
- \chemmacros_define_keys:nn {acid-base}
- { eq-constant .tl_set:N = \l__chemmacros_equilibrium_constant_tl }
- }
-
-\chemmacros_define_keys:nn {acid-base}
- {
- p-style .choice: ,
- p-style / slanted .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textsl ,
- p-style / italics .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textit ,
- p-style / upright .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textup ,
- p-style .initial:n = upright
- }
-
-\cs_new_protected:Npn \chemmacros_p:n #1
- {
- \group_begin:
- \chemmacros_if_compatibility:nnTF {<=} {5.8b}
- { \mbox }
- { \chemmacros_text:n }
- {
- \chemmacros_p_style:n {p}
- \ensuremath {#1}
- }
- \group_end:
- }
-
-\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 \pKa {o}
- {
- \chemmacros_p:n
- {
- \Ka \IfNoValueF {#1}
- { {} \c_math_subscript_token { \chemmacros_bold:n {#1} } }
- }
- }
-
-\NewDocumentCommand \pKb {o}
- {
- \chemmacros_p:n
- {
- \Kb \IfNoValueF {#1}
- { {} \c_math_subscript_token { \chemmacros_bold:n {#1} } }
- }
- }
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityTo{5.6}
-\DeclareTranslation {English} {K-acid} {\mathrm{a}}
-\DeclareTranslation {German} {K-acid} {\mathrm{s}}
-\DeclareTranslation {Dutch} {K-acid} {\mathrm{z}}
-
-\DeclareTranslation {English} {K-base} {\mathrm{b}}
-
-\DeclareTranslation {English} {K-water} {\mathrm{w}}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\chemmacros_declare_translations:nn {K-acid}
- {
- German = \mathrm {s} ,
- Dutch = \mathrm {z}
- }
-\EndChemCompatibility
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2016/02/04 - \NewChemEqConstant and family, new option `eq-constant'
-2016/04/27 - moved translations from lang module to acid-base module
-2016/05/31 - adapt to changes in `lang' module
-2018/02/22 - fix bug in \chemmacros_p:n (https://tex.stackexchange.com/q/416227/)
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.all.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.all.code.tex
deleted file mode 100644
index af4c6bee17..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.all.code.tex
+++ /dev/null
@@ -1,75 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `all'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{all}{2016/03/07 load all libraries}
-
-\msg_new:nnn {chemmacros} {all-modules}
- {
- You~ are~ loading~ *all*~ of~ chemmacros'~ module~ through~ the~ `all'~
- module!~ This~ is~ fine~ but~ not~ really~ encouraged.~ Do~ really~ need~
- all~ of~ `isotopes' ,~ `mechanisms' ,~ `newman' ,~ `nomenclature' ,~
- `orbital' ,~ `particles' ,~ `phases' ,~ `polymers' ,~ `reactions' ,~
- `redox' ,~ `scheme' ,~ `spectroscopy' ,~ `symbols' ,~ `thermodynamics' ,~
- `units' ...?
- }
-
-\chemmacros_load_modules:n
- {
- base ,
- errorcheck ,
- lang ,
- greek ,
- chemformula ,
- tikz ,
- acid-base ,
- charges ,
- isotopes ,
- mechanisms ,
- newman ,
- nomenclature ,
- orbital ,
- particles ,
- phases ,
- polymers ,
- reactions ,
- redox ,
- scheme ,
- spectroscopy ,
- symbols ,
- thermodynamics ,
- units ,
- xfrac
- }
-
-\msg_info:nn {chemmacros} {all-modules}
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/10/14 - add info message discouraging the usage of this module
- - add `errorcheck' module
-2016/03/07 - add `polymer' module
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.base.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.base.code.tex
deleted file mode 100644
index 58948c5f79..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.base.code.tex
+++ /dev/null
@@ -1,487 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `base'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{base}{2020/02/02 basic chemmacros module}
-
-% for the document hooks
-\ChemCompatibilityFrom{5.1}
-\RequirePackage {etoolbox}
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-\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
- {
- \cs_set_protected:Npn #1
- {
- \msg_warning:nnnn {chemmacros} {command-deprecated} {#1} {#2}
- #2
- }
- }
-
-\NewDocumentCommand \DeclareChemDeprecated {mm}
- { \chemmacros_define_deprecated:NN #1 #2 }
-
-% --------------------------------------------------------------------------
-% define a macro set:
-% \NewChem... \RenewChem... \DeclareChem... \ProvideChem...
-% #1: macro names
-% #2: arg spec
-% #3: internal command call
-\cs_new_protected:Npn \chemmacros_new_macroset:nnn #1#2#3
- {
- \exp_args:Nc \NewDocumentCommand
- {
- NewChem
- \str_uppercase:f { \tl_head:n {#1} }
- \tl_tail:n {#1}
- }
- {#2}
- {
- \cs_if_free:NTF ##1
- { #3 }
- { \msg_error:nnn {chemmacros} {new-#1} {##1} }
- }
- \exp_args:Nc \NewDocumentCommand
- {
- RenewChem
- \str_uppercase:f { \tl_head:n {#1} }
- \tl_tail:n {#1}
- }
- {#2}
- {
- \cs_if_free:NTF ##1
- { \msg_error:nnn {chemmacros} {renew-#1} {##1} }
- { #3 }
- }
- \exp_args:Nc \NewDocumentCommand
- {
- DeclareChem
- \str_uppercase:f { \tl_head:n {#1} }
- \tl_tail:n {#1}
- }
- {#2}
- {#3}
- \exp_args:Nc \NewDocumentCommand
- {
- ProvideChem
- \str_uppercase:f { \tl_head:n {#1} }
- \tl_tail:n {#1}
- }
- {#2}
- { \cs_if_free:NT ##1 { #3 } }
- \msg_new:nnn {chemmacros} {new-#1}
- {
- You've~ tried~ to~ define~ a~ #1~ with~ \token_to_str:N
- \NewChem #1 ,~ but~ the~ command~ sequence~ \token_to_str:N ##1
- \c_space_tl already~ exists.~ Please~ choose~ another~ name.
- }
- \msg_new:nnn {chemmacros} {renew-#1}
- {
- You've~ tried~ to~ renew~ the~ #1~ \token_to_str:N ##1 ,~ but~
- it~ doesn't~ exist.
- }
- }
-
-\cs_new_protected:Npn \chemmacros_new_environment_macroset:nnn #1#2#3
- {
- \exp_args:Nc \NewDocumentCommand {NewChem#1} {#2}
- {
- \bool_lazy_and:nnTF
- { \cs_if_free_p:c {##1} }
- { \cs_if_free_p:c {end##1} }
- {#3}
- { \msg_error:nnn {chemmacros} {new-#1} {##1} }
- }
- \exp_args:Nc \NewDocumentCommand {RenewChem#1} {#2}
- {
- \bool_lazy_or:nnTF
- { \cs_if_free_p:c {##1} }
- { \cs_if_free_p:c {end##1} }
- { \msg_error:nnn {chemmacros} {renew-#1} {##1} }
- {#3}
- }
- \exp_args:Nc \NewDocumentCommand {DeclareChem#1} {#2} {#3}
- \exp_args:Nc \NewDocumentCommand {ProvideChem#1} {#2}
- {
- \bool_lazy_and:nT
- { \cs_if_free_p:c {##1} }
- { \cs_if_free_p:c {end##1} }
- {#3}
- }
- \msg_new:nnn {chemmacros} {new-#1}
- {
- You've~ tried~ to~ define~ a~ #1~ with~ \token_to_str:N
- \NewChem #1 ,~ but~ the~ command~ sequence~ \exp_not:c {##1}
- \c_space_tl already~ exists.~ Please~ choose~ another~ name.
- }
- \msg_new:nnn {chemmacros} {renew-#1}
- { You've~ tried~ to~ renew~ the~ #1~ ##1,~ but~ it~ doesn't~ exist. }
- }
-
-\NewDocumentCommand \NewChemMacroset {smmm}
- {
- \IfBooleanTF {#1}
- { \chemmacros_new_environment_macroset:nnn {#2} {#3} {#4} }
- { \chemmacros_new_macroset:nnn {#2} {#3} {#4} }
- }
-
-% --------------------------------------------------------------------------
-\cs_new_protected:Npn \chemmacros_define_keys:nn #1#2
- { \keys_define:nn {chemmacros/#1} {#2} }
-\cs_generate_variant:Nn \chemmacros_define_keys:nn {x}
-
-\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_new_protected:Npn \chemmacros_set_keys_groups:nnn #1#2#3
- { \keys_set_groups:nnn {chemmacros/#1} {#2} {#3} }
-
-\cs_new_protected:Npn \chemmacros_set_keys_filter:nnn #1#2#3
- { \keys_set_filter:nnn {chemmacros/#1} {#2} {#3} }
-
-\cs_new_protected:Npn \chemmacros_define_global_keys:n #1
- { \keys_define:nn {chemmacros} {#1} }
-
-\cs_new_protected:Npn \chemmacros_set_global_keys:n #1
- { \keys_set:nn {chemmacros} {#1} }
-
-% --------------------------------------------------------------------------
-% basic tools:
-\cs_new:Npn \chemmacros_remove_backslash:N #1
- { \exp_after:wN \use_none:n \token_to_str:N #1 }
-
-\cs_new_eq:NN \chemmacros_ignore_spaces: \tex_ignorespaces:D
-
-\cs_new_protected:Npn \chemmacros_nobreak: { \tex_penalty:D 10000 \scan_stop: }
-\cs_new_protected:Npn \chemmacros_allow_break: { \tex_penalty:D \c_zero_int }
-\cs_new_protected:Npn \chemmacros_skip_nobreak:N #1
- {
- \chemmacros_nobreak:
- \skip_horizontal:N #1
- \chemmacros_nobreak:
- }
-
-% this is used at least in the `isotope' module
-\prg_new_conditional:Npnn \chemmacros_if_is_int:n #1 {p,T,F,TF}
- {
- \if_charcode:w ! \if_int_compare:w 9 < 1#1 ! \else: _ \fi:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-
-\prg_new_conditional:Npnn \chemmacros_if_loaded:nn #1#2 {p,T,F,TF}
- {
- \use:c {chemmacros_if_#1_loaded:nTF} {#2}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\prg_new_conditional:Npnn \chemmacros_if_package_loaded:n #1 {p,T,F,TF}
- {
- \cs_if_exist:cTF {ver@#1.sty}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\prg_new_conditional:Npnn \chemmacros_if_class_loaded:n #1 {p,T,F,TF}
- {
- \cs_if_exist:cTF {ver@#1.cls}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\ChemCompatibilityFrom{5.2}
-% this is still true \AtBeginDocument:
-\prg_new_conditional:Npnn \chemmacros_if_preamble: {p,T,F,TF}
- {
- \cs_if_eq:NNTF \@onlypreamble \@notprerr
- { \prg_return_false: }
- { \prg_return_true: }
- }
-
-% this is still false \AtBeginDocument:
-\prg_new_conditional:Npnn \chemmacros_if_document: {p,T,F,TF}
- {
- \bool_if:NTF \l__chemmacros_in_document_bool
- { \prg_return_true: }
- { \prg_return_false: }
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\cs_new_protected:Npn \chemmacros_cs_if_free_new:Npn #1
- {
- \cs_if_exist:NF #1
- { \cs_new:Npn #1 }
- }
-\cs_generate_variant:Nn \chemmacros_cs_if_free_new:Npn {c}
-
-\cs_new_protected:Npn \chemmacros_cs_if_free_new_protected:Npn #1
- {
- \cs_if_exist:NF #1
- { \cs_new_protected:Npn #1 }
- }
-\cs_generate_variant:Nn \chemmacros_cs_if_free_new_protected:Npn {c}
-
-\RequirePackage{scrlfile}
-
-% #1: counter
-% #2: singular
-% #3: plural
-% #4: Singular
-% #5: Plural
-\cs_new_protected:Npn \chemmacros_add_cleveref_support:nnnnn #1#2#3#4#5
- {
- \AfterPackage* {cleveref}
- {
- \cs_if_exist:cF {cref@#1@name}
- {
- \legacy_if:nTF {@cref@capitalise}
- { \crefname {#1} {#4} {#5} }
- { \crefname {#1} {#2} {#3} }
- \Crefname {#1} {#4} {#5}
- }
- }
- }
-\cs_generate_variant:Nn \chemmacros_add_cleveref_support:nnnnn {nnnx , nnnxx , nnnnx }
-
-% #1: counter
-% #2: singular
-% #3: Singular (optional)
-% #4: plural
-% #5: Plural (optional)
-\NewDocumentCommand \ChemCleverefSupport {mmomo}
- {
- \IfNoValueTF {#3}
- {
- \IfNoValueTF {#5}
- {
- \chemmacros_add_cleveref_support:nnnnn
- {#1}
- {#2}
- {#4}
- { \tl_titlecase:n {#2} }
- { \tl_titlecase:n {#4} }
- }
- {
- \chemmacros_add_cleveref_support:nnnnn
- {#1}
- {#2}
- {#4}
- { \tl_titlecase:n {#2} }
- {#5}
- }
- }
- {
- \IfNoValueTF {#5}
- {
- \chemmacros_add_cleveref_support:nnnnn
- {#1}
- {#2}
- {#4}
- {#3}
- { \tl_titlecase:n {#4} }
- }
- { \chemmacros_add_cleveref_support:nnnnn {#1} {#2} {#4} {#3} {#5} }
- }
- }
-\@onlypreamble\ChemCleverefSupport
-
-% #1: id
-% #2: mid sentence
-% #3: begin sentence
-\cs_new_protected:Npn \chemmacros_add_fancyref_support:nnn #1#2#3
- {
- \AfterPackage* {fancyref}
- {
- \chemmacros_cs_if_free_new:cpn {fancyref#1labelprefix} {#1}
- \chemmacros_cs_if_free_new:cpn {fref#1name} {#2}
- \chemmacros_cs_if_free_new:cpn {Fref#1name} {#3}
- \exp_args:Nnx \frefformat {vario} { \exp_not:c {fancyref#1labelprefix} }
- { \use:c {fref#1name} \fancyrefdefaultspacing ##1##3 }
- \exp_args:Nnx \Frefformat {vario} { \exp_not:c {fancyref#1labelprefix} }
- { \use:c {Fref#1name} \fancyrefdefaultspacing ##1##3 }
- \exp_args:Nnx \frefformat {plain} { \exp_not:c {fancyref#1labelprefix} }
- { \use:c {fref#1name} \fancyrefdefaultspacing ##1 }
- \exp_args:Nnx \Frefformat {plain} { \exp_not:c {fancyref#1labelprefix} }
- { \use:c {Fref#1name} \fancyrefdefaultspacing ##1 }
- }
- }
-\cs_generate_variant:Nn \chemmacros_add_fancyref_support:nnn {nnx}
-
-% #1: id
-% #2: mid sentence
-% #3: begin sentence (optional)
-\NewDocumentCommand \ChemFancyrefSupport {mmo}
- {
- \IfNoValueTF {#3}
- { \chemmacros_add_fancyref_support:nnn {#1} {#2} { \tl_titlecase:n {#3} } }
- { \chemmacros_add_fancyref_support:nnn {#1} {#2} {#3} }
- }
-\@onlypreamble\ChemFancyrefSupport
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-% some checks at begin document:
-\bool_new:N \l__chemmacros_in_document_bool
-\bool_new:N \l__chemmacros_chemstyle_bool
-
-\chemmacros_if_compatibility:nnTF {>=} {5.2}
- { \AfterEndPreamble }
- { \AtBeginDocument }
- { \bool_set_true:N \l__chemmacros_in_document_bool }
-
-\AtBeginDocument
- {
- \@ifpackageloaded { chemstyle }
- { \bool_set_true:N \l__chemmacros_chemstyle_bool }
- { \bool_set_false:N \l__chemmacros_chemstyle_bool }
- }
-
-% --------------------------------------------------------------------------
-% detection and handling of bold face:
-\RequirePackage{bm}
-
-\prg_new_protected_conditional:Npnn \chemmacros_if_bold: {T,F,TF}
- {
- \seq_if_in:NVTF \l__chemmacros_if_bf_seq \f@series
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\seq_new:N \l__chemmacros_if_bf_seq
-
-\seq_set_split:Nnn \l__chemmacros_if_bf_seq { , }
- {
- b , bc , bm , bx , bux ,
- eb , ebc , ebx , mb ,
- sb , sbc , sbx ,
- ub , ubc , ubx
- }
-
-\cs_new_protected:Npn \chemmacros_bold:n #1
- {
- \chemmacros_if_bold:TF
- {
- \mode_if_math:TF
- { \bm {#1} }
- { \textbf {#1} }
- }
- {#1}
- }
-
-\cs_new_protected:Npn \chemmacros_detect_bold:n
- { \error \chemmacros_bold:n }
-
-% --------------------------------------------------------------------------
-\RequirePackage{amstext}
-
-\cs_new_protected:Npn \chemmacros_text:n #1
- { \mode_if_math:TF { \text {#1} } {#1} }
-\cs_generate_variant:Nn \chemmacros_text:n { V }
-
-\cs_new_protected:Npn \chemmacros_math:n #1
- { \chemmacros_text:n { \c_math_toggle_token #1 \c_math_toggle_token } }
-\cs_generate_variant:Nn \chemmacros_math:n { V }
-
-% --------------------------------------------------------------------------
-% a setup command:
-\NewDocumentCommand \chemsetup {om}
- {
- \IfNoValueTF {#1}
- { \keys_set:nn {chemmacros} {#2} }
- { \keys_set:nn {chemmacros/#1} {#2} }
- }
-
-\chemmacros_define_global_keys:n
- { modules .code:n = \chemmacros_load_modules:n {#1} }
-
-% --------------------------------------------------------------------------
-
-% load package #1 and add its options to chemmacros
-% this requires that package #1 defines its options with l3keys using its
-% name as module
-\cs_new_protected:Npn \chemmacros_integrate_package:nnn #1#2#3
- {
- \tl_if_blank:nTF {#3}
- {
- \tl_if_blank:nTF {#1}
- { \RequirePackage {#2} }
- { \RequirePackage [#1] {#2} }
- }
- {
- \tl_if_blank:nTF {#1}
- { \RequirePackage {#2} [#3] }
- { \RequirePackage [#1] {#2} [#3] }
- }
- \chemmacros_define_global_keys:n
- {
- #2 .choice: ,
- #2 / unknown .code:n =
- \keys_set:no {#2} { \l_keys_key_tl = ##1 }
- }
- }
-
-% --------------------------------------------------------------------------
-
-\chemmacros_if_compatibility:nnT {>=} {5.2}
- { \chemmacros_load_module:n {errorcheck} }
-
-% --------------------------------------------------------------------------
-
-\bool_new:N \l__chemmacros_hyperref_bool
-
-\AtEndPreamble
- {
- \chemmacros_if_package_loaded:nT {hyperref}
- { \bool_set_true:N \l__chemmacros_hyperref_bool }
- }
-
-\file_input_stop:
-
-2015/09/23 - new conditionals \chemmacros_if_preamble:TF and
- \chemmacros_if_document:TF
-2015/10/14 - load `errorcheck' module
-2016/02/09 - starred version of \NewChemMacroset
-2016/03/07 - \chemmacros_define_keys:nn and friends
-2016/04/25 - macros for cleveref and fancyref support, \ChemCleverefSupport
- \ChemFancyrefSupport
-2016/05/04 - fix \ChemCleverefSupport
-2017/08/28 - add missing hyperref check
-2020/01/16 - adapt to renaming of string case changing functions
-2020/02/02 - lazy boolean evaluation
-2020/11/21 - exchange \tl_mixed_case:n for \tl_titlecase:n
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.charges.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.charges.code.tex
deleted file mode 100644
index 98ef61f7b6..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.charges.code.tex
+++ /dev/null
@@ -1,157 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `charges'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{charges}{2015/07/30 charges}
-
-\chemmacros_load_module:n {chemformula}
-
-% --------------------------------------------------------------------------
-% circled charge signs: they are defined in the `chemformula' package:
-% use directly:
-\cs_new_protected:Npn \fplus { { \chemformula_fplus: } }
-\cs_new_protected:Npn \fminus { { \chemformula_fminus: } }
-
-% change output depending on circled-option
-\bool_new:N \l__chemmacros_circled_bool
-\bool_set_true:N \l__chemmacros_circled_bool
-\bool_new:N \l__chemmacros_circled_formal_bool
-\bool_set_true:N \l__chemmacros_circled_formal_bool
-\bool_new:N \l__chemmacros_circled_chem_bool
-\bool_set_true:N \l__chemmacros_circled_chem_bool
-
-
-\chemmacros_define_keys:nn {charges}
- {
- circletype .choice: ,
- circletype / math .code:n =
- {
- \bool_set_false:N \l__chemmacros_circled_chem_bool
- \chemmacros_if_package_loaded:nT {chemformula}
- { \bool_set_false:N \l_chemformula_formal_chem_bool }
- } ,
- circletype / chem .code:n =
- {
- \bool_set_true:N \l__chemmacros_circled_chem_bool
- \chemmacros_if_package_loaded:nT {chemformula}
- { \bool_set_true:N \l_chemformula_formal_chem_bool }
- } ,
- circletype .value_required:n = true ,
- circled .choice: ,
- circled / none .code:n =
- {
- \bool_set_false:N \l__chemmacros_circled_bool
- \bool_set_false:N \l__chemmacros_circled_formal_bool
- \chemmacros_if_package_loaded:nT {chemformula}
- { \bool_set_false:N \l_chemformula_formal_charges_bool }
- } ,
- circled / formal .code:n =
- {
- \bool_set_true:N \l__chemmacros_circled_bool
- \bool_set_true:N \l__chemmacros_circled_formal_bool
- \chemmacros_if_package_loaded:nT {chemformula}
- { \bool_set_false:N \l_chemformula_formal_charges_bool }
- } ,
- circled / all .code:n =
- {
- \bool_set_true:N \l__chemmacros_circled_bool
- \bool_set_false:N \l__chemmacros_circled_formal_bool
- \chemmacros_if_package_loaded:nT {chemformula}
- { \bool_set_true:N \l_chemformula_formal_charges_bool }
- } ,
- circled .default:n = all
- }
-
-\cs_new_protected:Npn \chemmacros_plus: { \chemformula_plus: }
-\cs_new_protected:Npn \chemmacros_minus: { \chemformula_minus: }
-
-\cs_new_protected:Npn \chemmacros_formal_plus: { \chemformula_formal_plus: }
-\cs_new_protected:Npn \chemmacros_formal_minus: { \chemformula_formal_minus: }
-
-\cs_new_protected:Npn \chemmacros_charge:n #1
- { \chemmacros_chemformula:n { {}^{#1} } }
-
-\cs_new_protected:Npn \chemmacros_new_charge_command:Nn #1#2
- {
- \DeclareDocumentCommand #1 {o}
- {
- \IfNoValueTF {##1}
- { \chemmacros_charge:n {#2} }
- { \chemmacros_charge:n {##1#2} }
- }
- }
-
-\tl_new:N \l__chemmacros_partial_charge_format_tl
-\tl_set:Nn \l__chemmacros_partial_charge_format_tl { \tiny }
-
-\cs_new_protected:Npn \chemmacros_new_partial_charge_command:Nn #1#2
- {
- \cs_new_protected:Npn #1
- {
- \mbox {
- \l__chemmacros_partial_charge_format_tl
- \c_math_toggle_token \delta #2 \c_math_toggle_token
- }
- }
- }
-
-\NewChemMacroset {Charge} {mm}
- { \chemmacros_new_charge_command:Nn #1 {#2} }
-
-\NewChemMacroset {PartialCharge} {mm}
- { \chemmacros_new_partial_charge_command:Nn #1 {#2} }
-
-\cs_new_protected:Npn \scrm
- { \ensuremath { \scriptstyle \chemmacros_minus: } }
-\cs_new_protected:Npn \scrp
- { \ensuremath { \scriptstyle \chemmacros_plus: } }
-\cs_new_protected:Npn \fscrm
- { \ensuremath { \scriptstyle \chemmacros_formal_minus: } }
-\cs_new_protected:Npn \fscrp
- { \ensuremath { \scriptstyle \chemmacros_formal_plus: } }
-\cs_new_protected:Npn \fsscrm
- { \ensuremath { \scriptscriptstyle \chemmacros_formal_minus: } }
-\cs_new_protected:Npn \fsscrp
- { \ensuremath { \scriptscriptstyle \chemmacros_formal_plus: } }
-
-\chemmacros_define_keys:nn {charges}
- {
- partial-format .tl_set:N = \l__chemmacros_partial_charge_format_tl
- }
-
-% --------------------------------------------------------------------------
-\NewChemCharge \mch { \chemmacros_minus: }
-\NewChemCharge \pch { \chemmacros_plus: }
-\NewChemCharge \fmch { \chemmacros_formal_minus: }
-\NewChemCharge \fpch { \chemmacros_formal_plus: }
-
-% partial charges:
-\NewChemPartialCharge \delm { \chemmacros_minus: }
-\NewChemPartialCharge \delp { \chemmacros_plus: }
-\NewChemPartialCharge \fdelm { \chemmacros_formal_minus: }
-\NewChemPartialCharge \fdelp { \chemmacros_formal_plus: }
-
-% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.chemformula.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.chemformula.code.tex
deleted file mode 100644
index 2289891080..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.chemformula.code.tex
+++ /dev/null
@@ -1,243 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `chemformula'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{chemformula}{2020/02/02 integration of chemical formulas}
-
-\RequirePackage{amstext}
-\chemmacros_load_module:n {charges}
-
-\msg_new:nnn {chemmacros} {unknown-formula-method}
- {
- You~ chose~ the~ formula~ method~ `#1'~ which~ is~ not~ available.~
- I'm~ falling~ back~ to~ `chemformula'~ now.
- }
-
-\msg_new:nnn {chemmacros} {default-formula-method}
- {
- You~ haven't~ chosen~ a~ formula~ method~ so~ I'm~ assuming~ the~ default~
- method~ `chemformula'.
- }
-
-\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~ should~ decide~ for~ only~ one~ of~ the~ packages~ for~ having~ a~
- consistent~ layout.
- }
-
-% --------------------------------------------------------------------------
-% 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 #1 { \chemmacros_chemformula:n {#1} }
-\cs_new_protected:Npn \chemmacros@reaction #1 { \chemmacros_reaction:n {#1} }
-
-% --------------------------------------------------------------------------
-% setup, check and define each method:
-\bool_new:N \l__chemmacros_formula_method_set_bool
-
-\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
-
-% #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_setup_method_package:n #1
- {
- \prop_item:Nn \l__chemmacros_method_packages_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}
- {
- \prop_if_in:NnTF \l__chemmacros_method_packages_prop {#1}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\cs_new_protected:Npn \chemmacros_check_formula_method:
- {
- \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
- {
- \chemmacros_if_package_loaded:nT {##1}
- {
- \bool_if:NTF \l__chemmacros_tmpa_bool
- {
- \msg_warning:nn {chemmacros} {formula-conflict}
- \chemmacros_set_formula_method:n {chemformula}
- }
- { \chemmacros_set_formula_method:n {##1} }
- \bool_set_true:N \l__chemmacros_tmpa_bool
- }
- }
- \bool_if:NF \l__chemmacros_tmpa_bool
- {
- \msg_info:nn {chemmacros} {default-formula-method}
- \chemmacros_set_formula_method:n {chemformula}
- }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_set_formula_method:n #1
- {
- \chemmacros_if_method_package:nTF {#1}
- { \chemmacros_setup_method_package:n {#1} }
- {
- \msg_warning:nnn {chemmacros} {unknown-formula-method} {#1}
- \chemmacros_setup_method_package:n {chemformula}
- }
- \bool_set_true:N \l__chemmacros_formula_method_set_bool
- }
-\cs_generate_variant:Nn \chemmacros_set_formula_method:n {V}
-
-% --------------------------------------------------------------------------
-% add formula methods:
-\chemmacros_add_method_package:nn {chemformula}
- {
- \chemmacros_integrate_package:nnn {} {chemformula} {2015/09/08}
- \cs_set_protected:Npn \chemmacros_chemformula: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_integrate_package:nnn {version=4} {mhchem} {}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1 { \ce {#1} }
- \cs_set_protected:Npn \chemmacros_reaction:n #1 { \ce {#1} }
- \chemmacros_after_module:nn {charges}
- {
- \cs_set_protected:Npn \chemmacros_elpair:n #1 { \ce{#1} : }
- \cs_set_protected:Npn \chemmacros_plus: { + }
- \cs_set_protected:Npn \chemmacros_minus: { - }
- \cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
- \cs_set_protected:Npn \chemmacros_formal_minus: { \ensuremath{\ominus} }
- \cs_set_protected:Npn \fplus { \ensuremath{\oplus} }
- \cs_set_protected:Npn \fminus { \ensuremath{\ominus} }
- }
- }
-
-\ChemCompatibilityFrom{5.6}
-\chemmacros_add_method_package:nn {chemist}
- {
- \RequirePackage {chemist}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1
- { \chemmacros_text:n { \ChemForm {#1} } }
- \cs_set_protected:Npn \chemmacros_reaction:n #1
- { \chemmacros_text:n { \ChemForm {#1} } }
- \chemmacros_after_module:nn {charges}
- {
- \cs_set_protected:Npn \chemmacros_elpair:n #1
- { \chemmacros_text:n { \ChemForm {#1} : } }
- \cs_set_protected:Npn \chemmacros_plus: { + }
- \cs_set_protected:Npn \chemmacros_minus: { - }
- \cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
- \cs_set_protected:Npn \chemmacros_formal_minus: { \ensuremath{\ominus} }
- \cs_set_protected:Npn \fplus { \ensuremath{\oplus} }
- \cs_set_protected:Npn \fminus { \ensuremath{\ominus} }
- }
- }
-
-\chemmacros_add_method_package:nn {chemfig}
- {
- \RequirePackage {chemfig}
- \cs_set_protected:Npn \chemmacros_chemformula:n #1
- { \printatom {#1} }
- \cs_set_protected:Npn \chemmacros_reaction:n #1
- { \printatom {#1} }
- \chemmacros_after_module:nn {charges}
- {
- \cs_set_protected:Npn \chemmacros_elpair:n #1
- { \Lewis { 0: , \printatom {#1} } }
- \cs_set_protected:Npn \chemmacros_plus: { + }
- \cs_set_protected:Npn \chemmacros_minus: { - }
- \cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
- \cs_set_protected:Npn \chemmacros_formal_minus: { \ensuremath{\ominus} }
- \cs_set_protected:Npn \fplus { \ensuremath{\oplus} }
- \cs_set_protected:Npn \fminus { \ensuremath{\ominus} }
- }
- }
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityTo{5.1}
-\chemmacros_set_formula_method:n {chemformula}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.1}
-\chemmacros_define_global_keys:n
- { formula .code:n = \chemmacros_set_formula_method:n {#1} }
-\EndChemCompatibility
-
-\def\bla{bla}
-
-\AtEndPreamble
- {
- \bool_if:NF \l__chemmacros_formula_method_set_bool
- {
- \bool_lazy_and:nnTF
- { \chemmacros_if_compatibility_p:nn {>=} {5.2} }
- { \chemmacros_if_compatibility_p:nn {<} {5.6} }
- { \chemmacros_check_formula_method: }
- {
- \chemmacros_if_compatibility:nnTF {>=} {5.6}
- { \msg_info:nn {chemmacros} {default-formula-method} }
- { \msg_warning:nn {chemmacros} {default-formula-method} }
- \chemmacros_set_formula_method:n {chemformula}
- }
- }
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/09/22 - new general option `method' which allows a choice between
- `chemformula' and `mhchem'
-2015/10/13 - add missing compatibility definitions
- - check for `mhchem' and `chemformula' and set method accordingly
- if possible
-2016/04/27 - further generalization of the `method' concept, new methods
- `chemist' and `chemfig'
- - don't automatically load an available method: load `chemformula'
- if the users haven't decided for themselves and issue a warning
-2016/05/03 - correct wrong method check
-2020/02/02 - lazy boolean evaluation
-2020/02/29 - use \ch even for simple formulas – resolves issue #28
-2020/03/02 - undo last change: this makes problems with oxidation numbers in a
- reaction
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.errorcheck.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.errorcheck.code.tex
deleted file mode 100644
index cbe43abd09..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.errorcheck.code.tex
+++ /dev/null
@@ -1,130 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `errorcheck'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{errorcheck}{2016/10/05 error checking for unloaded modules}[5.2]
-
-\RequirePackage{scrlfile}
-
-\msg_new:nnn {chemmacros} {undefined}
- {
- The~ #1~ `#2'~ is~ undefined.~ You~ need~ to~ load~ the~
- `#3'~ module.
- }
-
-\cs_generate_variant:Nn \msg_error:nnnnn {nnnx}
-
-\cs_new_protected:Npn \chemmacros_requires_module:nNn #1#2#3
- {
- \chemmacros_if_module_loaded:nF {#3}
- {
- \cs_if_free:NT #2
- {
- \cs_set:Npn #2
- {
- \msg_error:nnnxn {chemmacros} {undefined}
- {#1}
- {\token_to_str:N #2}
- {#3}
- }
- \chemmacros_before_module:nn {#3} { \cs_undefine:N #2 }
- }
- }
- }
-\cs_generate_variant:Nn \chemmacros_requires_module:nNn {nc}
-
-\cs_new_protected:Npn \chemmacros_command_requires_module:Nn #1#2
- { \chemmacros_requires_module:nNn {command} #1 {#2} }
-
-\cs_new_protected:Npn \chemmacros_environment_requires_module:nn #1#2
- { \chemmacros_requires_module:ncn {environment} {#1} {#2} }
-
-% --------------------------------------------------------------------------
-% add checking for the most common user commands and environments:
-% isotopes module
-\chemmacros_command_requires_module:Nn \isotope {isotopes}
-
-% mechanisms module
-\chemmacros_command_requires_module:Nn \mech {mechanisms}
-
-% newman module
-\chemmacros_command_requires_module:Nn \newman {newman}
-
-% orbital module
-\chemmacros_command_requires_module:Nn \orbital {orbital}
-
-% polymers module
-\chemmacros_command_requires_module:Nn \makepolymerdelims {polymers}
-
-% reactions module
-\chemmacros_environment_requires_module:nn {reaction} {reactions}
-\chemmacros_environment_requires_module:nn {reaction*} {reactions}
-\chemmacros_environment_requires_module:nn {reactions} {reactions}
-\chemmacros_environment_requires_module:nn {reactions*} {reactions}
-\chemmacros_command_requires_module:Nn \listofreactions {reactions}
-\chemmacros_command_requires_module:Nn \AddRxnDesc {reactions}
-
-% redox module
-\chemmacros_command_requires_module:Nn \ox {redox}
-\chemmacros_command_requires_module:Nn \OX {redox}
-\chemmacros_command_requires_module:Nn \redox {redox}
-
-% scheme module
-\chemmacros_environment_requires_module:nn {scheme} {scheme}
-\chemmacros_command_requires_module:Nn \listschemename {scheme}
-\chemmacros_command_requires_module:Nn \schemename {scheme}
-\chemmacros_command_requires_module:Nn \listofschemes {scheme}
-
-\BeforePackage {chemscheme}
- {
- \cs_undefine:N \scheme
- \cs_undefine:N \endscheme
- \cs_undefine:N \listschemename
- \cs_undefine:N \schemename
- \cs_undefine:N \listofschemes
- }
-
-% spectroscopy module
-\chemmacros_command_requires_module:Nn \NMR {spectroscopy}
-\chemmacros_environment_requires_module:nn {experimental} {spectroscopy}
-
-% thermodynamics module
-\chemmacros_command_requires_module:Nn \state {thermodynamics}
-\chemmacros_command_requires_module:Nn \enthalpy {thermodynamics}
-\chemmacros_command_requires_module:Nn \entropy {thermodynamics}
-\chemmacros_command_requires_module:Nn \gibbs {thermodynamics}
-
-% xfrac module
-\chemmacros_command_requires_module:Nn \chemfrac {xfrac}
-
-% --------------------------------------------------------------------------
-
-\file_input_stop:
-
-2015/10/14 - first version
-2016/03/08 - add `polymers' module
-2016/05/31 - enable `chemscheme' to be loaded after chemmacros
-2016/10/06 - check if commands exist before defining them to raise errors
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.greek.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.greek.code.tex
deleted file mode 100644
index 358d0716f9..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.greek.code.tex
+++ /dev/null
@@ -1,70 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `greek'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{greek}{2020/02/02 upright greek symbols}
-
-\RequirePackage{chemgreek}[2020/01/16]
-
-\msg_new:nnn {chemmacros} {no-greek}
- {
- You~ haven't~ loaded~ any~ package~ for~ upright~ Greek~ letters~ or~ no~
- unique~ choice~ was~ possible.~ Either~ load~ one~ of~ packages~
- specified~ in~ the~ manual~ or~ select~ a~ chemgreek~ mapping~ manually.
- }
-
-\msg_new:nnn {chemmacros} {greek-undefined}
- {
- The~ chemgreek~ mapping~ `#1'~ you~ chose~ \msg_line_context: \c_space_tl
- is~ not~ defined.~ Please~ choose~ another~ one.
- }
-
-% chemgreek selects a mapping if an unambiguous choice is possible, otherwise
-% selects `default'. Warn the user in this case:
-\AtBeginDocument{
- \bool_lazy_or:nnT
- { \chemgreek_if_mapping_active_p:n {default} }
- { \chemgreek_if_mapping_active_p:n {var-default} }
- { \msg_warning:nn {chemmacros} {no-greek} }
-}
-
-% an option for manual selection:
-\chemmacros_define_global_keys:n
- { greek .code:n = \chemmacros_choose_chemgreek_mapping:n {#1} }
-
-\cs_new_protected:Npn \chemmacros_choose_chemgreek_mapping:n #1
- {
- \chemgreek_if_mapping_exists:nTF {#1}
- {
- \chemgreek_load_mapping_package:n {#1}
- \chemgreek_activate_mapping:n {#1}
- }
- { \msg_warning:nnn {chemmacros} {greek-undefined} {#1} }
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-2020/02/02 - lazy boolean evaluation
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.isotopes.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.isotopes.code.tex
deleted file mode 100644
index 587bc3c266..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.isotopes.code.tex
+++ /dev/null
@@ -1,238 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `isotopes'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{isotopes}{2015/07/22 a macro to easily print element isotopes}
-
-\RequirePackage{elements}
-
-\msg_new:nnn {chemmacros} {no-isotope}
- { The~ isotope~ #2~ is~ not~ defined~ for~ element~ #1. }
-
-% --------------------------------------------------------------------------
-\tl_new:N \l__chemmacros_isotope_tl
-\tl_new:N \l__chemmacros_isotope_list_tl
-\seq_new:N \l__chemmacros_isotope_seq
-\seq_new:N \l__chemmacros_check_isotopes_seq
-
-% #1: atomic number|element symbol|element name
-% #2: tokenlist variable
-\cs_new_protected:Npn \chemmacros_get_atom_number:nN #1#2
- {
- \chemmacros_if_is_int:nTF {#1}
- { \tl_set:Nn #2 {#1} }
- {
- \cs_if_exist:cTF { @elements@atom@number@ \str_lowercase:n {#1} }
- { \tl_set:Nx #2 { \use:c { @elements@atom@number@ \str_lowercase:n {#1} } } }
- { \tl_set:Nx #2 { \use:c { @elements@atom@name@num@ \str_lowercase:n {#1} } } }
- }
- }
-\cs_generate_variant:Nn \chemmacros_get_atom_number:nN { V }
-
-% #1: atomic number|element symbol|element name
-% #2: tl to store the result in
-\cs_new_protected:Npn \chemmacros_get_isotope_list:nN #1#2
- {
- \chemmacros_get_atom_number:nN {#1} \l__chemmacros_isotope_tl
- \tl_set:Nx #2
- {
- \use:c
- {
- @elements@atom@isotopes@
- \int_to_roman:n {\l__chemmacros_isotope_tl}
- }
- }
- }
-
-% #1: atomic number|element symbol|element name
-% #2: tokenlist variable
-\cs_new_protected:Npn \chemmacros_get_element_symbol:nN #1#2
- {
- \chemmacros_get_atom_number:nN {#1} \l__chemmacros_isotope_tl
- \tl_set:Nx #2
- {
- \use:c
- {
- @elements@atom@symbol@num@
- \int_to_roman:n {\l__chemmacros_isotope_tl}
- }
- }
- }
-
-% #1: atomic number|element symbol|element name
-% #2: isotope number
-\prg_new_protected_conditional:Npnn \chemmacros_check_isotope:nn #1#2 {T,F,TF}
- {
- \chemmacros_get_isotopes:nN {#1} \l__chemmacros_check_isotopes_seq
- \seq_if_in:NnTF \l__chemmacros_check_isotopes_seq {#2}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-\cs_generate_variant:Nn \chemmacros_check_isotope:nnF { V }
-
-% #1: atomic number|element symbol|element name
-% #2: tl to store the result in
-\cs_new_protected:Npn \chemmacros_get_main_isotope:nN #1#2
- {
- \chemmacros_get_isotope_list:nN {#1} \l__chemmacros_isotope_list_tl
- \seq_set_split:NnV \l__chemmacros_isotope_seq {,} \l__chemmacros_isotope_list_tl
- \seq_map_inline:Nn \l__chemmacros_isotope_seq
- {
- \chemmacros_read_isotope:nNN {##1}
- \l__chemmacros_tmpa_bool
- #2
- \bool_if:NT \l__chemmacros_tmpa_bool
- { \seq_map_break: }
- }
- }
-\cs_generate_variant:Nn \chemmacros_get_main_isotope:nN { V }
-
-% #1: atomic number|element symbol|element name
-% #2: seq to store the results in
-\cs_new_protected:Npn \chemmacros_get_isotopes:nN #1#2
- {
- \seq_clear:N #2
- \chemmacros_get_isotope_list:nN {#1} \l__chemmacros_tmpa_tl
- \seq_set_split:NnV \l__chemmacros_isotope_seq {,} \l__chemmacros_tmpa_tl
- \seq_map_inline:Nn \l__chemmacros_isotope_seq
- {
- \chemmacros_read_isotope:nNN {##1}
- \l__chemmacros_tmpa_bool
- \l__chemmacros_tmpa_tl
- \seq_put_right:NV #2 \l__chemmacros_tmpa_tl
- }
- }
-
-% #1: boolean variable
-% #2: tokenlist variable
-% #3: isotope list entry
-\cs_new_protected:Npn \chemmacros_read_isotope:nNN #1#2#3
- { \__chemmacros_read_isotope:NNw #2#3 !#1!! \q_stop }
-
-% \__chemmacros_read_isotope:NNw N N !!1!! \q_stop
-% \__chemmacros_read_isotope:NNw N N !1!! \q_stop
-\cs_new_protected:Npn \__chemmacros_read_isotope:NNw #1#2#3!#4!#5!#6 \q_stop
- {
- \tl_if_blank:nTF {#5}
- {
- \tl_set:Nn #2 {#4}
- \bool_set_false:N #1
- }
- {
- \tl_set:Nn #2 {#5}
- \bool_set_true:N #1
- }
- }
-
-% --------------------------------------------------------------------------
-% #1: boolean: hide atomic number?
-% #2: nucleons, element symbol
-\cs_new_protected:Npn \chemmacros_isotope:nn #1#2
- { \__chemmacros_isotope:nww {#1} #2,, \q_stop }
-
-\cs_new_protected:Npn \__chemmacros_isotope:nww #1#2,#3,#4 \q_stop
- {
- \tl_if_blank:nTF {#3}
- {
- \chemmacros_get_element_symbol:nN {#2} \l__chemmacros_tmpa_tl
- \chemmacros_get_main_isotope:nN {#2} \l__chemmacros_tmpb_tl
- \chemmacros_get_atom_number:nN {#2} \l__chemmacros_tmpc_tl
- \bool_if:nTF {#1}
- {
- \chemmacros_isotope_write:VnV
- \l__chemmacros_tmpb_tl
- { }
- \l__chemmacros_tmpa_tl
- }
- {
- \chemmacros_isotope_write:VVV
- \l__chemmacros_tmpb_tl
- \l__chemmacros_tmpc_tl
- \l__chemmacros_tmpa_tl
- }
- }
- {
- \chemmacros_get_element_symbol:nN {#3} \l__chemmacros_tmpa_tl
- \chemmacros_get_atom_number:nN {#3} \l__chemmacros_tmpb_tl
- \chemmacros_check_isotope:VnF
- \l__chemmacros_tmpa_tl
- {#2}
- {
- \chemmacros_get_element_symbol:nN {#3} \l__chemmacros_tmpa_tl
- \msg_warning:nnVn {chemmacros} {no-isotope}
- \l__chemmacros_tmpa_tl
- {#2}
- }
- \chemmacros_get_element_symbol:nN {#3} \l__chemmacros_tmpa_tl
- \bool_if:nTF {#1}
- { \chemmacros_isotope_write:nnV {#2} { } \l__chemmacros_tmpa_tl }
- {
- \chemmacros_isotope_write:nVV {#2}
- \l__chemmacros_tmpb_tl
- \l__chemmacros_tmpa_tl
- }
- }
- }
-
-\bool_new:N \l__chemmacros_isotope_super_bool
-\tl_new:N \l__chemmacros_isotope_side_connect_tl
-
-\chemmacros_define_keys:nn {isotopes}
- {
- format .choice: ,
- format / super .code:n =
- \bool_set_true:N \l__chemmacros_isotope_super_bool ,
- format / side .code:n =
- \bool_set_false:N \l__chemmacros_isotope_super_bool ,
- format .initial:n = super ,
- side-connect .tl_set:N = \l__chemmacros_isotope_side_connect_tl ,
- side-connect .initial:n = -
- }
-
-% #1: nucleons
-% #2: atomic number
-% #3: element symbol
-\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_chemformula:n {#3}
- \tl_use:N \l__chemmacros_isotope_side_connect_tl
- #1
- }
- }
-\cs_generate_variant:Nn \chemmacros_isotope_write:nnn { VnV , VVV , nnV , nVV }
-
-% TODO: option for the layout of the written isotope: ^{12}_6C vs C-12
-
-\NewDocumentCommand \isotope { sm }
- { \chemmacros_isotope:nn {#1} {#2} }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-2015/07/22 - first version
-2020/01/16 - adapt to renaming of string case changing functions
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.lang.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.lang.code.tex
deleted file mode 100644
index 19c298940e..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.lang.code.tex
+++ /dev/null
@@ -1,177 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `lang'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{lang}{2016/05/31 language settings for chemmacros}
-
-\RequirePackage{translations}
-
-\msg_new:nnn {chemmacros} {language-not-defined}
- {
- You~ chose~ the~ language~ `#1'~ which~ is~ not~ defined~ by~ chemmacros.~
- `english'~ is~ used~ instead.~ If~ you~ just~ mistyped~ try~ again!~
- Otherwise~ contact~ the~ author~ and~ he'll~ probably~ add~ your~ language.
- }
-
-% --------------------------------------------------------------------------
-% language settings:
-\bool_new:N \l__chemmacros_language_auto_bool
-\bool_set_true:N \l__chemmacros_language_auto_bool
-% this token list will hold the chosen language for chemmacros; since the
-% language is either chosen automatically or by option it is only available at
-% begin document
-\tl_new:N \l_chemmacros_language_tl
-\tl_set:Nn \l_chemmacros_language_tl {english}
-\tl_new:N \l__chemmacros_current_language_tl
-
-\tl_const:Nx \c__chemmacros_keyword_prefix_tl
- { \chemmacros_if_compatibility:nnT {>=} {5.7} {chem-keyword-} }
-
-\prop_new:N \g_chemmacros_translations_prop
-
-% translate the key #1
-\cs_new:Npn \chemmacros_translate:n #1
- {
- \bool_if:NTF \l__chemmacros_language_auto_bool
- { \GetTranslation { \c__chemmacros_keyword_prefix_tl #1 } }
- {
- \GetTranslationFor
- {\l_chemmacros_language_tl}
- { \c__chemmacros_keyword_prefix_tl #1 }
- }
- }
-
-\DeclareExpandableDocumentCommand \ChemTranslate {m}
- { \chemmacros_translate:n {#1} }
-
-\chemmacros_define_global_keys:n
- {
- language .value_required:n = true ,
- language .code:n =
- \tl_if_eq:nnTF {#1} {auto}
- { \bool_set_true:N \l__chemmacros_language_auto_bool }
- {
- \bool_set_false:N \l__chemmacros_language_auto_bool
- \tl_set:Nn \l__chemmacros_current_language_tl {#1}
- } ,
- language .initial:n = auto
- }
-
-\ChemCompatibilityTo{5.3}
-\chemmacros_define_global_keys:n
- {
- german .meta:n = { language = german } ,
- ngerman .meta:n = { language = ngerman }
- }
-\EndChemCompatibility
-
-\AtBeginDocument{
- \bool_if:NTF \l__chemmacros_language_auto_bool
- {
- \tl_set:Nx \l_chemmacros_language_tl
- { \@trnslt@language{\@trnslt@current@language} }
- }
- {
- \tl_set_eq:NN
- \l_chemmacros_language_tl
- \l__chemmacros_current_language_tl
- }
-}
-
-% --------------------------------------------------------------------------
-\cs_new_protected:Npn \__chemmacros_declare_translation:nw #1#2=#3\q_stop
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { \tl_trim_spaces:n {#2} }
- \tl_set:Nx \l__chemmacros_tmpb_tl { \tl_trim_spaces:n {#3} }
- \use:x
- {
- \chemmacros_declare_translation:nnn
- { \exp_not:n {#1} }
- { \exp_not:V \l__chemmacros_tmpa_tl }
- { \exp_not:V \l__chemmacros_tmpb_tl }
- }
- }
-
-% #1: key
-% #2: lang
-% #3: translation
-\cs_new_protected:Npn \chemmacros_declare_translation:nnn #1#2#3
- {
- \declaretranslation
- {#2}
- { \c__chemmacros_keyword_prefix_tl #1 }
- {#3}
- \prop_gput:Nnn \g_chemmacros_translations_prop {#1(#2)} {#3}
- }
-\cs_generate_variant:Nn \chemmacros_declare_translation:nnn {V}
-
-% #1: key
-% #2: csv list: { <lang1> = <translation1> , <lang2> = <translation2> }
-\cs_new_protected:Npn \chemmacros_declare_translations:nn #1#2
- {
- \clist_map_inline:nn {#2}
- { \__chemmacros_declare_translation:nw {#1} ##1 \q_stop }
- }
-
-\NewDocumentCommand \DeclareChemTranslations {mm}
- { \chemmacros_declare_translations:nn {#1} {#2} }
-\@onlypreamble \DeclareChemTranslations
-
-\NewDocumentCommand \DeclareChemTranslation {mmm}
- { \chemmacros_declare_translation:nnn {#1} {#2} {#3} }
-\@onlypreamble \DeclareChemTranslation
-
-\cs_new:Npn \__chemmacros_parse_translate_list_entry:nnn #1#2#3 {}
-
-\cs_new_protected:Npn \__chemmacros_parse_translate_list_entry:www #1(#2)\q_mark#3\q_stop
- { \__chemmacros_parse_translate_list_entry:nnn {#1} {#2} {#3} }
-
-\cs_new_protected:Npn \chemmacros_for_all_translations_do:n #1
- {
- \cs_set:Npn \__chemmacros_parse_translate_list_entry:nnn ##1##2##3 {#1}
- \prop_map_inline:Nn \g_chemmacros_translations_prop
- { \__chemmacros_parse_translate_list_entry:www ##1 \q_mark ##2 \q_stop }
- }
-
-\ChemCompatibilityFrom{5.7}
-\NewDocumentCommand \ForAllChemTranslationsDo {+m}
- { \chemmacros_for_all_translations_do:n {#1} }
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/11/17 - remove options `german' and `ngerman', starting with v5.3
-2016/02/03 - adapt to changes in `acid-base' module
-2016/04/27 - additions/changes to reaction and scheme translations
- - \chemmacros_declare_translation:nnn and
- \chemmacros_declare_translations:nn
- - \DeclareChemTranslation and \DeclareChemTranslations
- - moved translations from lang module to the corresponding modules
- they belong to
-2016/05/31 - add prefix string to translation keywords
- - add logging of translation keywords
- - \ForAllChemTranslationsDo
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.mechanisms.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.mechanisms.code.tex
deleted file mode 100644
index c506ba05d0..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.mechanisms.code.tex
+++ /dev/null
@@ -1,165 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `mechanisms'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{mechanisms}{2015/06/09 reaction mechanisms}
-
-\RequirePackage{amstext}
-
-% --------------------------------------------------------------------------
-% reaction mechanisms
-% \mech[<type>]
-% <type> - substitutions: {}, 1, 2, se, 1e, 2e, ar
-% - eliminations: e, e1, e2, cb
-\tl_new:N \l__chemmacros_mechanisms_type_tl
-\tl_new:N \l__chemmacros_mechanisms_mol_tl
-\tl_new:N \l__chemmacros_mechanisms_ar_tl
-
-\cs_new_protected:Npn \__chemmacros_set_mechanisms:nnn #1#2#3
- {
- \tl_set:Nn \l__chemmacros_mechanisms_type_tl {#1}
- \tl_set:Nn \l__chemmacros_mechanisms_mol_tl {#2}
- \tl_set:Nn \l__chemmacros_mechanisms_ar_tl {#3}
- }
-
-\chemmacros_define_keys:nn {mechanisms}
- {
- type .choice: ,
- type / .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {N} }
- \c_math_toggle_token
- }
- { }
- } ,
- type / 1 .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {N} }
- \c_math_toggle_token
- 1
- }
- { }
- } ,
- type / 2 .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {N} }
- \c_math_toggle_token
- 2
- }
- { }
- } ,
- type / se .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- }
- { }
- } ,
- type / 1e .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- 1
- }
- { }
- } ,
- type / 2e .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- 2
- }
- { }
- } ,
- type / ar .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {S}
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- }
- { Ar - }
- } ,
- type / e .code:n =
- { \__chemmacros_set_mechanisms:nnn {E} { } { } } ,
- type / e1 .code:n =
- { \__chemmacros_set_mechanisms:nnn {E} {1} { } } ,
- type / e2 .code:n =
- { \__chemmacros_set_mechanisms:nnn {E} {2} { } } ,
- type / cb .code:n =
- {
- \__chemmacros_set_mechanisms:nnn {E}
- {
- 1
- \c_math_toggle_token
- \c_math_subscript_token { \text {cb} }
- \c_math_toggle_token
- }
- { }
- } ,
- type .default:n =
- }
-
-\cs_new_protected:Npn \chemmacros_mechanisms:n #1
- {
- \tl_if_blank:nTF {#1}
- { \chemmacros_set_keys:nn {mechanisms} { type } }
- { \chemmacros_set_keys:nn {mechanisms} { type = #1 } }
- \mbox
- {
- \tl_use:N \l__chemmacros_mechanisms_ar_tl
- \tl_use:N \l__chemmacros_mechanisms_type_tl
- \tl_use:N \l__chemmacros_mechanisms_mol_tl
- }
- }
-
-\NewDocumentCommand \mech {o}
- {
- \IfNoValueTF {#1}
- { \chemmacros_mechanisms:n { } }
- { \chemmacros_mechanisms:n {#1} }
- }
-
-% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.newman.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.newman.code.tex
deleted file mode 100644
index 9c76113721..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.newman.code.tex
+++ /dev/null
@@ -1,212 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `newman'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{newman}{2016/04/23 newman projections}
-
-\chemmacros_load_module:n {tikz}
-
-% Newman projections
-\fp_new:N \l__chemmacros_newman_rel_angle_fp
-\fp_zero:N \l__chemmacros_newman_rel_angle_fp
-\fp_new:N \l__chemmacros_newman_tmp_angle_fp
-\fp_new:N \l__chemmacros_newman_abs_angle_fp
-\fp_zero:N \l__chemmacros_newman_abs_angle_fp
-\fp_new:N \l__chemmacros_newman_scale_fp
-\fp_set:Nn \l__chemmacros_newman_scale_fp {1}
-\fp_new:N \l__chemmacros_newman_x_fp
-\fp_new:N \l__chemmacros_newman_y_fp
-
-\tl_new:N \l__chemmacros_newman_tikz_ring_tl
-\tl_new:N \l__chemmacros_newman_tikz_front_tl
-\tl_new:N \l__chemmacros_newman_tikz_back_tl
-
-\bool_new:N \l__chemmacros_newman_tikz_back_bool
-
-\chemmacros_define_keys:nn {newman}
- {
- ring .tl_set:N = \l__chemmacros_newman_tikz_ring_tl ,
- atoms .tl_set:N = \l__chemmacros_newman_tikz_front_tl ,
- back-atoms .code:n =
- {
- \bool_set_true:N \l__chemmacros_newman_tikz_back_bool
- \tl_set:Nn \l__chemmacros_newman_tikz_back_tl { #1 }
- } ,
- scale .fp_set:N = \l__chemmacros_newman_scale_fp ,
- scale .default:n = 1 ,
- angle .fp_set:N = \l__chemmacros_newman_abs_angle_fp ,
- angle .default:n = 0
- }
-
-% \newman[<keyval>](<angle>){<1>,<2>,<3>,<4>,<5>,<6>}
-\NewDocumentCommand \newman {od()m}
- {
- \group_begin:
- \IfNoValueF {#1} { \chemmacros_set_keys:nn {newman} {#1} }
- \IfNoValueTF {#2}
- { \chemmacros_newman:nn { } {#3} }
- { \chemmacros_newman:nn {#2} {#3} }
- \group_end:
- }
-
-% #1: angle
-% #2: csv list of atoms
-\cs_new_protected:Npn \chemmacros_newman:nn #1#2
- { \__chemmacros_newman_feed_atoms:nw {#1}#2 ,,,,,, \q_stop }
-
-\cs_new_protected:Npn \__chemmacros_newman_feed_atoms:nw #1#2,#3,#4,#5,#6,#7,#8 \q_stop
- { \chemmacros_newman_atoms:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} }
-
-% place atoms:
-% #1: angle
-% #2 - #7: atoms
-\cs_new_protected:Npn \chemmacros_newman_atoms:nnnnnnn #1#2#3#4#5#6#7
- {
- \tl_if_blank:nTF {#1}
- {
- \fp_set_eq:NN
- \l__chemmacros_newman_rel_angle_fp
- \l__chemmacros_newman_abs_angle_fp
- }
- { \fp_set:Nn \l__chemmacros_newman_rel_angle_fp {#1} }
- \chemmacros_tikz_picture:xn
- {
- scale = \fp_to_decimal:N \l__chemmacros_newman_scale_fp ,
- chemmacros_newman_atom_front / .style =
- {
- inner~sep = 0pt ,
- outer~sep = 0pt ,
- \exp_not:V \l__chemmacros_newman_tikz_front_tl
- },
- chemmacros_newman_atom_back / .style =
- {
- inner~sep = 0pt ,
- outer~sep = 0pt ,
- \bool_if:NTF \l__chemmacros_newman_tikz_back_bool
- { \exp_not:V \l__chemmacros_newman_tikz_back_tl }
- { \exp_not:V \l__chemmacros_newman_tikz_front_tl }
- }
- }
- {
- \chemmacros_tikz_draw:x
- { \exp_not:V \l__chemmacros_newman_tikz_ring_tl }
- (0pt,0pt) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
- \chemmacros_newman_back_node:nn {30} {#6}
- \chemmacros_newman_back_node:nn {150} {#7}
- \chemmacros_newman_back_node:nn {270} {#5}
- \chemmacros_newman_front_node:nn {90} {#2}
- \chemmacros_newman_front_node:nn {210} {#3}
- \chemmacros_newman_front_node:nn {330} {#4}
- }
- }
-
-% provide cartesian coordiantes from polar coordinates
-% #1: fp variable for x
-% #2: fp variable for y
-% #3: angle
-% #4: radius
-\cs_new_protected:Npn \chemmacros_polar_to_cartesian:NNnn #1#2#3#4
- {
- \fp_set:Nn #1 { #4 * cos( #3 / 180 * pi ) }% x
- \fp_set:Nn #2 { #4 * sin( #3 / 180 * pi ) }% y
- }
-
-% place back nodes
-\cs_new_protected:Npn \chemmacros_newman_back_node:nn #1#2
- {
- \group_begin:
- \fp_add:Nn \l__chemmacros_newman_rel_angle_fp { #1 }
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { \l__chemmacros_newman_rel_angle_fp }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_draw:x
- { \exp_not:V \l__chemmacros_newman_tikz_ring_tl }
- (
- 15 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 15 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- )
- --
- (
- 30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- ) ;
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { \l__chemmacros_newman_rel_angle_fp }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_node:x
- {
- chemmacros_newman_atom_back,
- anchor = -180 + \fp_to_int:N \l__chemmacros_newman_rel_angle_fp
- }
- at
- (
- 31 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 31 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- )
- { #2 } ;
- \group_end:
- }
-\cs_generate_variant:Nn \chemmacros_newman_back_node:nn { nf }
-
-% place front nodes:
-\cs_new_protected:Npn \chemmacros_newman_front_node:nn #1#2
- {
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { #1 }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_draw:x
- { \exp_not:V \l__chemmacros_newman_tikz_ring_tl }
- (0pt,0pt) -- ++
- (
- 30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- ) ;
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { #1 }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_node:x
- { chemmacros_newman_atom_front, anchor = -180 + #1 }
- at
- (
- 31 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 31 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- )
- { #2 } ;
- }
-\cs_generate_variant:Nn \chemmacros_newman_front_node:nn { nf }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2016/04/23 - some changes on how \newman is processed internally
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.nomenclature.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.nomenclature.code.tex
deleted file mode 100644
index 05a80488d2..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.nomenclature.code.tex
+++ /dev/null
@@ -1,978 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `nomenclature'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{nomenclature}{2017/06/11 chemical names}
-
-\RequirePackage{scrlfile}
-
-\chemmacros_load_module:n {tikz}
-
-\bool_new:N \l__chemmacros_iupac_restricted_bool
-\bool_new:N \l__chemmacros_iupac_strict_bool
-
-\msg_new:nnn {chemmacros} {new-iupac}
- {
- You've~ tried~ to~ define~ a~ iupac~ naming~ command~ with~
- \token_to_str:N \NewChemIUPAC ,~ but~ the~ iupac~ command~
- \token_to_str:N #1 \c_space_tl already~ exists.~ Choose~ another~ name~
- or~ use~ \token_to_str:N \RenewChemIUPAC .
- }
-
-\msg_new:nnn {chemmacros} {renew-iupac}
- {
- You've~ tried~ to~ renew~ the~ iupac~ command~ \token_to_str:N #1 ,~ but~
- it~ doesn't~ exist.~ Use~ \token_to_str:N \NewChemIUPAC \c_space_tl
- instead.
- }
-
-\msg_new:nnn {chemmacros} {let-iupac}
- {
- You've~ tried~ to~ let~ the~ iupac~ command~ \token_to_str:N #1
- \c_space_tl to~ the~ iupac~ command~ \token_to_str:N #2 ,~ but~ the~
- latter~ doesn't~ exist.~ Use~ \token_to_str:N \NewChemIUPAC \c_space_tl
- instead~ or~declare~ \token_to_str:N #2 \c_space_tl first.
- }
-
-\msg_new:nnn {chemmacros} {new-iupac-shorthand}
- {
- You've~ tried~ to~ define~ a~ iupac~ shorthand~ with~ \token_to_str:N
- \NewChemIUPACShorthand ,~ but~ the~ shorthand~ \token_to_str:N #1
- \c_space_tl already~ exists.~ Please~ choose~ another~ token.
- }
-
-\msg_new:nnn {chemmacros} {renew-iupac-shorthand}
- {
- You've~ tried~ to~ renew~ the~ iupac~ shorthand~ \token_to_str:N #1 ,~
- but~ this~ shorthand~ doesn't~ exist,~ yet.
- }
-
-\msg_new:nnn {chemmacros} {show-iupac}
- { \\ >~ \token_to_str:N #1=iupac~macro: \\ -> #2 }
-
-\msg_new:nnn {chemmacros} {no-iupac-command}
- { \\ >~ \token_to_str:N #1=not~ defined~ as~ iupac~ macro }
-
-\cs_generate_variant:Nn \msg_show:nnnn {nnnV}
-
-% --------------------------------------------------------------------------
-\prop_new:N \l__chemmacros_iupac_prop
-
-\cs_new_protected:Npn \__chemmacros_iupac_name:NN #1#2
- { \str_set:Nx #2 { \chemmacros_remove_backslash:N #1 } }
-
-\cs_new_protected:Npn \__chemmacros_define_iupac:Nn #1#2
- {
- \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
- \prop_put:NVn \l__chemmacros_iupac_prop
- \l__chemmacros_tmpa_str
- {#2}
- \chemmacros_make_iupac:
- }
-\cs_generate_variant:Nn \__chemmacros_define_iupac:Nn {NV}
-
-\cs_new_protected:Npn \__chemmacros_let_iupac:NN #1#2
- {
- \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
- \__chemmacros_iupac_name:NN #2 \l__chemmacros_tmpb_str
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \prop_item:NV \l__chemmacros_iupac_prop \l__chemmacros_tmpb_str }
- \__chemmacros_define_iupac:NV #1 \l__chemmacros_tmpa_tl
- }
-
-\cs_new_protected:Npn \chemmacros_show_iupac:N #1
- {
- \group_begin:
- \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \prop_item:NV \l__chemmacros_iupac_prop \l__chemmacros_tmpa_str }
- \tl_if_empty:NTF \l__chemmacros_tmpa_tl
- { \msg_show:nnn {chemmacros} {no-iupac-command} {#1} }
- { \msg_show:nnnV {chemmacros} {show-iupac} {#1} \l__chemmacros_tmpa_tl }
- \group_end:
- }
-
-\prg_new_protected_conditional:Npnn \chemmacros_if_iupac:N #1 {T,F,TF}
- {
- \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
- \prop_if_in:NVTF \l__chemmacros_iupac_prop \l__chemmacros_tmpa_str
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\cs_new_protected:Npn \chemmacros_new_iupac:Nn #1#2
- {
- \chemmacros_if_iupac:NTF #1
- { \msg_error:nnn {chemmacros} {new-iupac} {#1} }
- { \__chemmacros_define_iupac:Nn #1 {#2} }
- }
-
-\cs_new_protected:Npn \chemmacros_provide_iupac:Nn #1#2
- {
- \chemmacros_if_iupac:NF #1
- { \__chemmacros_define_iupac:Nn #1 {#2} }
- }
-
-\cs_new_protected:Npn \chemmacros_define_iupac:Nn #1#2
- { \__chemmacros_define_iupac:Nn #1 {#2} }
-
-\cs_new_protected:Npn \chemmacros_renew_iupac:Nn #1#2
- {
- \chemmacros_if_iupac:NTF #1
- { \__chemmacros_define_iupac:Nn #1 {#2} }
- { \msg_error:nnn {chemmacros} {renew-iupac} {#1} }
- }
-
-\cs_new_protected:Npn \chemmacros_let_iupac:NN #1#2
- {
- \chemmacros_if_iupac:NTF #2
- { \__chemmacros_let_iupac:NN #1#2 }
- { \msg_error:nnnn {chemmacros} {let-iupac} {#1} {#2} }
- }
-
-\ChemCompatibilityTo{5.2}
-\cs_new_protected:Npn \chemmacros_make_iupac:
- {
- \bool_if:NT \l__chemmacros_in_document_bool
- {
- \bool_if:NTF \l__chemmacros_inside_iupac_bool
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- { \cs_set_protected:cpn {##1} {##2} }
- }
- {
- \bool_if:NF \l__chemmacros_iupac_restricted_bool
- {
- \bool_if:NTF \l__chemmacros_iupac_strict_bool
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- { \cs_set_protected:cpn {##1} {##2} }
- }
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- {
- \cs_if_exist:cF {##1}
- { \cs_set_protected:cpn {##1} {##2} }
- }
- }
- }
- }
- }
- }
-\AtBeginDocument { \chemmacros_make_iupac: }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.2}
-\cs_new_protected:Npn \chemmacros_make_iupac:
- {
- \chemmacros_if_document:T
- {
- \bool_if:NTF \l__chemmacros_inside_iupac_bool
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- { \cs_set_protected:cpn {##1} {##2} }
- }
- {
- \bool_if:NF \l__chemmacros_iupac_restricted_bool
- {
- \bool_if:NTF \l__chemmacros_iupac_strict_bool
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- { \cs_set_protected:cpn {##1} {##2} }
- }
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- {
- \cs_if_exist:cF {##1}
- { \cs_set_protected:cpn {##1} {##2} }
- }
- }
- }
- }
- }
- }
-\AfterEndPreamble { \chemmacros_make_iupac: }
-\EndChemCompatibility
-
-\NewDocumentCommand \DeclareChemIUPAC {mm}
- { \chemmacros_define_iupac:Nn #1 {#2} }
-
-\NewDocumentCommand \NewChemIUPAC {mm}
- { \chemmacros_new_iupac:Nn #1 {#2} }
-
-\NewDocumentCommand \RenewChemIUPAC {mm}
- { \chemmacros_renew_iupac:Nn #1 {#2} }
-
-\NewDocumentCommand \ProvideChemIUPAC {mm}
- { \chemmacros_provide_iupac:Nn #1 {#2} }
-
-\NewDocumentCommand \LetChemIUPAC {mm}
- { \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 ,
- }
-
-% --------------------------------------------------------------------------
-% 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 }
-
-\ChemCompatibilityTo{5.2}
-\cs_new_protected:Npn \chemmacros_cip:n #1
- { \textit{#1} \tex_kern:D \l__chemmacros_cip_kern_dim }
-
-\NewDocumentCommand \cip {m}
- { \chemmacros_cip:n {#1} }
-\EndChemCompatibility
-
-\ChemCompatibilityBetween{5.2}{5.8}
-\cs_new_protected:Npn \chemmacros_cip:n #1
- {
- \int_zero:N \l__chemmacros_tmpa_int
- \textup{(}
- \clist_map_inline:nn
- {#1}
- {
- \int_incr:N \l__chemmacros_tmpa_int
- \textit{##1}
- \int_compare:nT
- { \l__chemmacros_tmpa_int < \clist_count:n {#1} }
- { \textup{,} }
- }
- \textup{)}
- \tex_kern:D \l__chemmacros_cip_kern_dim
- }
-\DeclareChemIUPAC \cip { \chemmacros_cip:n }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.8}
-\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 = \itshape
- }
-
-\cs_new_protected:Npn \__chemmacros_cip:n #1
- {
- \tl_set:Nn \l__chemmacros_tmpa_tl {#1}
- \int_step_inline:nnnn {0} {1} {9}
- {
- \tl_replace_all:Nnn \l__chemmacros_tmpa_tl
- {##1}
- { { \l__chemmacros_cip_number_tl ##1} }
- }
- { \l__chemmacros_cip_inner_tl \l__chemmacros_tmpa_tl }
- }
-
-\cs_new_protected:Npn \chemmacros_cip:n #1
- {
- \int_zero:N \l__chemmacros_tmpa_int
- \group_begin:
- \l__chemmacros_cip_outer_tl (
- \clist_map_inline:nn
- {#1}
- {
- \int_incr:N \l__chemmacros_tmpa_int
- \__chemmacros_cip:n {##1}
- \int_compare:nT
- { \l__chemmacros_tmpa_int < \clist_count:n {#1} }
- { , }
- }
- )
- \group_end:
- \tex_kern:D \l__chemmacros_cip_kern_dim
- }
-\DeclareChemIUPAC \cip { \chemmacros_cip:n }
-\EndChemCompatibility
-
-% remember: TikZ needs : to be other
-\cs_new_protected:Npn \chemmacros_sconf:n #1
- {
- \group_begin:
- \chemmacros_tikz:nn
- { baseline,text~ height=1.5ex,text~ depth=.25ex }
- {
- \chemmacros_tikz_node:n {anchor=base} (chemmacros@@Sconf) {#1} ;
- \chemmacros_tikz_draw:n {->,thick,rotate=90}
- ($(chemmacros@@Sconf.center)+(20\c_chemmacros_other_colon_tl.8em)$)
- arc (20\c_chemmacros_other_colon_tl340\c_chemmacros_other_colon_tl.8em);
- }
- \group_end:
- }
-
-\cs_new_protected:Npn \chemmacros_rconf:n #1
- {
- \group_begin:
- \tikz[baseline,text~ height=1.5ex,text~ depth=.25ex]
- {
- \chemmacros_tikz_node:n {anchor=base} (chemmacros@@Rconf) {#1} ;
- \chemmacros_tikz_draw:n {<-,thick,rotate=90}
- ($(chemmacros@@Rconf.center)+(20\c_chemmacros_other_colon_tl.8em)$)
- arc (20\c_chemmacros_other_colon_tl340\c_chemmacros_other_colon_tl.8em) ;
- }
- \group_end:
- }
-
-\NewDocumentCommand \Sconf { O{S} } { \chemmacros_sconf:n {#1} }
-\NewDocumentCommand \Rconf { O{R} } { \chemmacros_rconf:n {#1} }
-
-% 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}
- \tl_if_blank:nF {#4}
- {
- \bool_if:nTF {#2}
- { \chemmacros_chemformula:n { {}^{#4} } }
- { \chemmacros_chemformula:n { {}_{#4} } }
- }
- \bool_if:nT
- {#1}
- { \chemmacros_break_point_hyphen: }
- }
-
-\cs_new_protected:Npn \chemmacros_hapto:n #1
- {
- \chemmacros_coordination_symbol:nnnn
- { \l__chemmacros_coord_use_hyphen_bool }
- {
- \chemmacros_if_compatibility:nnTF {>} {5.7}
- { \c_true_bool }
- { \c_false_bool }
- }
- { \chemeta }
- {#1}
- }
-
-\cs_new_protected:Npn \chemmacros_dento:n #1
- {
- \chemmacros_coordination_symbol:nnnn
- { \l__chemmacros_coord_use_hyphen_bool }
- {
- \chemmacros_if_compatibility:nnTF {>} {5.7}
- { \c_true_bool }
- { \c_false_bool }
- }
- { \chemkappa }
- {#1}
- }
-
-\cs_new_protected:Npn \chemmacros_bridge:n #1
- {
- \chemmacros_coordination_symbol:nnnn
- { \l__chemmacros_coord_use_hyphen_bool }
- { \l__chemmacros_bridge_super_bool }
- { \chemmu }
- {#1}
- }
-
-% \iupac (basically the same as bpchem's \IUPAC)
-% - allows multiple breaking points as compound names can get really long and
-% especially in multicolumn documents can span more than two lines
-% - add a (very) little space before the hyphen and a little negative space
-% after it
-% - add a little space at breaking points if not broken
-% - enables all naming commands regardless if they're definied otherwise or not
-\cs_new_protected:Npn \chemmacros_allow_hyphens:
- {
- \chemmacros_nobreak:
- \chemmacros_if_compatibility:nnTF {<=} {5.7}
- { \skip_horizontal:N \c_zero_dim }
- { \skip_horizontal:N \c_zero_skip }
- }
-
-% #1: pre break
-% #2: post break
-% #3: no break
-\ChemCompatibilityTo{5.1}
-\cs_new_protected:Npn \__chemmacros_break_point_insert:nnn #1#2#3
- {
- \chemmacros_nobreak:
- \tex_discretionary:D { - } { } {#3}
- \chemmacros_allow_hyphens:
- }
-\EndChemCompatibility
-
-\ChemCompatibilityBetween{5.1}{5.8}
-\cs_new_protected:Npn \__chemmacros_break_point_insert:nnn #1#2#3
- {
- \mode_if_math:TF
- {#3}
- {
- \chemmacros_nobreak:
- \tex_discretionary:D {#1} {#2} {#3}
- \chemmacros_allow_hyphens:
- }
- }
-\EndChemCompatibility
-
-\ChemCompatibility{5.8a}
-\cs_new_protected:Npn \__chemmacros_break_point_insert:nnn #1#2#3
- {
- \mode_if_math:TF
- {#3}
- {
- \peek_meaning:NTF \group_end:
- {#3}
- {
- \chemmacros_nobreak:
- \tex_discretionary:D {#1} {#2} {#3}
- \chemmacros_allow_hyphens:
- }
- }
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.8b}
-\cs_new_protected:Npn \__chemmacros_peek_if_dash:TF #1#2
- {
- \peek_charcode:NTF -
- {#1}
- {#2}
- }
-
-\cs_new_protected:Npn \__chemmacros_peek_if_paren:TF #1#2
- { % (
- \peek_charcode:NTF )
- {#1}
- { % [
- \peek_charcode:NTF ]
- {#1}
- {#2}
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_break_point_insert:nnn #1#2#3
- {
- \mode_if_math:TF
- {#3}
- {
- \peek_meaning:NTF \group_end:
- {#3}
- {
- \__chemmacros_peek_if_dash:TF
- {#3}
- {
- \__chemmacros_peek_if_paren:TF
- {#3}
- {
- \chemmacros_nobreak:
- \tex_discretionary:D {#1} {#2} {#3}
- \chemmacros_allow_hyphens:
- }
- }
- }
- }
- }
-\EndChemCompatibility
-
-\dim_new:N \l__chemmacros_iupac_hyphen_pre_dim
-\dim_set:Nn \l__chemmacros_iupac_hyphen_pre_dim { .01em }
-\dim_new:N \l__chemmacros_iupac_hyphen_post_dim
-\dim_set:Nn \l__chemmacros_iupac_hyphen_post_dim { -.03em }
-\dim_new:N \l__chemmacros_iupac_break_dim
-\dim_set:Nn \l__chemmacros_iupac_break_dim { .03em }
-\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
- }
-
-\ChemCompatibilityTo{5.2}
-\cs_new_protected:Npn \chemmacros_break_point_hyphen:
- {
- \__chemmacros_break_point_insert:nnn
- {-}
- { }
- {
- \tex_kern:D \l__chemmacros_iupac_hyphen_pre_dim
- -
- \tex_kern:D \l__chemmacros_iupac_hyphen_post_dim
- }
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.2}
-\cs_new_protected:Npn \chemmacros_break_point_hyphen:
- {
- \__chemmacros_break_point_insert:nnn
- { \tex_kern:D \l__chemmacros_iupac_hyphen_pre_dim - }
- { }
- {
- \tex_kern:D \l__chemmacros_iupac_hyphen_pre_dim
- -
- \tex_kern:D \l__chemmacros_iupac_hyphen_post_dim
- }
- }
-\EndChemCompatibility
-
-\cs_new_protected:Npn \chemmacros_break_point:
- {
- \__chemmacros_break_point_insert:nnn
- {-}
- { }
- {
- \mode_if_math:TF
- { | }
- { \tex_kern:D \l__chemmacros_iupac_break_dim }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_break_point_opening_paren:
- { \__chemmacros_break_point_insert:nnn { - } { ( } { ( } }
-
-\cs_new_protected:Npn \chemmacros_break_point_closing_paren:
- { \__chemmacros_break_point_insert:nnn { )- } { } { ) } }
-
-\cs_new_protected:Npn \chemmacros_break_point_opening_bracket:
- { \__chemmacros_break_point_insert:nnn { - } { [ } { [ } }
-
-\cs_new_protected:Npn \chemmacros_break_point_closing_bracket:
- { \__chemmacros_break_point_insert:nnn { ]- } { } { ] } }
-
-\cs_new_protected:Npn \chemmacros_superscript:n #1
- { \mode_if_math:TF { \sp {#1} } { \textsuperscript {#1} } }
-
-\bool_new:N \l__chemmacros_inside_iupac_bool
-
-\seq_new:N \l__chemmacros_iupac_shorthands_seq
-\prop_new:N \l__chemmacros_iupac_shorthands_prop
-
-% #1: token
-% #2: definition
-\cs_new_protected:Npn \chemmacros_define_iupac_shorthand:NN #1#2
- {
- \seq_if_in:NnF \l__chemmacros_iupac_shorthands_seq {#1}
- { \seq_put_right:Nn \l__chemmacros_iupac_shorthands_seq {#1} }
- \prop_put:Nnn \l__chemmacros_iupac_shorthands_prop {#1}
- { \char_set_active_eq:NN #1#2 }
- }
-
-\cs_new_protected:Npn \chemmacros_remove_shorthand:N #1
- {
- \chemmacros_define_iupac_shorthand:NN #1 \c_empty_tl
- \seq_remove_all:Nn \l__chemmacros_iupac_shorthands_seq {#1}
- \prop_remove:Nn \l__chemmacros_iupac_shorthands_prop {#1}
- }
-
-\prg_new_conditional:Npnn \chemmacros_if_iupac_shorthand:N #1 {p,T,F,TF}
- {
- \seq_if_in:NnTF \l__chemmacros_iupac_shorthands_seq {#1}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\cs_new_protected:Npn \chemmacros_for_all_iupac_shorthands_do:n #1
- { \seq_map_inline:Nn \l__chemmacros_iupac_shorthands_seq {#1} }
-
-\cs_new_protected:Npn \chemmacros_activate_iupac_shorthand:N #1
- { \chemmacros_if_iupac_shorthand:NT #1 { \char_set_catcode_active:N #1 } }
-
-\cs_new_protected:Npn \chemmacros_activate_iupac_shorthands:n #1
- { \tl_map_inline:nn {#1} { \chemmacros_activate_iupac_shorthand:N ##1 } }
-
-\cs_new_protected:Npn \chemmacros_activate_all_iupac_shorthands:
- {
- \chemmacros_for_all_iupac_shorthands_do:n
- { \chemmacros_activate_iupac_shorthand:N ##1 }
- }
-
-\cs_new_protected:Npn \chemmacros_make_shorthands:
- {
- \chemmacros_if_compatibility:nnT {>=} {5.2}
- {
- \chemmacros_if_document:T
- {
- \chemmacros_for_all_iupac_shorthands_do:n
- { \prop_item:Nn \l__chemmacros_iupac_shorthands_prop {##1} }
- }
- }
- }
-
-\NewDocumentCommand \ChemMakeIupacShorthands {}
- { \chemmacros_make_shorthands: }
-
-\NewDocumentCommand \DeclareChemIUPACShorthand {mm}
- { \chemmacros_define_iupac_shorthand:NN #1#2 }
-
-\NewDocumentCommand \NewChemIUPACShorthand {mm}
- {
- \chemmacros_if_iupac_shorthand:NTF #1
- { \msg_error:nnn {chemmacros} {new-iupac-shorthand} {#1} }
- { \chemmacros_define_iupac_shorthand:NN #1#2 }
- }
-
-\NewDocumentCommand \ProvideChemIUPACShorthand {mm}
- {
- \chemmacros_if_iupac_shorthand:NTF #1
- { \chemmacros_define_iupac_shorthand:NN #1#2 }
- }
-
-\NewDocumentCommand \RenewChemIUPACShorthand {mm}
- {
- \chemmacros_if_iupac_shorthand:NTF #1
- { \chemmacros_define_iupac_shorthand:NN #1#2 }
- { \msg_error:nnn {chemmacros} {renew-iupac-shorthand} {#1} }
- }
-
-\NewDocumentCommand \RemoveChemIUPACShorthand {m}
- { \chemmacros_remove_shorthand:N #1 }
-
-\NewChemIUPACShorthand ^ \chemmacros_superscript:n
-\NewChemIUPACShorthand | \chemmacros_break_point:
-\NewChemIUPACShorthand - \chemmacros_break_point_hyphen:
-
-\ChemCompatibilityFrom{5.1}
- \NewChemIUPACShorthand ( \chemmacros_break_point_opening_paren:
- \NewChemIUPACShorthand ) \chemmacros_break_point_closing_paren:
- \NewChemIUPACShorthand [ \chemmacros_break_point_opening_bracket:
- \NewChemIUPACShorthand ] \chemmacros_break_point_closing_bracket:
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.3}
- \NewChemIUPAC \chemprime { \ensuremath {{}^{\prime}} }
- \NewChemIUPACShorthand ' \chemprime
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.8c}
- \NewChemIUPAC \nonbreakinghyphen { \mbox{-} \nobreak \hspace{0pt} }
- \NewChemIUPACShorthand = \nonbreakinghyphen
-\EndChemCompatibility
-
-\cs_new_protected:Npn \chemmacros_iupac:nn #1#2
- {
- \group_begin:
- \bool_set_true:N \l__chemmacros_inside_iupac_bool
- \chemmacros_if_compatibility:nnT {>} {5.10}
- { \bool_set_true:N \l__chemmacros_in_document_bool }
- \chemmacros_set_keys:nn {nomenclature} {#1}
- \chemmacros_make_iupac:
- \chemmacros_make_shorthands:
- % \prop_show:N \l__chemmacros_iupac_shorthands_prop
- \chemmacros_if_compatibility:nnT {<=} {5.2}
- { \chemmacros_define_deprecated:NN \- - }
- \tl_set_rescan:Nnn \l__chemmacros_tmpa_tl
- { \chemmacros_activate_all_iupac_shorthands: }
- {#2}
- % \tl_analysis_show:N
- \l__chemmacros_tmpa_tl
- \group_end:
- }
-
-\cs_new_protected:Npn \chemmacros_iupac:n #1 { \chemmacros_iupac:nn {} {#1} }
-
-\ChemCompatibilityTo{5.3}
-% Thanks to Joseph Wright and Enrico Gregorio for the help on the curious
-% redefinition of \- and the end of the compilation
-% see http://tex.stackexchange.com/q/42405/5049 for reference
-\cs_set_protected:Npx \- { \exp_not:o { \- } }
-\cs_set_eq:NN \@dischyph \-
-\EndChemCompatibility
-
-\NewDocumentCommand \iupac {O{}m} { \chemmacros_iupac:nn {#1} {#2} }
-
-% --------------------------------------------------------------------------
-% R(ectus)/S(inister):
-\NewChemIUPAC \rectus { \cip {R} }
-\NewChemIUPAC \sinister { \cip {S} }
-
-\LetChemIUPAC \R \rectus
-\LetChemIUPAC \S \sinister
-
-% E(ntgegen)/Z(usammen)
-\NewChemIUPAC \entgegen { \cip {E} }
-\NewChemIUPAC \zusammen { \cip {Z} }
-
-\LetChemIUPAC \E \entgegen
-\LetChemIUPAC \Z \zusammen
-
-% cis/trans
-\NewChemIUPAC \cis { \textit {cis} }
-\NewChemIUPAC \trans { \textit {trans} }
-
-% fac/mer
-\NewChemIUPAC \fac { \textit {fac} }
-\NewChemIUPAC \mer { \textit {mer} }
-
-% tert
-\NewChemIUPAC \tert { \textit {tert} }
-
-% Italian descriptors - I forgot what they mean
-\NewChemIUPAC \sin { \textit {sin} }
-\NewChemIUPAC \ter { \textit {ter} }
-
-% Fischer
-\NewChemIUPAC \dexter { \textsc {d} }
-\NewChemIUPAC \laevus { \textsc {l} }
-
-\LetChemIUPAC \D \dexter
-\LetChemIUPAC \L \laevus
-
-% ortho/meta/para
-\NewChemIUPAC \ortho { \textit {o} }
-\NewChemIUPAC \meta { \textit {m} }
-\NewChemIUPAC \para { \textit {p} }
-
-% syn/anti
-\NewChemIUPAC \syn { \textit {syn} }
-\NewChemIUPAC \anti { \textit {anti} }
-
-% coordination chemistry:
-\NewChemIUPAC \hapto { \chemmacros_hapto:n }
-\NewChemIUPAC \dento { \chemmacros_dento:n }
-\NewChemIUPAC \bridge { \chemmacros_bridge:n }
-
-% attachments to heteroatoms / added hydrogen
-\NewChemIUPAC \hydrogen { \textit {H} }
-\NewChemIUPAC \oxygen { \textit {O} }
-\NewChemIUPAC \nitrogen { \textit {N} }
-\NewChemIUPAC \sulfur { \textit {S} }
-\NewChemIUPAC \phosphorus { \textit {P} }
-
-% atoms:
-\LetChemIUPAC \H \hydrogen
-\LetChemIUPAC \O \oxygen
-\LetChemIUPAC \N \nitrogen
-\LetChemIUPAC \Sf \sulfur
-\LetChemIUPAC \P \phosphorus
-
-% greek letters
-\NewChemIUPAC \a { \chemalpha }
-\NewChemIUPAC \b { \chembeta }
-\NewChemIUPAC \g { \chemgamma }
-\NewChemIUPAC \d { \chemdelta }
-\NewChemIUPAC \k { \chemkappa }
-\NewChemIUPAC \m { \chemmu }
-\NewChemIUPAC \n { \chemeta }
-\NewChemIUPAC \w { \chemomega }
-
-% --------------------------------------------------------------------------
-% latin phrases
-\tl_new:N \l__chemmacros_latin_format_tl
-
-\NewChemMacroset {Latin} {mm}
- { \chemmacros_define_latin:Nn #1 {#2} }
-
-\ChemCompatibilityTo{5.7}
-\chemmacros_define_keys:nn {nomenclature}
- {
- latin-format .tl_set:N = \l__chemmacros_latin_format_tl ,
- latin-format .initial:n = \textit ,
- }
-
-\cs_new_protected:Npn \chemmacros_latin:n #1
- { { \l__chemmacros_latin_format_tl {#1} } }
-
-\cs_new_protected:Npn \chemmacros_define_latin:Nn #1#2
- { \cs_set_protected:Npn #1 { \chemmacros_latin:n {#2} } }
-
-\AtBeginDocument
- {
- % if chemstyle is loaded use chemstyle's definition:
- \chemmacros_if_package_loaded:nT {chemstyle}
- {
- \AfterPackage* {chemstyle}
- {
- \cs_undefine:N \invacuo
- \cs_set_eq:NN \chemmacros_latin:n \cst@latin
- }
- }
- \cs_if_exist:NTF \latin
- { \cs_set_eq:NN \latin \chemmacros_latin:n }
- { \cs_new_eq:NN \latin \chemmacros_latin:n }
- \NewChemLatin \insitu {in~situ}
- \NewChemLatin \abinitio {ab~initio}
- \NewChemLatin \invacuo {in~vacuo}
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.7}
-\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
- {
- \group_begin:
- \l__chemmacros_latin_format_tl {#1}
- \group_end:
- }
-
-\cs_new_protected:Npn \chemmacros_latin:n #1
- { \chemmacros_write_latin:n {#1} }
-
-\cs_new_protected:Npn \chemmacros_define_latin:Nn #1#2
- { \DeclareDocumentCommand #1 {O{}} { \latin [##1] {#2} } }
-
-\NewDocumentCommand \latin {O{}m}
- {
- \group_begin:
- \chemmacros_set_keys:nn {nomenclature} {#1}
- \chemmacros_latin:n {#2}
- \group_end:
- }
-\EndChemCompatibility
-
-\ChemCompatibilityBetween{5.7}{5.9}
-\AtBeginDocument
- {
- \AfterPackage* {chemstyle} { \cs_undefine:N \invacuo }
- \NewChemLatin \insitu {in~situ}
- \NewChemLatin \abinitio {ab~initio}
- \NewChemLatin \invacuo {in~vacuo}
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.9}
-\cs_undefine:N \invacuo
-\NewChemLatin \invacuo {in~vacuo}
-\NewChemLatin \abinitio {ab~initio}
-\NewChemLatin \insitu {in~situ}
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-% hyperref support
-% ?? unsure about adding IUPAC commands
-\AfterPackage* {hyperref}
- {
- \pdfstringdefDisableCommands
- {
- % \cs_set:Npn \- { - } % maybe not a good idea...
- % \cs_set:Npn \| { }
- % \cs_set:Npn \pH { pH }
- % \cs_set:Npn \pOH { pOH }
- \cs_set:Npn \iupac #1 {#1}
- \cs_set:Npn \cip #1 {(#1)}
- \cs_set:Npn \cis {cis}
- \cs_set:Npn \trans {trans}
- \cs_set:Npn \tert {tert}
- \cs_set:Npn \ortho {o}
- \cs_set:Npn \meta {m}
- \cs_set:Npn \para {p}
- \cs_set:Npn \syn {syn}
- \cs_set:Npn \anti {anti}
- \cs_set:Npn \R {(R)}
- \cs_set:Npn \S {(S)}
- \cs_set:Npn \E {(E)}
- \cs_set:Npn \Z {(Z)}
- \cs_set:Npn \D {D}
- \cs_set:Npn \L {L}
- \cs_set:Npn \H {H}
- \cs_set:Npn \O {O}
- \cs_set:Npn \N {N}
- \cs_set:Npn \Sf {S}
- \cs_set:Npn \P {P}
- \cs_set:Npn \dexter {D}
- \cs_set:Npn \laevus {L}
- \cs_set:Npn \rectus {(R)}
- \cs_set:Npn \sinister {(S)}
- \cs_set:Npn \entgegen {(E)}
- \cs_set:Npn \zusammen {(Z)}
- \cs_set:Npn \hydrogen {H}
- \cs_set:Npn \oxygen {O}
- \cs_set:Npn \nitrogen {N}
- \cs_set:Npn \sulfur {S}
- \cs_set:Npn \phosphorus {P}
- \cs_set:Npn \chemprime {'}
- }
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/10/01 - use new function \chemmacros_if_document:TF for
- \chemmacros_make_iupac:
- - \cip only italicizes elements of csv list
- - fix bug in \RemoveChemIUPACShorthand
-2016/01/02 - \chemprime
-2016/01/23 - give shorthand definitions only inside \iupac
-2016/01/25 - small improvements (?) of the shorthand code
-2016/05/08 - check if \latin is already defined (eg by achemso) and overwrite
- definition
-2016/05/10 - define \chemmacros_hapto:n and friends in terms of
- \chemmacros_coordination_symbol:nnnn
- - \iupac gets an optional argument for setting options
-2016/05/31 - overwrite any \latin definition -- or rather: just define \latin
- - \latin and all macros defined with \NewChemLatin get an optional
- argument for setting options
-2016/06/07 - rename functions which erroneously were assigned to the
- `chemformula' module
-2017/04/17 - fix erroneous definition of \chemmacros_allow_hyphens:
- - new options `cip-inner-format', `cip-outer-format' and
- `cip-number-format'
-2017/06/11 - change behaviour of \__chemmacros_break_point_insert:nnn so
- it does nothing as last token in \iupac
-2020/01/02 - \chemmacros_show_iupac:N
- - \chemmacros_if_iupac:NTF
-2020/02/29 - let \chemmacros_iupac:nn think we're in the document – fixes
- issue #30
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.orbital.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.orbital.code.tex
deleted file mode 100644
index 6f9f018322..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.orbital.code.tex
+++ /dev/null
@@ -1,576 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `orbital'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{orbital}{2015/07/14 drawing orbital shapes}
-
-\chemmacros_load_module:n {tikz}
-
-% \orbital[<keyval>]{<type>}
-% variables:
-\bool_new:N \l__chemmacros_orbital_type_s_bool
-\bool_new:N \l__chemmacros_orbital_type_p_bool
-\bool_new:N \l__chemmacros_orbital_type_sp_bool
-\bool_new:N \l__chemmacros_orbital_type_sptwo_bool
-\bool_new:N \l__chemmacros_orbital_type_spthree_bool
-\bool_new:N \l__chemmacros_orbital_s_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_s_phase_bool
-\bool_new:N \l__chemmacros_orbital_p_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_p_phase_bool
-\bool_new:N \l__chemmacros_orbital_sp_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_sp_phase_bool
-\bool_new:N \l__chemmacros_orbital_sptwo_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_sptwo_phase_bool
-\bool_new:N \l__chemmacros_orbital_spthree_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_spthree_phase_bool
-\bool_new:N \l__chemmacros_orbital_p_half_bool
-\bool_new:N \l__chemmacros_orbital_overlay_bool
-\bool_new:N \l__chemmacros_orbital_opacity_bool
-
-\tl_new:N \l__chemmacros_orbital_s_color_tl
-\tl_set:Nn \l__chemmacros_orbital_s_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_s_phase_color_tl
-\tl_new:N \l__chemmacros_orbital_p_color_tl
-\tl_set:Nn \l__chemmacros_orbital_p_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_p_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_p_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sp_color_tl
-\tl_set:Nn \l__chemmacros_orbital_sp_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_sp_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sp_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sptwo_color_tl
-\tl_set:Nn \l__chemmacros_orbital_sptwo_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_sptwo_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sptwo_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_spthree_color_tl
-\tl_set:Nn \l__chemmacros_orbital_spthree_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_spthree_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_spthree_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_s_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_s_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_p_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_p_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_sp_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_sp_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_sptwo_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_sptwo_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_spthree_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_spthree_scale_tl { 1 }
-
-\fp_new:N \l__chemmacros_orbital_angle_fp
-\fp_set:Nn \l__chemmacros_orbital_angle_fp { 90 }
-\fp_new:N \l__chemmacros_orbital_opacity_fp
-\fp_set:Nn \l__chemmacros_orbital_opacity_fp { 0.5 }
-
-\cs_new:Npn \__chemmacros_orbital_options:
- {
- \__chemmacros_orbital_overlay: , \__chemmacros_orbital_opacity: ,
- inner~sep=0 , outer~sep=0 , line~width=.2pt ,
- rotate = { \fp_use:N \l__chemmacros_orbital_angle_fp - 90 } ,
- baseline ,
- minimum~size = 0
- }
-
-\cs_new:Npn \__chemmacros_orbital_overlay:
- { \bool_if:NT \l__chemmacros_orbital_overlay_bool { overlay } }
-
-\cs_new:Npn \__chemmacros_orbital_opacity:
- {
- \bool_if:NT \l__chemmacros_orbital_opacity_bool
- { opacity = { \fp_use:N \l__chemmacros_orbital_opacity_fp } }
- }
-
-% --------------------------------------------------------------------------
-% s-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_s:
- {
- \bool_set_true:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\chemmacros_define_keys:nn {orbital/s}
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_s_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_s_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_s_scale_tl ,
- color .tl_set:N = \l__chemmacros_orbital_s_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_s_draw:n #1
- {
- \chemmacros_set_keys:nn {orbital/s} {#1}
- \bool_if:NTF \l__chemmacros_orbital_s_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_s_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
- { \tl_use:N \l__chemmacros_orbital_s_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
- { \tl_use:N \l__chemmacros_orbital_s_color_tl ! 90 }
- }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn
- { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shade:x
- { ball~color = \exp_not:V \l__chemmacros_orbital_s_phase_color_tl }
- (0pt,0pt) circle (\exp_not:V \l__chemmacros_orbital_s_scale_tl * .6em) ;
- }
- }
-
-% --------------------------------------------------------------------------
-% p-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_p:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_true:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\chemmacros_define_keys:nn {orbital/p}
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_p_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_p_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_p_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_p_color_tl ,
- half .bool_set:N = \l__chemmacros_orbital_p_half_bool ,
- half .default:n = true
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_p_draw:n #1
- {
- \chemmacros_set_keys:nn {orbital/p} {#1}
- \bool_if:NTF \l__chemmacros_orbital_p_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn
- { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_p_pphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_p_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
- )
- .. (0pt,0pt);
- \bool_if:NF \l__chemmacros_orbital_p_half_bool
- {
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_p_mphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_p_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_p_scale_tl * 2em ,
- - \l__chemmacros_orbital_p_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_p_scale_tl * 2em ,
- - \l__chemmacros_orbital_p_scale_tl * 2em
- )
- .. (0pt,0pt);
- }
- }
- }
-
-% --------------------------------------------------------------------------
-% sp-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_sp:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_true:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\chemmacros_define_keys:nn {orbital/sp}
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_sp_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_sp_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_sp_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_sp_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_sp_draw:n #1
- {
- \chemmacros_set_keys:nn {orbital/sp} {#1}
- \bool_if:NTF \l__chemmacros_orbital_sp_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn
- { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_sp_pphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_sp_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sp_scale_tl * 2em ,
- \l__chemmacros_orbital_sp_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_sp_scale_tl * 2em ,
- \l__chemmacros_orbital_sp_scale_tl * 2em
- )
- .. (0pt,0pt);
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_sp_mphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_sp_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sp_scale_tl * .6em ,
- - \l__chemmacros_orbital_sp_scale_tl * .6em
- )
- and ++
- (
- \l__chemmacros_orbital_sp_scale_tl * .6em ,
- - \l__chemmacros_orbital_sp_scale_tl * .6em
- )
- .. (0pt,0pt);
- }
- }
-
-% --------------------------------------------------------------------------
-% sp2-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_sptwo:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_true:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\chemmacros_define_keys:nn {orbital/sp2}
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_sptwo_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_sptwo_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_sptwo_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_sptwo_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_sptwo_draw:n #1
- {
- \chemmacros_set_keys:nn {orbital/sp2} {#1}
- \bool_if:NTF \l__chemmacros_orbital_sptwo_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn
- { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_sptwo_pphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_sptwo_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
- \l__chemmacros_orbital_sptwo_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
- \l__chemmacros_orbital_sptwo_scale_tl * 2em
- )
- .. (0pt,0pt);
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_sptwo_mphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_sptwo_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- - \l__chemmacros_orbital_sptwo_scale_tl * .8em
- )
- and ++
- (
- \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- - \l__chemmacros_orbital_sptwo_scale_tl * .8em
- )
- .. (0pt,0pt);
- }
- }
-
-% --------------------------------------------------------------------------
-% sp3-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_spthree:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_true:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\chemmacros_define_keys:nn {orbital/sp3}
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_spthree_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_spthree_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_spthree_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_spthree_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_spthree_draw:n #1
- {
- \chemmacros_set_keys:nn {orbital/sp3} {#1}
- \bool_if:NTF \l__chemmacros_orbital_spthree_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn
- { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_spthree_pphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_spthree_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_spthree_scale_tl * 2em ,
- \l__chemmacros_orbital_spthree_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_spthree_scale_tl * 2em ,
- \l__chemmacros_orbital_spthree_scale_tl * 2em
- )
- .. (0pt,0pt);
- \chemmacros_tikz_shadedraw:x
- {
- draw = \exp_not:V \l__chemmacros_orbital_spthree_mphase_color_tl ,
- ball~color = \exp_not:V \l__chemmacros_orbital_spthree_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_spthree_scale_tl * 1em ,
- - \l__chemmacros_orbital_spthree_scale_tl * 1em
- )
- and ++
- (
- \l__chemmacros_orbital_spthree_scale_tl * 1em ,
- - \l__chemmacros_orbital_spthree_scale_tl * 1em
- )
- .. (0pt,0pt);
- }
- }
-
-% --------------------------------------------------------------------------
-% main command
-\chemmacros_define_keys:nn {orbital}
- {
- overlay .bool_set:N = \l__chemmacros_orbital_overlay_bool ,
- overlay .default:n = true ,
- opacity .code:n =
- {
- \fp_compare:nTF { #1 = 1 }
- { \bool_set_false:N \l__chemmacros_orbital_opacity_bool }
- { \bool_set_true:N \l__chemmacros_orbital_opacity_bool }
- \fp_set:Nn \l__chemmacros_orbital_opacity_fp { #1 }
- }
- }
-
-\chemmacros_define_keys:nn {orbital/type}
- {
- s .code:n = { \__chemmacros_orbital_type_s: } ,
- p .code:n = { \__chemmacros_orbital_type_p: } ,
- sp .code:n = { \__chemmacros_orbital_type_sp: } ,
- sp2 .code:n = { \__chemmacros_orbital_type_sptwo: } ,
- sp3 .code:n = { \__chemmacros_orbital_type_spthree: }
- }
-
-\cs_new_protected:Npn \chemmacros_orbital:n #1
- {
- \bool_if:NT \l__chemmacros_orbital_type_s_bool
- { \__chemmacros_orbital_s_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_p_bool
- { \__chemmacros_orbital_p_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_sp_bool
- { \__chemmacros_orbital_sp_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_sptwo_bool
- { \__chemmacros_orbital_sptwo_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_spthree_bool
- { \__chemmacros_orbital_spthree_draw:n { #1 } }
- }
-
-\NewDocumentCommand \orbital {om}
- {
- \group_begin:
- \chemmacros_set_keys:nn {orbital/type} {#2}
- \IfNoValueTF {#1}
- { \chemmacros_orbital:n { } }
- { \chemmacros_orbital:n {#1} }
- \group_end:
- }
-% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.particles.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.particles.code.tex
deleted file mode 100644
index 24a0ac2e37..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.particles.code.tex
+++ /dev/null
@@ -1,141 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `particles'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{particles}{2016/04/02 particles}
-
-\chemmacros_load_modules:n {charges,chemformula}
-
-% --------------------------------------------------------------------------
-% particles
-\cs_new_protected:Nn \chemmacros_define_particle:Nn
- {
- \tl_set_rescan:Nnn \l__chemmacros_tmpa_tl { \ExplSyntaxOff } {#2}
- \use:x
- {
- \cs_set_protected:Npn \exp_not:N #1
- { \chemmacros_chemformula:n { \exp_not:V \l__chemmacros_tmpa_tl } }
- }
- }
-
-\NewChemMacroset {Particle} {mm}
- { \chemmacros_define_particle:Nn #1 {#2} }
-
-% --------------------------------------------------------------------------
-% nucleophiles
-\cs_new_protected:Npn \chemmacros_elpair:n #1
- {
- \bool_if:NTF \l__chemmacros_elpair_dots_bool
- { \chlewis { 0: } {#1} }
- { \chlewis { 0| } {#1} }
- }
-
-\bool_new:N \l__chemmacros_nucleophile_elpair_bool
-\bool_new:N \l__chemmacros_elpair_dots_bool
-
-\ChemCompatibilityFrom{5.3}
-\dim_new:N \l__chemmacros_nucleophile_dim
-\dim_set:Nn \l__chemmacros_nucleophile_dim { .1em }
-
-\chemmacros_define_keys:nn {particles}
- {
- space .dim_set:N = \l__chemmacros_nucleophile_dim
- }
-\EndChemCompatibility
-
-\chemmacros_define_keys:nn {particles}
- {
- elpair .choice: ,
- elpair / false .code:n =
- { \bool_set_false:N \l__chemmacros_nucleophile_elpair_bool } ,
- elpair / dots .code:n =
- {
- \bool_set_true:N \l__chemmacros_nucleophile_elpair_bool
- \bool_set_true:N \l__chemmacros_elpair_dots_bool
- } ,
- elpair / dash .code:n =
- {
- \bool_set_true:N \l__chemmacros_nucleophile_elpair_bool
- \bool_set_false:N \l__chemmacros_elpair_dots_bool
- } ,
- elpair .default:n = dots
- }
-
-\cs_new_protected:Npn \chemmacros_declare_nucleophile:Nn #1#2
- {
- \cs_set_protected:cpn {__chemmacros_ \chemmacros_remove_backslash:N #1:}
- {
- \bool_if:NTF \l__chemmacros_nucleophile_elpair_bool
- {
- \chemmacros_elpair:n { #2 }
- \chemmacros_if_compatibility:nnT {>=} {5.3}
- { \skip_horizontal:N \l__chemmacros_nucleophile_dim }
- \chemmacros_chemformula:n { {}^{-} }
- }
- { \chemmacros_chemformula:n { #2^{-} } }
- }
- \DeclareDocumentCommand #1 {o}
- {
- \group_begin:
- \IfNoValueF {##1}
- { \chemmacros_set_keys:nn {particles} {##1} }
- \use:c {__chemmacros_ \chemmacros_remove_backslash:N #1:}
- \group_end:
- }
- }
-
-\NewChemMacroset {Nucleophile} {mm}
- { \chemmacros_declare_nucleophile:Nn #1 {#2} }
-
-% --------------------------------------------------------------------------
-% particles:
-\NewChemParticle \el { e^- }
-\NewChemParticle \prt { p^+ }
-\NewChemParticle \ntr { n^0 }
-
-% ions, molecules
-% proton, hydroxide, hydronium/oxonium, water:
-\NewChemParticle \Hpl { H^+ }
-\NewChemParticle \Hyd { OH^- }
-\NewChemParticle \Oxo { H_3O^+ }
-\NewChemParticle \water { H_2O }
-
-% electrophile:
-\NewChemParticle \El { E^+ }
-
-% nucleophiles:
-\NewChemNucleophile \Nuc {Nu}
-\NewChemNucleophile \ba {ba}
-
-\ChemCompatibilityTo{5.3}
- \DeclareChemDeprecated \Hto \Oxo
- \DeclareChemDeprecated \Nu \Nuc
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-2016/01/13 - new option particles/space
-2016/04/02 - adapt to formula methods `chemist' and `chemfig'
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.phases.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.phases.code.tex
deleted file mode 100644
index 49b19ee9c8..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.phases.code.tex
+++ /dev/null
@@ -1,140 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `phases'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{phases}{2016/05/31 phase descriptors}
-
-\chemmacros_load_module:n {chemformula}
-
-\bool_new:N \l__chemmacros_phases_sub_bool
-\dim_new:N \l__chemmacros_phases_space_dim
-\dim_set:Nn \l__chemmacros_phases_space_dim { .1333 em }
-
-\chemmacros_define_keys:nn {phases}
- {
- pos .choice: ,
- pos / sub .code:n = \bool_set_true:N \l__chemmacros_phases_sub_bool ,
- pos / side .code:n = \bool_set_false:N \l__chemmacros_phases_sub_bool ,
- space .dim_set:N = \l__chemmacros_phases_space_dim
- }
-
-\NewChemMacroset {Phase} {mm}
- { \chemmacros_define_phase:Nn #1 {#2} }
-
-\ChemCompatibilityTo{5.7}
-\cs_new_protected:Npn \chemmacros_define_phase:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { phase-\chemmacros_remove_backslash:N #1 }
- \exp_args:NV \@trnslt@declare@translation
- \l__chemmacros_tmpa_tl
- {fallback}
- {#2}
- \__chemmacros_define_phase:Nx #1
- { \exp_not:N \chemmacros_translate:n { \exp_not:V \l__chemmacros_tmpa_tl } }
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.7}
-\cs_new_protected:Npn \chemmacros_define_phase:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { phase-\chemmacros_remove_backslash:N #1 }
- \chemmacros_declare_translation:Vnn
- \l__chemmacros_tmpa_tl
- {fallback}
- {#2}
- \__chemmacros_define_phase:Nx #1
- { \exp_not:N \chemmacros_translate:n { \exp_not:V \l__chemmacros_tmpa_tl } }
- }
-\EndChemCompatibility
-
-\cs_new_protected:Npn \__chemmacros_define_phase:Nn #1#2
- {
- \cs_if_exist:NF #1 { \cs_new:Npn #1 {} }
- \DeclareDocumentCommand #1 {o}
- { \chemmacros_phase:n { #2 \IfNoValueF {##1} {,~##1} } }
- }
-\cs_generate_variant:Nn \__chemmacros_define_phase:Nn { Nx }
-
-\cs_new_protected:Npn \chemmacros_phase:n #1
- {
- \mode_leave_vertical:
- \bool_if:NTF \l__chemmacros_phases_sub_bool
- { \chemformula_subscript:n { (#1) } }
- {
- \skip_horizontal:N \l__chemmacros_phases_space_dim
- \chemmacros_text:n { (#1) }
- }
- }
-
-% --------------------------------------------------------------------------
-\NewDocumentCommand \phase {m} { \chemmacros_phase:n {#1} }
-
-\NewChemPhase \sld {s}
-\NewChemPhase \lqd {l}
-\NewChemPhase \gas {g}
-\NewChemPhase \aq {aq}
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityTo{5.6}
-\DeclareTranslation {English} {phase-sld} {s}
-\DeclareTranslation {German} {phase-sld} {f}
-
-\DeclareTranslation {English} {phase-lqd} {l}
-\DeclareTranslation {German} {phase-lqd} {f\/l}
-
-\DeclareTranslation {English} {phase-gas} {g}
-\DeclareTranslation {German} {phase-gas} {g}
-
-\DeclareTranslation {English} {phase-aq} {aq}
-\DeclareTranslation {German} {phase-aq} {aq}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\chemmacros_declare_translations:nn {phase-sld}
- {
- fallback = s ,
- German = f
- }
-
-\chemmacros_declare_translations:nn {phase-lqd}
- {
- fallback = l ,
- German = f\/l
- }
-
-\chemmacros_declare_translations:nn {phase-gas}
- { fallback = g }
-
-\chemmacros_declare_translations:nn {phase-aq}
- { fallback = aq }
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/06/09 - first version
-2016/04/27 - moved translations from lang module to phases module
-2016/05/31 - adapt to changes in `lang' module
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.polymers.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.polymers.code.tex
deleted file mode 100644
index 39a4e54fd9..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.polymers.code.tex
+++ /dev/null
@@ -1,182 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `polymers'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{polymers}{2018/03/02 polymers}
-
-\chemmacros_load_modules:n {nomenclature,tikz}
-
-% --------------------------------------------------------------------------
-% copolymers
-\NewChemIUPAC \copolymer { \textit {co} }
-\LetChemIUPAC \co \copolymer
-
-\NewChemIUPAC \statistical { \textit {stat} }
-\LetChemIUPAC \stat \statistical
-
-\NewChemIUPAC \random { \textit {ran} }
-\LetChemIUPAC \ran \random
-
-\NewChemIUPAC \alternating { \textit {alt} }
-\LetChemIUPAC \alt \alternating
-
-\NewChemIUPAC \periodic { \textit {per} }
-\LetChemIUPAC \per \periodic
-
-\NewChemIUPAC \block { \textit {block} }
-\NewChemIUPAC \graft { \textit {graft} }
-
-% --------------------------------------------------------------------------
-% non-linear (co)polymers
-\NewChemIUPAC \blend { \textit {blend} }
-\NewChemIUPAC \comb { \textit {comb} }
-
-\NewChemIUPAC \complex { \textit {compl} }
-\LetChemIUPAC \compl \complex
-
-\NewChemIUPAC \cyclic { \textit {cyclo} }
-\LetChemIUPAC \cyclo \cyclic
-
-\NewChemIUPAC \branch { \textit {branch} }
-\NewChemIUPAC \network { \textit {net} }
-\LetChemIUPAC \net \network
-
-\NewChemIUPAC \ipnetwork { \textit {ipn} }
-\LetChemIUPAC \ipn \ipnetwork
-
-\NewChemIUPAC \sipnetwork { \textit {sipn} }
-\LetChemIUPAC \sipn \sipnetwork
-
-\NewChemIUPAC \star { \textit {star} }
-
-% --------------------------------------------------------------------------
-
-\tl_new:N \l__chemmacros_polymer_delimiter_left_tl
-\tl_new:N \l__chemmacros_polymer_delimiter_right_tl
-
-\tl_new:N \l__chemmacros_polymer_subscript_tl
-\tl_new:N \l__chemmacros_polymer_superscript_tl
-
-\dim_new:N \l__chemmacros_polymer_delimiter_height_dim
-\dim_new:N \l__chemmacros_polymer_delimiter_depth_dim
-
-\cs_new_protected:Npn \__chemmacros_set_polymer_delimiters:NN #1#2
- {
- \tl_set:Nn \l__chemmacros_polymer_delimiter_left_tl {#1}
- \tl_set:Nn \l__chemmacros_polymer_delimiter_right_tl {#2}
- }
-
-% #1: height
-% #2: depth
-% #3: opening node
-% #4: closing node
-% #5: subscript
-% #6: superscript
-\cs_new_protected:Npn \chemmacros_make_polymer_braces:nnnnnn #1#2#3#4#5#6
- {
- \dim_set:Nn \l__chemmacros_polymer_delimiter_height_dim { (#1+#2)/2 }
- \dim_set:Nn \l__chemmacros_polymer_delimiter_depth_dim { (#1-#2)/2 }
- \chemmacros_tikz_picture:nn {remember~ picture, overlay }
- {
- \chemmacros_tikz_node:n
- { at = (#3) , yshift = \l__chemmacros_polymer_delimiter_depth_dim }
- {
- \c_math_toggle_token
- \tex_left:D \l__chemmacros_polymer_delimiter_left_tl
- \tex_vrule:D
- height \l__chemmacros_polymer_delimiter_height_dim
- depth \l__chemmacros_polymer_delimiter_height_dim
- width \c_zero_dim
- \tex_right:D .
- \c_math_toggle_token
- } ;
- \chemmacros_tikz_node:n
- { at = (#4) , yshift = \l__chemmacros_polymer_delimiter_depth_dim }
- {
- \c_math_toggle_token
- \tex_left:D .
- \tex_vrule:D
- height \l__chemmacros_polymer_delimiter_height_dim
- depth \l__chemmacros_polymer_delimiter_height_dim
- width \c_zero_dim
- \tex_right:D \l__chemmacros_polymer_delimiter_right_tl
- \c_math_subscript_token
- {
- \hbox_overlap_right:n
- {
- \chemmacros_if_compatibility:nnTF {>} {5.8b}
- { \smash {#5} }
- {#5}
- }
- }
- \c_math_superscript_token
- {
- \hbox_overlap_right:n
- {
- \chemmacros_if_compatibility:nnTF {>} {5.8b}
- { \smash {#6} }
- {#6}
- }
- }
- \c_math_toggle_token
- } ;
- }
- }
-\cs_generate_variant:Nn \chemmacros_make_polymer_braces:nnnnnn {nnnnVV}
-
-\chemmacros_define_keys:nn {polymers}
- {
- delimiters .code:n = \__chemmacros_set_polymer_delimiters:NN #1 ,
- delimiters .initial:n = [] ,
- superscript .tl_set:N = \l__chemmacros_polymer_superscript_tl ,
- subscript .tl_set:N = \l__chemmacros_polymer_subscript_tl ,
- subscript .initial:n = $n$
- }
-
-\NewDocumentCommand \makepolymerdelims {O{}momm}
- {
- \group_begin:
- \chemmacros_set_keys:nn {polymers} {#1}
- \IfNoValueTF {#3}
- {
- \chemmacros_make_polymer_braces:nnnnVV {#2} {#2} {#4} {#5}
- \l__chemmacros_polymer_subscript_tl
- \l__chemmacros_polymer_superscript_tl
- }
- {
- \chemmacros_make_polymer_braces:nnnnVV {#2} {#3} {#4} {#5}
- \l__chemmacros_polymer_subscript_tl
- \l__chemmacros_polymer_superscript_tl
- }
- \group_end:
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2016/03/07 - first version
-2016/03/08 - \makepolymerdelims
-2018/03/02 - smash sub- and superscripts of polymer delimiters
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.reactions.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.reactions.code.tex
deleted file mode 100644
index 504a9a58b3..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.reactions.code.tex
+++ /dev/null
@@ -1,445 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `reactions'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{reactions}{2020/02/02 reaction environments}
-
-\chemmacros_load_module:n {chemformula}
-
-\RequirePackage{mathtools}
-
-% --------------------------------------------------------------------------
-\cs_new_protected:Npn \__chemmacros_record_for_lor:nnnnn #1#2#3#4#5
- {
- \tl_if_eq:nnT {#1} {reaction}
- {
- \group_begin:
- % we need to prevent \Hy@make@anchor from being written to the lor
- % file:
- \bool_if:NT \l__chemmacros_hyperref_bool
- { \cs_set:Npn \Hy@make@anchor {} }
- \addcontentsline {lor} {reaction}
- {
- \tl_use:N \l__chemmacros_reaction_lorname_tl
- \tl_use:N \c_space_tl
- #2 #3 #4 #5
- \tl_use:N \g__chemmacros_reaction_description_tl
- }
- \tl_gclear:N \g__chemmacros_reaction_description_tl
- \group_end:
- }
- }
-
-% 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...
-\AfterPackage* { mathtools }
- {
- \cs_set_protected:Npn \MT_define_tagform:nwnn #1[#2]#3#4
- {
- \@namedef{MT_tagform_#1:n}##1
- {
- % this is the original part:
- \maketag@@@{#3\ignorespaces#2{##1}\unskip\@@italiccorr#4}
- % this is added => this disturbs hyperref:
- \__chemmacros_record_for_lor:nnnnn
- {#1} {#3} {#2} {##1} {#4}
- }
- }
- }
-
-\tl_new:N \g__chemmacros_reaction_description_tl
-
-\cs_new_protected:Npn \chemmacros_add_reaction_description:n #1
- {
- \tl_if_blank:nF {#1}
- { \tl_gset:Nn \g__chemmacros_reaction_description_tl {:~#1} }
- }
-
-\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 }
-
-\ChemCompatibilityTo{5.6}
-\tl_set:Nn \l__chemmacros_reaction_lorname_tl
- { \chemmacros_translate:n {reaction} }
-\EndChemCompatibility
-\ChemCompatibilityFrom{5.6}
-\tl_set:Nn \l__chemmacros_reaction_lorname_tl
- { \chemmacros_translate:n {Reaction} }
-\EndChemCompatibility
-
-\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 ,
- }
-\ChemCompatibilityFrom{5.2}
-\chemmacros_define_keys:nn {reactions}
- {
- list-heading-cmd .code:n =
- \cs_set_protected:Npn \__chemmacros_reaction_heading:n ##1 {#1}
- }
-\EndChemCompatibility
-
-\cs_if_exist:NTF \chapter
- {
- \chemmacros_if_compatibility:nnTF {>=} {5.2}
- {
- \chemmacros_set_keys:nn {reactions}
- { list-heading-cmd = \chapter* {#1} }
- }
- { \cs_set_protected:Npn \__chemmacros_reaction_heading:n { \chapter* } }
- }
- {
- \chemmacros_if_compatibility:nnTF {>=} {5.2}
- {
- \chemmacros_set_keys:nn {reactions}
- { list-heading-cmd = \section* {#1} }
- }
- { \cs_set_protected:Npn \__chemmacros_reaction_heading:n { \section* } }
- }
-
-\cs_new_protected:Npn \listofreactions
- {
- \__chemmacros_reaction_heading:V \reactionlistname
- \@starttoc {lor}
- }
-
-\ChemCompatibilityTo{5.6}
-\cs_new_protected:Npn \l@reaction #1#2
- { \@dottedtocline {1} {1.5em} {2.3em} {#1} {#2} }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\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
- }
-
-\AtEndPreamble
- {
- \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 }
- }
- }
-
-\ChemCleverefSupport {reaction}
- { \chemmacros_translate:n {reaction} }
- [ \chemmacros_translate:n {Reaction} ]
- { \chemmacros_translate:n {reactions} }
- [ \chemmacros_translate:n {Reactions} ]
-
-\AfterPackage* {cleveref}
- {
- \creflabelformat {reaction}
- {
- #2
- \l__chemmacros_reactions_tag_open_tl
- #1
- \l__chemmacros_reactions_tag_close_tl
- #3
- }
- }
-
-\ChemFancyrefSupport {rct}
- { \chemmacros_translate:n {reaction} }
- [ \chemmacros_translate:n {Reaction} ]
-\EndChemCompatibility
-
-% create new tagform
-\ChemCompatibilityTo{5.6}
-\newtagform {reaction} {\{} {\}}
-\EndChemCompatibility
-\ChemCompatibilityFrom{5.6}
-\newtagform {reaction}
- [\l__chemmacros_reactions_before_tag_tl]
- {\l__chemmacros_reactions_tag_open_tl}
- {\l__chemmacros_reactions_tag_close_tl}
-\EndChemCompatibility
-\newcounter {chemmacros_save_reaction}
-\newcounter {reaction}
-
-\ChemCompatibilityTo{5.6}
-\cs_new_protected:Npn \__chemmacros_begin_reaction:
- {
- % create individual names for `hyperref':
- \bool_if:NT \l__chemmacros_hyperref_bool
- {
- \cs_set:Npn \theHequation
- { R . \theHsection . \arabic {reaction} }
- }
- % enable labelformat `reaction':
- \bool_if:NT \l__chemmacros_varioref_bool
- { \cs_set_eq:NN \p@equation \p@reaction }
- \setcounter {chemmacros_save_reaction} { \value {equation} }
- \setcounter {equation} { \value {reaction} }
- \usetagform {reaction}
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\cs_new_protected:Npn \__chemmacros_begin_reaction:
- {
- \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}
- }
-\EndChemCompatibility
-
-% switch back to equation tags
-\cs_new_protected:Npn \__chemmacros_end_reaction:
- {
- \setcounter {reaction} { \value {equation} }
- \setcounter {equation} { \value {chemmacros_save_reaction} }
- }
-
-\tl_new:N \l__chemmacros_reactions_args_tl
-
-\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
- {
- \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
- }
-
-% #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
- {
- \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_end_reaction:
- \ignorespacesafterend
- }
- }
-\cs_generate_variant:Nn \chemmacros_declare_reaction_env:nnnn {nnnV}
-
-\ChemCompatibilityTo{5.6}
-\cs_new_protected:Npn \chemmacros_reaction_read:nnw #1#2#3 \end
- {
- \begin{#1}#2
- \chemmacros_reaction:n {#3}
- \end{#1}
- \end
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\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
- \seq_set_split:Nnn \l__chemmacros_tmpa_seq {\\} {#3}
- \int_set:Nn \l__chemmacros_tmpa_int
- { \seq_count:N \l__chemmacros_tmpa_seq }
- \int_zero:N \l__chemmacros_tmpb_int
- \seq_map_inline:Nn \l__chemmacros_tmpa_seq
- {
- \int_incr:N \l__chemmacros_tmpb_int
- \seq_clear:N \l__chemmacros_tmpc_seq
- \seq_set_split:Nnn \l__chemmacros_tmpb_seq {&} {##1}
- \seq_map_inline:Nn \l__chemmacros_tmpb_seq
- {
- \seq_put_right:Nn \l__chemmacros_tmpc_seq
- { \chemmacros_reaction:n {####1} }
- }
- \tl_put_right:Nx \l__chemmacros_tmpa_tl
- { \seq_use:Nn \l__chemmacros_tmpc_seq {&} }
- \int_compare:nF
- { \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
- \end
- }
-
-\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 }
-\EndChemCompatibility
-
-\NewChemMacroset* {Reaction} {mO{}m}
- { \chemmacros_define_reaction:nnn {#1} {#3} {#2} }
-
-\NewChemReaction {reaction} {equation}
-\NewChemReaction {reaction*} {equation*}
-\NewChemReaction {reactions} {align}
-\NewChemReaction {reactions*} {align*}
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityTo{5.6}
-\DeclareTranslationFallback {list-of-reactions} {List~ of~ Reactions}
-\DeclareTranslation {English} {list-of-reactions} {List~ of~ Reactions}
-\DeclareTranslation {German} {list-of-reactions} {Reaktionsverzeichnis}
-\DeclareTranslation {Italian} {list-of-reactions} {Elenco~ delle~ reazioni}
-\DeclareTranslation {French} {list-of-reactions} {Table~ des~ r\'{e}actions}
-\DeclareTranslation {Dutch} {list-of-reactions} {Lijst~ van~ reacties}
-
-\DeclareTranslationFallback {reaction} {Reaction}
-\DeclareTranslation {English} {reaction} {Reaction}
-\DeclareTranslation {German} {reaction} {Reaktion}
-\DeclareTranslation {Italian} {reaction} {Reazione}
-\DeclareTranslation {French} {reaction} {R\'{e}action}
-\DeclareTranslation {Dutch} {reaction} {Reactie}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\chemmacros_declare_translations:nn {list-of-reactions}
- {
- fallback = List~ of~ Reactions ,
- English = List~ of~ Reactions ,
- German = Reaktionsverzeichnis ,
- Italian = Elenco~ delle~ reazioni ,
- French = Table~ des~ r\'{e}actions ,
- Dutch = Lijst~ van~ reacties ,
- Norwegian = Reaksjonsliste ,
- Nynorsk = Reaksjonsliste
- }
-
-\chemmacros_declare_translations:nn {reaction}
- {
- fallback = reaction ,
- English = reaction ,
- German = Reaktion ,
- Italian = reazione ,
- French = r\'{e}action ,
- Dutch = reactie ,
- Norwegian = reaksjon ,
- Nynorsk = reaksjon
- }
-
-\chemmacros_declare_translations:nn {reactions}
- {
- fallback = reactions ,
- English = reactions ,
- German = Reaktionen ,
- Italian = reazioni ,
- French = r\'{e}actions ,
- Dutch = reacties ,
- Norwegian = reaksjoner ,
- Nynorsk = reaksjonar
- }
-
-\chemmacros_declare_translations:nn {Reaction}
- {
- fallback = Reaction ,
- English = Reaction ,
- German = Reaktion ,
- Italian = Reazione ,
- French = R\'{e}action ,
- Dutch = Reactie ,
- Norwegian = Reaksjon ,
- Nynorsk = Reaksjon
- }
-
-\chemmacros_declare_translations:nn {Reactions}
- {
- fallback = Reactions ,
- English = Reactions ,
- German = Reaktionen ,
- Italian = Reazioni ,
- French = R\'{e}actions ,
- Dutch = Reacties ,
- Norwegian = Reaksjoner ,
- Nynorsk = Reaksjonar
- }
-\EndChemCompatibility
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/09/15 - adapt to `method' option => do not use chemformula's macros
- directly
-2015/10/14 - new option `list-heading-cmd'
-2016/02/09 - added \ignorespacesafterend to environments
-2016/03/17 - tocbasic integration of lor
- - add missing compatibility check for the usage of the
- `list-heading-cmd' option
-2016/04/02 - adapt to new formula methods
-2016/04/27 - correct \__chemmacros_begin_reaction: so tags obey \thereaction
- - add cleveref support
- - add fancyref support
- - moved translations from lang module to reactions module
-2016/05/04 - options `tag-open', `tag-close' and `before-tag'
-2019/09/23 - added Norwegian translations
-2019/09/27 - change `O{}' argument of reactions into `!O{}'
-2020/02/02 - lazy boolean evaluation
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.redox.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.redox.code.tex
deleted file mode 100644
index c012a73b10..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.redox.code.tex
+++ /dev/null
@@ -1,458 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `redox'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{redox}{2020/02/02 oxidation numbers, redox reactions}
-
-\chemmacros_load_modules:n {tikz,xfrac}
-
-\RequirePackage{mathtools,relsize}
-
-\msg_new:nnn {chemmacros} {redox}
- { \token_to_str:N #1 \c_space_tl : ~ #2 ~ \msg_line_context: . }
-
-
-% --------------------------------------------------------------------------
-% oxidation numbers
-% \ox{<number>,<atom>}
-\bool_new:N \l__chemmacros_ox_sign_bool
-\bool_new:N \l__chemmacros_ox_integer_bool
-\bool_new:N \l__chemmacros_ox_explicit_sign_bool
-\ChemCompatibilityFrom{5.2}
-\bool_new:N \l__chemmacros_ox_explicit_zero_sign_bool
-\EndChemCompatibility
-\bool_new:N \l__chemmacros_ox_format_roman_bool
-\bool_new:N \l__chemmacros_ox_decimal_marker_comma_bool
-\bool_new:N \l__chemmacros_ox_parse_bool
-\bool_new:N \l__chemmacros_ox_side_bool
-\bool_new:N \l__chemmacros_ox_super_bool
-\bool_new:N \l__chemmacros_ox_top_bool
-\bool_new:N \l__chemmacros_ox_align_center_bool
-
-\ChemCompatibilityFrom{5.11}
-\tl_new:N \l__chemmacros_ox_format_tl
-\EndChemCompatibility
-
-\int_new:N \l__chemmacros_ox_number_int
-\fp_new:N \l__chemmacros_ox_number_fp
-
-\cs_new_protected:Npn \__chemmacros_ox_format:n #1
- {
- \chemmacros_if_compatibility:nnTF {>=} {5.11}
- { { \l__chemmacros_ox_format_tl {#1} } }
- { \use:n {#1} }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_process_number:n #1
- {
- \bool_if:NTF \l__chemmacros_ox_parse_bool
- {
- \tl_if_in:nnTF {#1} { / }
- { \__chemmacros_ox_fraction:w #1 \q_stop }
- {
- \__chemmacros_ox_sign:n {#1}
- \__chemmacros_ox_value:n {#1}
- }
- }
- {#1}
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_fraction:w #1/#2 \q_stop
- {
- \group_begin:
- \bool_set_false:N \l__chemmacros_ox_format_roman_bool
- \__chemmacros_ox_sign:n {#1}
- \bool_if:NTF \l__chemmacros_ox_side_bool
- { \chemmacros_ox_text_frac:nn }
- { \chemmacros_ox_super_frac:nn }
- { \__chemmacros_ox_value:n {#1} }
- {#2}
- \group_end:
- }
-
-\ChemCompatibilityTo{5.4}
-\cs_new_protected:Npn \__chemmacros_ox_sign:n #1
- {
- \bool_lazy_and:nnT
- { \fp_compare_p:n { #1 > 0 } }
- { \l__chemmacros_ox_explicit_sign_bool }
- { \c_math_toggle_token + \c_math_toggle_token }
- \bool_lazy_and:nnT
- { \fp_compare_p:n { #1 = 0 } }
- { \l__chemmacros_ox_explicit_sign_bool }
- { \c_math_toggle_token \pm \c_math_toggle_token }
- \fp_compare:nT { #1 < 0 }
- { \c_math_toggle_token - \c_math_toggle_token }
- }
-\EndChemCompatibility
-\ChemCompatibilityFrom{5.4}
-\cs_new_protected:Npn \__chemmacros_ox_sign:n #1
- {
- \bool_lazy_and:nnT
- { \fp_compare_p:n { #1 > 0 } }
- { \l__chemmacros_ox_explicit_sign_bool }
- { \c_math_toggle_token + \c_math_toggle_token }
- \bool_lazy_all:nT
- {
- { \fp_compare_p:n { #1 = 0 } }
- { \l__chemmacros_ox_explicit_sign_bool }
- { \l__chemmacros_ox_explicit_zero_sign_bool }
- }
- { \c_math_toggle_token \pm \c_math_toggle_token }
- \fp_compare:nT { #1 < 0 }
- { \c_math_toggle_token - \c_math_toggle_token }
- }
-\EndChemCompatibility
-
-\cs_new_protected:Npn \__chemmacros_ox_value:n #1
- {
- \fp_set:Nn \l__chemmacros_ox_number_fp { abs(#1) }
- \__chemmacros_ox_is_integer:n { \l__chemmacros_ox_number_fp }
- \bool_if:NTF \l__chemmacros_ox_format_roman_bool
- { \__chemmacros_fp_to_Roman:n { \l__chemmacros_ox_number_fp } }
- {
- \bool_if:NTF \l__chemmacros_ox_integer_bool
- {
- \c_math_toggle_token
- \__chemmacros_fp_to_arabic:n { \l__chemmacros_ox_number_fp }
- \c_math_toggle_token
- }
- {
- \c_math_toggle_token
- \fp_use:N \l__chemmacros_ox_number_fp
- \c_math_toggle_token
- }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_is_integer:n #1
- {
- \fp_compare:nNnTF {#1} = { round((#1) + 1 , 0 ) - 1 }
- { \bool_set_true:N \l__chemmacros_ox_integer_bool }
- {
- \bool_set_false:N \l__chemmacros_ox_integer_bool
- \bool_set_false:N \l__chemmacros_ox_format_roman_bool
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_fp_to_Roman:n #1
- {
- \group_begin:
- \fp_compare:nNnTF {#1} = { 0 }
- {0}
- { \int_to_Roman:n { \fp_to_int:n {#1} } }
- \group_end:
- }
-
-\cs_new_protected:Npn \__chemmacros_fp_to_arabic:n #1
- {
- \group_begin:
- \bool_if:NTF \l__chemmacros_ox_decimal_marker_comma_bool
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { \fp_to_decimal:n {#1} }
- \tl_replace_once:Nnn \l__chemmacros_tmpa_tl {.} { {,} }
- \tl_use:N \l__chemmacros_tmpa_tl
- }
- { \fp_to_decimal:n {#1} }
- \group_end:
- }
-
-\tl_new:N \l__chemmacros_ox_side_connect_tl
-
-\cs_new_protected:Npn \__chemmacros_ox_write:nn #1#2
- {
- \tl_if_blank:nT {#1}
- { \msg_error:nnn {chemmacros} {redox} {\ox} {oxidation~number~missing} }
- \tl_if_blank:nT {#2}
- { \msg_error:nnn {chemmacros} {redox} {\ox} {oxidation-atom~missing} }
- \hbox_set:Nn \l__chemmacros_tmpa_box
- {
- \chemmacros_text:n
- {
- \__chemmacros_ox_format:n
- { \relsize {-3} \__chemmacros_ox_process_number:n {#1} }
- }
- }
- \hbox_set:Nn \l__chemmacros_tmpb_box { \chemmacros_chemformula:n {#2} }
- \chemmacros_math:n
- {
- \bool_if:NT \l__chemmacros_ox_super_bool
- {
- \box_use:N \l__chemmacros_tmpb_box
- \c_math_superscript_token { \box_use:N \l__chemmacros_tmpa_box }
- }
- \bool_if:NT \l__chemmacros_ox_side_bool
- {
- \chemmacros_text:n
- {
- \box_use:N \l__chemmacros_tmpb_box
- \tl_use:N \l__chemmacros_ox_side_connect_tl
- (
- \__chemmacros_ox_format:n
- { \__chemmacros_ox_process_number:n {#1} }
- )
- }
- }
- \bool_if:NT \l__chemmacros_ox_top_bool
- {
- \bool_if:NF \l__chemmacros_ox_align_center_bool
- {
- \hbox_set_to_wd:Nnn \l__chemmacros_tmpa_box
- { \box_wd:N \l__chemmacros_tmpb_box }
- { \rlap { \hbox_unpack:N \l__chemmacros_tmpa_box } \hfil }
- }
- \overset
- {
- \bool_if:NTF \l__chemmacros_ox_align_center_bool
- { \clap }
- { \use:n }
- { \box_use:N \l__chemmacros_tmpa_box }
- }
- { \box_use:N \l__chemmacros_tmpb_box }
- }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_pos_top:
- {
- \bool_set_true:N \l__chemmacros_ox_top_bool
- \bool_set_false:N \l__chemmacros_ox_super_bool
- \bool_set_false:N \l__chemmacros_ox_side_bool
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_pos_super:
- {
- \bool_set_false:N \l__chemmacros_ox_top_bool
- \bool_set_true:N \l__chemmacros_ox_super_bool
- \bool_set_false:N \l__chemmacros_ox_side_bool
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_pos_side:
- {
- \bool_set_false:N \l__chemmacros_ox_top_bool
- \bool_set_false:N \l__chemmacros_ox_super_bool
- \bool_set_true:N \l__chemmacros_ox_side_bool
- }
-
-\chemmacros_define_keys:nn {redox}
- {
- pos .choice: ,
- pos / top .code:n = \__chemmacros_ox_pos_top: ,
- pos / super .code:n = \__chemmacros_ox_pos_super: ,
- pos / side .code:n = \__chemmacros_ox_pos_side: ,
- pos .initial:n = super ,
- side-connect .tl_set:N = \l__chemmacros_ox_side_connect_tl ,
- side-connect .initial:n = \, ,
- text-frac .code:n =
- \cs_set_protected:Npn \chemmacros_ox_text_frac:nn ##1##2 {#1} ,
- text-frac .initial:n = \chemfrac[text]{#1}{#2} ,
- super-frac .code:n =
- \cs_set_protected:Npn \chemmacros_ox_super_frac:nn ##1##2 {#1} ,
- super-frac .initial:n = \chemfrac[superscript]{#1}{#2} ,
- roman .bool_set:N = \l__chemmacros_ox_format_roman_bool ,
- roman .default:n = true ,
- roman .initial:n = true ,
- parse .bool_set:N = \l__chemmacros_ox_parse_bool ,
- parse .default:n = true ,
- parse .initial:n = true ,
- explicit-sign .bool_set:N = \l__chemmacros_ox_explicit_sign_bool ,
- explicit-sign .default:n = true ,
- decimal-marker .choice: ,
- decimal-marker / comma .code:n =
- { \bool_set_true:N \l__chemmacros_ox_decimal_marker_comma_bool } ,
- decimal-marker / point .code:n =
- { \bool_set_false:N \l__chemmacros_ox_decimal_marker_comma_bool } ,
- decimal-marker .initial:n = point ,
- align .choice: ,
- align / center .code:n =
- \bool_set_true:N \l__chemmacros_ox_align_center_bool ,
- align / right .code:n =
- \bool_set_false:N \l__chemmacros_ox_align_center_bool ,
- align .initial:n = center
- }
-
-\ChemCompatibilityFrom{5.4}
-\chemmacros_define_keys:nn {redox}
- {
- explicit-zero-sign .bool_set:N = \l__chemmacros_ox_explicit_zero_sign_bool ,
- explicit-zero-sign .default:n = true
- }
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.11}
-\chemmacros_define_keys:nn {redox}
- { format .tl_set:N = \l__chemmacros_ox_format_tl }
-\EndChemCompatibility
-
-% \ox[<keyval>]{<num>,<atom>}
-% \ox*[<keyval>]{<num>,<atom>} => always number on the top
-\cs_new_protected:Npn \chemmacros_ox:nnnn #1#2#3#4
- {
- \group_begin:
- \chemmacros_set_keys:nn {redox} {#2}
- \tl_if_blank:nF {#1} { \__chemmacros_ox_pos_top: }
- \__chemmacros_ox_write:nn {#3} {#4}
- \group_end:
- }
-
-\NewDocumentCommand \ox { sO{}>{\SplitArgument{1}{,}}m }
- {
- \IfBooleanTF {#1}
- { \chemmacros_ox:nnnn {#1} {#2} #3 }
- { \chemmacros_ox:nnnn { } {#2} #3 }
- }
-
-% ---------------------------------------------------------------------------
-% redox reactions
-\tl_new:N \l__chemmacros_redox_begin_tl
-\tl_new:N \l__chemmacros_redox_end_tl
-\tl_new:N \l__chemmacros_redox_tikz_tl
-\tl_new:N \l__chemmacros_redox_shift_tl
-\tl_new:N \l__chemmacros_redox_anchor_tl
-\tl_new:N \l__chemmacros_redox_side_tl
-
-\fp_new:N \l__chemmacros_redox_shift_fp
-
-\dim_new:N \l__chemmacros_redox_sep_dim
-\dim_new:N \l__chemmacros_redox_sep_default_dim
-\dim_set:Nn \l__chemmacros_redox_sep_default_dim {.2em}
-\dim_new:N \l__chemmacros_redox_dist_dim
-\dim_set:Nn \l__chemmacros_redox_dist_dim {.6em}
-
-% place and name nodes:
-% \OX{<name>,<atom>}
-\NewDocumentCommand \OX { >{\SplitArgument{1}{,}}m }
- { \chemmacros_redox_partner:nn #1 }
-
-% TODO: add option to make `#2' be parsed as chem formula
-\cs_new_protected:Npn \chemmacros_redox_partner:nn #1#2
- {
- \legacy_if:nTF {measuring@}
- {
- \group_begin:
- \tikz[baseline=(#1.base)] { \node [inner~sep=0pt] (#1) {#2} ; }
- \group_end:
- }
- {
- \tl_if_blank:nT {#1}
- { \msg_error:nnnn {chemmacros} {redox} {\OX} {node~name~missing} }
- \tl_if_blank:nT {#2}
- { \msg_error:nnnn {chemmacros} {redox} {\OX} {atom~missing} }
- \tikz[baseline=(#1.base),remember~picture]
- { \node [inner~sep=0pt] (#1) {#2} ; }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_redox_coordinates:nn #1#2
- {
- \tl_set:Nn \l__chemmacros_redox_begin_tl {#1}
- \tl_set:Nn \l__chemmacros_redox_end_tl {#2}
- }
-
-\cs_new_protected:Npn \chemmacros_redox:nnnnn #1#2#3#4#5
- {
- \tl_clear:N \l__chemmacros_redox_begin_tl
- \tl_clear:N \l__chemmacros_redox_end_tl
- \tl_clear:N \l__chemmacros_redox_tikz_tl
- \__chemmacros_redox_coordinates:nn {#1} {#2}
- \tl_if_blank:nF {#3}
- { \tl_set:Nn \l__chemmacros_redox_tikz_tl {#3} }
- \tl_if_blank:nTF {#4}
- {
- \fp_set:Nn \l__chemmacros_redox_shift_fp {1}
- \tl_set:Nn \l__chemmacros_redox_anchor_tl {above}
- \tl_set:Nn \l__chemmacros_redox_side_tl {north}
- \dim_set_eq:NN
- \l__chemmacros_redox_sep_dim
- \l__chemmacros_redox_sep_default_dim
- }
- {
- \fp_compare:nNnTF {#4} < {0}
- {
- \tl_set:Nn \l__chemmacros_redox_anchor_tl {below}
- \tl_set:Nn \l__chemmacros_redox_side_tl {south}
- \exp_args:NNo \dim_set:Nn \l__chemmacros_redox_sep_dim
- { - \l__chemmacros_redox_sep_default_dim }
- }
- {
- \tl_set:Nn \l__chemmacros_redox_anchor_tl {above}
- \tl_set:Nn \l__chemmacros_redox_side_tl {north}
- \dim_set_eq:NN
- \l__chemmacros_redox_sep_dim
- \l__chemmacros_redox_sep_default_dim
- }
- \fp_set:Nn \l__chemmacros_redox_shift_fp {#4}
- }
- \tl_set:Nx \l__chemmacros_redox_shift_tl
- { \fp_to_decimal:N \l__chemmacros_redox_shift_fp }
- \tikz[remember~picture,overlay]
- {
- \chemmacros_tikz_draw:x { \exp_not:V \l__chemmacros_redox_tikz_tl }
- ($
- (\l__chemmacros_redox_begin_tl .
- \l__chemmacros_redox_side_tl)+(0,\l__chemmacros_redox_sep_dim)
- $)
- --
- ++(0,\l__chemmacros_redox_shift_tl * \l__chemmacros_redox_dist_dim) -|
- node [pos=.25,\l__chemmacros_redox_anchor_tl] { {#5} }
- ($
- (\l__chemmacros_redox_end_tl .
- \l__chemmacros_redox_side_tl)+(0,\l__chemmacros_redox_sep_dim)
- $) ;
- }
- }
-
-\NewDocumentCommand \redox { >{\SplitArgument{1}{,}}r()ooG{} }
- {
- \IfNoValueT {#1}
- {
- \msg_error:nnnn {chemmacros} {redox} {\redox}
- {You~need~to~specify~coordinates}
- }
- \IfNoValueTF {#2}
- { \chemmacros_redox:nnnnn #1 { } { } {#4} }
- {
- \IfNoValueTF {#3}
- { \chemmacros_redox:nnnnn #1 {#2} { } {#4} }
- { \chemmacros_redox:nnnnn #1 {#2} {#3} {#4} }
- }
- }
-
-% redox-keys
-\chemmacros_define_keys:nn {redox}
- {
- dist .dim_set:N = \l__chemmacros_redox_dist_dim ,
- dist .initial:n = {.6em} ,
- sep .dim_set:N = \l__chemmacros_redox_sep_default_dim ,
- sep .initial:n = {.2em}
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-2015/09/30 - new option `explicit-zero-sign'
-2020/02/02 - lazy boolean evaluation
- - prefer \legacy_if:nTF over \chemmacros_if_tex:nnTF
-2020/03/02 - add option redox/format
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.scheme.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.scheme.code.tex
deleted file mode 100644
index 82df4d1624..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.scheme.code.tex
+++ /dev/null
@@ -1,333 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `scheme'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{scheme}{2020/11/21 a scheme floating environment}
-
-\RequirePackage {chemnum}
-
-\bool_new:N \l__chemmacros_float_def_bool
-\tl_new:N \l__chemmacros_float_method_tl
-\seq_new:N \l__chemmacros_float_methods_seq
-\prop_new:N \l__chemmacros_float_methods_prop
-\prop_new:N \l__chemmacros_float_definitions_prop
-
-\msg_new:nnn {chemmacros} {float-method}
- { Detected~ float~ defining~ method~ `#1'. }
-
-% --------------------------------------------------------------------------
-% #1: name
-% #2: check
-\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} }
- }
-
-% the order in which the methods are defined determines in which order the
-% methods will be checked at begin document:
-\chemmacros_define_float_method:nnn {KOMA}
- { \cs_if_exist_p:N \KOMAClassName }
- {
- \DeclareNewTOC[
- type = #1 ,
- types = #1s ,
- float ,
- name = \chemmacros_translate:n {#1-name} ,
- listname = {\exp_not:N \chemmacros_translate:n {#1-list}}
- ]{#2}
- }
-
-\chemmacros_define_float_method:nnn {memoir}
- { \chemmacros_if_class_loaded_p:n {memoir} }
- {
- \newfloat [chapter] {#1} {#2} {\chemmacros_translate:n {#1-name}}
- \cs_set:cpn {the#1} {\thechapter.\arabic {#1}}
- \newlistof {listof#1s} {#2} {\chemmacros_translate:n {#1-list}}
- \newlistentry [chapter] {#1} {#2} {0}
- \cftsetindents {#1} {0em} {2.3em}
- \tl_put_right:Nn \@memfront@floats
- { \counterwithout {#1} {chapter} }
- \tl_put_right:Nn \@memmain@floats
- { \counterwithin {#1} {chapter} }
- \tl_put_right:Nn \@memback@floats
- {
- \counterwithin {#1} {chapter}
- \setcounter {#1} {0}
- }
- \legacy_if:nT {artopt}
- { \counterwithout {#1} {chapter} }
- }
-
-\chemmacros_define_float_method:nnn {tocbasic}
- { \chemmacros_if_package_loaded_p:n {tocbasic} }
- {
- \DeclareNewTOC[
- type = #1 ,
- types = #1s ,
- float ,
- name = \chemmacros_translate:n {#1-name} ,
- listname = {\exp_not:N \chemmacros_translate:n {#1-list}}
- ]{#2}
- }
-
-\chemmacros_define_float_method:nnn {newfloat}
- { \chemmacros_if_package_loaded_p:n {newfloat} }
- {
- \DeclareFloatingEnvironment[{
- fileext = #2 ,
- listname = {\exp_not:N \chemmacros_translate:n {#1-list}} ,
- name = \chemmacros_translate:n {#1-name}
- }]{#1}
- }
-
-\ChemCompatibilityFrom{5.1}
-\chemmacros_define_float_method:nnn {floatrow}
- { \chemmacros_if_package_loaded_p:n {floatrow} }
- {
- \DeclareNewFloatType{#1}{%
- fileext = #2,
- placement = htp,
- name = \chemmacros_translate:n {#1-name}
- }
- \cs_new_protected:cpn {listof#1s}
- { \listof {#1} {\chemmacros_translate:n {#1-list}} }
- }
-\EndChemCompatibility
-
-\chemmacros_define_float_method:nnn {float}
- { \chemmacros_if_package_loaded_p:n {float} }
- {
- \newfloat {#1} {htp} {#2}
- \floatname {#1} {\chemmacros_translate:n {#1-name}}
- \cs_new_protected:cpn {listof#1s}
- { \listof {#1} {\chemmacros_translate:n {#1-list}} }
- }
-
-% --------------------------------------------------------------------------
-% checks if one of the above defined methods is active. The first one found
-% 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_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
- }
-
-\AtEndPreamble
- {
- % the check is there since v5.3a -- let's wait and see if we actually need
- % a compatibility check here:
- \chemmacros_if_package_loaded:nF {chemscheme}
- {
- \chemmacros_check_float_methods:
- \chemmacros_define_float:nn {scheme} {los}
- }
- }
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityFrom{5.6}
-\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} ]
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-% #1: env name
-\cs_new_protected:Npn \chemmacros_define_float:nn #1#2
- {
- \bool_lazy_and:nnT
- { !\cs_if_exist_p:c {#1} }
- { !\cs_if_exist_p:c {end#1} }
- {
- \bool_if:NTF \l__chemmacros_float_def_bool
- {
- \prop_get:NVN \l__chemmacros_float_definitions_prop
- \l__chemmacros_float_method_tl
- \l__chemmacros_tmpa_tl
- \tl_use:N \l__chemmacros_tmpa_tl
- \__chemmacros_define_float:nn {#1} {#2}
- }
- {
- \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 }
- }
- }
- {
- \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
- }
- }
- \cs_set:cpn {#1name} {\chemmacros_translate:n {#1-name}}
- \cs_set:cpn {list#1name} {\chemmacros_translate:n {#1-list}}
- }
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityTo{5.6}
-\DeclareTranslationFallback {scheme-name} {Scheme}
-\DeclareTranslation {English} {scheme-name} {Scheme}
-\DeclareTranslation {German} {scheme-name} {Schema}
-
-\DeclareTranslationFallback {scheme-list} {List~ of~ Schemes}
-\DeclareTranslation {English} {scheme-list} {List~ of~ Schemes}
-\DeclareTranslation {German} {scheme-list} {Verzeichnis~ der~ Schemata}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.6}
-\chemmacros_declare_translations:nn {scheme-name}
- {
- fallback = Scheme ,
- English = Scheme ,
- German = Schema ,
- Norwegian = Skjema ,
- Nynorsk = Skjema
- }
-
-\chemmacros_declare_translations:nn {scheme-list}
- {
- fallback = List~ of~ Schemes ,
- English = List~ of~ Schemes ,
- German = Verzeichnis~ der~ Schemata,
- Norwegian = Skjemaliste,
- Nynorsk = Skjemaliste
- }
-
-\chemmacros_declare_translations:nn {scheme}
- {
- fallback = scheme ,
- English = scheme ,
- German = Schema ,
- Norwegian = skjema ,
- Nynorsk = skjema
- }
-
-\chemmacros_declare_translations:nn {Scheme}
- {
- fallback = Scheme ,
- English = Scheme ,
- German = Schema ,
- Norwegian = Skjema ,
- Nynorsk = Skjema
- }
-
-\chemmacros_declare_translations:nn {schemes}
- {
- fallback = schemes ,
- English = schemes ,
- German = Schemata ,
- Norwegian = skjema ,
- Nynorsk = skjema
- }
-
-\chemmacros_declare_translations:nn {Schemes}
- {
- fallback = Schemes ,
- English = Schemes ,
- German = Schemata ,
- Norwegian = Skjema ,
- Nynorsk = Skjema
- }
-\EndChemCompatibility
-
-\file_input_stop:
-% --------------------------------------------------------------------------
-2015/09/19 - make the module compatible with floatrow
-2015/10/23 - add info message to float method detection
-2016/01/23 - make the module compatible with chemscheme
-2016/04/25 - cleveref and fancyref support
-2016/12/28 - bug fix: typo in \chemmacros_if_tex:nnTF usage
-2019/03/23 - added Norwegian translations
-2020/02/03 - lazy boolean evaluation
- - prefer \legacy_if:nTF over \chemmacros_if_tex:nnTF
-2020/11/21 - fix issue #41
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.spectroscopy.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.spectroscopy.code.tex
deleted file mode 100644
index 4f5a1914ea..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.spectroscopy.code.tex
+++ /dev/null
@@ -1,515 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `spectroscopy'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{spectroscopy}{2020/11/21 environment for spectroscopic data}
-
-\chemmacros_load_modules:n {chemformula}
-\RequirePackage{siunitx}
-
-% spectroscopy
-\tl_new:N \g__chemmacros_nmr_isotope_tl
-\tl_new:N \l__chemmacros_nmr_isotope_default_tl
-\tl_set:Nn \l__chemmacros_nmr_isotope_default_tl { 1 }
-\tl_new:N \l__chemmacros_nmr_coupling_nuclei_tl
-\tl_new:N \l__chemmacros_nmr_coupling_nuclei_pre_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_pre_tl { ( }
-\tl_new:N \l__chemmacros_nmr_coupling_nuclei_post_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_post_tl { ) }
-\tl_new:N \l__chemmacros_nmr_coupling_bonds_tl
-\tl_new:N \l__chemmacros_nmr_coupling_bonds_pre_tl
-\tl_new:N \l__chemmacros_nmr_coupling_bonds_post_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_pre_tl { }
-\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_post_tl { \! }
-\tl_new:N \l__chemmacros_nmr_coupling_symbol_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_symbol_tl { J }
-\tl_new:N \g__chemmacros_nmr_element_coupled_tl
-\tl_new:N \g__chemmacros_nmr_element_tl
-\tl_new:N \l__chemmacros_nmr_element_default_tl
-\tl_set:Nn \l__chemmacros_nmr_element_default_tl { H }
-\tl_new:N \l__chemmacros_nmr_format_tl
-\tl_new:N \l__chemmacros_nmr_delta_tl
-\tl_new:N \l__chemmacros_nmr_coupling_unit_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_unit_tl { \hertz }
-\tl_new:N \l__chemmacros_nmr_unit_tl
-\tl_set:Nn \l__chemmacros_nmr_unit_tl { \mega\hertz }
-\tl_new:N \l__chemmacros_nmr_list_setup_tl
-\tl_set:Nn \l__chemmacros_nmr_list_setup_tl
- {
- \topsep\z@skip \partopsep\z@skip
- \itemsep\z@ \parsep\z@ \itemindent\z@
- \leftmargin\z@
- }
-\tl_new:N \l__chemmacros_nmr_position_tl
-\tl_new:N \l__chemmacros_nmr_element_method_connector_tl
-\tl_set:Nn \l__chemmacros_nmr_element_method_connector_tl {-}
-\tl_new:N \l__chemmacros_nmr_method_tl
-\tl_set:Nn \l__chemmacros_nmr_method_tl {NMR}
-
-\bool_new:N \l__chemmacros_nmr_coupling_nuclei_sub_bool
-\bool_new:N \l__chemmacros_nmr_frequency_bool
-\bool_new:N \l__chemmacros_nmr_solvent_bool
-\bool_new:N \l__chemmacros_nmr_delimiters_bool
-\bool_new:N \l__chemmacros_nmr_comma_bool
-\bool_new:N \l__chemmacros_nmr_inner_bool
-\bool_new:N \l__chemmacros_nmr_position_side_bool
-\bool_new:N \l__chemmacros_nmr_parse_bool
-\bool_set_true:N \l__chemmacros_nmr_parse_bool
-\bool_new:N \l__chemmacros_nmr_list_bool
-\bool_new:N \l__chemmacros_nmr_use_equal_bool
-\bool_new:N \l__chemmacros_nmr_custom_command_active_bool
-\bool_new:N \l__chemmacros_nmr_custom_command_used_bool
-
-\skip_new:N \l__chemmacros_nmr_space_skip
-\skip_set:Nn \l__chemmacros_nmr_space_skip { .16667em }
-
-\cs_new_protected:Npn \__chemmacros_nmr_nucleus:nn #1#2
- {
- \tl_gset:Nn \g__chemmacros_nmr_isotope_tl {#1}
- \tl_if_in:nnTF {#2} {[} % ]
- { \__chemmacros_nmr_element:w #2 \q_stop }
- {
- \tl_gset:No \g__chemmacros_nmr_element_tl {#2}
- \tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
- }
- }
-\cs_generate_variant:Nn \__chemmacros_nmr_nucleus:nn { VV }
-
-\cs_new_protected:Npn \__chemmacros_nmr_nucleus:w #1,#2 \q_stop
- {
- \tl_gset:Nn \g__chemmacros_nmr_isotope_tl {#1}
- \tl_if_in:nnTF {#2} {[} % ]
- { \__chemmacros_nmr_element:w #2 \q_stop }
- {
- \tl_gset:No \g__chemmacros_nmr_element_tl {#2}
- \tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_element:w #1[#2] \q_stop
- {
- \tl_gset:Nn \g__chemmacros_nmr_element_tl {#1}
- \tl_gset:Nn \g__chemmacros_nmr_element_coupled_tl {#2}
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_default_nucleus:w #1,#2 \q_stop
- {
- \tl_set:Nn \l__chemmacros_nmr_isotope_default_tl {#1}
- \tl_set:Nn \l__chemmacros_nmr_element_default_tl {#2}
- }
-
-\ChemCompatibilityTo{5.8}
-\cs_new_protected:Npn \__chemmacros_nmr_base:nn #1#2
- {
- \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
- {
- \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { \{ }
- \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} }
- \bool_if:NTF \l__chemmacros_nmr_parse_bool
- { \chemmacros_chemformula:V \g__chemmacros_nmr_element_coupled_tl }
- { \g__chemmacros_nmr_element_coupled_tl }
- \tl_use:N \l__chemmacros_nmr_element_method_connector_tl
- \tl_use:N \l__chemmacros_nmr_method_tl
- }
-\EndChemCompatibility
-\ChemCompatibilityFrom{5.8}
-\tl_new:N \l__chemmacros_nmr_base_format_tl
-
-\chemmacros_define_keys:nn {spectroscopy}
- { nmr-base-format .tl_set:N = \l__chemmacros_nmr_base_format_tl }
-
-\cs_new_protected:Npn \__chemmacros_nmr_base:nn #1#2
- {
- \group_begin:
- \tl_use:N \l__chemmacros_nmr_base_format_tl
- \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
- {
- \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { \{ }
- \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} }
- \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 }
- { \g__chemmacros_nmr_element_coupled_tl }
- }
- \tl_use:N \l__chemmacros_nmr_element_method_connector_tl
- \tl_use:N \l__chemmacros_nmr_method_tl
- \group_end:
- }
-\EndChemCompatibility
-
-\cs_generate_variant:Nn \__chemmacros_nmr_base:nn { VV }
-
-\cs_new_protected:Npn \__chemmacros_nmr_frequency:n #1
- {
- \tl_if_in:nnTF {#1} {,}
- { \__chemmacros_nmr_frequency_aux_i:w #1 \q_stop }
- { \__chemmacros_nmr_frequency_aux_ii:n {#1} }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_frequency_aux_i:w #1,#2 \q_stop
- { \SI {#1} {#2} }
-
-\cs_new_protected:Npn \__chemmacros_nmr_frequency_aux_ii:n #1
- { \SI {#1} { \tl_use:N \l__chemmacros_nmr_unit_tl } }
-
-\cs_new_eq:NN \__chemmacros_nmr_number:n \use:n
-\cs_new_eq:NN \__chemmacros_nmr_position:n \use:n
-
-\chemmacros_define_keys:nn {spectroscopy}
- {
- unit .tl_set:N = \l__chemmacros_nmr_unit_tl ,
- unit .default:n = \mega\hertz ,
- nucleus .code:n =
- { \__chemmacros_nmr_default_nucleus:w #1 \q_stop } ,
- nucleus .default:n = {1,H} ,
- format .tl_set:N = \l__chemmacros_nmr_format_tl ,
- method .tl_set:N = \l__chemmacros_nmr_method_tl ,
- connector .tl_set:N = \l__chemmacros_nmr_element_method_connector_tl ,
- pos-number .choice: ,
- pos-number / sub .code:n =
- \tl_set:Nn \l__chemmacros_nmr_position_tl {_}
- \bool_set_false:N \l__chemmacros_nmr_position_side_bool ,
- pos-number / super .code:n =
- \tl_set:Nn \l__chemmacros_nmr_position_tl {^}
- \bool_set_false:N \l__chemmacros_nmr_position_side_bool ,
- pos-number / side .code:n =
- \tl_set:Nn \l__chemmacros_nmr_position_tl {-}
- \bool_set_true:N \l__chemmacros_nmr_position_side_bool ,
- pos-number / .initial:n = side ,
- coupling-unit .tl_set:N = \l__chemmacros_nmr_coupling_unit_tl ,
- coupling-pos .choice: ,
- coupling-pos / sub .code:n =
- \bool_set_true:N \l__chemmacros_nmr_coupling_nuclei_sub_bool ,
- coupling-pos / side .code:n =
- \bool_set_false:N \l__chemmacros_nmr_coupling_nuclei_sub_bool ,
- coupling-nuclei-pre .tl_set:N =
- \l__chemmacros_nmr_coupling_nuclei_pre_tl ,
- coupling-nuclei-post .tl_set:N =
- \l__chemmacros_nmr_coupling_nuclei_post_tl ,
- coupling-bonds-pre .tl_set:N =
- \l__chemmacros_nmr_coupling_bonds_pre_tl ,
- coupling-bonds-post .tl_set:N =
- \l__chemmacros_nmr_coupling_bonds_post_tl ,
- coupling-symbol .tl_set:N =
- \l__chemmacros_nmr_coupling_symbol_tl ,
- atom-number-cs .code:n =
- \cs_set_eq:NN \__chemmacros_nmr_number:n #1 ,
- \chemmacros_if_compatibility:nnT {>=} {5.3}
- { atom-number-space .skip_set:N = \l__chemmacros_nmr_space_skip , }
- coupling-pos-cs .code:n =
- \cs_set_eq:NN \__chemmacros_nmr_position:n #1 ,
- parse .bool_set:N = \l__chemmacros_nmr_parse_bool ,
- delta .code:n =
- \tl_set:Nn \l__chemmacros_nmr_delta_tl {\,#1} ,
- list .bool_set:N = \l__chemmacros_nmr_list_bool ,
- list .default:n = true ,
- list-setup .tl_set:N = \l__chemmacros_nmr_list_setup_tl ,
- use-equal .bool_set:N = \l__chemmacros_nmr_use_equal_bool ,
- use-equal .default:n = true
- }
-
-\cs_new_protected:Npn \chemmacros_define_nmr:Nn #1#2
- {
- \cs_if_exist:NTF #1
- {
- \RenewDocumentCommand #1 {s}
- { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
- }
- {
- \NewDocumentCommand #1 {s}
- { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
- }
- }
-
-\NewChemMacroset {NMR} {mm}
- { \chemmacros_define_nmr:Nn #1 {#2} }
-
-\NewDocumentCommand \NMR { sG{}D(){}O{} }
- {
- \IfBooleanTF {#1}
- { \chemmacros_nmr:nnnn {*} {#2} {#3} {#4} }
- { \chemmacros_nmr:nnnn { } {#2} {#3} {#4} }
- }
-
-\AtBeginDocument
- {
- % \NMR{<num>,<elem>}(<num>,<unit>)[<solvent>] ALL arguments are optional
- % \NMR* same but without ": $\delta$" at end
- \cs_new_protected:Npn \chemmacros_nmr:nnnn #1#2#3#4
- {
- \bool_if:NT \l__chemmacros_nmr_list_bool { \item \scan_stop: }
- \group_begin:
- \mode_leave_vertical:
- \bool_set_false:N \l__chemmacros_nmr_frequency_bool
- \bool_set_false:N \l__chemmacros_nmr_solvent_bool
- \tl_if_empty:nF {#3}
- { \bool_set_true:N \l__chemmacros_nmr_frequency_bool }
- \tl_if_empty:nF {#4}
- { \bool_set_true:N \l__chemmacros_nmr_solvent_bool }
- \bool_lazy_or:nnT
- { \l__chemmacros_nmr_frequency_bool }
- { \l__chemmacros_nmr_solvent_bool }
- { \bool_set_true:N \l__chemmacros_nmr_delimiters_bool }
- \bool_lazy_and:nnT
- { \l__chemmacros_nmr_frequency_bool }
- { \l__chemmacros_nmr_solvent_bool }
- { \bool_set_true:N \l__chemmacros_nmr_comma_bool }
- \tl_if_empty:nTF {#2}
- {
- \__chemmacros_nmr_nucleus:VV
- \l__chemmacros_nmr_isotope_default_tl
- \l__chemmacros_nmr_element_default_tl
- }
- { \__chemmacros_nmr_nucleus:w #2 \q_stop }
- \mode_if_math:TF
- {
- \text
- {
- \group_begin:
- \tl_use:N \l__chemmacros_nmr_format_tl
- \__chemmacros_nmr_base:VV
- \g__chemmacros_nmr_isotope_tl
- \g__chemmacros_nmr_element_tl
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- { ~ ( }
- \bool_if:NT \l__chemmacros_nmr_frequency_bool
- { \__chemmacros_nmr_frequency:n {#3} }
- \bool_if:NT \l__chemmacros_nmr_comma_bool
- { , ~ }
- \bool_if:NT \l__chemmacros_nmr_solvent_bool
- { \chemmacros_chemformula:n {#4} }
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- { ) }
- \tl_if_blank:nT {#1} {:~}
- \group_end:
- }
- \tl_if_blank:nT {#1}
- {
- \delta
- \text { \l__chemmacros_nmr_delta_tl }
- \bool_if:NT \l__chemmacros_nmr_use_equal_bool {=}
- }
- }
- {
- \group_begin:
- \tl_use:N \l__chemmacros_nmr_format_tl
- \__chemmacros_nmr_base:VV
- \g__chemmacros_nmr_isotope_tl
- \g__chemmacros_nmr_element_tl
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- {~(}
- \bool_if:NT \l__chemmacros_nmr_frequency_bool
- { \__chemmacros_nmr_frequency:n {#3} }
- \bool_if:NT \l__chemmacros_nmr_comma_bool
- {,~}
- \bool_if:NT \l__chemmacros_nmr_solvent_bool
- {
- \bool_if:NTF \l__chemmacros_nmr_parse_bool
- { \chemmacros_chemformula:n {#4} }
- {#4}
- }
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- {)}
- \tl_if_blank:nT {#1} {:}
- \group_end:
- \tl_if_blank:nT {#1}
- {
- \tl_use:N \c_space_tl
- \c_math_toggle_token
- \delta
- \c_math_toggle_token
- \l__chemmacros_nmr_delta_tl
- \bool_if:NT \l__chemmacros_nmr_use_equal_bool {~=}
- }
- }
- \group_end:
- }
- }
-
-\NewDocumentCommand \chemmacros_data:w { smo }
- {
- \bool_if:NT \l__chemmacros_nmr_list_bool { \item }
- {
- \tl_use:N \l__chemmacros_nmr_format_tl #2
- \IfNoValueF {#3} { ~ ( #3 ) }
- \IfBooleanT {#1} { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { : } }
- }
- \IfBooleanF {#1} { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { ~ = } }
- }
-
-\cs_new_protected:Npn \chemmacros_val:n #1
- {
- \tl_if_in:nnTF {#1} {--}
- { \chemmacros_val_aux:w #1 \q_nil }
- { \num {#1} }
- }
-
-\cs_new_protected:Npn \chemmacros_val_aux:w #1--#2 \q_nil
- { \numrange {#1} {#2} }
-
-\NewDocumentEnvironment {experimental} {o}
- {
- \group_begin:
- \IfNoValueF {#1} { \chemmacros_set_keys:nn {spectroscopy} {#1} }
- \bool_set_true:N \l__chemmacros_nmr_inner_bool
- \cs_set_eq:NN \# \chemmacros_nmr_number:n
- \cs_set_eq:NN \pos \chemmacros_nmr_position:n
- \cs_set_eq:NN \J \chemmacros_nmr_coupling:w
- \cs_set_eq:NN \data \chemmacros_data:w
- \cs_set_eq:NN \val \chemmacros_val:n
- \bool_if:NT \l__chemmacros_nmr_list_bool
- { \list {} { \l__chemmacros_nmr_list_setup_tl } }
- }
- {
- \bool_if:NT \l__chemmacros_nmr_list_bool
- { \endlist }
- \group_end:
- \chemmacros_ignore_spaces:
- }
-
-\cs_new_protected:Npn \chemmacros_nmr_number:n #1
- {
- \__chemmacros_nmr_number:n {#1}
- \chemmacros_if_compatibility:nnTF {>=} {5.8c}
- { \chemmacros_skip_nobreak:N }
- { \skip_horizontal:N }
- \l__chemmacros_nmr_space_skip
- \chemmacros_chemformula:V \g__chemmacros_nmr_element_tl
- }
-
-\cs_new_protected:Npn \chemmacros_nmr_position:n #1
- {
- \chemmacros_chemformula:x
- {
- \exp_not:V \g__chemmacros_nmr_element_tl
- \bool_if:NF \l__chemmacros_nmr_position_side_bool
- {
- \exp_not:V \l__chemmacros_nmr_position_tl
- \exp_not:n { _{#1} }
- }
- }
- \bool_if:NT \l__chemmacros_nmr_position_side_bool
- {
- \tl_use:N \l__chemmacros_nmr_position_tl
- \__chemmacros_nmr_position:n {#1}
- }
- }
-
-\cs_new_protected:Npn \chemmacros_nmr_coupling:w
- {
- \tl_clear:N \l__chemmacros_nmr_coupling_nuclei_tl
- \tl_clear:N \l__chemmacros_nmr_coupling_bonds_tl
- \peek_meaning:NTF (
- { \__chemmacros_nmr_coupling:w }
- { \__chemmacros_nmr_coupling_aux_i:w }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling:w (#1;#2)
- {
- \tl_set:Nn \l__chemmacros_nmr_coupling_bonds_tl
- {
- \l__chemmacros_nmr_coupling_bonds_pre_tl
- #1
- \l__chemmacros_nmr_coupling_bonds_post_tl
- }
- \bool_if:NTF \l__chemmacros_nmr_coupling_nuclei_sub_bool
- {
- \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
- {
- \c_math_subscript_token
- {
- \l__chemmacros_nmr_coupling_nuclei_pre_tl
- \chemmacros_chemformula:n {#2}
- \l__chemmacros_nmr_coupling_nuclei_post_tl
- }
- }
- }
- {
- \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
- {
- \l__chemmacros_nmr_coupling_nuclei_pre_tl
- \chemmacros_chemformula:n {#2}
- \l__chemmacros_nmr_coupling_nuclei_post_tl
- }
- }
- \__chemmacros_nmr_coupling_aux_i:w
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_i:w
- {
- \peek_meaning:NTF [
- { \__chemmacros_nmr_coupling_aux_ii:w }
- { \__chemmacros_nmr_coupling_aux_iii:n }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_ii:w [#1]#2
- {
- \group_begin:
- \sisetup
- {
- list-final-separator={,~},
- list-pair-separator={,~},
- list-units=single
- }
- \c_math_toggle_token
- ^{ \l__chemmacros_nmr_coupling_bonds_tl }
- \l__chemmacros_nmr_coupling_symbol_tl
- \l__chemmacros_nmr_coupling_nuclei_tl = \SIlist {#2} {#1}
- \c_math_toggle_token
- \group_end:
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_iii:n #1
- {
- \group_begin:
- \sisetup
- {
- list-final-separator={,~},
- list-pair-separator={,~},
- list-units=single
- }
- \c_math_toggle_token
- ^{ \l__chemmacros_nmr_coupling_bonds_tl }
- \l__chemmacros_nmr_coupling_symbol_tl
- \l__chemmacros_nmr_coupling_nuclei_tl
- = \exp_args:Nno \SIlist {#1} { \l__chemmacros_nmr_coupling_unit_tl }
- \c_math_toggle_token
- \group_end:
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-2015/12/31 - new option `atom-number-space'
-2017/01/27 - new option `nmr-base-format'
-2020/02/02 - lazy boolean evaluation
-2020/11/21 - fix issue #34
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.symbols.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.symbols.code.tex
deleted file mode 100644
index 9f2ab0b368..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.symbols.code.tex
+++ /dev/null
@@ -1,89 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `symbols'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{symbols}{2015/06/09 symbols}
-
-\RequirePackage{amstext}
-
-% ---------------------------------------------------------------------------
-% transition state symbol
-\cs_new_protected:Npn \__chemmacros_transition_state:
- {
- \text
- {
- \skip_horizontal:n { .1ex }
- \hbox_overlap_right:n
- { \rule { .6ex } { 0pt } \rule { .05ex } { 1.3ex } }
- \hbox_overlap_right:n { \rule [ .4ex ] { 1.3ex } { .05ex } }
- \rule [ .85ex ] { 1.3ex } { .05ex }
- \skip_horizontal:n { .1ex }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_transition_state:
- {
- \ensuremath
- {
- \mathchoice
- { \displaystyle }
- { \textstyle }
- { \scriptstyle }
- { \scriptscriptstyle }
- \__chemmacros_transition_state:
- }
- }
-
-% \DeclareDocumentCommand?
-\cs_new_eq:NN \transitionstatesymbol \chemmacros_transition_state:
-
-% \standardstate as defined by the chemstyle package. Thanks to Joseph Wright
-% the `chemstyle' provides it with \providecommand so it doesn't matter which
-% package defines it first
-\ProvideDocumentCommand \standardstate {}
- { { \ensuremath { \chemmacros_standardstate: } } }
-
-\cs_new_protected:Npn \chemmacros_standardstate:
- { \mathpalette \chemmacros_standardstate_aux: \circ }
-
-\cs_new_protected:Npn \chemmacros_standardstate_aux: #1#2
- {
- \ooalign
- {
- \tex_hfil:D
- \c_math_toggle_token #1- \c_math_toggle_token
- \tex_hfil:D
- \tex_cr:D
- \tex_hfil:D
- \c_math_toggle_token #1#2 \c_math_toggle_token
- \tex_hfil:D
- \tex_cr:D
- }
- }
-
-\cs_new_protected:Npn \changestate { \ensuremath { \mathop{} \! \chemDelta } }
-
-% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.thermodynamics.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.thermodynamics.code.tex
deleted file mode 100644
index 4b4ddc6e63..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.thermodynamics.code.tex
+++ /dev/null
@@ -1,147 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `thermodynamics'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{thermodynamics}{2015/06/09 thermodynamics}
-
-\RequirePackage {siunitx}
-
-\tl_new:N \l__chemmacros_state_pre_tl
-\tl_new:N \l__chemmacros_state_post_tl
-\tl_new:N \l__chemmacros_state_sp_left_tl
-\tl_new:N \l__chemmacros_state_sb_left_tl
-\tl_new:N \l__chemmacros_state_sp_right_tl
-\tl_new:N \l__chemmacros_state_sb_right_tl
-\tl_new:N \l__chemmacros_state_sb_pos_tl
-\tl_new:N \l__chemmacros_state_symbol_tl
-\tl_new:N \l__chemmacros_state_unit_tl
-
-\tl_set:Nn \l__chemmacros_state_pre_tl { \changestate }
-\tl_set:Nn \l__chemmacros_state_sp_right_tl { \standardstate }
-\tl_set:Nn \l__chemmacros_state_sb_pos_tl {left}
-
-\chemmacros_define_keys:nn {thermodynamics}
- {
- pre .tl_set:N = \l__chemmacros_state_pre_tl ,
- post .tl_set:N = \l__chemmacros_state_post_tl ,
- superscript-left .tl_set:N = \l__chemmacros_state_sp_left_tl ,
- superscript-right .tl_set:N = \l__chemmacros_state_sp_right_tl ,
- superscript .meta:n = { superscript-right = #1 } ,
- subscript-left .tl_set:N = \l__chemmacros_state_sb_left_tl ,
- subscript-right .tl_set:N = \l__chemmacros_state_sb_right_tl ,
- subscript .meta:n = { subscript-left = #1 } ,
- unit .tl_set:N = \l__chemmacros_state_unit_tl ,
- unit .groups:n = {variables}
- }
-
-\cs_new_protected:Npn \chemmacros_state:nn #1#2
- {
- % pre (\Delta)
- % post
- % superscript-left
- % superscript-right (\standardstate)
- % subscript-left
- % subscript-right
- \group_begin:
- \chemmacros_set_keys:nn {thermodynamics} {#1}
- \ensuremath
- {
- \chemmacros_text:V \l__chemmacros_state_pre_tl
- \c_math_superscript_token
- { \chemmacros_text:V \l__chemmacros_state_sp_left_tl }
- \c_math_subscript_token
- { \chemmacros_text:V \l__chemmacros_state_sb_left_tl }
- #2
- \c_math_superscript_token
- { \chemmacros_text:V \l__chemmacros_state_sp_right_tl }
- \c_math_subscript_token
- { \chemmacros_text:V \l__chemmacros_state_sb_right_tl }
- \chemmacros_text:V \l__chemmacros_state_post_tl
- }
- \group_end:
- }
-\cs_generate_variant:Nn \chemmacros_state:nn { nV }
-
-\DeclareDocumentCommand \state { O{}m }
- { \chemmacros_state:nn {#1} {#2} }
-
-\cs_new_protected:Npn \chemmacros_declare_state:Nn #1#2
- {
- \chemmacros_define_keys:xn
- {thermodynamics/\chemmacros_remove_backslash:N #1}
- {
- pre .meta:nn = {chemmacros/thermodynamics} { pre = ##1 } ,
- post .meta:nn = {chemmacros/thermodynamics} { post = ##1 } ,
- superscript-left .meta:nn = {chemmacros/thermodynamics} { superscript-left = ##1 } ,
- superscript-right .meta:nn = {chemmacros/thermodynamics} { superscript-right = ##1 } ,
- superscript .meta:n = { superscript-right = ##1 } ,
- subscript-left .meta:nn = {chemmacros/thermodynamics} { subscript-left = ##1 } ,
- subscript-right .meta:nn = {chemmacros/thermodynamics} { subscript-right = ##1 } ,
- subscript .meta:n = { subscript-left = ##1 } ,
- subscript-pos .choices:nn =
- { left , right }
- { \tl_set_eq:NN \l__chemmacros_state_sb_pos_tl \l_keys_choice_tl } ,
- symbol .tl_set:N = \l__chemmacros_state_symbol_tl ,
- unit .tl_set:N = \l__chemmacros_state_unit_tl
- }
- \DeclareDocumentCommand #1 { sO{}D(){}m }
- {
- \group_begin:
- \chemmacros_set_keys:xn
- {thermodynamics/\chemmacros_remove_backslash:N #1}
- {#2}
- \tl_if_blank:nF {##3}
- {
- \chemmacros_set_keys:nx {thermodynamics}
- { subscript-\l__chemmacros_state_sb_pos_tl = \exp_not:n {##3} }
- }
- \ensuremath
- {
- \chemmacros_state:nV {##2} \l__chemmacros_state_symbol_tl
- \chemmacros_set_keys_groups:nnn {thermodynamics} {variables} {##2}
- \IfBooleanF {##1} { = \SI {##4} { \l__chemmacros_state_unit_tl } }
- }
- \group_end:
- }
- }
-
-\NewChemMacroset {State} {mm}
- { \chemmacros_declare_state:Nn #1 {#2} }
-
-% --------------------------------------------------------------------------
-% predefined:
-\NewChemState \enthalpy { symbol = H , unit = \kilo\joule\per\mole }
-\NewChemState \entropy { symbol = S , unit = \joule\per\kelvin\per\mole , pre = }
-\NewChemState \gibbs { symbol = G , unit = \kilo\joule\per\mole }
-
-\ChemCompatibilityTo{5.3}
- \DeclareChemDeprecated \State \state
- \DeclareChemDeprecated \Enthalpy \enthalpy
- \DeclareChemDeprecated \Entropy \entropy
- \DeclareChemDeprecated \Gibbs \gibbs
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.tikz.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.tikz.code.tex
deleted file mode 100644
index 660107e52c..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.tikz.code.tex
+++ /dev/null
@@ -1,187 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `tikz'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule*{tikz}{2015/10/26 upright greek symbols}
-
-\RequirePackage{tikz}
-\usetikzlibrary{calc,decorations.pathmorphing}
-
-\ExplSyntaxOn
-
-\tl_const:Nx \c_chemmacros_other_colon_tl { \token_to_str:N : }
-
-% --------------------------------------------------------------------------
-% TikZ drawings - helper macros
-\cs_new_protected:Npn \chemmacros_tikz_picture:nn #1#2
- { \tikzpicture[{#1}] #2 \endtikzpicture }
-\cs_new_protected:Npn \chemmacros_tikz:nn #1#2 { \tikz[{#1}] {#2} }
-\cs_new_protected:Npn \chemmacros_tikz_draw:n #1 { \draw[{#1}] }
-\cs_new_protected:Npn \chemmacros_tikz_node:n #1 { \node[{#1}] }
-\cs_new_protected:Npn \chemmacros_tikz_shade:n #1 { \shade[{#1}] }
-\cs_new_protected:Npn \chemmacros_tikz_shadedraw:n #1 { \shadedraw[{#1}] }
-\cs_new_protected:Npn \chemmacros_tikz_node_in_draw:n #1 { node[{#1}] }
-
-\cs_generate_variant:Nn \chemmacros_tikz_picture:nn { xn }
-\cs_generate_variant:Nn \chemmacros_tikz_draw:n { x }
-\cs_generate_variant:Nn \chemmacros_tikz_node:n { x }
-\cs_generate_variant:Nn \chemmacros_tikz_shade:n { x }
-\cs_generate_variant:Nn \chemmacros_tikz_shadedraw:n { x }
-\cs_generate_variant:Nn \chemmacros_tikz_node_in_draw:n { x }
-
-% --------------------------------------------------------------------------
-% arrow tips for electron movement
-\dim_new:N \l__chemmacros_el_length_dim
-
-% full tip for pairs
-\pgfarrowsdeclare { el } { el }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
- }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \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
- { -\l__chemmacros_el_length_dim }
- { -.3\l__chemmacros_el_length_dim }
- }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
- \pgfusepathqfillstroke
- }
-
-% half tip on the left
-\pgfarrowsdeclare { left~el } { left~el }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
- }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \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 } }
- \pgfusepathqfillstroke
- }
-
-% half tip in the right
-\pgfarrowsdeclare { right~el } { right~el }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
- }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \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 } }
- \pgfusepathqfillstroke
- }
-% --------------------------------------------------------------------------
-% http://tex.stackexchange.com/a/25689/
-\ChemCompatibilityFrom{5.3}
-\pgfdeclaredecoration{wave}{initial}{
- \state{initial}[
- width = +0pt ,
- next~ state = sine,
- persistent~ precomputation = {
- \pgfmathsetmacro\matchinglength{
- \pgfdecoratedinputsegmentlength /
- int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)
- }
- \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
- }
- ]{}
- \state{sine}[width=\pgfdecorationsegmentlength]{
- \pgfpathsine{
- \pgfpoint
- {0.25\pgfdecorationsegmentlength}
- {0.5\pgfdecorationsegmentamplitude}
- }
- \pgfpathcosine{
- \pgfpoint
- {0.25\pgfdecorationsegmentlength}
- {-0.5\pgfdecorationsegmentamplitude}
- }
- \pgfpathsine{
- \pgfpoint
- {0.25\pgfdecorationsegmentlength}
- {-0.5\pgfdecorationsegmentamplitude}
- }
- \pgfpathcosine{
- \pgfpoint
- {0.25\pgfdecorationsegmentlength}
- {0.5\pgfdecorationsegmentamplitude}
- }
- }
- \state{final}{}
-}
-\EndChemCompatibility
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/10/26 - add decoration `wave' (complete sines)
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.units.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.units.code.tex
deleted file mode 100644
index 404cdbdc4d..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.units.code.tex
+++ /dev/null
@@ -1,68 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `units'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{units}{2020/02/02 chemical units}
-
-\RequirePackage{siunitx}
-
-% --------------------------------------------------------------------------
-\DeclareSIUnit \atm {atm}
-\DeclareSIUnit \atmosphere {atm}
-\DeclareSIUnit \calory {cal}
-\DeclareSIUnit \cal {cal}
-\DeclareSIUnit \moLar {\mole\per\liter}
-\DeclareSIUnit \MolMass {\gram\per\mole}
-\DeclareSIUnit \normal {\textsc{n}}
-
-\ChemCompatibilityTo{5.8g}
- \DeclareSIUnit \torr {torr}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.8h}
- \DeclareSIUnit \Torr {Torr}
-\EndChemCompatibility
-
-\ChemCompatibilityFrom{5.10}
- \DeclareSIUnit \torr {Torr}
-\EndChemCompatibility
-
-\AtEndPreamble
- {
- \chemmacros_if_package_loaded:nF {chemstyle}
- {
- \DeclareSIUnit {\cmc } {\cubic\centi\metre}
- \DeclareSIUnit {\molar} {\mole\per\cubic\deci\metre}
- \DeclareSIUnit {\Molar} {\textsc{m}}
- }
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-2015/09/28 - change \AtBeginDocument into \AtEndPreamble
-2019/11/07 - correction torr -> Torr
-
diff --git a/macros/latex/contrib/chemmacros/chemmacros.module.xfrac.code.tex b/macros/latex/contrib/chemmacros/chemmacros.module.xfrac.code.tex
deleted file mode 100644
index 656c03426b..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros.module.xfrac.code.tex
+++ /dev/null
@@ -1,137 +0,0 @@
-% --------------------------------------------------------------------------
-%
-% the CHEMMACROS package -- module: `xfrac'
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\ChemModule{xfrac}{2015/07/22 use xfrac package with chemmacros}
-
-\RequirePackage{xfrac}
-
-% --------------------------------------------------------------------------
-
-% #1: type
-% #2: numerator
-% #3: denominator
-\cs_new_protected:Npn \chemmacros_frac:nnn #1#2#3
- {
- \IfInstanceExistTF {xfrac} {chemmacros-frac-\f@family-#1}
- { \sfrac [chemmacros-frac-\f@family-#1] {#2} {#3} }
- { \sfrac [chemmacros-frac-default-#1]{#2} {#3} }
- }
-
-\NewDocumentCommand \chemfrac {O{text}mm}
- { \chemmacros_frac:nnn {#1} {#2} {#3} }
-
-% --------------------------------------------------------------------------
-
-% default:
-\DeclareInstance {xfrac} {chemmacros-frac-cmr-superscript} {text}
- {
- numerator-top-sep = -.1ex ,
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = cmr
- }
-
-\DeclareInstance {xfrac} {chemmacros-frac-cmr-text} {text}
- {
- numerator-top-sep = 0ex ,
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = cmr
- }
-
-% computer modern (same as default):
-\DeclareInstance {xfrac} {chemmacros-frac-cmr-superscript} {text}
- {
- numerator-top-sep = -.1ex ,
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = cmr
- }
-
-\DeclareInstance {xfrac} {chemmacros-frac-cmr-text} {text}
- {
- numerator-top-sep = 0ex ,
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = cmr
- }
-
-% Linux Libertine T lining:
-\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TLF-text} {text}
- {
- numerator-top-sep = 0ex ,
- slash-left-kern = 0em ,
- slash-right-kern = .05em ,
- slash-symbol-font = LinuxLibertineT-TLF
- }
-
-\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TLF-superscript} {text}
- {
- scale-factor = 1.2 ,
- denominator-bot-sep = -.1ex ,
- numerator-top-sep = -.1ex ,
- slash-left-kern = .1em ,
- slash-right-kern = .1em ,
- slash-symbol-font = LinuxLibertineT-TLF
- }
-
-% Linux Libertine T oldstyle:
-\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TOsF-text} {text}
- {
- denominator-bot-sep = .1ex ,
- numerator-top-sep = -.2ex ,
- slash-left-kern = 0em ,
- slash-right-kern = 0em ,
- slash-symbol-font = LinuxLibertineT-TOsF
- }
-
-\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TOsF-superscript} {text}
- {
- scale-factor = 1.2 ,
- denominator-bot-sep = -.1ex ,
- numerator-top-sep = -.2ex ,
- slash-left-kern = 0em ,
- slash-right-kern = .1em ,
- slash-symbol-font = LinuxLibertineT-TOsF
- }
-
-% lmodern:
-\DeclareInstance {xfrac} {chemmacros-frac-lmr-superscript} {text}
- {
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = lmr
- }
-
-\DeclareInstance {xfrac} {chemmacros-frac-lmr-text} {text}
- {
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = lmr
- }
-
-% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/chemmacros/chemmacros.sty b/macros/latex/contrib/chemmacros/chemmacros.sty
index e56c628476..5fcbd0a318 100644
--- a/macros/latex/contrib/chemmacros/chemmacros.sty
+++ b/macros/latex/contrib/chemmacros/chemmacros.sty
@@ -12,29 +12,29 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3c
+% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2008/05/04 or later.
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\RequirePackage{expl3,xparse,l3keys2e}
+\RequirePackage{l3keys2e}
\ExplSyntaxOn
% --------------------------------------------------------------------------
% package information:
-\tl_const:Nn \c_chemmacros_date_tl {2020/11/21}
-\tl_const:Nn \c_chemmacros_version_major_number_tl {5}
-\tl_const:Nn \c_chemmacros_version_minor_number_tl {11}
-\tl_const:Nn \c_chemmacros_version_subrelease_tl {a}
+\tl_const:Nn \c_chemmacros_date_tl {2022/01/16}
+\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 {}
\tl_const:Nx \c_chemmacros_version_number_tl
{
\c_chemmacros_version_major_number_tl .
@@ -55,218 +55,6730 @@
{\c_chemmacros_info_tl \c_space_tl (CN)}
% --------------------------------------------------------------------------
-% set compatibility
-\tl_new:N \l__chemmacros_compatibility_version_tl
-\tl_set_eq:NN \l__chemmacros_compatibility_version_tl \c_chemmacros_version_tl
+% variants of kernel functions:
+\cs_generate_variant:Nn \tl_if_eq:nnTF {x,xx,V}
+\cs_generate_variant:Nn \tl_replace_once:Nnn {NnV}
+\cs_generate_variant:Nn \tl_tail:n {e}
-\keys_define:nn {chemmacros/compatibility}
+\cs_generate_variant:Nn \seq_set_split:Nnn {Nnx}
+\cs_generate_variant:Nn \seq_item:Nn {cV,NV}
+\cs_generate_variant:Nn \seq_put_right:Nn {Ne}
+
+\cs_generate_variant:Nn \prop_item:Nn {NV}
+\cs_generate_variant:Nn \prop_gput:Nnn {cxx,NVf}
+
+\cs_generate_variant:Nn \int_to_arabic:n {V}
+
+\cs_generate_variant:Nn \msg_error:nnnnn {nnnx}
+\cs_generate_variant:Nn \msg_error:nnnn {nnnx}
+\cs_generate_variant:Nn \msg_error:nnn {nnV}
+\cs_generate_variant:Nn \msg_warning:nnn {nnV}
+\cs_generate_variant:Nn \msg_warning:nnnn {nnV}
+\cs_generate_variant:Nn \msg_show:nnnn {nnnV}
+
+\cs_generate_variant:Nn \vbox_set:Nn {NV}
+
+\cs_generate_variant:Nn \keys_define:nn {x}
+\cs_generate_variant:Nn \keys_set:nn {x,nx}
+
+\cs_generate_variant:Nn \str_if_eq:nnF {xx}
+
+% --------------------------------------------------------------------------
+% load-time messages:
+\msg_new:nnn {chemmacros} {load-time-option}
+ {
+ `#1'~ is~ a~ load-time~ option! \\
+ You~ cannot~ set~ it~ with~ \token_to_str:N \chemsetup ! \\
+ You~ need~ to~ use~ \token_to_str:N \usepackage [#1] {chemmacros} .
+ }
+
+\msg_new:nnn {chemmacros} {unknown-option}
+ {
+ Unknown~ option~ `#1' \\
+ I~ dont'~ know~ the~ option~ `#1'.~ Please~ make~ sure~ there~ is~ no~
+ typo.~ Check~ the~ manual~ for~ help.
+ }
+
+\msg_new:nnn {chemmacros} {module-mechanism}
+ {
+ The~ module~ mechanism~ has~ changed~ with~ v6! \\
+ ==== ======= ========== ==== ======== ===== === \\
+ *~ All~ modules~ have~ been~ integrated~ into~ \\
+ the~ main~ package~ and~ thus~ are~ preloaded~ \\
+ already~ (unless~ you~ have~ loaded~ \\
+ `chemmacros'~ with~ the~ `minimal'~ option). \\
+ *~ The~ new~ default~ corresponds~ to~ the~ \\
+ earlier~ setting~ `modules=all'.
+ \tl_if_blank:nF {#1}
+ { \\ The~ command~ \token_to_str:N #1 is~ deprecated. }
+ }
+
+\cs_new_protected:Npn \__chemmacros_loadtime_error:n #1
+ { \msg_error:nnV {chemmacros} {#1} \l_keys_key_str }
+
+\cs_new_protected:Npn \__chemmacros_loadtime_warning:n #1
+ { \msg_warning:nnV {chemmacros} {#1} \l_keys_key_str }
+
+\clist_new:N \l_chemmacros_modules_clist
+\clist_set:Nn \l_chemmacros_modules_clist
+ {
+ base, errorcheck, lang, greek, chemformula, 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,
+ particles, phases, nomenclature, tikz, isotopes, mechanisms, newman,
+ orbital, polymers, reactions, redox, xfrac, scheme, spectroscopy,
+ thermodynamics, units, reactants, translations
+ }
+
+\keys_define:nn {chemmacros/package-options}
+ {
+ minimal .bool_set:N = \l__chemmacros_minimal_bool ,
+ minimal .initial:n = false ,
+ modules .code:n =
+ \clist_if_in:NF \l_chemmacros_modules_clist
+ { \clist_put_right:Nn \l_chemmacros_modules_clist {#1} } ,
+ unknown .code:n = \__chemmacros_loadtime_warning:n {unknown-option}
+ }
+
+\ProcessKeysPackageOptions {chemmacros/package-options}
+
+\keys_define:nn {chemmacros}
+ {
+ minimal .code:n = \__chemmacros_loadtime_error:n {load-time-option} ,
+ 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}
+ }
+
+\NewDocumentCommand \usechemmodule {m}
+ { \msg_warning:nnn {chemmacros} {module-mechanism} {\usechemmodule} }
+
+\bool_if:NF \l__chemmacros_minimal_bool
+ {
+ \clist_set_eq:NN
+ \l_chemmacros_modules_clist
+ \c_chemmacros_all_modules_clist
+ }
+
+% --------------------------------------------------------------------------
+% temporary variables:
+\tl_new:N \l__chemmacros_tmpa_tl
+\tl_new:N \l__chemmacros_tmpb_tl
+\tl_new:N \l__chemmacros_tmpc_tl
+\tl_new:N \l__chemmacros_tmpd_tl
+
+\bool_new:N \l__chemmacros_tmpa_bool
+\bool_new:N \l__chemmacros_tmpb_bool
+\bool_new:N \l__chemmacros_tmpc_bool
+
+\dim_new:N \l__chemmacros_tmpa_dim
+\dim_new:N \l__chemmacros_tmpb_dim
+\dim_new:N \l__chemmacros_tmpc_dim
+
+\seq_new:N \l__chemmacros_tmpa_seq
+\seq_new:N \l__chemmacros_tmpb_seq
+\seq_new:N \l__chemmacros_tmpc_seq
+
+\int_new:N \l__chemmacros_tmpa_int
+\int_new:N \l__chemmacros_tmpb_int
+\int_new:N \l__chemmacros_tmpc_int
+
+\box_new:N \l__chemmacros_tmpa_box
+\box_new:N \l__chemmacros_tmpb_box
+\box_new:N \l__chemmacros_tmpc_box
+
+\clist_new:N \l__chemmacros_tmpa_clist
+\clist_new:N \l__chemmacros_tmpb_clist
+\clist_new:N \l__chemmacros_tmpc_clist
+
+\str_new:N \l__chemmacros_tmpa_str
+\str_new:N \l__chemmacros_tmpb_str
+\str_new:N \l__chemmacros_tmpc_str
+
+% ----------------------------------------------------------------------------
+% module mechanism:
+\msg_new:nnn {chemmacros} {module-missing}
+ {
+ You've~ requested~ the~ chemmacros~ module~ `#1'~ but~ it~ appears~ to~
+ be~ missing~ on~ your~ system.~ Maybe~ you've~ misspelled~ the~ name?~
+ Loading~ the~ module~ will~ abort~ \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {loading-module}
+ { Loading~ the~ chemmacros~ module~ `#1'~ ... }
+
+\msg_new:nnn {chemmacros} {wrong-module-name}
+ { The~ module~ file~ name~ is~ `#2'~ but~ it~ provides~ module~ `#1'. }
+
+\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.
+ }
+
+% ----------------------------------------------------------------------------
+\prg_new_conditional:Npnn \chemmacros_package_if_loaded:n #1 {p,T,F,TF}
+ {
+ \cs_if_exist:cTF {ver@#1.sty}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+% ----------------------------------------------------------------------------
+% 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_new:N \g__chemmacros_modules_loaded_tl
+
+\cs_new_protected:Npn \chemmacros_modules_load:n #1
+ { \clist_map_inline:nn {#1} { \chemmacros_module_load:n {##1} } }
+
+\cs_new_protected:Npn \chemmacros_module_load:n #1
+ {
+ \tl_set:Nx \l_tmpa_tl { \tl_trim_spaces:n {#1} }
+ \str_if_eq:VnTF \l_tmpa_tl {modules}
+ { \msg_error:nn {chemmacros} {forbidden-module} }
+ { \__chemmacros_module_load:V \l_tmpa_tl }
+ }
+
+\cs_new_protected:Npn \__chemmacros_module_load:n #1
+ {
+ \chemmacros_module_if_loaded:nF {#1}
+ {
+ \chemmacros_module_if_exist:nTF {#1}
+ {
+ \__chemmacros_module_hook_use:nn {#1} {before}
+ \msg_info:nnn {chemmacros} {loading-module} {#1}
+ \@onefilewithoptions
+ {\c__chemmacros_module_prefix_tl.#1}[][]
+ \c__chemmacros_module_extension_tl
+ \__chemmacros_module_hook_use:nn {#1} {after}
+ }
+ { \msg_error:nnn {chemmacros} {module-missing} {#1} }
+ }
+ }
+\cs_generate_variant:Nn \__chemmacros_module_load:n {V}
+
+\prg_new_conditional:Npnn \chemmacros_module_if_loaded:n #1 {p,T,F,TF}
+ {
+ \tl_if_in:NnTF \g__chemmacros_modules_loaded_tl {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+\prg_new_conditional:Npnn \chemmacros_module_if_exist:n #1 {p,T,F,TF}
+ {
+ \file_if_exist:nTF
+ {\c__chemmacros_module_prefix_tl.#1.\c__chemmacros_module_extension_tl}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+% --------------------------------------------------------------------------
+% module hooks:
+% #1: module
+% #2: code
+\cs_new_protected:Npn \chemmacros_module_after:nn #1#2
+ {
+ \chemmacros_module_if_loaded:nTF {#1}
+ {#2}
+ { \__chemmacros_add_to_module_hook:nnn {#1} {after} {#2} }
+ }
+
+% #1: module
+% #2: code
+\cs_new_protected:Npn \chemmacros_module_before:nn #1#2
+ {
+ % TODO: error in T case?
+ \chemmacros_module_if_loaded:nF {#1}
+ { \__chemmacros_add_to_module_hook:nnn {#1} {before} {#2} }
+ }
+
+% #1: module
+% #2: hook name
+% #3: code
+\cs_new_protected:Npn \__chemmacros_add_to_module_hook:nnn #1#2#3
+ {
+ \chemmacros_module_if_loaded:nF {#1}
+ {
+ \tl_if_exist:cF {g__chemmacros_module_hook_#1_#2_tl}
+ { \tl_new:c {g__chemmacros_module_hook_#1_#2_tl} }
+ \tl_gput_right:cn {g__chemmacros_module_hook_#1_#2_tl} {#3}
+ }
+ }
+
+% #1: module
+% #2: hook name
+\cs_new_protected:Npn \__chemmacros_module_hook_use:nn #1#2
+ {
+ \tl_if_exist:cT {g__chemmacros_module_hook_#1_#2_tl}
+ {
+ \tl_use:c {g__chemmacros_module_hook_#1_#2_tl}
+ \tl_gclear:c {g__chemmacros_module_hook_#1_#2_tl}
+ }
+ }
+\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
+ {
+ \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}
+ {\@currname.\@currext}
+ {
+ \msg_error:nnnxx {chemmacros} {wrong-module-name}
+ {#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)
+ ]
+ }
+
+% --------------------------------------------------------------------------
+% 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
+\cs_new_protected:Npn \ChemModule #1#2
+ {
+ \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}
+ \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}
+ }
+
+\cs_new_protected:Npn \ChemModuleEnd
+ { \__chemmacros_module_hook_use:Vn \g_chemmacros_module_tl {after} }
+
+\cs_new_protected:Npn \__chemmacros_gobble_module:w #1 \ChemModuleEnd {}
+
+\clist_map_inline:Nn \c_chemmacros_all_modules_clist
+ {
+ \clist_if_in:NnF \l_chemmacros_modules_clist {#1}
+ { \chemmacros_stop_module:n {#1} }
+ }
+
+% --------------------------------------------------------------------------
+\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
+ {
+ \cs_set_protected:Npn #1
+ { \msg_warning:nnnn {chemmacros} {command-deprecated} {#1} {#2} #2 }
+ }
+
+\NewDocumentCommand \DeclareChemDeprecated {mm}
+ { \chemmacros_define_deprecated:NN #1 #2 }
+
+% --------------------------------------------------------------------------
+% define a macro set:
+% \NewChem... \RenewChem... \DeclareChem... \ProvideChem...
+% #1: macro names
+% #2: arg spec
+% #3: internal command call
+\cs_new_protected:Npn \chemmacros_new_macroset:nnn #1#2#3
+ {
+ \exp_args:Nc \NewDocumentCommand
+ {
+ NewChem
+ \str_uppercase:f { \tl_head:n {#1} }
+ \tl_tail:n {#1}
+ }
+ {#2}
+ {
+ \cs_if_free:NTF ##1
+ { #3 }
+ { \msg_error:nnn {chemmacros} {new-#1} {##1} }
+ }
+ \exp_args:Nc \NewDocumentCommand
+ {
+ RenewChem
+ \str_uppercase:f { \tl_head:n {#1} }
+ \tl_tail:n {#1}
+ }
+ {#2}
+ {
+ \cs_if_free:NTF ##1
+ { \msg_error:nnn {chemmacros} {renew-#1} {##1} }
+ { #3 }
+ }
+ \exp_args:Nc \NewDocumentCommand
+ {
+ DeclareChem
+ \str_uppercase:f { \tl_head:n {#1} }
+ \tl_tail:n {#1}
+ }
+ {#2}
+ {#3}
+ \exp_args:Nc \NewDocumentCommand
+ {
+ ProvideChem
+ \str_uppercase:f { \tl_head:n {#1} }
+ \tl_tail:n {#1}
+ }
+ {#2}
+ { \cs_if_free:NT ##1 { #3 } }
+ \msg_new:nnn {chemmacros} {new-#1}
+ {
+ You've~ tried~ to~ define~ a~ #1~ with~ \token_to_str:N
+ \NewChem #1 ,~ but~ the~ command~ sequence~ \token_to_str:N ##1
+ \c_space_tl already~ exists.~ Please~ choose~ another~ name.
+ }
+ \msg_new:nnn {chemmacros} {renew-#1}
+ {
+ You've~ tried~ to~ renew~ the~ #1~ \token_to_str:N ##1 ,~ but~
+ it~ doesn't~ exist.
+ }
+ }
+
+\cs_new_protected:Npn \chemmacros_new_environment_macroset:nnn #1#2#3
+ {
+ \exp_args:Nc \NewDocumentCommand {NewChem#1} {#2}
+ {
+ \bool_lazy_and:nnTF
+ { \cs_if_free_p:c {##1} }
+ { \cs_if_free_p:c {end##1} }
+ {#3}
+ { \msg_error:nnn {chemmacros} {new-#1} {##1} }
+ }
+ \exp_args:Nc \NewDocumentCommand {RenewChem#1} {#2}
+ {
+ \bool_lazy_or:nnTF
+ { \cs_if_free_p:c {##1} }
+ { \cs_if_free_p:c {end##1} }
+ { \msg_error:nnn {chemmacros} {renew-#1} {##1} }
+ {#3}
+ }
+ \exp_args:Nc \NewDocumentCommand {DeclareChem#1} {#2} {#3}
+ \exp_args:Nc \NewDocumentCommand {ProvideChem#1} {#2}
+ {
+ \bool_lazy_and:nT
+ { \cs_if_free_p:c {##1} }
+ { \cs_if_free_p:c {end##1} }
+ {#3}
+ }
+ \msg_new:nnn {chemmacros} {new-#1}
+ {
+ You've~ tried~ to~ define~ a~ #1~ with~ \token_to_str:N
+ \NewChem #1 ,~ but~ the~ command~ sequence~ \exp_not:c {##1}
+ \c_space_tl already~ exists.~ Please~ choose~ another~ name.
+ }
+ \msg_new:nnn {chemmacros} {renew-#1}
+ { You've~ tried~ to~ renew~ the~ #1~ ##1,~ but~ it~ doesn't~ exist. }
+ }
+
+\NewDocumentCommand \NewChemMacroset {smmm}
+ {
+ \IfBooleanTF {#1}
+ { \chemmacros_new_environment_macroset:nnn {#2} {#3} {#4} }
+ { \chemmacros_new_macroset:nnn {#2} {#3} {#4} }
+ }
+
+% --------------------------------------------------------------------------
+\cs_new_protected:Npn \chemmacros_define_keys:nn #1#2
+ { \keys_define:nn {chemmacros/#1} {#2} }
+\cs_generate_variant:Nn \chemmacros_define_keys:nn {x}
+
+\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_new_protected:Npn \chemmacros_set_keys_groups:nnn #1#2#3
+ { \keys_set_groups:nnn {chemmacros/#1} {#2} {#3} }
+
+\cs_new_protected:Npn \chemmacros_set_keys_filter:nnn #1#2#3
+ { \keys_set_filter:nnn {chemmacros/#1} {#2} {#3} }
+
+\cs_new_protected:Npn \chemmacros_define_global_keys:n #1
+ { \keys_define:nn {chemmacros} {#1} }
+
+\cs_new_protected:Npn \chemmacros_set_global_keys:n #1
+ { \keys_set:nn {chemmacros} {#1} }
+
+% --------------------------------------------------------------------------
+% basic tools:
+\cs_new:Npn \chemmacros_remove_backslash:N #1
+ { \exp_after:wN \use_none:n \token_to_str:N #1 }
+
+\cs_new_eq:NN \chemmacros_ignore_spaces: \tex_ignorespaces:D
+
+\cs_new_protected:Npn \chemmacros_nobreak: { \tex_penalty:D 10000 \scan_stop: }
+\cs_new_protected:Npn \chemmacros_allow_break: { \tex_penalty:D \c_zero_int }
+\cs_new_protected:Npn \chemmacros_skip_nobreak:N #1
+ {
+ \chemmacros_nobreak:
+ \skip_horizontal:N #1
+ \chemmacros_nobreak:
+ }
+
+% this is used at least in the `isotope' module
+\prg_new_conditional:Npnn \chemmacros_if_is_int:n #1 {p,T,F,TF}
+ {
+ \if_charcode:w ! \if_int_compare:w 9 < 1#1 ! \else: _ \fi:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+
+\prg_new_conditional:Npnn \chemmacros_if_loaded:nn #1#2 {p,T,F,TF}
+ {
+ \use:c {chemmacros_if_#1_loaded:nTF} {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+\prg_new_conditional:Npnn \chemmacros_if_package_loaded:n #1 {p,T,F,TF}
+ {
+ \cs_if_exist:cTF {ver@#1.sty}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+\prg_new_conditional:Npnn \chemmacros_if_class_loaded:n #1 {p,T,F,TF}
+ {
+ \cs_if_exist:cTF {ver@#1.cls}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+% this is still true \AtBeginDocument:
+\prg_new_conditional:Npnn \chemmacros_if_preamble: {p,T,F,TF}
+ {
+ \cs_if_eq:NNTF \@onlypreamble \@notprerr
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+
+% this is still false \AtBeginDocument:
+\prg_new_conditional:Npnn \chemmacros_if_document: {p,T,F,TF}
+ {
+ \bool_if:NTF \l__chemmacros_in_document_bool
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\cs_new_protected:Npn \chemmacros_cs_if_free_new:Npn #1
+ {
+ \cs_if_exist:NF #1
+ { \cs_new:Npn #1 }
+ }
+\cs_generate_variant:Nn \chemmacros_cs_if_free_new:Npn {c}
+
+\cs_new_protected:Npn \chemmacros_cs_if_free_new_protected:Npn #1
+ {
+ \cs_if_exist:NF #1
+ { \cs_new_protected:Npn #1 }
+ }
+\cs_generate_variant:Nn \chemmacros_cs_if_free_new_protected:Npn {c}
+
+% #1: counter
+% #2: singular
+% #3: plural
+% #4: Singular
+% #5: Plural
+\cs_new_protected:Npn \chemmacros_add_cleveref_support:nnnnn #1#2#3#4#5
+ {
+ \hook_gput_code:nnn {package/cleveref/after} {chemmacros}
+ {
+ \cs_if_exist:cF {cref@#1@name}
+ {
+ \legacy_if:nTF {@cref@capitalise}
+ { \crefname {#1} {#4} {#5} }
+ { \crefname {#1} {#2} {#3} }
+ \Crefname {#1} {#4} {#5}
+ }
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_add_cleveref_support:nnnnn {nnnx,nnnxx,nnnnx}
+
+% #1: counter
+% #2: singular
+% #3: Singular (optional)
+% #4: plural
+% #5: Plural (optional)
+\NewDocumentCommand \ChemCleverefSupport {mmomo}
+ {
+ \IfNoValueTF {#3}
+ {
+ \IfNoValueTF {#5}
+ {
+ \chemmacros_add_cleveref_support:nnnnn
+ {#1}
+ {#2}
+ {#4}
+ { \text_titlecase:n {#2} }
+ { \text_titlecase:n {#4} }
+ }
+ {
+ \chemmacros_add_cleveref_support:nnnnn
+ {#1}
+ {#2}
+ {#4}
+ { \text_titlecase:n {#2} }
+ {#5}
+ }
+ }
+ {
+ \IfNoValueTF {#5}
+ {
+ \chemmacros_add_cleveref_support:nnnnn
+ {#1}
+ {#2}
+ {#4}
+ {#3}
+ { \text_titlecase:n {#4} }
+ }
+ { \chemmacros_add_cleveref_support:nnnnn {#1} {#2} {#4} {#3} {#5} }
+ }
+ }
+\@onlypreamble\ChemCleverefSupport
+
+% #1: id
+% #2: mid sentence
+% #3: begin sentence
+\cs_new_protected:Npn \chemmacros_add_fancyref_support:nnn #1#2#3
{
- compatibility .code:n =
- \str_case:nnTF {#1}
+ \hook_gput_code:nnn {package/fancyref/after} {chemmacros}
+ {
+ \chemmacros_cs_if_free_new:cpn {fancyref#1labelprefix} {#1}
+ \chemmacros_cs_if_free_new:cpn {fref#1name} {#2}
+ \chemmacros_cs_if_free_new:cpn {Fref#1name} {#3}
+ \exp_args:Nnx \frefformat {vario} { \exp_not:c {fancyref#1labelprefix} }
+ { \use:c {fref#1name} \fancyrefdefaultspacing ##1##3 }
+ \exp_args:Nnx \Frefformat {vario} { \exp_not:c {fancyref#1labelprefix} }
+ { \use:c {Fref#1name} \fancyrefdefaultspacing ##1##3 }
+ \exp_args:Nnx \frefformat {plain} { \exp_not:c {fancyref#1labelprefix} }
+ { \use:c {fref#1name} \fancyrefdefaultspacing ##1 }
+ \exp_args:Nnx \Frefformat {plain} { \exp_not:c {fancyref#1labelprefix} }
+ { \use:c {Fref#1name} \fancyrefdefaultspacing ##1 }
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_add_fancyref_support:nnn {nnx}
+
+% #1: id
+% #2: mid sentence
+% #3: begin sentence (optional)
+\NewDocumentCommand \ChemFancyrefSupport {mmo}
+ {
+ \IfNoValueTF {#3}
+ { \chemmacros_add_fancyref_support:nnn {#1} {#2} { \text_titlecase:n {#3} } }
+ { \chemmacros_add_fancyref_support:nnn {#1} {#2} {#3} }
+ }
+\@onlypreamble\ChemFancyrefSupport
+
+% --------------------------------------------------------------------------
+% some checks at begin document:
+\bool_new:N \l__chemmacros_in_document_bool
+\bool_new:N \l__chemmacros_chemstyle_bool
+
+\hook_gput_code:nnn {begindocument/before} {chemmacros}
+ {
+ \bool_set_true:N \l__chemmacros_in_document_bool
+ \chemmacros_if_package_loaded:nT {chemstyle}
+ { \bool_set_true:N \l__chemmacros_chemstyle_bool }
+ }
+
+% --------------------------------------------------------------------------
+% detection and handling of bold face:
+\RequirePackage{bm}
+
+\prg_new_protected_conditional:Npnn \chemmacros_if_bold: {T,F,TF}
+ {
+ \seq_if_in:NVTF \l__chemmacros_if_bf_seq \f@series
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+\seq_new:N \l__chemmacros_if_bf_seq
+
+\seq_set_split:Nnn \l__chemmacros_if_bf_seq { , }
+ {
+ b , bc , bm , bx , bux ,
+ eb , ebc , ebx , mb ,
+ sb , sbc , sbx ,
+ ub , ubc , ubx
+ }
+
+\cs_new_protected:Npn \chemmacros_bold:n #1
+ {
+ \chemmacros_if_bold:TF
+ {
+ \mode_if_math:TF
+ { \bm {#1} }
+ { \textbf {#1} }
+ }
+ {#1}
+ }
+
+\cs_new_protected:Npn \chemmacros_detect_bold:n
+ { \error \chemmacros_bold:n }
+
+% --------------------------------------------------------------------------
+\RequirePackage{amstext}
+
+\cs_new_protected:Npn \chemmacros_text:n #1
+ { \mode_if_math:TF { \text {#1} } {#1} }
+\cs_generate_variant:Nn \chemmacros_text:n {V}
+
+\cs_new_protected:Npn \chemmacros_math:n #1
+ { \chemmacros_text:n { \c_math_toggle_token #1 \c_math_toggle_token } }
+\cs_generate_variant:Nn \chemmacros_math:n {V}
+
+% --------------------------------------------------------------------------
+% a setup command:
+\NewDocumentCommand \chemsetup {om}
+ {
+ \IfNoValueTF {#1}
+ { \keys_set:nn {chemmacros} {#2} }
+ { \keys_set:nn {chemmacros/#1} {#2} }
+ }
+
+% --------------------------------------------------------------------------
+
+% load package #1 and add its options to chemmacros
+% this requires that package #1 defines its options with l3keys using its
+% name as module
+\cs_new_protected:Npn \chemmacros_integrate_package:nnn #1#2#3
+ {
+ \tl_if_blank:nTF {#3}
+ {
+ \tl_if_blank:nTF {#1}
+ { \RequirePackage {#2} }
+ { \RequirePackage [#1] {#2} }
+ }
+ {
+ \tl_if_blank:nTF {#1}
+ { \RequirePackage {#2} [#3] }
+ { \RequirePackage [#1] {#2} [#3] }
+ }
+ \chemmacros_define_global_keys:n
+ {
+ #2 .choice: ,
+ #2 / unknown .code:n =
+ \keys_set:no {#2} { \l_keys_key_tl = ##1 }
+ }
+ }
+
+% --------------------------------------------------------------------------
+
+\bool_new:N \l__chemmacros_hyperref_bool
+
+\hook_gput_code:nnn {begindocument/end} {chemmacros}
+ {
+ \chemmacros_if_package_loaded:nT {hyperref}
+ { \bool_set_true:N \l__chemmacros_hyperref_bool }
+ }
+
+\ChemModuleEnd
+\ChemModule{errorcheck}{2022/01/16 error checking for unloaded modules}
+
+\msg_new:nnn {chemmacros} {undefined}
+ {
+ The~ #1~ `#2'~ is~ undefined.~ You~ need~ to~ load~ the~
+ `#3'~ module.
+ }
+
+\cs_new_protected:Npn \chemmacros_requires_module:nNn #1#2#3
+ {
+ \chemmacros_module_if_loaded:nF {#3}
+ {
+ \cs_if_free:NT #2
+ {
+ \str_case:nn {#1}
+ {
+ {command} {
+ \cs_set:Npn #2
+ {
+ \msg_error:nnnxn {chemmacros} {undefined}
+ {#1}
+ { \token_to_str:N #2 }
+ {#3}
+ }
+ \chemmacros_module_before:nn {#3} { \cs_undefine:N #2 }
+ }
+ {environment} {
+ \cs_set:Npn #2
+ {
+ \msg_error:nnnxn {chemmacros} {undefined}
+ {#1}
+ { \tl_tail:e { \token_to_str:N #2 } }
+ {#3}
+ }
+ \chemmacros_module_before:nn {#3} { \cs_undefine:N #2 }
+ }
+ }
+ }
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_requires_module:nNn {nc}
+
+\cs_new_protected:Npn \chemmacros_command_requires_module:Nn #1#2
+ { \chemmacros_requires_module:nNn {command} #1 {#2} }
+
+\cs_new_protected:Npn \chemmacros_environment_requires_module:nn #1#2
+ { \chemmacros_requires_module:ncn {environment} {#1} {#2} }
+
+% --------------------------------------------------------------------------
+% add checking for the most common user commands and environments:
+% isotopes module
+\chemmacros_command_requires_module:Nn \isotope {isotopes}
+
+% mechanisms module
+\chemmacros_command_requires_module:Nn \mech {mechanisms}
+
+% newman module
+\chemmacros_command_requires_module:Nn \newman {newman}
+
+% orbital module
+\chemmacros_command_requires_module:Nn \orbital {orbital}
+
+% polymers module
+\chemmacros_command_requires_module:Nn \makepolymerdelims {polymers}
+
+% reactions module
+\chemmacros_environment_requires_module:nn {reaction} {reactions}
+\chemmacros_environment_requires_module:nn {reaction*} {reactions}
+\chemmacros_environment_requires_module:nn {reactions} {reactions}
+\chemmacros_environment_requires_module:nn {reactions*} {reactions}
+\chemmacros_command_requires_module:Nn \listofreactions {reactions}
+\chemmacros_command_requires_module:Nn \AddRxnDesc {reactions}
+
+% redox module
+\chemmacros_command_requires_module:Nn \ox {redox}
+\chemmacros_command_requires_module:Nn \OX {redox}
+\chemmacros_command_requires_module:Nn \redox {redox}
+
+% scheme module
+\chemmacros_environment_requires_module:nn {scheme} {scheme}
+\chemmacros_command_requires_module:Nn \listschemename {scheme}
+\chemmacros_command_requires_module:Nn \schemename {scheme}
+\chemmacros_command_requires_module:Nn \listofschemes {scheme}
+
+\hook_gput_code:nnn {package/chemscheme/before} {chemmacros}
+ {
+ \cs_undefine:N \scheme
+ \cs_undefine:N \endscheme
+ \cs_undefine:N \listschemename
+ \cs_undefine:N \schemename
+ \cs_undefine:N \listofschemes
+ }
+
+% spectroscopy module
+\chemmacros_command_requires_module:Nn \NMR {spectroscopy}
+\chemmacros_environment_requires_module:nn {experimental} {spectroscopy}
+
+% thermodynamics module
+\chemmacros_command_requires_module:Nn \state {thermodynamics}
+\chemmacros_command_requires_module:Nn \enthalpy {thermodynamics}
+\chemmacros_command_requires_module:Nn \entropy {thermodynamics}
+\chemmacros_command_requires_module:Nn \gibbs {thermodynamics}
+
+% xfrac module
+\chemmacros_command_requires_module:Nn \chemfrac {xfrac}
+
+% --------------------------------------------------------------------------
+
+\ChemModuleEnd
+\ChemModule{lang}{2020/11/29 language settings for chemmacros}
+
+\RequirePackage{translations}
+
+\msg_new:nnn {chemmacros} {language-not-defined}
+ {
+ You~ chose~ the~ language~ `#1'~ which~ is~ not~ defined~ by~ chemmacros.~
+ `english'~ is~ used~ instead.~ If~ you~ just~ mistyped~ try~ again!~
+ Otherwise~ contact~ the~ author~ and~ he'll~ probably~ add~ your~ language.
+ }
+
+% --------------------------------------------------------------------------
+% language settings:
+\bool_new:N \l__chemmacros_language_auto_bool
+\bool_set_true:N \l__chemmacros_language_auto_bool
+% this token list will hold the chosen language for chemmacros; since the
+% language is either chosen automatically or by option it is only available at
+% begin document
+\tl_new:N \l_chemmacros_language_tl
+\tl_set:Nn \l_chemmacros_language_tl {english}
+\tl_new:N \l__chemmacros_current_language_tl
+
+\tl_const:Nn \c__chemmacros_keyword_prefix_tl {chem-keyword-}
+
+\prop_new:N \g_chemmacros_translations_prop
+
+% translate the key #1
+\cs_new:Npn \chemmacros_translate:n #1
+ {
+ \bool_if:NTF \l__chemmacros_language_auto_bool
+ { \GetTranslation { \c__chemmacros_keyword_prefix_tl #1 } }
+ {
+ \GetTranslationFor
+ {\l_chemmacros_language_tl}
+ { \c__chemmacros_keyword_prefix_tl #1 }
+ }
+ }
+
+\DeclareExpandableDocumentCommand \ChemTranslate {m}
+ { \chemmacros_translate:n {#1} }
+
+\chemmacros_define_global_keys:n
+ {
+ language .value_required:n = true ,
+ language .code:n =
+ \tl_if_eq:nnTF {#1} {auto}
+ { \bool_set_true:N \l__chemmacros_language_auto_bool }
{
- {newest} {}
- {latest} {}
+ \bool_set_false:N \l__chemmacros_language_auto_bool
+ \tl_set:Nn \l__chemmacros_current_language_tl {#1}
+ } ,
+ language .initial:n = auto
+ }
+
+\hook_gput_code:nnn {begindocument} {package/chemmacros}
+ {
+ \bool_if:NTF \l__chemmacros_language_auto_bool
+ {
+ \tl_set:Nx \l_chemmacros_language_tl
+ { \@trnslt@language{\@trnslt@current@language} }
+ }
+ {
+ \tl_set_eq:NN
+ \l_chemmacros_language_tl
+ \l__chemmacros_current_language_tl
+ }
+ }
+
+% --------------------------------------------------------------------------
+\cs_new_protected:Npn \__chemmacros_declare_translation:nw #1#2=#3\q_stop
+ {
+ \tl_set:Nx \l__chemmacros_tmpa_tl { \tl_trim_spaces:n {#2} }
+ \tl_set:Nx \l__chemmacros_tmpb_tl { \tl_trim_spaces:n {#3} }
+ \use:x
+ {
+ \chemmacros_declare_translation:nnn
+ { \exp_not:n {#1} }
+ { \exp_not:V \l__chemmacros_tmpa_tl }
+ { \exp_not:V \l__chemmacros_tmpb_tl }
+ }
+ }
+
+% #1: key
+% #2: lang
+% #3: translation
+\cs_new_protected:Npn \chemmacros_declare_translation:nnn #1#2#3
+ {
+ \declaretranslation
+ {#2}
+ { \c__chemmacros_keyword_prefix_tl #1 }
+ {#3}
+ \prop_gput:Nnn \g_chemmacros_translations_prop {#1(#2)} {#3}
+ }
+\cs_generate_variant:Nn \chemmacros_declare_translation:nnn {V}
+
+% #1: key
+% #2: csv list: { <lang1> = <translation1> , <lang2> = <translation2> }
+\cs_new_protected:Npn \chemmacros_declare_translations:nn #1#2
+ {
+ \clist_map_inline:nn {#2}
+ { \__chemmacros_declare_translation:nw {#1} ##1 \q_stop }
+ }
+
+\NewDocumentCommand \DeclareChemTranslations {mm}
+ { \chemmacros_declare_translations:nn {#1} {#2} }
+\@onlypreamble \DeclareChemTranslations
+
+\NewDocumentCommand \DeclareChemTranslation {mmm}
+ { \chemmacros_declare_translation:nnn {#1} {#2} {#3} }
+\@onlypreamble \DeclareChemTranslation
+
+\cs_new:Npn \__chemmacros_parse_translate_list_entry:nnn #1#2#3 {}
+
+\cs_new_protected:Npn \__chemmacros_parse_translate_list_entry:www #1(#2)\q_mark#3\q_stop
+ { \__chemmacros_parse_translate_list_entry:nnn {#1} {#2} {#3} }
+
+\cs_new_protected:Npn \chemmacros_for_all_translations_do:n #1
+ {
+ \cs_set:Npn \__chemmacros_parse_translate_list_entry:nnn ##1##2##3 {#1}
+ \prop_map_inline:Nn \g_chemmacros_translations_prop
+ { \__chemmacros_parse_translate_list_entry:www ##1 \q_mark ##2 \q_stop }
+ }
+
+\NewDocumentCommand \ForAllChemTranslationsDo {+m}
+ { \chemmacros_for_all_translations_do:n {#1} }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{greek}{2020/11/29 upright greek symbols}
+
+\DeclareHookRule {begindocument/end} {chemmacros} {after} {chemgreek}
+\RequirePackage{chemgreek}
+
+\msg_new:nnn {chemmacros} {no-greek}
+ {
+ You~ haven't~ loaded~ any~ package~ for~ upright~ Greek~ letters~ or~ no~
+ unique~ choice~ was~ possible.~ Either~ load~ one~ of~ packages~
+ specified~ in~ the~ manual~ or~ select~ a~ chemgreek~ mapping~ manually.
+ }
+
+\msg_new:nnn {chemmacros} {greek-undefined}
+ {
+ The~ chemgreek~ mapping~ `#1'~ you~ chose~ \msg_line_context: \c_space_tl
+ is~ not~ defined.~ Please~ choose~ another~ one.
+ }
+
+% chemgreek selects a mapping if an unambiguous choice is possible, otherwise
+% selects `default'. Warn the user in this case:
+
+\hook_gput_code:nnn {begindocument/end} {chemmacros}
+ {
+ \bool_lazy_or:nnT
+ { \chemgreek_if_mapping_active_p:n {default} }
+ { \chemgreek_if_mapping_active_p:n {var-default} }
+ { \msg_warning:nn {chemmacros} {no-greek} }
+ }
+
+% an option for manual selection:
+\chemmacros_define_global_keys:n
+ { greek .code:n = \chemmacros_choose_chemgreek_mapping:n {#1} }
+
+\cs_new_protected:Npn \chemmacros_choose_chemgreek_mapping:n #1
+ {
+ \chemgreek_if_mapping_exists:nTF {#1}
+ {
+ \chemgreek_load_mapping_package:n {#1}
+ \chemgreek_activate_mapping:n {#1}
+ }
+ { \msg_warning:nnn {chemmacros} {greek-undefined} {#1} }
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{chemformula}{2020/11/29 integration of chemical formulas}
+
+\RequirePackage{amstext}
+
+\msg_new:nnn {chemmacros} {unknown-formula-method}
+ {
+ You~ chose~ the~ formula~ method~ `#1'~ which~ is~ not~ available.~
+ I'm~ falling~ back~ to~ `chemformula'~ now.
+ }
+
+\msg_new:nnn {chemmacros} {default-formula-method}
+ {
+ You~ haven't~ chosen~ a~ formula~ method~ so~ I'm~ assuming~ the~ default~
+ method~ `chemformula'.
+ }
+
+\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~ should~ decide~ for~ only~ one~ of~ the~ packages~ for~ having~ a~
+ consistent~ layout.
+ }
+
+% --------------------------------------------------------------------------
+% 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 #1 { \chemmacros_chemformula:n {#1} }
+\cs_new_protected:Npn \chemmacros@reaction #1 { \chemmacros_reaction:n {#1} }
+
+% --------------------------------------------------------------------------
+% setup, check and define each method:
+\bool_new:N \l__chemmacros_formula_method_set_bool
+
+\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
+
+% #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_setup_method_package:n #1
+ {
+ \prop_item:Nn \l__chemmacros_method_packages_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}
+ {
+ \prop_if_in:NnTF \l__chemmacros_method_packages_prop {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+\cs_new_protected:Npn \chemmacros_check_formula_method:
+ {
+ \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
+ {
+ \chemmacros_if_package_loaded:nT {##1}
+ {
+ \bool_if:NTF \l__chemmacros_tmpa_bool
+ {
+ \msg_warning:nn {chemmacros} {formula-conflict}
+ \chemmacros_set_formula_method:n {chemformula}
+ }
+ { \chemmacros_set_formula_method:n {##1} }
+ \bool_set_true:N \l__chemmacros_tmpa_bool
+ }
+ }
+ \bool_if:NF \l__chemmacros_tmpa_bool
+ {
+ \msg_info:nn {chemmacros} {default-formula-method}
+ \chemmacros_set_formula_method:n {chemformula}
+ }
+ }
+ }
+
+\cs_new_protected:Npn \chemmacros_set_formula_method:n #1
+ {
+ \chemmacros_if_method_package:nTF {#1}
+ { \chemmacros_setup_method_package:n {#1} }
+ {
+ \msg_warning:nnn {chemmacros} {unknown-formula-method} {#1}
+ \chemmacros_setup_method_package:n {chemformula}
+ }
+ \bool_set_true:N \l__chemmacros_formula_method_set_bool
+ }
+\cs_generate_variant:Nn \chemmacros_set_formula_method:n {V}
+
+% --------------------------------------------------------------------------
+% add formula methods:
+\chemmacros_add_method_package:nn {chemformula}
+ {
+ \chemmacros_integrate_package:nnn {} {chemformula} {2015/09/08}
+ \cs_set_protected:Npn \chemmacros_chemformula: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_integrate_package:nnn {version=4} {mhchem} {}
+ \cs_set_protected:Npn \chemmacros_chemformula:n #1 { \ce {#1} }
+ \cs_set_protected:Npn \chemmacros_reaction:n #1 { \ce {#1} }
+ \chemmacros_module_after:nn {charges}
+ {
+ \cs_set_protected:Npn \chemmacros_elpair:n #1 { \ce{#1} : }
+ \cs_set_protected:Npn \chemmacros_plus: { + }
+ \cs_set_protected:Npn \chemmacros_minus: { - }
+ \cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
+ \cs_set_protected:Npn \chemmacros_formal_minus: { \ensuremath{\ominus} }
+ \cs_set_protected:Npn \fplus { \ensuremath{\oplus} }
+ \cs_set_protected:Npn \fminus { \ensuremath{\ominus} }
+ }
+ }
+
+\chemmacros_add_method_package:nn {chemist}
+ {
+ \RequirePackage {chemist}
+ \cs_set_protected:Npn \chemmacros_chemformula:n #1
+ { \chemmacros_text:n { \ChemForm {#1} } }
+ \cs_set_protected:Npn \chemmacros_reaction:n #1
+ { \chemmacros_text:n { \ChemForm {#1} } }
+ \chemmacros_module_after:nn {charges}
+ {
+ \cs_set_protected:Npn \chemmacros_elpair:n #1
+ { \chemmacros_text:n { \ChemForm {#1} : } }
+ \cs_set_protected:Npn \chemmacros_plus: { + }
+ \cs_set_protected:Npn \chemmacros_minus: { - }
+ \cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
+ \cs_set_protected:Npn \chemmacros_formal_minus: { \ensuremath{\ominus} }
+ \cs_set_protected:Npn \fplus { \ensuremath{\oplus} }
+ \cs_set_protected:Npn \fminus { \ensuremath{\ominus} }
+ }
+ }
+
+\chemmacros_add_method_package:nn {chemfig}
+ {
+ \RequirePackage {chemfig}
+ \cs_set_protected:Npn \chemmacros_chemformula:n #1
+ { \printatom {#1} }
+ \cs_set_protected:Npn \chemmacros_reaction:n #1
+ { \printatom {#1} }
+ \chemmacros_module_after:nn {charges}
+ {
+ \cs_set_protected:Npn \chemmacros_elpair:n #1
+ { \Lewis { 0: , \printatom {#1} } }
+ \cs_set_protected:Npn \chemmacros_plus: { + }
+ \cs_set_protected:Npn \chemmacros_minus: { - }
+ \cs_set_protected:Npn \chemmacros_formal_plus: { \ensuremath{\oplus} }
+ \cs_set_protected:Npn \chemmacros_formal_minus: { \ensuremath{\ominus} }
+ \cs_set_protected:Npn \fplus { \ensuremath{\oplus} }
+ \cs_set_protected:Npn \fminus { \ensuremath{\ominus} }
+ }
+ }
+
+% --------------------------------------------------------------------------
+\chemmacros_define_global_keys:n
+ { 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}
+ }
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{charges}{2020/11/29 charges}
+
+% --------------------------------------------------------------------------
+% circled charge signs: they are defined in the `chemformula' package:
+% use directly:
+\cs_new_protected:Npn \fplus { { \chemformula_fplus: } }
+\cs_new_protected:Npn \fminus { { \chemformula_fminus: } }
+
+% change output depending on circled-option
+\bool_new:N \l__chemmacros_circled_bool
+\bool_set_true:N \l__chemmacros_circled_bool
+\bool_new:N \l__chemmacros_circled_formal_bool
+\bool_set_true:N \l__chemmacros_circled_formal_bool
+\bool_new:N \l__chemmacros_circled_chem_bool
+\bool_set_true:N \l__chemmacros_circled_chem_bool
+
+
+\chemmacros_define_keys:nn {charges}
+ {
+ circletype .choice: ,
+ circletype / math .code:n =
+ {
+ \bool_set_false:N \l__chemmacros_circled_chem_bool
+ \chemmacros_if_package_loaded:nT {chemformula}
+ { \bool_set_false:N \l_chemformula_formal_chem_bool }
+ } ,
+ circletype / chem .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_circled_chem_bool
+ \chemmacros_if_package_loaded:nT {chemformula}
+ { \bool_set_true:N \l_chemformula_formal_chem_bool }
+ } ,
+ circletype .value_required:n = true ,
+ circled .choice: ,
+ circled / none .code:n =
+ {
+ \bool_set_false:N \l__chemmacros_circled_bool
+ \bool_set_false:N \l__chemmacros_circled_formal_bool
+ \chemmacros_if_package_loaded:nT {chemformula}
+ { \bool_set_false:N \l_chemformula_formal_charges_bool }
+ } ,
+ circled / formal .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_circled_bool
+ \bool_set_true:N \l__chemmacros_circled_formal_bool
+ \chemmacros_if_package_loaded:nT {chemformula}
+ { \bool_set_false:N \l_chemformula_formal_charges_bool }
+ } ,
+ circled / all .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_circled_bool
+ \bool_set_false:N \l__chemmacros_circled_formal_bool
+ \chemmacros_if_package_loaded:nT {chemformula}
+ { \bool_set_true:N \l_chemformula_formal_charges_bool }
+ } ,
+ circled .default:n = all
+ }
+
+\cs_new_protected:Npn \chemmacros_plus: { \chemformula_plus: }
+\cs_new_protected:Npn \chemmacros_minus: { \chemformula_minus: }
+
+\cs_new_protected:Npn \chemmacros_formal_plus: { \chemformula_formal_plus: }
+\cs_new_protected:Npn \chemmacros_formal_minus: { \chemformula_formal_minus: }
+
+\cs_new_protected:Npn \chemmacros_charge:n #1
+ { \chemmacros_chemformula:n { {}^{#1} } }
+
+\cs_new_protected:Npn \chemmacros_new_charge_command:Nn #1#2
+ {
+ \DeclareDocumentCommand #1 {o}
+ {
+ \IfNoValueTF {##1}
+ { \chemmacros_charge:n {#2} }
+ { \chemmacros_charge:n {##1#2} }
+ }
+ }
+
+\tl_new:N \l__chemmacros_partial_charge_format_tl
+\tl_set:Nn \l__chemmacros_partial_charge_format_tl { \tiny }
+
+\cs_new_protected:Npn \chemmacros_new_partial_charge_command:Nn #1#2
+ {
+ \cs_new_protected:Npn #1
+ {
+ \mbox {
+ \l__chemmacros_partial_charge_format_tl
+ \c_math_toggle_token \delta #2 \c_math_toggle_token
}
+ }
+ }
+
+\NewChemMacroset {Charge} {mm}
+ { \chemmacros_new_charge_command:Nn #1 {#2} }
+
+\NewChemMacroset {PartialCharge} {mm}
+ { \chemmacros_new_partial_charge_command:Nn #1 {#2} }
+
+\cs_new_protected:Npn \scrm
+ { \ensuremath { \scriptstyle \chemmacros_minus: } }
+\cs_new_protected:Npn \scrp
+ { \ensuremath { \scriptstyle \chemmacros_plus: } }
+\cs_new_protected:Npn \fscrm
+ { \ensuremath { \scriptstyle \chemmacros_formal_minus: } }
+\cs_new_protected:Npn \fscrp
+ { \ensuremath { \scriptstyle \chemmacros_formal_plus: } }
+\cs_new_protected:Npn \fsscrm
+ { \ensuremath { \scriptscriptstyle \chemmacros_formal_minus: } }
+\cs_new_protected:Npn \fsscrp
+ { \ensuremath { \scriptscriptstyle \chemmacros_formal_plus: } }
+
+\chemmacros_define_keys:nn {charges}
+ {
+ partial-format .tl_set:N = \l__chemmacros_partial_charge_format_tl
+ }
+
+% --------------------------------------------------------------------------
+\NewChemCharge \mch { \chemmacros_minus: }
+\NewChemCharge \pch { \chemmacros_plus: }
+\NewChemCharge \fmch { \chemmacros_formal_minus: }
+\NewChemCharge \fpch { \chemmacros_formal_plus: }
+
+% partial charges:
+\NewChemPartialCharge \delm { \chemmacros_minus: }
+\NewChemPartialCharge \delp { \chemmacros_plus: }
+\NewChemPartialCharge \fdelm { \chemmacros_formal_minus: }
+\NewChemPartialCharge \fdelp { \chemmacros_formal_plus: }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{acid-base}{2022/01/13 acid/base}
+
+% --------------------------------------------------------------------------
+% equilibrium constants:
+
+\tl_new:N \l__chemmacros_equilibrium_constant_tl
+\tl_set:Nn \l__chemmacros_equilibrium_constant_tl {K}
+\prop_new:N \l__chemmacros_eq_constants_prop
+
+\prg_new_conditional:Npnn \chemmacros_if_eq_constant:Nn #1#2 {T,F,TF}
+ {
+ \cs_if_exist:NTF #1
+ {
+ \tl_if_eq:xnTF
+ { \prop_item:Nn \l__chemmacros_eq_constants_prop {#1} }
+ {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+
+% #1: cs
+% #2: translation id and option name
+% #3: default translation
+\cs_new_protected:Npn \chemmacros_define_eq_constant:Nnn #1#2#3
+ {
+ \chemmacros_if_eq_constant:NnF {#1} {#2}
+ {
+ \cs_new_protected:Npn #1 {}
+ \prop_put:Nnn \l__chemmacros_eq_constants_prop {#1} {#2}
+ \tl_new:c {l__chemmacros_#2_tl}
+ \chemmacros_define_keys:nn {acid-base}
+ { #2 .tl_set:c = l__chemmacros_#2_tl }
+ }
+ \tl_set:cn
+ {l__chemmacros_#2_tl}
+ { \chemmacros_translate:n {#2} }
+ \chemmacros_declare_translation:nnn {#2} {fallback} {#3}
+ \cs_set_protected:Npn #1
+ {
+ \ensuremath
+ {
+ \chemmacros_bold:n
+ {
+ \l__chemmacros_equilibrium_constant_tl
+ \c_math_subscript_token
+ { \tl_use:c {l__chemmacros_#2_tl} }
+ }
+ }
+ }
+ }
+
+\NewChemMacroset {EqConstant} {mmm}
+ { \chemmacros_define_eq_constant:Nnn #1 {#2} {#3} }
+
+\NewChemEqConstant \Ka {K-acid} { \mathrm{a} }
+\NewChemEqConstant \Kb {K-base} { \mathrm{b} }
+\NewChemEqConstant \Kw {K-water} { \mathrm{w} }
+
+\chemmacros_define_keys:nn {acid-base}
+ { eq-constant .tl_set:N = \l__chemmacros_equilibrium_constant_tl }
+
+\chemmacros_define_keys:nn {acid-base}
+ {
+ p-style .choice: ,
+ p-style / slanted .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textsl ,
+ p-style / italics .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textit ,
+ p-style / upright .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textup ,
+ p-style .initial:n = upright
+ }
+
+\cs_new_protected:Npn \chemmacros_p:n #1
+ {
+ \group_begin:
+ \chemmacros_text:n
{
- \tl_set_eq:NN
- \l__chemmacros_compatibility_version_tl
- \c_chemmacros_version_tl
+ \chemmacros_p_style:n {p}
+ \ensuremath {#1}
}
- { \tl_set:Nn \l__chemmacros_compatibility_version_tl {#1} } ,
- unknown .code:n =
- \PassOptionsToPackage{\CurrentOption}{chemmacros4}
- \PassOptionsToPackage{\CurrentOption}{chemmacros5}
+ \group_end:
}
-\ProcessKeysPackageOptions {chemmacros/compatibility}
+\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 \pKa {o}
+ {
+ \chemmacros_p:n
+ {
+ \Ka \IfNoValueF {#1}
+ { {} \c_math_subscript_token { \chemmacros_bold:n {#1} } }
+ }
+ }
+
+\NewDocumentCommand \pKb {o}
+ {
+ \chemmacros_p:n
+ {
+ \Kb \IfNoValueF {#1}
+ { {} \c_math_subscript_token { \chemmacros_bold:n {#1} } }
+ }
+ }
% --------------------------------------------------------------------------
-% compare version numbers
-% #1: version
-% #2: relation
-% #3: version
-% #4: true
-% #5: false
-\prg_new_conditional:Npnn \chemmacros_if_version:nnn #1#2#3 {p,T,F,TF}
+\ChemModuleEnd
+\ChemModule{symbols}{2020/11/29 symbols}
+
+\RequirePackage{amstext}
+
+% ---------------------------------------------------------------------------
+% transition state symbol
+\cs_new_protected:Npn \__chemmacros_transition_state:
{
- \fp_compare:nTF
+ \text
{
- (
- \chemmacros_get_major_version:n {#1} * 1e6 +
- \chemmacros_get_minor_version:n {#1} * 1e3 +
- 0 \chemmacros_get_subrelease:n {#1}
- )
- #2
- (
- \chemmacros_get_major_version:n {#3} * 1e6 +
- \chemmacros_get_minor_version:n {#3} * 1e3 +
- 0 \chemmacros_get_subrelease:n {#3}
- )
+ \skip_horizontal:n { .1ex }
+ \hbox_overlap_right:n
+ { \rule { .6ex } { 0pt } \rule { .05ex } { 1.3ex } }
+ \hbox_overlap_right:n { \rule [ .4ex ] { 1.3ex } { .05ex } }
+ \rule [ .85ex ] { 1.3ex } { .05ex }
+ \skip_horizontal:n { .1ex }
+ }
+ }
+
+\cs_new_protected:Npn \chemmacros_transition_state:
+ {
+ \ensuremath
+ {
+ \mathchoice
+ { \displaystyle }
+ { \textstyle }
+ { \scriptstyle }
+ { \scriptscriptstyle }
+ \__chemmacros_transition_state:
+ }
+ }
+
+% \DeclareDocumentCommand?
+\cs_new_eq:NN \transitionstatesymbol \chemmacros_transition_state:
+
+% \standardstate as defined by the chemstyle package. Thanks to Joseph Wright
+% the `chemstyle' provides it with \providecommand so it doesn't matter which
+% package defines it first
+\ProvideDocumentCommand \standardstate {}
+ { { \ensuremath { \chemmacros_standardstate: } } }
+
+\cs_new_protected:Npn \chemmacros_standardstate:
+ { \mathpalette \chemmacros_standardstate_aux: \circ }
+
+\cs_new_protected:Npn \chemmacros_standardstate_aux: #1#2
+ {
+ \ooalign
+ {
+ \tex_hfil:D
+ \c_math_toggle_token #1- \c_math_toggle_token
+ \tex_hfil:D
+ \tex_cr:D
+ \tex_hfil:D
+ \c_math_toggle_token #1#2 \c_math_toggle_token
+ \tex_hfil:D
+ \tex_cr:D
+ }
+ }
+
+\cs_new_protected:Npn \changestate { \ensuremath { \mathop{} \! \chemDelta } }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{particles}{2020/11/29 particles}
+
+% --------------------------------------------------------------------------
+% particles
+\cs_new_protected:Nn \chemmacros_define_particle:Nn
+ {
+ \tl_set_rescan:Nnn \l__chemmacros_tmpa_tl { \ExplSyntaxOff } {#2}
+ \use:x
+ {
+ \cs_set_protected:Npn \exp_not:N #1
+ { \chemmacros_chemformula:n { \exp_not:V \l__chemmacros_tmpa_tl } }
+ }
+ }
+
+\NewChemMacroset {Particle} {mm}
+ { \chemmacros_define_particle:Nn #1 {#2} }
+
+% --------------------------------------------------------------------------
+% nucleophiles
+\cs_new_protected:Npn \chemmacros_elpair:n #1
+ {
+ \bool_if:NTF \l__chemmacros_elpair_dots_bool
+ { \chlewis { 0: } {#1} }
+ { \chlewis { 0| } {#1} }
+ }
+
+\bool_new:N \l__chemmacros_nucleophile_elpair_bool
+\bool_new:N \l__chemmacros_elpair_dots_bool
+
+\dim_new:N \l__chemmacros_nucleophile_dim
+\dim_set:Nn \l__chemmacros_nucleophile_dim { .1em }
+
+\chemmacros_define_keys:nn {particles}
+ { space .dim_set:N = \l__chemmacros_nucleophile_dim }
+
+\chemmacros_define_keys:nn {particles}
+ {
+ elpair .choice: ,
+ elpair / false .code:n =
+ { \bool_set_false:N \l__chemmacros_nucleophile_elpair_bool } ,
+ elpair / dots .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_nucleophile_elpair_bool
+ \bool_set_true:N \l__chemmacros_elpair_dots_bool
+ } ,
+ elpair / dash .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_nucleophile_elpair_bool
+ \bool_set_false:N \l__chemmacros_elpair_dots_bool
+ } ,
+ elpair .default:n = dots
+ }
+
+\cs_new_protected:Npn \chemmacros_declare_nucleophile:Nn #1#2
+ {
+ \cs_set_protected:cpn {__chemmacros_ \chemmacros_remove_backslash:N #1:}
+ {
+ \bool_if:NTF \l__chemmacros_nucleophile_elpair_bool
+ {
+ \chemmacros_elpair:n { #2 }
+ \skip_horizontal:N \l__chemmacros_nucleophile_dim
+ \chemmacros_chemformula:n { {}^{-} }
+ }
+ { \chemmacros_chemformula:n { #2^{-} } }
+ }
+ \DeclareDocumentCommand #1 {o}
+ {
+ \group_begin:
+ \IfNoValueF {##1}
+ { \chemmacros_set_keys:nn {particles} {##1} }
+ \use:c {__chemmacros_ \chemmacros_remove_backslash:N #1:}
+ \group_end:
}
+ }
+
+\NewChemMacroset {Nucleophile} {mm}
+ { \chemmacros_declare_nucleophile:Nn #1 {#2} }
+
+% --------------------------------------------------------------------------
+% particles:
+\NewChemParticle \el { e^- }
+\NewChemParticle \prt { p^+ }
+\NewChemParticle \ntr { n^0 }
+
+% ions, molecules
+% proton, hydroxide, hydronium/oxonium, water:
+\NewChemParticle \Hpl { H^+ }
+\NewChemParticle \Hyd { OH^- }
+\NewChemParticle \Oxo { H_3O^+ }
+\NewChemParticle \water { H_2O }
+
+% electrophile:
+\NewChemParticle \El { E^+ }
+
+% nucleophiles:
+\NewChemNucleophile \Nuc {Nu}
+\NewChemNucleophile \ba {ba}
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{phases}{2020/11/29 phase descriptors}
+
+\bool_new:N \l__chemmacros_phases_sub_bool
+\dim_new:N \l__chemmacros_phases_space_dim
+\dim_set:Nn \l__chemmacros_phases_space_dim { .1333 em }
+
+\chemmacros_define_keys:nn {phases}
+ {
+ pos .choice: ,
+ pos / sub .code:n = \bool_set_true:N \l__chemmacros_phases_sub_bool ,
+ pos / side .code:n = \bool_set_false:N \l__chemmacros_phases_sub_bool ,
+ space .dim_set:N = \l__chemmacros_phases_space_dim
+ }
+
+\NewChemMacroset {Phase} {mm}
+ { \chemmacros_define_phase:Nn #1 {#2} }
+
+\cs_new_protected:Npn \chemmacros_define_phase:Nn #1#2
+ {
+ \tl_set:Nx \l__chemmacros_tmpa_tl { phase-\chemmacros_remove_backslash:N #1 }
+ \chemmacros_declare_translation:Vnn
+ \l__chemmacros_tmpa_tl
+ {fallback}
+ {#2}
+ \__chemmacros_define_phase:Nx #1
+ { \exp_not:N \chemmacros_translate:n { \exp_not:V \l__chemmacros_tmpa_tl } }
+ }
+
+\cs_new_protected:Npn \__chemmacros_define_phase:Nn #1#2
+ {
+ \cs_if_exist:NF #1 { \cs_new:Npn #1 {} }
+ \DeclareDocumentCommand #1 {o}
+ { \chemmacros_phase:n { #2 \IfNoValueF {##1} {,~##1} } }
+ }
+\cs_generate_variant:Nn \__chemmacros_define_phase:Nn { Nx }
+
+\cs_new_protected:Npn \chemmacros_phase:n #1
+ {
+ \mode_leave_vertical:
+ \bool_if:NTF \l__chemmacros_phases_sub_bool
+ { \chemformula_subscript:n { (#1) } }
+ {
+ \skip_horizontal:N \l__chemmacros_phases_space_dim
+ \chemmacros_text:n { (#1) }
+ }
+ }
+
+% --------------------------------------------------------------------------
+\NewDocumentCommand \phase {m} { \chemmacros_phase:n {#1} }
+
+\NewChemPhase \sld {s}
+\NewChemPhase \lqd {l}
+\NewChemPhase \gas {g}
+\NewChemPhase \aq {aq}
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{nomenclature}{2022/01/10 chemical names}
+
+\bool_new:N \l__chemmacros_iupac_restricted_bool
+\bool_new:N \l__chemmacros_iupac_strict_bool
+
+\msg_new:nnn {chemmacros} {new-iupac}
+ {
+ You've~ tried~ to~ define~ a~ iupac~ naming~ command~ with~
+ \token_to_str:N \NewChemIUPAC ,~ but~ the~ iupac~ command~
+ \token_to_str:N #1 \c_space_tl already~ exists.~ Choose~ another~ name~
+ or~ use~ \token_to_str:N \RenewChemIUPAC .
+ }
+
+\msg_new:nnn {chemmacros} {renew-iupac}
+ {
+ You've~ tried~ to~ renew~ the~ iupac~ command~ \token_to_str:N #1 ,~ but~
+ it~ doesn't~ exist.~ Use~ \token_to_str:N \NewChemIUPAC \c_space_tl
+ instead.
+ }
+
+\msg_new:nnn {chemmacros} {let-iupac}
+ {
+ You've~ tried~ to~ let~ the~ iupac~ command~ \token_to_str:N #1
+ \c_space_tl to~ the~ iupac~ command~ \token_to_str:N #2 ,~ but~ the~
+ latter~ doesn't~ exist.~ Use~ \token_to_str:N \NewChemIUPAC \c_space_tl
+ instead~ or~declare~ \token_to_str:N #2 \c_space_tl first.
+ }
+
+\msg_new:nnn {chemmacros} {new-iupac-shorthand}
+ {
+ You've~ tried~ to~ define~ a~ iupac~ shorthand~ with~ \token_to_str:N
+ \NewChemIUPACShorthand ,~ but~ the~ shorthand~ \token_to_str:N #1
+ \c_space_tl already~ exists.~ Please~ choose~ another~ token.
+ }
+
+\msg_new:nnn {chemmacros} {renew-iupac-shorthand}
+ {
+ You've~ tried~ to~ renew~ the~ iupac~ shorthand~ \token_to_str:N #1 ,~
+ but~ this~ shorthand~ doesn't~ exist,~ yet.
+ }
+
+\msg_new:nnn {chemmacros} {show-iupac}
+ { \\ >~ \token_to_str:N #1=iupac~macro: \\ -> #2 }
+
+\msg_new:nnn {chemmacros} {no-iupac-command}
+ { \\ >~ \token_to_str:N #1=not~ defined~ as~ iupac~ macro }
+
+% --------------------------------------------------------------------------
+\prop_new:N \l__chemmacros_iupac_prop
+
+\cs_new_protected:Npn \__chemmacros_iupac_name:NN #1#2
+ { \str_set:Nx #2 { \chemmacros_remove_backslash:N #1 } }
+
+\cs_new_protected:Npn \__chemmacros_define_iupac:Nn #1#2
+ {
+ \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
+ \prop_put:NVn \l__chemmacros_iupac_prop
+ \l__chemmacros_tmpa_str
+ {#2}
+ \chemmacros_make_iupac:
+ }
+\cs_generate_variant:Nn \__chemmacros_define_iupac:Nn {NV}
+
+\cs_new_protected:Npn \__chemmacros_let_iupac:NN #1#2
+ {
+ \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
+ \__chemmacros_iupac_name:NN #2 \l__chemmacros_tmpb_str
+ \tl_set:Nx \l__chemmacros_tmpa_tl
+ { \prop_item:NV \l__chemmacros_iupac_prop \l__chemmacros_tmpb_str }
+ \__chemmacros_define_iupac:NV #1 \l__chemmacros_tmpa_tl
+ }
+
+\cs_new_protected:Npn \chemmacros_show_iupac:N #1
+ {
+ \group_begin:
+ \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
+ \tl_set:Nx \l__chemmacros_tmpa_tl
+ { \prop_item:NV \l__chemmacros_iupac_prop \l__chemmacros_tmpa_str }
+ \tl_if_empty:NTF \l__chemmacros_tmpa_tl
+ { \msg_show:nnn {chemmacros} {no-iupac-command} {#1} }
+ { \msg_show:nnnV {chemmacros} {show-iupac} {#1} \l__chemmacros_tmpa_tl }
+ \group_end:
+ }
+
+\prg_new_protected_conditional:Npnn \chemmacros_if_iupac:N #1 {T,F,TF}
+ {
+ \__chemmacros_iupac_name:NN #1 \l__chemmacros_tmpa_str
+ \prop_if_in:NVTF \l__chemmacros_iupac_prop \l__chemmacros_tmpa_str
{ \prg_return_true: }
{ \prg_return_false: }
}
-\cs_generate_variant:Nn \chemmacros_if_version:nnnTF {fnf}
-\cs_new:Npn \__chemmacros_get_minor_version:w #1.#2.#3 \q_stop
+\cs_new_protected:Npn \chemmacros_new_iupac:Nn #1#2
{
- \tl_if_blank:nTF {#2} {0} {
- \tl_map_function:nN {#2} \__chemmacros_get_minor_number:n
- }
+ \chemmacros_if_iupac:NTF #1
+ { \msg_error:nnn {chemmacros} {new-iupac} {#1} }
+ { \__chemmacros_define_iupac:Nn #1 {#2} }
+ }
+
+\cs_new_protected:Npn \chemmacros_provide_iupac:Nn #1#2
+ {
+ \chemmacros_if_iupac:NF #1
+ { \__chemmacros_define_iupac:Nn #1 {#2} }
+ }
+
+\cs_new_protected:Npn \chemmacros_define_iupac:Nn #1#2
+ { \__chemmacros_define_iupac:Nn #1 {#2} }
+
+\cs_new_protected:Npn \chemmacros_renew_iupac:Nn #1#2
+ {
+ \chemmacros_if_iupac:NTF #1
+ { \__chemmacros_define_iupac:Nn #1 {#2} }
+ { \msg_error:nnn {chemmacros} {renew-iupac} {#1} }
}
-\cs_new:Npn \chemmacros_get_minor_version:n #1
- { \__chemmacros_get_minor_version:w #1.. \q_stop }
+\cs_new_protected:Npn \chemmacros_let_iupac:NN #1#2
+ {
+ \chemmacros_if_iupac:NTF #2
+ { \__chemmacros_let_iupac:NN #1#2 }
+ { \msg_error:nnnn {chemmacros} {let-iupac} {#1} {#2} }
+ }
-\cs_new:Npn \__chemmacros_get_minor_number:n #1
+\cs_new_protected:Npn \chemmacros_make_iupac:
{
- \str_case:nn {#1}
+ \chemmacros_if_document:T
{
- {0} {0}
- {1} {1}
- {2} {2}
- {3} {3}
- {4} {4}
- {5} {5}
- {6} {6}
- {7} {7}
- {8} {8}
- {9} {9}
+ \bool_if:NTF \l__chemmacros_inside_iupac_bool
+ {
+ \prop_map_inline:Nn \l__chemmacros_iupac_prop
+ { \cs_set_protected:cpn {##1} {##2} }
+ }
+ {
+ \bool_if:NF \l__chemmacros_iupac_restricted_bool
+ {
+ \bool_if:NTF \l__chemmacros_iupac_strict_bool
+ {
+ \prop_map_inline:Nn \l__chemmacros_iupac_prop
+ { \cs_set_protected:cpn {##1} {##2} }
+ }
+ {
+ \prop_map_inline:Nn \l__chemmacros_iupac_prop
+ {
+ \cs_if_exist:cF {##1}
+ { \cs_set_protected:cpn {##1} {##2} }
+ }
+ }
+ }
+ }
+ }
+ }
+
+\hook_gput_code:nnn {begindocument/end} {chemmacros}
+ { \chemmacros_make_iupac: }
+
+\NewDocumentCommand \DeclareChemIUPAC {mm}
+ { \chemmacros_define_iupac:Nn #1 {#2} }
+
+\NewDocumentCommand \NewChemIUPAC {mm}
+ { \chemmacros_new_iupac:Nn #1 {#2} }
+
+\NewDocumentCommand \RenewChemIUPAC {mm}
+ { \chemmacros_renew_iupac:Nn #1 {#2} }
+
+\NewDocumentCommand \ProvideChemIUPAC {mm}
+ { \chemmacros_provide_iupac:Nn #1 {#2} }
+
+\NewDocumentCommand \LetChemIUPAC {mm}
+ { \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
+ {
+ \tl_set:Nn \l__chemmacros_tmpa_tl {#1}
+ \int_step_inline:nnnn {0} {1} {9}
+ {
+ \tl_replace_all:Nnn \l__chemmacros_tmpa_tl
+ {##1}
+ { { \l__chemmacros_cip_number_tl ##1} }
}
+ { \l__chemmacros_cip_inner_tl \l__chemmacros_tmpa_tl }
}
-\cs_new:Npn \__chemmacros_get_major_version:w #1.#2.#3 \q_stop
- { \tl_if_blank:nTF {#1} {0} {#1} }
+\cs_new_protected:Npn \chemmacros_cip:n #1
+ {
+ \int_zero:N \l__chemmacros_tmpa_int
+ \group_begin:
+ \l__chemmacros_cip_outer_tl (
+ \clist_map_inline:nn
+ {#1}
+ {
+ \int_incr:N \l__chemmacros_tmpa_int
+ \__chemmacros_cip:n {##1}
+ \int_compare:nT
+ { \l__chemmacros_tmpa_int < \clist_count:n {#1} }
+ { , }
+ }
+ )
+ \group_end:
+ \tex_kern:D \l__chemmacros_cip_kern_dim
+ }
-\cs_new:Npn \chemmacros_get_major_version:n #1
- { \__chemmacros_get_major_version:w #1.. \q_stop }
+\DeclareChemIUPAC \cip { \chemmacros_cip:n }
-\cs_new:Npn \__chemmacros_get_subrelease:w #1.#2.#3 \q_stop
+% remember: TikZ needs : to be other
+\cs_new_protected:Npn \chemmacros_sconf:n #1
{
- \tl_if_blank:nTF {#2} {0} {
- \tl_map_function:nN {#2} \__chemmacros_get_subrelease_number:n
- }
+ \group_begin:
+ \chemmacros_tikz:nn
+ { baseline,text~ height=1.5ex,text~ depth=.25ex }
+ {
+ \chemmacros_tikz_node:n {anchor=base} (chemmacros@@Sconf) {#1} ;
+ \chemmacros_tikz_draw:n {->,thick,rotate=90}
+ ($(chemmacros@@Sconf.center)+(20\c_chemmacros_other_colon_tl.8em)$)
+ arc (20\c_chemmacros_other_colon_tl340\c_chemmacros_other_colon_tl.8em);
+ }
+ \group_end:
}
-\cs_new:Npn \chemmacros_get_subrelease:n #1
- { \__chemmacros_get_subrelease:w #1.. \q_stop }
+\cs_new_protected:Npn \chemmacros_rconf:n #1
+ {
+ \group_begin:
+ \tikz[baseline,text~ height=1.5ex,text~ depth=.25ex]
+ {
+ \chemmacros_tikz_node:n {anchor=base} (chemmacros@@Rconf) {#1} ;
+ \chemmacros_tikz_draw:n {<-,thick,rotate=90}
+ ($(chemmacros@@Rconf.center)+(20\c_chemmacros_other_colon_tl.8em)$)
+ arc (20\c_chemmacros_other_colon_tl340\c_chemmacros_other_colon_tl.8em) ;
+ }
+ \group_end:
+ }
+
+\NewDocumentCommand \Sconf { O{S} } { \chemmacros_sconf:n {#1} }
+\NewDocumentCommand \Rconf { O{R} } { \chemmacros_rconf:n {#1} }
+
+% 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
+ }
-\cs_new:Npn \__chemmacros_get_subrelease_number:n #1
+% #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
{
- \str_case:nnF {#1}
+ \chemmacros_chemformula:n {#3}
+ \tl_if_blank:nF {#4}
{
- {0} {}
- {1} {}
- {2} {}
- {3} {}
- {4} {}
- {5} {}
- {6} {}
- {7} {}
- {8} {}
- {9} {}
+ \bool_if:nTF {#2}
+ { \chemmacros_chemformula:n { {}^{#4} } }
+ { \chemmacros_chemformula:n { {}_{#4} } }
}
- { \int_from_alph:n {#1} }
+ \bool_if:nT
+ {#1}
+ { \chemmacros_break_point_hyphen: }
+ }
+
+\cs_new_protected:Npn \chemmacros_hapto:n #1
+ {
+ \chemmacros_coordination_symbol:nnnn
+ { \l__chemmacros_coord_use_hyphen_bool }
+ { \c_true_bool }
+ { \chemeta }
+ {#1}
+ }
+
+\cs_new_protected:Npn \chemmacros_dento:n #1
+ {
+ \chemmacros_coordination_symbol:nnnn
+ { \l__chemmacros_coord_use_hyphen_bool }
+ { \c_true_bool }
+ { \chemkappa }
+ {#1}
+ }
+
+\cs_new_protected:Npn \chemmacros_bridge:n #1
+ {
+ \chemmacros_coordination_symbol:nnnn
+ { \l__chemmacros_coord_use_hyphen_bool }
+ { \l__chemmacros_bridge_super_bool }
+ { \chemmu }
+ {#1}
+ }
+
+% \iupac (basically the same as bpchem's \IUPAC)
+% - allows multiple breaking points as compound names can get really long and
+% especially in multicolumn documents can span more than two lines
+% - add a (very) little space before the hyphen and a little negative space
+% after it
+% - add a little space at breaking points if not broken
+% - enables all naming commands regardless if they're definied otherwise or not
+\cs_new_protected:Npn \chemmacros_allow_hyphens:
+ {
+ \chemmacros_nobreak:
+ \skip_horizontal:N \c_zero_skip
}
-% check compatibility
-% #1: relation
-% #2: number
-% #3: true
-% #4: false
-\prg_new_conditional:Npnn \chemmacros_if_compatibility:nn #1#2 {p,T,F,TF}
+% #1: pre break
+% #2: post break
+% #3: no break
+\cs_new_protected:Npn \__chemmacros_peek_if_dash:TF #1#2
{
- \chemmacros_if_version:fnfTF
- { \l__chemmacros_compatibility_version_tl }
+ \peek_charcode:NTF -
{#1}
{#2}
+ }
+
+\cs_new_protected:Npn \__chemmacros_peek_if_paren:TF #1#2
+ { % (
+ \peek_charcode:NTF )
+ {#1}
+ { % [
+ \peek_charcode:NTF ]
+ {#1}
+ {#2}
+ }
+ }
+
+\cs_new_protected:Npn \__chemmacros_break_point_insert:nnn #1#2#3
+ {
+ \mode_if_math:TF
+ {#3}
+ {
+ \peek_meaning:NTF \group_end:
+ {#3}
+ {
+ \__chemmacros_peek_if_dash:TF
+ {#3}
+ {
+ \__chemmacros_peek_if_paren:TF
+ {#3}
+ {
+ \chemmacros_nobreak:
+ \tex_discretionary:D {#1} {#2} {#3}
+ \chemmacros_allow_hyphens:
+ }
+ }
+ }
+ }
+ }
+
+\dim_new:N \l__chemmacros_iupac_hyphen_pre_dim
+\dim_set:Nn \l__chemmacros_iupac_hyphen_pre_dim { .01em }
+\dim_new:N \l__chemmacros_iupac_hyphen_post_dim
+\dim_set:Nn \l__chemmacros_iupac_hyphen_post_dim { -.03em }
+\dim_new:N \l__chemmacros_iupac_break_dim
+\dim_set:Nn \l__chemmacros_iupac_break_dim { .03em }
+\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
+ { \tex_kern:D \l__chemmacros_iupac_hyphen_pre_dim - }
+ { }
+ {
+ \tex_kern:D \l__chemmacros_iupac_hyphen_pre_dim
+ -
+ \tex_kern:D \l__chemmacros_iupac_hyphen_post_dim
+ }
+ }
+
+\cs_new_protected:Npn \chemmacros_break_point:
+ {
+ \__chemmacros_break_point_insert:nnn
+ {-}
+ { }
+ {
+ \mode_if_math:TF
+ { | }
+ { \tex_kern:D \l__chemmacros_iupac_break_dim }
+ }
+ }
+
+\cs_new_protected:Npn \chemmacros_break_point_opening_paren:
+ { \__chemmacros_break_point_insert:nnn { - } { ( } { ( } }
+
+\cs_new_protected:Npn \chemmacros_break_point_closing_paren:
+ { \__chemmacros_break_point_insert:nnn { )- } { } { ) } }
+
+\cs_new_protected:Npn \chemmacros_break_point_opening_bracket:
+ { \__chemmacros_break_point_insert:nnn { - } { [ } { [ } }
+
+\cs_new_protected:Npn \chemmacros_break_point_closing_bracket:
+ { \__chemmacros_break_point_insert:nnn { ]- } { } { ] } }
+
+\cs_new_protected:Npn \chemmacros_superscript:n #1
+ { \mode_if_math:TF { \sp {#1} } { \textsuperscript {#1} } }
+
+\bool_new:N \l__chemmacros_inside_iupac_bool
+
+\seq_new:N \l__chemmacros_iupac_shorthands_seq
+\prop_new:N \l__chemmacros_iupac_shorthands_prop
+
+% #1: token
+% #2: definition
+\cs_new_protected:Npn \chemmacros_define_iupac_shorthand:NN #1#2
+ {
+ \seq_if_in:NnF \l__chemmacros_iupac_shorthands_seq {#1}
+ { \seq_put_right:Nn \l__chemmacros_iupac_shorthands_seq {#1} }
+ \prop_put:Nnn \l__chemmacros_iupac_shorthands_prop {#1}
+ { \char_set_active_eq:NN #1#2 }
+ }
+
+\cs_new_protected:Npn \chemmacros_remove_shorthand:N #1
+ {
+ \chemmacros_define_iupac_shorthand:NN #1 \c_empty_tl
+ \seq_remove_all:Nn \l__chemmacros_iupac_shorthands_seq {#1}
+ \prop_remove:Nn \l__chemmacros_iupac_shorthands_prop {#1}
+ }
+
+\prg_new_conditional:Npnn \chemmacros_if_iupac_shorthand:N #1 {p,T,F,TF}
+ {
+ \seq_if_in:NnTF \l__chemmacros_iupac_shorthands_seq {#1}
{ \prg_return_true: }
{ \prg_return_false: }
}
-\cs_generate_variant:Nn \chemmacros_if_compatibility:nnT {nV}
-% user checks:
-\NewExpandableDocumentCommand \IfChemCompatibilityTF {mm+m+m}
- { \chemmacros_if_compatibility:nnTF {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \chemmacros_for_all_iupac_shorthands_do:n #1
+ { \seq_map_inline:Nn \l__chemmacros_iupac_shorthands_seq {#1} }
+
+\cs_new_protected:Npn \chemmacros_activate_iupac_shorthand:N #1
+ { \chemmacros_if_iupac_shorthand:NT #1 { \char_set_catcode_active:N #1 } }
+
+\cs_new_protected:Npn \chemmacros_activate_iupac_shorthands:n #1
+ { \tl_map_inline:nn {#1} { \chemmacros_activate_iupac_shorthand:N ##1 } }
+
+\cs_new_protected:Npn \chemmacros_activate_all_iupac_shorthands:
+ {
+ \chemmacros_for_all_iupac_shorthands_do:n
+ { \chemmacros_activate_iupac_shorthand:N ##1 }
+ }
+
+\cs_new_protected:Npn \chemmacros_make_shorthands:
+ {
+ \chemmacros_if_document:T
+ {
+ \chemmacros_for_all_iupac_shorthands_do:n
+ { \prop_item:Nn \l__chemmacros_iupac_shorthands_prop {##1} }
+ }
+ }
+
+\NewDocumentCommand \ChemMakeIupacShorthands {}
+ { \chemmacros_make_shorthands: }
+
+\NewDocumentCommand \DeclareChemIUPACShorthand {mm}
+ { \chemmacros_define_iupac_shorthand:NN #1#2 }
+
+\NewDocumentCommand \NewChemIUPACShorthand {mm}
+ {
+ \chemmacros_if_iupac_shorthand:NTF #1
+ { \msg_error:nnn {chemmacros} {new-iupac-shorthand} {#1} }
+ { \chemmacros_define_iupac_shorthand:NN #1#2 }
+ }
+
+\NewDocumentCommand \ProvideChemIUPACShorthand {mm}
+ {
+ \chemmacros_if_iupac_shorthand:NTF #1
+ { \chemmacros_define_iupac_shorthand:NN #1#2 }
+ }
+
+\NewDocumentCommand \RenewChemIUPACShorthand {mm}
+ {
+ \chemmacros_if_iupac_shorthand:NTF #1
+ { \chemmacros_define_iupac_shorthand:NN #1#2 }
+ { \msg_error:nnn {chemmacros} {renew-iupac-shorthand} {#1} }
+ }
+
+\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
+
+\cs_new_protected:Npn \chemmacros_iupac:nn #1#2
+ {
+ \group_begin:
+ \bool_set_true:N \l__chemmacros_inside_iupac_bool
+ \bool_set_true:N \l__chemmacros_in_document_bool
+ \chemmacros_set_keys:nn {nomenclature} {#1}
+ \chemmacros_make_iupac:
+ \chemmacros_make_shorthands:
+ \tl_set_rescan:Nnn \l__chemmacros_tmpa_tl
+ { \chemmacros_activate_all_iupac_shorthands: }
+ {#2}
+ \l__chemmacros_tmpa_tl
+ \group_end:
+ }
+
+\cs_new_protected:Npn \chemmacros_iupac:n #1 { \chemmacros_iupac:nn {} {#1} }
+\cs_generate_variant:Nn \chemmacros_iupac:n {e}
+
+\NewDocumentCommand \iupac {O{}m} { \chemmacros_iupac:nn {#1} {#2} }
+
+% --------------------------------------------------------------------------
+% R(ectus)/S(inister):
+\NewChemIUPAC \rectus { \cip {R} }
+\NewChemIUPAC \sinister { \cip {S} }
+
+\LetChemIUPAC \R \rectus
+\LetChemIUPAC \S \sinister
+
+% E(ntgegen)/Z(usammen)
+\NewChemIUPAC \entgegen { \cip {E} }
+\NewChemIUPAC \zusammen { \cip {Z} }
+
+\LetChemIUPAC \E \entgegen
+\LetChemIUPAC \Z \zusammen
+
+% cis/trans
+\NewChemIUPAC \cis { \textit {cis} }
+\NewChemIUPAC \trans { \textit {trans} }
+
+% fac/mer
+\NewChemIUPAC \fac { \textit {fac} }
+\NewChemIUPAC \mer { \textit {mer} }
+
+% n
+\NewChemIUPAC \normal { \textit {n} }
+
+% tert
+\NewChemIUPAC \tert { \textit {tert} }
+
+% Italian descriptors - I forgot what they mean
+\NewChemIUPAC \sin { \textit {sin} }
+\NewChemIUPAC \ter { \textit {ter} }
+
+% Fischer
+\NewChemIUPAC \dexter { \textsc {d} }
+\NewChemIUPAC \laevus { \textsc {l} }
+
+\LetChemIUPAC \D \dexter
+\LetChemIUPAC \L \laevus
+
+% ortho/meta/para
+\NewChemIUPAC \ortho { \textit {o} }
+\NewChemIUPAC \meta { \textit {m} }
+\NewChemIUPAC \para { \textit {p} }
+
+% syn/anti
+\NewChemIUPAC \syn { \textit {syn} }
+\NewChemIUPAC \anti { \textit {anti} }
+
+% coordination chemistry:
+\NewChemIUPAC \hapto { \chemmacros_hapto:n }
+\NewChemIUPAC \dento { \chemmacros_dento:n }
+\NewChemIUPAC \bridge { \chemmacros_bridge:n }
+
+% attachments to heteroatoms / added hydrogen
+\NewChemIUPAC \hydrogen { \textit {H} }
+\NewChemIUPAC \oxygen { \textit {O} }
+\NewChemIUPAC \nitrogen { \textit {N} }
+\NewChemIUPAC \sulfur { \textit {S} }
+\NewChemIUPAC \phosphorus { \textit {P} }
+
+% atoms:
+\LetChemIUPAC \H \hydrogen
+\LetChemIUPAC \O \oxygen
+\LetChemIUPAC \N \nitrogen
+\LetChemIUPAC \Sf \sulfur
+\LetChemIUPAC \P \phosphorus
+
+% greek letters
+\NewChemIUPAC \a { \chemalpha }
+\NewChemIUPAC \b { \chembeta }
+\NewChemIUPAC \g { \chemgamma }
+\NewChemIUPAC \d { \chemdelta }
+\NewChemIUPAC \k { \chemkappa }
+\NewChemIUPAC \m { \chemmu }
+\NewChemIUPAC \n { \chemeta }
+\NewChemIUPAC \w { \chemomega }
+
+% --------------------------------------------------------------------------
+% latin phrases
+\tl_new:N \l__chemmacros_latin_format_tl
+
+\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
+ {
+ \group_begin:
+ \l__chemmacros_latin_format_tl {#1}
+ \group_end:
+ }
+
+\cs_new_protected:Npn \chemmacros_latin:n #1
+ { \chemmacros_write_latin:n {#1} }
+
+\cs_new_protected:Npn \chemmacros_define_latin:Nn #1#2
+ { \DeclareDocumentCommand #1 {O{}} { \latin [##1] {#2} } }
-\NewExpandableDocumentCommand \IfChemCompatibilityT {mm+m}
- { \chemmacros_if_compatibility:nnT {#1} {#2} {#3} }
+\NewDocumentCommand \latin {O{}m}
+ {
+ \group_begin:
+ \chemmacros_set_keys:nn {nomenclature} {#1}
+ \chemmacros_latin:n {#2}
+ \group_end:
+ }
-\NewExpandableDocumentCommand \IfChemCompatibilityF {mm+m}
- { \chemmacros_if_compatibility:nnF {#1} {#2} {#3} }
+\cs_undefine:N \invacuo
+\NewChemLatin \invacuo {in~vacuo}
+\NewChemLatin \abinitio {ab~initio}
+\NewChemLatin \insitu {in~situ}
% --------------------------------------------------------------------------
-% compatibility coding:
-\cs_new_protected:Npn \ChemCompatibility #1#2 \EndChemCompatibility
- { \chemmacros_if_compatibility:nnT {=} {#1} {#2} }
+% hyperref support
+% ?? unsure about adding IUPAC commands
+\hook_gput_code:nnn {package/hyperref/after} {chemmacros}
+ {
+ \pdfstringdefDisableCommands
+ {
+ % \cs_set:Npn \- { - } % maybe not a good idea...
+ % \cs_set:Npn \| { }
+ % \cs_set:Npn \pH { pH }
+ % \cs_set:Npn \pOH { pOH }
+ \cs_set:Npn \iupac #1 {#1}
+ \cs_set:Npn \cip #1 {(#1)}
+ \cs_set:Npn \cis {cis}
+ \cs_set:Npn \trans {trans}
+ \cs_set:Npn \tert {tert}
+ \cs_set:Npn \ortho {o}
+ \cs_set:Npn \meta {m}
+ \cs_set:Npn \para {p}
+ \cs_set:Npn \syn {syn}
+ \cs_set:Npn \anti {anti}
+ \cs_set:Npn \R {(R)}
+ \cs_set:Npn \S {(S)}
+ \cs_set:Npn \E {(E)}
+ \cs_set:Npn \Z {(Z)}
+ \cs_set:Npn \D {D}
+ \cs_set:Npn \L {L}
+ \cs_set:Npn \H {H}
+ \cs_set:Npn \O {O}
+ \cs_set:Npn \N {N}
+ \cs_set:Npn \Sf {S}
+ \cs_set:Npn \P {P}
+ \cs_set:Npn \dexter {D}
+ \cs_set:Npn \laevus {L}
+ \cs_set:Npn \rectus {(R)}
+ \cs_set:Npn \sinister {(S)}
+ \cs_set:Npn \entgegen {(E)}
+ \cs_set:Npn \zusammen {(Z)}
+ \cs_set:Npn \hydrogen {H}
+ \cs_set:Npn \oxygen {O}
+ \cs_set:Npn \nitrogen {N}
+ \cs_set:Npn \sulfur {S}
+ \cs_set:Npn \phosphorus {P}
+ \cs_set:Npn \chemprime {'}
+ }
+ }
-\cs_new_protected:Npn \ChemCompatibilityFrom #1#2 \EndChemCompatibility
- { \chemmacros_if_compatibility:nnT {>=} {#1} {#2} }
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{tikz}{2020/11/29 upright greek symbols}
+
+\ExplSyntaxOff
+\RequirePackage{tikz}
+\usetikzlibrary{calc,decorations.pathmorphing}
+\ExplSyntaxOn
+
+\tl_const:Nx \c_chemmacros_other_colon_tl { \token_to_str:N : }
+
+% --------------------------------------------------------------------------
+% TikZ drawings - helper macros
+\cs_new_protected:Npn \chemmacros_tikz_picture:nn #1#2
+ { \tikzpicture[{#1}] #2 \endtikzpicture }
+\cs_new_protected:Npn \chemmacros_tikz:nn #1#2 { \tikz[{#1}] {#2} }
+\cs_new_protected:Npn \chemmacros_tikz_draw:n #1 { \draw[{#1}] }
+\cs_new_protected:Npn \chemmacros_tikz_node:n #1 { \node[{#1}] }
+\cs_new_protected:Npn \chemmacros_tikz_shade:n #1 { \shade[{#1}] }
+\cs_new_protected:Npn \chemmacros_tikz_shadedraw:n #1 { \shadedraw[{#1}] }
+\cs_new_protected:Npn \chemmacros_tikz_node_in_draw:n #1 { node[{#1}] }
+
+\cs_generate_variant:Nn \chemmacros_tikz_picture:nn {xn}
+\cs_generate_variant:Nn \chemmacros_tikz_draw:n {x}
+\cs_generate_variant:Nn \chemmacros_tikz_node:n {x}
+\cs_generate_variant:Nn \chemmacros_tikz_shade:n {x}
+\cs_generate_variant:Nn \chemmacros_tikz_shadedraw:n {x}
+\cs_generate_variant:Nn \chemmacros_tikz_node_in_draw:n {x}
+
+% --------------------------------------------------------------------------
+% arrow tips for electron movement
+\dim_new:N \l__chemmacros_el_length_dim
+
+% full tip for pairs
+\pgfarrowsdeclare { el } { el }
+ {
+ \dim_set:Nn \l__chemmacros_el_length_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
+ \pgfarrowsrightextend { .5\pgflinewidth }
+ }
+ {
+ \dim_set:Nn \l__chemmacros_el_length_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfsetdash {} { 0pt }
+ \pgfsetroundjoin
+ \pgfsetroundcap
+ \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
+ { -\l__chemmacros_el_length_dim }
+ { -.3\l__chemmacros_el_length_dim }
+ }
+ \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfusepathqfillstroke
+ }
+
+% half tip on the left
+\pgfarrowsdeclare { left~el } { left~el }
+ {
+ \dim_set:Nn \l__chemmacros_el_length_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
+ \pgfarrowsrightextend { .5\pgflinewidth }
+ }
+ {
+ \dim_set:Nn \l__chemmacros_el_length_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfsetdash {} { 0pt }
+ \pgfsetroundjoin
+ \pgfsetroundcap
+ \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 } }
+ \pgfusepathqfillstroke
+ }
+
+% half tip in the right
+\pgfarrowsdeclare { right~el } { right~el }
+ {
+ \dim_set:Nn \l__chemmacros_el_length_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
+ \pgfarrowsrightextend { .5\pgflinewidth }
+ }
+ {
+ \dim_set:Nn \l__chemmacros_el_length_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfsetdash {} { 0pt }
+ \pgfsetroundjoin
+ \pgfsetroundcap
+ \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 } }
+ \pgfusepathqfillstroke
+ }
+% --------------------------------------------------------------------------
+% http://tex.stackexchange.com/a/25689/
+\pgfdeclaredecoration{wave}{initial}{
+ \state{initial}[
+ width = +0pt ,
+ next~ state = sine,
+ persistent~ precomputation = {
+ \pgfmathsetmacro\matchinglength{
+ \pgfdecoratedinputsegmentlength /
+ int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)
+ }
+ \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
+ }
+ ]{}
+ \state{sine}[width=\pgfdecorationsegmentlength]{
+ \pgfpathsine{
+ \pgfpoint
+ {0.25\pgfdecorationsegmentlength}
+ {0.5\pgfdecorationsegmentamplitude}
+ }
+ \pgfpathcosine{
+ \pgfpoint
+ {0.25\pgfdecorationsegmentlength}
+ {-0.5\pgfdecorationsegmentamplitude}
+ }
+ \pgfpathsine{
+ \pgfpoint
+ {0.25\pgfdecorationsegmentlength}
+ {-0.5\pgfdecorationsegmentamplitude}
+ }
+ \pgfpathcosine{
+ \pgfpoint
+ {0.25\pgfdecorationsegmentlength}
+ {0.5\pgfdecorationsegmentamplitude}
+ }
+ }
+ \state{final}{}
+}
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{isotopes}{2020/11/29 a macro to easily print element isotopes}
+
+\RequirePackage{elements}
-\cs_new_protected:Npn \ChemCompatibilityTo #1#2 \EndChemCompatibility
- { \chemmacros_if_compatibility:nnT {<} {#1} {#2} }
+\msg_new:nnn {chemmacros} {no-isotope}
+ { The~ isotope~ #2~ is~ not~ defined~ for~ element~ #1. }
+
+% --------------------------------------------------------------------------
+\tl_new:N \l__chemmacros_isotope_tl
+\tl_new:N \l__chemmacros_isotope_list_tl
+\seq_new:N \l__chemmacros_isotope_seq
+\seq_new:N \l__chemmacros_check_isotopes_seq
-\cs_new_protected:Npn \ChemCompatibilityBetween #1#2#3 \EndChemCompatibility
+% #1: atomic number|element symbol|element name
+% #2: tokenlist variable
+\cs_new_protected:Npn \chemmacros_get_atom_number:nN #1#2
+ {
+ \chemmacros_if_is_int:nTF {#1}
+ { \tl_set:Nn #2 {#1} }
+ {
+ \cs_if_exist:cTF { @elements@atom@number@ \str_lowercase:n {#1} }
+ { \tl_set:Nx #2 { \use:c { @elements@atom@number@ \str_lowercase:n {#1} } } }
+ { \tl_set:Nx #2 { \use:c { @elements@atom@name@num@ \str_lowercase:n {#1} } } }
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_get_atom_number:nN { V }
+
+% #1: atomic number|element symbol|element name
+% #2: tl to store the result in
+\cs_new_protected:Npn \chemmacros_get_isotope_list:nN #1#2
+ {
+ \chemmacros_get_atom_number:nN {#1} \l__chemmacros_isotope_tl
+ \tl_set:Nx #2
+ {
+ \use:c
+ {
+ @elements@atom@isotopes@
+ \int_to_roman:n {\l__chemmacros_isotope_tl}
+ }
+ }
+ }
+
+% #1: atomic number|element symbol|element name
+% #2: tokenlist variable
+\cs_new_protected:Npn \chemmacros_get_element_symbol:nN #1#2
+ {
+ \chemmacros_get_atom_number:nN {#1} \l__chemmacros_isotope_tl
+ \tl_set:Nx #2
+ {
+ \use:c
+ {
+ @elements@atom@symbol@num@
+ \int_to_roman:n {\l__chemmacros_isotope_tl}
+ }
+ }
+ }
+
+% #1: atomic number|element symbol|element name
+% #2: isotope number
+\prg_new_protected_conditional:Npnn \chemmacros_check_isotope:nn #1#2 {T,F,TF}
+ {
+ \chemmacros_get_isotopes:nN {#1} \l__chemmacros_check_isotopes_seq
+ \seq_if_in:NnTF \l__chemmacros_check_isotopes_seq {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\cs_generate_variant:Nn \chemmacros_check_isotope:nnF { V }
+
+% #1: atomic number|element symbol|element name
+% #2: tl to store the result in
+\cs_new_protected:Npn \chemmacros_get_main_isotope:nN #1#2
+ {
+ \chemmacros_get_isotope_list:nN {#1} \l__chemmacros_isotope_list_tl
+ \seq_set_split:NnV \l__chemmacros_isotope_seq {,} \l__chemmacros_isotope_list_tl
+ \seq_map_inline:Nn \l__chemmacros_isotope_seq
+ {
+ \chemmacros_read_isotope:nNN {##1}
+ \l__chemmacros_tmpa_bool
+ #2
+ \bool_if:NT \l__chemmacros_tmpa_bool
+ { \seq_map_break: }
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_get_main_isotope:nN { V }
+
+% #1: atomic number|element symbol|element name
+% #2: seq to store the results in
+\cs_new_protected:Npn \chemmacros_get_isotopes:nN #1#2
+ {
+ \seq_clear:N #2
+ \chemmacros_get_isotope_list:nN {#1} \l__chemmacros_tmpa_tl
+ \seq_set_split:NnV \l__chemmacros_isotope_seq {,} \l__chemmacros_tmpa_tl
+ \seq_map_inline:Nn \l__chemmacros_isotope_seq
+ {
+ \chemmacros_read_isotope:nNN {##1}
+ \l__chemmacros_tmpa_bool
+ \l__chemmacros_tmpa_tl
+ \seq_put_right:NV #2 \l__chemmacros_tmpa_tl
+ }
+ }
+
+% #1: boolean variable
+% #2: tokenlist variable
+% #3: isotope list entry
+\cs_new_protected:Npn \chemmacros_read_isotope:nNN #1#2#3
+ { \__chemmacros_read_isotope:NNw #2#3 !#1!! \q_stop }
+
+% \__chemmacros_read_isotope:NNw N N !!1!! \q_stop
+% \__chemmacros_read_isotope:NNw N N !1!! \q_stop
+\cs_new_protected:Npn \__chemmacros_read_isotope:NNw #1#2#3!#4!#5!#6 \q_stop
+ {
+ \tl_if_blank:nTF {#5}
+ {
+ \tl_set:Nn #2 {#4}
+ \bool_set_false:N #1
+ }
+ {
+ \tl_set:Nn #2 {#5}
+ \bool_set_true:N #1
+ }
+ }
+
+% --------------------------------------------------------------------------
+% #1: boolean: hide atomic number?
+% #2: nucleons, element symbol
+\cs_new_protected:Npn \chemmacros_isotope:nn #1#2
+ { \__chemmacros_isotope:nww {#1} #2,, \q_stop }
+
+\cs_new_protected:Npn \__chemmacros_isotope:nww #1#2,#3,#4 \q_stop
+ {
+ \tl_if_blank:nTF {#3}
+ {
+ \chemmacros_get_element_symbol:nN {#2} \l__chemmacros_tmpa_tl
+ \chemmacros_get_main_isotope:nN {#2} \l__chemmacros_tmpb_tl
+ \chemmacros_get_atom_number:nN {#2} \l__chemmacros_tmpc_tl
+ \bool_if:nTF {#1}
+ {
+ \chemmacros_isotope_write:VnV
+ \l__chemmacros_tmpb_tl
+ { }
+ \l__chemmacros_tmpa_tl
+ }
+ {
+ \chemmacros_isotope_write:VVV
+ \l__chemmacros_tmpb_tl
+ \l__chemmacros_tmpc_tl
+ \l__chemmacros_tmpa_tl
+ }
+ }
+ {
+ \chemmacros_get_element_symbol:nN {#3} \l__chemmacros_tmpa_tl
+ \chemmacros_get_atom_number:nN {#3} \l__chemmacros_tmpb_tl
+ \chemmacros_check_isotope:VnF
+ \l__chemmacros_tmpa_tl
+ {#2}
+ {
+ \chemmacros_get_element_symbol:nN {#3} \l__chemmacros_tmpa_tl
+ \msg_warning:nnVn {chemmacros} {no-isotope}
+ \l__chemmacros_tmpa_tl
+ {#2}
+ }
+ \chemmacros_get_element_symbol:nN {#3} \l__chemmacros_tmpa_tl
+ \bool_if:nTF {#1}
+ { \chemmacros_isotope_write:nnV {#2} { } \l__chemmacros_tmpa_tl }
+ {
+ \chemmacros_isotope_write:nVV {#2}
+ \l__chemmacros_tmpb_tl
+ \l__chemmacros_tmpa_tl
+ }
+ }
+ }
+
+\bool_new:N \l__chemmacros_isotope_super_bool
+\tl_new:N \l__chemmacros_isotope_side_connect_tl
+
+\chemmacros_define_keys:nn {isotopes}
+ {
+ format .choice: ,
+ format / super .code:n =
+ \bool_set_true:N \l__chemmacros_isotope_super_bool ,
+ format / side .code:n =
+ \bool_set_false:N \l__chemmacros_isotope_super_bool ,
+ format .initial:n = super ,
+ side-connect .tl_set:N = \l__chemmacros_isotope_side_connect_tl ,
+ side-connect .initial:n = -
+ }
+
+% #1: nucleons
+% #2: atomic number
+% #3: element symbol
+\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_chemformula:n {#3}
+ \tl_use:N \l__chemmacros_isotope_side_connect_tl
+ #1
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_isotope_write:nnn { VnV , VVV , nnV , nVV }
+
+% TODO: option for the layout of the written isotope: ^{12}_6C vs C-12
+
+\NewDocumentCommand \isotope { sm }
+ { \chemmacros_isotope:nn {#1} {#2} }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{mechanisms}{2020/11/29 reaction mechanisms}
+
+\RequirePackage{amstext}
+
+% --------------------------------------------------------------------------
+% reaction mechanisms
+% \mech[<type>]
+% <type> - substitutions: {}, 1, 2, se, 1e, 2e, ar
+% - eliminations: e, e1, e2, cb
+\tl_new:N \l__chemmacros_mechanisms_type_tl
+\tl_new:N \l__chemmacros_mechanisms_mol_tl
+\tl_new:N \l__chemmacros_mechanisms_ar_tl
+
+\cs_new_protected:Npn \__chemmacros_set_mechanisms:nnn #1#2#3
+ {
+ \tl_set:Nn \l__chemmacros_mechanisms_type_tl {#1}
+ \tl_set:Nn \l__chemmacros_mechanisms_mol_tl {#2}
+ \tl_set:Nn \l__chemmacros_mechanisms_ar_tl {#3}
+ }
+
+\chemmacros_define_keys:nn {mechanisms}
+ {
+ type .choice: ,
+ type / .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {N} }
+ \c_math_toggle_token
+ }
+ { }
+ } ,
+ type / 1 .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {N} }
+ \c_math_toggle_token
+ 1
+ }
+ { }
+ } ,
+ type / 2 .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {N} }
+ \c_math_toggle_token
+ 2
+ }
+ { }
+ } ,
+ type / se .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {E} }
+ \c_math_toggle_token
+ }
+ { }
+ } ,
+ type / 1e .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {E} }
+ \c_math_toggle_token
+ 1
+ }
+ { }
+ } ,
+ type / 2e .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {E} }
+ \c_math_toggle_token
+ 2
+ }
+ { }
+ } ,
+ type / ar .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {S}
+ {
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {E} }
+ \c_math_toggle_token
+ }
+ { Ar - }
+ } ,
+ type / e .code:n =
+ { \__chemmacros_set_mechanisms:nnn {E} { } { } } ,
+ type / e1 .code:n =
+ { \__chemmacros_set_mechanisms:nnn {E} {1} { } } ,
+ type / e2 .code:n =
+ { \__chemmacros_set_mechanisms:nnn {E} {2} { } } ,
+ type / cb .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn {E}
+ {
+ 1
+ \c_math_toggle_token
+ \c_math_subscript_token { \text {cb} }
+ \c_math_toggle_token
+ }
+ { }
+ } ,
+ type .default:n =
+ }
+
+\cs_new_protected:Npn \chemmacros_mechanisms:n #1
+ {
+ \tl_if_blank:nTF {#1}
+ { \chemmacros_set_keys:nn {mechanisms} { type } }
+ { \chemmacros_set_keys:nn {mechanisms} { type = #1 } }
+ \mbox
+ {
+ \tl_use:N \l__chemmacros_mechanisms_ar_tl
+ \tl_use:N \l__chemmacros_mechanisms_type_tl
+ \tl_use:N \l__chemmacros_mechanisms_mol_tl
+ }
+ }
+
+\NewDocumentCommand \mech {o}
+ {
+ \IfNoValueTF {#1}
+ { \chemmacros_mechanisms:n { } }
+ { \chemmacros_mechanisms:n {#1} }
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{newman}{2020/11/29 newman projections}
+
+% Newman projections
+\fp_new:N \l__chemmacros_newman_rel_angle_fp
+\fp_zero:N \l__chemmacros_newman_rel_angle_fp
+\fp_new:N \l__chemmacros_newman_tmp_angle_fp
+\fp_new:N \l__chemmacros_newman_abs_angle_fp
+\fp_zero:N \l__chemmacros_newman_abs_angle_fp
+\fp_new:N \l__chemmacros_newman_scale_fp
+\fp_set:Nn \l__chemmacros_newman_scale_fp {1}
+\fp_new:N \l__chemmacros_newman_x_fp
+\fp_new:N \l__chemmacros_newman_y_fp
+
+\tl_new:N \l__chemmacros_newman_tikz_ring_tl
+\tl_new:N \l__chemmacros_newman_tikz_front_tl
+\tl_new:N \l__chemmacros_newman_tikz_back_tl
+
+\bool_new:N \l__chemmacros_newman_tikz_back_bool
+
+\chemmacros_define_keys:nn {newman}
+ {
+ ring .tl_set:N = \l__chemmacros_newman_tikz_ring_tl ,
+ atoms .tl_set:N = \l__chemmacros_newman_tikz_front_tl ,
+ back-atoms .code:n =
+ {
+ \bool_set_true:N \l__chemmacros_newman_tikz_back_bool
+ \tl_set:Nn \l__chemmacros_newman_tikz_back_tl { #1 }
+ } ,
+ scale .fp_set:N = \l__chemmacros_newman_scale_fp ,
+ scale .default:n = 1 ,
+ angle .fp_set:N = \l__chemmacros_newman_abs_angle_fp ,
+ angle .default:n = 0
+ }
+
+% \newman[<keyval>](<angle>){<1>,<2>,<3>,<4>,<5>,<6>}
+\NewDocumentCommand \newman {od()m}
+ {
+ \group_begin:
+ \IfNoValueF {#1} { \chemmacros_set_keys:nn {newman} {#1} }
+ \IfNoValueTF {#2}
+ { \chemmacros_newman:nn { } {#3} }
+ { \chemmacros_newman:nn {#2} {#3} }
+ \group_end:
+ }
+
+% #1: angle
+% #2: csv list of atoms
+\cs_new_protected:Npn \chemmacros_newman:nn #1#2
+ { \__chemmacros_newman_feed_atoms:nw {#1}#2 ,,,,,, \q_stop }
+
+\cs_new_protected:Npn \__chemmacros_newman_feed_atoms:nw #1#2,#3,#4,#5,#6,#7,#8 \q_stop
+ { \chemmacros_newman_atoms:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} }
+
+% place atoms:
+% #1: angle
+% #2 - #7: atoms
+\cs_new_protected:Npn \chemmacros_newman_atoms:nnnnnnn #1#2#3#4#5#6#7
+ {
+ \tl_if_blank:nTF {#1}
+ {
+ \fp_set_eq:NN
+ \l__chemmacros_newman_rel_angle_fp
+ \l__chemmacros_newman_abs_angle_fp
+ }
+ { \fp_set:Nn \l__chemmacros_newman_rel_angle_fp {#1} }
+ \chemmacros_tikz_picture:xn
+ {
+ scale = \fp_to_decimal:N \l__chemmacros_newman_scale_fp ,
+ chemmacros_newman_atom_front / .style =
+ {
+ inner~sep = 0pt ,
+ outer~sep = 0pt ,
+ \exp_not:V \l__chemmacros_newman_tikz_front_tl
+ },
+ chemmacros_newman_atom_back / .style =
+ {
+ inner~sep = 0pt ,
+ outer~sep = 0pt ,
+ \bool_if:NTF \l__chemmacros_newman_tikz_back_bool
+ { \exp_not:V \l__chemmacros_newman_tikz_back_tl }
+ { \exp_not:V \l__chemmacros_newman_tikz_front_tl }
+ }
+ }
+ {
+ \chemmacros_tikz_draw:x
+ { \exp_not:V \l__chemmacros_newman_tikz_ring_tl }
+ (0pt,0pt) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
+ \chemmacros_newman_back_node:nn {30} {#6}
+ \chemmacros_newman_back_node:nn {150} {#7}
+ \chemmacros_newman_back_node:nn {270} {#5}
+ \chemmacros_newman_front_node:nn {90} {#2}
+ \chemmacros_newman_front_node:nn {210} {#3}
+ \chemmacros_newman_front_node:nn {330} {#4}
+ }
+ }
+
+% provide cartesian coordiantes from polar coordinates
+% #1: fp variable for x
+% #2: fp variable for y
+% #3: angle
+% #4: radius
+\cs_new_protected:Npn \chemmacros_polar_to_cartesian:NNnn #1#2#3#4
+ {
+ \fp_set:Nn #1 { #4 * cos( #3 / 180 * pi ) }% x
+ \fp_set:Nn #2 { #4 * sin( #3 / 180 * pi ) }% y
+ }
+
+% place back nodes
+\cs_new_protected:Npn \chemmacros_newman_back_node:nn #1#2
+ {
+ \group_begin:
+ \fp_add:Nn \l__chemmacros_newman_rel_angle_fp { #1 }
+ \chemmacros_polar_to_cartesian:NNnn
+ \l__chemmacros_newman_x_fp
+ \l__chemmacros_newman_y_fp
+ { \l__chemmacros_newman_rel_angle_fp }
+ { \l__chemmacros_newman_scale_fp }
+ \chemmacros_tikz_draw:x
+ { \exp_not:V \l__chemmacros_newman_tikz_ring_tl }
+ (
+ 15 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
+ 15 * \fp_to_dim:N \l__chemmacros_newman_y_fp
+ )
+ --
+ (
+ 30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
+ 30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
+ ) ;
+ \chemmacros_polar_to_cartesian:NNnn
+ \l__chemmacros_newman_x_fp
+ \l__chemmacros_newman_y_fp
+ { \l__chemmacros_newman_rel_angle_fp }
+ { \l__chemmacros_newman_scale_fp }
+ \chemmacros_tikz_node:x
+ {
+ chemmacros_newman_atom_back,
+ anchor = -180 + \fp_to_int:N \l__chemmacros_newman_rel_angle_fp
+ }
+ at
+ (
+ 31 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
+ 31 * \fp_to_dim:N \l__chemmacros_newman_y_fp
+ )
+ { #2 } ;
+ \group_end:
+ }
+\cs_generate_variant:Nn \chemmacros_newman_back_node:nn { nf }
+
+% place front nodes:
+\cs_new_protected:Npn \chemmacros_newman_front_node:nn #1#2
+ {
+ \chemmacros_polar_to_cartesian:NNnn
+ \l__chemmacros_newman_x_fp
+ \l__chemmacros_newman_y_fp
+ { #1 }
+ { \l__chemmacros_newman_scale_fp }
+ \chemmacros_tikz_draw:x
+ { \exp_not:V \l__chemmacros_newman_tikz_ring_tl }
+ (0pt,0pt) -- ++
+ (
+ 30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
+ 30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
+ ) ;
+ \chemmacros_polar_to_cartesian:NNnn
+ \l__chemmacros_newman_x_fp
+ \l__chemmacros_newman_y_fp
+ { #1 }
+ { \l__chemmacros_newman_scale_fp }
+ \chemmacros_tikz_node:x
+ { chemmacros_newman_atom_front, anchor = -180 + #1 }
+ at
+ (
+ 31 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
+ 31 * \fp_to_dim:N \l__chemmacros_newman_y_fp
+ )
+ { #2 } ;
+ }
+\cs_generate_variant:Nn \chemmacros_newman_front_node:nn { nf }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{orbital}{2020/11/29 drawing orbital shapes}
+
+% \orbital[<keyval>]{<type>}
+% variables:
+\bool_new:N \l__chemmacros_orbital_type_s_bool
+\bool_new:N \l__chemmacros_orbital_type_p_bool
+\bool_new:N \l__chemmacros_orbital_type_sp_bool
+\bool_new:N \l__chemmacros_orbital_type_sptwo_bool
+\bool_new:N \l__chemmacros_orbital_type_spthree_bool
+\bool_new:N \l__chemmacros_orbital_s_phase_bool
+\bool_set_true:N \l__chemmacros_orbital_s_phase_bool
+\bool_new:N \l__chemmacros_orbital_p_phase_bool
+\bool_set_true:N \l__chemmacros_orbital_p_phase_bool
+\bool_new:N \l__chemmacros_orbital_sp_phase_bool
+\bool_set_true:N \l__chemmacros_orbital_sp_phase_bool
+\bool_new:N \l__chemmacros_orbital_sptwo_phase_bool
+\bool_set_true:N \l__chemmacros_orbital_sptwo_phase_bool
+\bool_new:N \l__chemmacros_orbital_spthree_phase_bool
+\bool_set_true:N \l__chemmacros_orbital_spthree_phase_bool
+\bool_new:N \l__chemmacros_orbital_p_half_bool
+\bool_new:N \l__chemmacros_orbital_overlay_bool
+\bool_new:N \l__chemmacros_orbital_opacity_bool
+
+\tl_new:N \l__chemmacros_orbital_s_color_tl
+\tl_set:Nn \l__chemmacros_orbital_s_color_tl {black}
+\tl_new:N \l__chemmacros_orbital_s_phase_color_tl
+\tl_new:N \l__chemmacros_orbital_p_color_tl
+\tl_set:Nn \l__chemmacros_orbital_p_color_tl {black}
+\tl_new:N \l__chemmacros_orbital_p_pphase_color_tl
+\tl_new:N \l__chemmacros_orbital_p_mphase_color_tl
+\tl_new:N \l__chemmacros_orbital_sp_color_tl
+\tl_set:Nn \l__chemmacros_orbital_sp_color_tl {black}
+\tl_new:N \l__chemmacros_orbital_sp_pphase_color_tl
+\tl_new:N \l__chemmacros_orbital_sp_mphase_color_tl
+\tl_new:N \l__chemmacros_orbital_sptwo_color_tl
+\tl_set:Nn \l__chemmacros_orbital_sptwo_color_tl {black}
+\tl_new:N \l__chemmacros_orbital_sptwo_pphase_color_tl
+\tl_new:N \l__chemmacros_orbital_sptwo_mphase_color_tl
+\tl_new:N \l__chemmacros_orbital_spthree_color_tl
+\tl_set:Nn \l__chemmacros_orbital_spthree_color_tl {black}
+\tl_new:N \l__chemmacros_orbital_spthree_pphase_color_tl
+\tl_new:N \l__chemmacros_orbital_spthree_mphase_color_tl
+\tl_new:N \l__chemmacros_orbital_s_scale_tl
+\tl_set:Nn \l__chemmacros_orbital_s_scale_tl {1}
+\tl_new:N \l__chemmacros_orbital_p_scale_tl
+\tl_set:Nn \l__chemmacros_orbital_p_scale_tl {1}
+\tl_new:N \l__chemmacros_orbital_sp_scale_tl
+\tl_set:Nn \l__chemmacros_orbital_sp_scale_tl {1}
+\tl_new:N \l__chemmacros_orbital_sptwo_scale_tl
+\tl_set:Nn \l__chemmacros_orbital_sptwo_scale_tl {1}
+\tl_new:N \l__chemmacros_orbital_spthree_scale_tl
+\tl_set:Nn \l__chemmacros_orbital_spthree_scale_tl {1}
+
+\fp_new:N \l__chemmacros_orbital_angle_fp
+\fp_set:Nn \l__chemmacros_orbital_angle_fp {90}
+\fp_new:N \l__chemmacros_orbital_opacity_fp
+\fp_set:Nn \l__chemmacros_orbital_opacity_fp {0.5}
+
+\cs_new:Npn \__chemmacros_orbital_options:
+ {
+ \__chemmacros_orbital_overlay: , \__chemmacros_orbital_opacity: ,
+ inner~sep=0 , outer~sep=0 , line~width=.2pt ,
+ rotate = { \fp_use:N \l__chemmacros_orbital_angle_fp - 90 } ,
+ baseline ,
+ minimum~size = 0
+ }
+
+\cs_new:Npn \__chemmacros_orbital_overlay:
+ { \bool_if:NT \l__chemmacros_orbital_overlay_bool {overlay} }
+
+\cs_new:Npn \__chemmacros_orbital_opacity:
+ {
+ \bool_if:NT \l__chemmacros_orbital_opacity_bool
+ { opacity = { \fp_use:N \l__chemmacros_orbital_opacity_fp } }
+ }
+
+% --------------------------------------------------------------------------
+% s-orbitals
+\cs_new_protected:Npn \__chemmacros_orbital_type_s:
+ {
+ \bool_set_true:N \l__chemmacros_orbital_type_s_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_p_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
+ }
+
+\chemmacros_define_keys:nn {orbital/s}
+ {
+ phase .choice: ,
+ phase / + .code:n =
+ { \bool_set_true:N \l__chemmacros_orbital_s_phase_bool } ,
+ phase / - .code:n =
+ { \bool_set_false:N \l__chemmacros_orbital_s_phase_bool } ,
+ scale .tl_set:N = \l__chemmacros_orbital_s_scale_tl ,
+ color .tl_set:N = \l__chemmacros_orbital_s_color_tl
+ }
+
+\cs_new_protected:Npn \__chemmacros_orbital_s_draw:n #1
+ {
+ \chemmacros_set_keys:nn {orbital/s} {#1}
+ \bool_if:NTF \l__chemmacros_orbital_s_phase_bool
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_s_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_s_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_s_color_tl ! 90 }
+ }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
+ { black ! 5 }
+ }
+ \chemmacros_tikz_picture:xn
+ { \__chemmacros_orbital_options: }
+ {
+ \chemmacros_tikz_shade:x
+ { ball~color = \exp_not:V \l__chemmacros_orbital_s_phase_color_tl }
+ (0pt,0pt) circle (\exp_not:V \l__chemmacros_orbital_s_scale_tl * .6em) ;
+ }
+ }
+
+% --------------------------------------------------------------------------
+% p-orbitals
+\cs_new_protected:Npn \__chemmacros_orbital_type_p:
+ {
+ \bool_set_false:N \l__chemmacros_orbital_type_s_bool
+ \bool_set_true:N \l__chemmacros_orbital_type_p_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
+ }
+
+\chemmacros_define_keys:nn {orbital/p}
+ {
+ phase .choice: ,
+ phase / + .code:n =
+ { \bool_set_true:N \l__chemmacros_orbital_p_phase_bool } ,
+ phase / - .code:n =
+ { \bool_set_false:N \l__chemmacros_orbital_p_phase_bool } ,
+ scale .tl_set:N = \l__chemmacros_orbital_p_scale_tl ,
+ angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
+ color .tl_set:N = \l__chemmacros_orbital_p_color_tl ,
+ half .bool_set:N = \l__chemmacros_orbital_p_half_bool ,
+ half .default:n = true
+ }
+
+\cs_new_protected:Npn \__chemmacros_orbital_p_draw:n #1
+ {
+ \chemmacros_set_keys:nn {orbital/p} {#1}
+ \bool_if:NTF \l__chemmacros_orbital_p_phase_bool
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_p_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_p_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
+ { black ! 5 }
+
+ }
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_p_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_p_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
+ { black ! 5 }
+ }
+ \chemmacros_tikz_picture:xn
+ { \__chemmacros_orbital_options: }
+ {
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_p_pphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_p_pphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_p_scale_tl * 2em ,
+ \l__chemmacros_orbital_p_scale_tl * 2em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_p_scale_tl * 2em ,
+ \l__chemmacros_orbital_p_scale_tl * 2em
+ )
+ .. (0pt,0pt);
+ \bool_if:NF \l__chemmacros_orbital_p_half_bool
+ {
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_p_mphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_p_mphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_p_scale_tl * 2em ,
+ - \l__chemmacros_orbital_p_scale_tl * 2em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_p_scale_tl * 2em ,
+ - \l__chemmacros_orbital_p_scale_tl * 2em
+ )
+ .. (0pt,0pt);
+ }
+ }
+ }
+
+% --------------------------------------------------------------------------
+% sp-orbitals
+\cs_new_protected:Npn \__chemmacros_orbital_type_sp:
+ {
+ \bool_set_false:N \l__chemmacros_orbital_type_s_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_p_bool
+ \bool_set_true:N \l__chemmacros_orbital_type_sp_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
+ }
+
+\chemmacros_define_keys:nn {orbital/sp}
+ {
+ phase .choice: ,
+ phase / + .code:n =
+ { \bool_set_true:N \l__chemmacros_orbital_sp_phase_bool } ,
+ phase / - .code:n =
+ { \bool_set_false:N \l__chemmacros_orbital_sp_phase_bool } ,
+ scale .tl_set:N = \l__chemmacros_orbital_sp_scale_tl ,
+ angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
+ color .tl_set:N = \l__chemmacros_orbital_sp_color_tl
+ }
+
+\cs_new_protected:Npn \__chemmacros_orbital_sp_draw:n #1
+ {
+ \chemmacros_set_keys:nn {orbital/sp} {#1}
+ \bool_if:NTF \l__chemmacros_orbital_sp_phase_bool
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sp_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sp_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
+ { black ! 5 }
+
+ }
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sp_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sp_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
+ { black ! 5 }
+ }
+ \chemmacros_tikz_picture:xn
+ { \__chemmacros_orbital_options: }
+ {
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_sp_pphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_sp_pphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_sp_scale_tl * 2em ,
+ \l__chemmacros_orbital_sp_scale_tl * 2em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_sp_scale_tl * 2em ,
+ \l__chemmacros_orbital_sp_scale_tl * 2em
+ )
+ .. (0pt,0pt);
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_sp_mphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_sp_mphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_sp_scale_tl * .6em ,
+ - \l__chemmacros_orbital_sp_scale_tl * .6em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_sp_scale_tl * .6em ,
+ - \l__chemmacros_orbital_sp_scale_tl * .6em
+ )
+ .. (0pt,0pt);
+ }
+ }
+
+% --------------------------------------------------------------------------
+% sp2-orbitals
+\cs_new_protected:Npn \__chemmacros_orbital_type_sptwo:
+ {
+ \bool_set_false:N \l__chemmacros_orbital_type_s_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_p_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
+ \bool_set_true:N \l__chemmacros_orbital_type_sptwo_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
+ }
+
+\chemmacros_define_keys:nn {orbital/sp2}
+ {
+ phase .choice: ,
+ phase / + .code:n =
+ { \bool_set_true:N \l__chemmacros_orbital_sptwo_phase_bool } ,
+ phase / - .code:n =
+ { \bool_set_false:N \l__chemmacros_orbital_sptwo_phase_bool } ,
+ scale .tl_set:N = \l__chemmacros_orbital_sptwo_scale_tl ,
+ angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
+ color .tl_set:N = \l__chemmacros_orbital_sptwo_color_tl
+ }
+
+\cs_new_protected:Npn \__chemmacros_orbital_sptwo_draw:n #1
+ {
+ \chemmacros_set_keys:nn {orbital/sp2} {#1}
+ \bool_if:NTF \l__chemmacros_orbital_sptwo_phase_bool
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
+ { black ! 5 }
+
+ }
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
+ { black ! 5 }
+ }
+ \chemmacros_tikz_picture:xn
+ { \__chemmacros_orbital_options: }
+ {
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_sptwo_pphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_sptwo_pphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
+ \l__chemmacros_orbital_sptwo_scale_tl * 2em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
+ \l__chemmacros_orbital_sptwo_scale_tl * 2em
+ )
+ .. (0pt,0pt);
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_sptwo_mphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_sptwo_mphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
+ - \l__chemmacros_orbital_sptwo_scale_tl * .8em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
+ - \l__chemmacros_orbital_sptwo_scale_tl * .8em
+ )
+ .. (0pt,0pt);
+ }
+ }
+
+% --------------------------------------------------------------------------
+% sp3-orbitals
+\cs_new_protected:Npn \__chemmacros_orbital_type_spthree:
+ {
+ \bool_set_false:N \l__chemmacros_orbital_type_s_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_p_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
+ \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
+ \bool_set_true:N \l__chemmacros_orbital_type_spthree_bool
+ }
+
+\chemmacros_define_keys:nn {orbital/sp3}
+ {
+ phase .choice: ,
+ phase / + .code:n =
+ { \bool_set_true:N \l__chemmacros_orbital_spthree_phase_bool } ,
+ phase / - .code:n =
+ { \bool_set_false:N \l__chemmacros_orbital_spthree_phase_bool } ,
+ scale .tl_set:N = \l__chemmacros_orbital_spthree_scale_tl ,
+ angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
+ color .tl_set:N = \l__chemmacros_orbital_spthree_color_tl
+ }
+
+\cs_new_protected:Npn \__chemmacros_orbital_spthree_draw:n #1
+ {
+ \chemmacros_set_keys:nn {orbital/sp3} {#1}
+ \bool_if:NTF \l__chemmacros_orbital_spthree_phase_bool
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl {!}
+ {
+ \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_spthree_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_spthree_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl {black!5}
+ }
+ {
+ \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl {!}
+ {
+ \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_spthree_color_tl }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
+ { \tl_use:N \l__chemmacros_orbital_spthree_color_tl ! 90 }
+ }
+ \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl {black!5}
+ }
+ \chemmacros_tikz_picture:xn
+ { \__chemmacros_orbital_options: }
+ {
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_spthree_pphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_spthree_pphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_spthree_scale_tl * 2em ,
+ \l__chemmacros_orbital_spthree_scale_tl * 2em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_spthree_scale_tl * 2em ,
+ \l__chemmacros_orbital_spthree_scale_tl * 2em
+ )
+ .. (0pt,0pt);
+ \chemmacros_tikz_shadedraw:x
+ {
+ draw = \exp_not:V \l__chemmacros_orbital_spthree_mphase_color_tl ,
+ ball~color = \exp_not:V \l__chemmacros_orbital_spthree_mphase_color_tl
+ }
+ (0pt,0pt) .. controls ++
+ (
+ - \l__chemmacros_orbital_spthree_scale_tl * 1em ,
+ - \l__chemmacros_orbital_spthree_scale_tl * 1em
+ )
+ and ++
+ (
+ \l__chemmacros_orbital_spthree_scale_tl * 1em ,
+ - \l__chemmacros_orbital_spthree_scale_tl * 1em
+ )
+ .. (0pt,0pt);
+ }
+ }
+
+% --------------------------------------------------------------------------
+% main command
+\chemmacros_define_keys:nn {orbital}
+ {
+ overlay .bool_set:N = \l__chemmacros_orbital_overlay_bool ,
+ overlay .default:n = true ,
+ opacity .code:n =
+ {
+ \fp_compare:nTF { #1 = 1 }
+ { \bool_set_false:N \l__chemmacros_orbital_opacity_bool }
+ { \bool_set_true:N \l__chemmacros_orbital_opacity_bool }
+ \fp_set:Nn \l__chemmacros_orbital_opacity_fp {#1}
+ }
+ }
+
+\chemmacros_define_keys:nn {orbital/type}
+ {
+ s .code:n = { \__chemmacros_orbital_type_s: } ,
+ p .code:n = { \__chemmacros_orbital_type_p: } ,
+ sp .code:n = { \__chemmacros_orbital_type_sp: } ,
+ sp2 .code:n = { \__chemmacros_orbital_type_sptwo: } ,
+ sp3 .code:n = { \__chemmacros_orbital_type_spthree: }
+ }
+
+\cs_new_protected:Npn \chemmacros_orbital:n #1
+ {
+ \bool_if:NT \l__chemmacros_orbital_type_s_bool
+ { \__chemmacros_orbital_s_draw:n {#1} }
+ \bool_if:NT \l__chemmacros_orbital_type_p_bool
+ { \__chemmacros_orbital_p_draw:n {#1} }
+ \bool_if:NT \l__chemmacros_orbital_type_sp_bool
+ { \__chemmacros_orbital_sp_draw:n {#1} }
+ \bool_if:NT \l__chemmacros_orbital_type_sptwo_bool
+ { \__chemmacros_orbital_sptwo_draw:n {#1} }
+ \bool_if:NT \l__chemmacros_orbital_type_spthree_bool
+ { \__chemmacros_orbital_spthree_draw:n {#1} }
+ }
+
+\NewDocumentCommand \orbital {om}
+ {
+ \group_begin:
+ \chemmacros_set_keys:nn {orbital/type} {#2}
+ \IfNoValueTF {#1}
+ { \chemmacros_orbital:n { } }
+ { \chemmacros_orbital:n {#1} }
+ \group_end:
+ }
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{polymers}{2020/11/29 polymers}
+
+% --------------------------------------------------------------------------
+% copolymers
+\NewChemIUPAC \copolymer { \textit {co} }
+\LetChemIUPAC \co \copolymer
+
+\NewChemIUPAC \statistical { \textit {stat} }
+\LetChemIUPAC \stat \statistical
+
+\NewChemIUPAC \random { \textit {ran} }
+\LetChemIUPAC \ran \random
+
+\NewChemIUPAC \alternating { \textit {alt} }
+\LetChemIUPAC \alt \alternating
+
+\NewChemIUPAC \periodic { \textit {per} }
+\LetChemIUPAC \per \periodic
+
+\NewChemIUPAC \block { \textit {block} }
+\NewChemIUPAC \graft { \textit {graft} }
+
+% --------------------------------------------------------------------------
+% non-linear (co)polymers
+\NewChemIUPAC \blend { \textit {blend} }
+\NewChemIUPAC \comb { \textit {comb} }
+
+\NewChemIUPAC \complex { \textit {compl} }
+\LetChemIUPAC \compl \complex
+
+\NewChemIUPAC \cyclic { \textit {cyclo} }
+\LetChemIUPAC \cyclo \cyclic
+
+\NewChemIUPAC \branch { \textit {branch} }
+\NewChemIUPAC \network { \textit {net} }
+\LetChemIUPAC \net \network
+
+\NewChemIUPAC \ipnetwork { \textit {ipn} }
+\LetChemIUPAC \ipn \ipnetwork
+
+\NewChemIUPAC \sipnetwork { \textit {sipn} }
+\LetChemIUPAC \sipn \sipnetwork
+
+\NewChemIUPAC \star { \textit {star} }
+
+% --------------------------------------------------------------------------
+
+\tl_new:N \l__chemmacros_polymer_delimiter_left_tl
+\tl_new:N \l__chemmacros_polymer_delimiter_right_tl
+
+\tl_new:N \l__chemmacros_polymer_subscript_tl
+\tl_new:N \l__chemmacros_polymer_superscript_tl
+
+\dim_new:N \l__chemmacros_polymer_delimiter_height_dim
+\dim_new:N \l__chemmacros_polymer_delimiter_depth_dim
+
+\cs_new_protected:Npn \__chemmacros_set_polymer_delimiters:NN #1#2
+ {
+ \tl_set:Nn \l__chemmacros_polymer_delimiter_left_tl {#1}
+ \tl_set:Nn \l__chemmacros_polymer_delimiter_right_tl {#2}
+ }
+
+% #1: height
+% #2: depth
+% #3: opening node
+% #4: closing node
+% #5: subscript
+% #6: superscript
+\cs_new_protected:Npn \chemmacros_make_polymer_braces:nnnnnn #1#2#3#4#5#6
+ {
+ \dim_set:Nn \l__chemmacros_polymer_delimiter_height_dim { (#1+#2)/2 }
+ \dim_set:Nn \l__chemmacros_polymer_delimiter_depth_dim { (#1-#2)/2 }
+ \chemmacros_tikz_picture:nn {remember~ picture, overlay }
+ {
+ \chemmacros_tikz_node:n
+ { at = (#3) , yshift = \l__chemmacros_polymer_delimiter_depth_dim }
+ {
+ \c_math_toggle_token
+ \tex_left:D \l__chemmacros_polymer_delimiter_left_tl
+ \tex_vrule:D
+ height \l__chemmacros_polymer_delimiter_height_dim
+ depth \l__chemmacros_polymer_delimiter_height_dim
+ width \c_zero_dim
+ \tex_right:D .
+ \c_math_toggle_token
+ } ;
+ \chemmacros_tikz_node:n
+ { at = (#4) , yshift = \l__chemmacros_polymer_delimiter_depth_dim }
+ {
+ \c_math_toggle_token
+ \tex_left:D .
+ \tex_vrule:D
+ height \l__chemmacros_polymer_delimiter_height_dim
+ depth \l__chemmacros_polymer_delimiter_height_dim
+ width \c_zero_dim
+ \tex_right:D \l__chemmacros_polymer_delimiter_right_tl
+ \c_math_subscript_token
+ { \hbox_overlap_right:n { \smash {#5} } }
+ \c_math_superscript_token
+ { \hbox_overlap_right:n { \smash {#6} } }
+ \c_math_toggle_token
+ } ;
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_make_polymer_braces:nnnnnn {nnnnVV}
+
+\chemmacros_define_keys:nn {polymers}
+ {
+ delimiters .code:n = \__chemmacros_set_polymer_delimiters:NN #1 ,
+ delimiters .initial:n = [] ,
+ superscript .tl_set:N = \l__chemmacros_polymer_superscript_tl ,
+ subscript .tl_set:N = \l__chemmacros_polymer_subscript_tl ,
+ subscript .initial:n = $n$
+ }
+
+\NewDocumentCommand \makepolymerdelims {O{}momm}
+ {
+ \group_begin:
+ \chemmacros_set_keys:nn {polymers} {#1}
+ \IfNoValueTF {#3}
+ {
+ \chemmacros_make_polymer_braces:nnnnVV {#2} {#2} {#4} {#5}
+ \l__chemmacros_polymer_subscript_tl
+ \l__chemmacros_polymer_superscript_tl
+ }
+ {
+ \chemmacros_make_polymer_braces:nnnnVV {#2} {#3} {#4} {#5}
+ \l__chemmacros_polymer_subscript_tl
+ \l__chemmacros_polymer_superscript_tl
+ }
+ \group_end:
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{reactions}{2022/01/13 reaction environments}
+
+\RequirePackage{mathtools}
+
+% --------------------------------------------------------------------------
+\cs_new_protected:Npn \__chemmacros_record_for_lor:nnnnn #1#2#3#4#5
+ {
+ \tl_if_eq:nnT {#1} {reaction}
+ {
+ \group_begin:
+ % we need to prevent \Hy@make@anchor from being written to the lor
+ % file:
+ \bool_if:NT \l__chemmacros_hyperref_bool
+ { \cs_set:Npn \Hy@make@anchor {} }
+ \addcontentsline {lor} {reaction}
+ {
+ \tl_use:N \l__chemmacros_reaction_lorname_tl
+ \tl_use:N \c_space_tl
+ #2 #3 #4 #5
+ \tl_use:N \g__chemmacros_reaction_description_tl
+ }
+ \tl_gclear:N \g__chemmacros_reaction_description_tl
+ \group_end:
+ }
+ }
+
+% 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
+ {
+ \@namedef{MT_tagform_#1:n}##1
+ {
+ % this is the original part:
+ \maketag@@@{#3\ignorespaces#2{##1}\unskip\@@italiccorr#4}
+ % this is added => this disturbs hyperref:
+ \__chemmacros_record_for_lor:nnnnn
+ {#1} {#3} {#2} {##1} {#4}
+ }
+ }
+ }
+
+\tl_new:N \g__chemmacros_reaction_description_tl
+
+\cs_new_protected:Npn \chemmacros_add_reaction_description:n #1
+ {
+ \tl_if_blank:nF {#1}
+ { \tl_gset:Nn \g__chemmacros_reaction_description_tl {:~#1} }
+ }
+
+\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 \listofreactions
+ {
+ \__chemmacros_reaction_heading:V \reactionlistname
+ \@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 }
+ }
+ }
+
+\ChemCleverefSupport {reaction}
+ { \chemmacros_translate:n {reaction} }
+ [ \chemmacros_translate:n {Reaction} ]
+ { \chemmacros_translate:n {reactions} }
+ [ \chemmacros_translate:n {Reactions} ]
+
+\hook_gput_code:nnn {package/cleveref/after} {chemmacros}
+ {
+ \creflabelformat {reaction}
+ {
+ #2
+ \l__chemmacros_reactions_tag_open_tl
+ #1
+ \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:
+ {
+ \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}
+ }
+
+% switch back to equation tags
+\cs_new_protected:Npn \__chemmacros_end_reaction:
+ {
+ \setcounter {reaction} { \value {equation} }
+ \setcounter {equation} { \value {chemmacros_save_reaction} }
+ }
+
+\tl_new:N \l__chemmacros_reactions_args_tl
+
+\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
+ {
+ \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
+ }
+
+% #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
+ {
+ \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_end_reaction:
+ \ignorespacesafterend
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_declare_reaction_env:nnnn {nnnV}
+
+\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
+ \seq_set_split:Nnn \l__chemmacros_tmpa_seq {\\} {#3}
+ \int_set:Nn \l__chemmacros_tmpa_int
+ { \seq_count:N \l__chemmacros_tmpa_seq }
+ \int_zero:N \l__chemmacros_tmpb_int
+ \seq_map_inline:Nn \l__chemmacros_tmpa_seq
+ {
+ \int_incr:N \l__chemmacros_tmpb_int
+ \seq_clear:N \l__chemmacros_tmpc_seq
+ \seq_set_split:Nnn \l__chemmacros_tmpb_seq {&} {##1}
+ \seq_map_inline:Nn \l__chemmacros_tmpb_seq
+ {
+ \seq_put_right:Nn \l__chemmacros_tmpc_seq
+ { \chemmacros_reaction:n {####1} }
+ }
+ \tl_put_right:Nx \l__chemmacros_tmpa_tl
+ { \seq_use:Nn \l__chemmacros_tmpc_seq {&} }
+ \int_compare:nF
+ { \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
+ \end
+ }
+
+\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 }
+
+\NewChemMacroset* {Reaction} {mO{}m}
+ { \chemmacros_define_reaction:nnn {#1} {#3} {#2} }
+
+\NewChemReaction {reaction} {equation}
+\NewChemReaction {reaction*} {equation*}
+\NewChemReaction {reactions} {align}
+\NewChemReaction {reactions*} {align*}
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{redox}{2020/11/29 oxidation numbers, redox reactions}
+
+\RequirePackage{mathtools,relsize}
+
+\msg_new:nnn {chemmacros} {redox}
+ { \token_to_str:N #1 \c_space_tl : ~ #2 ~ \msg_line_context: . }
+
+
+% --------------------------------------------------------------------------
+% oxidation numbers
+% \ox{<number>,<atom>}
+\bool_new:N \l__chemmacros_ox_sign_bool
+\bool_new:N \l__chemmacros_ox_integer_bool
+\bool_new:N \l__chemmacros_ox_explicit_sign_bool
+\bool_new:N \l__chemmacros_ox_explicit_zero_sign_bool
+\bool_new:N \l__chemmacros_ox_format_roman_bool
+\bool_new:N \l__chemmacros_ox_decimal_marker_comma_bool
+\bool_new:N \l__chemmacros_ox_parse_bool
+\bool_new:N \l__chemmacros_ox_side_bool
+\bool_new:N \l__chemmacros_ox_super_bool
+\bool_new:N \l__chemmacros_ox_top_bool
+\bool_new:N \l__chemmacros_ox_align_center_bool
+
+\tl_new:N \l__chemmacros_ox_format_tl
+
+\int_new:N \l__chemmacros_ox_number_int
+\fp_new:N \l__chemmacros_ox_number_fp
+
+\cs_new_protected:Npn \__chemmacros_ox_format:n #1
+ { { \l__chemmacros_ox_format_tl {#1} } }
+
+\cs_new_protected:Npn \__chemmacros_ox_process_number:n #1
+ {
+ \bool_if:NTF \l__chemmacros_ox_parse_bool
+ {
+ \tl_if_in:nnTF {#1} { / }
+ { \__chemmacros_ox_fraction:w #1 \q_stop }
+ {
+ \__chemmacros_ox_sign:n {#1}
+ \__chemmacros_ox_value:n {#1}
+ }
+ }
+ {#1}
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_fraction:w #1/#2 \q_stop
+ {
+ \group_begin:
+ \bool_set_false:N \l__chemmacros_ox_format_roman_bool
+ \__chemmacros_ox_sign:n {#1}
+ \bool_if:NTF \l__chemmacros_ox_side_bool
+ { \chemmacros_ox_text_frac:nn }
+ { \chemmacros_ox_super_frac:nn }
+ { \__chemmacros_ox_value:n {#1} }
+ {#2}
+ \group_end:
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_sign:n #1
{
\bool_lazy_and:nnT
- { \chemmacros_if_compatibility_p:nn {>=} {#1} }
- { \chemmacros_if_compatibility_p:nn {<} {#2} }
- {#3}
+ { \fp_compare_p:n { #1 > 0 } }
+ { \l__chemmacros_ox_explicit_sign_bool }
+ { \c_math_toggle_token + \c_math_toggle_token }
+ \bool_lazy_all:nT
+ {
+ { \fp_compare_p:n { #1 = 0 } }
+ { \l__chemmacros_ox_explicit_sign_bool }
+ { \l__chemmacros_ox_explicit_zero_sign_bool }
+ }
+ { \c_math_toggle_token \pm \c_math_toggle_token }
+ \fp_compare:nT { #1 < 0 }
+ { \c_math_toggle_token - \c_math_toggle_token }
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_value:n #1
+ {
+ \fp_set:Nn \l__chemmacros_ox_number_fp { abs(#1) }
+ \__chemmacros_ox_is_integer:n { \l__chemmacros_ox_number_fp }
+ \bool_if:NTF \l__chemmacros_ox_format_roman_bool
+ { \__chemmacros_fp_to_Roman:n { \l__chemmacros_ox_number_fp } }
+ {
+ \bool_if:NTF \l__chemmacros_ox_integer_bool
+ {
+ \c_math_toggle_token
+ \__chemmacros_fp_to_arabic:n { \l__chemmacros_ox_number_fp }
+ \c_math_toggle_token
+ }
+ {
+ \c_math_toggle_token
+ \fp_use:N \l__chemmacros_ox_number_fp
+ \c_math_toggle_token
+ }
+ }
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_is_integer:n #1
+ {
+ \fp_compare:nNnTF {#1} = { round((#1) + 1 , 0 ) - 1 }
+ { \bool_set_true:N \l__chemmacros_ox_integer_bool }
+ {
+ \bool_set_false:N \l__chemmacros_ox_integer_bool
+ \bool_set_false:N \l__chemmacros_ox_format_roman_bool
+ }
+ }
+
+\cs_new_protected:Npn \__chemmacros_fp_to_Roman:n #1
+ {
+ \group_begin:
+ \fp_compare:nNnTF {#1} = { 0 }
+ {0}
+ { \int_to_Roman:n { \fp_to_int:n {#1} } }
+ \group_end:
+ }
+
+\cs_new_protected:Npn \__chemmacros_fp_to_arabic:n #1
+ {
+ \group_begin:
+ \bool_if:NTF \l__chemmacros_ox_decimal_marker_comma_bool
+ {
+ \tl_set:Nx \l__chemmacros_tmpa_tl { \fp_to_decimal:n {#1} }
+ \tl_replace_once:Nnn \l__chemmacros_tmpa_tl {.} { {,} }
+ \tl_use:N \l__chemmacros_tmpa_tl
+ }
+ { \fp_to_decimal:n {#1} }
+ \group_end:
+ }
+
+\tl_new:N \l__chemmacros_ox_side_connect_tl
+
+\cs_new_protected:Npn \__chemmacros_ox_write:nn #1#2
+ {
+ \tl_if_blank:nT {#1}
+ { \msg_error:nnn {chemmacros} {redox} {\ox} {oxidation~number~missing} }
+ \tl_if_blank:nT {#2}
+ { \msg_error:nnn {chemmacros} {redox} {\ox} {oxidation-atom~missing} }
+ \hbox_set:Nn \l__chemmacros_tmpa_box
+ {
+ \chemmacros_text:n
+ {
+ \__chemmacros_ox_format:n
+ { \relsize {-3} \__chemmacros_ox_process_number:n {#1} }
+ }
+ }
+ \hbox_set:Nn \l__chemmacros_tmpb_box { \chemmacros_chemformula:n {#2} }
+ \chemmacros_math:n
+ {
+ \bool_if:NT \l__chemmacros_ox_super_bool
+ {
+ \box_use:N \l__chemmacros_tmpb_box
+ \c_math_superscript_token { \box_use:N \l__chemmacros_tmpa_box }
+ }
+ \bool_if:NT \l__chemmacros_ox_side_bool
+ {
+ \chemmacros_text:n
+ {
+ \box_use:N \l__chemmacros_tmpb_box
+ \tl_use:N \l__chemmacros_ox_side_connect_tl
+ (
+ \__chemmacros_ox_format:n
+ { \__chemmacros_ox_process_number:n {#1} }
+ )
+ }
+ }
+ \bool_if:NT \l__chemmacros_ox_top_bool
+ {
+ \bool_if:NF \l__chemmacros_ox_align_center_bool
+ {
+ \hbox_set_to_wd:Nnn \l__chemmacros_tmpa_box
+ { \box_wd:N \l__chemmacros_tmpb_box }
+ { \rlap { \hbox_unpack:N \l__chemmacros_tmpa_box } \hfil }
+ }
+ \overset
+ {
+ \bool_if:NTF \l__chemmacros_ox_align_center_bool
+ { \clap }
+ { \use:n }
+ { \box_use:N \l__chemmacros_tmpa_box }
+ }
+ { \box_use:N \l__chemmacros_tmpb_box }
+ }
+ }
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_pos_top:
+ {
+ \bool_set_true:N \l__chemmacros_ox_top_bool
+ \bool_set_false:N \l__chemmacros_ox_super_bool
+ \bool_set_false:N \l__chemmacros_ox_side_bool
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_pos_super:
+ {
+ \bool_set_false:N \l__chemmacros_ox_top_bool
+ \bool_set_true:N \l__chemmacros_ox_super_bool
+ \bool_set_false:N \l__chemmacros_ox_side_bool
+ }
+
+\cs_new_protected:Npn \__chemmacros_ox_pos_side:
+ {
+ \bool_set_false:N \l__chemmacros_ox_top_bool
+ \bool_set_false:N \l__chemmacros_ox_super_bool
+ \bool_set_true:N \l__chemmacros_ox_side_bool
+ }
+
+\chemmacros_define_keys:nn {redox}
+ {
+ pos .choice: ,
+ pos / top .code:n = \__chemmacros_ox_pos_top: ,
+ pos / super .code:n = \__chemmacros_ox_pos_super: ,
+ pos / side .code:n = \__chemmacros_ox_pos_side: ,
+ pos .initial:n = super ,
+ side-connect .tl_set:N = \l__chemmacros_ox_side_connect_tl ,
+ side-connect .initial:n = \, ,
+ text-frac .code:n =
+ \cs_set_protected:Npn \chemmacros_ox_text_frac:nn ##1##2 {#1} ,
+ text-frac .initial:n = \chemfrac[text]{#1}{#2} ,
+ super-frac .code:n =
+ \cs_set_protected:Npn \chemmacros_ox_super_frac:nn ##1##2 {#1} ,
+ super-frac .initial:n = \chemfrac[superscript]{#1}{#2} ,
+ roman .bool_set:N = \l__chemmacros_ox_format_roman_bool ,
+ roman .default:n = true ,
+ roman .initial:n = true ,
+ parse .bool_set:N = \l__chemmacros_ox_parse_bool ,
+ parse .default:n = true ,
+ parse .initial:n = true ,
+ explicit-sign .bool_set:N = \l__chemmacros_ox_explicit_sign_bool ,
+ explicit-sign .default:n = true ,
+ decimal-marker .choice: ,
+ decimal-marker / comma .code:n =
+ { \bool_set_true:N \l__chemmacros_ox_decimal_marker_comma_bool } ,
+ decimal-marker / point .code:n =
+ { \bool_set_false:N \l__chemmacros_ox_decimal_marker_comma_bool } ,
+ decimal-marker .initial:n = point ,
+ align .choice: ,
+ align / center .code:n =
+ \bool_set_true:N \l__chemmacros_ox_align_center_bool ,
+ align / right .code:n =
+ \bool_set_false:N \l__chemmacros_ox_align_center_bool ,
+ align .initial:n = center ,
+ explicit-zero-sign .bool_set:N = \l__chemmacros_ox_explicit_zero_sign_bool ,
+ explicit-zero-sign .default:n = true ,
+ format .tl_set:N = \l__chemmacros_ox_format_tl
+ }
+
+
+% \ox[<keyval>]{<num>,<atom>}
+% \ox*[<keyval>]{<num>,<atom>} => always number on the top
+\cs_new_protected:Npn \chemmacros_ox:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \chemmacros_set_keys:nn {redox} {#2}
+ \tl_if_blank:nF {#1} { \__chemmacros_ox_pos_top: }
+ \__chemmacros_ox_write:nn {#3} {#4}
+ \group_end:
+ }
+
+\NewDocumentCommand \ox { sO{}>{\SplitArgument{1}{,}}m }
+ {
+ \IfBooleanTF {#1}
+ { \chemmacros_ox:nnnn {#1} {#2} #3 }
+ { \chemmacros_ox:nnnn { } {#2} #3 }
+ }
+
+% ---------------------------------------------------------------------------
+% redox reactions
+\tl_new:N \l__chemmacros_redox_begin_tl
+\tl_new:N \l__chemmacros_redox_end_tl
+\tl_new:N \l__chemmacros_redox_tikz_tl
+\tl_new:N \l__chemmacros_redox_shift_tl
+\tl_new:N \l__chemmacros_redox_anchor_tl
+\tl_new:N \l__chemmacros_redox_side_tl
+
+\fp_new:N \l__chemmacros_redox_shift_fp
+
+\dim_new:N \l__chemmacros_redox_sep_dim
+\dim_new:N \l__chemmacros_redox_sep_default_dim
+\dim_set:Nn \l__chemmacros_redox_sep_default_dim {.2em}
+\dim_new:N \l__chemmacros_redox_dist_dim
+\dim_set:Nn \l__chemmacros_redox_dist_dim {.6em}
+
+% place and name nodes:
+% \OX{<name>,<atom>}
+\NewDocumentCommand \OX { >{\SplitArgument{1}{,}}m }
+ { \chemmacros_redox_partner:nn #1 }
+
+% TODO: add option to make `#2' be parsed as chem formula
+\cs_new_protected:Npn \chemmacros_redox_partner:nn #1#2
+ {
+ \legacy_if:nTF {measuring@}
+ {
+ \group_begin:
+ \tikz[baseline=(#1.base)] { \node [inner~sep=0pt] (#1) {#2} ; }
+ \group_end:
+ }
+ {
+ \tl_if_blank:nT {#1}
+ { \msg_error:nnnn {chemmacros} {redox} {\OX} {node~name~missing} }
+ \tl_if_blank:nT {#2}
+ { \msg_error:nnnn {chemmacros} {redox} {\OX} {atom~missing} }
+ \tikz[baseline=(#1.base),remember~picture]
+ { \node [inner~sep=0pt] (#1) {#2} ; }
+ }
+ }
+
+\cs_new_protected:Npn \__chemmacros_redox_coordinates:nn #1#2
+ {
+ \tl_set:Nn \l__chemmacros_redox_begin_tl {#1}
+ \tl_set:Nn \l__chemmacros_redox_end_tl {#2}
+ }
+
+\cs_new_protected:Npn \chemmacros_redox:nnnnn #1#2#3#4#5
+ {
+ \tl_clear:N \l__chemmacros_redox_begin_tl
+ \tl_clear:N \l__chemmacros_redox_end_tl
+ \tl_clear:N \l__chemmacros_redox_tikz_tl
+ \__chemmacros_redox_coordinates:nn {#1} {#2}
+ \tl_if_blank:nF {#3}
+ { \tl_set:Nn \l__chemmacros_redox_tikz_tl {#3} }
+ \tl_if_blank:nTF {#4}
+ {
+ \fp_set:Nn \l__chemmacros_redox_shift_fp {1}
+ \tl_set:Nn \l__chemmacros_redox_anchor_tl {above}
+ \tl_set:Nn \l__chemmacros_redox_side_tl {north}
+ \dim_set_eq:NN
+ \l__chemmacros_redox_sep_dim
+ \l__chemmacros_redox_sep_default_dim
+ }
+ {
+ \fp_compare:nNnTF {#4} < {0}
+ {
+ \tl_set:Nn \l__chemmacros_redox_anchor_tl {below}
+ \tl_set:Nn \l__chemmacros_redox_side_tl {south}
+ \exp_args:NNo \dim_set:Nn \l__chemmacros_redox_sep_dim
+ { - \l__chemmacros_redox_sep_default_dim }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_redox_anchor_tl {above}
+ \tl_set:Nn \l__chemmacros_redox_side_tl {north}
+ \dim_set_eq:NN
+ \l__chemmacros_redox_sep_dim
+ \l__chemmacros_redox_sep_default_dim
+ }
+ \fp_set:Nn \l__chemmacros_redox_shift_fp {#4}
+ }
+ \tl_set:Nx \l__chemmacros_redox_shift_tl
+ { \fp_to_decimal:N \l__chemmacros_redox_shift_fp }
+ \tikz[remember~picture,overlay]
+ {
+ \chemmacros_tikz_draw:x { \exp_not:V \l__chemmacros_redox_tikz_tl }
+ ($
+ (\l__chemmacros_redox_begin_tl .
+ \l__chemmacros_redox_side_tl)+(0,\l__chemmacros_redox_sep_dim)
+ $)
+ --
+ ++(0,\l__chemmacros_redox_shift_tl * \l__chemmacros_redox_dist_dim) -|
+ node [pos=.25,\l__chemmacros_redox_anchor_tl] { {#5} }
+ ($
+ (\l__chemmacros_redox_end_tl .
+ \l__chemmacros_redox_side_tl)+(0,\l__chemmacros_redox_sep_dim)
+ $) ;
+ }
+ }
+
+\NewDocumentCommand \redox { >{\SplitArgument{1}{,}}r()oom }
+ {
+ \IfNoValueT {#1}
+ {
+ \msg_error:nnnn {chemmacros} {redox} {\redox}
+ {You~need~to~specify~coordinates}
+ }
+ \IfNoValueTF {#2}
+ { \chemmacros_redox:nnnnn #1 { } { } {#4} }
+ {
+ \IfNoValueTF {#3}
+ { \chemmacros_redox:nnnnn #1 {#2} { } {#4} }
+ { \chemmacros_redox:nnnnn #1 {#2} {#3} {#4} }
+ }
+ }
+
+% redox-keys
+\chemmacros_define_keys:nn {redox}
+ {
+ dist .dim_set:N = \l__chemmacros_redox_dist_dim ,
+ dist .initial:n = {.6em} ,
+ sep .dim_set:N = \l__chemmacros_redox_sep_default_dim ,
+ sep .initial:n = {.2em}
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{xfrac}{2020/11/29 use xfrac package with chemmacros}
+
+\RequirePackage{xfrac}
+
+% --------------------------------------------------------------------------
+
+% #1: type
+% #2: numerator
+% #3: denominator
+\cs_new_protected:Npn \chemmacros_frac:nnn #1#2#3
+ {
+ \IfInstanceExistTF {xfrac} {chemmacros-frac-\f@family-#1}
+ { \sfrac [chemmacros-frac-\f@family-#1] {#2} {#3} }
+ { \sfrac [chemmacros-frac-default-#1]{#2} {#3} }
+ }
+
+\NewDocumentCommand \chemfrac {O{text}mm}
+ { \chemmacros_frac:nnn {#1} {#2} {#3} }
+
+% --------------------------------------------------------------------------
+
+% default:
+\DeclareInstance {xfrac} {chemmacros-frac-cmr-superscript} {text}
+ {
+ numerator-top-sep = -.1ex ,
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = cmr
+ }
+
+\DeclareInstance {xfrac} {chemmacros-frac-cmr-text} {text}
+ {
+ numerator-top-sep = 0ex ,
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = cmr
+ }
+
+% computer modern (same as default):
+\DeclareInstance {xfrac} {chemmacros-frac-cmr-superscript} {text}
+ {
+ numerator-top-sep = -.1ex ,
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = cmr
+ }
+
+\DeclareInstance {xfrac} {chemmacros-frac-cmr-text} {text}
+ {
+ numerator-top-sep = 0ex ,
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = cmr
+ }
+
+% Linux Libertine T lining:
+\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TLF-text} {text}
+ {
+ numerator-top-sep = 0ex ,
+ slash-left-kern = 0em ,
+ slash-right-kern = .05em ,
+ slash-symbol-font = LinuxLibertineT-TLF
+ }
+
+\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TLF-superscript} {text}
+ {
+ scale-factor = 1.2 ,
+ denominator-bot-sep = -.1ex ,
+ numerator-top-sep = -.1ex ,
+ slash-left-kern = .1em ,
+ slash-right-kern = .1em ,
+ slash-symbol-font = LinuxLibertineT-TLF
+ }
+
+% Linux Libertine T oldstyle:
+\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TOsF-text} {text}
+ {
+ denominator-bot-sep = .1ex ,
+ numerator-top-sep = -.2ex ,
+ slash-left-kern = 0em ,
+ slash-right-kern = 0em ,
+ slash-symbol-font = LinuxLibertineT-TOsF
+ }
+
+\DeclareInstance {xfrac} {chemmacros-frac-LinuxLibertineT-TOsF-superscript} {text}
+ {
+ scale-factor = 1.2 ,
+ denominator-bot-sep = -.1ex ,
+ numerator-top-sep = -.2ex ,
+ slash-left-kern = 0em ,
+ slash-right-kern = .1em ,
+ slash-symbol-font = LinuxLibertineT-TOsF
+ }
+
+% lmodern:
+\DeclareInstance {xfrac} {chemmacros-frac-lmr-superscript} {text}
+ {
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = lmr
+ }
+
+\DeclareInstance {xfrac} {chemmacros-frac-lmr-text} {text}
+ {
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = lmr
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{scheme}{2022/01/13 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
+\prop_new:N \l__chemmacros_float_methods_prop
+\prop_new:N \l__chemmacros_float_definitions_prop
+
+\msg_new:nnn {chemmacros} {float-method}
+ { Detected~ float~ defining~ method~ `#1'. }
+
+% --------------------------------------------------------------------------
+% #1: name
+% #2: check
+\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} }
+ }
+
+% the order in which the methods are defined determines in which order the
+% methods will be checked at begin document:
+\chemmacros_define_float_method:nnn {KOMA}
+ { \cs_if_exist_p:N \KOMAClassName }
+ {
+ \bool_lazy_or:nnTF
+ { \chemmacros_if_class_loaded_p:n {scrbook} }
+ { \chemmacros_if_class_loaded_p:n {scrreprt} }
+ { \DeclareNewTOC[ counterwithin = chapter, }
+ { \DeclareNewTOC[ }
+ type = #1 ,
+ types = #1s ,
+ float ,
+ tocentryindent = 1.5em ,
+ tocentrynumwidth = 2.3em ,
+ name = \chemmacros_translate:n {#1-name} ,
+ listname = { \exp_not:N \chemmacros_translate:n {#1-list} }
+ ]{#2}
+ }
+
+\chemmacros_define_float_method:nnn {memoir}
+ { \chemmacros_if_class_loaded_p:n {memoir} }
+ {
+ \newfloat [chapter] {#1} {#2} {\chemmacros_translate:n {#1-name}}
+ \cs_set:cpn {the#1} {\thechapter.\arabic {#1}}
+ \newlistof {listof#1s} {#2} {\chemmacros_translate:n {#1-list}}
+ \newlistentry [chapter] {#1} {#2} {0}
+ \cftsetindents {#1} {0em} {2.3em}
+ \tl_put_right:Nn \@memfront@floats
+ { \counterwithout {#1} {chapter} }
+ \tl_put_right:Nn \@memmain@floats
+ { \counterwithin {#1} {chapter} }
+ \tl_put_right:Nn \@memback@floats
+ {
+ \counterwithin {#1} {chapter}
+ \setcounter {#1} {0}
+ }
+ \legacy_if:nT {artopt}
+ { \counterwithout {#1} {chapter} }
+ \apptocmd \insertchapterspace
+ { \addtocontents {#2} { \protect \addvspace {10pt} } }
+ {}
+ {}
+ }
+
+\chemmacros_define_float_method:nnn {tocbasic}
+ { \chemmacros_if_package_loaded_p:n {tocbasic} }
+ {
+ \DeclareNewTOC[
+ type = #1 ,
+ types = #1s ,
+ float ,
+ name = \chemmacros_translate:n {#1-name} ,
+ listname = {\exp_not:N \chemmacros_translate:n {#1-list}}
+ ]{#2}
+ }
+
+\chemmacros_define_float_method:nnn {newfloat}
+ { \chemmacros_if_package_loaded_p:n {newfloat} }
+ {
+ \DeclareFloatingEnvironment[{
+ fileext = #2 ,
+ listname = {\exp_not:N \chemmacros_translate:n {#1-list}} ,
+ name = \chemmacros_translate:n {#1-name}
+ }]{#1}
+ }
+
+\chemmacros_define_float_method:nnn {floatrow}
+ { \chemmacros_if_package_loaded_p:n {floatrow} }
+ {
+ \DeclareNewFloatType{#1}{%
+ fileext = #2,
+ placement = htp,
+ name = \chemmacros_translate:n {#1-name}
+ }
+ \cs_new_protected:cpn {listof#1s}
+ { \listof {#1} {\chemmacros_translate:n {#1-list}} }
+ }
+
+\chemmacros_define_float_method:nnn {float}
+ { \chemmacros_if_package_loaded_p:n {float} }
+ {
+ \newfloat {#1} {htp} {#2}
+ \floatname {#1} {\chemmacros_translate:n {#1-name}}
+ \cs_new_protected:cpn {listof#1s}
+ { \listof {#1} {\chemmacros_translate:n {#1-list}} }
+ }
+
+% --------------------------------------------------------------------------
+% checks if one of the above defined methods is active. The first one found
+% 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_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
+ }
+
+\hook_gput_code:nnn {begindocument/before} {chemmacros}
+ {
+ \chemmacros_if_package_loaded:nF {chemscheme}
+ {
+ \chemmacros_check_float_methods:
+ \chemmacros_define_float:nn {scheme} {los}
+ }
+ }
+
+% --------------------------------------------------------------------------
+\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
+\cs_new_protected:Npn \chemmacros_define_float:nn #1#2
+ {
+ \bool_lazy_and:nnT
+ { !\cs_if_exist_p:c {#1} }
+ { !\cs_if_exist_p:c {end#1} }
+ {
+ \bool_if:NTF \l__chemmacros_float_def_bool
+ {
+ \prop_get:NVN \l__chemmacros_float_definitions_prop
+ \l__chemmacros_float_method_tl
+ \l__chemmacros_tmpa_tl
+ \tl_use:N \l__chemmacros_tmpa_tl
+ \__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
+ }
+ }
+ \cs_set:cpn {#1name} {\chemmacros_translate:n {#1-name}}
+ \cs_set:cpn {list#1name} {\chemmacros_translate:n {#1-list}}
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{spectroscopy}{2021/07/24 environment for spectroscopic data}
+
+\RequirePackage{siunitx}
+
+% spectroscopy
+\tl_new:N \g__chemmacros_nmr_isotope_tl
+\tl_new:N \l__chemmacros_nmr_isotope_default_tl
+\tl_set:Nn \l__chemmacros_nmr_isotope_default_tl { 1 }
+\tl_new:N \l__chemmacros_nmr_coupling_nuclei_tl
+\tl_new:N \l__chemmacros_nmr_coupling_nuclei_pre_tl
+\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_pre_tl { ( }
+\tl_new:N \l__chemmacros_nmr_coupling_nuclei_post_tl
+\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_post_tl { ) }
+\tl_new:N \l__chemmacros_nmr_coupling_bonds_tl
+\tl_new:N \l__chemmacros_nmr_coupling_bonds_pre_tl
+\tl_new:N \l__chemmacros_nmr_coupling_bonds_post_tl
+\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_pre_tl { }
+\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_post_tl { \! }
+\tl_new:N \l__chemmacros_nmr_coupling_symbol_tl
+\tl_set:Nn \l__chemmacros_nmr_coupling_symbol_tl { J }
+\tl_new:N \g__chemmacros_nmr_element_coupled_tl
+\tl_new:N \g__chemmacros_nmr_element_tl
+\tl_new:N \l__chemmacros_nmr_element_default_tl
+\tl_set:Nn \l__chemmacros_nmr_element_default_tl { H }
+\tl_new:N \l__chemmacros_nmr_format_tl
+\tl_new:N \l__chemmacros_nmr_delta_tl
+\tl_new:N \l__chemmacros_nmr_coupling_unit_tl
+\tl_set:Nn \l__chemmacros_nmr_coupling_unit_tl { \hertz }
+\tl_new:N \l__chemmacros_nmr_unit_tl
+\tl_set:Nn \l__chemmacros_nmr_unit_tl { \mega\hertz }
+\tl_new:N \l__chemmacros_nmr_list_setup_tl
+\tl_set:Nn \l__chemmacros_nmr_list_setup_tl
+ {
+ \topsep\z@skip \partopsep\z@skip
+ \itemsep\z@ \parsep\z@ \itemindent\z@
+ \leftmargin\z@
+ }
+\tl_new:N \l__chemmacros_nmr_position_tl
+\tl_new:N \l__chemmacros_nmr_element_method_connector_tl
+\tl_set:Nn \l__chemmacros_nmr_element_method_connector_tl {-}
+\tl_new:N \l__chemmacros_nmr_method_tl
+\tl_set:Nn \l__chemmacros_nmr_method_tl {NMR}
+
+\bool_new:N \l__chemmacros_nmr_coupling_nuclei_sub_bool
+\bool_new:N \l__chemmacros_nmr_frequency_bool
+\bool_new:N \l__chemmacros_nmr_solvent_bool
+\bool_new:N \l__chemmacros_nmr_delimiters_bool
+\bool_new:N \l__chemmacros_nmr_comma_bool
+\bool_new:N \l__chemmacros_nmr_inner_bool
+\bool_new:N \l__chemmacros_nmr_position_side_bool
+\bool_new:N \l__chemmacros_nmr_parse_bool
+\bool_set_true:N \l__chemmacros_nmr_parse_bool
+\bool_new:N \l__chemmacros_nmr_list_bool
+\bool_new:N \l__chemmacros_nmr_use_equal_bool
+\bool_new:N \l__chemmacros_nmr_custom_command_active_bool
+\bool_new:N \l__chemmacros_nmr_custom_command_used_bool
+
+\skip_new:N \l__chemmacros_nmr_space_skip
+\skip_set:Nn \l__chemmacros_nmr_space_skip { .16667em }
+
+\cs_new_protected:Npn \__chemmacros_nmr_nucleus:nn #1#2
+ {
+ \tl_gset:Nn \g__chemmacros_nmr_isotope_tl {#1}
+ \tl_if_in:nnTF {#2} {[} % ]
+ { \__chemmacros_nmr_element:w #2 \q_stop }
+ {
+ \tl_gset:No \g__chemmacros_nmr_element_tl {#2}
+ \tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
+ }
+ }
+\cs_generate_variant:Nn \__chemmacros_nmr_nucleus:nn { VV }
+
+\cs_new_protected:Npn \__chemmacros_nmr_nucleus:w #1,#2 \q_stop
+ {
+ \tl_gset:Nn \g__chemmacros_nmr_isotope_tl {#1}
+ \tl_if_in:nnTF {#2} {[} % ]
+ { \__chemmacros_nmr_element:w #2 \q_stop }
+ {
+ \tl_gset:No \g__chemmacros_nmr_element_tl {#2}
+ \tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
+ }
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_element:w #1[#2] \q_stop
+ {
+ \tl_gset:Nn \g__chemmacros_nmr_element_tl {#1}
+ \tl_gset:Nn \g__chemmacros_nmr_element_coupled_tl {#2}
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_default_nucleus:w #1,#2 \q_stop
+ {
+ \tl_set:Nn \l__chemmacros_nmr_isotope_default_tl {#1}
+ \tl_set:Nn \l__chemmacros_nmr_element_default_tl {#2}
+ }
+
+\tl_new:N \l__chemmacros_nmr_base_format_tl
+
+\chemmacros_define_keys:nn {spectroscopy}
+ { nmr-base-format .tl_set:N = \l__chemmacros_nmr_base_format_tl }
+
+\cs_new_protected:Npn \__chemmacros_nmr_base:nn #1#2
+ {
+ \group_begin:
+ \tl_use:N \l__chemmacros_nmr_base_format_tl
+ \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
+ {
+ \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { \{ }
+ \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} }
+ \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 }
+ { \g__chemmacros_nmr_element_coupled_tl }
+ }
+ \tl_use:N \l__chemmacros_nmr_element_method_connector_tl
+ \tl_use:N \l__chemmacros_nmr_method_tl
+ \group_end:
+ }
+
+\cs_generate_variant:Nn \__chemmacros_nmr_base:nn { VV }
+
+\cs_new_protected:Npn \__chemmacros_nmr_frequency:n #1
+ {
+ \tl_if_in:nnTF {#1} {,}
+ { \__chemmacros_nmr_frequency_aux_i:w #1 \q_stop }
+ { \__chemmacros_nmr_frequency_aux_ii:n {#1} }
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_frequency_aux_i:w #1,#2 \q_stop
+ { \SI {#1} {#2} }
+
+\cs_new_protected:Npn \__chemmacros_nmr_frequency_aux_ii:n #1
+ { \SI {#1} { \tl_use:N \l__chemmacros_nmr_unit_tl } }
+
+\cs_new_eq:NN \__chemmacros_nmr_number:n \use:n
+\cs_new_eq:NN \__chemmacros_nmr_position:n \use:n
+
+\chemmacros_define_keys:nn {spectroscopy}
+ {
+ unit .tl_set:N = \l__chemmacros_nmr_unit_tl ,
+ unit .default:n = \mega\hertz ,
+ nucleus .code:n =
+ { \__chemmacros_nmr_default_nucleus:w #1 \q_stop } ,
+ nucleus .default:n = {1,H} ,
+ format .tl_set:N = \l__chemmacros_nmr_format_tl ,
+ method .tl_set:N = \l__chemmacros_nmr_method_tl ,
+ connector .tl_set:N = \l__chemmacros_nmr_element_method_connector_tl ,
+ pos-number .choice: ,
+ pos-number / sub .code:n =
+ \tl_set:Nn \l__chemmacros_nmr_position_tl {_}
+ \bool_set_false:N \l__chemmacros_nmr_position_side_bool ,
+ pos-number / super .code:n =
+ \tl_set:Nn \l__chemmacros_nmr_position_tl {^}
+ \bool_set_false:N \l__chemmacros_nmr_position_side_bool ,
+ pos-number / side .code:n =
+ \tl_set:Nn \l__chemmacros_nmr_position_tl {-}
+ \bool_set_true:N \l__chemmacros_nmr_position_side_bool ,
+ pos-number / .initial:n = side ,
+ coupling-unit .tl_set:N = \l__chemmacros_nmr_coupling_unit_tl ,
+ coupling-pos .choice: ,
+ coupling-pos / sub .code:n =
+ \bool_set_true:N \l__chemmacros_nmr_coupling_nuclei_sub_bool ,
+ coupling-pos / side .code:n =
+ \bool_set_false:N \l__chemmacros_nmr_coupling_nuclei_sub_bool ,
+ coupling-nuclei-pre .tl_set:N =
+ \l__chemmacros_nmr_coupling_nuclei_pre_tl ,
+ coupling-nuclei-post .tl_set:N =
+ \l__chemmacros_nmr_coupling_nuclei_post_tl ,
+ coupling-bonds-pre .tl_set:N =
+ \l__chemmacros_nmr_coupling_bonds_pre_tl ,
+ coupling-bonds-post .tl_set:N =
+ \l__chemmacros_nmr_coupling_bonds_post_tl ,
+ coupling-symbol .tl_set:N =
+ \l__chemmacros_nmr_coupling_symbol_tl ,
+ atom-number-cs .code:n =
+ \cs_set_eq:NN \__chemmacros_nmr_number:n #1 ,
+ atom-number-space .skip_set:N = \l__chemmacros_nmr_space_skip ,
+ coupling-pos-cs .code:n =
+ \cs_set_eq:NN \__chemmacros_nmr_position:n #1 ,
+ parse .bool_set:N = \l__chemmacros_nmr_parse_bool ,
+ delta .code:n =
+ \tl_set:Nn \l__chemmacros_nmr_delta_tl {\,#1} ,
+ list .bool_set:N = \l__chemmacros_nmr_list_bool ,
+ list .default:n = true ,
+ list-setup .tl_set:N = \l__chemmacros_nmr_list_setup_tl ,
+ use-equal .bool_set:N = \l__chemmacros_nmr_use_equal_bool ,
+ use-equal .default:n = true
+ }
+
+\cs_new_protected:Npn \chemmacros_define_nmr:Nn #1#2
+ {
+ \cs_if_exist:NTF #1
+ {
+ \RenewDocumentCommand #1 {s}
+ { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
+ }
+ {
+ \NewDocumentCommand #1 {s}
+ { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
+ }
+ }
+
+\NewChemMacroset {NMR} {mm}
+ { \chemmacros_define_nmr:Nn #1 {#2} }
+
+\NewDocumentCommand \NMR { sG{}D(){}O{} }
+ {
+ \IfBooleanTF {#1}
+ { \chemmacros_nmr:nnnn {*} {#2} {#3} {#4} }
+ { \chemmacros_nmr:nnnn { } {#2} {#3} {#4} }
+ }
+
+\hook_gput_code:nnn {begindocument} {chemmacros}
+ {
+ % \NMR{<num>,<elem>}(<num>,<unit>)[<solvent>] ALL arguments are optional
+ % \NMR* same but without ": $\delta$" at end
+ \cs_new_protected:Npn \chemmacros_nmr:nnnn #1#2#3#4
+ {
+ \bool_if:NT \l__chemmacros_nmr_list_bool { \item \scan_stop: }
+ \group_begin:
+ \mode_leave_vertical:
+ \bool_set_false:N \l__chemmacros_nmr_frequency_bool
+ \bool_set_false:N \l__chemmacros_nmr_solvent_bool
+ \tl_if_empty:nF {#3}
+ { \bool_set_true:N \l__chemmacros_nmr_frequency_bool }
+ \tl_if_empty:nF {#4}
+ { \bool_set_true:N \l__chemmacros_nmr_solvent_bool }
+ \bool_lazy_or:nnT
+ { \l__chemmacros_nmr_frequency_bool }
+ { \l__chemmacros_nmr_solvent_bool }
+ { \bool_set_true:N \l__chemmacros_nmr_delimiters_bool }
+ \bool_lazy_and:nnT
+ { \l__chemmacros_nmr_frequency_bool }
+ { \l__chemmacros_nmr_solvent_bool }
+ { \bool_set_true:N \l__chemmacros_nmr_comma_bool }
+ \tl_if_empty:nTF {#2}
+ {
+ \__chemmacros_nmr_nucleus:VV
+ \l__chemmacros_nmr_isotope_default_tl
+ \l__chemmacros_nmr_element_default_tl
+ }
+ { \__chemmacros_nmr_nucleus:w #2 \q_stop }
+ \mode_if_math:TF
+ {
+ \text
+ {
+ \group_begin:
+ \tl_use:N \l__chemmacros_nmr_format_tl
+ \__chemmacros_nmr_base:VV
+ \g__chemmacros_nmr_isotope_tl
+ \g__chemmacros_nmr_element_tl
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ { ~ ( }
+ \bool_if:NT \l__chemmacros_nmr_frequency_bool
+ { \__chemmacros_nmr_frequency:n {#3} }
+ \bool_if:NT \l__chemmacros_nmr_comma_bool
+ { , ~ }
+ \bool_if:NT \l__chemmacros_nmr_solvent_bool
+ { \chemmacros_chemformula:n {#4} }
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ { ) }
+ \tl_if_blank:nT {#1} {:~}
+ \group_end:
+ }
+ \tl_if_blank:nT {#1}
+ {
+ \delta
+ \text { \l__chemmacros_nmr_delta_tl }
+ \bool_if:NT \l__chemmacros_nmr_use_equal_bool {=}
+ }
+ }
+ {
+ \group_begin:
+ \tl_use:N \l__chemmacros_nmr_format_tl
+ \__chemmacros_nmr_base:VV
+ \g__chemmacros_nmr_isotope_tl
+ \g__chemmacros_nmr_element_tl
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ {~(}
+ \bool_if:NT \l__chemmacros_nmr_frequency_bool
+ { \__chemmacros_nmr_frequency:n {#3} }
+ \bool_if:NT \l__chemmacros_nmr_comma_bool
+ {,~}
+ \bool_if:NT \l__chemmacros_nmr_solvent_bool
+ {
+ \bool_if:NTF \l__chemmacros_nmr_parse_bool
+ { \chemmacros_chemformula:n {#4} }
+ {#4}
+ }
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ {)}
+ \tl_if_blank:nT {#1} {:}
+ \group_end:
+ \tl_if_blank:nT {#1}
+ {
+ \tl_use:N \c_space_tl
+ \c_math_toggle_token
+ \delta
+ \c_math_toggle_token
+ \l__chemmacros_nmr_delta_tl
+ \bool_if:NT \l__chemmacros_nmr_use_equal_bool {~=}
+ }
+ }
+ \group_end:
+ }
+ }
+
+\NewDocumentCommand \chemmacros_data:w { smo }
+ {
+ \bool_if:NT \l__chemmacros_nmr_list_bool { \item }
+ {
+ \tl_use:N \l__chemmacros_nmr_format_tl #2
+ \IfNoValueF {#3} { ~ ( #3 ) }
+ \IfBooleanT {#1} { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { : } }
+ }
+ \IfBooleanF {#1} { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { ~ = } }
+ }
+
+\cs_new_protected:Npn \chemmacros_val:n #1
+ {
+ \tl_if_in:nnTF {#1} {--}
+ { \chemmacros_val_aux:w #1 \q_nil }
+ { \num {#1} }
+ }
+
+\cs_new_protected:Npn \chemmacros_val_aux:w #1--#2 \q_nil
+ { \numrange {#1} {#2} }
+
+\NewDocumentEnvironment {experimental} {o}
+ {
+ \group_begin:
+ \IfNoValueF {#1} { \chemmacros_set_keys:nn {spectroscopy} {#1} }
+ \bool_set_true:N \l__chemmacros_nmr_inner_bool
+ \cs_set_eq:NN \# \chemmacros_nmr_number:n
+ \cs_set_eq:NN \pos \chemmacros_nmr_position:n
+ \cs_set_eq:NN \J \chemmacros_nmr_coupling:w
+ \cs_set_eq:NN \data \chemmacros_data:w
+ \cs_set_eq:NN \val \chemmacros_val:n
+ \bool_if:NT \l__chemmacros_nmr_list_bool
+ { \list {} { \l__chemmacros_nmr_list_setup_tl } }
+ }
+ {
+ \bool_if:NT \l__chemmacros_nmr_list_bool
+ { \endlist }
+ \group_end:
+ \chemmacros_ignore_spaces:
+ }
+
+\cs_new_protected:Npn \chemmacros_nmr_number:n #1
+ {
+ \__chemmacros_nmr_number:n {#1}
+ \chemmacros_skip_nobreak:N \l__chemmacros_nmr_space_skip
+ \chemmacros_chemformula:V \g__chemmacros_nmr_element_tl
+ }
+
+\cs_new_protected:Npn \chemmacros_nmr_position:n #1
+ {
+ \chemmacros_chemformula:x
+ {
+ \exp_not:V \g__chemmacros_nmr_element_tl
+ \bool_if:NF \l__chemmacros_nmr_position_side_bool
+ {
+ \exp_not:V \l__chemmacros_nmr_position_tl
+ \exp_not:n { _{#1} }
+ }
+ }
+ \bool_if:NT \l__chemmacros_nmr_position_side_bool
+ {
+ \tl_use:N \l__chemmacros_nmr_position_tl
+ \__chemmacros_nmr_position:n {#1}
+ }
+ }
+
+\cs_new_protected:Npn \chemmacros_nmr_coupling:w
+ {
+ \tl_clear:N \l__chemmacros_nmr_coupling_nuclei_tl
+ \tl_clear:N \l__chemmacros_nmr_coupling_bonds_tl
+ \peek_meaning:NTF (
+ { \__chemmacros_nmr_coupling:w }
+ { \__chemmacros_nmr_coupling_aux_i:w }
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_coupling:w (#1;#2)
+ {
+ \tl_set:Nn \l__chemmacros_nmr_coupling_bonds_tl
+ {
+ \l__chemmacros_nmr_coupling_bonds_pre_tl
+ #1
+ \l__chemmacros_nmr_coupling_bonds_post_tl
+ }
+ \bool_if:NTF \l__chemmacros_nmr_coupling_nuclei_sub_bool
+ {
+ \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
+ {
+ \c_math_subscript_token
+ {
+ \l__chemmacros_nmr_coupling_nuclei_pre_tl
+ \chemmacros_chemformula:n {#2}
+ \l__chemmacros_nmr_coupling_nuclei_post_tl
+ }
+ }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
+ {
+ \l__chemmacros_nmr_coupling_nuclei_pre_tl
+ \chemmacros_chemformula:n {#2}
+ \l__chemmacros_nmr_coupling_nuclei_post_tl
+ }
+ }
+ \__chemmacros_nmr_coupling_aux_i:w
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_i:w
+ {
+ \peek_meaning:NTF [
+ { \__chemmacros_nmr_coupling_aux_ii:w }
+ { \__chemmacros_nmr_coupling_aux_iii:n }
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_ii:w [#1]#2
+ {
+ \group_begin:
+ \sisetup
+ {
+ list-final-separator={,~},
+ list-pair-separator={,~},
+ list-units=single
+ }
+ \c_math_toggle_token
+ ^{ \l__chemmacros_nmr_coupling_bonds_tl }
+ \l__chemmacros_nmr_coupling_symbol_tl
+ \l__chemmacros_nmr_coupling_nuclei_tl = \qtylist {#2} {#1}
+ \c_math_toggle_token
+ \group_end:
+ }
+
+\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_iii:n #1
+ {
+ \group_begin:
+ \sisetup
+ {
+ list-final-separator={,~},
+ list-pair-separator={,~},
+ list-units=single
+ }
+ \c_math_toggle_token
+ ^{ \l__chemmacros_nmr_coupling_bonds_tl }
+ \l__chemmacros_nmr_coupling_symbol_tl
+ \l__chemmacros_nmr_coupling_nuclei_tl
+ = \exp_args:Nno \qtylist {#1} { \l__chemmacros_nmr_coupling_unit_tl }
+ \c_math_toggle_token
+ \group_end:
}
% --------------------------------------------------------------------------
-% messages:
-\msg_new:nnn {chemmacros} {too-low-compatibility}
+\ChemModuleEnd
+\ChemModule{thermodynamics}{2021/07/24 thermodynamics}
+
+\RequirePackage {siunitx}
+
+\tl_new:N \l__chemmacros_state_pre_tl
+\tl_new:N \l__chemmacros_state_post_tl
+\tl_new:N \l__chemmacros_state_sp_left_tl
+\tl_new:N \l__chemmacros_state_sb_left_tl
+\tl_new:N \l__chemmacros_state_sp_right_tl
+\tl_new:N \l__chemmacros_state_sb_right_tl
+\tl_new:N \l__chemmacros_state_sb_pos_tl
+\tl_new:N \l__chemmacros_state_symbol_tl
+\tl_new:N \l__chemmacros_state_unit_tl
+
+\tl_set:Nn \l__chemmacros_state_pre_tl { \changestate }
+\tl_set:Nn \l__chemmacros_state_sp_right_tl { \standardstate }
+\tl_set:Nn \l__chemmacros_state_sb_pos_tl {left}
+
+\chemmacros_define_keys:nn {thermodynamics}
{
- Compatibility~ for~ versions~ below~ v4.7~ is~ not~ supported!~ You~
- requested~ version~ v #1.~ Loading~ v4.7~ instead.
+ pre .tl_set:N = \l__chemmacros_state_pre_tl ,
+ post .tl_set:N = \l__chemmacros_state_post_tl ,
+ superscript-left .tl_set:N = \l__chemmacros_state_sp_left_tl ,
+ superscript-right .tl_set:N = \l__chemmacros_state_sp_right_tl ,
+ superscript .meta:n = { superscript-right = #1 } ,
+ subscript-left .tl_set:N = \l__chemmacros_state_sb_left_tl ,
+ subscript-right .tl_set:N = \l__chemmacros_state_sb_right_tl ,
+ subscript .meta:n = { subscript-left = #1 } ,
+ unit .tl_set:N = \l__chemmacros_state_unit_tl ,
+ unit .groups:n = {variables}
}
-\msg_new:nnn {chemmacros} {too-high-compatibility}
+\cs_new_protected:Npn \chemmacros_state:nn #1#2
{
- You~ requested~ compatibility~ mode~ v #1~ while~ the~ current~ version~
- of~ chemmacros~ is~ v \c_chemmacros_version_tl .~ Falling~ back~
- to~ v \c_chemmacros_version_number_tl !
+ % pre (\Delta)
+ % post
+ % superscript-left
+ % superscript-right (\standardstate)
+ % subscript-left
+ % subscript-right
+ \group_begin:
+ \chemmacros_set_keys:nn {thermodynamics} {#1}
+ \ensuremath
+ {
+ \chemmacros_text:V \l__chemmacros_state_pre_tl
+ \c_math_superscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sp_left_tl }
+ \c_math_subscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sb_left_tl }
+ #2
+ \c_math_superscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sp_right_tl }
+ \c_math_subscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sb_right_tl }
+ \chemmacros_text:V \l__chemmacros_state_post_tl
+ }
+ \group_end:
}
+\cs_generate_variant:Nn \chemmacros_state:nn { nV }
-\msg_new:nnn {chemmacros} {low-compatibility}
+\DeclareDocumentCommand \state { O{}m }
+ { \chemmacros_state:nn {#1} {#2} }
+
+\cs_new_protected:Npn \chemmacros_declare_state:Nn #1#2
{
- You~ requested~ compatibility~ mode~ v #1~ while~ the~ current~ version~
- of~ chemmacros~ is~ v \c_chemmacros_version_tl .~ Not~ all~ features~
- or~ fixes~ will~ be~ available!
+ \chemmacros_define_keys:xn
+ {thermodynamics/\chemmacros_remove_backslash:N #1}
+ {
+ pre .meta:nn = {chemmacros/thermodynamics} { pre = ##1 } ,
+ post .meta:nn = {chemmacros/thermodynamics} { post = ##1 } ,
+ superscript-left .meta:nn = {chemmacros/thermodynamics} { superscript-left = ##1 } ,
+ superscript-right .meta:nn = {chemmacros/thermodynamics} { superscript-right = ##1 } ,
+ superscript .meta:n = { superscript-right = ##1 } ,
+ subscript-left .meta:nn = {chemmacros/thermodynamics} { subscript-left = ##1 } ,
+ subscript-right .meta:nn = {chemmacros/thermodynamics} { subscript-right = ##1 } ,
+ subscript .meta:n = { subscript-left = ##1 } ,
+ subscript-pos .choices:nn =
+ { left , right }
+ { \tl_set_eq:NN \l__chemmacros_state_sb_pos_tl \l_keys_choice_tl } ,
+ symbol .tl_set:N = \l__chemmacros_state_symbol_tl ,
+ unit .tl_set:N = \l__chemmacros_state_unit_tl
+ }
+ \DeclareDocumentCommand #1 { sO{}D(){}m }
+ {
+ \group_begin:
+ \chemmacros_set_keys:xn
+ {thermodynamics/\chemmacros_remove_backslash:N #1}
+ {#2}
+ \tl_if_blank:nF {##3}
+ {
+ \chemmacros_set_keys:nx {thermodynamics}
+ { subscript-\l__chemmacros_state_sb_pos_tl = \exp_not:n {##3} }
+ }
+ \ensuremath
+ {
+ \chemmacros_state:nV {##2} \l__chemmacros_state_symbol_tl
+ \chemmacros_set_keys_groups:nnn {thermodynamics} {variables} {##2}
+ \IfBooleanF {##1} { = \qty {##4} { \l__chemmacros_state_unit_tl } }
+ }
+ \group_end:
+ }
}
+\NewChemMacroset {State} {mm}
+ { \chemmacros_declare_state:Nn #1 {#2} }
+
% --------------------------------------------------------------------------
-% let's see that the max number is the newest (=current) version
-\chemmacros_if_compatibility:nnT {>} { \c_chemmacros_version_tl }
+% predefined:
+\NewChemState \enthalpy { symbol = H , unit = \kilo\joule\per\mole }
+\NewChemState \entropy { symbol = S , unit = \joule\per\kelvin\per\mole , pre = }
+\NewChemState \gibbs { symbol = G , unit = \kilo\joule\per\mole }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{units}{2022/01/16 chemical units}
+
+\RequirePackage{siunitx}
+
+% --------------------------------------------------------------------------
+\DeclareSIUnit \angstrom {\SIUnitSymbolAngstrom}
+\DeclareSIUnit \atm {atm}
+\DeclareSIUnit \atmosphere {atm}
+\DeclareSIUnit \atomicmassunit {u}
+\DeclareSIUnit \bar {bar}
+\DeclareSIUnit \calory {cal}
+\DeclareSIUnit \cal {cal}
+\DeclareSIUnit \elementarycharge {\text{\ensuremath{e}}}
+\DeclareSIUnit \mmHg {mmHg}
+\DeclareSIUnit \moLar {\mole\per\liter}
+\DeclareSIUnit \MolMass {\gram\per\mole}
+\DeclareSIUnit \normal {\textsc{n}}
+\DeclareSIUnit \torr {Torr}
+
+\hook_gput_code:nnn {begindocument/before} {chemmacros}
+ {
+ \chemmacros_if_package_loaded:nF {chemstyle}
+ {
+ \DeclareSIUnit {\cmc } {\cubic\centi\metre}
+ \DeclareSIUnit {\molar} {\mole\per\cubic\deci\metre}
+ \DeclareSIUnit {\Molar} {\textsc{m}}
+ }
+ }
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{reactants}{2021/07/24 typeset reactants and data}
+% idea and main development of this module: Sonja K.
+
+\RequirePackage {chemnum}
+
+\cs_generate_variant:Nn \chemnum_cmpd:nnnn {nnne}
+\cs_generate_variant:Nn \chemnum_init:nn {ne}
+\cs_generate_variant:Nn \chemnum_get_subcompound:nn {nV}
+
+% --------------------------------------------------------------------------
+\msg_new:nnn {chemmacros} {reactant-name}
+ {
+ The~ reactant~ `#1'~ has~ been~ defined~ without~ a~ name!~
+ \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {undefined-key}
+ {
+ The~ reactant~ key~ `#1'~ has~ not~ been~ defined~ using~
+ \token_to_str:N \DeclareChemReactant \c_space_tl \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {double-defined-key}
+ {
+ The~ reactant~ key~ `#1'~ has~ already~ been~ defined~ using~
+ \token_to_str:N \DeclareChemReactant \c_space_tl \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {double-defined-key-acronym}
+ {
+ The~ reactant~ key~ `#1'~ has~ already~ been~ defined~ using~
+ \token_to_str:N \DeclareAcronym \c_space_tl \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {incompatible-equivalents}
+ {
+ Incompatible~ options~ `equivalents=false'~ and~ `main=equiv'~ detected.~
+ `equivalents=false'~ will~ be~ ignored~ \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {acronym-support}
+ {
+ \token_to_str:N #1 is~ only~ available~ when~ setting~ the~
+ `acronym-support'~ option~ accordingly~ \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {missing-printreactants-style}
+ {
+ \token_to_str:N \printreactants \c_space_tl\token_to_str:N was~ used~ without~ a~
+ `printreactants-style'~ option,~ thus~ no~ list~ is~ printed~ \msg_line_context:
+ }
+
+\msg_new:nnn {chemmacros} {package-not-loaded}
+ { The~ command~ \token_to_str:N #1 requires~ the~ package~ `#2'. }
+
+% --------------------------------------------------------------------------
+\seq_new:N \l__chemmacros_reactants_tmpa_seq
+
+\bool_new:N \l__chemmacros_reactants_switch_bool
+\bool_new:N \l__chemmacros_reactants_initiate_bool
+\bool_new:N \l__chemmacros_reactants_equivalents_bool
+
+\bool_new:N \l__chemmacros_reactants_nmo_bool
+\bool_new:N \l__chemmacros_reactants_mno_bool
+\bool_new:N \l__chemmacros_reactants_mon_bool
+
+\bool_new:N \l__chemmacros_reactants_snm_bool
+\bool_new:N \l__chemmacros_reactants_smn_bool
+
+\bool_new:N \l__chemmacros_reactants_acronym_support_bool
+\bool_new:N \l__chemmacros_reactants_printreactants_style_bool
+
+\str_new:N \l__chemmacros_reactants_acronym_support_str
+\str_new:N \l__chemmacros_reactants_printreactants_style_str
+\str_new:N \l__chemmacros_reactants_main_str
+\str_new:N \l__chemmacros_reactants_name_str
+
+\tl_new:N \l__chemmacros_mass_unit_tl
+\tl_new:N \l__chemmacros_volume_unit_tl
+\tl_new:N \l__chemmacros_amount_unit_tl
+\tl_new:N \l__chemmacros_concentration_unit_tl
+\tl_new:N \l__chemmacros_equiv_unit_tl
+\tl_new:N \l__chemmacros_fraction_unit_tl
+\tl_new:N \l__chemmacros_purity_unit_tl
+\tl_new:N \l__chemmacros_solution_name_tl
+
+\chemmacros_define_keys:nn {reactants}
+ {
+ mass-unit .tl_set:N = \l__chemmacros_mass_unit_tl ,
+ mass-unit .initial:n = \gram ,
+ %%
+ volume-unit .tl_set:N = \l__chemmacros_volume_unit_tl ,
+ volume-unit .initial:n = \milli\liter ,
+ %%
+ amount-unit .tl_set:N = \l__chemmacros_amount_unit_tl ,
+ amount-unit .initial:n = \milli\mole ,
+ %%
+ concentration-unit .tl_set:N = \l__chemmacros_concentration_unit_tl ,
+ concentration-unit .initial:n = \Molar ,
+ %%
+ equiv-unit .tl_set:N = \l__chemmacros_equiv_unit_tl ,
+ equiv-unit .initial:n = eq ,
+ %%
+ fraction-unit .tl_set:N = \l__chemmacros_fraction_unit_tl ,
+ fraction-unit .initial:n = w/w \percent ,
+ %%
+ purity-unit .tl_set:N = \l__chemmacros_purity_unit_tl ,
+ purity-unit .initial:n = \percent ,
+ %%
+ solution-name .tl_set:N = \l__chemmacros_solution_name_tl ,
+ solution-name .initial:n = \chemmacros_translate:n {solution} ,
+ %%
+ switch .bool_set:N = \l__chemmacros_reactants_switch_bool ,
+ switch .initial:n = false ,
+ %%
+ initiate .bool_set:N = \l__chemmacros_reactants_initiate_bool ,
+ initiate .initial:n = false ,
+ %%
+ equivalents .bool_set_inverse:N = \l__chemmacros_reactants_equivalents_bool ,
+ equivalents .initial:n = true,
+ %%
+ reactant-output-style .choice: ,
+ reactant-output-style / name-main-other .code:n =
+ \bool_set_true:N \l__chemmacros_reactants_nmo_bool
+ \bool_set_false:N \l__chemmacros_reactants_mno_bool
+ \bool_set_false:N \l__chemmacros_reactants_mon_bool ,
+ reactant-output-style / main-name-other .code:n =
+ \bool_set_false:N \l__chemmacros_reactants_nmo_bool
+ \bool_set_true:N \l__chemmacros_reactants_mno_bool
+ \bool_set_false:N \l__chemmacros_reactants_mon_bool ,
+ reactant-output-style / main-other-name .code:n =
+ \bool_set_false:N \l__chemmacros_reactants_nmo_bool
+ \bool_set_false:N \l__chemmacros_reactants_mno_bool
+ \bool_set_true:N \l__chemmacros_reactants_mon_bool ,
+ reactant-output-style .initial:n = name-main-other ,
+ %%
+ solvent-output-style .choice: ,
+ solvent-output-style / main-name .code:n =
+ \bool_set_false:N \l__chemmacros_reactants_snm_bool
+ \bool_set_true:N \l__chemmacros_reactants_smn_bool ,
+ solvent-output-style / name-main .code:n =
+ \bool_set_true:N \l__chemmacros_reactants_snm_bool
+ \bool_set_false:N \l__chemmacros_reactants_smn_bool ,
+ solvent-output-style .initial:n = main-name ,
+ %%
+ main .choice: ,
+ main / amount .code:n =
+ \str_set:Nn \l__chemmacros_reactants_main_str {amount} ,
+ main / equiv .code:n =
+ \str_set:Nn \l__chemmacros_reactants_main_str {equiv} ,
+ main / default .code:n =
+ \str_set:Nn \l__chemmacros_reactants_main_str {default} ,
+ main .initial:n = default ,
+ %%
+ acronym-support .choice: ,
+ acronym-support / glossaries-extra .code:n =
+ \bool_set_true:N \l__chemmacros_reactants_acronym_support_bool
+ \str_set:Nn \l__chemmacros_reactants_acronym_support_str {glossaries}
+ \RequirePackage [acronyms] {glossaries-extra} ,
+ acronym-support / acro .code:n =
+ \bool_set_true:N \l__chemmacros_reactants_acronym_support_bool
+ \str_set:Nn \l__chemmacros_reactants_acronym_support_str {acro}
+ \RequirePackage {acro} ,
+ acronym-support / none .code:n =
+ \bool_set_false:N \l__chemmacros_reactants_acronym_support_bool
+ \str_clear:N \l__chemmacros_reactants_acronym_support_str ,
+ acronym-support .initial:n = none ,
+ %%
+ printreactants-style .choice: ,
+ printreactants-style / xltabular .code:n =
+ \bool_set_true:N \l__chemmacros_reactants_printreactants_style_bool
+ \str_set:Nn \l__chemmacros_reactants_printreactants_style_str {xltabular}
+ \RequirePackage {xltabular} ,
+ printreactants-style / longtable .code:n =
+ \bool_set_true:N \l__chemmacros_reactants_printreactants_style_bool
+ \str_set:Nn \l__chemmacros_reactants_printreactants_style_str {longtable}
+ \RequirePackage {longtable} ,
+ printreactants-style / none .code:n =
+ \bool_set_false:N \l__chemmacros_reactants_printreactants_style_bool
+ \str_clear:N \l__chemmacros_reactants_printreactants_style_str ,
+ printreactants-style .initial:n = none
+ }
+
+% --------------------------------------------------------------------------
+% #1: key
+% #2: properties
+\NewDocumentCommand \DeclareChemReactant {mm}
+ { \chemmacros_declare_reactant:nn {#1} {#2} }
+
+% #1: key
+% #2: properties
+\cs_new_protected:Npn \chemmacros_declare_reactant:nn #1#2
+ {
+ \cs_if_exist:cT
+ {l__chemmacros_reactants_#1_prop}
+ {\msg_error:nnn {chemmacros} {double-defined-key} {#1} }
+ \prop_new:c {l__chemmacros_reactants_#1_prop}
+ \__chemmacros_reactants_set_properties:nn {#1} {#2}
+ % check if name given:
+ \__chemmacros_reactants_if_property:nnF {#1} {name}
+ { \msg_error:nnn {chemmacros} {reactant-name} {#1} }
+ % check if number given; else use key:
+ \__chemmacros_reactants_if_property:nnF {#1} {number}
+ { \__chemmacros_reactants_set_properties:nn {#1} { number = #1 } }
+ \bool_if:NT \l__chemmacros_reactants_initiate_bool
+ {
+ \hook_gput_code:nnn {begindocument} {chemmacros}
+ { \chemnum_init:ne {} { \__chemmacros_reactants_item:nn {#1} {number} } }
+ }
+ \bool_if:NT \l__chemmacros_reactants_acronym_support_bool
+ {
+ \str_case:Vn \l__chemmacros_reactants_acronym_support_str
+ {
+ {glossaries}
+ {
+ \chemmacros_if_package_loaded:nTF {glossaries-extra}
+ {
+ \__chemmacros_reactants_if_property:nnT {#1} {short}
+ {
+ \exp_args:Nnxx
+ \newacronym
+ {#1}
+ { \__chemmacros_reactants_item:nn {#1} {short} }
+ { \__chemmacros_reactants_item:nn {#1} {name} }
+ }
+ }
+ {
+ \msg_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \printreactants }
+ {glossaries-extra}
+ }
+ }
+ {acro}
+ {
+ \__chemmacros_reactants_if_property:nnT {#1} {short}
+ {
+ \chemmacros_if_package_loaded:nTF {acro}
+ {
+ \acro_if_defined:nT {#1}
+ { \msg_error:nnn {chemmacros} {double-defined-key-acronym} {#1} }
+ \exp_args:Nnx
+ \DeclareAcronym {#1} {
+ short = \__chemmacros_reactants_item:nn {#1} {short} ,
+ long = \__chemmacros_reactants_item:nn {#1} {name}
+ }
+ }
+ {
+ \msg_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \printreactants }
+ {acro}
+ }
+ }
+ }
+ }
+ }
+ }
+
+% #1: key
+% #2: properties
+\cs_new_protected:Npn \__chemmacros_reactants_set_properties:nn #1#2
+ {
+ \cs_set_protected:Npn \__chemmacros_reactants_property:nn ##1##2
+ {
+ \str_case:nnF {##1}
+ { {name} { \__chemmacros_reactants_put:nnn {#1} {##1} {##2} } }
+ { \__chemmacros_reactants_put:nnn {#1} {##1} {##2} }
+ }
+ \cs_set_protected:Npn \__chemmacros_reactants_property:n ##1
+ { \__chemmacros_reactants_put:nnn {#1} {##1} {} }
+ \keyval_parse:NNn
+ \__chemmacros_reactants_property:n
+ \__chemmacros_reactants_property:nn
+ {#2}
+ }
+
+% #1: key
+% #2: property
+\prg_new_conditional:Npnn \__chemmacros_reactants_if_property:nn #1#2 {p,T,F,TF}
{
- \tl_set_eq:NN
- \l__chemmacros_compatibility_version_tl
- \c_chemmacros_version_tl
+ \prop_if_in:cnTF {l__chemmacros_reactants_#1_prop} {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
}
+% #1: key
+% #2: property
+\cs_new:Npn \__chemmacros_reactants_item:nn #1#2
+ { \prop_item:cn {l__chemmacros_reactants_#1_prop} {#2} }
+
+% #1: key
+% #2: property
+% #3: value
+\cs_new_protected:Npn \__chemmacros_reactants_put:nnn #1#2#3
+ { \prop_put:cnn {l__chemmacros_reactants_#1_prop} {#2} {#3} }
+
% --------------------------------------------------------------------------
-% compatibility too low:
-\chemmacros_if_compatibility:nnT {<} {4.7}
+% #1: boolean > no name
+% #2: boolean: if true, allow no properties and use cmpd+
+% #3: properties and options
+% #4: key
+\NewDocumentCommand \reactant {st+O{}m}
+ {
+ \group_begin:
+ \str_set:Nn \l__chemmacros_reactants_name_str {regular}
+ \chemmacros_reactant:nnnn {#1} {#2} {#3} {#4}
+ \group_end:
+ }
+
+% #1: boolean > no name
+% #2: boolean: if true, allow no properties and use cmpd+
+% #3: properties and options
+% #4: key
+\NewDocumentCommand \reactants {st+O{}m}
+ {
+ \group_begin:
+ \bool_if:NTF \l__chemmacros_reactants_acronym_support_bool
+ {
+ \str_set:Nn \l__chemmacros_reactants_name_str {short}
+ \chemmacros_reactant:nnnn {#1} {#2} {#3} {#4}
+ }
+ { \msg_error:nnn {chemmacros} {acronym-support} { \reactants } }
+ \group_end:
+ }
+
+% #1: boolean > no name
+% #2: boolean: if true, allow no properties and use cmpd+
+% #3: properties and options
+% #4: key
+\NewDocumentCommand \reactantl {st+O{}m}
+ {
+ \group_begin:
+ \bool_if:NTF \l__chemmacros_reactants_acronym_support_bool
+ {
+ \str_set:Nn \l__chemmacros_reactants_name_str {long}
+ \chemmacros_reactant:nnnn {#1} {#2} {#3} {#4}
+ }
+ { \msg_error:nnn {chemmacros} {acronym-support} { \reactantl } }
+ \group_end:
+ }
+
+% #1: boolean > no name
+% #2: boolean: if true, allow no properties and use cmpd+
+% #3: properties and options
+% #4: key
+\NewDocumentCommand \Reactant {st+O{}m}
+ {
+ \group_begin:
+ \str_set:Nn \l__chemmacros_reactants_name_str {upper}
+ \chemmacros_reactant:nnnn {#1} {#2} {#3} {#4}
+ \group_end:
+ }
+
+
+% #1: boolean > no name
+% #2: boolean: if true, allow no properties and use cmpd+
+% #3: properties and options
+% #4: key
+\cs_new_protected:Npn \chemmacros_reactant:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \bool_if:NT \l__chemmacros_reactants_nmo_bool
+ {
+ \__chemmacros_reactants_set_properties:nn {#4} {#3}
+ % name:
+ \chemmacros_reactants_name:nnnn {#1} {#3} {#4} {#2}
+ \chemmacros_reactants_if_any:nT {#4} {~(}
+ % main:
+ \__chemmacros_reactants_mainproperty:nn {#3} {#4}
+ \bool_lazy_and:nnT
+ { \chemmacros_reactants_if_main_p:n {#4} }
+ { \chemmacros_reactants_if_other_p:n {#4} }
+ {,~}
+ % others:
+ \chemmacros_reactants_properties:nn {#3} {#4}
+ \chemmacros_reactants_if_any:nT {#4} {)}
+ }
+ \bool_if:NT \l__chemmacros_reactants_mno_bool
+ {
+ \__chemmacros_reactants_set_properties:nn {#4} {#3}
+ % main:
+ \__chemmacros_reactants_mainproperty:nn {#3} {#4}
+ \chemmacros_reactants_if_main:nT {#4} {~}
+ % name:
+ \chemmacros_reactants_name:nnnn {#1} {#3} {#4} {#2}
+ % others:
+ \chemmacros_reactants_if_other:nT {#4} {~(}
+ \chemmacros_reactants_properties:nn {#3} {#4}
+ \chemmacros_reactants_if_other:nT {#4} {)}
+ }
+ \bool_if:NT \l__chemmacros_reactants_mon_bool
+ {
+ \__chemmacros_reactants_set_properties:nn {#4} {#3}
+ % main:
+ \__chemmacros_reactants_mainproperty:nn {#3} {#4}
+ \chemmacros_reactants_if_main:nT {#4} {~}
+ % others:
+ \chemmacros_reactants_if_other:nT {#4} {(}
+ \chemmacros_reactants_properties:nn {#3} {#4}
+ \chemmacros_reactants_if_other:nT {#4} {)~}
+ % name
+ \chemmacros_reactants_name:nnnn {#1} {#3} {#4} {#2}
+ }
+ \group_end:
+ }
+
+% #1: key
+\prg_new_conditional:Npnn \chemmacros_reactants_if_main:n #1 {p,T,F,TF}
+ {
+ \bool_lazy_or:nnTF
+ { \__chemmacros_reactants_if_property_p:nn {#1} {mass} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {volume} }
+ { \prg_return_true: }
+ {
+ \str_case:VnF \l__chemmacros_reactants_main_str
+ {
+ {amount} {
+ \__chemmacros_reactants_if_property:nnTF {#1} {amount}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ {equiv} {
+ \__chemmacros_reactants_if_property:nnTF {#1} {equiv}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ { \prg_return_false: }
+ }
+ }
+
+% #1: key
+\prg_new_conditional:Npnn \chemmacros_reactants_if_other:n #1 {p,T,F,TF}
+ {
+ \bool_lazy_any:nTF
+ {
+ { \__chemmacros_reactants_if_property_p:nn {#1} {fraction} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {purity} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {concentration} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {solvent} }
+ }
+ { \prg_return_true: }
+ {
+ \str_case:VnF \l__chemmacros_reactants_main_str
+ {
+ {default} {
+ \bool_lazy_or:nnTF
+ { \__chemmacros_reactants_if_property_p:nn {#1} {amount} }
+ {
+ \bool_lazy_and_p:nn
+ { \__chemmacros_reactants_if_property_p:nn {#1} {equiv} }
+ { !\l__chemmacros_reactants_equivalents_bool }
+ }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ {amount} {
+ \bool_if:NTF \l__chemmacros_reactants_equivalents_bool
+ { \prg_return_false: }
+ {
+ \__chemmacros_reactants_if_property:nnTF {#1} {equiv}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ {equiv} {
+ \__chemmacros_reactants_if_property:nnTF {#1} {amount}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ { \prg_return_false: }
+ }
+ }
+
+% #1: key
+\prg_new_conditional:Npnn \chemmacros_reactants_if_any:n #1 {T,F,TF}
+ {
+ \bool_lazy_any:nTF
+ {
+ { \__chemmacros_reactants_if_property_p:nn {#1} {mass} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {volume} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {fraction} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {amount} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {equiv} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {purity} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {concentration} }
+ { \__chemmacros_reactants_if_property_p:nn {#1} {solvent} }
+ }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+% #1: boolean > no name
+% #2: options and keys
+% #3: key
+% #4: boolean: if true, allow no properties and use cmpd+
+\cs_new_protected:Npn \chemmacros_reactants_name:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \keys_set_known:nn {chemmacros/reactants} {#2}
+ \bool_lazy_or:nnT
+ { \bool_lazy_and_p:nn {#1} { !\l__chemmacros_reactants_switch_bool } }
+ { !#1 }
+ {
+ \str_case:Vn \l__chemmacros_reactants_name_str
+ {
+ {regular}
+ { \__chemmacros_reactants_item:nn {#3} {name} }
+ {upper}
+ { \__chemmacros_reactants_item:nn {#3} {upper-name} }
+ {short}
+ {
+ \str_case:Vn \l__chemmacros_reactants_acronym_support_str
+ {
+ {glossaries} { \glsxtrshort {#3} }
+ {acro} { \acs {#3} }
+ }
+ }
+ {long}
+ {
+ \str_case:Vn \l__chemmacros_reactants_acronym_support_str
+ {
+ {glossaries} { \glsxtrlong {#3} }
+ {acro} { \acl {#3} }
+ }
+ }
+ }
+ }
+ \bool_if:nF {#1} { \nobreakspace }
+ \bool_lazy_or:nnT
+ { \bool_lazy_and_p:nn {#1} { \l__chemmacros_reactants_switch_bool } }
+ { !#1 }
+ {
+ \chemnum_cmpd:nnne
+ { \c_false_bool }
+ {#4}
+ { }
+ { \__chemmacros_reactants_item:nn {#3} {number} }
+ % what is this for?
+ % it causes problems when #3 is a combination of main and sub:
+ % \bool_if:nF {#4}
+ % {
+ % \chemnum_compound_if_initiated:nF {#3}
+ % { \msg_warning:nnn {chemmacros} {undefined-key} {#3} }
+ % }
+ }
+ \group_end:
+ }
+
+% #1: options and properties
+% #2: key
+\cs_new_protected:Npn \chemmacros_reactants_properties:nn #1#2
+ {
+ \group_begin:
+ \seq_clear:N \l__chemmacros_tmpa_seq
+ \__chemmacros_reactants_set_properties:nn {#2} {#1}
+ \keys_set_known:nn {chemmacros/reactants} {#1}
+ \bool_lazy_any:nT
+ {
+ { \__chemmacros_reactants_if_property_p:nn {#2} {mass} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {volume} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {fraction} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {amount} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {equiv} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {purity} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {concentration} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {solvent} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {fraction-unit} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {amount-unit} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {equiv-unit} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {purity-unit} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {concentration-unit} }
+ }
+ {
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {fraction-unit}
+ \l__chemmacros_fraction_unit_tl
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {amount-unit}
+ \l__chemmacros_amount_unit_tl
+ \bool_if:NF \l__chemmacros_reactants_equivalents_bool
+ {
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {equiv-unit}
+ \l__chemmacros_equiv_unit_tl
+ }
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {purity-unit}
+ \l__chemmacros_purity_unit_tl
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {concentration-unit}
+ \l__chemmacros_concentration_unit_tl
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {fraction}
+ \l__chemmacros_fraction_unit_tl
+ \str_if_eq:VnF \l__chemmacros_reactants_main_str {amount}
+ {
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {amount}
+ \l__chemmacros_amount_unit_tl
+ }
+ \bool_if:NTF \l__chemmacros_reactants_equivalents_bool
+ {
+ \str_if_eq:VnT \l__chemmacros_reactants_main_str {equiv}
+ { \msg_warning:nnn {chemmacros} {incompatible-equivalents} {#1} }
+ }
+ {
+ \str_if_eq:VnF \l__chemmacros_reactants_main_str {equiv}
+ {
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {equiv}
+ \l__chemmacros_equiv_unit_tl
+ }
+ }
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {purity}
+ \l__chemmacros_purity_unit_tl
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {concentration}
+ \l__chemmacros_concentration_unit_tl
+ \seq_use:Nn \l__chemmacros_tmpa_seq {,~}
+ \__chemmacros_reactants_add_solvent:Nnn
+ {#2}
+ {solvent}
+ \l__chemmacros_solution_name_tl
+ }
+ \group_end:
+ }
+
+% #1: options and properties
+% #2: key
+\cs_new_protected:Npn \__chemmacros_reactants_mainproperty:nn #1#2
+ {
+ \group_begin:
+ \seq_clear:N \l__chemmacros_tmpa_seq
+ \__chemmacros_reactants_set_properties:nn {#2} {#1}
+ \keys_set_known:nn {chemmacros/reactants} {#1}
+ \bool_lazy_or:nnT
+ { \__chemmacros_reactants_if_property_p:nn {#2} {mass-unit} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {volume-unit} }
+ {
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {mass-unit}
+ \l__chemmacros_mass_unit_tl
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {volume-unit}
+ \l__chemmacros_volume_unit_tl
+ }
+ \bool_lazy_and:nnT
+ { \str_if_eq_p:Vn \l__chemmacros_reactants_main_str {amount} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {amount-unit} }
+ {
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {amount-unit}
+ \l__chemmacros_amount_unit_tl
+ }
+ \bool_lazy_and:nnT
+ { \str_if_eq_p:Vn \l__chemmacros_reactants_main_str {equiv} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {equiv-unit} }
+ {
+ \__chemmacros_reactants_change_unit:nnN
+ {#2}
+ {equiv-unit}
+ \l__chemmacros_equiv_unit_tl
+ }
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {mass}
+ \l__chemmacros_mass_unit_tl
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {volume}
+ \l__chemmacros_volume_unit_tl
+ \str_if_eq:VnT \l__chemmacros_reactants_main_str {amount}
+ {
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {amount}
+ \l__chemmacros_amount_unit_tl
+ }
+ \str_if_eq:VnT \l__chemmacros_reactants_main_str {equiv}
+ {
+ \__chemmacros_reactants_add_property:NnnV \l__chemmacros_tmpa_seq
+ {#2}
+ {equiv}
+ \l__chemmacros_equiv_unit_tl
+ }
+ \seq_if_empty:NF \l__chemmacros_tmpa_seq
+ { \seq_use:Nn \l__chemmacros_tmpa_seq {,~} }
+ \group_end:
+ }
+
+% #1: seq variable
+% #2: key
+% #3: property
+% #4: unit
+\cs_new_protected:Npn \__chemmacros_reactants_add_property:Nnnn #1#2#3#4
+ {
+ \__chemmacros_reactants_if_property:nnT {#2} {#3}
+ {
+ \seq_put_right:Ne #1
+ { \qty { \__chemmacros_reactants_item:nn {#2} {#3} } { \exp_not:n {#4} } }
+ }
+ }
+\cs_generate_variant:Nn \__chemmacros_reactants_add_property:Nnnn {NnnV}
+
+% #1: key
+% #2: property (name of solvent)
+% #3: linking text
+\cs_new_protected:Npn \__chemmacros_reactants_add_solvent:Nnn #1#2#3
+ {
+ \__chemmacros_reactants_if_property:nnT {#1} {#2}
+ {
+ \c_space_tl
+ \l__chemmacros_solution_name_tl
+ \c_space_tl
+ \__chemmacros_reactants_item:nn {#1} {#2}
+ }
+ }
+\cs_generate_variant:Nn \__chemmacros_reactants_add_solvent:Nnn {NnV}
+
+% #1: key
+% #2: property
+% #3: new unit
+\cs_new_protected:Npn \__chemmacros_reactants_change_unit:nnN #1#2#3
+ {
+ \__chemmacros_reactants_if_property:nnT {#1} {#2}
+ { \prop_get:cnN {l__chemmacros_reactants_#1_prop} {#2} #3 }
+ }
+
+% #1: properties and options
+% #2: key
+\NewDocumentCommand \solvent {O{}m}
+ {
+ \group_begin:
+ \str_set:Nn \l__chemmacros_reactants_name_str {regular}
+ \chemmacros_solvent:nn {#1} {#2}
+ \group_end:
+ }
+
+% #1: properties and options
+% #2: key
+\NewDocumentCommand \solvents {O{}m}
+ {
+ \group_begin:
+ \bool_if:NTF \l__chemmacros_reactants_acronym_support_bool
+ {
+ \str_set:Nn \l__chemmacros_reactants_name_str {short}
+ \chemmacros_solvent:nn {#1} {#2}
+ }
+ { \msg_error:nnn {chemmacros} {acronym-support} { \solvents } }
+ \group_end:
+ }
+
+% #1: properties and options
+% #2: key
+\NewDocumentCommand \solventl {O{}m}
+ {
+ \group_begin:
+ \bool_if:NTF \l__chemmacros_reactants_acronym_support_bool
+ {
+ \str_set:Nn \l__chemmacros_reactants_name_str {long}
+ \chemmacros_solvent:nn {#1} {#2}
+ }
+ { \msg_error:nnn {chemmacros} {acronym-support} { \solventl } }
+ \group_end:
+ }
+
+% #1: properties and options
+% #2: key
+\NewDocumentCommand \Solvent {O{}m}
+ {
+ \group_begin:
+ \str_set:Nn \l__chemmacros_reactants_name_str {upper}
+ \chemmacros_solvent:nn {#1} {#2}
+ \group_end:
+ }
+
+
+% #1: options and properties
+% #3: key
+\cs_new_protected:Npn \chemmacros_solvent:nn #1#2
+ {
+ \group_begin:
+ \bool_if:NT \l__chemmacros_reactants_snm_bool
+ {
+ \__chemmacros_reactants_set_properties:nn {#2} {#1}
+ \chemmacros_solvent_name:nn {#1} {#2}
+ \chemmacros_reactants_if_main:nT {#2} {~(}
+ \chemmacros_solvent_properties:nn {#1} {#2}
+ \chemmacros_reactants_if_main:nT {#2} {)}
+ }
+ \bool_if:NT \l__chemmacros_reactants_smn_bool
+ {
+ \__chemmacros_reactants_set_properties:nn {#2} {#1}
+ \chemmacros_solvent_properties:nn {#1} {#2}
+ \chemmacros_reactants_if_main:nT {#2} {~}
+ \chemmacros_solvent_name:nn {#1} {#2}
+ }
+ \group_end:
+ }
+
+% #1: options and properties
+% #3: key
+\cs_new_protected:Npn \chemmacros_solvent_properties:nn #1#2
{
- \msg_warning:nnx {chemmacros} {too-low-compatibility}
- { \l__chemmacros_compatibility_version_tl }
+ \group_begin:
+ \__chemmacros_reactants_set_properties:nn {#2} {#1}
+ \keys_set_known:nn {chemmacros/reactants} {#1}
+ \bool_lazy_or:nnT
+ { \__chemmacros_reactants_if_property_p:nn {#2} {volume} }
+ { \__chemmacros_reactants_if_property_p:nn {#2} {volume-unit} }
+ {
+ \__chemmacros_reactants_change_unit:nnN {#2}
+ {volume-unit}
+ \l__chemmacros_volume_unit_tl
+ \qty
+ { \__chemmacros_reactants_item:nn {#2} {volume} }
+ { \l__chemmacros_volume_unit_tl }
+
+ }
+ \group_end:
}
-% not the newest version:
-\chemmacros_if_compatibility:nnT {<} { \c_chemmacros_version_tl }
+% #1: options
+% #2: key
+\cs_new_protected:Npn \chemmacros_solvent_name:nn #1#2
{
- \msg_warning:nnx {chemmacros} {low-compatibility}
- { \l__chemmacros_compatibility_version_tl }
+ \group_begin:
+ \keys_set_known:nn {chemmacros/reactants} {#1}
+ \str_case:Vn \l__chemmacros_reactants_name_str
+ {
+ {regular}
+ { \__chemmacros_reactants_item:nn {#2} {name} }
+ {upper}
+ { \__chemmacros_reactants_item:nn {#2} {upper-name} }
+ {short}
+ {
+ \str_case:Vn \l__chemmacros_reactants_acronym_support_str
+ {
+ {glossaries} { \glsxtrshort {#2} }
+ {acro} { \acs {#2} }
+ }
+ }
+ {long}
+ {
+ \str_case:Vn \l__chemmacros_reactants_acronym_support_str
+ {
+ {glossaries} { \glsxtrlong {#2} }
+ {acro} { \acl {#2} }
+ }
+ }
+ }
+ \group_end:
+ }
+
+% --------------------------------------------------------------------------
+
+% #1: full ID
+\DeclareExpandableDocumentCommand \reactantplain {m}
+ {
+ \chemmacros_if_package_loaded:nF {hyperref}
+ {
+ \msg_expandable_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \reactantplain }
+ {hyperref}
+ }
+ \__chemmacros_reactants_if_property:nnF {#1} {bookmark}
+ { \msg_expandable_error:nnn {chemmacros} {reactant-bookmark} {#1} }
+ \texorpdfstring
+ { \__chemmacros_reactants_item:nn {#1} {name} ~ \cmpd+ {#1} }
+ { \__chemmacros_reactants_item:nn {#1} {bookmark} \space \cmpdplain {#1} }
+ }
+
+% #1: full ID
+\DeclareExpandableDocumentCommand \Reactantplain {m}
+ {
+ \chemmacros_if_package_loaded:nF {hyperref}
+ {
+ \msg_expandable_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \reactantplain }
+ {hyperref}
+ }
+ \__chemmacros_reactants_if_property:nnF {#1} {upper-bookmark}
+ { \msg_expandable_error:nnn {chemmacros} {reactant-bookmark} {#1} }
+ \texorpdfstring
+ { \__chemmacros_reactants_item:nn {#1} {upper-name} ~ \cmpd+ {#1} }
+ { \__chemmacros_reactants_item:nn {#1} {upper-bookmark} \space \cmpdplain {#1} }
+ }
+
+
+% #1: main Id
+% #2: sub ID
+\DeclareExpandableDocumentCommand \submainreactantplain {mm}
+ {
+ \chemmacros_if_package_loaded:nF {hyperref}
+ {
+ \msg_expandable_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \submainreactantplain }
+ {hyperref}
+ }
+ \__chemmacros_reactants_if_property:nnF
+ { #1 \l_chemnum_compound_separator_tl #2 }
+ {bookmark}
+ { \msg_expandable_error:nnn {chemmacros} {reactant-bookmark} {#1.#2} }
+ \texorpdfstring
+ {
+ \__chemmacros_reactants_item:nn
+ { #1 \l_chemnum_compound_separator_tl #2 }
+ {name}
+ \c_space_tl
+ \cmpd+ {#1.#2}
+ }
+ {
+ \__chemmacros_reactants_item:nn
+ { #1 \l_chemnum_compound_separator_tl #2 }
+ {bookmark}
+ \space \submaincmpdplain {#1} {#2}
+ }
+ }
+
+
+% #1: main Id
+% #2: sub ID
+\DeclareExpandableDocumentCommand \Submainreactantplain {mm}
+ {
+ \chemmacros_if_package_loaded:nF {hyperref}
+ {
+ \msg_expandable_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \submainreactantplain }
+ {hyperref}
+ }
+ \__chemmacros_reactants_if_property:nnF
+ { #1 \l_chemnum_compound_separator_tl #2 }
+ {upper-bookmark}
+ { \msg_expandable_error:nnn {chemmacros} {reactant-bookmark} {#1.#2} }
+ \texorpdfstring
+ {
+ \__chemmacros_reactants_item:nn
+ { #1 \l_chemnum_compound_separator_tl #2 }
+ {upper-name}
+ \c_space_tl
+ \cmpd+ {#1.#2}
+ }
+ {
+ \__chemmacros_reactants_item:nn
+ { #1 \l_chemnum_compound_separator_tl #2 }
+ {upper-bookmark}
+ \space \submaincmpdplain {#1} {#2}
+ }
}
+
+% #1: full ID
+\DeclareExpandableDocumentCommand \solventplain {m}
+ {
+ \chemmacros_if_package_loaded:nF {hyperref}
+ {
+ \msg_expandable_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \solventplain }
+ {hyperref}
+ }
+ \__chemmacros_reactants_if_property:nnF {#1} {bookmark}
+ { \msg_expandable_error:nnn {chemmacros} {reactant-bookmark} {#1} }
+ \texorpdfstring
+ { \__chemmacros_reactants_item:nn {#1} {name} ~ }
+ { \__chemmacros_reactants_item:nn {#1} {bookmark} ~ }
+ }
+
+% #1: full ID
+\DeclareExpandableDocumentCommand \Solventplain {m}
+ {
+ \chemmacros_if_package_loaded:nF {hyperref}
+ {
+ \msg_expandable_error:nnnn
+ {chemmacros}
+ {package-not-loaded}
+ { \solventplain }
+ {hyperref}
+ }
+ \__chemmacros_reactants_if_property:nnF {#1} {upper-bookmark}
+ { \msg_expandable_error:nnn {chemmacros} {reactant-bookmark} {#1} }
+ \texorpdfstring
+ { \__chemmacros_reactants_item:nn {#1} {upper-name} ~ }
+ { \__chemmacros_reactants_item:nn {#1} {upper-bookmark} ~ }
+ }
+
% --------------------------------------------------------------------------
-\chemmacros_if_compatibility:nnTF {<} {5.0}
- { \RequirePackage{chemmacros4} }
- { \RequirePackage{chemmacros5} }
+% #1: star: include ID in table
+\NewDocumentCommand \printreactants {s}
+ {
+ \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
+ {
+ \seq_put_right:Nx
+ \l__chemmacros_reactants_tmpa_seq
+ {
+ \chemnum_cmpd:nnne { \c_false_bool } { \c_true_bool } {}
+ {
+ \seq_item:NV
+ \g_chemnum_initiated_compounds_seq
+ \l__chemmacros_reactants_tmpa_tl
+ }
+ &
+ \bool_if:nT {#1}
+ {
+ \seq_item:NV
+ \g_chemnum_initiated_compounds_seq
+ \l__chemmacros_reactants_tmpa_tl
+ &
+ }
+ % TODO: expl3-command ??
+ \solvent
+ {
+ \seq_item:NV
+ \g_chemnum_initiated_compounds_seq
+ \l__chemmacros_reactants_tmpa_tl
+ }
+ \tabularnewline
+ }
+ \tl_set:Nx
+ \l__chemmacros_reactants_tmpb_tl
+ {
+ \seq_item:NV
+ \g_chemnum_initiated_compounds_seq
+ \l__chemmacros_reactants_tmpa_tl
+ }
+ \chemmacros_reactants_list_subreactant:Vn
+ \l__chemmacros_reactants_tmpb_tl
+ {#1}
+ }
+ % TODO: longtable ?
+ % table customizable?
+ % first draft of two styles
+ \par
+ \noindent
+ \bool_if:NTF \l__chemmacros_reactants_printreactants_style_bool
+ {
+ \str_case:Vn \l__chemmacros_reactants_printreactants_style_str
+ {
+ {xltabular}
+ {
+ \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}
+ }
+ {
+ \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]
+ { @{}l>{\raggedright\arraybackslash}p{0.9\textwidth}@{} }
+ }
+ \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}
+ }
+ \group_end:
+ }
+
+% #1: full ID
+% #2: star, include ID in table
+\cs_new_protected:Npn \chemmacros_reactants_list_subreactant:nn #1#2
+ {
+ \chemnum_if_subcompounds:nT {#1}
+ {
+ \int_step_variable:nNn
+ { \chemnum_count_subcompounds:n {#1} }
+ \l__chemmacros_reactants_tmpa_tl
+ {
+ \seq_put_right:Nx
+ \l__chemmacros_reactants_tmpa_seq
+ {
+ \chemnum_cmpd:nnne { \c_false_bool } { \c_true_bool } {}
+ {
+ \exp_not:n {#1}
+ \exp_not:V \l_chemnum_compound_separator_tl
+ \chemnum_get_subcompound:nV
+ {#1}
+ \l__chemmacros_reactants_tmpa_tl
+ }
+ &
+ \bool_if:nT {#2}
+ {
+ #1
+ \l_chemnum_compound_separator_tl
+ \chemnum_get_subcompound:nV
+ {#1}
+ \l__chemmacros_reactants_tmpa_tl
+ &
+ }
+ % TODO: expl3-command ??
+ \solvent
+ {
+ #1
+ \l_chemnum_compound_separator_tl
+ \chemnum_get_subcompound:nV
+ {#1}
+ \l__chemmacros_reactants_tmpa_tl
+ }
+ \tabularnewline
+ }
+ }
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_reactants_list_subreactant:nn {V}
+
+% --------------------------------------------------------------------------
+\ChemModuleEnd
+\ChemModule{translations}{2022/01/16 translations for defined keys at one place}
+
+% --------------------------------------------------------------------------
+\chemmacros_declare_translations:nn {K-acid}
+ {
+ German = \mathrm {s} ,
+ Danish = \mathrm {s} ,
+ Dutch = \mathrm {z}
+ }
+
+\chemmacros_declare_translations:nn {K-acid}
+ { Danish = \mathrm {v} }
+
+% --------------------------------------------------------------------------
+\chemmacros_declare_translations:nn {phase-sld}
+ {
+ fallback = s ,
+ German = f
+ }
+
+\chemmacros_declare_translations:nn {phase-lqd}
+ {
+ fallback = l ,
+ German = f\/l
+ }
+
+\chemmacros_declare_translations:nn {phase-gas}
+ { fallback = g }
+
+\chemmacros_declare_translations:nn {phase-aq}
+ { fallback = aq }
+
+% --------------------------------------------------------------------------
+\chemmacros_declare_translations:nn {solution}
+ {
+ fallback = solution~ in ,
+ English = solution~ in ,
+ German = L\"osung~ in ,
+ }
+
+% --------------------------------------------------------------------------
+\chemmacros_declare_translations:nn {list-of-reactions}
+ {
+ fallback = List~ of~ Reactions ,
+ English = List~ of~ Reactions ,
+ German = Reaktionsverzeichnis ,
+ Italian = Elenco~ delle~ reazioni ,
+ French = Table~ des~ r\'{e}actions ,
+ Dutch = Lijst~ van~ reacties ,
+ Norwegian = Reaksjonsliste ,
+ Nynorsk = Reaksjonsliste ,
+ Danish = Reaktionsliste
+ }
+
+\chemmacros_declare_translations:nn {reaction}
+ {
+ fallback = reaction ,
+ English = reaction ,
+ German = Reaktion ,
+ Italian = reazione ,
+ French = r\'{e}action ,
+ Dutch = reactie ,
+ Norwegian = reaksjon ,
+ Nynorsk = reaksjon ,
+ Danish = reaktion
+ }
+
+\chemmacros_declare_translations:nn {reactions}
+ {
+ fallback = reactions ,
+ English = reactions ,
+ German = Reaktionen ,
+ Italian = reazioni ,
+ French = r\'{e}actions ,
+ Dutch = reacties ,
+ Norwegian = reaksjoner ,
+ Nynorsk = reaksjonar ,
+ Danish = reaktioner
+ }
+
+\chemmacros_declare_translations:nn {Reaction}
+ {
+ fallback = Reaction ,
+ English = Reaction ,
+ German = Reaktion ,
+ Italian = Reazione ,
+ French = R\'{e}action ,
+ Dutch = Reactie ,
+ Norwegian = Reaksjon ,
+ Nynorsk = Reaksjon ,
+ Danish = Reaktion
+ }
+
+\chemmacros_declare_translations:nn {Reactions}
+ {
+ fallback = Reactions ,
+ English = Reactions ,
+ German = Reaktionen ,
+ Italian = Reazioni ,
+ French = R\'{e}actions ,
+ Dutch = Reacties ,
+ Norwegian = Reaksjoner ,
+ Nynorsk = Reaksjonar ,
+ Danish = Reaktioner
+ }
+
+% --------------------------------------------------------------------------
+\chemmacros_declare_translations:nn {scheme-name}
+ {
+ fallback = Scheme ,
+ English = Scheme ,
+ German = Schema ,
+ Norwegian = Skjema ,
+ Nynorsk = Skjema ,
+ Danish = Skema
+ }
+
+\chemmacros_declare_translations:nn {scheme-list}
+ {
+ fallback = List~ of~ Schemes ,
+ English = List~ of~ Schemes ,
+ German = Verzeichnis~ der~ Schemata ,
+ Norwegian = Skjemaliste ,
+ Nynorsk = Skjemaliste ,
+ Danish = Skemaliste
+ }
+
+\chemmacros_declare_translations:nn {scheme}
+ {
+ fallback = scheme ,
+ English = scheme ,
+ German = Schema ,
+ Norwegian = skjema ,
+ Nynorsk = skjema ,
+ Danish = skema
+ }
+
+\chemmacros_declare_translations:nn {Scheme}
+ {
+ fallback = Scheme ,
+ English = Scheme ,
+ German = Schema ,
+ Norwegian = Skjema ,
+ Nynorsk = Skjema ,
+ Danish = Skema
+ }
+
+\chemmacros_declare_translations:nn {schemes}
+ {
+ fallback = schemes ,
+ English = schemes ,
+ German = Schemata ,
+ Norwegian = skjema ,
+ Nynorsk = skjema ,
+ Danish = skemaer
+ }
+
+\chemmacros_declare_translations:nn {Schemes}
+ {
+ fallback = Schemes ,
+ English = Schemes ,
+ German = Schemata ,
+ Norwegian = Skjema ,
+ Nynorsk = Skjema ,
+ Danish = Skemaer
+ }
-\file_input_stop:
% --------------------------------------------------------------------------
-2020/02/03 - lazy boolean evaluation
- - prefer the kernel commands to \chemmacros_leave_vmode: and
- \chemmacros_tex_if:
+\ChemModuleEnd
diff --git a/macros/latex/contrib/chemmacros/chemmacros4.sty b/macros/latex/contrib/chemmacros/chemmacros4.sty
deleted file mode 100644
index 650837e701..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros4.sty
+++ /dev/null
@@ -1,4100 +0,0 @@
-% --------------------------------------------------------------------------
-% the CHEMMACROS package
-%
-% comprehensive support for typesetting chemistry documents
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-\RequirePackage{ expl3 , xparse , l3keys2e }
-\def\chemmacros@version{4.7a}
-\def\chemmacros@date{2015/08/16}
-
-\ExplSyntaxOn
-\ProvidesExplPackage
- {chemmacros4}
- {\chemmacros@date}
- {\chemmacros@version}
- {\c_chemmacros_info_tl \c_space_tl (CN)}
-
-% --------------------------------------------------------------------------
-% variants of kernel commands:
-\cs_generate_variant:Nn \prop_if_in:NnTF { NV , Nx }
-\cs_generate_variant:Nn \prop_put:Nnn { NV , NVV , NVx }
-\cs_generate_variant:Nn \prop_get:NnNTF { NV }
-\cs_generate_variant:Nn \tl_set_rescan:Nnn { NnV }
-\cs_generate_variant:Nn \tl_if_eq:nnTF { V }
-\cs_generate_variant:Nn \tl_const:cn { cV }
-
-% --------------------------------------------------------------------------
-% load required packages
-% the technical ones:
-\RequirePackage { environ , scrlfile , etoolbox , translations }
-% related to other topics like mathematics or graphics:
-\RequirePackage { xfrac , siunitx , tikz, mathtools , bm }
-% other packages of this bundle -- ghsystem is not loaded here but at the end
-% of the preamble depending on a package option:
-\RequirePackage { chemformula , chemgreek }
-% TikZ libraries (the don't like expl3 syntax):
-\ExplSyntaxOff
-\usetikzlibrary{calc,arrows}
-\ExplSyntaxOn
-
-% --------------------------------------------------------------------------
-% boolean variables for the package options
-\bool_new:N \l__chemmacros_xspace_bool
-\bool_set_true:N \l__chemmacros_xspace_bool
-
-\bool_new:N \l__chemmacros_circled_bool
-\bool_set_true:N \l__chemmacros_circled_bool
-\bool_new:N \l__chemmacros_circled_formal_bool
-\bool_set_true:N \l__chemmacros_circled_formal_bool
-\bool_new:N \l__chemmacros_circled_chem_bool
-\bool_set_true:N \l__chemmacros_circled_chem_bool
-
-\bool_new:N \l__chemmacros_EZ_cool_bool
-\bool_new:N \l__chemmacros_Nu_mathspec_bool
-\bool_new:N \l__chemmacros_chemstyle_bool
-\bool_new:N \l__chemmacros_hyperref_bool
-\bool_new:N \l__chemmacros_varioref_bool
-\bool_new:N \l__chemmacros_chemfig_bool
-\bool_new:N \l__chemmacros_ghsystem_bool
-% \bool_set_true:N \l__chemmacros_ghsystem_bool
-
-\bool_new:N \l__chemmacros_iupac_restricted_bool
-\bool_new:N \l__chemmacros_iupac_strict_bool
-\bool_new:N \l__chemmacros_in_document_bool
-
-\AtBeginDocument
- {
- \bool_set_true:N \l__chemmacros_in_document_bool
- \@ifpackageloaded { chemstyle }
- { \bool_set_true:N \l__chemmacros_chemstyle_bool }
- { \bool_set_false:N \l__chemmacros_chemstyle_bool }
- \@ifpackageloaded { varioref }
- { \bool_set_true:N \l__chemmacros_varioref_bool }
- { \bool_set_false:N \l__chemmacros_varioref_bool }
- \@ifpackageloaded { hyperref }
- { \bool_set_true:N \l__chemmacros_hyperref_bool }
- { \bool_set_false:N \l__chemmacros_hyperref_bool }
- \@ifpackageloaded { chemfig }
- { \bool_set_true:N \l__chemmacros_chemfig_bool }
- { \bool_set_false:N \l__chemmacros_chemfig_bool }
- }
-
-% --------------------------------------------------------------------------
-% warning / error messages
-\msg_new:nnnn { chemmacros } { language-not-defined }
- { The~ language~ `#1'~ is~ not~ defined~ by~ chemmacros. }
- {
- You~ chose~ the~ language~ `#1'~ which~ is~ not~ defined~ by~ chemmacros.~
- `english'~ is~ used~ instead.~ If~ you~ just~ mistyped~ try~ again!~
- Otherwise~ contact~ the~ author~ and~ he'll~ probably~ add~ your~ language.
- }
-
-\msg_new:nnnn { chemmacros } { already-defined }
- { The~ command~ #1~ is~ already~ defined. }
- {
- The~ command~ #1~ has~ already~ been~ otherwise.~ chemmacros~ also~ tries~
- to~ define~ it~ and~ fails.~
- }
-
-\msg_new:nnnn { chemmacros } { not-defined }
- { The~ command~ #1~ is~ not~ defined,~ yet. }
- {
- The~ command~ #1~ is~ not~ defined,~ yet.~ chemmacros~ tries~ to~
- redefine~ it~ and~ fails.~
- }
-
-\msg_new:nnnn { chemmacros } { option-deprecated }
- { The~ option~ `#1'~ is~ deprecated.~ I~ will~ ignore~ it. }
- {
- The~ package~ option~ `#1'~ is~ deprecated~ and~ not~ used~ by~
- chemmacros~ any~ more.~ It~ will~ therefore~ simply~ be~ ignored.
- }
-
-\msg_new:nnnn { 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.
- }
- {
- The~ command~ \token_to_str:N #1 \c_space_tl is~ deprecated.~ Use~
- \token_to_str:N #2 \c_space_tl instead.
- }
-
-\msg_new:nnnn { chemmacros } { command-dropped }
- {
- The~ command~ \token_to_str:N #1 \c_space_tl has~ been~ dropped.~ I'm~
- sorry.
- }
- {
- The~ command~ \token_to_str:N #1 \c_space_tl has~ been~ dropped.~ I'm~
- sorry.
- }
-
-\msg_new:nnnn { chemmacros } { new-particle }
- {
- The~ command~ sequence~ \token_to_str:N #1 \c_space_tl is~ already~
- defined.
- }
- {
- You've~ tried~ to~ define~ a~ particle~ with~ \token_to_str:N
- \NewChemParticle ,~ but~ the~ command~ sequence~ \token_to_str:N #1
- \c_space_tl already~ exists.~ Please~ choose~ another~ name.
- }
-
-\msg_new:nnnn { chemmacros } { renew-particle }
- { The~ particle~ \token_to_str:N #1 \c_space_tl is~ not~ defined. }
- {
- You've~ tried~ to~ renew~ the~ particle~ \token_to_str:N #1 ,~ but~ it~
- doesn't~ exist.
- }
-
-\msg_new:nnnn { chemmacros } { new-latin }
- {
- The~ command~ sequence~ \token_to_str:N #1 \c_space_tl is~ already~
- defined.
- }
- {
- You've~ tried~ to~ define~ a~ latin~ phrase~ with~\token_to_str:N
- \NewChemLatin ,~ but~ the~ command~ sequence~ \token_to_str:N #1
- \c_space_tl already~ exists.~ Please~ choose~ another~ name.
- }
-
-\msg_new:nnnn { chemmacros } { renew-latin }
- { The~ latin~ phrase \token_to_str:N #1 \c_space_tl is~ not~ defined. }
- {
- You've~ tried~ to~ renew~ the~ latin~ phrase~ \token_to_str:N #1 ,~ but~
- it~ doesn't~ exist.
- }
-
-\msg_new:nnnn { chemmacros } { new-nmr }
- {
- The~ command~ sequence~ \token_to_str:N #1 \c_space_tl is~ already~
- defined.
- }
- {
- You've~ tried~ to~ define~ a~ NMR~ command~ with~\token_to_str:N
- \NewChemParticle ,~ but~ the~ command~ sequence~ \token_to_str:N #1
- \c_space_tl already~ exists.~ Please~ choose~ another~ name.
- }
-
-\msg_new:nnnn { chemmacros } { renew-nmr }
- { The~ NMR~ command~ \token_to_str:N #1 \c_space_tl is~ not~ defined. }
- {
- You've~ tried~ to~ renew~ the~ NMR~ command~ \token_to_str:N #1 ,~ but~
- it~ doesn't~ exist.
- }
-
-\msg_new:nnnn { chemmacros } { new-phase }
- {
- The~ command~ sequence~ \token_to_str:N #1 \c_space_tl is~ already~
- defined.
- }
- {
- You've~ tried~ to~ define~ a~ phase~ with~ \token_to_str:N
- \NewChemPhase ,~ but~ the~ command~ sequence~ \token_to_str:N #1
- \c_space_tl already~ exists.~ Please~ choose~ another~ name.
- }
-
-\msg_new:nnnn { chemmacros } { renew-phase }
- { The~ phase~ \token_to_str:N #1 \c_space_tl is~ not~ defined. }
- {
- You've~ tried~ to~ renew~ the~ phase~ \token_to_str:N #1 ,~ but~ it~
- doesn't~ exist.
- }
-
-\msg_new:nnnn { chemmacros } { new-iupac }
- {
- The~ iupac~ naming~ command~ \token_to_str:N #1 \c_space_tl is~ already~
- defined.
- }
- {
- You've~ tried~ to~ define~ a~ iupac~ naming~ command~ with~
- \token_to_str:N \NewChemIUPAC ,~ but~ the~ iupac~ command~
- \token_to_str:N #1 \c_space_tl already~ exists.~ Choose~ another~ name~
- or~ use~ \token_to_str:N \RenewChemIUPAC .
- }
-
-\msg_new:nnnn { chemmacros } { renew-iupac }
- {
- The~ iupac~ naming~ command~ \token_to_str:N #1 \c_space_tl is~ not~
- defined.
- }
- {
- You've~ tried~ to~ renew~ the~ iupac~ command~ \token_to_str:N #1 ,~ but~
- it~ doesn't~ exist.~ Use~ \token_to_str:N \NewChemIUPAC \c_space_tl
- instead.
- }
-
-\msg_new:nnnn { chemmacros } { let-iupac }
- {
- The~ iupac~ naming~ command~ \token_to_str:N #2 \c_space_tl is~ not~
- defined.
- }
- {
- You've~ tried~ to~ let~ the~ iupac~ command~ \token_to_str:N #1 ~ to~ the~
- iupac~ command~ \token_to_str:N #2 ,~ but~ the~ latter~ doesn't~ exist.~
- Use~ \token_to_str:N \NewChemIUPAC \c_space_tl instead~ or~declare~
- \token_to_str:N #2 \c_space_tl first.
- }
-
-\msg_new:nnnn { chemmacros } { ox }
- { \token_to_str:N \ox \c_space_tl : ~ #1 ~ \msg_line_context: . }
- { \token_to_str:N \ox \c_space_tl : ~ #1 ~ \msg_line_context: . }
-
-\msg_new:nnnn { chemmacros } { OX }
- { \token_to_str:N \OX \c_space_tl : ~ #1 ~ \msg_line_context: . }
- { \token_to_str:N \OX \c_space_tl : ~ #1 ~ \msg_line_context: . }
-
-\msg_new:nnnn { chemmacros } { redox }
- { \token_to_str:N \redox \c_space_tl : ~ #1 ~ \msg_line_context: . }
- { \token_to_str:N \redox \c_space_tl : ~ #1 ~ \msg_line_context: . }
-
-\msg_new:nnnn { chemmacros } { chemfig }
- {
- You~ need~ to~ load~ the~ `chemfig'~ package~ in~ order~ to~ make~
- \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl work~
- properly~ \msg_line_context: .
- }
- {
- You~ need~ to~ load~ the~ `chemfig'~ package~ in~ order~ to~ make~
- \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl work~
- properly~ \msg_line_context: .
- }
-
-\msg_new:nnnn { chemmacros } { new-state }
- {
- The~ state~ \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl
- already~ exists.~ You~ need~ to~ use~ \token_to_str:N \RenewChemState
- \c_space_tl to~ alter~ it~ \msg_line_context: .
- }
- {
- The~ state~ \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl
- already~ exists.~ You~ need~ to~ use~ \token_to_str:N \RenewChemState
- \c_space_tl to~ alter~ it~ \msg_line_context: .
- }
-
-\msg_new:nnnn { chemmacros } { renew-state }
- {
- The~ state~ \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl
- isn't~ set~ up~ yet.~ You~ need~ to~ use~ \token_to_str:N
- \NewChemState \c_space_tl to~ create~ it~ \msg_line_context: .
- }
- {
- The~ state~ \exp_after:wN \token_to_str:N \cs:w #1 \cs_end: \c_space_tl
- isn't~ set~ up~ yet.~ You~ need~ to~ use~ \token_to_str:N
- \NewChemState \c_space_tl to~ create ~it~ \msg_line_context: .
- }
-
-\msg_new:nnn { chemmacros } { state-syntax }
- {
- You're~ using~ a~ no~ longer~ recommended~ syntax~ to~ (re-)define~ a~
- state~ variable~ \msg_line_context: .~ This~ syntax~ may~ deprecate~ and~
- be~ removed~ in~ the~ future.
- }
-
-% declare an option as deprecated:
-\cs_new_protected:Npn \chemmacros_option_deprecated:n #1
- { \msg_warning:nnn { chemmacros } { option-deprecated } { #1 } }
-
-% define a deprecated command with hints to the corresponding new one:
-\cs_new_protected:Npn \chemmacros_define_deprecated:NN #1#2
- {
- \cs_set_protected:Npn #1
- {
- \msg_warning:nnxx { chemmacros } { command-deprecated }
- { #1 } { #2 }
- #2
- }
- }
-
-\NewDocumentCommand \DeclareChemDeprecated { mm }
- { \chemmacros_define_deprecated:NN #1 #2 }
-
-% define a command as dropped!
-\cs_new_protected:Npn \chemmacros_define_dropped:N #1
- {
- \cs_set_protected:Npn #1
- { \msg_error:nnn { chemmacros } { command-dropped } { #1 } }
- }
-
-\NewDocumentCommand \DeclareChemDropped { m }
- { \chemmacros_define_dropped:N #1 }
-
-% --------------------------------------------------------------------------
-% temporary variables
-\tl_new:N \l__chemmacros_tmpa_tl
-\tl_new:N \l__chemmacros_tmpb_tl
-\int_new:N \l__chemmacros_tmpa_int
-\box_new:N \l__chemmacros_tmpa_box
-
-% --------------------------------------------------------------------------
-% language settings:
-\bool_new:N \l__chemmacros_language_auto_bool
-\bool_set_true:N \l__chemmacros_language_auto_bool
-% this token list will hold the chosen language for chemmacros; since the
-% language is either chosen automatically or by option it is only available at
-% begin document
-\tl_new:N \l_chemmacros_language_tl
-\tl_set:Nn \l_chemmacros_language_tl { english }
-\tl_new:N \l__chemmacros_current_language_tl
-
-% translate the key #1
-\cs_new:Npn \chemmacros_translate:n #1
- {
- \bool_if:NTF \l__chemmacros_language_auto_bool
- { \GetTranslation{#1} }
- { \GetTranslationFor{\l_chemmacros_language_tl}{#1} }
- }
-
-\AtBeginDocument{
- \bool_if:NTF \l__chemmacros_language_auto_bool
- {
- \tl_set:Nx \l_chemmacros_language_tl
- { \@trnslt@language{\@trnslt@current@language} }
- }
- {
- \tl_set_eq:NN
- \l_chemmacros_language_tl
- \l__chemmacros_current_language_tl
- }
-}
-
-% --------------------------------------------------------------------------
-% package options
-% circled => circle charges
-% detect-bold => behaviour when font series bold
-% EZ => cool or chemmacros version of \E
-% german => change pKA => pKS etc
-% iupac => behaviour of nomenclature commands
-% ngerman => an alias :)
-% ghsystem => load ghsystem or don't
-% method => use `chemformula' or `mhchem'
-% strict => errors or warnings
-% synchronize => let particles et.al. adapt chemformula's font selection
-% ugreek => behaviour of \chemDelta, \chemalpha, ...
-% version=1 => compatibility for documents set with v1.*
-% xspace => add an \xspace after a whole bunch of macros
-
-% this boolean has to be public since the other packages of the bundle may
-% want to know its value
-
-\bool_new:N \l__chemmacros_detect_bold_bool
-\bool_set_true:N \l__chemmacros_detect_bold_bool
-
-\bool_new:N \l__chemmacros_option_greek_set_bool
-\bool_new:N \l__chemmacros_use_upgreek_bool
-\bool_new:N \l__chemmacros_use_textgreek_bool
-\bool_new:N \l__chemmacros_use_kpfonts_bool
-\bool_new:N \l__chemmacros_use_newtx_bool
-
-\cs_new:Npn \chemmacros_inner_font: {}
-
-\keys_define:nn { chemmacros / option }
- {
- compatibility .code:n = ,
- bpchem .code:n = \chemmacros_option_deprecated:n { bpchem } ,
- circletype .choice: ,
- circletype / math .code:n =
- { \bool_set_false:N \l__chemmacros_circled_chem_bool } ,
- circletype / chem .code:n =
- { \bool_set_true:N \l__chemmacros_circled_chem_bool } ,
- circletype .default:n = chem ,
- circled .choice: ,
- circled / none .code:n =
- {
- \bool_set_false:N \l__chemmacros_circled_bool
- \bool_set_false:N \l__chemmacros_circled_formal_bool
- } ,
- circled / formal .code:n =
- {
- \bool_set_true:N \l__chemmacros_circled_bool
- \bool_set_true:N \l__chemmacros_circled_formal_bool
- } ,
- circled / all .code:n =
- {
- \bool_set_true:N \l__chemmacros_circled_bool
- \bool_set_false:N \l__chemmacros_circled_formal_bool
- } ,
- circled .default:n = all ,
- detect-bold .code:n = \chemmacros_option_deprecated:n { detect-bold } ,
- EZ .code:n = \chemmacros_option_deprecated:n { EZ } ,
- german .code:n =
- \tl_set:Nn \l__chemmacros_current_language_tl { german } ,
- ngerman .code:n =
- \tl_set:Nn \l__chemmacros_current_language_tl { ngerman } ,
- ghsystem .bool_set:N = \l__chemmacros_ghsystem_bool ,
- ghsystem .default:n = true ,
- 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 ,
- language .code:n =
- \tl_if_eq:nnTF { #1 } { auto }
- { \bool_set_true:N \l__chemmacros_language_auto_bool }
- {
- \bool_set_false:N \l__chemmacros_language_auto_bool
- \tl_set:Nn \l__chemmacros_current_language_tl { #1 }
- } ,
- method .choice: ,
- method / chemformula .code:n =
- \chemmacros_option_deprecated:n { method } ,
- method / mhchem .code:n =
- \chemmacros_option_deprecated:n { method } ,
- Nu .choice: ,
- Nu / mathspec .code:n =
- \bool_set_true:N \l__chemmacros_Nu_mathspec_bool ,
- Nu / chemmacros .code:n =
- \bool_set_false:N \l__chemmacros_Nu_mathspec_bool ,
- strict .code:n =
- \chemmacros_option_deprecated:n { strict } ,
- synchronize .choice: ,
- synchronize / true .code:n =
- \cs_set_eq:NN \chemmacros_inner_font: \chemformula_font_inner: ,
- synchronize / false .code:n = \cs_set:Nn \chemmacros_inner_font: {} ,
- synchronize .default:n = true ,
- greek .choice: ,
- greek / upgreek .code:n =
- \chemgreek_activate_mapping:n { upgreek }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / textgreek .code:n =
- \chemgreek_activate_mapping:n { textgreek }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / kpfonts .code:n =
- \chemgreek_activate_mapping:n { kpfonts }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / newtx .code:n =
- \chemgreek_activate_mapping:n { newtx }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / mathdesign .code:n =
- \chemgreek_activate_mapping:n { mathdesign }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / fourier .code:n =
- \chemgreek_activate_mapping:n { fourier }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / textalpha .code:n =
- \chemgreek_activate_mapping:n { textalpha }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / math .code:n =
- \chemgreek_activate_mapping:n { default }
- \bool_set_true:N \l__chemmacros_option_greek_set_bool ,
- greek / auto .code:n =
- \bool_set_false:N \l__chemmacros_option_greek_set_bool ,
- greek .default:n = auto ,
- upgreek .code:n = \chemmacros_option_deprecated:n { upgreek } ,
- version .code:n = \chemmacros_option_deprecated:n { version } ,
- cmversion .code:n = \chemmacros_option_deprecated:n { cmversion } ,
- cmversion .choice: ,
- xspace .bool_set:N = \l__chemmacros_xspace_bool ,
- xspace .default:n = true
- }
-
-
-
-\ProcessKeysOptions { chemmacros / option }
-
-% --------------------------------------------------------------------------
-% set up a few things:
-% - is `ghsystem' requested?
-% - do we need `xspace'?
-% - what about the greek letters?
-
-\seq_new:N \l__chemmacros_greek_packages_seq
-\prop_new:N \l__chemmacros_greek_mapping_prop
-
-\cs_new_protected:Npn \chemmacros_add_greek_package_mapping:nn #1#2
- {
- \seq_put_right:Nn \l__chemmacros_greek_packages_seq {#1}
- \prop_put:Nnn \l__chemmacros_greek_mapping_prop {#1} {#2}
- }
-
-\cs_generate_variant:Nn \chemgreek_activate_mapping:n { V }
-
-\cs_new_protected:Npn \__chemmacros_select_greek_mapping:n #1
- {
- \bool_if:NF \l__chemmacros_option_greek_set_bool
- {
- \@ifpackageloaded { #1 }
- {
- \prop_get:NnN
- \l__chemmacros_greek_mapping_prop
- { #1 }
- \l__chemmacros_tmpa_tl
- \chemgreek_activate_mapping:V \l__chemmacros_tmpa_tl
- \bool_set_true:N \l__chemmacros_option_greek_set_bool
- \seq_map_break:
- }
- { }
- }
- }
-
-\chemmacros_add_greek_package_mapping:nn {upgreek} {upgreek}
-\chemmacros_add_greek_package_mapping:nn {textgreek} {textgreek}
-\chemmacros_add_greek_package_mapping:nn {mathdesign} {mathdesign}
-\chemmacros_add_greek_package_mapping:nn {kpfonts} {kpfonts}
-\chemmacros_add_greek_package_mapping:nn {newtxmath} {newtx}
-\chemmacros_add_greek_package_mapping:nn {fourier} {fourier}
-\chemmacros_add_greek_package_mapping:nn {textalpha} {textalpha}
-
-\AtEndPreamble
- {
- \bool_if:NT \l__chemmacros_ghsystem_bool
- { \RequirePackage { ghsystem } }
- \bool_if:NT \l__chemmacros_xspace_bool
- { \RequirePackage { xspace } }
- \seq_map_function:NN
- \l__chemmacros_greek_packages_seq
- \__chemmacros_select_greek_mapping:n
- }
-
-\cs_new_protected:Npn \chemmacros_xspace:
- { \bool_if:NT \l__chemmacros_xspace_bool { \xspace } }
-
-% --------------------------------------------------------------------------
-% TikZ drawings - helper macros
-\cs_new_protected:Npn \chemmacros_tikz_picture:nn #1#2
- { \tikzpicture[#1] #2 \endtikzpicture }
-\cs_generate_variant:Nn \chemmacros_tikz_picture:nn { fn,xn }
-
-\cs_new_protected:Npn \chemmacros_tikz_draw:n #1
- { \draw[#1] }
-\cs_generate_variant:Nn \chemmacros_tikz_draw:n { f,x }
-
-\cs_new_protected:Npn \chemmacros_tikz_node:n #1
- { \node[#1] }
-\cs_generate_variant:Nn \chemmacros_tikz_node:n { f,x }
-
-\cs_new_protected:Npn \chemmacros_tikz_shade:n #1
- { \shade[#1] }
-\cs_generate_variant:Nn \chemmacros_tikz_shade:n { f,x }
-
-\cs_new_protected:Npn \chemmacros_tikz_shadedraw:n #1
- { \shadedraw[#1] }
-\cs_generate_variant:Nn \chemmacros_tikz_shadedraw:n { f,x }
-
-\cs_new_protected:Npn \chemmacros_tikz_node_in_draw:n #1
- { node[#1] }
-\cs_generate_variant:Nn \chemmacros_tikz_node_in_draw:n { f,x }
-
-% --------------------------------------------------------------------------
-% a few general functions:
-\cs_new_eq:NN \mode_leave_vertical: \chemformula_leave_vmode:
-\cs_new_eq:NN \chemmacros_ignore_spaces: \tex_ignorespaces:D
-\cs_new_eq:NN \chemmacros_nobreak: \chemformula_nobreak:
-\cs_new_eq:NN \chemmacros_allow_break: \chemformula_allow_break:
-\cs_new_eq:NN \chemmacros_skip_nobreak:N \chemformula_skip_nobreak:N
-\cs_new:Npn \chemmacros_remove_backslash:N #1
- { \exp_after:wN \use_none:n \token_to_str:N #1 }
-
-\prg_new_protected_conditional:Npnn \chemmacros_if_is_cs:n #1 { T,F,TF }
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { \token_if_cs:NTF #1 { } { x } }
- \tl_if_blank:VTF \l__chemmacros_tmpa_tl
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-% detection and handling of bold face:
-\prg_new_protected_conditional:Npnn \chemmacros_if_bold: { T,F,TF }
- {
- \seq_if_in:NVTF \l__chemmacros_if_bf_seq \f@series
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\seq_new:N \l__chemmacros_if_bf_seq
-
-\seq_set_split:Nnn \l__chemmacros_if_bf_seq { , }
- {
- b , bc , bm , bx , bux ,
- eb , ebc , ebx , mb ,
- sb , sbc , sbx ,
- ub , ubc , ubx
- }
-
-\cs_new_protected:Npn \chemmacros_bm:n #1
- {
- \bool_if:NTF \l__chemmacros_detect_bold_bool
- { \bm { #1 } }
- { #1 }
- }
-
-\cs_new_protected:Npn \chemmacros_bf:n #1
- {
- \bool_if:NTF \l__chemmacros_detect_bold_bool
- { { \normalfont \bfseries #1 } }
- { { \normalfont #1 } }
- }
-
-\cs_new_protected:Npn \chemmacros_detect_bold:n #1
- {
- \chemmacros_if_bold:TF
- {
- \mode_if_math:TF
- { \chemmacros_bm:n { #1 } }
- { \chemmacros_bf:n { #1 } }
- }
- { #1 }
- }
-
-% ---------------------------------------------------------------------------
-% transition state symbol
-\cs_new_protected:Npn \__chemmacros_transition_state:
- {
- \text
- {
- \skip_horizontal:n { .1ex }
- \hbox_overlap_right:n
- { \rule { .6ex } { 0pt } \rule { .05ex } { 1.3ex } }
- \hbox_overlap_right:n { \rule [ .4ex ] { 1.3ex } { .05ex } }
- \rule [ .85ex ] { 1.3ex } { .05ex }
- \skip_horizontal:n { .1ex }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_transition_state:
- {
- \ensuremath
- {
- \mathchoice
- { \displaystyle }
- { \textstyle }
- { \scriptstyle }
- { \scriptscriptstyle }
- \__chemmacros_transition_state:
- }
- }
-
-% \DeclareDocumentCommand?
-\cs_new_eq:NN \transitionstatesymbol \chemmacros_transition_state:
-
-% --------------------------------------------------------------------------
-% let's make use of `chemformula' inside some of `chemmacros' commands:
-\cs_new_protected:Nn \chemmacros_atom:n
- {
- \mode_if_math:TF
- { \text { \chemmacros_inner_font: #1 } }
- { \group_begin: \chemmacros_inner_font: #1 \group_end: }
- }
-\cs_generate_variant:Nn \chemmacros_atom:n { V }
-
-\cs_new_protected:Npn \chemmacros_text:n #1
- { \mode_if_math:TF { \text { #1 } } { #1 } }
-
-\tl_new:N \l__chemmacros_chemformula_tl
-
-\cs_new_protected:Npn \chemmacros_chemformula:n #1
- {
- \group_begin:
- \cs_set_eq:NN \chemformula_font_inner: \chemmacros_inner_font:
- \chemformula_chcpd:nn {} { #1 }
- \group_end:
- }
-\cs_generate_variant:Nn \chemmacros_chemformula:n { x,V }
-
-% --------------------------------------------------------------------------
-% particles, charges
-\NewDocumentCommand \NewChemParticle { mm }
- {
- \cs_if_free:NTF #1
- { \chemmacros_define_particle:Nn #1 { #2 } }
- { \msg_error:nnn { chemmacros } { new-particle } { #1 } }
- }
-
-\NewDocumentCommand \RenewChemParticle { mm }
- {
- \cs_if_free:NTF #1
- { \msg_error:nnn { chemmacros } { renew-particle } { #1 } }
- { \chemmacros_define_particle:Nn #1 { #2 } }
- }
-
-\NewDocumentCommand \DeclareChemParticle { mm }
- { \chemmacros_define_particle:Nn #1 { #2 } }
-
-\cs_new_protected:Nn \chemmacros_define_particle:Nn
- {
- \cs_set_protected:Npn #1
- {
- \chemformula_chcpd:nn {} { #2 }
- \chemmacros_xspace:
- }
- }
-
-\NewChemParticle \el { e- }
-\NewChemParticle \prt { p+ }
-\NewChemParticle \ntr { n^0 }
-
-% --------------------------------------------------------------------------
-% charges
-% circled charge signs: they are defined in the `chemformula' module:
-% use directly:
-
-\cs_new_protected:Npn \fplus { { \chemformula_fplus: } }
-\cs_new_protected:Npn \fminus { { \chemformula_fminus: } }
-
-% change output depending on circled-option
-\cs_new_eq:NN \chemmacros_plus: \chemformula_plus:
-\cs_new_eq:NN \chemmacros_minus: \chemformula_minus:
-
-\cs_new_protected:Npn \chemmacros_formal_plus:
- {
- \group_begin:
- \bool_set_true:N \l_chemformula_formal_charges_bool
- \chemformula_plus:
- \group_end:
- }
-
-\cs_new_protected:Npn \chemmacros_formal_minus:
- {
- \group_begin:
- \bool_set_true:N \l_chemformula_formal_charges_bool
- \chemformula_minus:
- \group_end:
- }
-
-\cs_new_protected:Npn \chemmacros_charge:n #1
- {
- \chemformula_superscript:n
- { \chemmacros_detect_bold:n { #1 } }
- }
-
-\keys_define:nn { chemmacros / charges }
- { append .code:n = \chemmacros_option_deprecated:n { append } }
-
-\NewDocumentCommand \mch { o }
- {
- \IfNoValueTF { #1 }
- { \chemmacros_charge:n { \chemmacros_minus: } }
- { \chemmacros_charge:n { #1 \chemmacros_minus: } }
- }
-
-\NewDocumentCommand \pch { o }
- {
- \IfNoValueTF { #1 }
- { \chemmacros_charge:n { \chemmacros_plus: } }
- { \chemmacros_charge:n { #1 \chemmacros_plus: } }
- }
-
-\NewDocumentCommand \fmch { o }
- {
- \IfNoValueTF { #1 }
- { \chemmacros_charge:n { \chemmacros_formal_minus: } }
- { \chemmacros_charge:n { #1 \chemmacros_formal_minus: } }
- }
-
-\NewDocumentCommand \fpch { o }
- {
- \IfNoValueTF { #1 }
- { \chemmacros_charge:n { \chemmacros_formal_plus: } }
- { \chemmacros_charge:n { #1 \chemmacros_formal_plus: } }
- }
-
-\tl_new:N \l__chemmacros_partial_charge_format_tl
-\tl_set:Nn \l__chemmacros_partial_charge_format_tl { \tiny }
-
-\cs_new_protected:Npn \delm
- {
- \mbox {
- \l__chemmacros_partial_charge_format_tl
- \c_math_toggle_token \delta \chemmacros_minus: \c_math_toggle_token
- }
- \chemmacros_xspace:
- }
-\cs_new_protected:Npn \delp
- {
- \mbox {
- \l__chemmacros_partial_charge_format_tl
- \c_math_toggle_token \delta \chemmacros_plus: \c_math_toggle_token
- }
- \chemmacros_xspace:
- }
-\cs_new_protected:Npn \fdelm
- {
- \mbox {
- \l__chemmacros_partial_charge_format_tl
- \c_math_toggle_token \delta \chemmacros_formal_minus: \c_math_toggle_token
- }
- \chemmacros_xspace:
- }
-\cs_new_protected:Npn \fdelp
- {
- \mbox {
- \l__chemmacros_partial_charge_format_tl
- \c_math_toggle_token \delta \chemmacros_formal_plus: \c_math_toggle_token
- }
- \chemmacros_xspace:
- }
-
-\cs_new_protected:Npn \scrm
- { \ensuremath { \scriptstyle \chemmacros_minus: } }
-\cs_new_protected:Npn \scrp
- { \ensuremath { \scriptstyle \chemmacros_plus: } }
-\cs_new_protected:Npn \fscrm
- { \ensuremath { \scriptstyle \chemmacros_formal_minus: } }
-\cs_new_protected:Npn \fscrp
- { \ensuremath { \scriptstyle \chemmacros_formal_plus: } }
-\cs_new_protected:Npn \fsscrm
- { \ensuremath { \scriptscriptstyle \chemmacros_formal_minus: } }
-\cs_new_protected:Npn \fsscrp
- { \ensuremath { \scriptscriptstyle \chemmacros_formal_plus: } }
-
-\keys_define:nn { chemmacros / charges }
- {
- partial-format .tl_set:N = \l__chemmacros_partial_charge_format_tl
- }
-
-% --------------------------------------------------------------------------
-% ions, molecules
-% proton, hydroxide, hydronium/oxonium, water, nucleophile, electrophile
-\NewChemParticle \Hpl { H+ }
-\NewChemParticle \Hyd { OH- }
-\NewChemParticle \HtO { H3O+ }
-\NewChemParticle \El { E+ }
-\NewChemParticle \water { H2O }
-
-\NewDocumentCommand \chemmacros_Nu:w { o }
- {
- \IfNoValueF { #1 } { \keys_set:nn { chemmacros / particle } { #1 } }
- \bool_if:NTF \l__chemmacros_particle_elpair_bool
- { \chemmacros_elpair:n { Nu } \mch }
- { \chemmacros_chemformula:n { Nu- } }
- \chemmacros_xspace:
- }
-
-\AtBeginDocument
- {
- \bool_if:NTF \l__chemmacros_Nu_mathspec_bool
- { \cs_set_eq:NN \Nuc \chemmacros_Nu:w }
- { \cs_set_eq:NN \Nu \chemmacros_Nu:w }
- }
-
-\cs_new_protected:Npn \chemmacros_ba:
- {
- \bool_if:NTF \l__chemmacros_particle_elpair_bool
- { \chemmacros_elpair:n { ba } \mch }
- { \chemmacros_chemformula:n { ba- } }
- \chemmacros_xspace:
- }
-
-\NewDocumentCommand \ba { o }
- {
- \group_begin:
- \IfNoValueF { #1 } { \keys_set:nn { chemmacros / particle } { #1 } }
- \chemmacros_ba:
- \group_end:
- }
-
-\cs_new_protected:Npn \chemmacros_elpair:n #1
- {
- \bool_if:NTF \l__chemmacros_chemfig_bool
- {
- \bool_if:NTF \l__chemmacros_elpair_dots_bool
- { \chlewis { 0: } { #1 } }
- { \chlewis { 0| } { #1 } }
-% { { \chemmacros_inner_font: #1 \chlewis { 0=| } { \vphantom { #1 } } } }
- }
- {
- \msg_error:nnn { chemmacros } { chemfig } { #1 }
- \chemmacros_atom:n { #1 }
- }
- }
-
-\bool_new:N \l__chemmacros_particle_elpair_bool
-\bool_new:N \l__chemmacros_elpair_dots_bool
-
-\keys_define:nn { chemmacros / particle }
- {
- elpair .choice: ,
- elpair / false .code:n =
- { \bool_set_false:N \l__chemmacros_particle_elpair_bool } ,
- elpair / dots .code:n =
- {
- \bool_set_true:N \l__chemmacros_particle_elpair_bool
- \bool_set_true:N \l__chemmacros_elpair_dots_bool
- } ,
- elpair / dash .code:n =
- {
- \bool_set_true:N \l__chemmacros_particle_elpair_bool
- \bool_set_false:N \l__chemmacros_elpair_dots_bool
- } ,
- elpair .default:n = dots
- }
-
-% --------------------------------------------------------------------------
-% IUPAC
-\prop_new:N \l__chemmacros_iupac_prop
-
-\cs_new_protected:Npn \chemmacros_new_iupac:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \prop_if_in:NVTF \l__chemmacros_iupac_prop \l__chemmacros_tmpa_tl
- { \msg_error:nnn { chemmacros } { new-iupac } { #1 } }
- {
- \prop_put:NVn \l__chemmacros_iupac_prop
- \l__chemmacros_tmpa_tl
- { #2 }
- }
- \chemmacros_make_iupac:
- }
-
-\cs_new_protected:Npn \chemmacros_define_iupac:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \prop_put:NVn \l__chemmacros_iupac_prop
- \l__chemmacros_tmpa_tl
- { #2 }
- \chemmacros_make_iupac:
- }
-
-\cs_new_protected:Npn \chemmacros_renew_iupac:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \prop_if_in:NVTF \l__chemmacros_iupac_prop \l__chemmacros_tmpa_tl
- {
- \prop_put:NVn \l__chemmacros_iupac_prop
- \l__chemmacros_tmpa_tl
- { #2 }
- }
- { \msg_error:nnn { chemmacros } { renew-iupac } { #1 } }
- \chemmacros_make_iupac:
- }
-
-\cs_new_protected:Npn \chemmacros_let_iupac:NN #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \tl_set:Nx \l__chemmacros_tmpb_tl
- { \chemmacros_remove_backslash:N #2 }
- \prop_get:NVNTF \l__chemmacros_iupac_prop
- \l__chemmacros_tmpb_tl
- \l__chemmacros_tmpc_tl
- {
- \prop_put:NVV \l__chemmacros_iupac_prop
- \l__chemmacros_tmpa_tl
- \l__chemmacros_tmpc_tl
- }
- { \msg_error:nnnn { chemmacros } { let-iupac } { #1 } { #2 } }
- \chemmacros_make_iupac:
- }
-
-\cs_new_protected:Npn \chemmacros_define_deprecated_iupac:NN #1#2
- {
- \chemmacros_define_iupac:Nn #1
- {
- \msg_warning:nnnn { chemmacros } { command-deprecated }
- { #1 } { #2 }
- #2
- }
- }
-
-
-\cs_new_protected:Npn \chemmacros_make_iupac:
- {
- \bool_if:NT \l__chemmacros_in_document_bool
- {
- \bool_if:NTF \l__chemmacros_inside_iupac_bool
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- { \cs_set_protected:cpn { ##1 } { ##2 } }
- }
- {
- \bool_if:NF \l__chemmacros_iupac_restricted_bool
- {
- \bool_if:NTF \l__chemmacros_iupac_strict_bool
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- { \cs_set_protected:cpn { ##1 } { ##2 } }
- }
- {
- \prop_map_inline:Nn \l__chemmacros_iupac_prop
- {
- \cs_if_exist:cF { ##1 }
- { \cs_set_protected:cpn { ##1 } { ##2 } }
- }
- }
- }
- }
- }
- }
-
-\AtBeginDocument { \chemmacros_make_iupac: }
-
-\NewDocumentCommand \DeclareChemIUPAC { mm }
- { \chemmacros_define_iupac:Nn #1 { #2 } }
-
-\NewDocumentCommand \NewChemIUPAC { mm }
- { \chemmacros_new_iupac:Nn #1 { #2 } }
-
-\NewDocumentCommand \RenewChemIUPAC { mm }
- { \chemmacros_renew_iupac:Nn #1 { #2 } }
-
-\NewDocumentCommand \LetChemIUPAC { mm }
- { \chemmacros_let_iupac:NN #1 #2 }
-
-\NewDocumentCommand \DeprecateChemIUPAC { mm }
- { \chemmacros_define_deprecated_iupac:NN #1 #2 }
-
-% 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 }
-
-\keys_define:nn { chemmacros / iupac }
- { cip-kern .dim_set:N = \l__chemmacros_cip_kern_dim }
-
-\NewDocumentCommand \cip { m }
- { \chemmacros_cip:n { #1 } }
-
-\cs_new_protected:Npn \chemmacros_cip:n #1
- { ( \textit{#1} \tex_kern:D \l__chemmacros_cip_kern_dim ) }
-
-\DeprecateChemIUPAC \Rcip \rectus
-\DeprecateChemIUPAC \Scip \sinister
-
-\NewChemIUPAC \rectus { \cip { R } }
-\NewChemIUPAC \sinister { \cip { S } }
-
-\LetChemIUPAC \R \rectus
-\LetChemIUPAC \S \sinister
-
-% TikZ needs : to be other
-\ExplSyntaxOff
-\protected\def\chemmacros@sconf#1%
- {%
- \begingroup
- \tikz[baseline,text height=1.5ex,text depth=.25ex]
- {
- \node[anchor=base] (chemmacros@@Sconf) {#1} ;
- \draw[->,thick,rotate=90]
- ($(chemmacros@@Sconf.center)+(20:.8em)$) arc (20:340:.8em);
- }%
- \endgroup
- }
-
-\protected\def\chemmacros@rconf#1%
- {%
- \begingroup
- \tikz[baseline,text height=1.5ex,text depth=.25ex]
- {
- \node[anchor=base] (chemmacros@@Rconf) {#1} ;
- \draw[<-,thick,rotate=90]
- ($(chemmacros@@Rconf.center)+(20:.8em)$) arc (20:340:.8em) ;
- }%
- \endgroup
- }
-\ExplSyntaxOn
-
-\NewDocumentCommand \Sconf { O{S} } { \chemmacros@sconf { #1 } }
-\NewDocumentCommand \Rconf { O{R} } { \chemmacros@rconf { #1 } }
-
-% E(ntgegen)/Z(usammen)
-\NewChemIUPAC \entgegen { \cip { E } }
-\NewChemIUPAC \zusammen { \cip { Z } }
-
-\LetChemIUPAC \E \entgegen
-\LetChemIUPAC \Z \zusammen
-
-% cis/trans
-\NewChemIUPAC \cis { \textit { cis } }
-\NewChemIUPAC \trans { \textit { trans } }
-
-% fac/mer
-\NewChemIUPAC \fac { \textit { fac } }
-\NewChemIUPAC \mer { \textit { mer } }
-
-% tert
-\NewChemIUPAC \tert { \textit { tert } }
-
-% Fischer
-\NewChemIUPAC \dexter { \textsc { d } }
-\NewChemIUPAC \laevus { \textsc { l } }
-
-\LetChemIUPAC \D \dexter
-\LetChemIUPAC \L \laevus
-
-% ortho/meta/para
-\NewChemIUPAC \ortho { \textit { o } }
-\NewChemIUPAC \meta { \textit { m } }
-\NewChemIUPAC \para { \textit { p } }
-
-% syn/anti
-\NewChemIUPAC \syn { \textit { syn } }
-\NewChemIUPAC \anti { \textit { anti } }
-
-% coordination chemistry
-\bool_new:N \l__chemmacros_bridge_super_bool
-
-\keys_define:nn { chemmacros / iupac }
- {
- 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 .default:n = true
- }
-
-\cs_new_protected:Npn \chemformula_hapto:n #1
- {
- \chemeta \chemformula_superscript:n { #1 }
- \bool_if:NT \l__chemmacros_coord_use_hyphen_bool
- { \chemmacros_break_point_hyphen: }
- }
-
-\cs_new_protected:Npn \chemformula_dento:n #1
- {
- \chemkappa \chemformula_superscript:n { #1 }
- \bool_if:NT \l__chemmacros_coord_use_hyphen_bool
- { \chemmacros_break_point_hyphen: }
- }
-
-\cs_new_protected:Npn \chemformula_bridge:n #1
- {
- \chemmu
- \tl_if_blank:nF { #1 }
- {
- \bool_if:NTF \l__chemmacros_bridge_super_bool
- { \chemformula_superscript:n { #1 } }
- { \chemformula_subscript:n { #1 } }
- }
- \bool_if:NT \l__chemmacros_coord_use_hyphen_bool
- { \chemmacros_break_point_hyphen: }
- }
-
-\NewChemIUPAC \hapto { \chemformula_hapto:n }
-\NewChemIUPAC \dento { \chemformula_dento:n }
-\NewChemIUPAC \bridge { \chemformula_bridge:n }
-
-% attachments to heteroatoms / added hydrogen
-\NewChemIUPAC \hydrogen { \textit { H } }
-\NewChemIUPAC \oxygen { \textit { O } }
-\NewChemIUPAC \nitrogen { \textit { N } }
-\NewChemIUPAC \sulfur { \textit { S } }
-\NewChemIUPAC \phosphorus { \textit { P } }
-
-\LetChemIUPAC \H \hydrogen
-\LetChemIUPAC \O \oxygen
-\LetChemIUPAC \N \nitrogen
-\LetChemIUPAC \Sf \sulfur
-\LetChemIUPAC \P \phosphorus
-
-% language specific settings
-\AtBeginDocument
- {
- \bool_if:NT \l__chemmacros_italian_bool
- {
- \NewChemIUPAC \sin { \textit { sin } }
- \NewChemIUPAC \ter { \textit { ter } }
- }
- }
-
-% greek letters
-\NewChemIUPAC \a { \chemalpha }
-\NewChemIUPAC \b { \chembeta }
-\NewChemIUPAC \g { \chemgamma }
-\NewChemIUPAC \d { \chemdelta }
-\NewChemIUPAC \k { \chemkappa }
-\NewChemIUPAC \m { \chemmu }
-\NewChemIUPAC \n { \chemeta }
-\NewChemIUPAC \w { \chemomega }
-
-% \iupac (basically the same as bpchem's \IUPAC)
-% - allows multiple breaking points as compound names can get really long and
-% especially in multicolumn documents can span more than two lines
-% - add a (very) little space before the hyphen and a little negative space
-% after it
-% - add a little space at breaking points if not broken
-% - enables all naming commands regardless if they're definied otherwise or not
-\cs_new_protected:Nn \chemmacros_allow_hyphens:
- {
- \chemmacros_nobreak:
- \skip_horizontal:N \c_zero_dim
- }
-
-\dim_new:N \l__chemmacros_iupac_hyphen_pre_dim
-\dim_set:Nn \l__chemmacros_iupac_hyphen_pre_dim { .01em }
-\dim_new:N \l__chemmacros_iupac_hyphen_post_dim
-\dim_set:Nn \l__chemmacros_iupac_hyphen_post_dim { -.03em }
-\dim_new:N \l__chemmacros_iupac_break_dim
-\dim_set:Nn \l__chemmacros_iupac_break_dim { .03em }
-
-\keys_define:nn { chemmacros / iupac }
- {
- 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 .dim_set:N = \l__chemmacros_iupac_break_dim
- }
-
-\cs_new_protected:Nn \chemmacros_break_point_hyphen:
- {
- \chemmacros_nobreak:
- \tex_discretionary:D { - } { }
- {
- \tex_kern:D \l__chemmacros_iupac_hyphen_pre_dim
- -
- \tex_kern:D \l__chemmacros_iupac_hyphen_post_dim
- }
- \chemmacros_allow_hyphens:
- }
-
-\cs_new_protected:Npn \chemmacros_break_point:
- {
- \chemmacros_nobreak:
- \tex_discretionary:D { - } { }
- { \tex_kern:D \l__chemmacros_iupac_break_dim }
- \chemmacros_allow_hyphens:
- }
-
-\cs_new_protected:Npn \chemmacros_superscript:n #1
- { \mode_if_math:TF { \sb {#1} } { \textsuperscript {#1} } }
-
-\bool_new:N \l__chemmacros_inside_iupac_bool
-
-\char_set_active_eq:NN | \chemmacros_break_point:
-\char_set_active_eq:NN ^ \chemmacros_superscript:n
-
-\group_begin:
-\char_set_catcode_active:N \|
-\char_set_catcode_active:N \^
-
-\cs_new_protected:Npn \chemmacros_iupac:n #1
- {
- \group_begin:
- \bool_set_true:N \l__chemmacros_inside_iupac_bool
- \chemmacros_make_iupac:
- \chemmacros_ignore_spaces:
- \cs_set_eq:NN \- \chemmacros_break_point_hyphen:
- \chemmacros_define_deprecated:NN \| |
- \chemmacros_define_deprecated:NN \^ ^
- \tl_set_rescan:Nnn \l__chemmacros_tmpa_tl
- {
- \char_set_catcode_active:N \|
- \char_set_catcode_active:N \^
- }
- {#1}
- \l__chemmacros_tmpa_tl
- \group_end:
- }
-
-\group_end:
-
-% Thanks to Joseph Wright and Enrico Gregorio for the help on the curious
-% redefinition of \- and the end of the compilation
-% see http://tex.stackexchange.com/q/42405/5049 for reference
-\cs_set_protected:Npx \| { \exp_not:o { \| } }
-\cs_set_protected:Npx \- { \exp_not:o { \- } }
-\cs_set_eq:NN \@dischyph \-
-
-\NewDocumentCommand \iupac { }
- { \chemmacros_iupac:n }
-
-% --------------------------------------------------------------------------
-% latin phrases
-\tl_new:N \l__chemmacros_latin_format_tl
-\tl_set:Nn \l__chemmacros_latin_format_tl { \itshape }
-
-\keys_define:nn { chemmacros / latin }
- { format . tl_set:N = \l__chemmacros_latin_format_tl }
-
-\cs_new_protected:Npn \chemmacros_latin:n #1
- { { \l__chemmacros_latin_format_tl #1 } }
-
-\prop_new:N \l__chemmacros_latin_prop
-
-\cs_new_protected:Npn \chemmacros_new_latin:Nn #1#2
- {
- \cs_if_free:NTF #1
- {
- \cs_new_protected:Npn #1
- { \chemmacros_latin:n { #2 } \chemmacros_xspace: }
- \prop_put:Nnn \l__chemmacros_latin_prop { #1 } { #2 }
- }
- { \msg_error:nnn { chemmacros } { new-latin } { #1 } }
- }
-
-\cs_new_protected:Npn \chemmacros_define_latin:Nn #1#2
- {
- \cs_if_free:NTF #1
- {
- \cs_new_protected:Npn #1
- { \chemmacros_latin:n { #2 } \chemmacros_xspace: }
- \prop_put:Nnn \l__chemmacros_latin_prop { #1 } { #2 }
- }
- {
- \cs_set_protected:Npn #1
- { \chemmacros_latin:n { #2 } \chemmacros_xspace: }
- \prop_put:Nnn \l__chemmacros_latin_prop { #1 } { #2 }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_renew_latin:Nn #1#2
- {
- \prop_if_in:NnTF \l__chemmacros_latin_prop { #1 }
- { \cs_set:Npn #1 { \chemmacros_latin:n { #2 } \chemmacros_xspace: } }
- { \msg_error:nnn { chemmacros } { renew-latin } { #1 } }
- }
-
-\NewDocumentCommand \NewChemLatin { mm }
- { \chemmacros_new_latin:Nn #1 { #2 } }
-
-\NewDocumentCommand \RenewChemLatin { mm }
- { \chemmacros_renew_latin:Nn #1 { #2 } }
-
-\NewDocumentCommand \DeclareChemLatin { mm }
- { \chemmacros_define_latin:Nn #1 { #2 } }
-
-\AtBeginDocument
- {
- \bool_if:NTF \l__chemmacros_chemstyle_bool
- {
- \AfterPackage* { chemstyle }
- {
- \cs_undefine:N \invacuo
- \cs_set_eq:NN \chemmacros_latin:n \cst@latin
- }
- }
- {
- \cs_new_eq:NN \latin \chemmacros_latin:n
- }
- \NewChemLatin \insitu { in~situ }
- \NewChemLatin \abinitio { ab~initio }
- \NewChemLatin \invacuo { in~vacuo }
- }
-
-% --------------------------------------------------------------------------- %
-% acid / base
-\tl_new:N \l__chemmacros_k_acid_tl
-\tl_new:N \l__chemmacros_k_base_tl
-\tl_new:N \l__chemmacros_k_water_tl
-
-% \bool_new:N \l__chemmacros_subscript_lowercase_bool
-
-\tl_set:Nn \l__chemmacros_k_acid_tl
- { \chemmacros_translate:n {K-acid} }
-
-\tl_set:Nn \l__chemmacros_k_base_tl
- { \chemmacros_translate:n {K-base} }
-
-\tl_set:Nn \l__chemmacros_k_water_tl
- { \chemmacros_translate:n {K-water} }
-
-\keys_define:nn { chemmacros / acid-base }
- {
- p-style .choice: ,
- p-style / slanted .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textsl ,
- p-style / italics .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textit ,
- p-style / upright .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textup ,
- K-acid .tl_set:N = \l__chemmacros_k_acid_tl ,
- K-base .tl_set:N = \l__chemmacros_k_base_tl ,
- K-water .tl_set:N = \l__chemmacros_k_water_tl ,
- subscript .code:n = \chemmacros_option_deprecated:n {#1}
- % subscript / lowercase .code:n =
- % \bool_set_true:N \l__chemmacros_subscript_lowercase_bool ,
- % subscript / uppercase .code:n =
- % \bool_set_false:N \l__chemmacros_subscript_lowercase_bool
- }
-
-\cs_new_eq:NN \chemmacros_p_style:n \textup
-
-\cs_new_protected:Npn \Ka
- {
- \ensuremath
- {
- \chemmacros_detect_bold:n
- {
- K
- \c_math_subscript_token
- { \l__chemmacros_k_acid_tl }
- }
- }
- \chemmacros_xspace:
- }
-
-\cs_new_protected:Npn \Kb
- {
- \ensuremath
- {
- \chemmacros_detect_bold:n
- {
- K
- \c_math_subscript_token
- { \l__chemmacros_k_base_tl }
- }
- }
- \chemmacros_xspace:
- }
-
-\cs_new_protected:Npn \Kw
- {
- \ensuremath
- {
- \chemmacros_detect_bold:n
- {
- K
- \c_math_subscript_token
- { \l__chemmacros_k_water_tl }
- }
- }
- \chemmacros_xspace:
- }
-
-\cs_new_protected:Npn \chemmacros_p:n #1
- {
- \group_begin:
- \mbox
- {
- \chemmacros_p_style:n { p }
- \ensuremath { #1 }
- }
- \group_end:
- }
-
-\NewDocumentCommand \p { m }
- { \chemmacros_p:n { #1 } }
-
-\cs_new_protected:Npn \pH
- {
- \chemmacros_p:n { \chemmacros_chemformula:n { H } }
- \chemmacros_xspace:
- }
-
-\cs_new_protected:Npn \pOH
- {
- \chemmacros_p:n { \chemmacros_chemformula:n { OH } }
- \chemmacros_xspace:
- }
-
-\NewDocumentCommand \pKa { o }
- {
- \chemmacros_p:n
- {
- \Ka \IfNoValueF { #1 }
- { {} \c_math_subscript_token { \chemmacros_detect_bold:n { #1 } } }
- }
- \chemmacros_xspace:
- }
-
-\NewDocumentCommand \pKb { o }
- {
- \chemmacros_p:n
- {
- \Kb \IfNoValueF { #1 }
- { {} \c_math_subscript_token { \chemmacros_detect_bold:n { #1 } } }
- }
- \chemmacros_xspace:
- }
-
-% --------------------------------------------------------------------------
-% units
-\DeclareSIUnit { \atm } { atm }
-\DeclareSIUnit { \atmosphere } { atm }
-\DeclareSIUnit { \calory } { cal }
-\DeclareSIUnit { \cal } { cal }
-
-\AtBeginDocument
- {
- \bool_if:NF \l__chemmacros_chemstyle_bool
- {
- \DeclareSIUnit { \cmc } { \cubic\centi\metre }
- \DeclareSIUnit { \molar } { \mole\per\cubic\deci\metre }
- \DeclareSIUnit { \Molar } { \textsc{m} }
- }
- }
-
-\DeclareSIUnit { \moLar } { \mole\per\liter }
-\DeclareSIUnit { \MolMass } { \gram\per\mole }
-\DeclareSIUnit { \normal } { \textsc{n} }
-\DeclareSIUnit { \torr } { torr }
-
-% --------------------------------------------------------------------------
-% reaction mechanisms
-% \mech[<type>]
-% <type> - substitutions: {}, 1, 2, se, 1e, 2e, ar
-% - eliminations: e, e1, e2, cb
-\tl_new:N \l__chemmacros_mech_type_tl
-\tl_new:N \l__chemmacros_mech_mol_tl
-\tl_new:N \l__chemmacros_mech_ar_tl
-
-\cs_new_protected:Npn \__chemmacros_set_mech:nnn #1#2#3
- {
- \tl_set:Nn \l__chemmacros_mech_type_tl { #1 }
- \tl_set:Nn \l__chemmacros_mech_mol_tl { #2 }
- \tl_set:Nn \l__chemmacros_mech_ar_tl { #3 }
- }
-
-\keys_define:nn { chemmacros / mech }
- {
- type .choice: ,
- type / .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {N} }
- \c_math_toggle_token
- }
- { }
- } ,
- type / 1 .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {N} }
- \c_math_toggle_token
- 1
- }
- { }
- } ,
- type / 2 .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {N} }
- \c_math_toggle_token
- 2
- }
- { }
- } ,
- type / se .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- }
- { }
- } ,
- type / 1e .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- 1
- }
- { }
- } ,
- type / 2e .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- 2
- }
- { }
- } ,
- type / ar .code:n =
- {
- \__chemmacros_set_mech:nnn { S }
- {
- \c_math_toggle_token
- \c_math_subscript_token { \text {E} }
- \c_math_toggle_token
- }
- { Ar - }
- } ,
- type / e .code:n =
- { \__chemmacros_set_mech:nnn { E } { } { } } ,
- type / e1 .code:n =
- { \__chemmacros_set_mech:nnn { E } { 1 } { } } ,
- type / e2 .code:n =
- { \__chemmacros_set_mech:nnn { E } { 2 } { } } ,
- type / cb .code:n =
- {
- \__chemmacros_set_mech:nnn { E }
- {
- 1
- \c_math_toggle_token
- \c_math_subscript_token { \text {cb} }
- \c_math_toggle_token
- }
- { }
- } ,
- type .default:n =
- }
-
-\cs_new_protected:Npn \chemmacros_mech:n #1
- {
- \tl_if_blank:nTF { #1 }
- { \keys_set:nn { chemmacros / mech } { type } }
- { \keys_set:nn { chemmacros / mech } { type = #1 } }
- \mbox
- {
- \tl_use:N \l__chemmacros_mech_ar_tl
- \tl_use:N \l__chemmacros_mech_type_tl
- \tl_use:N \l__chemmacros_mech_mol_tl
- }
- \chemmacros_xspace:
- }
-
-\NewDocumentCommand \mech { o }
- {
- \IfNoValueTF { #1 }
- { \chemmacros_mech:n { } }
- { \chemmacros_mech:n { #1 } }
- }
-
-% --------------------------------------------------------------------------
-% oxidation numbers
-% \ox{<number>,<atom>}
-\bool_new:N \l__chemmacros_ox_sign_bool
-\bool_new:N \l__chemmacros_ox_integer_bool
-\bool_new:N \l__chemmacros_ox_explicit_sign_bool
-\bool_set_false:N \l__chemmacros_ox_explicit_sign_bool
-\bool_new:N \l__chemmacros_ox_format_roman_bool
-\bool_set_true:N \l__chemmacros_ox_format_roman_bool
-\bool_new:N \l__chemmacros_ox_decimal_marker_comma_bool
-\bool_set_false:N \l__chemmacros_ox_decimal_marker_comma_bool
-\bool_new:N \l__chemmacros_ox_parse_bool
-\bool_set_true:N \l__chemmacros_ox_parse_bool
-\bool_new:N \l__chemmacros_ox_side_bool
-\bool_new:N \l__chemmacros_ox_super_bool
-\bool_new:N \l__chemmacros_ox_top_bool
-\bool_set_true:N \l__chemmacros_ox_top_bool
-\bool_new:N \l__chemmacros_ox_align_center_bool
-
-\int_new:N \l__chemmacros_ox_number_int
-\fp_new:N \l__chemmacros_ox_number_fp
-
-\cs_new_protected:Npn \__chemmacros_ox_process_number:n #1
- {
- \bool_if:NTF \l__chemmacros_ox_parse_bool
- {
- \tl_if_in:nnTF { #1 } { / }
- { \__chemmacros_ox_fraction:w #1 \q_stop }
- {
- \__chemmacros_ox_sign:n { #1 }
- \__chemmacros_ox_value:n { #1 }
- }
- }
- { #1 }
- }
-
-\DeclareInstance { xfrac } { chemmacros-ox-frac } { text }
- {
- scale-factor = 1.2 ,
- denominator-bot-sep = -.5ex ,
- numerator-top-sep = -.3ex ,
- slash-left-kern = -.2em ,
- slash-right-kern = -.2em ,
- slash-symbol-font = lmr
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_fraction:w #1/#2 \q_stop
- {
- \bool_set_false:N \l__chemmacros_ox_format_roman_bool
- \__chemmacros_ox_sign:n { #1 }
- \bool_if:NTF \l__chemmacros_ox_side_bool
- { \sfrac { \__chemmacros_ox_value:n { #1 } } { #2 } }
- {
- \sfrac [ chemmacros-ox-frac ]
- { \__chemmacros_ox_value:n { #1 } }
- { #2 }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_sign:n #1
- {
- \fp_compare:nNnT { #1 } > { 0 }
- {
- \bool_if:NT \l__chemmacros_ox_explicit_sign_bool
- { \c_math_toggle_token + \c_math_toggle_token }
- }
- \fp_compare:nNnT { #1 } = { 0 }
- {
- \bool_if:NT \l__chemmacros_ox_explicit_sign_bool
- { \c_math_toggle_token \pm \c_math_toggle_token }
- }
- \fp_compare:nNnT { #1 } < { 0 }
- { \c_math_toggle_token - \c_math_toggle_token }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_value:n #1
- {
- \fp_set:Nn \l__chemmacros_ox_number_fp { abs(#1) }
- \__chemmacros_ox_is_integer:V \l__chemmacros_ox_number_fp
- \bool_if:NTF \l__chemmacros_ox_format_roman_bool
- { \__chemmacros_fp_to_Roman:V \l__chemmacros_ox_number_fp }
- {
- \bool_if:NTF \l__chemmacros_ox_integer_bool
- {
- \c_math_toggle_token
- \__chemmacros_fp_to_arabic:V \l__chemmacros_ox_number_fp
- \c_math_toggle_token
- }
- {
- \c_math_toggle_token
- \__chemmacros_fp_show:V \l__chemmacros_ox_number_fp
- \c_math_toggle_token
- }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_is_integer:n #1
- {
- \fp_set:Nn \l__chemmacros_tmpa_fp { round(#1 + 1 , 0 ) - 1 }
- \fp_compare:nNnTF { \l__chemmacros_tmpa_fp } = { #1 }
- { \bool_set_true:N \l__chemmacros_ox_integer_bool }
- {
- \bool_set_false:N \l__chemmacros_ox_integer_bool
- \bool_set_false:N \l__chemmacros_ox_format_roman_bool
- }
- }
-\cs_generate_variant:Nn \__chemmacros_ox_is_integer:n { V }
-
-\cs_new_protected:Npn \__chemmacros_fp_to_Roman:n #1
- {
- \group_begin:
- \fp_set:Nn \l__chemmacros_tmpa_fp { round(#1 , 0 ) }
- \int_set:Nn \l__chemmacros_tmpa_int
- { \fp_to_tl:N \l__chemmacros_tmpa_fp }
- \int_compare:nTF { \l__chemmacros_tmpa_int = 0 }
- { 0 }
- { \int_to_Roman:n { \l__chemmacros_tmpa_int } }
- \group_end:
- }
-\cs_generate_variant:Nn \__chemmacros_fp_to_Roman:n { V }
-
-\cs_new_protected:Npn \__chemmacros_fp_to_arabic:n #1
- {
- \group_begin:
- \fp_set:Nn \l__chemmacros_tmpa_tl { #1 }
- \fp_to_tl:N \l__chemmacros_tmpa_tl
- \group_end:
- }
-\cs_generate_variant:Nn \__chemmacros_fp_to_arabic:n { V }
-
-\cs_new_protected:Npn \__chemmacros_fp_show:n #1
- {
- \group_begin:
- \fp_set:Nn \l__chemmacros_tmpa_tl { #1 }
- \bool_if:NTF \l__chemmacros_ox_decimal_marker_comma_bool
- {
- \tl_set:Nx \l__chemmacros_tmpb_tl
- { \fp_to_tl:N \l__chemmacros_tmpa_tl }
- \tl_replace_once:Nnn \l__chemmacros_tmpb_tl { . } { {,} }
- \tl_use:N \l__chemmacros_tmpb_tl
- }
- { \fp_to_tl:N \l__chemmacros_tmpa_tl }
- \group_end:
- }
-\cs_generate_variant:Nn \__chemmacros_fp_show:n { V }
-
-\cs_new_protected:Npn \__chemmacros_ox_write:nn #1#2
- {
- \tl_if_blank:nT { #1 }
- { \msg_error:nnx { chemmacros } { ox } { oxidation~number~missing } }
- \tl_if_blank:nT { #2 }
- { \msg_error:nnx { chemmacros } { ox } { atom~missing } }
- \ensuremath
- {
- \bool_if:NT \l__chemmacros_ox_super_bool
- {
- \chemmacros_text:n
- {
- #2
- \c_math_toggle_token
- \c_math_superscript_token
- { \text { \tiny \__chemmacros_ox_process_number:n { #1 } } }
- \c_math_toggle_token
- }
- }
- \bool_if:NT \l__chemmacros_ox_side_bool
- {
- \chemmacros_text:n
- { #2 ( \text { \__chemmacros_ox_process_number:n { #1 } } ) }
- }
- \bool_if:NT \l__chemmacros_ox_top_bool
- {
- \overset
- {
- \bool_if:NTF \l__chemmacros_ox_align_center_bool
- { \clap } { \rlap }
- {
- \chemmacros_text:n
- { \tiny \__chemmacros_ox_process_number:n { #1 } }
- }
- }
- { \chemmacros_text:n { #2 } }
- }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_pos_top:
- {
- \bool_set_true:N \l__chemmacros_ox_top_bool
- \bool_set_false:N \l__chemmacros_ox_super_bool
- \bool_set_false:N \l__chemmacros_ox_side_bool
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_pos_super:
- {
- \bool_set_false:N \l__chemmacros_ox_top_bool
- \bool_set_true:N \l__chemmacros_ox_super_bool
- \bool_set_false:N \l__chemmacros_ox_side_bool
- }
-
-\cs_new_protected:Npn \__chemmacros_ox_pos_side:
- {
- \bool_set_false:N \l__chemmacros_ox_top_bool
- \bool_set_false:N \l__chemmacros_ox_super_bool
- \bool_set_true:N \l__chemmacros_ox_side_bool
- }
-
-\keys_define:nn { chemmacros / ox }
- {
- pos .choice: ,
- pos / top .code:n = \__chemmacros_ox_pos_top: ,
- pos / super .code:n = \__chemmacros_ox_pos_super: ,
- pos / side .code:n = \__chemmacros_ox_pos_side: ,
- roman .bool_set:N = \l__chemmacros_ox_format_roman_bool ,
- roman .default:n = true ,
- parse .bool_set:N = \l__chemmacros_ox_parse_bool ,
- parse .default:n = true ,
- explicit-sign .bool_set:N = \l__chemmacros_ox_explicit_sign_bool ,
- explicit-sign .default:n = true ,
- decimal-marker .choice: ,
- decimal-marker / comma .code:n =
- { \bool_set_true:N \l__chemmacros_ox_decimal_marker_comma_bool } ,
- decimal-marker / point .code:n =
- { \bool_set_false:N \l__chemmacros_ox_decimal_marker_comma_bool } ,
- align .choice: ,
- align / center .code:n = \bool_set_true:N \l__chemmacros_ox_align_center_bool ,
- align / right .code:n = \bool_set_false:N \l__chemmacros_ox_align_center_bool
- }
-
-% \ox[<keyval>]{<num>,<atom>}
-% \ox*[<keyval>]{<num>,<atom>} => always number on the side
-\cs_new_protected:Npn \chemmacros_ox:nnnn #1#2#3#4
- {
- \group_begin:
- \tl_if_blank:nF { #1 } { \__chemmacros_ox_pos_super: }
- \keys_set:nn { chemmacros / ox } { #2 }
- \__chemmacros_ox_write:nn { #3 } { #4 }
- \group_end:
- }
-
-\NewDocumentCommand \ox { s o > { \SplitArgument { 1 } { , } } m }
- {
- \IfBooleanTF { #1 }
- {
- \IfNoValueTF { #2 }
- { \chemmacros_ox:nnnn { #1 } { } #3 }
- { \chemmacros_ox:nnnn { #1 } { #2 } #3 }
- }
- {
- \IfNoValueTF { #2 }
- { \chemmacros_ox:nnnn { } { } #3 }
- { \chemmacros_ox:nnnn { } { #2 } #3 }
- }
- }
-
-% --------------------------------------------------------------------------- %
-% - oxidation arrows
-\tl_new:N \l__chemmacros_redox_begin_tl
-\tl_new:N \l__chemmacros_redox_end_tl
-\tl_new:N \l__chemmacros_redox_tikz_tl
-\tl_new:N \l__chemmacros_redox_shift_tl
-\tl_new:N \l__chemmacros_redox_anchor_tl
-\tl_new:N \l__chemmacros_redox_side_tl
-
-\fp_new:N \l__chemmacros_redox_shift_fp
-
-\dim_new:N \l__chemmacros_redox_sep_dim
-\dim_new:N \l__chemmacros_redox_sep_default_dim
-\dim_set:Nn \l__chemmacros_redox_sep_default_dim { .2em }
-\dim_new:N \l__chemmacros_redox_dist_dim
-\dim_set:Nn \l__chemmacros_redox_dist_dim {.6em}
-
-% place and name nodes:
-% \OX{<name>,<atom>}
-\NewDocumentCommand \OX { > { \SplitArgument { 1 } { , } } m }
- { \chemmacros_redox_partner:nn #1 }
-
-\cs_new_protected:Npn \chemmacros_redox_partner:nn #1#2
- {
- \chemformula_latex_if:nTF { measuring@ }
- {
- \group_begin:
- \tikz[baseline=(#1.base)]
- { \node [inner~sep=0pt] (#1) { #2 } ; }
- \group_end:
- }
- {
- \tl_if_blank:nT { #1 }
- { \msg_error:nnx { chemmacros } { OX } { node~name~missing } }
- \tl_if_blank:nT { #2 }
- { \msg_error:nnx { chemmacros } { OX } { atom~missing } }
- \tikz[baseline=(#1.base),remember~picture]
- { \node [inner~sep=0pt] (#1) { #2 } ; }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_redox_coordinates:nn #1#2
- {
- \tl_set:Nn \l__chemmacros_redox_begin_tl { #1 }
- \tl_set:Nn \l__chemmacros_redox_end_tl { #2 }
- }
-
-\cs_new_protected:Npn \chemmacros_redox:nnnnn #1#2#3#4#5
- {
- \tl_clear:N \l__chemmacros_redox_begin_tl
- \tl_clear:N \l__chemmacros_redox_end_tl
- \tl_clear:N \l__chemmacros_redox_tikz_tl
- \__chemmacros_redox_coordinates:nn { #1 } { #2 }
- \tl_if_blank:nF { #3 }
- { \tl_set:Nn \l__chemmacros_redox_tikz_tl { #3 } }
- \tl_if_blank:nTF { #4 }
- {
- \fp_set:Nn \l__chemmacros_redox_shift_fp { 1 }
- \tl_set:Nn \l__chemmacros_redox_anchor_tl { above }
- \tl_set:Nn \l__chemmacros_redox_side_tl { north }
- \dim_set_eq:NN
- \l__chemmacros_redox_sep_dim
- \l__chemmacros_redox_sep_default_dim
- }
- {
- \fp_compare:nNnTF { #4 } < { 0 }
- {
- \tl_set:Nn \l__chemmacros_redox_anchor_tl { below }
- \tl_set:Nn \l__chemmacros_redox_side_tl { south }
- \exp_args:NNo \dim_set:Nn \l__chemmacros_redox_sep_dim
- { - \l__chemmacros_redox_sep_default_dim }
- }
- {
- \tl_set:Nn \l__chemmacros_redox_anchor_tl { above }
- \tl_set:Nn \l__chemmacros_redox_side_tl { north }
- \dim_set_eq:NN
- \l__chemmacros_redox_sep_dim
- \l__chemmacros_redox_sep_default_dim
- }
- \fp_set:Nn \l__chemmacros_redox_shift_fp { #4 }
- }
- \tl_set:Nn \l__chemmacros_redox_shift_tl
- { \fp_to_tl:N \l__chemmacros_redox_shift_fp }
- \tikz[remember~picture,overlay]
- {
- \chemmacros_tikz_draw:f { \tl_use:N \l__chemmacros_redox_tikz_tl }
- ($
- (\l__chemmacros_redox_begin_tl .
- \l__chemmacros_redox_side_tl)+(0,\l__chemmacros_redox_sep_dim)
- $)
- --
- ++(0,\l__chemmacros_redox_shift_tl * \l__chemmacros_redox_dist_dim) -|
- node [pos=.25,\l__chemmacros_redox_anchor_tl] { { #5 } }
- ($
- (\l__chemmacros_redox_end_tl .
- \l__chemmacros_redox_side_tl)+(0,\l__chemmacros_redox_sep_dim)
- $) ;
- }
- }
-
-\NewDocumentCommand \redox { > { \SplitArgument { 1 } { , } } r() o o G{} }
- {
- \IfNoValueT { #1 }
- {
- \msg_error:nnx { chemmacros } { redox }
- { You~need~to~specify~coordinates }
- }
- \IfNoValueTF { #2 }
- { \chemmacros_redox:nnnnn #1 { } { } { #4 } }
- {
- \IfNoValueTF { #3 }
- { \chemmacros_redox:nnnnn #1 { #2 } { } { #4 } }
- { \chemmacros_redox:nnnnn #1 { #2 } { #3 } { #4 } }
- }
- }
-
-% redox-keys
-\keys_define:nn { chemmacros / redox }
- {
- dist .dim_set:N = \l__chemmacros_redox_dist_dim ,
- dist .default:n = { .6em } ,
- sep .dim_set:N = \l__chemmacros_redox_sep_default_dim ,
- sep .default:n = { .2em }
- }
-
-% --------------------------------------------------------------------------- %
-% spectroscopy
-\tl_new:N \g__chemmacros_nmr_isotope_tl
-\tl_new:N \l__chemmacros_nmr_isotope_default_tl
-\tl_set:Nn \l__chemmacros_nmr_isotope_default_tl { 1 }
-\tl_new:N \l__chemmacros_nmr_coupling_nuclei_tl
-\tl_new:N \l__chemmacros_nmr_coupling_nuclei_pre_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_pre_tl { ( }
-\tl_new:N \l__chemmacros_nmr_coupling_nuclei_post_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_post_tl { ) }
-\tl_new:N \l__chemmacros_nmr_coupling_bonds_tl
-\tl_new:N \l__chemmacros_nmr_coupling_bonds_pre_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_pre_tl { }
-\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_post_tl { \! }
-\tl_new:N \l__chemmacros_nmr_coupling_symbol_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_symbol_tl { J }
-\tl_new:N \g__chemmacros_nmr_element_coupled_tl
-\tl_new:N \g__chemmacros_nmr_element_tl
-\tl_new:N \l__chemmacros_nmr_element_default_tl
-\tl_set:Nn \l__chemmacros_nmr_element_default_tl { H }
-\tl_new:N \l__chemmacros_nmr_format_tl
-\tl_new:N \l__chemmacros_nmr_delta_tl
-\tl_new:N \l__chemmacros_nmr_coupling_unit_tl
-\tl_set:Nn \l__chemmacros_nmr_coupling_unit_tl { \hertz }
-\tl_new:N \l__chemmacros_nmr_unit_tl
-\tl_set:Nn \l__chemmacros_nmr_unit_tl { \mega\hertz }
-\tl_new:N \l__chemmacros_nmr_list_setup_tl
-\tl_set:Nn \l__chemmacros_nmr_list_setup_tl
- {
- \topsep\z@skip \partopsep\z@skip
- \itemsep\z@ \parsep\z@ \itemindent\z@
- \leftmargin\z@
- }
-\tl_new:N \l__chemmacros_nmr_position_tl
-\tl_new:N \l__chemmacros_nmr_element_method_connector_tl
-\tl_set:Nn \l__chemmacros_nmr_element_method_connector_tl {-}
-\tl_new:N \l__chemmacros_nmr_method_tl
-\tl_set:Nn \l__chemmacros_nmr_method_tl {NMR}
-
-\bool_new:N \l__chemmacros_nmr_coupling_nuclei_sub_bool
-\bool_new:N \l__chemmacros_nmr_frequency_bool
-\bool_new:N \l__chemmacros_nmr_solvent_bool
-\bool_new:N \l__chemmacros_nmr_delimiters_bool
-\bool_new:N \l__chemmacros_nmr_comma_bool
-\bool_new:N \l__chemmacros_nmr_inner_bool
-\bool_new:N \l__chemmacros_nmr_position_side_bool
-\bool_new:N \l__chemmacros_nmr_parse_bool
-\bool_set_true:N \l__chemmacros_nmr_parse_bool
-\bool_new:N \l__chemmacros_nmr_list_bool
-\bool_new:N \l__chemmacros_nmr_use_equal_bool
-\bool_new:N \l__chemmacros_nmr_custom_command_active_bool
-\bool_new:N \l__chemmacros_nmr_custom_command_used_bool
-
-\cs_new_protected:Npn \__chemmacros_nmr_nucleus:nn #1#2
- {
- \tl_gset:Nn \g__chemmacros_nmr_isotope_tl { #1 }
- \tl_if_in:nnTF { #2 } { [ }
- { \__chemmacros_nmr_element:w #2 \q_stop }
- {
- \tl_gset:No \g__chemmacros_nmr_element_tl { #2 }
- \tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
- }
- }
-\cs_generate_variant:Nn \__chemmacros_nmr_nucleus:nn { VV }
-
-\cs_new_protected:Npn \__chemmacros_nmr_nucleus:w #1,#2 \q_stop
- {
- \tl_gset:Nn \g__chemmacros_nmr_isotope_tl { #1 }
- \tl_if_in:nnTF { #2 } { [ }
- { \__chemmacros_nmr_element:w #2 \q_stop }
- {
- \tl_gset:No \g__chemmacros_nmr_element_tl { #2 }
- \tl_gclear:N \g__chemmacros_nmr_element_coupled_tl
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_element:w #1[#2] \q_stop
- {
- \tl_gset:Nn \g__chemmacros_nmr_element_tl { #1 }
- \tl_gset:Nn \g__chemmacros_nmr_element_coupled_tl { #2 }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_default_nucleus:w #1,#2 \q_stop
- {
- \tl_set:Nn \l__chemmacros_nmr_isotope_default_tl { #1 }
- \tl_set:Nn \l__chemmacros_nmr_element_default_tl { #2 }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_base:nn #1#2
- {
- \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
- {
- \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { \{ }
- \tl_put_right:Nn \g__chemmacros_nmr_element_coupled_tl { \} }
- }
- \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { #2 }
- \iupac { ^ { #1 } }
- \bool_if:NTF \l__chemmacros_nmr_parse_bool
- { \chemformula_ch:nV {} \g__chemmacros_nmr_element_coupled_tl }
- { \chemmacros_atom:V \g__chemmacros_nmr_element_coupled_tl }
- \tl_use:N \l__chemmacros_nmr_element_method_connector_tl
- \tl_use:N \l__chemmacros_nmr_method_tl
- }
-\cs_generate_variant:Nn \__chemmacros_nmr_base:nn { VV }
-
-\cs_new_protected:Npn \__chemmacros_nmr_frequency:n #1
- {
- \tl_if_in:nnTF { #1 } { , }
- { \__chemmacros_nmr_frequency_aux_i:w #1 \q_stop }
- { \__chemmacros_nmr_frequency_aux_ii:n { #1 } }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_frequency_aux_i:w #1,#2 \q_stop
- { \SI { #1 } { #2 } }
-
-\cs_new_protected:Npn \__chemmacros_nmr_frequency_aux_ii:n #1
- { \SI { #1 } { \tl_use:N \l__chemmacros_nmr_unit_tl } }
-
-\cs_new_eq:NN \__chemmacros_nmr_number:n \use:n
-\cs_new_eq:NN \__chemmacros_nmr_position:n \use:n
-
-\keys_define:nn { chemmacros / nmr }
- {
- unit .tl_set:N = \l__chemmacros_nmr_unit_tl ,
- unit .default:n = \mega\hertz ,
- nucleus .code:n =
- { \__chemmacros_nmr_default_nucleus:w #1 \q_stop } ,
- nucleus .default:n = { 1,H } ,
- format .tl_set:N = \l__chemmacros_nmr_format_tl ,
- method .tl_set:N = \l__chemmacros_nmr_method_tl ,
- connector .tl_set:N = \l__chemmacros_nmr_element_method_connector_tl ,
- pos-number .choice: ,
- pos-number / sub .code:n =
- \tl_set:Nn \l__chemmacros_nmr_position_tl { _ }
- \bool_set_false:N \l__chemmacros_nmr_position_side_bool ,
- pos-number / super .code:n =
- \tl_set:Nn \l__chemmacros_nmr_position_tl { ^ }
- \bool_set_false:N \l__chemmacros_nmr_position_side_bool ,
- pos-number / side .code:n =
- \tl_set:Nn \l__chemmacros_nmr_position_tl { - }
- \bool_set_true:N \l__chemmacros_nmr_position_side_bool ,
- coupling-unit .tl_set:N = \l__chemmacros_nmr_coupling_unit_tl ,
- coupling-pos .choice: ,
- coupling-pos / sub .code:n =
- \bool_set_true:N \l__chemmacros_nmr_coupling_nuclei_sub_bool ,
- coupling-pos / side .code:n =
- \bool_set_false:N \l__chemmacros_nmr_coupling_nuclei_sub_bool ,
- coupling-nuclei-pre .tl_set:N =
- \l__chemmacros_nmr_coupling_nuclei_pre_tl ,
- coupling-nuclei-post .tl_set:N =
- \l__chemmacros_nmr_coupling_nuclei_post_tl ,
- coupling-bonds-pre .tl_set:N =
- \l__chemmacros_nmr_coupling_bonds_pre_tl ,
- coupling-bonds-post .tl_set:N =
- \l__chemmacros_nmr_coupling_bonds_post_tl ,
- coupling-symbol .tl_set:N =
- \l__chemmacros_nmr_coupling_symbol_tl ,
- atom-number-cs .code:n =
- \cs_set_eq:NN \__chemmacros_nmr_number:n #1 ,
- coupling-pos-cs .code:n =
- \cs_set_eq:NN \__chemmacros_nmr_position:n #1 ,
- parse .bool_set:N = \l__chemmacros_nmr_parse_bool ,
- delta .code:n =
- \tl_set:Nn \l__chemmacros_nmr_delta_tl { \, #1 } ,
- list .bool_set:N = \l__chemmacros_nmr_list_bool ,
- list .default:n = true ,
- list-setup .tl_set:N = \l__chemmacros_nmr_list_setup_tl ,
- use-equal .bool_set:N = \l__chemmacros_nmr_use_equal_bool ,
- use-equal .default:n = true
- }
-
-\prop_new:N \l__chemmacros_nmr_prop
-
-\cs_new_protected:Npn \chemmacros_new_nmr:Nn #1#2
- {
- \bool_if:nTF
- {
- \prop_if_in_p:Nn \l__chemmacros_nmr_prop { #1 }
- ||
- \cs_if_exist_p:N #1
- }
- { \msg_error:nnn { chemmacros } { new-nmr } { #1 } }
- {
- \prop_put:Nnn \l__chemmacros_nmr_prop { #1 } { #2 }
- \NewDocumentCommand #1 { s }
- { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_define_nmr:Nn #1#2
- {
- \prop_put:Nnn \l__chemmacros_nmr_prop { #1 } { #2 }
- \cs_if_exist:NTF #1
- {
- \RenewDocumentCommand #1 { s }
- { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
- }
- {
- \NewDocumentCommand #1 { s }
- { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_renew_nmr:Nn #1#2
- {
- \bool_if:nTF
- {
- \prop_if_in_p:Nn \l__chemmacros_nmr_prop { #1 }
- &&
- \cs_if_exist_p:N #1
- }
- {
- \prop_put:Nnn \l__chemmacros_nmr_prop { #1 } { #2 }
- \RenewDocumentCommand #1 { s }
- { \IfBooleanTF {##1} { \NMR*{#2} } { \NMR{#2} } }
- }
- { \msg_error:nnn { chemmacros } { renew-nmr } { #1 } }
- }
-
-\NewDocumentCommand \NewChemNMR { mm }
- { \chemmacros_new_nmr:Nn #1 { #2 } }
-
-\NewDocumentCommand \RenewChemNMR { mm }
- { \chemmacros_renew_nmr:Nn #1 { #2 } }
-
-\NewDocumentCommand \DeclareChemNMR { mm }
- { \chemmacros_define_nmr:Nn #1 { #2 } }
-
-\NewDocumentCommand \NMR { s G{} D(){} O{} }
- {
- \IfBooleanTF { #1 }
- { \chemmacros_nmr:nnnn { * } { #2 } { #3 } { #4 } }
- { \chemmacros_nmr:nnnn { } { #2 } { #3 } { #4 } }
- }
-
-\AtBeginDocument
- {
- % \NMR{<num>,<elem>}(<num>,<unit>)[<solvent>] ALL arguments are optional
- % \NMR* same but without ": $\delta$" at end
- \cs_new_protected:Npn \chemmacros_nmr:nnnn #1#2#3#4
- {
- \bool_if:NT \l__chemmacros_nmr_list_bool { \item \scan_stop: }
- \group_begin:
- \mode_leave_vertical:
- \bool_set_false:N \l__chemmacros_nmr_frequency_bool
- \bool_set_false:N \l__chemmacros_nmr_solvent_bool
- \tl_if_empty:nF { #3 }
- { \bool_set_true:N \l__chemmacros_nmr_frequency_bool }
- \tl_if_empty:nF { #4 }
- { \bool_set_true:N \l__chemmacros_nmr_solvent_bool }
- \bool_if:nT
- {
- \l__chemmacros_nmr_frequency_bool
- ||
- \l__chemmacros_nmr_solvent_bool
- }
- { \bool_set_true:N \l__chemmacros_nmr_delimiters_bool }
- \bool_if:nT
- {
- \l__chemmacros_nmr_frequency_bool
- &&
- \l__chemmacros_nmr_solvent_bool
- }
- { \bool_set_true:N \l__chemmacros_nmr_comma_bool }
- \tl_if_empty:nTF { #2 }
- {
- \__chemmacros_nmr_nucleus:VV
- \l__chemmacros_nmr_isotope_default_tl
- \l__chemmacros_nmr_element_default_tl
- }
- { \__chemmacros_nmr_nucleus:w #2 \q_stop }
- \mode_if_math:TF
- {
- \text
- {
- \group_begin:
- \tl_use:N \l__chemmacros_nmr_format_tl
- \__chemmacros_nmr_base:VV
- \g__chemmacros_nmr_isotope_tl
- \g__chemmacros_nmr_element_tl
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- { ~ ( }
- \bool_if:NT \l__chemmacros_nmr_frequency_bool
- { \__chemmacros_nmr_frequency:n { #3 } }
- \bool_if:NT \l__chemmacros_nmr_comma_bool
- { , ~ }
- \bool_if:NT \l__chemmacros_nmr_solvent_bool
- { \chemmacros_atom:n { #4 } }
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- { ) }
- \tl_if_blank:nT { #1 } { : ~ }
- \group_end:
- }
- \tl_if_blank:nT { #1 }
- {
- \delta
- \text { \l__chemmacros_nmr_delta_tl }
- \bool_if:NT \l__chemmacros_nmr_use_equal_bool { = }
- }
- }
- {
- \group_begin:
- \tl_use:N \l__chemmacros_nmr_format_tl
- \__chemmacros_nmr_base:VV
- \g__chemmacros_nmr_isotope_tl
- \g__chemmacros_nmr_element_tl
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- { ~ ( }
- \bool_if:NT \l__chemmacros_nmr_frequency_bool
- { \__chemmacros_nmr_frequency:n { #3 } }
- \bool_if:NT \l__chemmacros_nmr_comma_bool
- { , ~ }
- \bool_if:NT \l__chemmacros_nmr_solvent_bool
- {
- \bool_if:NTF \l__chemmacros_nmr_parse_bool
- { \chemformula_ch:nn { } { #4 } }
- { #4 }
- }
- \bool_if:NT \l__chemmacros_nmr_delimiters_bool
- { ) }
- \tl_if_blank:nT { #1 } { : }
- \group_end:
- \tl_if_blank:nT { #1 }
- {
- \tl_use:N \c_space_tl
- \c_math_toggle_token
- \delta
- \c_math_toggle_token
- \l__chemmacros_nmr_delta_tl
- \bool_if:NT \l__chemmacros_nmr_use_equal_bool { ~ = }
- }
- \bool_if:NF \l__chemmacros_nmr_comma_bool
- { \tl_if_blank:nT { #1 } { \chemmacros_xspace: } }
- }
- \group_end:
- }
- }
-
-\NewDocumentCommand \chemmacros_data:w { smo }
- {
- \bool_if:NT \l__chemmacros_nmr_list_bool { \item }
- {
- \tl_use:N \l__chemmacros_nmr_format_tl #2
- \IfNoValueF { #3 } { ~ ( #3 ) }
- \IfBooleanT { #1 } { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { : } }
- }
- \IfBooleanF { #1 } { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { ~ = } }
- }
-
-\cs_new_protected:Npn \chemmacros_val:n #1
- {
- \tl_if_in:nnTF { #1 } { -- }
- { \chemmacros_val_aux:w #1 \q_nil }
- { \num { #1 } }
- }
-
-\cs_new_protected:Npn \chemmacros_val_aux:w #1--#2 \q_nil
- { \numrange { #1 } { #2 } }
-
-\NewDocumentEnvironment { experimental } { o }
- {
- \group_begin:
- \IfNoValueF { #1 } { \keys_set:nn { chemmacros / nmr } { #1 } }
- \bool_set_true:N \l__chemmacros_nmr_inner_bool
- \cs_set_eq:NN \# \chemmacros_nmr_number:n
- \cs_set_eq:NN \pos \chemmacros_nmr_position:n
- \cs_set_eq:NN \J \chemmacros_nmr_coupling:w
- \cs_set_eq:NN \data \chemmacros_data:w
- \cs_set_eq:NN \val \chemmacros_val:n
- \bool_if:NT \l__chemmacros_nmr_list_bool
- { \list {} { \l__chemmacros_nmr_list_setup_tl } }
- }
- {
- \bool_if:NT \l__chemmacros_nmr_list_bool
- { \endlist }
- \group_end:
- \chemmacros_ignore_spaces:
- }
-
-\cs_new_protected:Npn \chemmacros_nmr_number:n #1
- {
- \__chemmacros_nmr_number:n { #1 } \,
- \chemmacros_atom:V \g__chemmacros_nmr_element_tl
- }
-
-\cs_new_protected:Npn \chemmacros_nmr_position:n #1
- {
- \chemmacros_chemformula:x
- {
- \exp_not:V \g__chemmacros_nmr_element_tl
- \bool_if:NF \l__chemmacros_nmr_position_side_bool
- {
- \exp_not:V \l__chemmacros_nmr_position_tl
- \exp_not:n { {#1} }
- }
- }
- \bool_if:NT \l__chemmacros_nmr_position_side_bool
- {
- \tl_use:N \l__chemmacros_nmr_position_tl
- \__chemmacros_nmr_position:n { #1 }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_nmr_coupling:w
- {
- \tl_clear:N \l__chemmacros_nmr_coupling_nuclei_tl
- \tl_clear:N \l__chemmacros_nmr_coupling_bonds_tl
- \peek_meaning:NTF (
- { \__chemmacros_nmr_coupling:w }
- { \__chemmacros_nmr_coupling_aux_i:w }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling:w (#1;#2)
- {
- \tl_set:Nn \l__chemmacros_nmr_coupling_bonds_tl
- {
- \l__chemmacros_nmr_coupling_bonds_pre_tl
- #1
- \l__chemmacros_nmr_coupling_bonds_post_tl
- }
- \bool_if:NTF \l__chemmacros_nmr_coupling_nuclei_sub_bool
- {
- \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
- {
- \c_math_subscript_token
- { \chemmacros_chemformula:n {#2} }
- }
- }
- {
- \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
- {
- \l__chemmacros_nmr_coupling_nuclei_pre_tl
- \chemmacros_chemformula:n {#2}
- \l__chemmacros_nmr_coupling_nuclei_post_tl
- }
- }
- \__chemmacros_nmr_coupling_aux_i:w
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_i:w
- {
- \peek_meaning:NTF [
- { \__chemmacros_nmr_coupling_aux_ii:w }
- { \__chemmacros_nmr_coupling_aux_iii:n }
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_ii:w [#1]#2
- {
- \group_begin:
- \sisetup
- {
- list-final-separator={,~},
- list-pair-separator={,~},
- list-units=single
- }
- \c_math_toggle_token
- ^{ \l__chemmacros_nmr_coupling_bonds_tl }
- \l__chemmacros_nmr_coupling_symbol_tl
- \l__chemmacros_nmr_coupling_nuclei_tl = \SIlist{#2}{#1}
- \c_math_toggle_token
- \group_end:
- }
-
-\cs_new_protected:Npn \__chemmacros_nmr_coupling_aux_iii:n #1
- {
- \group_begin:
- \sisetup
- {
- list-final-separator={,~},
- list-pair-separator={,~},
- list-units=single
- }
- \c_math_toggle_token
- ^{ \l__chemmacros_nmr_coupling_bonds_tl }
- \l__chemmacros_nmr_coupling_symbol_tl
- \l__chemmacros_nmr_coupling_nuclei_tl
- = \exp_args:Nno \SIlist { #1 } { \l__chemmacros_nmr_coupling_unit_tl }
- \c_math_toggle_token
- \group_end:
- }
-
-% --------------------------------------------------------------------------
-% deprecated mhName:
-\keys_define:nn { chemmacros }
- { mhName .code:n = \chemmacros_option_deprecated:n { mhName } }
-
-% --------------------------------------------------------------------------- %
-% - phases
-\bool_new:N \l__chemmacros_phases_sub_bool
-\dim_new:N \l__chemmacros_phases_space_dim
-\dim_set:Nn \l__chemmacros_phases_space_dim { .1333 em }
-\prop_new:N \l__chemmacros_phases_prop
-\prop_new:N \l__chemmacros_phases_german_prop
-
-\keys_define:nn { chemmacros / phases }
- {
- pos .choice: ,
- pos / sub .code:n = \bool_set_true:N \l__chemmacros_phases_sub_bool ,
- pos / side .code:n = \bool_set_false:N \l__chemmacros_phases_sub_bool ,
- space .dim_set:N = \l__chemmacros_phases_space_dim
- }
-
-\cs_new_protected:Npn \chemmacros_new_phase:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \cs_if_free:NF #1
- { \msg_error:nnn {chemmacros} {new-phase} {#1} }
- \exp_args:Nx \@trnslt@declare@translation
- { phase-\l__chemmacros_tmpa_tl } {fallback} {#2}
- \__chemmacros_define_phase:Nx #1
- {
- \exp_not:N \chemmacros_translate:n
- { phase-\l__chemmacros_tmpa_tl }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_define_phase:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \exp_args:Nx \@trnslt@declare@translation
- { phase-\l__chemmacros_tmpa_tl } {fallback} {#2}
- \__chemmacros_define_phase:Nx #1
- {
- \exp_not:N \chemmacros_translate:n
- { phase-\l__chemmacros_tmpa_tl }
- }
- }
-
-\cs_new_protected:Npn \chemmacros_renew_phase:Nn #1#2
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl
- { \chemmacros_remove_backslash:N #1 }
- \cs_if_exist:NF #1
- { \msg_error:nnn {chemmacros} {renew-phase} {#1} }
- \exp_args:Nx \@trnslt@declare@translation
- { phase-\l__chemmacros_tmpa_tl } {fallback} {#2}
- \__chemmacros_define_phase:Nx #1
- {
- \exp_not:N \chemmacros_translate:n
- { phase-\l__chemmacros_tmpa_tl }
- }
- }
-
-\NewDocumentCommand \NewChemPhase { mom }
- { \chemmacros_new_phase:Nn #1 {#3} }
-
-\NewDocumentCommand \DeclareChemPhase { mom }
- { \chemmacros_define_phase:Nn #1 {#3} }
-
-\NewDocumentCommand \RenewChemPhase { mom }
- { \chemmacros_renew_phase:Nn #1 {#3} }
-
-\cs_new_protected:Npn \__chemmacros_define_phase:Nn #1#2
- {
- \cs_if_exist:NF #1 { \cs_new:Npn #1 {} }
- \DeclareDocumentCommand #1 { o }
- {
- \bool_if:NTF \l__chemmacros_phases_sub_bool
- {
- \bool_if:NTF \l_chemformula_inside_ch_bool
- { \chemformula_subscript:n { ( #2 \IfNoValueF {##1} {,~##1} ) } }
- {
- \ensuremath
- {
- \c_math_subscript_token
- { \text { ( #2 \IfNoValueF {##1} {,~##1} ) } }
- }
- }
- }
- {
- \ensuremath
- {
- \skip_horizontal:N \l__chemmacros_phases_space_dim
- \text { ( #2 \IfNoValueF {##1} {,~##1} ) }
- }
- }
- }
- }
-\cs_generate_variant:Nn \__chemmacros_define_phase:Nn { Nx }
-
-\NewChemPhase \sld {s}
-\NewChemPhase \lqd {l}
-\NewChemPhase \gas {g}
-\NewChemPhase \aq {aq}
-
-\cs_new_protected:Npn \chemmacros_phase:n #1
- {
- \bool_if:NTF \l__chemmacros_phases_sub_bool
- { \ensuremath { \c_math_subscript_token { \text { (#1) } } } }
- {
- \ensuremath
- {
- \skip_horizontal:N \l__chemmacros_phases_space_dim
- \text { (#1) }
- }
- }
- }
-
-\NewDocumentCommand \phase { m }
- { \chemmacros_phase:n {#1} }
-
-% --------------------------------------------------------------------------
-% reaction environments
-\cs_new_protected:Npn \__chemmacros_record_for_lor:nnnnn #1#2#3#4#5
- {
- \tl_if_eq:nnT { #1 } { reaction }
- {
- \group_begin:
- % we need to prevent \Hy@make@anchor from being written to the lor
- % file:
- \bool_if:NT \l__chemmacros_hyperref_bool
- { \cs_set:Npn \Hy@make@anchor {} }
- \addcontentsline { lor } { reaction }
- {
- \tl_use:N \l__chemmacros_reaction_lorname_tl
- \tl_use:N \c_space_tl
- #2 #3 #4 #5
- \tl_use:N \g__chemmacros_reaction_description_tl
- }
- \tl_gclear:N \g__chemmacros_reaction_description_tl
- \group_end:
- }
- }
-
-% 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...
-\AfterPackage* { mathtools }
- {
- \cs_set_protected:Npn \MT_define_tagform:nwnn #1[#2]#3#4
- {
- \@namedef{MT_tagform_#1:n}##1
- {
- % this is the original part:
- \maketag@@@{#3\ignorespaces#2{##1}\unskip\@@italiccorr#4}
- % this is added => this disturbs hyperref:
- \__chemmacros_record_for_lor:nnnnn
- { #1 } { #3 } { #2 } { ##1 } { #4 }
- }
- }
- }
-
-\tl_new:N \g__chemmacros_reaction_description_tl
-
-\cs_new_protected:Npn \chemmacros_add_reaction_description:n #1
- {
- \tl_if_blank:nF { #1 }
- { \tl_gset:Nn \g__chemmacros_reaction_description_tl { : ~ #1 } }
- }
-
-\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 }
-
-\cs_new_protected:Npn \listofreactions
- {
- \__chemmacros_reaction_heading:V \reactionlistname
- \@starttoc { lor }
- }
-
-\cs_new_protected:Npn \l@reaction #1#2
- { \@dottedtocline { 1 } { 1.5em } { 2.3em } { #1 } { #2 } }
-
-% create tagform
-\newtagform { reaction } { \{ } { \} }
-\newcounter { chemmacros_save_reaction }
-\newcounter { reaction }
-
-% switch to reaction tags
-\cs_new_protected:Npn \__chemmacros_begin_reaction:
- {
- % create individual names for `hyperref':
- \bool_if:NT \l__chemmacros_hyperref_bool
- {
- \cs_set:Npn \theHequation
- { R . \theHsection . \arabic { reaction } }
- }
- % enable labelformat `reaction':
- \bool_if:NT \l__chemmacros_varioref_bool
- { \cs_set_eq:NN \p@equation \p@reaction }
- \setcounter { chemmacros_save_reaction } { \value { equation } }
- \setcounter { equation } { \value { reaction } }
- \usetagform { reaction }
- }
-
-% switch back to equation tags
-\cs_new_protected:Npn \__chemmacros_end_reaction:
- {
- \setcounter { reaction } { \value { equation } }
- \setcounter { equation } { \value { chemmacros_save_reaction } }
- }
-
-% --------------------------------------------------------------------------- %
-\bool_new:N \l__chemmacros_reactions_star_bool
-\bool_new:N \l__chemmacros_reactions_args_bool
-
-\keys_define:nn { chemmacros / reaction }
- {
- star .bool_set:N = \l__chemmacros_reactions_star_bool ,
- star .default:n = true ,
- arg .bool_set:N = \l__chemmacros_reactions_args_bool ,
- arg .default:n = true ,
- list-name .tl_set:N = \reactionlistname ,
- list-entry .code:n =
- \tl_set:Nn \l__chemmacros_reaction_lorname_tl { #1 } ,
- list-heading .tl_set:N = \l__chemmacros_reaction_heading_tl
- }
-
-% \DeclareChemReaction[<keyval>]{<name>}{<type>}
-\cs_new_protected:Npn \__chemmacros_define_reaction:Nnnn #1#2#3#4
- {
- \bool_set_false:N \l__chemmacros_reactions_star_bool
- \bool_set_false:N \l__chemmacros_reactions_args_bool
- \keys_set:nn { chemmacros / reaction } { #2 }
- \bool_if:NTF \l__chemmacros_reactions_args_bool
- {
- #1 { #3 } [ 2 ] []
- {
- \__chemmacros_begin_reaction:
- \AddRxnDesc { ##1 }
- \begin { #4 } { ##2 }
- \chemmacros_equation_chemformula:V \BODY
- \end{ #4 }
- \__chemmacros_end_reaction:
- }
- \bool_if:NT \l__chemmacros_reactions_star_bool
- {
- #1 { #3* } [ 1 ]
- {
- \begin { #4* } { ##1 }
- \chemmacros_equation_chemformula:V \BODY
- \end { #4* }
- }
- }
- }
- {
- #1 { #3 } [ 1 ] []
- {
- \__chemmacros_begin_reaction:
- \AddRxnDesc { ##1 }
- \begin { #4 }
- \chemmacros_equation_chemformula:V \BODY
- \end { #4 }
- \__chemmacros_end_reaction:
- }
- \bool_if:NT \l__chemmacros_reactions_star_bool
- {
- #1 { #3* }
- {
- \begin { #4* }
- \chemmacros_equation_chemformula:V \BODY
- \end { #4* }
- }
- }
- }
- \ignorespaces
- }
-
-\cs_new_protected:Npn \chemmacros_define_reaction:nnn #1#2#3
- {
- \cs_if_exist:cTF { #2 }
- { \__chemmacros_define_reaction:Nnnn \RenewEnviron { #1 } { #2 } { #3 } }
- { \__chemmacros_define_reaction:Nnnn \NewEnviron { #1 } { #2 } { #3 } }
- }
-
-\cs_new_protected:Npn \chemmacros_new_reaction:nnn #1#2#3
- {
- \cs_if_exist:cTF { #2 }
- { \msg_error:nnx { chemmacros } { already-defined } { #2 } }
- { \__chemmacros_define_reaction:Nnnn \NewEnviron { #1 } { #2 } { #3 } }
- }
-
-\cs_new_protected:Npn \chemmacros_renew_reaction:nnn #1#2#3
- {
- \cs_if_exist:cTF { #2 }
- { \__chemmacros_define_reaction:Nnnn \RenewEnviron { #1 } { #2 } { #3 } }
- { \msg_error:nnx { chemmacros } { not-defined } { #2 } }
- }
-
-\NewDocumentCommand \NewChemReaction { O{} m m }
- { \chemmacros_new_reaction:nnn { #1 } { #2 } { #3 } }
-\NewDocumentCommand \RenewChemReaction { O{} m m }
- { \chemmacros_renew_reaction:nnn { #1 } { #2 } { #3 } }
-\NewDocumentCommand \DeclareChemReaction { O{} m m }
- { \chemmacros_declare_reaction:nnn { #1 } { #2 } { #3 } }
-\DeclareChemDeprecated \newreaction \NewChemReaction
-
-\cs_new_protected:Npn \chemmacros_equation_chemformula:n #1
- { \chemformula_ch:nn { } { #1 } }
-\cs_generate_variant:Nn \chemmacros_equation_chemformula:n { V }
-
-% predefined:
-\NewChemReaction [ star ] { reaction } { equation }
-\NewChemReaction [ star ] { reactions } { align }
-
-% --------------------------------------------------------------------------
-% thermodynamics et.al.
-% \standardstate as defined by the chemstyle package. Thanks to Joseph Wright
-% the `chemstyle' provides it with \providecommand so it doesn't matter which
-% package defines it first
-\ProvideDocumentCommand \standardstate {}
- { { \ensuremath { \chemmacros_standardstate: } } }
-
-\cs_new_protected:Npn \chemmacros_standardstate:
- { \mathpalette \chemmacros_standardstate_aux: \circ }
-
-\cs_new_protected:Npn \chemmacros_standardstate_aux: #1#2
- {
- \ooalign
- {
- \tex_hfil:D
- \c_math_toggle_token #1- \c_math_toggle_token
- \tex_hfil:D
- \tex_cr:D
- \tex_hfil:D
- \c_math_toggle_token #1#2 \c_math_toggle_token
- \tex_hfil:D
- \tex_cr:D
- }
- }
-
-\cs_new_protected:Npn \changestate
- { \mathop{} \! \chemDelta }
-
-% --------------------------------------------------------------------------
-% \State
-\tl_new:N \l__chemmacros_State_delta_tl
-\tl_set:Nn \l__chemmacros_State_delta_tl { \changestate }
-\tl_new:N \l__chemmacros_State_exponent_tl
-\tl_set:Nn \l__chemmacros_State_exponent_tl { \standardstate }
-
-\bool_new:N \l__chemmacros_State_delta_bool
-\bool_set_true:N \l__chemmacros_State_delta_bool
-\bool_new:N \l__chemmacros_State_subscript_left_bool
-\bool_set_true:N \l__chemmacros_State_subscript_left_bool
-\bool_new:N \l__chemmacros_State_exponent_bool
-\bool_set_true:N \l__chemmacros_State_exponent_bool
-
-\keys_define:nn { chemmacros / state }
- {
- delta .code:n =
- {
- \exp_args:Nf \tl_if_eq:nnTF { #1 } { false }
- { \bool_set_false:N \l__chemmacros_State_delta_bool }
- {
- \bool_set_true:N \l__chemmacros_State_delta_bool
- \tl_set:Nn \l__chemmacros_State_delta_tl { #1 }
- }
- } ,
- subscript-left .bool_set:N = \l__chemmacros_State_subscript_left_bool ,
- subscript-left .default:n = true ,
- exponent .code:n =
- {
- \exp_args:Nf \tl_if_eq:nnTF { #1 } { false }
- { \bool_set_false:N \l__chemmacros_State_exponent_bool }
- {
- \bool_set_true:N \l__chemmacros_State_exponent_bool
- \tl_set:Nn \l__chemmacros_State_exponent_tl { #1 }
- }
- } ,
- exponent .default:n = \standardstate
- }
-
-% old syntax (v1.1):
-% \State[<exp>,<Delta>,<subscript pos>]{<Symbol>}{<subscript>}
-% old syntax (v2.0):
-% \State[<keyval>]{<Symbol>}{<subscript>}
-% {<subscript>} is an optional argument!
-\cs_new_protected:Npn \chemmacros_state:nnn #1#2#3
- {
- \group_begin:
- \keys_set:nn { chemmacros / state } { #1 }
- \ensuremath
- {
- \bool_if:NT \l__chemmacros_State_delta_bool
- { \tl_use:N \l__chemmacros_State_delta_tl }
- \bool_if:NT \l__chemmacros_State_subscript_left_bool
- { \c_math_subscript_token { \text { #3 } } }
- #2
- \bool_if:NF \l__chemmacros_State_subscript_left_bool
- { \c_math_subscript_token { \text { #3 } } }
- \bool_if:NT \l__chemmacros_State_exponent_bool
- { ^ { \tl_use:N \l__chemmacros_State_exponent_tl } }
- }
- \group_end:
- }
-\cs_generate_variant:Nn \chemmacros_state:nnn { xnV }
-
-\NewDocumentCommand \State { s O{} m G{} }
- {
- \group_begin:
- \IfBooleanT { #1 }
- {
- \keys_set:nn { chemmacros / state }
- { subscript-left = false , exponent = }
- }
- \chemmacros_state:nnn { #2 } { #3 } { #4 }
- \group_end:
- }
-
-% --------------------------------------------------------------------------
-\tl_new:N \l__chemmacros_thermod_subscript_left_tl
-\tl_new:N \l__chemmacros_thermod_subscript_left_default_tl
-\tl_new:N \l__chemmacros_thermod_subscript_tl
-\tl_new:N \l__chemmacros_thermod_subscript_default_tl
-\tl_new:N \l__chemmacros_thermod_unit_tl
-\tl_new:N \l__chemmacros_thermod_exponent_tl
-\tl_new:N \l__chemmacros_thermod_exponent_default_tl
-\tl_set:Nn \l__chemmacros_thermod_exponent_default_tl { \standardstate }
-\tl_new:N \l__chemmacros_thermod_delta_tl
-\tl_new:N \l__chemmacros_thermod_delta_default_tl
-\tl_set:Nn \l__chemmacros_thermod_delta_default_tl { \changestate }
-
-\bool_new:N \l__chemmacros_renewstate_bool
-\bool_new:N \l__chemmacros_state_overwrite_error_bool
-
-\keys_define:nn { chemmacros }
- {
- State / subscript .choice: ,
- State / subscript / left .code:n =
- { \tl_set:Nn \l__chemmacros_thermod_subscript_left_tl { true } } ,
- State / subscript / right .code:n =
- { \tl_set:Nn \l__chemmacros_thermod_subscript_left_tl { false } } ,
- State / exponent .tl_set:N =
- \l__chemmacros_thermod_exponent_tl ,
- State / delta .tl_set:N =
- \l__chemmacros_thermod_delta_tl ,
- State / unit .tl_set:N =
- \l__chemmacros_thermod_unit_tl ,
- setnewstate / subscript-left .tl_set:N =
- \l__chemmacros_thermod_subscript_left_default_tl ,
- setnewstate / subscript .tl_set:N =
- \l__chemmacros_thermod_subscript_default_tl ,
- setnewstate / exponent .tl_set:N =
- \l__chemmacros_thermod_exponent_default_tl ,
- setnewstate / delta .tl_set:N =
- \l__chemmacros_thermod_delta_default_tl
- }
-
-% \NewChemState{<name>}[<keyval>]{<symbol>}{<unit>}
-\NewDocumentCommand \NewChemState { omO{}mm }
- {
- \bool_set_false:N \l__chemmacros_renewstate_bool
- \bool_set_true:N \l__chemmacros_state_overwrite_error_bool
- \__chemmacros_setnewstate_reset:
- \IfNoValueTF { #1 }
- { \chemmacros_define_state:nnnn { #3 } { #2 } { #4 } { #5 } }
- {
- \msg_warning:nn { chemmacros } { state-syntax }
- \chemmacros_define_state:nnnn { #1#3 } { #2 } { #4 } { #5 }
- }
- }
-% \DeclareChemState{<name>}[<keyval>]{<symbol>}{<unit>}
-\NewDocumentCommand \DeclareChemState { omO{}mm }
- {
- \bool_set_false:N \l__chemmacros_renewstate_bool
- \bool_set_false:N \l__chemmacros_state_overwrite_error_bool
- \__chemmacros_setnewstate_reset:
- \IfNoValueTF { #1 }
- { \chemmacros_define_state:nnnn { #3 } { #2 } { #4 } { #5 } }
- {
- \msg_warning:nn { chemmacros } { state-syntax }
- \chemmacros_define_state:nnnn { #1#3 } { #2 } { #4 } { #5 }
- }
- }
-% \RenewChemState{<name>}[<keyval>]{<symbol>}{<unit>}
-\NewDocumentCommand \RenewChemState { omO{}mm }
- {
- \bool_set_true:N \l__chemmacros_renewstate_bool
- \bool_set_true:N \l__chemmacros_state_overwrite_error_bool
- \__chemmacros_setnewstate_reset:
- \IfNoValueTF { #1 }
- { \chemmacros_define_state:nnnn { #3 } { #2 } { #4 } { #5 } }
- {
- \msg_warning:nn { chemmacros } { state-syntax }
- \chemmacros_define_state:nnnn { #1#3 } { #2 } { #4 } { #5 }
- }
- }
-% TODO
-\cs_set_protected:Npn \setnewstate
- {
- \msg_warning:nnnn { chemmacros } { command-deprecated }
- { \setnewstate } { \NewChemState }
- \NewChemState
- }
-\cs_set_protected:Npn \renewstate
- {
- \msg_warning:nnnn { chemmacros } { command-deprecated }
- { \renewstate } { \RenewChemState }
- \RenewChemState
- }
-
-\cs_new_protected:Npn \__chemmacros_setnewstate_reset:
- {
- \tl_set:Nn \l__chemmacros_thermod_subscript_left_default_tl { true }
- \tl_clear:N \l__chemmacros_thermod_subscript_default_tl
- \tl_set:Nn \l__chemmacros_thermod_exponent_default_tl { \standardstate }
- \tl_set:Nn \l__chemmacros_thermod_delta_default_tl { \changestate }
- }
-
-\cs_new_protected:Npn \chemmacros_define_state:nnnn #1#2#3#4
- {
- \keys_set:nn { chemmacros / setnewstate } { #1 }
- \chemmacros_if_is_cs:nTF { #2 }
- { \__chemmacros_set_state:xnn { \cs_to_str:N #2 } { #3 } { #4 } }
- {
- \msg_warning:nn { chemmacros } { state-syntax }
- \__chemmacros_set_state:nnn { #2 } { #3 } { #4 }
- }
- }
-
-\cs_new_protected:Npn \__chemmacros_set_state:nnn #1#2#3
- {
- \bool_if:NT \l__chemmacros_state_overwrite_error_bool
- {
- \bool_if:NTF \l__chemmacros_renewstate_bool
- {
- \cs_if_exist:cF { #1 }
- { \msg_error:nnx { chemmacros } { nenew-state } { #1 } }
- }
- {
- \cs_if_exist:cT { #1 }
- { \msg_error:nnx { chemmacros } { new-state } { #1 } }
- }
- }
- \cs_undefine:c { chemmacros_ #1 _reset: }
- \cs_undefine:c { c__chemmacros_ #1 _subscript_tl }
- \cs_undefine:c { c__chemmacros_ #1 _exponent_tl }
- \cs_undefine:c { c__chemmacros_ #1 _delta_tl }
- \cs_undefine:c { c__chemmacros_ #1 _left_tl }
- \cs_undefine:c { c__chemmacros_ #1 _unit_tl }
- \cs_undefine:c { #1 }
- \cs_undefine:c { #1 _aux_i:n }
- \cs_undefine:c { #1 _aux_ii:n }
- \cs_undefine:c { #1 _aux_iii:n }
- \group_begin:
- \tl_const:cV
- { c__chemmacros_ #1 _subscript_tl }
- \l__chemmacros_thermod_subscript_default_tl
- \tl_const:cV
- { c__chemmacros_ #1 _exponent_tl }
- \l__chemmacros_thermod_exponent_default_tl
- \tl_const:cV
- { c__chemmacros_ #1 _delta_tl }
- \l__chemmacros_thermod_delta_default_tl
- \tl_const:cV
- { c__chemmacros_ #1 _left_tl }
- \l__chemmacros_thermod_subscript_left_default_tl
- \tl_const:cn
- { c__chemmacros_ #1 _unit_tl }
- { #3 }
- \cs_new_protected:cpn {chemmacros_ #1 _reset: }
- {
- \tl_set_eq:Nc
- \l__chemmacros_thermod_subscript_tl
- { c__chemmacros_ #1 _subscript_tl }
- \tl_set_eq:Nc
- \l__chemmacros_thermod_exponent_tl
- { c__chemmacros_ #1 _exponent_tl }
- \tl_set_eq:Nc
- \l__chemmacros_thermod_delta_tl
- { c__chemmacros_ #1 _delta_tl }
- \tl_set_eq:Nc
- \l__chemmacros_thermod_subscript_left_tl
- { c__chemmacros_ #1 _left_tl }
- \tl_set_eq:Nc
- \l__chemmacros_thermod_unit_tl
- { c__chemmacros_ #1 _unit_tl }
- }
- \cs_new_protected:cpn { #1 }
- {
- \use:c {chemmacros_ #1 _reset: }
- \peek_meaning:NTF [
- { \tl_use:c { #1 _aux_i:n } }
- {
- \peek_meaning:NTF (
- { \tl_use:c { #1 _aux_ii:n } }
- { \tl_use:c { #1 _aux_iii:n } }
- }
- }
- \cs_new_protected:cpn { #1 _aux_i:n } [##1]
- {
- \keys_set:nn { chemmacros / State } { ##1 }
- \peek_meaning:NTF (
- { \tl_use:c { #1 _aux_ii:n } }
- { \tl_use:c { #1 _aux_iii:n } }
- }
- \cs_new_protected:cpn { #1 _aux_ii:n } (##1)
- {
- \tl_set:Nn \l__chemmacros_thermod_subscript_tl { ##1 }
- \tl_use:c { #1 _aux_iii:n }
- }
- \cs_new_protected:cpn { #1 _aux_iii:n } ##1
- {
- \ensuremath
- {
- \tl_if_eq:VnTF
- \l__chemmacros_thermod_subscript_left_tl { true }
- {
- \chemmacros_state:xnV
- {
- subscript-left = true ,
- exponent =
- { \exp_not:V \l__chemmacros_thermod_exponent_tl } ,
- delta =
- { \exp_not:V \l__chemmacros_thermod_delta_tl }
- }
- { #2 }
- }
- {
- \chemmacros_state:xnV
- {
- subscript-left = false ,
- exponent =
- { \exp_not:V \l__chemmacros_thermod_exponent_tl } ,
- delta =
- { \exp_not:V \l__chemmacros_thermod_delta_tl }
- }
- { #2 }
- }
- \l__chemmacros_thermod_subscript_tl
- =
- \exp_args:NnV \SI { ##1 } \l__chemmacros_thermod_unit_tl
- }
- }
- \group_end:
- \ignorespaces
- }
-\cs_generate_variant:Nn \__chemmacros_set_state:nnn { x }
-
-% predefined:
-\NewChemState \Enthalpy {H} {\kilo\joule\per\mole}
-\NewChemState \Entropy [ delta=false, subscript-left=false ]
- {S} {\joule\per\kelvin\per\mole}
-\NewChemState \Gibbs {G} {\kilo\joule\per\mole}
-
-% --------------------------------------------------------------------------
-% Newman projections
-\fp_new:N \l__chemmacros_newman_rel_angle_fp
-\fp_zero:N \l__chemmacros_newman_rel_angle_fp
-\fp_new:N \l__chemmacros_newman_tmp_angle_fp
-\fp_new:N \l__chemmacros_newman_abs_angle_fp
-\fp_zero:N \l__chemmacros_newman_abs_angle_fp
-\fp_new:N \l__chemmacros_newman_scale_fp
-\fp_set:Nn \l__chemmacros_newman_scale_fp { 1 }
-\fp_new:N \l__chemmacros_newman_x_fp
-\fp_new:N \l__chemmacros_newman_y_fp
-
-\tl_new:N \l__chemmacros_newman_tikz_ring_tl
-\tl_new:N \l__chemmacros_newman_tikz_front_tl
-\tl_new:N \l__chemmacros_newman_tikz_back_tl
-
-\bool_new:N \l__chemmacros_newman_tikz_back_bool
-
-\keys_define:nn { chemmacros / newman }
- {
- ring .tl_set:N = \l__chemmacros_newman_tikz_ring_tl ,
- atoms .tl_set:N = \l__chemmacros_newman_tikz_front_tl ,
- back-atoms .code:n =
- {
- \bool_set_true:N \l__chemmacros_newman_tikz_back_bool
- \tl_set:Nn \l__chemmacros_newman_tikz_back_tl { #1 }
- } ,
- scale .fp_set:N = \l__chemmacros_newman_scale_fp ,
- scale .default:n = 1 ,
- angle .fp_set:N = \l__chemmacros_newman_abs_angle_fp ,
- angle .default:n = 0
- }
-
-% \newman[<keyval>](<angle>){<1>,<2>,<3>,<4>,<5>,<6>}
-\NewDocumentCommand \newman { o d() > { \SplitArgument { 5 } { , } } m }
- {
- \group_begin:
- \IfNoValueF { #1 } { \keys_set:nn { chemmacros / newman } { #1 } }
- \IfNoValueTF { #2 }
- { \chemmacros_newman_atoms:nnnnnnn { } #3 }
- { \chemmacros_newman_atoms:nnnnnnn { #2 } #3 }
- \group_end:
- }
-
-% place atoms:
-% #1: angle
-% #2 - #7: atoms
-\cs_new_protected:Npn \chemmacros_newman_atoms:nnnnnnn #1#2#3#4#5#6#7
- {
- \tl_if_blank:nTF { #1 }
- {
- \fp_set_eq:NN
- \l__chemmacros_newman_rel_angle_fp
- \l__chemmacros_newman_abs_angle_fp
- }
- { \fp_set:Nn \l__chemmacros_newman_rel_angle_fp { #1 } }
- \chemmacros_tikz_picture:xn
- {
- scale = \fp_to_tl:N \l__chemmacros_newman_scale_fp ,
- chemmacros_newman_atom_front / .style =
- {
- inner~sep=0pt,
- outer~sep=0pt,
- \tl_use:N \l__chemmacros_newman_tikz_front_tl
- },
- chemmacros_newman_atom_back / .style =
- {
- inner~sep=0pt,
- outer~sep=0pt,
- \bool_if:NTF \l__chemmacros_newman_tikz_back_bool
- { \tl_use:N \l__chemmacros_newman_tikz_back_tl }
- { \tl_use:N \l__chemmacros_newman_tikz_front_tl }
- }
- }
- {
- \chemmacros_tikz_draw:f
- { \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (0pt,0pt) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
- \chemmacros_newman_back_node:nn
- { 30 }
- { \IfNoValueF { #6 } { #6 } }
- \chemmacros_newman_back_node:nf
- { 150 }
- { \IfNoValueF { #7 } { #7 } }
- \chemmacros_newman_back_node:nf
- { 270 }
- { \IfNoValueF { #5 } { #5 } }
- \chemmacros_newman_front_node:nf
- { 90 }
- { \IfNoValueF { #2 } { #2 } }
- \chemmacros_newman_front_node:nf
- { 210 }
- { \IfNoValueF { #3 } { #3 } }
- \chemmacros_newman_front_node:nf
- { 330 }
- { \IfNoValueF { #4 } { #4 } }
- }
- }
-
-% provide cartesian coordiantes from polar coordinates
-% #1: fp variable for x
-% #2: fp variable for y
-% #3: angle
-% #4: radius
-\cs_new_protected:Npn \chemmacros_polar_to_cartesian:NNnn #1#2#3#4
- {
- \fp_set:Nn #1 { #4 * cos( #3 / 180 * pi ) }% x
- \fp_set:Nn #2 { #4 * sin( #3 / 180 * pi ) }% y
- }
-
-% place back nodes
-\cs_new_protected:Npn \chemmacros_newman_back_node:nn #1#2
- {
- \group_begin:
- \fp_add:Nn \l__chemmacros_newman_rel_angle_fp { #1 }
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { \l__chemmacros_newman_rel_angle_fp }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_draw:f
- { \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (
- 15 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 15 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- )
- --
- (
- 30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- ) ;
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { \l__chemmacros_newman_rel_angle_fp }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_node:f
- {
- chemmacros_newman_atom_back,
- anchor = -180 + \fp_to_int:N \l__chemmacros_newman_rel_angle_fp
- }
- at
- (
- 31 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 31 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- )
- { #2 } ;
- \group_end:
- }
-\cs_generate_variant:Nn \chemmacros_newman_back_node:nn { nf }
-
-% place front nodes:
-\cs_new_protected:Npn \chemmacros_newman_front_node:nn #1#2
- {
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { #1 }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_draw:f
- { \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (0pt,0pt) -- ++
- (
- 30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- ) ;
- \chemmacros_polar_to_cartesian:NNnn
- \l__chemmacros_newman_x_fp
- \l__chemmacros_newman_y_fp
- { #1 }
- { \l__chemmacros_newman_scale_fp }
- \chemmacros_tikz_node:f
- { chemmacros_newman_atom_front, anchor = -180 + #1 }
- at
- (
- 31 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
- 31 * \fp_to_dim:N \l__chemmacros_newman_y_fp
- )
- { #2 } ;
- }
-\cs_generate_variant:Nn \chemmacros_newman_front_node:nn { nf }
-
-% --------------------------------------------------------------------------
-% \orbital[<keyval>]{<type>}
-% variables:
-\bool_new:N \l__chemmacros_orbital_type_s_bool
-\bool_new:N \l__chemmacros_orbital_type_p_bool
-\bool_new:N \l__chemmacros_orbital_type_sp_bool
-\bool_new:N \l__chemmacros_orbital_type_sptwo_bool
-\bool_new:N \l__chemmacros_orbital_type_spthree_bool
-\bool_new:N \l__chemmacros_orbital_s_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_s_phase_bool
-\bool_new:N \l__chemmacros_orbital_p_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_p_phase_bool
-\bool_new:N \l__chemmacros_orbital_sp_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_sp_phase_bool
-\bool_new:N \l__chemmacros_orbital_sptwo_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_sptwo_phase_bool
-\bool_new:N \l__chemmacros_orbital_spthree_phase_bool
-\bool_set_true:N \l__chemmacros_orbital_spthree_phase_bool
-\bool_new:N \l__chemmacros_orbital_p_half_bool
-\bool_new:N \l__chemmacros_orbital_overlay_bool
-\bool_new:N \l__chemmacros_orbital_opacity_bool
-
-\tl_new:N \l__chemmacros_orbital_s_color_tl
-\tl_set:Nn \l__chemmacros_orbital_s_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_s_phase_color_tl
-\tl_new:N \l__chemmacros_orbital_p_color_tl
-\tl_set:Nn \l__chemmacros_orbital_p_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_p_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_p_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sp_color_tl
-\tl_set:Nn \l__chemmacros_orbital_sp_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_sp_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sp_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sptwo_color_tl
-\tl_set:Nn \l__chemmacros_orbital_sptwo_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_sptwo_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_sptwo_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_spthree_color_tl
-\tl_set:Nn \l__chemmacros_orbital_spthree_color_tl { black }
-\tl_new:N \l__chemmacros_orbital_spthree_pphase_color_tl
-\tl_new:N \l__chemmacros_orbital_spthree_mphase_color_tl
-\tl_new:N \l__chemmacros_orbital_s_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_s_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_p_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_p_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_sp_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_sp_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_sptwo_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_sptwo_scale_tl { 1 }
-\tl_new:N \l__chemmacros_orbital_spthree_scale_tl
-\tl_set:Nn \l__chemmacros_orbital_spthree_scale_tl { 1 }
-
-\fp_new:N \l__chemmacros_orbital_angle_fp
-\fp_set:Nn \l__chemmacros_orbital_angle_fp { 90 }
-\fp_new:N \l__chemmacros_orbital_opacity_fp
-\fp_set:Nn \l__chemmacros_orbital_opacity_fp { 0.5 }
-
-\cs_new:Npn \__chemmacros_orbital_options:
- {
- \__chemmacros_orbital_overlay: , \__chemmacros_orbital_opacity: ,
- inner~sep=0 , outer~sep=0 , line~width=.2pt ,
- rotate = { \fp_use:N \l__chemmacros_orbital_angle_fp - 90 } ,
- baseline ,
- minimum~size = 0
- }
-
-\cs_new:Npn \__chemmacros_orbital_overlay:
- { \bool_if:NT \l__chemmacros_orbital_overlay_bool { overlay } }
-
-\cs_new:Npn \__chemmacros_orbital_opacity:
- {
- \bool_if:NT \l__chemmacros_orbital_opacity_bool
- { opacity = { \fp_use:N \l__chemmacros_orbital_opacity_fp } }
- }
-
-% --------------------------------------------------------------------------
-% s-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_s:
- {
- \bool_set_true:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\keys_define:nn { chemmacros / orbital / s }
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_s_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_s_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_s_scale_tl ,
- color .tl_set:N = \l__chemmacros_orbital_s_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_s_draw:n #1
- {
- \keys_set:nn { chemmacros / orbital / s } { #1 }
- \bool_if:NTF \l__chemmacros_orbital_s_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_s_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
- { \tl_use:N \l__chemmacros_orbital_s_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
- { \tl_use:N \l__chemmacros_orbital_s_color_tl ! 90 }
- }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_s_phase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn{ \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shade:f
- { ball~color = \l__chemmacros_orbital_s_phase_color_tl }
- (0pt,0pt) circle (\l__chemmacros_orbital_s_scale_tl * .6em) ;
- }
- }
-
-% --------------------------------------------------------------------------
-% p-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_p:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_true:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\keys_define:nn { chemmacros / orbital / p }
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_p_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_p_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_p_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_p_color_tl ,
- half .bool_set:N = \l__chemmacros_orbital_p_half_bool ,
- half .default:n = true
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_p_draw:n #1
- {
- \keys_set:nn { chemmacros / orbital / p } { #1 }
- \bool_if:NTF \l__chemmacros_orbital_p_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_p_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_p_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_p_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_p_pphase_color_tl ,
- ball~color = \l__chemmacros_orbital_p_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
- )
- .. (0pt,0pt);
- \bool_if:NF \l__chemmacros_orbital_p_half_bool
- {
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_p_mphase_color_tl ,
- ball~color = \l__chemmacros_orbital_p_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_p_scale_tl * 2em ,
- - \l__chemmacros_orbital_p_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_p_scale_tl * 2em ,
- - \l__chemmacros_orbital_p_scale_tl * 2em
- )
- .. (0pt,0pt);
- }
- }
- }
-
-% --------------------------------------------------------------------------
-% sp-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_sp:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_true:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\keys_define:nn { chemmacros / orbital / sp }
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_sp_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_sp_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_sp_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_sp_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_sp_draw:n #1
- {
- \keys_set:nn { chemmacros / orbital / sp } { #1 }
- \bool_if:NTF \l__chemmacros_orbital_sp_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sp_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sp_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sp_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_sp_pphase_color_tl ,
- ball~color = \l__chemmacros_orbital_sp_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sp_scale_tl * 2em ,
- \l__chemmacros_orbital_sp_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_sp_scale_tl * 2em ,
- \l__chemmacros_orbital_sp_scale_tl * 2em
- )
- .. (0pt,0pt);
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_sp_mphase_color_tl ,
- ball~color = \l__chemmacros_orbital_sp_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sp_scale_tl * .6em ,
- - \l__chemmacros_orbital_sp_scale_tl * .6em
- )
- and ++
- (
- \l__chemmacros_orbital_sp_scale_tl * .6em ,
- - \l__chemmacros_orbital_sp_scale_tl * .6em
- )
- .. (0pt,0pt);
- }
- }
-
-% --------------------------------------------------------------------------
-% sp2-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_sptwo:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_true:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\keys_define:nn { chemmacros / orbital / sp2 }
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_sptwo_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_sptwo_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_sptwo_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_sptwo_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_sptwo_draw:n #1
- {
- \keys_set:nn { chemmacros / orbital / sp2 } { #1 }
- \bool_if:NTF \l__chemmacros_orbital_sptwo_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_sptwo_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_sptwo_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_sptwo_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_sptwo_pphase_color_tl ,
- ball~color = \l__chemmacros_orbital_sptwo_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
- \l__chemmacros_orbital_sptwo_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
- \l__chemmacros_orbital_sptwo_scale_tl * 2em
- )
- .. (0pt,0pt);
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_sptwo_mphase_color_tl ,
- ball~color = \l__chemmacros_orbital_sptwo_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- - \l__chemmacros_orbital_sptwo_scale_tl * .8em
- )
- and ++
- (
- \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- - \l__chemmacros_orbital_sptwo_scale_tl * .8em
- )
- .. (0pt,0pt);
- }
- }
-
-% --------------------------------------------------------------------------
-% sp3-orbitals
-\cs_new_protected:Npn \__chemmacros_orbital_type_spthree:
- {
- \bool_set_false:N \l__chemmacros_orbital_type_s_bool
- \bool_set_false:N \l__chemmacros_orbital_type_p_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sp_bool
- \bool_set_false:N \l__chemmacros_orbital_type_sptwo_bool
- \bool_set_true:N \l__chemmacros_orbital_type_spthree_bool
- }
-
-\keys_define:nn { chemmacros / orbital / sp3 }
- {
- phase .choice: ,
- phase / + .code:n =
- { \bool_set_true:N \l__chemmacros_orbital_spthree_phase_bool } ,
- phase / - .code:n =
- { \bool_set_false:N \l__chemmacros_orbital_spthree_phase_bool } ,
- scale .tl_set:N = \l__chemmacros_orbital_spthree_scale_tl ,
- angle .fp_set:N = \l__chemmacros_orbital_angle_fp ,
- color .tl_set:N = \l__chemmacros_orbital_spthree_color_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_orbital_spthree_draw:n #1
- {
- \keys_set:nn { chemmacros / orbital / sp3 } { #1 }
- \bool_if:NTF \l__chemmacros_orbital_spthree_phase_bool
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
- { black ! 5 }
-
- }
- {
- \tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl { ! }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl }
- }
- {
- \tl_set:Nn \l__chemmacros_orbital_spthree_mphase_color_tl
- { \tl_use:N \l__chemmacros_orbital_spthree_color_tl ! 90 }
- }
- \tl_set:Nn \l__chemmacros_orbital_spthree_pphase_color_tl
- { black ! 5 }
- }
- \chemmacros_tikz_picture:xn { \__chemmacros_orbital_options: }
- {
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_spthree_pphase_color_tl ,
- ball~color = \l__chemmacros_orbital_spthree_pphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_spthree_scale_tl * 2em ,
- \l__chemmacros_orbital_spthree_scale_tl * 2em
- )
- and ++
- (
- \l__chemmacros_orbital_spthree_scale_tl * 2em ,
- \l__chemmacros_orbital_spthree_scale_tl * 2em
- )
- .. (0pt,0pt);
- \chemmacros_tikz_shadedraw:f
- {
- draw = \l__chemmacros_orbital_spthree_mphase_color_tl ,
- ball~color = \l__chemmacros_orbital_spthree_mphase_color_tl
- }
- (0pt,0pt) .. controls ++
- (
- - \l__chemmacros_orbital_spthree_scale_tl * 1em ,
- - \l__chemmacros_orbital_spthree_scale_tl * 1em
- )
- and ++
- (
- \l__chemmacros_orbital_spthree_scale_tl * 1em ,
- - \l__chemmacros_orbital_spthree_scale_tl * 1em
- )
- .. (0pt,0pt);
- }
- }
-
-% --------------------------------------------------------------------------
-% main command
-\keys_define:nn { chemmacros / orbital }
- {
- overlay .bool_set:N = \l__chemmacros_orbital_overlay_bool ,
- overlay .default:n = true ,
- opacity .code:n =
- {
- \fp_compare:nTF { #1 = 1 }
- { \bool_set_false:N \l__chemmacros_orbital_opacity_bool }
- { \bool_set_true:N \l__chemmacros_orbital_opacity_bool }
- \fp_set:Nn \l__chemmacros_orbital_opacity_fp { #1 }
- }
- }
-
-\keys_define:nn { chemmacros / orbital / type }
- {
- s .code:n = { \__chemmacros_orbital_type_s: } ,
- p .code:n = { \__chemmacros_orbital_type_p: } ,
- sp .code:n = { \__chemmacros_orbital_type_sp: } ,
- sp2 .code:n = { \__chemmacros_orbital_type_sptwo: } ,
- sp3 .code:n = { \__chemmacros_orbital_type_spthree: }
- }
-
-\cs_new_protected:Npn \chemmacros_orbital:n #1
- {
- \bool_if:NT \l__chemmacros_orbital_type_s_bool
- { \__chemmacros_orbital_s_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_p_bool
- { \__chemmacros_orbital_p_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_sp_bool
- { \__chemmacros_orbital_sp_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_sptwo_bool
- { \__chemmacros_orbital_sptwo_draw:n { #1 } }
- \bool_if:NT \l__chemmacros_orbital_type_spthree_bool
- { \__chemmacros_orbital_spthree_draw:n { #1 } }
- }
-
-\NewDocumentCommand \orbital { o m }
- {
- \group_begin:
- \keys_set:nn { chemmacros / orbital / type } { #2 }
- \IfNoValueTF { #1 }
- { \chemmacros_orbital:n { } }
- { \chemmacros_orbital:n { #1 } }
- \group_end:
- }
-
-% --------------------------------------------------------------------------
-% arrow tips for electron movement
-\dim_new:N \l__chemmacros_el_length_dim
-
-% full tip for pairs
-\pgfarrowsdeclare { el } { el }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
- }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \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
- { -\l__chemmacros_el_length_dim }
- { -.3\l__chemmacros_el_length_dim }
- }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
- \pgfusepathqfillstroke
- }
-
-% half tip on the left
-\pgfarrowsdeclare { left~el } { left~el }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
- }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \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 } }
- \pgfusepathqfillstroke
- }
-
-% half tip in the right
-\pgfarrowsdeclare { right~el } { right~el }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemmacros_el_length_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
- }
- {
- \dim_set:Nn \l__chemmacros_el_length_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \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 } }
- \pgfusepathqfillstroke
- }
-
-% --------------------------------------------------------------------------
-% setup
-\NewDocumentCommand \chemsetup { o m }
- {
- \IfNoValueTF { #1 }
- { \keys_set:nn { chemmacros } { #2 } }
- {
- \tl_if_eq:nnTF { #1 } { chemformula }
- { \setchemformula { #2 } }
- { \keys_set:nn { chemmacros / #1 } { #2 } }
- }
- \ignorespaces
- }
-
-
-% --------------------------------------------------------------------------
-% hyperref support
-% ?? unsure about adding IUPAC commands
-\AfterPackage* { hyperref }
- {
- \pdfstringdefDisableCommands
- {
- % \cs_set:Npn \- { - } % maybe not a good idea...
- \cs_set:Npn \| { }
- \cs_set:Npn \pH { pH }
- \cs_set:Npn \pOH { pOH }
- \cs_set:Npn \iupac #1 { #1 }
- \cs_set:Npn \cip #1 { (#1) }
- \cs_set:Npn \cis { cis }
- \cs_set:Npn \trans { trans }
- \cs_set:Npn \tert { tert }
- \cs_set:Npn \ortho { o }
- \cs_set:Npn \meta { m }
- \cs_set:Npn \para { p }
- \cs_set:Npn \syn { syn }
- \cs_set:Npn \anti { anti }
- }
- }
-
-% --------------------------------------------------------------------------
-% language support -- provided through `translations'
-% equilibrium constants:
-\DeclareTranslationFallback {K-acid} {\mathrm{a}}
-\DeclareTranslation{German} {K-acid} {\mathrm{s}}
-\DeclareTranslation{Dutch} {K-acid} {\mathrm{z}}
-
-\DeclareTranslationFallback {K-base} {\mathrm{b}}
-
-\DeclareTranslationFallback {K-water} {\mathrm{w}}
-
-% phases:
-\DeclareTranslation{German}{phase-sld}{ f }
-\DeclareTranslation{German}{phase-lqd}{ f{}l }
-% list of reactions:
-\DeclareTranslationFallback {list-of-reactions} { List~ of~ reactions }
-\DeclareTranslation{English} {list-of-reactions} { List~ of~ reactions }
-\DeclareTranslation{German} {list-of-reactions} { Reaktionsverzeichnis }
-\DeclareTranslation{Italian} {list-of-reactions} { Elenco~ delle~ reazioni }
-\DeclareTranslation{French} {list-of-reactions} { Table~ des~ r\'eactions }
-\DeclareTranslation{Dutch} {list-of-reactions} { Lijst~ van~ reacties }
-%
-\DeclareTranslationFallback {reaction} { Reaction }
-\DeclareTranslation{English} {reaction} { Reaction }
-\DeclareTranslation{German} {reaction} { Reaktion }
-\DeclareTranslation{Italian} {reaction} { Reazione }
-\DeclareTranslation{French} {reaction} { R\'eaction }
-\DeclareTranslation{Dutch} {reaction} { Reactie }
-
-\tl_set:Nn \l__chemmacros_reaction_lorname_tl
- { \chemmacros_translate:n {reaction} }
-\tl_set:Nn \reactionlistname
- { \chemmacros_translate:n {list-of-reactions} }
-
-\file_input_stop:
-
-% --------------------------------------------------------------------------
-Version history
-2015/08/29 - version 5.0 - integration as v4.7 into v5.0 of chemmacros for
- backwards compatibility
- - fix typo in \l_chemformula_formal_charges_bool
- - remove \tl_to_lowercase:n
-
-% --------------------------------------------------------------------------- %
-% TODO:
-- add d-orbitals
-- make electron movement arrow tips (`el', `left el' and `right el') public
-- phase commands with arguments (see http://texwelt.de/wissen/fragen/9264)
-
diff --git a/macros/latex/contrib/chemmacros/chemmacros5.sty b/macros/latex/contrib/chemmacros/chemmacros5.sty
deleted file mode 100644
index c685fefa70..0000000000
--- a/macros/latex/contrib/chemmacros/chemmacros5.sty
+++ /dev/null
@@ -1,330 +0,0 @@
-% --------------------------------------------------------------------------
-% the CHEMMACROS package
-%
-% comprehensive support for typesetting chemistry documents
-%
-% --------------------------------------------------------------------------
-% Clemens Niederberger
-% --------------------------------------------------------------------------
-% https://github.org/cgnieder/chemmacros/
-% contact@mychemistry.eu
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
-%
-% 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 Maintainer of this work is Clemens Niederberger.
-% --------------------------------------------------------------------------
-% The chemmacros package consists of the following files
-% - chemmacros.sty, chemmacros4.sty, chemmacros5.sty,
-% - chemmacros_en.tex, chemmacros_en.pdf,
-% - quite a number of module files following the naming scheme
-% chemmacros.module.*.code.tex
-% - README
- % --------------------------------------------------------------------------
-\RequirePackage{expl3,xparse,l3keys2e}
-\ExplSyntaxOn
-
-% --------------------------------------------------------------------------
-% package information:
-\ProvidesExplPackage
- {chemmacros5}
- {\c_chemmacros_date_tl}
- {\c_chemmacros_version_tl}
- {\c_chemmacros_info_tl \c_space_tl (CN)}
-
-% --------------------------------------------------------------------------
-\msg_new:nnn {chemmacros} {package-option}
- {
- Unknown~ option~ `#1'!~ Since~ v5.0~ chemmacros~ has~ no~ package~
- options~ any~ more!
- }
-
-\msg_new:nnn {chemmacros} {module-not-available}
- {
- The~ module~ `#1'~ is~ only~ available~ in~ compatibility~ mode~ #2~ or~
- higher.
- }
-
-\cs_generate_variant:Nn \msg_warning:nnn { nnV }
-
-\keys_define:nn {chemmacros/package-options}
- {
- compatibility .code:n = ,
- unknown .code:n =
- \msg_warning:nnV {chemmacros} {package-option} \CurrentOption
- }
-
-\ProcessKeysPackageOptions {chemmacros/package-options}
-
-% --------------------------------------------------------------------------
-% messages:
-\msg_new:nnn {chemmacros} {module-missing}
- {
- You've~ requested~ the~ chemmacros~ module~ `#1'~ but~ it~ appears~ to~
- be~ missing~ on~ your~ system.~ Maybe~ you've~ misspelled~ the~ name?~
- Loading~ the~ module~ will~ abort~ \msg_line_context:
- }
-
-\msg_new:nnn {chemmacros} {loading-module}
- {
- (chemmacros) \c_space_tl \c_space_tl \c_space_tl \c_space_tl
- Loading~ module~ `#1'...
- }
-
-% --------------------------------------------------------------------------
-% variants of kernel functions:
-\cs_generate_variant:Nn \tl_if_eq:nnTF {xx,V}
-\cs_generate_variant:Nn \seq_set_split:Nnn {Nnx}
-\cs_generate_variant:Nn \prop_item:Nn {NV}
-\cs_generate_variant:Nn \seq_item:Nn {cV}
-\cs_generate_variant:Nn \int_to_arabic:n {V}
-\cs_generate_variant:Nn \tl_replace_once:Nnn {NnV}
-\cs_generate_variant:Nn \prop_gput:Nnn {cxx,NVf}
-\cs_generate_variant:Nn \msg_error:nnn {nnV}
-\cs_generate_variant:Nn \msg_warning:nnn {nnV}
-\cs_generate_variant:Nn \msg_warning:nnnn {nnV}
-\cs_generate_variant:Nn \vbox_set:Nn {NV}
-\cs_generate_variant:Nn \keys_define:nn {x}
-\cs_generate_variant:Nn \keys_set:nn {x,nx}
-
-% --------------------------------------------------------------------------
-% temporary variables:
-\tl_new:N \l__chemmacros_tmpa_tl
-\tl_new:N \l__chemmacros_tmpb_tl
-\tl_new:N \l__chemmacros_tmpc_tl
-\tl_new:N \l__chemmacros_tmpd_tl
-
-\bool_new:N \l__chemmacros_tmpa_bool
-\bool_new:N \l__chemmacros_tmpb_bool
-\bool_new:N \l__chemmacros_tmpc_bool
-
-\dim_new:N \l__chemmacros_tmpa_dim
-\dim_new:N \l__chemmacros_tmpb_dim
-\dim_new:N \l__chemmacros_tmpc_dim
-
-\seq_new:N \l__chemmacros_tmpa_seq
-\seq_new:N \l__chemmacros_tmpb_seq
-\seq_new:N \l__chemmacros_tmpc_seq
-
-\int_new:N \l__chemmacros_tmpa_int
-\int_new:N \l__chemmacros_tmpb_int
-\int_new:N \l__chemmacros_tmpc_int
-
-\box_new:N \l__chemmacros_tmpa_box
-\box_new:N \l__chemmacros_tmpb_box
-\box_new:N \l__chemmacros_tmpc_box
-
-\clist_new:N \l__chemmacros_tmpa_clist
-\clist_new:N \l__chemmacros_tmpb_clist
-\clist_new:N \l__chemmacros_tmpc_clist
-
-\str_new:N \l__chemmacros_tmpa_str
-\str_new:N \l__chemmacros_tmpb_str
-\str_new:N \l__chemmacros_tmpc_str
-
-% --------------------------------------------------------------------------
-% module mechanism:
-\tl_const:Nn \c__chemmacros_module_extension_tl {code.tex}
-\tl_const:Nn \c__chemmacros_module_prefix_tl {chemmacros.module}
-
-\seq_new:N \g__chemmacros_loaded_modules_seq
-\prop_new:N \g__chemmacros_loaded_modules_prop
-
-\cs_new_protected:Npn \chemmacros_load_modules:n #1
- { \clist_map_inline:nn {#1} { \chemmacros_load_module:n {##1} } }
-
-\cs_new_protected:Npn \chemmacros_load_module:n #1
- {
- \tl_set:Nx \l__chemmacros_tmpa_tl { \tl_trim_spaces:n {#1} }
- \__chemmacros_load_module:V \l__chemmacros_tmpa_tl
- }
-
-\cs_new_protected:Npn \__chemmacros_load_module:n #1
- {
- \chemmacros_if_module_loaded:nF {#1}
- {
- \chemmacros_if_module_exist:nTF {#1}
- {
- \__chemmacros_use_module_hook:nn {#1} {before}
- \msg_log:nnn {chemmacros} {loading-module} {#1}
- \@onefilewithoptions
- {\c__chemmacros_module_prefix_tl.#1}[][]
- \c__chemmacros_module_extension_tl
- \__chemmacros_use_module_hook:nn {#1} {after}
- }
- { \msg_error:nnn {chemmacros} {module-missing} {#1} }
- }
- }
-\cs_generate_variant:Nn \__chemmacros_load_module:n { V }
-
-\prg_new_conditional:Npnn \chemmacros_if_module_loaded:n #1 {p,T,F,TF}
- {
- \seq_if_in:NnTF \g__chemmacros_loaded_modules_seq {#1}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\prg_new_conditional:Npnn \chemmacros_if_module_exist:n #1 {p,T,F,TF}
- {
- \file_if_exist:nTF
- {\c__chemmacros_module_prefix_tl.#1.\c__chemmacros_module_extension_tl}
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-% --------------------------------------------------------------------------
-\ChemCompatibilityFrom{5.1}
-% module hooks:
-% #1: module
-% #2: code
-\cs_new_protected:Npn \chemmacros_after_module:nn #1#2
- {
- \chemmacros_if_module_loaded:nTF {#1}
- {#2}
- { \__chemmacros_add_to_module_hook:nnn {#1} {after} {#2} }
- }
-
-% #1: module
-% #2: code
-\cs_new_protected:Npn \chemmacros_before_module:nn #1#2
- {
- \chemmacros_if_module_loaded:nF {#1}
- { \__chemmacros_add_to_module_hook:nnn {#1} {before} {#2} }
- }
-\EndChemCompatibility
-
-% #1: module
-% #2: hook name
-% #3: code
-\cs_new_protected:Npn \__chemmacros_add_to_module_hook:nnn #1#2#3
- {
- \chemmacros_if_module_loaded:nF {#1}
- {
- \tl_if_exist:cF {g__chemmacros_module_#1_#2_hook_tl}
- { \tl_new:c {g__chemmacros_module_#1_#2_hook_tl} }
- \tl_gput_right:cn {g__chemmacros_module_#1_#2_hook_tl} {#3}
- }
- }
-
-% #1: module
-% #2: hook name
-\cs_new_protected:Npn \__chemmacros_use_module_hook:nn #1#2
- {
- \tl_if_exist:cT {g__chemmacros_module_#1_#2_hook_tl}
- {
- \tl_use:c {g__chemmacros_module_#1_#2_hook_tl}
- \tl_gclear:c {g__chemmacros_module_#1_#2_hook_tl}
- }
- }
-
-% --------------------------------------------------------------------------
-\cs_new_protected:Npn \__chemmacros_module:nnnn #1#2#3#4
- {
- \chemmacros_if_compatibility:nnF {>=} {#4}
- {
- \msg_warning:nnnn {chemmacros} {module-not-available} {#2} {#4}
- \file_input_stop:
- }
- \seq_gput_right:Nn \g__chemmacros_loaded_modules_seq {#2}
- \prop_gput:Nnn \g__chemmacros_loaded_modules_prop {#2} {#3}
- \ProvidesFile
- {\c__chemmacros_module_prefix_tl.#2.\c__chemmacros_module_extension_tl}
- [
- \c_chemmacros_date_tl
- \c_space_tl
- v \c_chemmacros_version_tl
- \c_space_tl
- chemmacros~ module~ `#2'~ #3
- ]
- \bool_if:nF {#1} { \ExplSyntaxOn }
- }
-
-% define a chemmacros module:
-% 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: boolean
-% #2: name
-% #3: description
-\NewDocumentCommand \ChemModule {smmO{5.0}}
- { \__chemmacros_module:nnnn {#1} {#2} {#3} {#4} }
-
-% --------------------------------------------------------------------------
-% command for loading modules:
-\NewDocumentCommand \usechemmodule {m} { \chemmacros_load_modules:n {#1} }
-
-% --------------------------------------------------------------------------
-% load default modules:
-\chemmacros_load_modules:n
- {
- % required modules:
- base,
- errorcheck,
- lang, greek,
- chemformula,
- % preloaded modules:
- acid-base,
- symbols,
- charges,
- particles,
- phases ,
- nomenclature
- }
-
-% --------------------------------------------------------------------------
-\file_input_stop:
-
-% --------------------------------------------------------------------------
-Modules: (* = preloaded)
- - internal modules:
- - base *
- - errorcheck *
- - lang *
- - greek *
- - chemformula *
- - tikz
- - user modules:
- - acid-base *
- - all
- - charges *
- - isotopes
- - mechanisms
- - newman
- - nomenclature *
- - orbital
- - particles *
- - phases *
- - reactions
- - redox
- - scheme
- - spectroscopy
- - symbols *
- - thermodynamics
- - units
- - xfrac
-
-% --------------------------------------------------------------------------
-Version history
-2015/08/29 - initial release v5.0
-2015/09/23 - add module hooks `before' and `after'
- - allow to give minimal compatibility version to a module: this
- should be the first version when a module is published and
- shouldn't be changed any more; loading the corresponding module
- will abort when compatibility is too low
- - store loaded modules in a seq and in a prop
-2015/10/14 - bug fix in the module hook mechanism
- - bug fix in \chemmacros_if_module_loaded:n
- - new `errorcheck' module
-2020/02/03 - add temporary string variables
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index bd76ebd475..ec8cfcee74 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/01/15}{1.46B}
+\ProvidesExplClass{easybook}{2022/01/15}{1.46C}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -305,7 +305,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/01/15}{1.46B}
+\ProvidesExplPackage{easybase}{2022/01/15}{1.46C}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -590,7 +590,7 @@
\ctex_define:nn { geoset }
{
headruleskip .tl_set:N = \headruleskip,
- headruleskip .initial:n = 1.5pt,
+ headruleskip .initial:n = 0pt,
footruleskip .tl_set:N = \footruleskip,
footruleskip .initial:n = 3.5pt,
unknown .code:n =
@@ -1477,16 +1477,16 @@
\ctex_define:nn { style }
{
- connect-figure .tl_set:N = \l__eb_connect_figure_tl,
- connect-table .tl_set:N = \l__eb_connect_table_tl,
- connect-listing .tl_set:N = \l__eb_connect_lstlisting_tl,
- connect-equation .tl_set:N = \l__eb_connect_equation_tl,
- connect-every .meta:n =
+ hyphen-figure .tl_set:N = \l__eb_hyphen_figure_tl,
+ hyphen-table .tl_set:N = \l__eb_hyphen_table_tl,
+ hyphen-listing .tl_set:N = \l__eb_hyphen_lstlisting_tl,
+ hyphen-equation .tl_set:N = \l__eb_hyphen_equation_tl,
+ hyphen-every .meta:n =
{
- connect-figure = #1,connect-table = #1,
- connect-listing = #1,connect-equation = #1
+ hyphen-figure = #1,hyphen-table = #1,
+ hyphen-listing = #1,hyphen-equation = #1
},
- connect-every .initial:n = { . },
+ hyphen-every .initial:n = { . },
unknown .code:n = \eb_msg_abandon_option:n { style }
}
\eb_seq_map_inline:nn
@@ -1497,7 +1497,7 @@
\int_compare:nNnT { \c@chapter } > { 0 }
{
\thechapter
- \tl_use:c { l__eb_connect_#1_tl }
+ \tl_use:c { l__eb_hyphen_#1_tl }
}
\int_to_arabic:v { c@#1 }
}
@@ -2182,6 +2182,7 @@
}
\eb_at_end_preamble:n
{
+ \providecommand{\bibname}{\refname}
\clist_if_empty:NF \l__eb_bib_datafile_clist
{
\bool_if:NTF \l__eb_backend_bibtex_bool
@@ -2371,11 +2372,25 @@
\exp_args:NV \hypersetup \l__eb_hyperref_clist
}
-\labelformat{part}{\CTEXthepart}
-\labelformat{chapter}{\CTEXthechapter}
-\labelformat{figure}{\figurename~#1}
-\labelformat{table}{\tablename~#1}
-\providecommand{\bibname}{\refname}
+\AtBeginDocument
+ {
+ \@ifpackageloaded{cleveref}{}
+ {
+ \labelformat{part}{\CTEXthepart}
+ \labelformat{chapter}{\CTEXthechapter}
+ \labelformat{figure}{\figurename~#1}
+ \labelformat{table}{\tablename~#1}
+ \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
+ {
+ \labelformat{section}{节 #1}
+ \labelformat{subsection}{小节 #1}
+ }
+ {
+ \labelformat{section}{Section~#1}
+ \labelformat{subsection}{Subsection~#1}
+ }
+ }
+ }
\ctex_define:n
{
lstlistlistingname .tl_set:N = \listlstlistingname,
@@ -2393,8 +2408,6 @@
lstlistlistingname = 代码索引,
lstlistingname = 代码
}
- \labelformat{section}{节 #1}
- \labelformat{subsection}{小节 #1}
}
{
\keys_set_known:nn { ctex }
@@ -2403,12 +2416,10 @@
lstlistlistingname = List~of~Codes,
lstlistingname = Code
}
- \labelformat{section}{Section~#1}
- \labelformat{subsection}{Subsection~#1}
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/15}{1.46B}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/15}{1.46C}
{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 421d98606b..bcb1d7e974 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 1669a6215a..39b0334c40 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,7 +21,7 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.46B,
+ version = v1.46C,
date = 2022/01/15,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
@@ -418,7 +418,7 @@
uppercase = false
}
}
- \ebstyle{connect-figure = {-}}
+ \ebstyle{hyphen-figure = {-}}
\end{ctexexam}
文档类有三种选项:布尔型 \boolkey*{key},选项的值为真 \code{true} 或假 \code{false},如果不指定默认为真。键值型 \key*-{key}{value} 需要为选项指定值,后面 \code{=} 号不能省略。选择型 \choicekey*{key}{one,\default{two},three} 根据提供的可选值进行设定。
@@ -453,18 +453,18 @@
设置插入图片的文件夹路径名,可以有多个路径名,每个路径包含在括号分隔,只有一个路径时需要包含在两层括号内。
\end{options}
-\subsubsection{连接符}
+\subsubsection{连字符}
\begin{options}
- \keyval-{connect-figure}{图片连接符}\Default{\Carg{.}}
- 设置图片题注编号的连接符。
- \keyval-{connect-table}{表格连接符}\Default{\Carg{.}}
- 设置表格题注编号的连接符。
- \keyval-{connect-listing}{代码连接符}\Default{\Carg{.}}
- 设置代码题注编号的连接符。
- \keyval-{connect-equation}{公式连接符}\Default{\Carg{.}}
- 设置公式题注编号的连接符。
- \keyval-{connect-every}{连接符}\Default{\Carg{.}}
- 统一设置上述所有编号的连接符。
+ \keyval-{hyphen-figure}{图片连字符}\Default{\Carg{.}}
+ 设置图片题注编号的连字符。
+ \keyval-{hyphen-table}{表格连字符}\Default{\Carg{.}}
+ 设置表格题注编号的连字符。
+ \keyval-{hyphen-listing}{代码连字符}\Default{\Carg{.}}
+ 设置代码题注编号的连字符。
+ \keyval-{hyphen-equation}{公式连字符}\Default{\Carg{.}}
+ 设置公式题注编号的连字符。
+ \keyval-{hyphen-every}{连字符}\Default{\Carg{.}}
+ 统一设置上述所有编号的连字符。
\end{options}
\subsubsection{上下标全局设置}
@@ -689,7 +689,7 @@
\label{subsec:page margins}
模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
\begin{options}\noitemsep
- \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*{1.5pt}
+ \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*{0pt}
\keyval-{footruleskip}{页脚线间距}\Default*{3.5pt}
\kvsplit*{hdivide}{左边距,页面文本宽度,右边距}
\kvsplit*{hmargin}{左边距,右边距}
@@ -1161,10 +1161,12 @@
\begin{commands}
\command{labelformat}[\marg{计数器}\marg{标签引用格式}]
标签格式命令 \cs{labelformat} 可以设置标签引用格式,\meta{标签引用格式} 中 \code{\#1} 代表 \cs*{the}\meta{计数器},可以设置引用序号的前缀和后缀。也可以使用 \pkg*{cleveref} 宏包提供更强大的标签功能。
+ \command{AtEndPreamble}[\marg{钩子代码}]
+ 导言区末尾的钩子命令。为了保证兼容性 \pkg*{hyperref} 宏包被设计在导言区末尾载入,一些情况下需要合适的钩子在 \pkg*{hyperref} 后方执行 \meta{钩子代码},例如载入 \pkg*{cleveref} 宏包。
\begin{ctexexam}
\labelformat{chapter}{第 #1 章}
\labelformat{chapter}{第\thechapter 章}
- \AtBeginDocument{\usepackage{cleveref}}
+ \AtEndPreamble{\usepackage{cleveref}}
\end{ctexexam}
\end{commands}
diff --git a/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl b/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
index e21e92ef52..1fc431ce4b 100644
--- a/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+++ b/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
@@ -94,6 +94,7 @@ $mirrors = {
'https://ctan.mc1.root.project-creative.net/' => 1,
'https://ctan.mirror.norbert-ruehl.de/' => 1,
'https://ctan.net/' => 1,
+ 'https://ctan.space-pro.be/tex-archive/' => 1,
'https://ftp.agdsn.de/pub/mirrors/latex/dante/' => 1,
'https://ftp.fau.de/ctan/' => 1,
'https://ftp.gwdg.de/pub/ctan/' => 1,
@@ -168,7 +169,6 @@ $mirrors = {
'https://ctan.mirror.globo.tech/' => 1,
'https://ctan.mirror.rafal.ca/' => 1,
'https://mirror.csclub.uwaterloo.ca/CTAN/' => 1,
- 'https://mirror.its.dal.ca/ctan/' => 1,
'https://muug.ca/mirror/ctan/' => 1,
},
'Costa Rica' => {
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
index b491042750..ac51aef7f6 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
@@ -26,11 +26,11 @@ depend container_split_src_files/1
depend frozen/0
depend minrelease/2016
depend release/2021
-depend revision/61607
+depend revision/61619
name 00texlive.image
category TLCore
-revision 61607
+revision 61613
shortdesc TeX Live files only in the source repository
longdesc The files here are not copied by the installer and containers
longdesc are not built for them; they exist only in the source
@@ -1176,6 +1176,7 @@ runfiles size=12500
tlpkg/tlpsrc/computational-complexity.tlpsrc
tlpkg/tlpsrc/concepts.tlpsrc
tlpkg/tlpsrc/concmath-fonts.tlpsrc
+ tlpkg/tlpsrc/concmath-otf.tlpsrc
tlpkg/tlpsrc/concmath.tlpsrc
tlpkg/tlpsrc/concprog.tlpsrc
tlpkg/tlpsrc/concrete.tlpsrc
@@ -4513,7 +4514,7 @@ depend setting_available_architectures:aarch64-linux amd64-freebsd amd64-netbsd
name 00texlive.installer
category TLCore
-revision 61603
+revision 61609
shortdesc TeX Live standalone installer package
longdesc This package defines the files to go into the installer
longdesc archives (install-tl-unx.tar.gz, install-tl.zip) built by the
@@ -34140,16 +34141,16 @@ catalogue-topics class book-pub chinese
name beebe
category Package
-revision 61603
+revision 61609
catalogue biblio
shortdesc A collection of bibliographies
relocated 1
longdesc A collection of BibTeX bibliographies on TeX-related topics
longdesc (including, for example, spell-checking and SGML). Each
longdesc includes a LaTeX wrapper file to typeset the bibliography.
-containersize 883704
-containerchecksum d85ff8deb47abaa1f9e9d75c2ac4fe2646eab3948557400b4782c2d47ab48bc709a381841d803ba886f6096a10b615f4c737f2a86a7674486074385636901695
-runfiles size=2195
+containersize 884948
+containerchecksum 7c96c600f6b72250f224fd6716a91c358f171e8d3d716d2e80202f613449c0670eff2bfb2946907e2e32547cc95a06eef2fdda8d626d7f7b681f4af5116e1f5b
+runfiles size=2196
RELOC/bibtex/bib/beebe/epodd.bib
RELOC/bibtex/bib/beebe/font.bib
RELOC/bibtex/bib/beebe/printing-history.bib
@@ -66463,7 +66464,7 @@ containerchecksum 5bd74e1a434549cf31ce31777e9a32f90baa14148e6658633945508a46dbf6
name collection-fontsextra
category Collection
-revision 61165
+revision 61613
shortdesc Additional fonts
relocated 1
depend aboensis
@@ -66552,6 +66553,7 @@ depend collection-basic
depend comfortaa
depend comicneue
depend concmath-fonts
+depend concmath-otf
depend cookingsymbols
depend cormorantgaramond
depend countriesofeurope
@@ -66801,8 +66803,8 @@ depend yfonts
depend yfonts-t1
depend yinit-otf
depend zlmtt
-containersize 1928
-containerchecksum e539f0113027096949bb29bcf4d05d6baea025203689ad9031df999357b72aaff2caf655bb694f759ab88f24fc76446f58932c351daab6dd66199fae564588c2
+containersize 1932
+containerchecksum ca6e972b9defd3092d40ae43d2aef9124c250b6c3ae7c0b8f399b9aacf517313296f43c7273f850f5d146aec33c59ec7dac2c34c3f933fc75423ffc5ec54690c
name collection-fontsrecommended
category Collection
@@ -72138,6 +72140,31 @@ catalogue-ctan /fonts/concmath
catalogue-license lppl
catalogue-topics font font-mf font-maths
+name concmath-otf
+category Package
+revision 61613
+shortdesc Concrete based OpenType Math fontconcmath-otf
+relocated 1
+longdesc OpenType version of the 'Concrete' Math font created by Ulrik
+longdesc Vieth.
+containersize 130408
+containerchecksum 24b71af36ee399bac47a70e86f23ece5b18699d001e2e68bc0cce4b317981c038e4dd8a83689dd87b7ac8a86dd6ca3ddf082bb959630f7638d9f7635ccc17cd5
+doccontainersize 1854880
+doccontainerchecksum 23f2cfd25bb3278dcb7a2768547defec6047d3d5f5b82864ed3b23aa0ad874b9a3cfa4c660529a9178bf1274148e89cf060f7a8088f3a9854b9553463c40f924
+docfiles size=477
+ RELOC/doc/fonts/concmath-otf/README.md details="Readme"
+ RELOC/doc/fonts/concmath-otf/concmath-otf.ltx
+ RELOC/doc/fonts/concmath-otf/concmath-otf.pdf details="Package documentation"
+ RELOC/doc/fonts/concmath-otf/unimath-concrete.ltx
+ RELOC/doc/fonts/concmath-otf/unimath-concrete.pdf
+runfiles size=55
+ RELOC/fonts/opentype/public/concmath-otf/Concrete-Math.otf
+ RELOC/tex/latex/concmath-otf/concmath-otf.sty
+catalogue-ctan /fonts/concmath-otf
+catalogue-license ofl lppl1.3
+catalogue-topics font font-otf font-maths
+catalogue-version 0.20
+
name concprog
category Package
revision 18791
@@ -99739,21 +99766,21 @@ catalogue-topics notes editorial
name easybook
category Package
-revision 61606
+revision 61616
shortdesc Typeset Chinese theses or books
relocated 1
longdesc Easybook is a minimalist style template based on the ctexbook
longdesc book document class.
-containersize 17076
-containerchecksum 9715d2307c7a0c6535fc75bed226b60ae8f821947a04835cbce5fb5aa3dab05b1761b7cfe1e0259f2231e14bb5d3a0ac62ec6a6c92d52502641024dbd452e3a0
-doccontainersize 616348
-doccontainerchecksum 616240d4ff3f3d552c07892f33bb31eab52419f5b158368107356aa9ad7e2f47f8bca964cdaddbd1e8263f10054432c1f7786ff21995202e261804385c57de85
+containersize 17052
+containerchecksum 1e13bb7e710a2123f202ccf3330d305b4936ab7b790dadcc145abdab9b1510153aefcc2e0f2852396c7fb61aed70f952b49b68815cea47d4122b60d0288daa04
+doccontainersize 616464
+doccontainerchecksum df704993f63e78f13a8bd2f681a89af47d5e6c3fd0dc1373e761e361d4edf30ad701ed56a8819e657b0a1508f959b605ac819d5fe876010687cfc086237ab233
docfiles size=168
RELOC/doc/latex/easybook/README.md details="Readme"
RELOC/doc/latex/easybook/easybook.pdf details="Package documentation" language="zh"
RELOC/doc/latex/easybook/easybook.tex
-srccontainersize 17136
-srccontainerchecksum dfb215cbd85fce39c797893c1a69364c317b0883681523f4389a173690f73393bcc20353f4531b1cd3a3319d6b2ad7ec1fbe4181ad93a5aeac52dd0a72eb224c
+srccontainersize 17112
+srccontainerchecksum c3181065ad325606d0164b3c7805fb85fc83e8ac648322d72935b495bb6da99d6e86bf141c2d9f0408b63815cf2647cccd406a839fa9bd732be7c4e10268636e
srcfiles size=21
RELOC/source/latex/easybook/easybook.dtx
RELOC/source/latex/easybook/easybook.ins
@@ -99766,7 +99793,7 @@ catalogue-contact-repository https://gitee.com/texl3/easybook
catalogue-ctan /macros/latex/contrib/easybook
catalogue-license lppl1.3c
catalogue-topics book-pub class chinese expl3
-catalogue-version 1.46A
+catalogue-version 1.46B
name easyfig
category Package
@@ -123930,7 +123957,7 @@ catalogue-version 0.8.5
name fontspec
category Package
-revision 56594
+revision 61617
shortdesc Advanced font selection in XeLaTeX and LuaLaTeX
relocated 1
longdesc Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
@@ -123944,19 +123971,19 @@ depend l3kernel
depend l3packages
depend lm
depend xunicode
-containersize 26788
-containerchecksum 5c2013702cb65edbbd8d6e2c94eb8e181c7400f55593771d48e790cd32d8651e2ccb8fb41d89dffe7fb7ddd3219745102ec1934ad0dc5a24701f2c6a29107078
-doccontainersize 1189088
-doccontainerchecksum bef134b11346e3d06e33fd9ff0c80fa6d904c8cd481d2c55702766cac2d9553298f05dee9e0b4b57238d1c9e140176fa26d29dcdaee990712fd4a3f0148b26fe
-docfiles size=314
+containersize 26664
+containerchecksum 910b6dbf1ec00882086b1abf93e4a736b4a9b07b89d920fa84094aaf8fde11c6d25fa8cbc4448987bf249c71925ded5e82056ca44e4bf8f10030ab6bcbc3fc46
+doccontainersize 1221668
+doccontainerchecksum 03f1d92fab61b594d51e0befff26b95d39fb08eb3a250649b042fd02493f07b402fa71c2a3aab9fa3da48730be060c46ee77a41026f513c5a61894d8cec192f4
+docfiles size=323
RELOC/doc/latex/fontspec/CHANGES.md
RELOC/doc/latex/fontspec/LICENSE
RELOC/doc/latex/fontspec/README.md details="Package README"
RELOC/doc/latex/fontspec/fontspec-code.pdf
RELOC/doc/latex/fontspec/fontspec-example.tex
RELOC/doc/latex/fontspec/fontspec.pdf details="Package documentation"
-srccontainersize 83048
-srccontainerchecksum b64ffed6c06042ffab0faeba22b0df184b2fd0d27f8b312c65b33967021b860915d0c73f1ac9e3a9ac3125c5c7238038790b5d73127d02cb2ed51c64fdfaffab
+srccontainersize 82844
+srccontainerchecksum 3852251a397d4122026aab6ebf6f99e04f6f6f7b46da0fd38e858676cf8b090bab4c970008b32701130f3a2e5bc13b5ae5c1dee0a5da8941b037165bf6ce6aba
srcfiles size=118
RELOC/source/latex/fontspec/fontspec-code-api.dtx
RELOC/source/latex/fontspec/fontspec-code-closing.dtx
@@ -123993,7 +124020,7 @@ srcfiles size=118
RELOC/source/latex/fontspec/fontspec.dtx
RELOC/source/latex/fontspec/fontspec.ins
RELOC/source/latex/fontspec/fontspec.ltx
-runfiles size=81
+runfiles size=80
RELOC/tex/latex/fontspec/fontspec-luatex.sty
RELOC/tex/latex/fontspec/fontspec-xetex.sty
RELOC/tex/latex/fontspec/fontspec.cfg
@@ -124004,7 +124031,7 @@ catalogue-contact-repository https://github.com/wspr/fontspec/
catalogue-ctan /macros/unicodetex/latex/fontspec
catalogue-license lppl1.3c
catalogue-topics font-sel luatex xetex
-catalogue-version 2.7i
+catalogue-version 2.8a
name fonttable
category Package
@@ -157230,35 +157257,36 @@ catalogue-topics engineering maths
name karnaugh-map
category Package
-revision 44131
+revision 61614
shortdesc LaTeX package for drawing karnaugh maps with up to 6 variables
relocated 1
longdesc This package draws karnaugh maps with 2, 3, 4, 5, and 6
longdesc variables. It also contains commands for filling the karnaugh
longdesc map with terms semi-automatically or manually. Last but not
longdesc least it contains commands for drawing implicants on top of the
-longdesc map. This package depends on the TikZ, xparse, and xstring
-longdesc packages.
-containersize 4836
-containerchecksum dc2327e4cda55e4b60365d6354f679f9bc68d87a3d3695eb98c2754d7a5f7f64d65db8732b107f686fc39a07868d4703afc0fba754f42af3fd567a143199580e
-doccontainersize 239480
-doccontainerchecksum 0daa9aafafd67df8934ff2b7b31794b23c8ebc53fb142f23111e64957a75904c4813c6f40512e4a440861351a2185884969cffef35209dfddbfd9ac4007e6557
-docfiles size=60
+longdesc map. This package depends on the keyval, kvoptions, TikZ,
+longdesc xparse, and xstring packages.
+containersize 6116
+containerchecksum 789421645939ff491e3ee00aa06813a5e194108c2d55a5e06ffb4dba593a095352ec54c5194ef8ac536f4226007d2323a923ada94966b5cdbd147117856ba680
+doccontainersize 287964
+doccontainerchecksum 6a04bc71128802a62fa2dbf92a513c9859f9bab336cd2208d05fcd3b9404a1531e4f20cfd69a1d58186cee6660582ab03e89ce87511c3e1173f84bc6ac132f29
+docfiles size=72
RELOC/doc/latex/karnaugh-map/README.md details="Readme"
RELOC/doc/latex/karnaugh-map/karnaugh-map.pdf details="Package documentation"
-srccontainersize 8056
-srccontainerchecksum 3de03d6661f8a8d0955de760bd8e0a9e2c5592e1ec95e55224994c9b5580036da6c20a9e68a2e59195fbdbbe0ffb5f431dd025400a3c1c57c44fa92000575dfc
-srcfiles size=16
+srccontainersize 9980
+srccontainerchecksum 520bcc77beb97f2f106c92682898244160c2ee45ec85118776dc375763363b272e1459e73d3cfe1c27c7f82f24f723953bc9705cf1f506e7c4b679c0f3063804
+srcfiles size=19
RELOC/source/latex/karnaugh-map/karnaugh-map.dtx
RELOC/source/latex/karnaugh-map/karnaugh-map.ins
-runfiles size=8
+runfiles size=11
RELOC/tex/latex/karnaugh-map/karnaugh-map.sty
catalogue-also karnaugh karnaughmap
+catalogue-contact-bugs https://github.com/2pi/karnaugh-map/issues
catalogue-contact-repository https://github.com/2pi/karnaugh-map
catalogue-ctan /graphics/pgf/contrib/karnaugh-map
-catalogue-license other-free
+catalogue-license cc-by-sa-3
catalogue-topics maths engineering pgf-tikz
-catalogue-version 1.1
+catalogue-version 2.0
name karnaughmap
category Package
@@ -217953,24 +217981,26 @@ catalogue-version 1.1.2
name njuthesis
category Package
-revision 61293
+revision 61618
shortdesc LaTeX thesis template for Nanjing University
relocated 1
longdesc The njuthesis class is intended for typesetting Nanjing
longdesc University dissertations with LaTeX, providing support for
longdesc bachelor, master, and doctoral thesis.
-containersize 9812
-containerchecksum 599bce07768fd6cf8a3d7ac110b30ad5c5bb4dbef0a9b08e692fd98b1c9b8d116080e8cf30b6bd240ff9e1541fe62837309449b9644540bdc6ec910d717c3c76
-doccontainersize 857040
-doccontainerchecksum ee2c429baa8429b8f1012b1f61a88404dc593d8e1a5a21ffb7063b3667cad24adf270ba0d5938edfcefcd6b2e4423bcb19c65cacb3aa0aaaa805c91ea9e3f3ff
-docfiles size=212
+containersize 10560
+containerchecksum a41236f7283b5ab0b20104dd67b63a760345606f6d23b4d353b43a779e172ea2fb5d77a62c042a769a216110c688ca8607509345d0d94973a9135f177404fcf4
+doccontainersize 1060088
+doccontainerchecksum b196c012bc5f41bb474dd0e06164a554438e2653e527b3b652de3d43289cbd9c67dbaf5f0ab75b9c396a72fc01c6802ecf948abad14a25b762a3046fecc3816e
+docfiles size=265
+ RELOC/doc/latex/njuthesis/LICENSE
RELOC/doc/latex/njuthesis/README.md details="Readme"
RELOC/doc/latex/njuthesis/njuthesis.pdf details="Package documentation" language="zh"
-srccontainersize 31848
-srccontainerchecksum 9a5a398756fce1051dbd3b55a61191a31a5d4bcaf953423da8ba5d7d2aa11a561ea2f6aa1ae833399775ae242de3b3cf182062ec7716a6eb3e3d0af06e646769
-srcfiles size=32
+srccontainersize 40628
+srccontainerchecksum 9e595ec7d866e32be798516a5da737ac6fd7b301c667fc63cec70ff1953308c03b1372110ea79448f72376ceade942f2065bfc6062df0b352062045425f9e8e8
+srcfiles size=42
RELOC/source/latex/njuthesis/njuthesis.dtx
-runfiles size=11
+ RELOC/source/latex/njuthesis/njuthesis.ins
+runfiles size=12
RELOC/tex/latex/njuthesis/njuthesis.cls
catalogue-contact-announce https://github.com/nju-lug/NJUThesis/releases
catalogue-contact-bugs https://github.com/nju-lug/NJUThesis/issues
@@ -217981,7 +218011,7 @@ catalogue-contact-support https://github.com/nju-lug/NJUThesis/wiki
catalogue-ctan /macros/unicodetex/latex/njuthesis
catalogue-license lppl1.3c
catalogue-topics dissertation proposal latex3 chinese
-catalogue-version 0.13.0
+catalogue-version 0.14.0
name njuvisual
category Package
@@ -249182,18 +249212,18 @@ catalogue-version 1.10
name pst-3dplot
category Package
-revision 60619
+revision 61615
shortdesc Draw 3D objects in parallel projection, using PSTricks
relocated 1
longdesc A package using PSTricks to draw a large variety of graphs and
longdesc plots, including 3D maths functions. Data can be read from
longdesc external data files, making this package a generic tool for
longdesc graphing within TeX/LaTeX, without the need for external tools.
-containersize 21852
-containerchecksum f20bc26a1a346b9b1c33238cb25209a9f573cddbf86b8b58ae185e5a2eb33f03fab122b8b1490563f5da3b525a0c5f7b04c6183ffb099543b56aa6fbf3e1c264
-doccontainersize 962220
-doccontainerchecksum 4c4b1f1cffe7b3a2144eee8534352083ce1a91637ecc8de717a3b033fad130e22e135ab2b8881467bdf2706eb76122d858ea9c36f84b81da5613ae44e47f4b7a
-docfiles size=290
+containersize 21856
+containerchecksum bd23d297253501185e817e0b5f8f13705434568d73be8f4e1c8adfcd3b6c55438a72997601b6696af91cb6733d2330ff810a0678e19f79203bc979c49c5cf722
+doccontainersize 2734884
+doccontainerchecksum 544b0fc05fe259d49861e71718e090a45dd0de233e90d2ab248ce2ed427f1113891fc58062126763295651e540fc306f0bf9b4fd516069b205cf063060a03c3a
+docfiles size=769
RELOC/doc/generic/pst-3dplot/Changes
RELOC/doc/generic/pst-3dplot/README details="Readme"
RELOC/doc/generic/pst-3dplot/pst-3dplot-doc.bib
@@ -249207,7 +249237,7 @@ runfiles size=31
catalogue-ctan /graphics/pstricks/contrib/pst-3dplot
catalogue-license lppl
catalogue-topics graphics-3d graphics-plot pstricks
-catalogue-version 2.07
+catalogue-version 2.07a
name pst-abspos
category Package
@@ -298392,7 +298422,7 @@ docfiles size=376
name texlive-scripts
category TLCore
-revision 61603
+revision 61609
shortdesc TeX Live infrastructure programs
longdesc Includes install-tl, tl-portable, rungs, etc.; not needed for
longdesc tlmgr to run but still ours. Not included in tlcritical.
@@ -298400,10 +298430,10 @@ depend texlive-scripts.ARCH
depend texlive.infra
execute addMap mathpple.map
postaction shortcut type=menu name="TeX Live command-line" cmd=TEXDIR/tlpkg/installer/tl-cmd.bat
-containersize 108216
-containerchecksum 315298be2bfcb396b37335f9643ecf47eef10b00d5c911f44b21dd7eb3aa2f10fe9ad2c3de318a85f1c192c314daf6826789a4d3ceee645ca81fcc46d5608d08
-doccontainersize 402536
-doccontainerchecksum 62c55f918ee83f1e728f654cca2707f7c4143d780cfafd856a2dc8b353dd15c371a58ae7a9a9d5ae8e8a78a3704d7f2c95c013011a56a4d3a2479f0d0243be8e
+containersize 108224
+containerchecksum 18527be4b36d73e39420a7f130055cbc8c024b665fd21bb63b5c5c87bc7b0af59bd422c60a8fd0c3bad76278fb4cc416b5fc490513e678492cb9dc7cb4e65c85
+doccontainersize 402676
+doccontainerchecksum 4c26223a008ba6e181479fdbaaefecad9fc672aacf2efee51bfb2e963c3bbc05e7771943a2549aeb0432c3f8becc7238ad95840bea9dea9037392a1c4d7da46b
docfiles size=500
doc.html
texmf-dist/doc/man/man1/fmtutil-sys.1
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
index 88788778d9..c31b423fb2 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
@@ -1 +1 @@
-ee367ee4f8ccd8a5bf980ef54243c77b texlive.tlpdb
+e3fe1db8c53f742b45d75ae0b3b4886d texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
index 87851def24..8154bcfa9b 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
@@ -1 +1 @@
-9b41543f8101b6c7cb8a08c4a1e509e1d8a16d6b5fbf30264baea8fd630527ab1e292bd5bbc4b14fe2f1aad5dbef0201a6d49b4dc490e63bc489997f10eece26 texlive.tlpdb
+e23e209baa642b8442f0f4c2fc8a8ff37ad449eec2564a4bb056b11df592fe0e9c1764efb07d74c84b329ef036ffaa409f5a38c905f79515bd52245dc1987f54 texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
index 12cfb8c4bc..0bb9ef634b 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
@@ -1,10 +1,10 @@
-----BEGIN PGP SIGNATURE-----
-iQEcBAEBCgAGBQJh4hrqAAoJEEzhh34ZQ4xwmx0IAIXeO0kPjzPgpKqXSeIROquW
-ifj45WI9G7eh3vUJKiAuDwIVFrMEYMoT106awxD3p2Iy8sp1IwZJ0vL3EcIB0s4C
-XAyzgFHv9BtQ8mt7VjPxfh9/X2FY5toaL8VgpjPiMYN1a4+7Ml9kEeFWE9hJrv0z
-6fXa/5812lECrbv/n7wfyQw2CiPU1WvjPiWwC1mBt6qSZDOgM+PTWs3a1ZjfHm1u
-qXzA8CDzee1RnH+pS3Jx5VQC8uV8skO+zpU7iocdOGBHakk7jqm6vlaOai1pZvqe
-WomRIE3Kh0eq1/AIoJWZbmcU1jWC8TgDWxVRCh7dBmtVWPqEQqjOz9qgxJqHc2A=
-=A3Rl
+iQEcBAEBCgAGBQJh42xMAAoJEEzhh34ZQ4xwxtgIAIDXH+m2YZT09dnAh+FDsq7X
+eFn1O+jisDuEkjvfz3pG6viJXrsOgoToxJuVWdVxsYCJmTp/ay9roglISggQYOvb
+lHaRqXiP2+vRpHsl3/UIGqiKfEVeuXvkYNEj5ZExxXiWjoaPmcKIbLl3lCmzCB+i
+j679y2qh+qw6cq1IcAqAq2QbbDA5MO+Zv0bcaA/LjPeTY81+aVw14VZHrf3pLyMz
+FRH/7kbOTppegNEmpBe/u5CB40eyavrfdFy83pMQTbkJYYi7EWQKADH2WYbBmIUB
+EKjRgOpU7VvQptIGopL0NZVbd1gzM1238A6xWNaS26T192+qRiCF66LpiKLrvyQ=
+=43+P
-----END PGP SIGNATURE-----
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
index 54a8f83cea..83ba07c935 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
Binary files differ
diff --git a/systems/win32/miktex/tm/packages/next/pr.ini b/systems/win32/miktex/tm/packages/next/pr.ini
index 59057c33fb..df51631fd8 100644
--- a/systems/win32/miktex/tm/packages/next/pr.ini
+++ b/systems/win32/miktex/tm/packages/next/pr.ini
@@ -1,13 +1,13 @@
[repository]
-date=1642281496
+date=1642367907
lastupd=miktex-arctrl-bin-2.9 miktex-arctrl-bin-x64-2.9 miktex-asymptote-bin-2.9 miktex-asymptote-bin-x64-2.9 miktex-autosp-bin-2.9 miktex-autosp-bin-x64-2.9 miktex-axohelp-bin-2.9 miktex-axohelp-bin-x64-2.9 miktex-bibarts-bin-2.9 miktex-bibarts-bin-x64-2.9 miktex-bibtex-bin-2.9 miktex-bibtex-bin-x64-2.9 miktex-bibtex8bit-bin-2.9 miktex-bibtex8bit-bin-x64-2.9 miktex-bzip2-bin-2.9 miktex-bzip2-bin-x64-2.9 miktex-cairo-bin-2.9 miktex-cairo-bin-x64-2.9 miktex-chktex-bin-2.9 miktex-chktex-bin-x64-2.9
-lstdigest=ace333f05eba492f25a588b84f9cf7e5
+lstdigest=dba1075d0d5bebc3d47e271adedb41f9
numpkg=5238
relstate=next
-version=8050
+version=8051
;;;;This configuration file is signed by a MiKTeX maintainer. The signature follows.
;;;;-----BEGIN MIKTEX SIGNATURE-----
-;;;; signature/miktex: MTnpGjqOJg0fanjzVcpd/CO1h8cHpDwTrhM5QrHRJUz6Lr9B6rVHT9Uoe9lPbwYehbov8ldgVMHojZ5orXgpZip/niHk1mACUzacZWLUOIrg/7BT1q6V4f+pDVlv4hC7L56j3sh0MX9VMJ/iLtrsVGlJU/pWX0feYHxwM51MoNV85ZmBzypwxdYK/lfaiISi7tWg9F/ryJTPU+AJKUG7OZYQRkbwx4vVAoyB6gHKPEtxX67aGt9LMsIiYuleWLtWfTm51jgTWBwJHFiA4saphO3xdVoP8cnhRpT0dVa+7hhZFz8c1CF0RVV88YIqeynODcBUdAhq6H8SSIBe0IvoDg==
+;;;; signature/miktex: A4mRDVmpAxrDXnrNXOYpNsHDhMMW2TeEDDrjmdUHN89xsKqNy4yFYLqZl/NdF0/FUf2C7QGOpeTw9qfGm737IJzQvMPnWsFyjmM2lRMKyvQUokjTrgTfHU91k2gN7VhViHALZY/8yuMqf6O/H7YCWO5euB+RnodvBC42LZEDL5X850VXMiEroR8wu0stAW0B1Z4aasOJDtjXMxIQVDCwDTiB3HD3Zj8ZuZOE60HQP1GFUClN/Wg+0ZsXjTF5vNJ1O7w8iiFPP0WxBlNTAuAKsR3PVme1ZtoVo0T5gUNVDSCAa7Kd8uozQEaNMYN090qNJY5t7hXyQGbwH1KzM0edtQ==
;;;;-----END MIKTEX SIGNATURE-----
diff --git a/systems/win32/miktex/tm/packages/pr.ini b/systems/win32/miktex/tm/packages/pr.ini
index 47723122fb..bec95a5ace 100644
--- a/systems/win32/miktex/tm/packages/pr.ini
+++ b/systems/win32/miktex/tm/packages/pr.ini
@@ -1,13 +1,13 @@
[repository]
-date=1642281114
+date=1642367506
lastupd=aalok aalok__doc aalok__source acro acro__doc acro__source biblatex-publist biblatex-publist__doc biblatex-publist__source cellspace cellspace__doc cellspace__source chhaya chhaya__doc chhaya__source codebox__doc codebox__source csvsimple csvsimple__doc dbshow
-lstdigest=bb3dd6926e0237152dd06fddb5c925eb
+lstdigest=956c1ca9b2211ebec5751584a9b10bbe
numpkg=5240
relstate=stable
-version=8050
+version=8051
;;;;This configuration file is signed by a MiKTeX maintainer. The signature follows.
;;;;-----BEGIN MIKTEX SIGNATURE-----
-;;;; signature/miktex: abUfgl7RVFSeOBkvfu+JcUlFTWp/cIzAeqPdWb+PRIa1Tzc2QsD6IAfMmeF8zx1yd5NS2zhmpU4lsLsF5O+wb8Htj2EBPpiNn4Ww0Za1TXPkZNMZ/ykrhIB8HTW2jBw44NBAmC90oEr8gzhqkZ9tEhO5tvVg5l+cgVA0xEb64w/yNChUgHOAh12dTYF+Nv6XVrrboKPuKlL3owsBaOBBaH1KTd5rMrqibV3I+Une0EGVJBW7zY6NkT1y7HN5z9VoJPl0PFVV3fWSNMwnrkPnVHyDST+ncexk+BDfb9lWdsp+XZFGLapaN9W1jvCPdJ+YuqkSHYmbhGrroo+6U45Wbw==
+;;;; signature/miktex: K4VYYXlQi60OD4X9yfkTVhgHNaags/2tcu+gz6o6BoJ8+hbVaVPrH2MmXyVDLW3jCZD6x/iPQleScUBvvSZJdLX/s9KZz9Q0Euo4U5ITBVcU1zcCe9OJmS3StJTeG/GegjMIhdFDJlNsnDjkkkAMtE4IkM4SjY4bs3iqWyXphAIAwcwA/A1oqYbqxoerGqrzuhC1Kw11x19962y+kbq/sr5GcaNQ2Ie7mKNXBEErASJAEwh2jOh6RtJLs4HPJUftb8JZQ0cG/TujV43zRtHBjzVmdhhWoYe6jt5i+K1a19XAonFL5kZSsxa8u/rxLILxFuGLGV/3FpdyLzu1VE77cg==
;;;;-----END MIKTEX SIGNATURE-----
diff --git a/timestamp b/timestamp
index 330e5b4a2b..4351f586ad 100644
--- a/timestamp
+++ b/timestamp
@@ -2,4 +2,4 @@
# The source CTAN of this site's material:
dante.ctan.org
# The year-month-day-hour-minute of this site's material:
-2022-01-16-02-02
+2022-01-17-02-02