summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-06 22:48:53 +0000
committerKarl Berry <karl@freefriends.org>2014-08-06 22:48:53 +0000
commitff1845c8557690d905ecb126d40c90e611602de5 (patch)
tree52458b70b5f773d242ec97081acd735afc7d4a38
parentac09a432533ee4e0c359eaa4e05d88e739609f59 (diff)
chemmacros (6aug14)
git-svn-id: svn://tug.org/texlive/trunk@34853 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/README4
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdfbin955535 -> 959569 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex124
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdfbin553883 -> 553804 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdfbin906472 -> 910574 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex21
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdfbin789175 -> 789000 bytes
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemformula.sty181
8 files changed, 205 insertions, 125 deletions
diff --git a/Master/texmf-dist/doc/latex/chemmacros/README b/Master/texmf-dist/doc/latex/chemmacros/README
index ccfff0f53f5..73134e9bce9 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/README
+++ b/Master/texmf-dist/doc/latex/chemmacros/README
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------
-the CHEMMACROS bundle 2014/05/30
+the CHEMMACROS bundle 2014/08/06
- chemmacros package v4.5a -> macros and commands for chemists
- - chemformula package v4.6 -> typeset chemical compounds and reactions
+ - chemformula package v4.7 -> typeset chemical compounds and reactions
- ghsystem package v4.5b -> typeset H & P statements and pictograms
from the globally harmonised system (GHS)
- chemgreek package v0.4 -> handle mapping of upright greek letters to
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf
index f286057ff45..e9435b457f2 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
index a00165db17a..885b17f1395 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
@@ -254,6 +254,36 @@
\newidxcmd\manual{\textsf{#1}}[\ (manual)]
+\newidxcmd\arrowtype{\code{#1}}[\ (arrow type)]
+
+\makeatletter
+\newcommand*\cf@arrow{%
+ \@ifstar
+ {\cf@arrow@star}
+ {\cf@arrow@nostar}%
+}
+\newrobustcmd*\cf@arrow@star[1]{%
+ \@ifnextchar[
+ {\cf@arrow@star@opt{#1}}
+ {\cf@arrow@star@opt{#1}[]}%
+}
+\newrobustcmd*\cf@arrow@nostar[1]{%
+ \@ifnextchar[
+ {\cf@arrow@nostar@opt{#1}}
+ {\cf@arrow@nostar@opt{#1}[]}%
+}
+\def\cf@arrow@star@opt#1[#2]{%
+ \ifblank{#2}
+ {\item\arrowtype*{#1}}
+ {\item\arrowtype*{#1}#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+\def\cf@arrow@nostar@opt#1[#2]{%
+ \ifblank{#2}
+ {\item\arrowtype{#1}}
+ {\item\arrowtype{#1}#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
\newenvironment{codedesc}
{%
@@ -262,11 +292,24 @@
}
{\endcnltxlist}
+\newenvironment{arrows}
+ {%
+ \let\arrow\cf@arrow
+ \cnltxlist
+ }
+ {\endcnltxlist}
+\makeatother
+
\renewcommand*\AmS{\hologo{AmS}}
\newcommand*\TikZ{Ti\textit{k}Z}
-\newname\hensel{Martin}{Hensel}
+\newname\hensel{Martin Hensel}
+
+\BeforeBeginEnvironment{example}{\vspace{\baselineskip}}
+\AfterEndEnvironment{example}{\vspace{\baselineskip}}
+\BeforeBeginEnvironment{sourcecode}{\vspace{\baselineskip}}
+\AfterEndEnvironment{sourcecode}{\vspace{\baselineskip}}
\begin{document}
@@ -317,6 +360,29 @@ then \chemmacros\ will not be loaded. The \chemmacros\ package, however,
This is consistent with the behaviour of a \code{+}.
\end{itemize}
+\subsection{Version 4.5}
+\begin{itemize}
+ \item New arrow types \arrowtype{>=<}, \arrowtype{>=<<}, \arrowtype{>>=<}
+ and \arrowtype{<==>}.
+ \item Internal changes to \cs{ch} allow usage of optional arguments of
+ \cs*{\textbackslash} and \cs*{label} in \chemmacros' \env*{reactions}
+ environment.
+\end{itemize}
+
+\subsection{Version 4.6}
+\begin{itemize}
+ \item New options \option{circled} and \option{circletype}. this allows to
+ set the behaviour as described on \chemmacros' manual for a specific usage
+ of \cs{ch}.
+\end{itemize}
+
+\subsection{Version 4.7}
+\begin{itemize}
+ \item Dependency change: \chemformula{} now requires the \TikZ{} library
+ \code{arrows.meta} instead of the library \code{arrows}. This requires
+ \TikZ{} version~3.0.0.
+\end{itemize}
+
\section{Licence and Requirements}
\license
@@ -1040,36 +1106,40 @@ The space that is inserted after a math group can be edited:
\subsection{Arrow types}
Arrows are input in the same intuitive way they are with \pkg{mhchem}.
There are various different types:
-\begin{commands}
- \command{ch}[\Marg{ -> } \ch{->}]
+\begin{arrows}
+ \arrow{->}[ \charrow{->}]
standard right arrow
- \command{ch}[\Marg{ <- } \ch{<-}]
+ \arrow{<-}[ \charrow{<-}]
standard left arrow
- \command{ch}[\Marg{ -/> } \ch{-/>}]
+ \arrow{-/>}[ \charrow{-/>}]
does not react (right)
- \command{ch}[\Marg{ </- } \ch{</-}]
+ \arrow{</-}[ \charrow{</-}]
does not react (left)
- \command{ch}[\Marg{ <-> } \ch{<->}]
+ \arrow{<->}[ \charrow{<->}]
resonance arrow
- \command{ch}[\Marg{ <> } \ch{<>}]
+ \arrow{<>}[ \charrow{<>}]
reaction in both directions
- \command{ch}[\Marg{ == } \ch{==}]
+ \arrow{==}[ \charrow{==}]
stoichiometric equation
- \command{ch}[\Marg{ <=> } \ch{<=>}]
+ \arrow{<=>}[ \charrow{<=>}]
equilibrium arrow
- \command{ch}[\Marg{ >=< } \ch{>=<}]
+ \arrow{>=<}[ \charrow{>=<}]
reversed equilibrium arrow
- \command{ch}[\Marg{ <=>> } \ch{<=>>}]
+ \arrow{<=>>}[ \charrow{<=>>}]
unbalanced equilibrium arrow to the right
- \command{ch}[\Marg{ >=<< } \ch{>=<<}]
+ \arrow{>=<<}[ \charrow{>=<<}]
reversed unbalanced equilibrium arrow to the right
- \command{ch}[\Marg{ <<=> } \ch{<<=>}]
+ \arrow{<<=>}[ \charrow{<<=>}]
unbalanced equilibrium arrow to the left
- \command{ch}[\Marg{ >>=< } \ch{>>=<}]
+ \arrow{>>=<}[ \charrow{>>=<}]
reversed unbalanced equilibrium arrow to the left
- \command{ch}[\Marg{ <o> } \ch{<o>}]
+ \arrow{<o>}[ \charrow{<o>}]
isolobal arrow
-\end{commands}
+ \arrow{<==>}[ \charrow{<==>}]
+ I've seen this one used. I'm not sure it actually has a meaning in
+ chemical equations. If you have some official reference for this arrow
+ type please feel free to contact me.
+\end{arrows}
All these arrows are drawn with \TikZ.
\begin{example}
\ch{H2 + Cl2 -> 2 HCl} \par
@@ -1083,10 +1153,10 @@ All these arrows are drawn with \TikZ.
\subsection{Labels}
The arrows take two optional arguments to label them.
-\begin{commands}
- \command{ch}[\Marg{ ->[\meta{above}][\meta{below}] }]
+\begin{arrows}
+ \arrow*{->\oarg{above}\oarg{below}}
Add text above or under an arrow.
-\end{commands}
+\end{arrows}
\begin{example}[side-by-side]
\ch{A ->[a] B} \par
\ch{A ->[a][b] B} \par
@@ -1163,6 +1233,20 @@ arrow:
smaller labels: \ch[label-style=\tiny]{A <=>[x][y] B}
\end{example}
+If you want to have different arrow tips\sinceversion{4.7} there is an easy
+way to use existing arrow tips (as defined by \TikZ). \chemformula{} uses
+three different arrow tips: \code{cf}, \code{left cf} and \code{right cf}. If
+you want them to match those of \pkg{chemfig}~\cite{pkg:chemfig} for example
+you could do:
+\begin{sourcecode}
+ \pgfkeys{
+ cf /.tip = {CF@full} ,
+ left cf /.tip = {CF@half}
+ }
+\end{sourcecode}
+\pkg{chemfig} has no equivalent of \code{right cf}. This mechanism relies on
+\TikZ{} version~3.0.0 and the new \code{arrows.meta} library.
+
\subsection{Modify Arrow Types}\label{sec:arrows_modify}
The arrows are defined with the commands
\begin{commands}
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf
index d426bc38a8e..1c8a1de5a87 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf
index e0c00723c65..e4691b39d10 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex
index 0c49bb435cd..38972df6b74 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex
@@ -263,28 +263,21 @@
\newpackagename\ghsystem{ghsystem}
\newpackagename\chemgreek{chemgreek}
-
-\newidxcmd\manual{\textsf{#1}}[\ (manual)]
-
-\newenvironment{codedesc}
- {%
- \def\Code##1{\item\code{##1}\hfill\newline}%
- \cnltxlist
- }
- {\endcnltxlist}
-
\renewcommand*\AmS{\hologo{AmS}}
-
\newcommand*\TikZ{Ti\textit{k}Z}
-
\newcommand*\tablehead[1]{\textrm{\bfseries#1}}
\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ørn}{Pedersen}
+\newname\hensel{Martin Hensel}
+\newname\pedersen{Bj\o rn Pedersen}
+
+\BeforeBeginEnvironment{example}{\vspace{\baselineskip}}
+\AfterEndEnvironment{example}{\vspace{\baselineskip}}
+\BeforeBeginEnvironment{sourcecode}{\vspace{\baselineskip}}
+\AfterEndEnvironment{sourcecode}{\vspace{\baselineskip}}
\begin{document}
diff --git a/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf
index 695c1e0242d..ff52b0d07f1 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
index e9c80e2027f..08fc18604f9 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
@@ -26,9 +26,9 @@
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
\RequirePackage{ expl3 , xparse , l3keys2e , tikz , amsmath , xfrac , nicefrac , scrlfile }
-\usetikzlibrary{arrows}
-\def\chemformula@version{4.6}
-\def\chemformula@date{2014/06/30}
+\usetikzlibrary{arrows.meta}
+\def\chemformula@version{4.7}
+\def\chemformula@date{2014/08/04}
\ProvidesExplPackage
{chemformula}
@@ -700,96 +700,95 @@
% arrow heads:
% full tip for pairs
-\pgfarrowsdeclare { cf } { cf }
-{
- \dim_set:Nn \l__chemformula_arrow_head_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemformula_arrow_head_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
-}
-{
- \dim_set:Nn \l__chemformula_arrow_head_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
- \pgfpathlineto
- {
- \pgfpoint
- { -\l__chemformula_arrow_head_dim }
- { .3\l__chemformula_arrow_head_dim }
- }
- \pgfpathlineto
- { \pgfpoint { -.5\l__chemformula_arrow_head_dim } { 0pt } }
- \pgfpathlineto
- {
- \pgfpoint
- { -\l__chemformula_arrow_head_dim }
- { -.3\l__chemformula_arrow_head_dim }
- }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
- \pgfusepathqfillstroke
-}
+\pgfarrowsdeclare { cf~internal } { cf~internal }
+ {
+ \dim_set:Nn \l__chemformula_arrow_head_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfarrowsleftextend { -\l__chemformula_arrow_head_dim }
+ \pgfarrowsrightextend { .5\pgflinewidth }
+ }
+ {
+ \dim_set:Nn \l__chemformula_arrow_head_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfsetdash {} { 0pt }
+ \pgfsetroundjoin
+ \pgfsetroundcap
+ \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathlineto
+ {
+ \pgfpoint
+ { -\l__chemformula_arrow_head_dim }
+ { .3\l__chemformula_arrow_head_dim }
+ }
+ \pgfpathlineto
+ { \pgfpoint { -.5\l__chemformula_arrow_head_dim } { 0pt } }
+ \pgfpathlineto
+ {
+ \pgfpoint
+ { -\l__chemformula_arrow_head_dim }
+ { -.3\l__chemformula_arrow_head_dim }
+ }
+ \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfusepathqfillstroke
+ }
% half tip on the left
-\pgfarrowsdeclare { left~cf } { left~cf }
-{
- \dim_set:Nn \l__chemformula_arrow_head_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemformula_arrow_head_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
-}
-{
- \dim_set:Nn \l__chemformula_arrow_head_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
- \pgfpathlineto
- {
- \pgfpoint
- { -\l__chemformula_arrow_head_dim }
- { .3\l__chemformula_arrow_head_dim }
- }
- \pgfpathlineto { \pgfpoint { -.5\l__chemformula_arrow_head_dim } { 0pt } }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
- \pgfusepathqfillstroke
-}
+\pgfarrowsdeclare { left~cf~internal } { left~cf~internal }
+ {
+ \dim_set:Nn \l__chemformula_arrow_head_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfarrowsleftextend { -\l__chemformula_arrow_head_dim }
+ \pgfarrowsrightextend { .5\pgflinewidth }
+ }
+ {
+ \dim_set:Nn \l__chemformula_arrow_head_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfsetdash {} { 0pt }
+ \pgfsetroundjoin
+ \pgfsetroundcap
+ \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathlineto
+ {
+ \pgfpoint
+ { -\l__chemformula_arrow_head_dim }
+ { .3\l__chemformula_arrow_head_dim }
+ }
+ \pgfpathlineto { \pgfpoint { -.5\l__chemformula_arrow_head_dim } { 0pt } }
+ \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfusepathqfillstroke
+ }
% half tip in the right
-\pgfarrowsdeclare { right~cf } { right~cf }
-{
- \dim_set:Nn \l__chemformula_arrow_head_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfarrowsleftextend { -\l__chemformula_arrow_head_dim }
- \pgfarrowsrightextend { .5\pgflinewidth }
-}
-{
- \dim_set:Nn \l__chemformula_arrow_head_dim
- { 2.5pt + 2.5\pgflinewidth }
- \pgfsetdash {} { 0pt }
- \pgfsetroundjoin
- \pgfsetroundcap
- \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
- \pgfpathlineto
- {
- \pgfpoint
- { -\l__chemformula_arrow_head_dim }
- { -.3\l__chemformula_arrow_head_dim }
- }
- \pgfpathlineto { \pgfpoint { -.5\l__chemformula_arrow_head_dim } { 0pt } }
- \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
- \pgfusepathqfillstroke
-}
+\pgfarrowsdeclare { right~cf~internal } { right~cf~internal }
+ {
+ \dim_set:Nn \l__chemformula_arrow_head_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfarrowsleftextend { -\l__chemformula_arrow_head_dim }
+ \pgfarrowsrightextend { .5\pgflinewidth }
+ }
+ {
+ \dim_set:Nn \l__chemformula_arrow_head_dim
+ { 2.5pt + 2.5\pgflinewidth }
+ \pgfsetdash {} { 0pt }
+ \pgfsetroundjoin
+ \pgfsetroundcap
+ \pgfpathmoveto { \pgfpoint { 0pt } { 0pt } }
+ \pgfpathlineto
+ {
+ \pgfpoint
+ { -\l__chemformula_arrow_head_dim }
+ { -.3\l__chemformula_arrow_head_dim }
+ }
+ \pgfpathlineto { \pgfpoint { -.5\l__chemformula_arrow_head_dim } { 0pt } }
+ \pgfpathlineto { \pgfpoint { 0pt } { 0pt } }
+ \pgfusepathqfillstroke
+ }
-% a possibility to overwrite the arrow tips -- undocumented:
-\providecommand*\pgfarrowsrenewalias[4]{%
- \let\savedef\pgf@arrows@check@already
- \def\pgf@arrows@check@already##1##2##3{##3}%
- \pgfarrowsdeclarealias{#1}{#2}{#3}{#4}%
- \let\pgf@arrows@check@already\savedef}
+\pgfkeys{
+ cf~ /.tip = {cf~internal} ,
+ left~cf~ /.tip = {left~cf~internal} ,
+ right~cf~ /.tip = {right~cf~internal}
+}
% --------------------------------------------------------------------------
% determine length in dependency of labels
@@ -1024,7 +1023,7 @@
}
\NewChemArrow { <==> }
{
- \draw[chemarrow,double~ equal~ sign~ distance,double,implies-implies]
+ \draw[chemarrow,double~ equal~ sign~ distance,double,Implies-Implies]
(cf_arrow_start) -- (cf_arrow_end) ;
% \node at ([yshift=-.2ex]cf_arrow_mid) { $\Leftrightarrow$ } ;
}
@@ -3099,6 +3098,10 @@ VERSION HISTORY
`chemmacros/circled'
- new option `chemformula/circletype' similar to
`chemmacros/circletype'
+2014/08/04 - version 4.7 - change dependency: pgf library `arrows.meta'
+ instead of `arrows'
+ - new arrow tip definition allows redeclaration to
+ other existing tips by \pgfkeys{cf/.tip=<tip>}
% --------------------------------------------------------------------------
% TODO