Skip to content

Commit

Permalink
version 4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed Jan 23, 2022
1 parent 9176a90 commit 4dded0a
Show file tree
Hide file tree
Showing 5 changed files with 238 additions and 93 deletions.
6 changes: 4 additions & 2 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,12 @@ VERSION HISTORY
2020/12/22 - version 4.16 - new option `math-scripts'
- use LaTeX's new hooks
- get rid of unnecessary package dependencies
2022/??/?? - version 4.17 - adjust options `stoich-print' and `frac-math-cmd'
2022/01/23 - version 4.17 - adjust options `stoich-print' and `frac-math-cmd'
and correct bug in `stoich-print'
- lazy boolean evaluation
- deprecate `stoich-print' and introduce `stoich-format'
- lazy boolean evaluation where possible
- fix deprecated file hook
- implement issue #17
- fix issue #18
- fix issue #19
- fix typos in code
13 changes: 9 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
the CHEMFORMULA package v4.17 2022/??/??
the CHEMFORMULA package v4.17 2022/01/23

typeset chemical compounds and reactions

Expand All @@ -23,9 +23,14 @@ This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Clemens Niederberger.
--------------------------------------------------------------------------
The chemformula package consists of the following files
- chemformula.sty,
- chemformula-manual.cls, chemformula-manual.tex, chemformula-manual.pdf,
- README
== STYLE FILES ==
chemformula.sty
== DOCUMENTATION FILES ==
chemformula-manual.tex
chemformula-manual.pdf
chemformula-manual.cls
README
HISTORY
--------------------------------------------------------------------------
If you have any ideas, questions, suggestions or bugs to report, please
feel free to contact me.
Expand Down
28 changes: 26 additions & 2 deletions chemformula-manual.cls
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
\ProvidesClass{chemformula-manual}[2022/01/07]
\ProvidesClass{chemformula-manual}[2022/01/23]

\LoadClass[load-preamble,add-index]{cnltx-doc}
\RequirePackage{imakeidx}
Expand Down Expand Up @@ -301,6 +301,30 @@
\itemize\let\change\item
}{\enditemize}

\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-font-command=\libertineLF
}

\chemformula@add@version{2012-01-28}{3.0}
\chemformula@add@version{2012-01-30}{3.0a}
\chemformula@add@version{2012-02-03}{3.0b}
Expand Down Expand Up @@ -360,6 +384,6 @@
\chemformula@add@version{2020-03-07}{4.15j}
\chemformula@add@version{2020-03-15}{4.15k}
\chemformula@add@version{2020-12-22}{4.16}
\chemformula@add@version{2022-01-07}{4.17}
\chemformula@add@version{2022-01-23}{4.17}

\endinput
65 changes: 29 additions & 36 deletions chemformula-manual.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% !arara: pdflatex
% !arara: biber
% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex
% --------------------------------------------------------------------------
Expand Down Expand Up @@ -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-font-command=\libertineLF
}

\addbibresource{\jobname.bib}
\begin{filecontents*}{\jobname.bib}
@book{iupac:greenbook,
Expand Down Expand Up @@ -231,7 +206,7 @@ \section{Stoichiometric Factors}
(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.
Expand All @@ -246,9 +221,14 @@ \section{Stoichiometric Factors}
\keybool{stoich-paren-parse}\Default{false}
If set to true stoichiometric factors enclosed by parentheses also are
parsed.
\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 adjust how stoichiometric
factors are printed.
\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}
Expand Down Expand Up @@ -356,11 +336,6 @@ \subsection{Commands}
\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
Expand Down Expand Up @@ -1016,6 +991,16 @@ \subsection{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}
Expand Down Expand Up @@ -1188,7 +1173,8 @@ \subsection{Customization}
\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.
Expand Down Expand Up @@ -1574,6 +1560,13 @@ \section{History Since Version~4.0}
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}
Loading

0 comments on commit 4dded0a

Please sign in to comment.