diff options
author | Karl Berry <karl@freefriends.org> | 2019-09-24 20:06:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-09-24 20:06:30 +0000 |
commit | a358a912e6de92699377ad892a224635a09168a7 (patch) | |
tree | ffd950f7cf5edf92b0cf06df3cb7d5022e3e67c4 /Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex | |
parent | 3ddd5190ff063a3d083976499bde2a1964c190c9 (diff) |
chemmacros (24sep19)
git-svn-id: svn://tug.org/texlive/trunk@52172 c570f23f-e606-0410-a88d-b1316a301751
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.tex | 56 |
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: |