summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex56
1 files changed, 52 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex
index 5a347b66e9d..596d36f65a1 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex
@@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-% Copyright 2011-2017 Clemens Niederberger
+% Copyright 2011-2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -456,7 +456,7 @@
}
\EndChemCompatibility
-\ChemCompatibilityFrom{5.8a}
+\ChemCompatibility{5.8a}
\cs_new_protected:Npn \__chemmacros_break_point_insert:nnn #1#2#3
{
\mode_if_math:TF
@@ -473,6 +473,49 @@
}
\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
@@ -528,7 +571,7 @@
{ \tex_kern:D \l__chemmacros_iupac_break_dim }
}
}
-
+
\cs_new_protected:Npn \chemmacros_break_point_opening_paren:
{ \__chemmacros_break_point_insert:nnn { - } { ( } { ( } }
@@ -642,6 +685,11 @@
\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:
@@ -873,7 +921,7 @@
}
% --------------------------------------------------------------------------
-\tex_endinput:D
+\file_input_stop:
2015/10/01 - use new function \chemmacros_if_document:TF for
\chemmacros_make_iupac: