summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
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/texmf-dist/doc/latex/chemmacros/chemformula_en.tex
parent8f202738ce363c80b55b8a2a9496340292a4b200 (diff)
chemmacros (24aug13)
git-svn-id: svn://tug.org/texlive/trunk@31513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemformula_en.tex95
1 files changed, 51 insertions, 44 deletions
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.