summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-08-24 22:39:08 +0000
committerKarl Berry <karl@freefriends.org>2013-08-24 22:39:08 +0000
commitc85fa36270547458332b4c790354729c2f3f3c9a (patch)
treecf1202280b0358de3a3b820b5782f1f4f7197511 /Master
parent8f202738ce363c80b55b8a2a9496340292a4b200 (diff)
chemmacros (24aug13)
git-svn-id: svn://tug.org/texlive/trunk@31513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/README16
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdfbin288581 -> 294026 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex95
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdfbin87351 -> 96884 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex73
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdfbin338120 -> 344609 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex111
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdfbin365205 -> 365289 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.tex43
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemformula.sty173
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemgreek.sty151
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty84
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/language/ghsystem_english.def2
13 files changed, 457 insertions, 291 deletions
diff --git a/Master/texmf-dist/doc/latex/chemmacros/README b/Master/texmf-dist/doc/latex/chemmacros/README
index 4e707a06fc2..ccd9d3eb0c7 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/README
+++ b/Master/texmf-dist/doc/latex/chemmacros/README
@@ -1,12 +1,12 @@
--------------------------------------------------------------------------
the CHEMMACROS bundle
--> chemmacros package v4.0 -> macros and commands for chemists
--> chemformula package v4.0 -> typeset chemical compounds and reactions
+-> chemmacros package v4.1 -> macros and commands for chemists
+-> chemformula package v4.1 -> typeset chemical compounds and reactions
-> ghsystem package v4.0 -> typeset H & P statements and pictograms
from the globally harmonised system (GHS)
--> chemgreek package v0.1a -> handle mapping of upright greek letters to
+-> chemgreek package v0.2 -> handle mapping of upright greek letters to
the \chemalpha ... commands
-2013/07/06
+2013/08/24
--------------------------------------------------------------------------
This bundle succeeds the chemmacros package which is now part of the
bundle
@@ -29,14 +29,6 @@ This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Clemens Niederberger.
--------------------------------------------------------------------------
-INSTALLATION NOTES:
-Please make sure you have the directories
- language/
- pictures/
-and the regarding files in it (*.def or *.eps,*.jpg,*png, or *.pdf respectively)
-in the _same_ directory as the style files.
-(probably something like $TEXMF/texmf/tex/latex/chemmacros/)
---------------------------------------------------------------------------
The chemmacros bundle consists of the following files
package files:
- chemmacros.sty,
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.pdf
index d998e09c4b7..2dc25020cab 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 fe4a075664b..2d7864629a1 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
@@ -22,12 +22,18 @@
\usepackage{chemfig,booktabs,cancel}
\usepackage[version=3]{mhchem}
+
\usepackage{fontspec}
\usepackage[oldstyle,proportional]{libertine}
+\expandafter\def\csname libertine@figurestyle\endcsname{LF}
\usepackage[libertine]{newtxmath}
+\expandafter\def\csname libertine@figurestyle\endcsname{OsF}
+
\usepackage{libertinehologopatch}
\setmonofont[Scale=MatchLowercase]{Bitstream Vera Sans Mono}
+% \usepackage{selnolig}
+
\cnpkgusecolorscheme{friendly}
\renewcommand*\othersectionlevelsformat[3]{%
\textcolor{main}{#3\autodot}\enskip}
@@ -209,7 +215,7 @@
\redox(r1,r2)[blue,pencil,-cf][-1]{\small\ch[font-spec={[Color=blue]Augie},math-space=.3em]{$+$ 2 e-}}}
\addcmds{
- a, abinitio, AddRxnDesc, anti, aq, aqi,
+ a, abinitio, addplot, AddRxnDesc, anti, aq, aqi,
b, ba, bond, bottomrule, bridge,
cancel, cd, cdot, ce, cee, celsius, centering, chemabove, Chemalpha,
Chembeta, Chemgamma, Chemdelta, ChemDelta, chemfig, chemname, Chemomega,
@@ -285,48 +291,7 @@
\renewcommand*\AmS{\hologo{AmS}}
-\newcommand*\Default[1]{%
- \hfill\llap{%
- \ifblank{#1}
- {(initially~empty)}
- {Default:~\code{#1}}%
- }\newline
-}
-\usepackage{marginnote,ragged2e}
-\makeatletter
-\providecommand*\sinceversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Introduced in version~#1}}%
- \@esphack}
-\providecommand*\changedversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Changed in version~#1}}%
- \@esphack}
-
-\RenewDocumentCommand\CTANurl{O{macros/latex/contrib}m}
- {%
- on CTAN: %
- \hyper@linkurl{#2}{http://mirrors.ctan.org/#1/#2/}%
- }
-\ExplSyntaxOn
-\RenewDocumentCommand \paket { sO{macros/latex/contrib}m }
- {
- \paketfont { #3 }
- \index { #3 @ \paketfont { #3 } }
- \prop_if_in:NnF \g_cnpkgdoc_pakete_prop { #3 }
- {
- \prop_gput:Nnn \g_cnpkgdoc_pakete_prop { #3 } {}
- \IfBooleanF { #1 }
- { \footnote { \CTANurl[]{#3} } }
- }
- }
-\ExplSyntaxOff
-\makeatother
\begin{document}
@@ -491,6 +456,10 @@ There are a few possibilities to customize the output.
The symbol to indicate the decimal.
\Option{frac-style}{math|xfrac|nicefrac}\Default{math}
Determines how fractions are displayed.
+ \Option{frac-math-cmd}{<command sequence>}\Default{\cmd*{frac}}
+ \sinceversion{4.1}Allows you to choose which command is used with
+ \key{frac-style}{math}. This needs to be a command sequence that takes two
+ arguments that are set in math mode.
\Option{stoich-space}{<skip>}\Default{.1667em plus .0333em minus .0117em}
The space that is placed after the stoichiometric factor. A rubber
length.
@@ -781,6 +750,9 @@ These options allow you to customize the ouptut of the compounds:
Space between bond and atoms.
\Option{bond-style}{<tikz>}\Default{}
\TikZ\ options for the bonds.
+ \Option{bond-penalty}{<num>}\Default{10000}
+ \sinceversion{4.0a}The penalty that is inserted after a bond for
+ (dis-)allowing line breaks.
\Option{radical-style}{<tikz>}\Default{}
\TikZ\ options for the radical point.
\Option{radical-radius}{<dim>}\Default{.2ex}
@@ -900,6 +872,9 @@ The space left and right of the plus sign can be set with this option:
\begin{beschreibung}
\Option{plus-space}{<skip>}\Default{.3em plus .1em minus .1em}
A rubber length.
+ \Option{plus-penalty}{<num>}\Default{700}
+ \sinceversion{4.0a}The penalty that is inserted after the plus sign for
+ (dis-)allowing line breaks.
\end{beschreibung}
\begin{beispiel}
\ch{A + B}\\
@@ -990,7 +965,7 @@ There are various different types:
standard left arrow
\Befehl{ch}{ -/> } \ch{-/>}\newline
does not react (right)
- \Befehl{ch}{ </- } \ch{}</-\newline
+ \Befehl{ch}{ </- } \ch{</-}\newline
does not react (left)
\Befehl{ch}{ <-> } \ch{<->}\newline
resonance arrow
@@ -1067,7 +1042,8 @@ These are the options which enable you to customize the arrows:
This is the length that an arrow protrudes a label on both sides. This
means an empty arrow's length is two times \code{arrow-offset}.
\Option{arrow-min-length}{<dim>}\Default{0pt}
- The minimal length an error must have unless two times \key{arrow-offset}
+ \sinceversion{3.6b}The minimal length an error must have unless two times
+ \key{arrow-offset}
plus the width of the label is larger.
\Option{arrow-yshift}{<dim>}\Default{0pt}
Shifts an arrow up (positive value) or down (negative value).
@@ -1081,6 +1057,9 @@ These are the options which enable you to customize the arrows:
The space between the labels and the arrows.
\Option{label-style}{<font command>}\Default{\cmd*{footnotesize}}
The relative font size of the labels.
+ \Option{arrow-penalty}{<num>}\Default{0}
+ \sinceversion{4.0a}The penalty that is inserted after an arrow for
+ (dis-)allowing line breaks.
\end{beschreibung}
The following code shows the effect of the different options on the \lstinline+<=>>+
@@ -1300,6 +1279,34 @@ the optional arguments of \lstinline+\\+ inside \cmd{ch}.
\end{beispiel}
\secidx*{Math Environments}
+\section{Usage with \TikZ{} or \paket*{pgfplots} and externalization}
+\sinceversion{4.1}
+\noindent
+Since \chemformula{} uses \TikZ{} to draw reaction arrows and bonds they would
+be externalized, too, if you use that facility with \TikZ{} or
+\paket{pgfplots}\footnote{\CTANurl{pgfplots}}. This may not be desirable
+since they are very small pictures maybe containing of a single line. This is
+why \chemformula's default behaviour is to disable externalization for it's
+bonds and arrows. This can be turned on and off through the following option:
+\begin{beschreibung}
+ \Option{tikz-external-disable}{\default{true}|false}\Default{true}
+ dis- or enable \TikZ' externalization mechanism for \chemformula's arrows
+ and bonds.
+\end{beschreibung}
+
+If you should be using a formula that contains bonds or arrows inside of a
+\code{tikzpicture} that is externalized you should locally enable it for
+\chemformula, too:
+
+\begin{beispiel}[code only]
+ \begin{tikzpicture}
+ \setchemformula{tikz-external-disable=false}
+ \begin{axis}[xlabel={\ch{2 H+ + 2 e- -> H2}}]
+ \addplot ... ;
+ \end{axis}
+ \end{tikzpicture}
+\end{beispiel}
+
\section{Further Examples}
This section presents some examples of a possible usage.
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.pdf
index c049a7d9937..9aa4a941e6e 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/chemgreek_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex
index fd4470c097a..6132029a8f1 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemgreek_en.tex
@@ -4,7 +4,7 @@
% !arara: xelatex
\documentclass[DIV11,toc=index,toc=bib]{cnpkgdoc}
\docsetup{
- pkg = {[greek=math]chemmacros},
+ pkg = {[greek=newtx]chemmacros},
language = en,
title = the \Chemmacros\ bundle,
subtitle = {
@@ -17,6 +17,8 @@
code-box = {skipabove=1ex,skipbelow=1ex},
label = {},
name = chemgreek,
+ version = \csname chemgreek@version\endcsname ,
+ date = \csname chemgreek@date\endcsname ,
url = https://bitbucket.org/cgnieder/chemmacros/
}
@@ -290,49 +292,6 @@
\renewcommand*\AmS{\hologo{AmS}}
-\newcommand*\Default[1]{%
- \hfill\llap{%
- \ifblank{#1}
- {(initially~empty)}
- {Default:~\code{#1}}%
- }\newline
-}
-
-\usepackage{marginnote,ragged2e}
-\makeatletter
-\providecommand*\sinceversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Introduced in version~#1}}%
- \@esphack}
-\providecommand*\changedversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Changed in version~#1}}%
- \@esphack}
-
-\RenewDocumentCommand\CTANurl{O{macros/latex/contrib}m}
- {%
- on CTAN: %
- \hyper@linkurl{#2}{http://mirrors.ctan.org/#1/#2/}%
- }
-\ExplSyntaxOn
-\RenewDocumentCommand \paket { sO{macros/latex/contrib}m }
- {
- \paketfont { #3 }
- \index { #3 @ \paketfont { #3 } }
- \prop_if_in:NnF \g_cnpkgdoc_pakete_prop { #3 }
- {
- \prop_gput:Nnn \g_cnpkgdoc_pakete_prop { #3 } {}
- \IfBooleanF { #1 }
- { \footnote { \CTANurl[]{#3} } }
- }
- }
-\ExplSyntaxOff
-\makeatother
-
\newcommand*\tablehead[1]{\textrm{\bfseries#1}}
\begin{document}
@@ -348,7 +307,11 @@ some a whole alphabet some only the upright variants of the standard italic
symbols for which macros are defined in base \LaTeX.
\chemgreek\ offers a possibility to map those different interfaces to a
-unified set of macros for usage in a chemistry package.
+unified set of macros for usage in a chemistry package. This is useful as
+then for example names like \iupac{\b\-\D\-gluco\|pyranose} can be typeset
+with a semantic interface and still have matching greek letters while the user
+is not limited to a certain package or font. Consequently this package is
+used by \chemmacros\ and its \acs{iupac} naming commands.
\section{Licence and Requirements}
Permission is granted to copy, distribute and/or modify this software under
@@ -361,6 +324,7 @@ the terms of the \LaTeX\ project public license (lppl) version 1.3 or later
\paket*{xparse}\footnote{\CTANurl{l3packages}}.
\section{Define Mappings}
+\selectchemgreekmapping{default}
\chemgreek's main commands are:
\begin{beschreibung}
@@ -368,7 +332,7 @@ the terms of the \LaTeX\ project public license (lppl) version 1.3 or later
Add a new mapping to \chemgreek. Issue an error if it already exists.
\Befehl{renewchemgreekmapping}{<name>}\ma{<mapping list>}\newline
Renew a \chemgreek\ mapping. Issue an error if it doesn't exist yet.
- \Befehl{newchemgreekmapping}{<name>}\ma{<mapping list>}\newline
+ \Befehl{declarechemgreekmapping}{<name>}\ma{<mapping list>}\newline
Declare a new mapping to \chemgreek. If the mapping already exists it
will be overwritten.
\end{beschreibung}
@@ -443,6 +407,8 @@ in table~\ref{tab:mappings}.
upgreek & \paket*{upgreek} \\
newtx & \paket*{newtxmath} \\
kpfonts & \paket*{kpfonts} \\
+ mathdesign & \paket*{mathdesign} \\
+ fourier & \paket*{fourier} \\
\bottomrule
\end{tabular}
\caption{Predefined mappings.}
@@ -490,6 +456,21 @@ mapping afterwards:
\Chemalpha
\end{beispiel}
+\section{Inspecting a Mapping}
+If you want to check if a mapping has been correctly set you can use
+\begin{beschreibung}
+ \Befehl{showchemgreekmapping}{<mapping>}
+\end{beschreibung}
+which will typeset a table (using a simple \code{tabular} environment) with
+all 48 characters like the one shown in table~\ref{tab:showmapping}.
+
+\begin{table}[htbp]
+ \centering
+ \showchemgreekmapping{newtx}
+ \caption{A demonstration of the \cmd*{showchemgreekmapping} command.}
+ \label{tab:showmapping}
+\end{table}
+
\appendix
\printindex
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.pdf
index 9d5ce9ef37d..e2d05df574d 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 7f924875d57..ae8c16ccbc9 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_en.tex
@@ -1,7 +1,7 @@
% arara: xelatex
% !arara: biber
-% !arara: xelatex
-% !arara: xelatex
+% arara: xelatex
+% arara: xelatex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -----------------------------------------------------------------------------
% - the CHEMMACROS bundle
@@ -97,6 +97,12 @@
pdfstring = EU ,
accsupp = EU
}
+\DeclareAcronym{id}{
+ short = id ,
+ long = identification string ,
+ pdfstring = ID ,
+ accsupp = ID
+}
\DeclareAcronym{iupac}{
short = iupac ,
long = International Union of Pure and Applied Chemistry ,
@@ -113,7 +119,7 @@
short = dvi ,
long = device independent file format ,
pdfstring = DVI ,
- accsupp = DVO
+ accsupp = DVI
}
\DeclareAcronym{pdf}{
short = pdf ,
@@ -156,6 +162,16 @@
\usepackage[backend=biber,style=alphabetic,maxbibnames=20]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents*}{\jobname.bib}
+@book{iupac:bluebook,
+ author = {R. Panico and W. H. Powell and J-C. Richer},
+ title = {“Nomenclature of Organic Chemistry, Sections A, B, C, D, E, F, and H”, \acs{iupac}
+ Blue Book},
+ edition = {\mkbibacro{DRAFT}},
+ date = {2004-10-07},
+ url =
+ {http://old.iupac.org/reports/provisional/abstract04/BB-prs310305/CompleteDraft.pdf},
+ urldate = {2013-07-07}
+}
@book{iupac:greenbook,
author = {E. Richard Cohan and Tomislav Cvita\v{s} and Jeremy G. Frey and
Bertil Holmström and Kozo Kuchitsu and Roberto Marquardt and Ian Mills and
@@ -264,7 +280,7 @@
includegraphics, insitu, intertext, invacuo, iupac, IUPAC,
J, joule,
Ka, Kb, kilo, Kw,
- L, latin, lewis, Lewis, Lfi, listofreactions, lqd, ltn,
+ L, latin, lc, lewis, Lewis, Lfi, listofreactions, lqd, ltn,
mch, mega, meta, metre, mhName, midrule, milli, mmHg, mole,
N, nano, nicefrac, newman, NMR, Nu, Nuc, num, numrange,
O, ominus, orbital, ortho, oplus, ox, OX,
@@ -322,52 +338,9 @@
}
\providecommand*\chemgreek{{\scshape\textcolor{main}{chemgreek}}\xspace}
-\newcommand*\Default[1]{%
- \hfill\llap{%
- \ifblank{#1}
- {(initially~empty)}
- {Default:~\code{#1}}%
- }\newline
-}
-
-\usepackage{marginnote,ragged2e}
-\makeatletter
-\providecommand*\sinceversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Introduced in version~#1}}%
- \@esphack}
-\providecommand*\changedversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Changed in version~#1}}%
- \@esphack}
-
-\RenewDocumentCommand\CTANurl{O{macros/latex/contrib}m}
- {%
- on CTAN: %
- \hyper@linkurl{#2}{http://mirrors.ctan.org/#1/#2/}%
- }
-\ExplSyntaxOn
-\RenewDocumentCommand \paket { sO{macros/latex/contrib}m }
- {
- \paketfont { #3 }
- \index { #3 @ \paketfont { #3 } }
- \prop_if_in:NnF \g_cnpkgdoc_pakete_prop { #3 }
- {
- \prop_gput:Nnn \g_cnpkgdoc_pakete_prop { #3 } {}
- \IfBooleanF { #1 }
- { \footnote { \CTANurl[]{#3} } }
- }
- }
-\ExplSyntaxOff
-\makeatother
-
\DeclareChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution
\DeclareChemPhase{\cd}{cd}% condensed phase
-\RenewChemPhase{\lqd}{lc}% liquid crystal
+\DeclareChemPhase{\lc}{lc}% liquid crystal
\begin{document}
@@ -383,7 +356,7 @@ The \chemmacros\ bundle needs the bundles \paket{l3kernel} and
\paket{mathtools}, \paket{bm}, \paket{nicefrac} and \paket{environ} as well as
\paket*{tikz}\footnote{\CTANurl[graphics]{pgf}} and the \TikZ libraries
\code{calc} and \code{arrows}. Language support is done with the help of the
-\paket*{translations} package from the \paket{exsheets} bundle. The
+\paket{translations} package from the \paket{exsheets} bundle. The
\chemmacros\ package also loads the other packages of this bundle.
The package option \key{xspace} also loads the package \paket{xspace}.
@@ -433,7 +406,7 @@ There are four points I hope I have achieved with this bundle:
\item the commands shall not only make typesetting easier and faster but also
the document source more readable with respect to semantics
(\code{\cmd{ortho}-dichlorobenzene} is easier to read and understand than
- \code{\cmd*{textsl}{o}-dichlorobenzene})
+ \code{\cmd*{textit}{o}-dichlorobenzene})
\item as much customizability as I could think of so every user can adapt the
commands to his or her own wishes
\item default settings compliant with the recommendations of the \acf{iupac}.
@@ -905,6 +878,15 @@ in the default setting.
\Befehl{para} \para
\end{beschreibung}
+Although these commands are provided I like to cite~\cite{iupac:bluebook}:
+
+\begin{zitat}[{\acs{iupac} Blue Book {\cite[][p.\,90]{iupac:bluebook}}}]
+ The letters \ortho, \meta, and \para\ have been used in place of
+ \textit{ortho}, \textit{meta}, and \textit{para}, respectively, to designate
+ the 1,2- 1,3-, and 1,4- isomers of disubstituted benzene. This usage is
+ strongly discouraged and is not used in preferred \acs{iupac} names.
+\end{zitat}
+
\paragraph{Absolute Configuration}\index{absolute configuration} (uses \TikZ)
\begin{beschreibung}
\Befehl{Rconf}[<letter>] \cmd{Rconf}: \Rconf \quad\cmd{Rconf}[]: \Rconf[]
@@ -1039,7 +1021,8 @@ By the way: \cmd*{mmHg} \si{\mmHg} already is defined by \paket{siunitx} and
\section{Acid/Base}\label{sec:saeure_base}\secidx{Acid/Base}
Easy representation of \pH, \pKa \ldots\ (the command \cmd{pKa} depends on the
-package option \key[option]{language}).
+package option \key[option]{language}). The translations may be adapted,
+though, see section~\ref{sec:languages}.
\begin{beschreibung}
\Befehl{pH} \pH
\Befehl{pOH} \pOH
@@ -2103,11 +2086,31 @@ declaration commands of \chemmacros\ \cmd{DeclareChemPhase} and
% preamble:
% \DeclareChemPhase{\aqi}{aq,$\infty$}% aqueous solution at infinite dilution
% \DeclareChemPhase{\cd}{cd}% condensed phase
- % \RenewChemPhase{\lqd}{lc}% liquid crystal
- NaOH\aqi\ \ch{H2O\cd} U\phase{cr} A\lqd \\
+ % \DeclareChemPhase{\lc}{lc}% liquid crystal
+ NaOH\aqi\ \ch{H2O\cd} U\phase{cr} A\lc \\
\chemsetup[phases]{pos=sub}
- NaOH\aqi\ \ch{H2O\cd} U\phase{cr} A\lqd
+ NaOH\aqi\ \ch{H2O\cd} U\phase{cr} A\lc
+\end{beispiel}
+
+\subsection{Language Dependencies}\secidx[internationalization]{Phases}
+For each pahse command a translation into the custom language can be defined.
+If a phase is declared with \cmd{DeclareChemPhase} no translation exists and
+for every \paket{babel} languuage the literal string is used that was provided
+as a definition. Let's say you define the phase
+\begin{beispiel}[code only]
+ \DeclareChemPhase\liquid{l}
\end{beispiel}
+and want to add the German translation ``f{}l''. Then you could do
+\begin{beispiel}[code only]
+ \DeclareTranslation{German}{phase-liquid}{f{}l}
+\end{beispiel}
+This way, when you use it in a German document using the appropriate
+\paket{babel} option using \cmd*{liquid} would correctly translate. For this
+the package \paket{translations} is used. The \acs{id} always is
+\code{phase-<csname>} where \code{<csname>} is the name of the phase command
+you defined without leading backslash.
+
+See section~\ref{sec:languages} for predefined translations.
\secidx*{Phases}
\section{Newman Projections}\label{sec:newman}\secidx{Newman Projections}
diff --git a/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.pdf
index eefcfbf083a..3f04b35d2f0 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/doc/latex/chemmacros/ghsystem_en.tex b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.tex
index 9ca8cd2b3d7..e96adeea541 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/ghsystem_en.tex
@@ -286,49 +286,6 @@
\renewcommand*\AmS{\hologo{AmS}}
-\newcommand*\Default[1]{%
- \hfill\llap{%
- \ifblank{#1}
- {(initially~empty)}
- {Default:~\code{#1}}%
- }\newline
-}
-
-\usepackage{marginnote,ragged2e}
-\makeatletter
-\providecommand*\sinceversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Introduced in version~#1}}%
- \@esphack}
-\providecommand*\changedversion[1]{%
- \@bsphack
- \marginnote{%
- \footnotesize\sffamily\RaggedRight
- \textcolor{black!75}{Changed in version~#1}}%
- \@esphack}
-
-\RenewDocumentCommand\CTANurl{O{macros/latex/contrib}m}
- {%
- on CTAN: %
- \hyper@linkurl{#2}{http://mirrors.ctan.org/#1/#2/}%
- }
-\ExplSyntaxOn
-\RenewDocumentCommand \paket { sO{macros/latex/contrib}m }
- {
- \paketfont { #3 }
- \index { #3 @ \paketfont { #3 } }
- \prop_if_in:NnF \g_cnpkgdoc_pakete_prop { #3 }
- {
- \prop_gput:Nnn \g_cnpkgdoc_pakete_prop { #3 } {}
- \IfBooleanF { #1 }
- { \footnote { \CTANurl[]{#3} } }
- }
- }
-\ExplSyntaxOff
-\makeatother
-
\newcommand*\tablehead[1]{\textrm{\bfseries#1}}
\begin{document}
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
index b29047b1e3d..d041025fe17 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemformula.sty
@@ -27,8 +27,8 @@
% --------------------------------------------------------------------------
\RequirePackage{ expl3 , xparse , l3keys2e , tikz , amsmath , xfrac , nicefrac , scrlfile }
\usetikzlibrary{arrows}
-\def\chemformula@version{4.0}
-\def\chemformula@date{2013/07/06}
+\def\chemformula@version{4.1}
+\def\chemformula@date{2013/08/24}
\ProvidesExplPackage
{chemformula}
@@ -167,7 +167,7 @@
% variants of kernel functions:
\cs_generate_variant:Nn \keys_set:nn { nV }
\cs_generate_variant:Nn \tl_if_blank:nF { V }
-\cs_generate_variant:Nn \tl_if_in:nnT { x }
+\cs_generate_variant:Nn \tl_if_in:nnT { x , nV }
\cs_generate_variant:Nn \prop_get:Nn { NV }
\cs_generate_variant:Nn \tl_set_rescan:Nnn { NnV }
@@ -248,6 +248,8 @@
\bool_new:N \l__chemformula_fss_shape_bool
\bool_new:N \l__chemformula_name_width_bool
\bool_new:N \l__chemformula_charge_full_shift_bool
+\bool_new:N \l__chemformula_tikzexternaldisable_bool
+\bool_set_true:N \l__chemformula_tikzexternaldisable_bool
% dimensions:
\dim_new:N \l__chemformula_arrow_length_dim
@@ -311,6 +313,12 @@
\tl_set:Nn \l__chemformula_arrow_label_style_tl { \footnotesize }
\tl_new:N \l__chemformula_arrow_tmp_tl
\tl_new:N \l__chemformula_arrow_type_tl
+\tl_new:N \l__chemformula_arrow_penalty_tl
+\tl_set:Nn \l__chemformula_arrow_penalty_tl { 0 }
+\tl_new:N \l__chemformula_plus_penalty_tl
+\tl_set:Nn \l__chemformula_plus_penalty_tl { 700 }
+\tl_new:N \l__chemformula_bond_penalty_tl
+\tl_set:Nn \l__chemformula_bond_penalty_tl { 10000 }
\tl_new:N \l__chemformula_name_tmp_tl
\tl_new:N \l__chemformula_chemformula_tmpa_tl
\tl_new:N \g__chemformula_options_tl
@@ -385,6 +393,15 @@
\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:
+ }
+% \binoppenalty=\maxdimen
+% \relpenalty=\maxdimen
+
\cs_new_protected:Npn \chemformula_dim_to_width:Nn #1#2
{
\hbox_set:Nn \l__chemformula_tmpa_box { #2 }
@@ -399,6 +416,22 @@
{ \use:c { if #1 } \prg_return_true: \else: \prg_return_false: \fi: }
% --------------------------------------------------------------------------
+% prevent externalisation of tikz parts of the formulae:
+\AtBeginDocument { \providecommand \tikzexternaldisable {} }
+
+\keys_define:nn { chemmacros / chemformula }
+ {
+ tikz-external-disable .bool_set:N =
+ \l__chemformula_tikzexternaldisable_bool
+ }
+
+\cs_new_protected:Npn \chemformula_tikzexternaldisable:
+ {
+ \bool_if:NT \l__chemformula_tikzexternaldisable_bool
+ { \tikzexternaldisable }
+ }
+
+% --------------------------------------------------------------------------
% circled charge signs:
\cs_new_protected:Npn \chemformula_fplus:
{ \ensuremath { \__chemformula_fplus: } }
@@ -645,9 +678,9 @@
{ \dim_set_eq:NN \l__chemformula_arrow_length_dim \l__chemformula_tmpa_dim }
{ \dim_set_eq:NN \l__chemformula_arrow_length_dim \l__chemformula_tmpb_dim }
\dim_add:Nn \l__chemformula_arrow_length_dim
- { \l__chemformula_arrow_offset_dim }
- \dim_add:Nn \l__chemformula_arrow_length_dim
- { \l__chemformula_arrow_offset_dim }
+ { 2\l__chemformula_arrow_offset_dim }
+% \dim_add:Nn \l__chemformula_arrow_length_dim
+% { \l__chemformula_arrow_offset_dim }
\dim_compare:nF
{ \l__chemformula_arrow_length_dim > \l__chemformula_arrow_minimum_length_dim }
{
@@ -657,15 +690,12 @@
}
\dim_set:Nn \l__chemformula_arrow_shortage_dim
{
- \l__chemformula_arrow_length_dim *
- \dim_ratio:nn { \l__chemformula_arrow_ratio_tl pt } { 1pt }
- }
- \dim_set:Nn \l__chemformula_arrow_shortage_dim
- { \l__chemformula_arrow_length_dim - \l__chemformula_arrow_shortage_dim }
- \dim_set:Nn \l__chemformula_arrow_shortage_dim
- {
- \l__chemformula_arrow_shortage_dim *
- \dim_ratio:nn { 1pt } { 2pt }
+ (
+ \l__chemformula_arrow_length_dim
+ -
+ \l__chemformula_arrow_length_dim *
+ \dim_ratio:nn { \l__chemformula_arrow_ratio_tl pt } { 1pt }
+ ) * 1/2
}
}
@@ -701,14 +731,17 @@
% this will be \arrow inside \ch
\DeclareDocumentCommand \charrow { mO{}O{} }
{
- \__chemformula_arrows_get:n { #1 }
- \chemformula_arrow_labels:nn { #2 } { #3 }
+ \group_begin:
+ \chemformula_tikzexternaldisable:
+ \__chemformula_arrows_get:n { #1 }
+ \chemformula_arrow_labels:nn { #2 } { #3 }
+ \group_end:
}
% draw the arrows
\cs_new:Npn \__chemformula_arrow_draw:n #1
{
- \chemformula_allow_break:
+ \chemformula_nobreak:
% prepare arrow code for drawing:
\tl_set_rescan:Nnn \l__chemformula_tmpc_tl
{ \char_set_catcode_letter:N \_ } { #1 }
@@ -723,18 +756,18 @@
\chemformula_draw:xn
{ \l__chemformula_arrow_style_tl }
{
- coordinate (chemformula_arrow_start) (0,0)
- ++ (\l__chemformula_compound_sep_dim,.3432em)
- ++ (0,\l__chemformula_arrow_yshift_dim)
+ coordinate (chemformula_arrow_start) (0pt,0pt)
+ ++ ( \l__chemformula_compound_sep_dim , .3432em)
+ ++ (0pt,\l__chemformula_arrow_yshift_dim)
coordinate (cf_arrow_start)
- ++ ( .5 * \dim_use:N \l__chemformula_arrow_length_dim , 0)
+ ++ ( .5 * \dim_use:N \l__chemformula_arrow_length_dim , 0pt)
coordinate (cf_arrow_mid)
- ++ ( .5 * \dim_use:N \l__chemformula_arrow_length_dim , 0)
+ ++ ( .5 * \dim_use:N \l__chemformula_arrow_length_dim , 0pt)
coordinate (cf_arrow_end)
- ++ (\l__chemformula_compound_sep_dim,0)
- (cf_arrow_start) ++ (\l__chemformula_arrow_shortage_dim,0)
+ ++ ( \l__chemformula_compound_sep_dim , 0pt )
+ (cf_arrow_start) ++ (\l__chemformula_arrow_shortage_dim , 0pt)
coordinate (cf_arrow_mid_start)
- (cf_arrow_end) ++ (-\l__chemformula_arrow_shortage_dim , 0)
+ (cf_arrow_end) ++ (-\l__chemformula_arrow_shortage_dim , 0pt)
coordinate (cf_arrow_mid_end)
}
% the arrow labels:
@@ -748,7 +781,9 @@
;
\tl_use:N \l__chemformula_tmpc_tl
}
- \chemformula_allow_break:
+ \chemformula_skip_nobreak_penalty:Nn
+ \c_zero_skip
+ { \l__chemformula_arrow_penalty_tl }
}
\cs_generate_variant:Nn \__chemformula_arrow_draw:n { V }
@@ -844,7 +879,8 @@
label-offset .dim_set:N = \l__chemformula_arrow_label_offset_dim ,
compound-sep .dim_set:N = \l__chemformula_compound_sep_dim ,
arrow-style .tl_set:N = \l__chemformula_arrow_style_tl ,
- label-style .tl_set:N = \l__chemformula_arrow_label_style_tl
+ label-style .tl_set:N = \l__chemformula_arrow_label_style_tl ,
+ arrow-penalty .tl_set:N = \l__chemformula_arrow_penalty_tl
}
% --------------------------------------------------------------------------
@@ -1000,7 +1036,7 @@
\prop_map_inline:Nn \l__chemformula_arrows_code_prop
{
\tl_set_rescan:Nnn \l__chemformula_tmpa_tl {} { ##1 }
- \tl_if_in:noT { #1 } { \l__chemformula_tmpa_tl }
+ \tl_if_in:nVT { #1 } \l__chemformula_tmpa_tl
{ \bool_set_true:N \l__chemformula_is_arrow_bool }
}
}
@@ -1143,25 +1179,30 @@
\cs_new_protected:Npn \chemformula_bond:n #1
{
\chemformula_skip_nobreak:N \l__chemformula_bond_space_dim
+ \group_begin:
+ \chemformula_tikzexternaldisable:
\chemformula_tikz:nn
{
- inner~sep = 0 ,
- outer~sep = 0 ,
+ inner~sep = 0pt ,
+ outer~sep = 0pt ,
text~height = 1em ,
baseline = (chemformula-bond-ground.base)
}
{
\draw node[draw=none,minimum~height=1em,minimum~width=0]
- (chemformula-bond-ground) at (0,0) {};
- \draw (chemformula-bond-ground) ++ (0,-.1716em)
+ (chemformula-bond-ground) at (0pt,0pt) {};
+ \draw (chemformula-bond-ground) ++ (0pt,-.1716em)
coordinate (chemformula-bond-start) ;
- \draw (chemformula-bond-start) ++(\l__chemformula_bond_dim ,0)
+ \draw (chemformula-bond-start) ++(\l__chemformula_bond_dim ,0pt)
coordinate (chemformula-bond-end) ;
\tl_if_blank:nTF { #1 }
{ \__chemformula_bond_draw:n { single } }
{ \__chemformula_bond_draw:n { #1 } }
}
- \chemformula_skip_nobreak:N \l__chemformula_bond_space_dim
+ \group_end:
+ \chemformula_skip_nobreak_penalty:Nn
+ \l__chemformula_bond_space_dim
+ { \l__chemformula_bond_penalty_tl }
}
\cs_new_protected:Npn \__chemformula_bond_draw:n #1
@@ -1222,10 +1263,10 @@
\DeclareChemBond{double}
{
- \draw (chemformula-bond-start) ++ (0,.0858em) coordinate (double-start-up) ;
- \draw (chemformula-bond-end) ++ (0,.0858em) coordinate (double-end-up) ;
- \draw (chemformula-bond-start) ++ (0,-.0858em) coordinate (double-start-down) ;
- \draw (chemformula-bond-end) ++ (0,-.0858em) coordinate (double-end-down) ;
+ \draw (chemformula-bond-start) ++ (0pt,.0858em) coordinate (double-start-up) ;
+ \draw (chemformula-bond-end) ++ (0pt,.0858em) coordinate (double-end-up) ;
+ \draw (chemformula-bond-start) ++ (0pt,-.0858em) coordinate (double-start-down) ;
+ \draw (chemformula-bond-end) ++ (0pt,-.0858em) coordinate (double-end-down) ;
\draw[chembond]
(double-start-down) -- (double-end-down)
(double-start-up) -- (double-end-up) ;
@@ -1234,10 +1275,10 @@
\DeclareChemBond{semidouble}
{
- \draw (chemformula-bond-start) ++ (0,.0858em) coordinate (double-start-up) ;
- \draw (chemformula-bond-end) ++ (0,.0858em) coordinate (double-end-up) ;
- \draw (chemformula-bond-start) ++ (0,-.0858em) coordinate (double-start-down) ;
- \draw (chemformula-bond-end) ++ (0,-.0858em) coordinate (double-end-down) ;
+ \draw (chemformula-bond-start) ++ (0pt,.0858em) coordinate (double-start-up) ;
+ \draw (chemformula-bond-end) ++ (0pt,.0858em) coordinate (double-end-up) ;
+ \draw (chemformula-bond-start) ++ (0pt,-.0858em) coordinate (double-start-down) ;
+ \draw (chemformula-bond-end) ++ (0pt,-.0858em) coordinate (double-end-down) ;
\draw[chembond] (double-start-down) -- (double-end-down) ;
\draw[chembond,densely~dotted] (double-start-up) -- (double-end-up) ;
}
@@ -1247,10 +1288,10 @@
\DeclareChemBond{triple}
{
- \draw (chemformula-bond-start) ++ (0,.1287em) coordinate (triple-start-up) ;
- \draw (chemformula-bond-end) ++ (0,.1287em) coordinate (triple-end-up) ;
- \draw (chemformula-bond-start) ++ (0,-.1287em) coordinate (triple-start-down) ;
- \draw (chemformula-bond-end) ++ (0,-.1287em) coordinate (triple-end-down) ;
+ \draw (chemformula-bond-start) ++ (0pt,.1287em) coordinate (triple-start-up) ;
+ \draw (chemformula-bond-end) ++ (0pt,.1287em) coordinate (triple-end-up) ;
+ \draw (chemformula-bond-start) ++ (0pt,-.1287em) coordinate (triple-start-down) ;
+ \draw (chemformula-bond-end) ++ (0pt,-.1287em) coordinate (triple-end-down) ;
\draw[chembond]
(triple-start-down) -- (triple-end-down)
(chemformula-bond-start) -- (chemformula-bond-end)
@@ -1260,10 +1301,10 @@
\DeclareChemBond{semitriple}
{
- \draw (chemformula-bond-start) ++ (0,.1287em) coordinate (triple-start-up) ;
- \draw (chemformula-bond-end) ++ (0,.1287em) coordinate (triple-end-up) ;
- \draw (chemformula-bond-start) ++ (0,-.1287em) coordinate (triple-start-down) ;
- \draw (chemformula-bond-end) ++ (0,-.1287em) coordinate (triple-end-down) ;
+ \draw (chemformula-bond-start) ++ (0pt,.1287em) coordinate (triple-start-up) ;
+ \draw (chemformula-bond-end) ++ (0pt,.1287em) coordinate (triple-end-up) ;
+ \draw (chemformula-bond-start) ++ (0pt,-.1287em) coordinate (triple-start-down) ;
+ \draw (chemformula-bond-end) ++ (0pt,-.1287em) coordinate (triple-end-down) ;
\draw[chembond]
(triple-start-down) -- (triple-end-down)
(chemformula-bond-start) -- (chemformula-bond-end) ;
@@ -1649,6 +1690,7 @@
\tl_if_blank:VF \l__chemformula_stoich_tl
{
\tl_put_left:Nn \l__chemformula_stoich_tl { \chemformula_font_inner: }
+ % TODO: is \ExplSyntaxOn needed here?
\tl_set_rescan:Nno \l__chemformula_stoich_tl
{ \ExplSyntaxOn }
{ \l__chemformula_stoich_tl }
@@ -1733,6 +1775,8 @@
\tl_put_right:Nn \l__chemformula_input_tl { ) }
}
+\cs_new_eq:NN \chemformula_math_frac:nn \frac
+
\cs_new:Npn \__chemformula_frac:nn #1#2
{
\bool_if:NT \l__chemformula_xfrac_bool
@@ -1740,7 +1784,7 @@
\bool_if:NT \l__chemformula_nicefrac_bool
{ \nicefrac{#1}{#2} }
\bool_if:NT \l__chemformula_mathfrac_bool
- { \( \frac{ \text { #1 } } { \text { #2 } } \) }
+ { \( \chemformula_math_frac:nn { \text { #1 } } { \text { #2 } } \) }
}
\cs_new:Npn \__chemformula_misc_frac:nnn #1#2#3
@@ -1750,7 +1794,7 @@
\bool_if:NT \l__chemformula_nicefrac_bool
{ #1\nicefrac{#2}{#3} }
\bool_if:NT \l__chemformula_mathfrac_bool
- { #1 \( \frac{ \text { #2 } } { \text { #3 } } \) }
+ { #1 \( \chemformula_math_frac:nn { \text { #2 } } { \text { #3 } } \) }
}
% --------------------------------------------------------------------------
@@ -1955,7 +1999,9 @@
{
\chemformula_skip_nobreak:N \l__chemformula_plus_space_skip
+
- \skip_horizontal:N \l__chemformula_plus_space_skip
+ \chemformula_skip_nobreak_penalty:Nn
+ \l__chemformula_plus_space_skip
+ { \l__chemformula_plus_penalty_tl }
}
}
\bool_set_false:N \l__chemformula_is_plus_bool
@@ -2211,10 +2257,13 @@
\bool_set_false:N \l__chemformula_xfrac_bool
\bool_set_true:N \l__chemformula_nicefrac_bool
\bool_set_false:N \l__chemformula_mathfrac_bool ,
+ frac-math-cmd .code:n =
+ { \cs_set_eq:NN \chemformula_math_frac:nn #1 } ,
stoich-paren-parse .bool_set:N = \l__chemformula_stoich_parse_iupac_bool ,
stoich-space .skip_set:N = \l__chemformula_stoich_space_skip ,
adduct-space .dim_set:N = \l__chemformula_adduct_space_dim ,
plus-space .skip_set:N = \l__chemformula_plus_space_skip ,
+ plus-penalty .tl_set:N = \l__chemformula_plus_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 =
@@ -2229,6 +2278,7 @@
bond-length .dim_set:N = \l__chemformula_bond_dim ,
bond-offset .dim_set:N = \l__chemformula_bond_space_dim ,
bond-style .tl_set:N = \l__chemformula_bond_style_tl ,
+ bond-penalty .tl_set:N = \l__chemformula_bond_penalty_tl ,
font-family .code:n =
\bool_set_true:N \l__chemformula_fss_bool
\bool_set_false:N \l__chemformula_fontspec_bool
@@ -2371,8 +2421,23 @@ VERSION HISTORY
- don't allow a line break between a stoichiometric
factor and a compound
- changed formal charges to match ``plain'' charges
+2013/07/26 - version 4.0a - added options `arrow-penalty' (0), `plus-penalty'
+ (700) and `bond-penalty' (10000) that determine if
+ there may be a break after an arrow, a bond or the
+ plus
+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
+ - new option `tikz-external-disable'
+ - new option `frac-math-cmd'
+
% --------------------------------------------------------------------------
% TODO
+- add \tikzexternaldisable and an option to disable it to \ch, \chcpd,
+ \charrow, and \bond
- Addukte: Zahlen nach * und . automatisch erkennen?
- optionale Argumente von \\ nach außen weiterreichen?
+- zu `frac-style' die Möglichkeit einbauen, statt \frac, \dfrac oder \tfrac zu
+ verwenden.
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemgreek.sty b/Master/texmf-dist/tex/latex/chemmacros/chemgreek.sty
index dc072de4205..9bb67b76e9f 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemgreek.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemgreek.sty
@@ -26,8 +26,8 @@
% - The Current Maintainer of this work is Clemens Niederberger.
% ----------------------------------------------------------------------------
\RequirePackage{expl3,xparse}
-\def\chemgreek@version{0.1a}
-\def\chemgreek@date{2013/07/06}
+\def\chemgreek@version{0.2}
+\def\chemgreek@date{2013/08/24}
\ProvidesExplPackage{chemgreek}{\chemgreek@date}{\chemgreek@version}
{interface for upright greek letters for use in chemistry (CN)}
@@ -41,6 +41,13 @@
\int_new:N \g__chemgreek_tmpa_int
% ----------------------------------------------------------------------------
+% an l3 conditional that can test 2e's conditionals that go like
+% \iffoo ... \else ... \fi
+% see http://tex.stackexchange.com/a/119806/5049
+\prg_new_conditional:Npnn \chemgreek_latex_if:n #1 {p,T,F,TF}
+ { \use:c { if #1 } \prg_return_true: \else: \prg_return_false: \fi: }
+
+% ----------------------------------------------------------------------------
% messages
\msg_new:nnnn { chemgreek } { mapping-not-defined }
{ The~ mapping~ `#1'~ does~ not~ exist~ \msg_line_context: }
@@ -256,6 +263,71 @@
\cs_new_eq:NN \showchemgreekmapping \chemgreek_show_mapping:n
% ----------------------------------------------------------------------------
+% functions to format integers with greek letters; these are basically copies
+% of \int_to_alph:n
+\cs_new:Npn \chemgreek_int_to_greek:n #1
+ {
+ \int_to_symbols:nnn { #1 } { 24 }
+ {
+ { 1 } { \Chemalpha }
+ { 2 } { \Chembeta }
+ { 3 } { \Chemgamma }
+ { 4 } { \Chemdelta }
+ { 5 } { \Chemepsilon }
+ { 6 } { \Chemzeta }
+ { 7 } { \Chemeta }
+ { 8 } { \Chemiota }
+ { 9 } { \Chemtheta }
+ { 10 } { \Chemkappa }
+ { 11 } { \Chemlambda }
+ { 12 } { \Chemmu }
+ { 13 } { \Chemnu }
+ { 14 } { \Chemxi }
+ { 15 } { \Chemomikron }
+ { 16 } { \Chempi }
+ { 17 } { \Chemrho }
+ { 18 } { \Chemsigma }
+ { 19 } { \Chemtau }
+ { 20 } { \Chemupsilon }
+ { 21 } { \Chemphi }
+ { 22 } { \Chempsi }
+ { 23 } { \Chemchi }
+ { 24 } { \Chemomega }
+ }
+ }
+
+\cs_new:Npn \chemgreek_int_to_Greek:n #1
+ {
+ \int_to_symbols:nnn { #1 } { 24 }
+ {
+ { 1 } { \ChemAlpha }
+ { 2 } { \ChemBeta }
+ { 3 } { \ChemGamma }
+ { 4 } { \ChemDelta }
+ { 5 } { \ChemEpsilon }
+ { 6 } { \ChemZeta }
+ { 7 } { \ChemEta }
+ { 8 } { \ChemIota }
+ { 9 } { \ChemTheta }
+ { 10 } { \ChemKappa }
+ { 11 } { \ChemLambda }
+ { 12 } { \ChemMu }
+ { 13 } { \ChemNu }
+ { 14 } { \ChemXi }
+ { 15 } { \ChemOmikron }
+ { 16 } { \ChemPi }
+ { 17 } { \ChemRho }
+ { 18 } { \ChemSigma }
+ { 19 } { \ChemTau }
+ { 20 } { \ChemUpsilon }
+ { 21 } { \ChemPhi }
+ { 22 } { \ChemPsi }
+ { 23 } { \ChemChi }
+ { 24 } { \ChemOmega }
+ }
+ }
+
+% ----------------------------------------------------------------------------
% predefine some mappings
% default:
\chemgreek_new_mapping:nn { default }
@@ -315,6 +387,35 @@
\ensuremath{\omega} / \ensuremath{\Omega} % 24
}
+% mathdesign:
+\chemgreek_new_mapping:nn { mathdesign }
+ {
+ \ensuremath{\alphaup} / \ensuremath{\mathrm{A}} , % 1
+ \ensuremath{\betaup} / \ensuremath{\mathrm{B}} , % 2
+ \ensuremath{\gammaup} / \ensuremath{\Gammaup} , % 3
+ \ensuremath{\deltaup} / \ensuremath{\Deltaup} , % 4
+ \ensuremath{\epsilonup} / \ensuremath{\mathrm{E}} , % 5
+ \ensuremath{\zetaup} / \ensuremath{\mathrm{Z}} , % 6
+ \ensuremath{\etaup} / \ensuremath{\mathrm{H}} , % 7
+ \ensuremath{\thetaup} / \ensuremath{\Thetaup} , % 8
+ \ensuremath{\iotaup} / \ensuremath{\mathrm{I}} , % 9
+ \ensuremath{\kappaup} / \ensuremath{\mathrm{K}} , % 10
+ \ensuremath{\lambdaup} / \ensuremath{\Lambdaup} , % 11
+ \ensuremath{\muup} / \ensuremath{\mathrm{M}} , % 12
+ \ensuremath{\nuup} / \ensuremath{\mathrm{N}} , % 13
+ \ensuremath{\xiup} / \ensuremath{\Xiup} , % 14
+ \ensuremath{\mathrm{o}} / \ensuremath{\mathrm{O}} , % 15
+ \ensuremath{\piup} / \ensuremath{\Piup} , % 16
+ \ensuremath{\rhoup} / \ensuremath{\mathrm{R}} , % 17
+ \ensuremath{\sigmaup} / \ensuremath{\Sigmaup} , % 18
+ \ensuremath{\tauup} / \ensuremath{\mathrm{T}} , % 19
+ \ensuremath{\upsilonup} / \ensuremath{\Upsilonup} , % 20
+ \ensuremath{\phiup} / \ensuremath{\Phiup} , % 21
+ \ensuremath{\psiup} / \ensuremath{\Psiup} , % 22
+ \ensuremath{\chiup} / \ensuremath{\mathrm{X}} , % 23
+ \ensuremath{\omegaup} / \ensuremath{\Omegaup} % 24
+ }
+
% textgreek:
\chemgreek_new_mapping:nn { textgreek }
{
@@ -431,6 +532,49 @@
\ensuremath{\upomega} / \ensuremath{\upOmega} % 24
}
+% fourier:
+\cs_new:Npn \__chemgreek_lfourier:n #1
+ {
+ \chemgreek_latex_if:nTF { sloped }
+ { \ensuremath { \use:c { other #1 } } }
+ { \ensuremath { \use:c { #1 } } }
+ }
+
+\cs_new:Npn \__chemgreek_ufourier:n #1
+ {
+ \chemgreek_latex_if:nTF { sloped }
+ { \ensuremath { \use:c { #1 } } }
+ { \ensuremath { \use:c { other #1 } } }
+ }
+
+\chemgreek_new_mapping:nn { fourier }
+ {
+ \__chemgreek_lfourier:n {alpha} / \ensuremath{\mathrm{A}} , % 1
+ \__chemgreek_lfourier:n {beta} / \ensuremath{\mathrm{B}} , % 2
+ \__chemgreek_lfourier:n {gamma} / \__chemgreek_upper_fourier:n {Gamma} , % 3
+ \__chemgreek_lfourier:n {delta} / \__chemgreek_upper_fourier:n {Delta} , % 4
+ \__chemgreek_lfourier:n {epsilon} / \ensuremath{\mathrm{E}} , % 5
+ \__chemgreek_lfourier:n {zeta} / \ensuremath{\mathrm{Z}} , % 6
+ \__chemgreek_lfourier:n {eta} / \ensuremath{\mathrm{H}} , % 7
+ \__chemgreek_lfourier:n {theta} / \__chemgreek_upper_fourier:n {Theta} , % 8
+ \__chemgreek_lfourier:n {iota} / \ensuremath{\mathrm{I}} , % 9
+ \__chemgreek_lfourier:n {kappa} / \ensuremath{\mathrm{K}} , % 10
+ \__chemgreek_lfourier:n {lambda} / \__chemgreek_upper_fourier:n {Lambda} , % 11
+ \__chemgreek_lfourier:n {mu} / \ensuremath{\mathrm{M}} , % 12
+ \__chemgreek_lfourier:n {nu} / \ensuremath{\mathrm{N}} , % 13
+ \__chemgreek_lfourier:n {xi} / \__chemgreek_upper_fourier:n {Xi} , % 14
+ \ensuremath {\mathrm{o}} / \ensuremath{\mathrm{O}} , % 15
+ \__chemgreek_lfourier:n {pi} / \__chemgreek_upper_fourier:n {Pi} , % 16
+ \__chemgreek_lfourier:n {rho} / \ensuremath{\mathrm{R}} , % 17
+ \__chemgreek_lfourier:n {sigma} / \__chemgreek_upper_fourier:n {Sigma} , % 18
+ \__chemgreek_lfourier:n {tau} / \ensuremath{\mathrm{T}} , % 19
+ \__chemgreek_lfourier:n {upsilon} / \__chemgreek_upper_fourier:n {Upsilon} , % 20
+ \__chemgreek_lfourier:n {phi} / \__chemgreek_upper_fourier:n {Phi} , % 21
+ \__chemgreek_lfourier:n {psi} / \__chemgreek_upper_fourier:n {Psi} , % 22
+ \__chemgreek_lfourier:n {chi} / \ensuremath{\mathrm{X}} , % 23
+ \__chemgreek_lfourier:n {omega} / \__chemgreek_ufourier:n {Omega} % 24
+ }
+
% activate default mapping
\chemgreek_activate_mapping:n { default }
@@ -441,3 +585,6 @@ HISTORY:
2013/07/06 - v0.1a - fixed stupid bug in `upgreek' mapping
- added error messages and added \renewchemgreekmapping and
\declarechemgreekmapping
+2013/08/24 - v0.2 - new mappings `mathdesign', `fourier'
+ - new functions: \chemgreek_int_to_greek:n and
+ \chemgreek_int_to_Greek:n
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
index a1c7aa6c46f..26cb76ea4ab 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
@@ -26,8 +26,8 @@
% - The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
\RequirePackage{ expl3 , xparse , l3keys2e }
-\def\chemmacros@version{4.0}
-\def\chemmacros@date{2013/07/06}
+\def\chemmacros@version{4.1}
+\def\chemmacros@date{2013/08/24}
\ProvidesExplPackage
{chemmacros}
@@ -1037,20 +1037,24 @@
\ExplSyntaxOff
\protected\def\chemmacros@sconf#1%
{%
+ \begingroup
\tikz[baseline=(a.base),text height=1.5ex,text depth=.25ex]
{
\node(a) {#1} ;
\draw[->,thick,rotate=90] ($(a.center)+(20:.8em)$) arc (20:340:.8em);
}%
+ \endgroup
}
\protected\def\chemmacros@rconf#1%
{%
+ \begingroup
\tikz[baseline=(a.base),text height=1.5ex,text depth=.25ex]
{
\node(a) {#1} ;
\draw[<-,thick,rotate=90] ($(a.center)+(20:.8em)$) arc (20:340:.8em) ;
}%
+ \endgroup
}
\ExplSyntaxOn
@@ -1074,9 +1078,9 @@
\DeclareChemIUPAC \L { \textsc { l } }
% ortho/meta/para
-\DeclareChemIUPAC \ortho { \textsl { o } }
-\DeclareChemIUPAC \meta { \textsl { m } }
-\DeclareChemIUPAC \para { \textsl { p } }
+\DeclareChemIUPAC \ortho { \textit { o } }
+\DeclareChemIUPAC \meta { \textit { m } }
+\DeclareChemIUPAC \para { \textit { p } }
% syn/anti
\DeclareChemIUPAC \syn { \textit { syn } }
@@ -1758,8 +1762,10 @@
{
\chemformula_latex_if:nTF { measuring@ }
{
+ \group_begin:
\tikz[baseline=(#1.base)]
- { \node [inner~sep=0] (#1) { #2 } ; }
+ { \node [inner~sep=0pt] (#1) { #2 } ; }
+ \group_end:
}
{
\tl_if_blank:nT { #1 }
@@ -1767,7 +1773,7 @@
\tl_if_blank:nT { #2 }
{ \msg_error:nnx { chemmacros } { OX } { atom~missing } }
\tikz[baseline=(#1.base),remember~picture]
- { \node [inner~sep=0] (#1) { #2 } ; }
+ { \node [inner~sep=0pt] (#1) { #2 } ; }
}
}
@@ -2311,7 +2317,7 @@
{
\exp_not:N \chemmacros_translate:nn
{ phase-\l__chemmacros_tmpa_tl }
- { #2 }
+ { \exp_not:n { #2 } }
}
}
@@ -2326,7 +2332,7 @@
{
\exp_not:N \chemmacros_translate:nn
{ phase-\l__chemmacros_tmpa_tl }
- { #2 }
+ { \exp_not:n { #2 } }
}
}
@@ -2594,7 +2600,7 @@
% the `chemstyle' provides it with \providecommand so it doesn't matter which
% package defines it first
\ProvideDocumentCommand \standardstate {}
- { \ensuremath { \chemmacros_standardstate: } }
+ { { \ensuremath { \chemmacros_standardstate: } } }
\cs_new_protected:Npn \chemmacros_standardstate:
{ \mathpalette \chemmacros_standardstate_aux: \circ }
@@ -2970,14 +2976,14 @@
scale = \fp_to_tl:N \l__chemmacros_newman_scale_fp ,
chemmacros_newman_atom_front / .style =
{
- inner~sep=0,
- outer~sep=0,
+ inner~sep=0pt,
+ outer~sep=0pt,
\tl_use:N \l__chemmacros_newman_tikz_front_tl
},
chemmacros_newman_atom_back / .style =
{
- inner~sep=0,
- outer~sep=0,
+ 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 }
@@ -2986,7 +2992,7 @@
{
\chemmacros_tikz_draw:f
{ \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (0,0) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
+ (0pt,0pt) circle (\fp_to_dim:N \l__chemmacros_newman_scale_fp * 15) ;
\chemmacros_newman_back_node:nn
{ 30 }
{ \IfNoValueF { #6 } { #6 } }
@@ -3070,7 +3076,7 @@
{ \l__chemmacros_newman_scale_fp }
\chemmacros_tikz_draw:f
{ \tl_use:N \l__chemmacros_newman_tikz_ring_tl }
- (0,0) -- ++
+ (0pt,0pt) -- ++
(
30 * \fp_to_dim:N \l__chemmacros_newman_x_fp ,
30 * \fp_to_dim:N \l__chemmacros_newman_y_fp
@@ -3211,7 +3217,7 @@
{
\chemmacros_tikz_shade:f
{ ball~color = \l__chemmacros_orbital_s_phase_color_tl }
- (0,0) circle (\l__chemmacros_orbital_s_scale_tl * .6em) ;
+ (0pt,0pt) circle (\l__chemmacros_orbital_s_scale_tl * .6em) ;
}
}
@@ -3278,7 +3284,7 @@
draw = \l__chemmacros_orbital_p_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_p_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_p_scale_tl * 2em ,
\l__chemmacros_orbital_p_scale_tl * 2em
@@ -3288,7 +3294,7 @@
\l__chemmacros_orbital_p_scale_tl * 2em ,
\l__chemmacros_orbital_p_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\bool_if:NF \l__chemmacros_orbital_p_half_bool
{
\chemmacros_tikz_shadedraw:f
@@ -3296,7 +3302,7 @@
draw = \l__chemmacros_orbital_p_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_p_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
@@ -3306,7 +3312,7 @@
\l__chemmacros_orbital_p_scale_tl * 2em ,
- \l__chemmacros_orbital_p_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
}
@@ -3372,7 +3378,7 @@
draw = \l__chemmacros_orbital_sp_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_sp_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sp_scale_tl * 2em ,
\l__chemmacros_orbital_sp_scale_tl * 2em
@@ -3382,13 +3388,13 @@
\l__chemmacros_orbital_sp_scale_tl * 2em ,
\l__chemmacros_orbital_sp_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\chemmacros_tikz_shadedraw:f
{
draw = \l__chemmacros_orbital_sp_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_sp_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sp_scale_tl * .6em ,
- \l__chemmacros_orbital_sp_scale_tl * .6em
@@ -3398,7 +3404,7 @@
\l__chemmacros_orbital_sp_scale_tl * .6em ,
- \l__chemmacros_orbital_sp_scale_tl * .6em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
@@ -3463,7 +3469,7 @@
draw = \l__chemmacros_orbital_sptwo_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_sptwo_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sptwo_scale_tl * 2em ,
\l__chemmacros_orbital_sptwo_scale_tl * 2em
@@ -3473,13 +3479,13 @@
\l__chemmacros_orbital_sptwo_scale_tl * 2em ,
\l__chemmacros_orbital_sptwo_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\chemmacros_tikz_shadedraw:f
{
draw = \l__chemmacros_orbital_sptwo_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_sptwo_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- \l__chemmacros_orbital_sptwo_scale_tl * .8em
@@ -3489,7 +3495,7 @@
\l__chemmacros_orbital_sptwo_scale_tl * .8em ,
- \l__chemmacros_orbital_sptwo_scale_tl * .8em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
@@ -3554,7 +3560,7 @@
draw = \l__chemmacros_orbital_spthree_pphase_color_tl ,
ball~color = \l__chemmacros_orbital_spthree_pphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_spthree_scale_tl * 2em ,
\l__chemmacros_orbital_spthree_scale_tl * 2em
@@ -3564,13 +3570,13 @@
\l__chemmacros_orbital_spthree_scale_tl * 2em ,
\l__chemmacros_orbital_spthree_scale_tl * 2em
)
- .. (0,0);
+ .. (0pt,0pt);
\chemmacros_tikz_shadedraw:f
{
draw = \l__chemmacros_orbital_spthree_mphase_color_tl ,
ball~color = \l__chemmacros_orbital_spthree_mphase_color_tl
}
- (0,0) .. controls ++
+ (0pt,0pt) .. controls ++
(
- \l__chemmacros_orbital_spthree_scale_tl * 1em ,
- \l__chemmacros_orbital_spthree_scale_tl * 1em
@@ -3580,7 +3586,7 @@
\l__chemmacros_orbital_spthree_scale_tl * 1em ,
- \l__chemmacros_orbital_spthree_scale_tl * 1em
)
- .. (0,0);
+ .. (0pt,0pt);
}
}
@@ -4006,9 +4012,17 @@ Version history
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
% --------------------------------------------------------------------------- %
-% TODO: fuer version 4
+% TODO:
- add d-orbitals
- make electron movement arrow tips (`el', `left el' and `right el') public
+
diff --git a/Master/texmf-dist/tex/latex/chemmacros/language/ghsystem_english.def b/Master/texmf-dist/tex/latex/chemmacros/language/ghsystem_english.def
index 4dc71bee897..85bf82778af 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/language/ghsystem_english.def
+++ b/Master/texmf-dist/tex/latex/chemmacros/language/ghsystem_english.def
@@ -241,7 +241,7 @@
{
May~ cause~ damage
\bool_if:NF \l__ghsystem_organs_bool { ~to~ organs }
- \ghsystem_organs:\c_space_rl
+ \ghsystem_organs:\c_space_tl
through~ prolonged~ or~ repeated~ exposure.
\ghsystem_exposure:
}