summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-22 21:14:36 +0000
committerKarl Berry <karl@freefriends.org>2015-10-22 21:14:36 +0000
commit0db4765793f15c3fca3961c57a53cc2caeb2827b (patch)
tree3de2ee7067b03bd667fef6e3511d928a52c32db2 /Master
parent02510816e82dd0efbec1c2536096e1a8795271a6 (diff)
chemformula (22oct15)
git-svn-id: svn://tug.org/texlive/trunk@38690 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/chemformula/README2
-rw-r--r--Master/texmf-dist/doc/latex/chemformula/chemformula_en.pdfbin952959 -> 952570 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemformula/chemformula_en.tex30
-rw-r--r--Master/texmf-dist/tex/latex/chemformula/chemformula.sty63
4 files changed, 67 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/latex/chemformula/README b/Master/texmf-dist/doc/latex/chemformula/README
index 0ccf0d45a12..d1194860535 100644
--- a/Master/texmf-dist/doc/latex/chemformula/README
+++ b/Master/texmf-dist/doc/latex/chemformula/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the CHEMFORMULA package v4.13 2015/10/01
+the CHEMFORMULA package v4.14 2015/10/21
typeset chemical compounds and reactions
diff --git a/Master/texmf-dist/doc/latex/chemformula/chemformula_en.pdf b/Master/texmf-dist/doc/latex/chemformula/chemformula_en.pdf
index 3a8af55ee54..201410af9c9 100644
--- a/Master/texmf-dist/doc/latex/chemformula/chemformula_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemformula/chemformula_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemformula/chemformula_en.tex b/Master/texmf-dist/doc/latex/chemformula/chemformula_en.tex
index c4a6dd9d092..b4fa290c159 100644
--- a/Master/texmf-dist/doc/latex/chemformula/chemformula_en.tex
+++ b/Master/texmf-dist/doc/latex/chemformula/chemformula_en.tex
@@ -33,8 +33,7 @@
\documentclass[load-preamble+]{cnltx-doc}
\usepackage[utf8]{inputenc}
\usepackage{chemformula}
-\usepackage[greek=newtx]{chemmacros}
-\usechemmodule{redox,reactions,units}
+\usepackage{chemmacros}
\setcnltx{
package = {chemformula},
info = {typeset chemical compounds and reactions} ,
@@ -80,6 +79,13 @@
\usepackage[libertine]{newtxmath}
\expandafter\def\csname libertine@figurestyle\endcsname{OsF}
+\chemsetup{
+ greek = newtx ,
+ modules = {redox,reactions,units} ,
+ formula = chemformula ,
+ chemformula/format = \libertineLF
+}
+
\usepackage[biblatex]{embrac}
\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
@@ -97,7 +103,7 @@
}
% \chemsetup{ option/synchronize }
-\setchemformula{ format = \libertineLF }
+% \setchemformula{ format = \libertineLF }
\sisetup{
detect-mode=false,
@@ -720,6 +726,9 @@ These options allow you to customize the ouptut of the compounds:
\chemformula's mechanism this is effectively an alias.
\keyval{adduct-space}{dim}\Default{.1333em}
Space to the left and the right of the adduct point.
+ \keyval{adduct-penalty}{num}\Default{300}
+ The\sinceversion{4.14} penalty inserted after the adduct point for
+ (dis-)allowing line breaks.
\keyval{bond-length}{dim}\Default{.5833em}
The length of the bonds.
\keyval{bond-offset}{dim}\Default{.07em}
@@ -1720,7 +1729,7 @@ then \chemmacros\ will not be loaded. The \chemmacros\ package, however,
\subsection{Version 4.10}
\begin{itemize}
- \item new macros \cs{NewChemCompoundProperty},
+ \item New macros \cs{NewChemCompoundProperty},
\cs{RenewChemCompoundProperty}, \\
\cs{DeclareChemCompoundProperty} and \cs{RemoveChemCompoundProperty}. See
section~\ref{sec:extend-comp-prop} for a description.
@@ -1739,4 +1748,17 @@ then \chemmacros\ will not be loaded. The \chemmacros\ package, however,
\pkg{amsmath} but only \pkg{amstext}.
\end{itemize}
+\subsection{Version 4.13}
+\begin{itemize}
+ \item Check for blank input parts and don't process them.g
+ \item Drop support for \cs*{[} and \cs*{]} as replacement for \code{[} and
+ \code{]} insode arrow captions.
+ \item New option \option{atom-format}.
+\end{itemize}
+
+\subsection{Version 4.14}
+\begin{itemize}
+ \item New option \option{adduct-penalty}.
+\end{itemize}
+
\end{document}
diff --git a/Master/texmf-dist/tex/latex/chemformula/chemformula.sty b/Master/texmf-dist/tex/latex/chemformula/chemformula.sty
index 8507914cd2c..cea54bf7107 100644
--- a/Master/texmf-dist/tex/latex/chemformula/chemformula.sty
+++ b/Master/texmf-dist/tex/latex/chemformula/chemformula.sty
@@ -31,7 +31,7 @@
\ExplSyntaxOn
\tl_const:Nn \c_chemformula_date_tl {2015/10/01}
-\tl_const:Nn \c_chemformula_version_number_tl {4.13}
+\tl_const:Nn \c_chemformula_version_number_tl {4.14}
\tl_const:Nn \c_chemformula_version_suffix_tl {}
\tl_const:Nx \c_chemformula_version_tl
{ \c_chemformula_version_number_tl \c_chemformula_version_suffix_tl }
@@ -329,6 +329,8 @@
\tl_new:N \l__chemformula_kroegervink_positive_style_tl
\tl_new:N \l__chemformula_kroegervink_neutral_tl
\tl_set:Nn \l__chemformula_kroegervink_neutral_tl { $\times$ }
+\tl_new:N \l__chemformula_adduct_penalty_tl
+\tl_set:Nn \l__chemformula_adduct_penalty_tl { 300 }
% property lists:
\prop_new:N \l__chemformula_arrows_code_prop
@@ -386,13 +388,20 @@
}
\cs_generate_variant:Nn \chemformula_skip_nobreak:N {c}
+\cs_new_protected:Npn \chemformula_skip_nobreak:n #1
+ {
+ \chemformula_nobreak:
+ \skip_horizontal:n {#1}
+ \chemformula_nobreak:
+ }
+
\cs_new_protected:Npn \chemformula_skip_nobreak_penalty:Nn #1#2
{
\chemformula_nobreak:
\skip_horizontal:N #1
\tex_penalty:D #2 \scan_stop:
}
-\cs_generate_variant:Nn \chemformula_skip_nobreak_penalty:Nn {c}
+\cs_generate_variant:Nn \chemformula_skip_nobreak_penalty:Nn {c,NV}
\cs_new_protected:Npn \chemformula_dim_to_width:Nn #1#2
{
@@ -550,7 +559,7 @@
circle (\l__chemformula_radical_radius_dim) ;
}
}
- \skip_horizontal:N \l__chemformula_radical_space_dim
+ \chemformula_skip_nobreak:N \l__chemformula_radical_space_dim
}
\keys_define:nn {chemformula}
@@ -567,9 +576,11 @@
\cs_new_protected:Npn \chemformula_adduct:
{
- \skip_horizontal:N \l__chemformula_adduct_space_dim
+ \chemformula_skip_nobreak:N \l__chemformula_adduct_space_dim
\textperiodcentered
- \skip_horizontal:N \l__chemformula_adduct_space_dim
+ \chemformula_skip_nobreak_penalty:NV
+ \l__chemformula_adduct_space_dim
+ \l__chemformula_adduct_penalty_tl
}
\cs_new_eq:NN \chemformula_star_adduct: \chemformula_adduct:
@@ -604,7 +615,7 @@
circle (\l__chemformula_kroegervink_positive_radius_dim) ;
}
}
- \skip_horizontal:N \l__chemformula_kroegervink_positive_space_dim
+ \chemformula_skip_nobreak:N \l__chemformula_kroegervink_positive_space_dim
}
\cs_new_protected:Npn \chemformula_prime:
@@ -854,9 +865,9 @@
;
\tl_use:N \l__chemformula_tmpc_tl
}
- \chemformula_skip_nobreak_penalty:Nn
+ \chemformula_skip_nobreak_penalty:NV
\c_zero_skip
- { \l__chemformula_arrow_penalty_tl }
+ \l__chemformula_arrow_penalty_tl
}
\cs_generate_variant:Nn \__chemformula_arrow_draw:n { V }
@@ -1431,9 +1442,9 @@
{ \__chemformula_bond_draw:n {#1} }
}
\group_end:
- \chemformula_skip_nobreak_penalty:Nn
+ \chemformula_skip_nobreak_penalty:NV
\l__chemformula_bond_space_dim
- { \l__chemformula_bond_penalty_tl }
+ \l__chemformula_bond_penalty_tl
}
\cs_new_protected:Npn \__chemformula_bond_draw:n #1
@@ -1669,6 +1680,7 @@
\cs_new_protected:Npn \__chemformula_subscript_write:n #1
{
+ \chemformula_nobreak:
\group_begin:
\tl_set_eq:NN \chemformula_subscript:n \use:n
\tl_set_eq:NN \chemformula_superscript:n \use:n
@@ -1791,6 +1803,7 @@
\cs_new_protected:Npn \__chemformula_superscript_write:n #1
{
+ \chemformula_nobreak:
\group_begin:
\tl_set_eq:NN \chemformula_subscript:n \use:n
\tl_set_eq:NN \chemformula_superscript:n \use:n
@@ -1852,8 +1865,8 @@
\dim_compare:nT
{ \l__chemformula_subscript_dim < \l__chemformula_superscript_dim }
{
- \skip_horizontal:n { -\l__chemformula_subscript_dim }
- \skip_horizontal:N \l__chemformula_superscript_dim
+ \chemformula_skip_nobreak:n { -\l__chemformula_subscript_dim }
+ \chemformula_skip_nobreak:N \l__chemformula_superscript_dim
}
}
}
@@ -1864,8 +1877,8 @@
\tl_if_blank:VF \l__chemformula_subscript_tl
{
\bool_if:NTF \l__chemformula_charge_full_shift_bool
- { \skip_horizontal:n { -\l__chemformula_subscript_dim } }
- { \skip_horizontal:N \l__chemformula_charge_shift_dim }
+ { \chemformula_skip_nobreak:n { -\l__chemformula_subscript_dim } }
+ { \chemformula_skip_nobreak:N \l__chemformula_charge_shift_dim }
}
}
}
@@ -1877,15 +1890,15 @@
\tl_if_blank:VF \l__chemformula_subscript_tl
{
\bool_if:NTF \l__chemformula_is_isotope_bool
- { \skip_horizontal:N \l__chemformula_subscript_dim }
+ { \chemformula_skip_nobreak:N \l__chemformula_subscript_dim }
{
- \skip_horizontal:N \l__chemformula_superscript_dim
- \bool_if:NTF \l__chemformula_charge_full_shift_bool
- { \skip_horizontal:N \l__chemformula_subscript_dim }
- {
- \skip_horizontal:n
- { -\l__chemformula_charge_shift_dim }
- }
+ \chemformula_skip_nobreak:N \l__chemformula_superscript_dim
+ \bool_if:NTF \l__chemformula_charge_full_shift_bool
+ { \chemformula_skip_nobreak:N \l__chemformula_subscript_dim }
+ {
+ \chemformula_skip_nobreak:n
+ { -\l__chemformula_charge_shift_dim }
+ }
}
}
}
@@ -1916,7 +1929,7 @@
}
}
\dim_compare:nT { \l__chemformula_tmpa_dim > 0pt }
- { \skip_horizontal:N \l__chemformula_tmpa_dim }
+ { \chemformula_skip_nobreak:N \l__chemformula_tmpa_dim }
}
\group_end:
% clean up
@@ -2810,6 +2823,7 @@
stoich-print .code:n =
\cs_set_eq:NN \chemformula_print_stoich:n #1 ,
adduct-space .dim_set:N = \l__chemformula_adduct_space_dim ,
+ adduct-penalty .tl_set:N = \l__chemformula_adduct_penalty_tl ,
math-space .skip_set:N = \l__chemformula_math_space_skip ,
name-format .tl_set:N = \l__chemformula_name_format_tl ,
name-width .code:n =
@@ -3293,6 +3307,9 @@ VERSION HISTORY
- check for blank input
- drop support for \[ and \]
- new option `atom-format'
+2015/10/21 - version 4.14 - fix issue
+ https://github.com/cgnieder/chemformula/issues/2
+ - new option `adduct-penalty'
% --------------------------------------------------------------------------
% TODO