summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/chemnum/chemnum_en.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-03 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2019-10-03 03:00:57 +0000
commit93c3758895674cc9ea3e8aaeeb3cf5d1bdc0e3be (patch)
tree5150bfff26491c4e57ddff629e62b4066295a925 /macros/latex/contrib/chemnum/chemnum_en.tex
parentd94b7a8c132734a1bc4046d54a75c7882c4c2619 (diff)
CTAN sync 201910030300
Diffstat (limited to 'macros/latex/contrib/chemnum/chemnum_en.tex')
-rw-r--r--macros/latex/contrib/chemnum/chemnum_en.tex238
1 files changed, 128 insertions, 110 deletions
diff --git a/macros/latex/contrib/chemnum/chemnum_en.tex b/macros/latex/contrib/chemnum/chemnum_en.tex
index a5abd7365d..f6da470d1d 100644
--- a/macros/latex/contrib/chemnum/chemnum_en.tex
+++ b/macros/latex/contrib/chemnum/chemnum_en.tex
@@ -1,8 +1,36 @@
-% arara: pdflatex: { shell: on }
-%! arara: pdflatex: { shell: on }
-% arara: biber
-% arara: pdflatex
-% arara: pdflatex
+% --------------------------------------------------------------------------
+% the CHEMNUM package
+%
+% a comprehensive approach for the numbering of chemical compounds
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% --------------------------------------------------------------------------
+% https://github.org/cgnieder/chemnum/
+% contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+% Copyright 2011--2019 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% !arara: pdflatex: { shell: on , interaction: nonstopmode }
+% !arara: pdflatex: { shell: on , interaction: nonstopmode }
+% !arara: biber
+% arara: pdflatex: { interaction: nonstopmode }
+% arara: pdflatex: { interaction: nonstopmode }
\documentclass[load-preamble+,ngerman,british,american]{cnltx-doc}
\usepackage[utf8]{inputenc}
\usepackage{chemnum}
@@ -47,7 +75,7 @@
keyis,
marginnote, midrule,
NewDocumentCommand,
- schemestart,schemestop,setatomsep,
+ schemestart,schemestop,setchemfig,
theffbibliography, toprule
} ,
index-setup = { othercode=\footnotesize,level=\addsec },
@@ -60,11 +88,13 @@
\usepackage{chemformula}
\setchemformula{format=\libertineLF}
\usepackage{chemfig,relsize}
-\setatomsep{1.78500 em}
-\setbondstyle{line width = 0.06642 em}
+\setchemfig{
+ atom sep = 1.78500 em ,
+ bond style = {line width = 0.06642 em}
+}
\renewcommand*\printatom[1]{\textsmaller{\ensuremath{\mathsf{#1}}}}
-\usepackage{array,booktabs}
+\usepackage{array,booktabs,csquotes}
\usepackage{graphicx}
@@ -112,57 +142,6 @@
\pkg{chemgreek}~\cite{pkg:chemgreek} and the \pkg{psfrag}~\cite{pkg:psfrag}
package.
-\section{News}\label{sec:news}
-The \chemnum\ package has been my first attempt to create a comprehensive
-labeling package for chemical compounds. However, it had and has more than
-one weakness and its code was -- to be frank -- a mess. Version~1 is now a
-complete re-write of \chemnum\ where I tried to achieve several points:
-\begin{itemize}
- \item A cleaner code internally.
- \item A cleaner user interface, \ie, more user macros for different tasks, a
- unified naming of the commands and a less redundant naming of the
- options.
- \item Extended functionality such as sorting and compressing of sublabel
- lists and sorting and merging of main label lists.
-\end{itemize}
-
-Although the syntax seems more or less the same at first sight quite a number
-of changes have been made that make version~1 incompatible with version~0.
-While I thought a while about maintaining backwards compatibility version~0
-was known to be in an experimental stage where everything was allowed to be
-changed at any time. So users \emph{could} know there was a risk. I have a
-feeling that many users nevertheless didn't realize this and may be bothered
-by this incompatibility. So I am well aware that the update will
-inconvenience some users. However, since version~0 won't be updated any more
-it made more sense to make a breaking update once.
-
-The same is not true for version~1. The syntax and commands described in this
-manual will not be changed as easily and from this version on I will take care
-of backwards compatibility.
-
-For those people wanting to keep older versions: they are are still available
-from websites such as \website{ctanhg.scharrer-online.de} or
-\securewebsite{bitbucket.org/cgnieder/chemnum}. You can also email me for an
-older version.
-
-Many commands have got a new name! The most important ones are:
-\begin{itemize}
- \item \cs*{cmpdref}; this is now called \cs{replacecmpd}.
- \item \cs*{cmpdinit}; this is now called \cs{initcmpd}.
- \item \cs*{cmpdreset}; this is now called \cs{resetcmpd}.
- \item \cs*{cmpdsetup}; this is now called \cs{setchemnum}.
-\end{itemize}
-However, there are many more changes. Basically all options have new names
-and often do their thing slightly different from the way things have been
-before.
-
-Please note that this overall change does not mean that version~1 is version~0
-declared stable. It is very likely that version~1 will now have quite a
-number of bugs to be fixed and probably missing features, too. So I'd be very
-glad to receive feedback either on \chemnum's homepage
-\securewebsite{github.com/cgnieder/chemnum} or via email to
-\email{contact@mychemistry.eu}.
-
\section{Overview over the Available Commands}\label{sec:overv-over-avail}
This section lists all available commands with a brief description. Commands
@@ -198,7 +177,7 @@ Most of the commands will be explained in a later section in more detail.
section~\ref{sec:deta-comp-labels}.
\command{replacecmpd}[\code{+}\oarg{options}\marg{\ac{id}}]
A command for replacing tags in \ac{eps} files, see
- section~\ref{sec:replacing-tags-aceps} for details.
+ section~\ref{sec:replacing-tags-eps-ps} for details.
\command{initcmpd}[\oarg{options}\marg{list of \acp{id}}]
Initiate compound labels. This command can only be used in the preamble.
It is desribed in section~\ref{sec:deta-comp-labels}.
@@ -329,7 +308,7 @@ see section~\ref{sec:chang-input-mark} for details.
More than one label can be put inside \cs{cmpd}, separated by commas. Then
a list like \cmpd{a, b, c, e, g.two} is printed.
\end{example}
-The Harvard comma (see section~\ref{sec:lang-depend-sett}) in \code{, and}
+The Harvard comma (see section~\ref{sec:lang-depend-sett}) in \enquote{\code{, and}}
between \cmpd{e} and \cmpd{g.two} suggests that there are options to customize
the list, see section~\ref{sec:formatting-labels} for more on this.
@@ -608,10 +587,14 @@ command. They are marked with \module{replace}.
\keybool{merge}\Module{both (l)}\Default{false}
If set to true a list of labels is merged, \ie,
``\cmpd{q.five,a,q.two}'' becomes ``\cmpd[merge=true]{q.five,a,q.two}''.
- \keyval{pre-label-code}{code}\Module{cmpd (g)}\Default
+ \keyval{pre-label-code}{code}\Module{both (g)}\Default
Code to be inserted before a label.
- \keyval{post-label-code}{code}\Module{cmpd (g)}\Default
+ \keyval{post-label-code}{code}\Module{both (g)}\Default
Code to be inserted after a label.
+ \keyval{pre-main-label-code}{code}\Module{both (g)}\Default
+ \sinceversion{1.2a}Code to be inserted before a main label.
+ \keyval{post-main-label-code}{code}\Module{both (g)}\Default
+ \sinceversion{1.2a}Code to be inserted after a main label.
\keyval{main-sub-sep}{code}\Module{both (l)}\Default{.}
The separator symbol that is used in \cs{cmpd} to separate the \meta{main
\ac{id}} from a \meta{sub \ac{id}}.
@@ -855,9 +838,9 @@ explicitly will overwrite the language sensitivity. If you only want to adapt
the separators to your language have a look at
section~\ref{sec:lang-depend-sett}.
-\section{Replacing Tags in \ac{eps} or \ac{ps} Files}\label{sec:replacing-tags-aceps}
+\section{Replacing Tags in \ac{eps} or \ac{ps} Files}\label{sec:replacing-tags-eps-ps}
-Although it is quite possible to create rection schemes within \LaTeX\
+Although it is quite possible to create reaction schemes within \LaTeX\
directly -- for example with the \pkg{chemfig} package~\cite{pkg:chemfig} --
many people prefer to use a program such as \textsc{ChemDraw} for it. In
order to be able to use the labels with such schemes as well the following
@@ -865,11 +848,18 @@ method is usually used:
\begin{itemize}
\item Create the scheme and place temporary tags like \code{TMP1},
\code{TMP2} and so on where you want the compound labels to be.
- \item Export the scheme as \ac{eps} or \ac{ps} figure where you make sure
- that the tags are embedded as text strings.
+ \item Export the scheme as \ac{eps} or \ac{ps} figure \emph{where you make
+ sure that the tags are embedded as text strings}. If the tags are not
+ present as text strings they cannot be replaced. This is a common source
+ of user problems.
\item Include the \ac{eps} with \cs*{includegraphics}. Right before that
use \cs{replacecmpd} once for every temporary tag.
\end{itemize}
+\emph{For the actual replacement please make sure that you compile with
+ \code{shell-escape} enabled. If you compile with \code{pdflatex} you
+ probably also need \pkg{auto-pst-pdf}~\cite{pkg:auto-pst-pdf} loaded. In
+ subsequent runs load it with option \code{off} when you turned off
+ \code{shell-escape}.}
\begin{commands}
\command{replacecmpd}[\code{+}\oarg{options}\marg{\ac{id}}]
@@ -894,7 +884,7 @@ The tags now can be replaced with labels. The result is shown in
figure~\ref{fig:scheme-tmp-tags-replaced}.
\begin{example}[compile,exe-with={--shell-escape},runs=1,float=htbp,caption={A scheme with
temporary tags replaced with labels.\label{fig:scheme-tmp-tags-replaced}}]
- % code for figure 2
+ % code for figure 2 -- compiled with shell-escape enabled
\documentclass{standalone}
\usepackage{graphicx,auto-pst-pdf,chemnum}
\begin{document}
@@ -971,7 +961,7 @@ respect to the \ac{ps} box that is replaced. This is described in
\begin{example}[compile,exe-with={--shell-escape},runs=1,float=htbp,caption={A scheme with
arbitrary tags replaced with labels.\label{fig:scheme-bla-tags-replaced}}]
- % code for figure 4
+ % code for figure 4 -- compiled with shell-escape enabled
\documentclass{standalone}
\usepackage{graphicx,auto-pst-pdf,chemnum}
\begin{document}
@@ -1025,6 +1015,11 @@ wrong please write me an email and I'll add your language or fix the wrong
translation.
\begin{table}[htbp]
+ \newcommand*\showlanguageentry[1]{%
+ #1
+ & \visualizespaces{\GetTranslationFor{#1}{chemnum-sep-two}}
+ & \visualizespaces{\GetTranslationFor{#1}{chemnum-sep-last-two}}
+ }
\centering
\caption{Available languages}
\label{tab:languages}
@@ -1034,45 +1029,19 @@ translation.
\bfseries chemnum-sep-two &
\bfseries chemnum-sep-last-two \\
\midrule
- English
- & \visualizespaces{\GetTranslationFor{English}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{English}{chemnum-sep-last-two}} \\
- American
- & \visualizespaces{\GetTranslationFor{American}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{American}{chemnum-sep-last-two}} \\
- German
- & \visualizespaces{\GetTranslationFor{German}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{German}{chemnum-sep-last-two}} \\
- French
- & \visualizespaces{\GetTranslationFor{French}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{French}{chemnum-sep-last-two}} \\
- Spanish
- & \visualizespaces{\GetTranslationFor{Spanish}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Spanish}{chemnum-sep-last-two}} \\
- Italian
- & \visualizespaces{\GetTranslationFor{Italian}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Italian}{chemnum-sep-last-two}} \\
- Catalan
- & \visualizespaces{\GetTranslationFor{Catalan}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Catalan}{chemnum-sep-last-two}} \\
- Portuguese
- & \visualizespaces{\GetTranslationFor{Portuguese}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Portuguese}{chemnum-sep-last-two}} \\
- Dutch
- & \visualizespaces{\GetTranslationFor{Dutch}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Dutch}{chemnum-sep-last-two}} \\
- Danish
- & \visualizespaces{\GetTranslationFor{Danish}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Danish}{chemnum-sep-last-two}} \\
- Swedish
- & \visualizespaces{\GetTranslationFor{Swedish}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Swedish}{chemnum-sep-last-two}} \\
- Finnish
- & \visualizespaces{\GetTranslationFor{Finnish}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Finnish}{chemnum-sep-last-two}} \\
- Norwegian
- & \visualizespaces{\GetTranslationFor{Norwegian}{chemnum-sep-two}}
- & \visualizespaces{\GetTranslationFor{Norwegian}{chemnum-sep-last-two}} \\
+ \showlanguageentry{English} \\
+ \showlanguageentry{American} \\
+ \showlanguageentry{German} \\
+ \showlanguageentry{French} \\
+ \showlanguageentry{Spanish} \\
+ \showlanguageentry{Italian} \\
+ \showlanguageentry{Catalan} \\
+ \showlanguageentry{Portuguese} \\
+ \showlanguageentry{Dutch} \\
+ \showlanguageentry{Danish} \\
+ \showlanguageentry{Swedish} \\
+ \showlanguageentry{Finnish} \\
+ \showlanguageentry{Norwegian} \\
\bottomrule
\end{tabular}
\end{table}
@@ -1173,6 +1142,55 @@ above commands are defined in terms of them:
\NewDocumentCommand\subcmpdshowref{mm}{\chemnumshowref{#2}}
\end{sourcecode}
-\end{document}
+\section{From Version~0 to Version~1}\label{sec:news}
+The \chemnum\ package has been my first attempt to create a comprehensive
+labeling package for chemical compounds. However, it had and has more than
+one weakness and its code was -- to be frank -- a mess. Version~1 is now a
+complete re-write of \chemnum\ where I tried to achieve several points:
+\begin{itemize}
+ \item A cleaner code internally.
+ \item A cleaner user interface, \ie, more user macros for different tasks, a
+ unified naming of the commands and a less redundant naming of the
+ options.
+ \item Extended functionality such as sorting and compressing of sublabel
+ lists and sorting and merging of main label lists.
+\end{itemize}
+Although the syntax seems more or less the same at first sight quite a number
+of changes have been made that make version~1 incompatible with version~0.
+While I thought a while about maintaining backwards compatibility version~0
+was known to be in an experimental stage where everything was allowed to be
+changed at any time. So users \emph{could} know there was a risk. I have a
+feeling that many users nevertheless didn't realize this and may be bothered
+by this incompatibility. So I am well aware that the update will
+inconvenience some users. However, since version~0 won't be updated any more
+it made more sense to make a breaking update once.
+The same is not true for version~1. The syntax and commands described in this
+manual will not be changed as easily and from this version on I will take care
+of backwards compatibility.
+
+For those people wanting to keep older versions: they are are still available
+from websites such as \website{ctanhg.scharrer-online.de} or
+\securewebsite{bitbucket.org/cgnieder/chemnum}. You can also email me for an
+older version.
+
+Many commands have got a new name! The most important ones are:
+\begin{itemize}
+ \item \cs*{cmpdref}; this is now called \cs{replacecmpd}.
+ \item \cs*{cmpdinit}; this is now called \cs{initcmpd}.
+ \item \cs*{cmpdreset}; this is now called \cs{resetcmpd}.
+ \item \cs*{cmpdsetup}; this is now called \cs{setchemnum}.
+\end{itemize}
+However, there are many more changes. Basically all options have new names
+and often do their thing slightly different from the way things have been
+before.
+
+Please note that this overall change does not mean that version~1 is version~0
+declared stable. It is very likely that version~1 will now have quite a
+number of bugs to be fixed and probably missing features, too. So I'd be very
+glad to receive feedback either on \chemnum's homepage
+\securewebsite{github.com/cgnieder/chemnum} or via email to
+\email{contact@mychemistry.eu}.
+
+\end{document}