summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/chemformula/chemformula-manual.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/chemformula/chemformula-manual.tex')
-rw-r--r--macros/latex/contrib/chemformula/chemformula-manual.tex81
1 files changed, 35 insertions, 46 deletions
diff --git a/macros/latex/contrib/chemformula/chemformula-manual.tex b/macros/latex/contrib/chemformula/chemformula-manual.tex
index 00b7b2aa89..e1d592a263 100644
--- a/macros/latex/contrib/chemformula/chemformula-manual.tex
+++ b/macros/latex/contrib/chemformula/chemformula-manual.tex
@@ -1,5 +1,5 @@
-% !arara: pdflatex
-% !arara: biber
+% arara: pdflatex
+% arara: biber
% arara: pdflatex
% arara: pdflatex
% --------------------------------------------------------------------------
@@ -16,7 +16,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-% Copyright 2011--2020 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -33,31 +33,6 @@
\documentclass{chemformula-manual}
\addbibresource{cnltx.bib}
-
-\chemsetup{
- greek = newtx ,
- formula = chemformula ,
- chemformula/format = \libertineLF
-}
-
-\usepackage{acro}
-\acsetup{
- format/long = \scshape ,
- format/short = \scshape
-}
-\DeclareAcronym{iupac}{
- short = iupac ,
- long = International Union of Pure and Applied Chemistry ,
- pdfstring = IUPAC ,
- short-acc = IUPAC
-}
-
-\sisetup{
- detect-mode=false,
- mode=text,
- text-rm=\libertineLF
-}
-
\addbibresource{\jobname.bib}
\begin{filecontents*}{\jobname.bib}
@book{iupac:greenbook,
@@ -231,28 +206,29 @@ parentheses in the \acs{iupac} Green Book~\cite{iupac:greenbook}:
(1/5) K "\ox{7,Mn}" O4 + (8/5) HCl == (1/5) "\ox{2,Mn}" Cl2 + (1/2) Cl2 + (1/5) KCl + (4/5) H2O
\end{reaction*}
-There are a few possibilities to customize the output.
+There are a few possibilities to customize the output:
\begin{options}
\keyval{decimal-marker}{marker}\Default{.}
The symbol to indicate the decimal.
\keychoice{frac-style}{math,xfrac,nicefrac}\Default{math}
Determines how fractions are displayed.
- \keyval{frac-math-cmd}{command sequence}\Default{\cs*{frac}}
- \sinceversion{4.1}Allows you to choose which command is used with
- \keyis{frac-style}{math}. This needs to be a command sequence that takes
- two arguments that are set in math mode.
+ \keyval{frac-math-cmd}{command sequence}\Default{\cs*{frac}\Marg{\#1}\Marg{\#2}}
+ \changedversion{4.17}Allows you to choose which command is used with
+ \keyis{frac-style}{math}.
\keyval{stoich-space}{skip}\Default{.1667em plus .0333em minus .0117em}
The space that is placed after the stoichiometric factor. A rubber
length.
\keybool{stoich-paren-parse}\Default{false}
If set to true stoichiometric factors enclosed by parentheses also are
parsed.
- \keyval{stoich-print}{cs}\Default{\cs{chstoich}}
- This option allows to redefine the macro that prints the stoichiometric
- factors. \meta{cs} should be a macro that takes one mandatory argument.
- \emph{Please note that using this option will disable \chemformula's
- stoichiometric parsing as that is done by the default command
- \cs{chstoich}.}
+ \keyval{stoich-format}{code}\Default
+ \sinceversion{4.17}Allows formatting of the stoichiometric factors. The
+ last macro given may take an argument.
+ \keyval{stoich-print}{code containing \#1}\Default{\#1}
+ \changedversion{4.17}This option allows to use specify a macro for
+ printing the stoichiometric factors where \code{\#1} represents the
+ factor. \emph{This option is depecated and will be removed some time in
+ the future. Use \option{stoich-format} instead.}
\end{options}
\begin{example}
@@ -360,11 +336,6 @@ expands.
\end{sourcecode}
See section~\ref{ssec:text} for a way around this.
-Please also note that formulas are placed inside a group!
-\begin{example}[side-by-side]
- \ch{A2\color{red}B3 C4}
-\end{example}
-
\subsection{Charges and Other Superscripts}
\paragraph{Basics}
If a compound \emph{ends} with a plus or minus sign it will be treated as
@@ -870,7 +841,7 @@ the spacing. That's why there is an alternative:
\end{commands}
\begin{example}
\ch{H2O +}\textcolor{red}{\ch{H2SO4}}\ch{-> H3O+ + HSO4-} \par
- \ch{H2O + @{format=\color{red}} H2SO4 -> H3O+ + HSO4-} \par
+ \ch{H2O + @{atom-format=\color{red}} H2SO4 -> H3O+ + HSO4-} \par
or of course:\par
\ch{H2O + \textcolor{red}{H2SO4} -> H3O+ + HSO4-}\par\bigskip
\ch{H2O +}\ch[subscript-vshift=2pt]{H2SO4}\ch{-> H3O+ + HSO4-} \par
@@ -1020,6 +991,16 @@ of the labels. What stays constant is the part that protrudes the labels.
\ch{A ->[ "\chemfig{-[:30]-[:-30]OH}" ] B} \par
\end{example}
+The\sinceversion{4.17} labels are typeset inside of a \env*{tabular}\Marg{c}
+environment. This means you can get several lines:
+\begin{example}[side-by-side]
+ \ch{A ->[{a\\b}] B} \par
+ \ch{A ->[a \newline b] B}
+\end{example}
+The command \cs*{\textbackslash} must be hidden in order to
+work. \cs*{tabularnewline} does work, of course. For convenience \chemformula\
+also allows \cs*{newline} here.
+
\subsection{Customization}
These are the options which enable you to customize the arrows:
\begin{options}
@@ -1192,7 +1173,8 @@ creating a name you only have to make sure it isn't followed by parentheses.
\chemformula\ provides two options to customize the output of the names:
\begin{options}
\keyval{name-format}{commands}\Default{\cs*{scriptsize}\cs*{centering}}
- The format of the name. This can be arbitrary input.
+ \changedversion{4.15d}The format of the name. This can be arbitrary input
+ and the last macro may receive the name as an argument.
\keychoice{name-width}{\meta{dim},auto}\Default{auto}
The width of the box where the label is put into. \code{auto} will detect
the width of the name and set the box to this width.
@@ -1578,6 +1560,13 @@ There are a number of options for customizations:
and code.
\end{changes}
+\begin{changes}{4.17}
+ \change Various bug fixes.
+ \change Lazy boolean evaluation where possible.
+ \change Place arrow's arguments in a tabular. This allows for multiple
+ lines.
+\end{changes}
+
\printbibliography
\end{document}