summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-09-18 23:48:11 +0000
committerKarl Berry <karl@freefriends.org>2012-09-18 23:48:11 +0000
commit6dbf95e6f69a899e605c2261656ccda22df60e4e (patch)
tree0ccaa4f57f270e37b1013418e3ccb3de95b3bdcf /Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex
parent18bcd998ac1d2e58f992953b84366906ff3f86eb (diff)
chemnum (18sep12)
git-svn-id: svn://tug.org/texlive/trunk@27728 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex506
1 files changed, 377 insertions, 129 deletions
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex
index fc6c9ff3f04..61e4700dcf8 100644
--- a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex
+++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex
@@ -106,15 +106,25 @@
\selectlanguage{english}\cmpdreset
\section{A very short readme}
-\chemnum \CNversion\ underlies the \LaTeX\ Project Public License Version 1.3 or later. (\url{http://www.latex-project.org/lppl.txt})
+\chemnum \CNversion\ underlies the \LaTeX\ Project Public License Version 1.3 or
+later. (\url{http://www.latex-project.org/lppl.txt})
-\chemnum internally loads the packages \paket*{expl3} and \paket{xparse}. \paket{xparse} is part of the \paket{l3packages} bundle, \paket*{expl3} is part of the \paket{l3kernel} bundle. This means, \chemnum needs \LaTeX3 Support.
+\chemnum internally loads the packages \paket*{expl3} and \paket{xparse}.
+\paket{xparse} is part of the \paket{l3packages} bundle, \paket*{expl3} is part
+of the \paket{l3kernel} bundle. This means, \chemnum needs \LaTeX3 Support.
-\chemnum also needs the packages \paket{etoolbox}, \paket{psfrag} and either \paket{textgreek} or \paket{bm}, see section~\ref{sec:package_options}.
+\chemnum also needs the packages \paket{etoolbox}, \paket{psfrag} and either
+\paket{textgreek} or \paket{bm}, see section~\ref{sec:package_options}.
\section{News and a word of apology}
\subsection{Version 0.4}
-In the update to v0.4 there have been some changes made with the options. There are a few new ones and some of the old ones got new names. They now have consistent names which in my opinion better reflect their function. This means that your documents set with an older version of \chemnum might not compile any more without errors. I am sorry for that. \chemnum still is actively developped. Once it reaches v1.0, such changes won't be made any more\footnote{Or only in absolutely necessary cases.}.
+In the update to v0.4 there have been some changes made with the options. There
+are a few new ones and some of the old ones got new names. They now have consistent
+names which in my opinion better reflect their function. This means that your
+documents set with an older version of \chemnum might not compile any more without
+errors. I am sorry for that. \chemnum still is actively developped. Once it reaches
+v1.0, such changes won't be made any more\footnote{Or only in absolutely necessary
+cases.}.
These options have new names:
\begin{center}
@@ -132,24 +142,32 @@ These ones are new:
\begin{center}
\begin{tabular}{ll}\toprule
\bfseries key & \bfseries short info \\\midrule
- \key{sublist-output-sep} & list separation in the output of labels like \cmpd{bsp.{one,two}}, see page \pageref{sssec:list-output-sep}. \\
- \key{sublist-input-sep} & list separation in the input of labels like \cmpd{bsp.{one,two}}, see page \pageref{sssec:list-input-sep}. \\
+ \key{sublist-output-sep} & list separation in the output of labels like
+ \cmpd{bsp.{one,two}}, see page \pageref{sssec:list-output-sep}. \\
+ \key{sublist-input-sep} & list separation in the input of labels like
+ \cmpd{bsp.{one,two}}, see page \pageref{sssec:list-input-sep}. \\
\key{init-input-sep} & input in \cmd{cmpdinit}, see page \pageref{sssec:init-input-sep}. \\
\key{hyper-use} & usage of hyperlinks, see page \pageref{sec:hyperref}. \\
\key{hyper-target} & \\
\key{hyper-link} & \\
- \key{ref-style} & Output of labels with \cmd{cmpdref}, see pages \pageref{ssec:cmpdref} and \pageref{ssec:schriftstil}. \\\bottomrule
+ \key{ref-style} & Output of labels with \cmd{cmpdref}, see
+ pages \pageref{ssec:cmpdref} and \pageref{ssec:schriftstil}. \\\bottomrule
\end{tabular}
\end{center}
-Also new is the way how lists and ranges of sublabels are input. The option \key{sub-list} no longer exists. More on this in section~\ref{ssec:sub_ranges}.
+Also new is the way how lists and ranges of sublabels are input. The option
+\key{sub-list} no longer exists. More on this in section~\ref{ssec:sub_ranges}.
-Then there is the possibility of creating hyperlinked labels together with the package \paket{hyperref}, see section~\ref{sec:hyperref}.
+Then there is the possibility of creating hyperlinked labels together with the
+package \paket{hyperref}, see section~\ref{sec:hyperref}.
\subsection{Version 0.5}
-With v0.5 there is a new option \key{ref-pos} which allows to change the positioning options of the \cmd{psfrag} command that is used by the \cmd{cmpdref} command internally, see p.\,\pageref{ssec:marker_in_bildern}.
+With v0.5 there is a new option \key{ref-pos} which allows to change the positioning
+options of the \cmd{psfrag} command that is used by the \cmd{cmpdref} command
+internally, see p.\,\pageref{ssec:marker_in_bildern}.
-\achtung{The optional arguments of \cmd{cmpdref} have changed their order, see p.\,\pageref{ssec:cmpdref}!}
+\achtung{The optional arguments of \cmd{cmpdref} have changed their order, see
+p.\,\pageref{ssec:cmpdref}!}
\section{Package options}\label{sec:package_options}\secidx{Package options}
\chemnum has one package option.
@@ -160,29 +178,56 @@ This document was set with \verb+\usepackage[textgreek]{chemnum}+.
\secidx*{Package options}
\section{Motivation}
-As far as I know there are three packages that are meant to help with numbering chemical compounds. All of them have their weaknesses.
+As far as I know there are three packages that are meant to help with numbering
+chemical compounds. All of them have their weaknesses.
-The first one -- \paket{chemcono} -- redefined bibliography commands for that purpose. Compounds have to be declared in what is called \verb=\theffbibliography=. Then one can reference them with \verb=\fcite=. However, it produces a list of compounds in the text. So the package author suggests:
+The first one -- \paket{chemcono} -- redefined bibliography commands for that
+purpose. Compounds have to be declared in what is called \verb=\theffbibliography=.
+Then one can reference them with \verb=\fcite=. However, it produces a list of
+compounds in the text. So the package author suggests:
\begin{zitat}[Stefan Schulz]
After compilation and printout, discard the last page.
\end{zitat}
Obviously that's not a perfect solution.
-The second one -- \paket{chemcompounds} -- was written, because the author didn't want to work with the weaknesses of \paket{chemcono} any more. When he wrote the package he basically used the same mechanism to create the labels as \paket{chemcono} did.
+The second one -- \paket{chemcompounds} -- was written, because the author didn't
+want to work with the weaknesses of \paket{chemcono} any more. When he wrote the
+package he basically used the same mechanism to create the labels as \paket{chemcono}
+did.
\begin{zitat}[Stephan Schenk]
- When taking a closer look at the chemcono package, I realised that the only thing one has to do is to get rid of everything which produces text. Thus, as a basis I used the mechanism of \verb=\bibitem= and \verb=\cite= in pretty much the same way as \paket{chemcono} does by extracting the corresponding code from \verb=article.cls= and \verb=latex.ltx= but deleting any unnecessary commands producing output. I also introduced several lines of code to make the printing of the compound names more customisable.
+ When taking a closer look at the chemcono package, I realised that the only thing
+ one has to do is to get rid of everything which produces text. Thus, as a basis I
+ used the mechanism of \verb=\bibitem= and \verb=\cite= in pretty much the same way
+ as \paket{chemcono} does by extracting the corresponding code from \verb=article.cls=
+ and \verb=latex.ltx= but deleting any unnecessary commands producing output. I
+ also introduced several lines of code to make the printing of the compound names
+ more customisable.
\end{zitat}
Some points still left me unsatisfied, though:
\begin{enumerate}
- \item Compounds usually need to be declared with \verb=\declarecompound=. They need to be declared in any case if you need a label like \cmpd{bsp.one}. Then, one even needs to choose the label by hand, what somehow undermines the automatic numbering principle.
+ \item Compounds usually need to be declared with \verb=\declarecompound=. They
+ need to be declared in any case if you need a label like \cmpd{bsp.one}. Then,
+ one even needs to choose the label by hand, what somehow undermines the automatic
+ numbering principle.
\item The layout can't be changed for a single label but only for all.
- \item The numbers can't be reset. \emph{Although in most cases this is neither necessary nor can it be recommended}, there can be individual cases where this would be useful.
- \item A list of several compounds \verb=\compound{a,b,c}= can only be customized with more effort than what would be convenient.
+ \item The numbers can't be reset. \emph{Although in most cases this is neither
+ necessary nor can it be recommended}, there can be individual cases where this
+ would be useful.
+ \item A list of several compounds \verb=\compound{a,b,c}= can only be customized
+ with more effort than what would be convenient.
\end{enumerate}
-Then there is \paket{bpchem}, which provides commands similar to \verb=\label= \verb=\ref=: \verb=\CNlabel{}=, \verb=\CNlabelnoref{}= and \verb=\CNref{}=. It provides commands for sublabels, too: \verb=\CNlabelsub{}{}=, \verb=\CNlabelsubnoref{}{}= and \verb=\CNrefsub{}{}=. This makes it more flexible than the others regarding sublabels. However, it barely provides possibilities to customize the labels, lists are not possible and the fact that there are different commands for labels and sublabels isn't the best solution, either.
+Then there is \paket{bpchem}, which provides commands similar to \verb=\label=
+\verb=\ref=: \verb=\CNlabel{}=, \verb=\CNlabelnoref{}= and \verb=\CNref{}=. It
+provides commands for sublabels, too: \verb=\CNlabelsub{}{}=, \verb=\CNlabelsubnoref{}{}=
+and \verb=\CNrefsub{}{}=. This makes it more flexible than the others regarding sublabels.
+However, it barely provides possibilities to customize the labels, lists are not
+possible and the fact that there are different commands for labels and sublabels
+isn't the best solution, either.
-\chemnum is intended to fill these gaps. For this all commands have been written from scratch. Some of the ideas of \paket{chemcompounds} \eg regarding delimiters and layout have been picked up, though.
+\chemnum is intended to fill these gaps. For this all commands have been written
+from scratch. Some of the ideas of \paket{chemcompounds} \eg regarding delimiters
+and layout have been picked up, though.
If you notice any feature missing, please let me know by sending me an email.
@@ -192,29 +237,41 @@ The main command of this package is this one:
\begin{beschreibung}
\Befehl{cmpd}{<label name>}
\end{beschreibung}
-When \code{<label name>} is used the first time, the label is created, saved (= declared) and printed. Each further use just prints the label.
+When \code{<label name>} is used the first time, the label is created, saved (=
+declared) and printed. Each further use just prints the label.
\begin{beispiel}
- Compounds \cmpd{a} and \cmpd{b} are declared and can be used any time: \cmpd{a}. No pre-declaring is necessary. Compounds like \cmpd{c} are numbered in the order they appear in the text.\par
+ Compounds \cmpd{a} and \cmpd{b} are declared and can be used any time: \cmpd{a}.
+ No pre-declaring is necessary. Compounds like \cmpd{c} are numbered in the order
+ they appear in the text.\par
Once again: \cmpd{b}, \cmpd{a}, \cmpd{c}.
\end{beispiel}
-If it is necessary to declare a compound without printing the label, this is possible with
+If it is necessary to declare a compound without printing the label, this is
+possible with
\begin{beschreibung}
\Befehl[cmpda]{cmpd*}\ma{<label name>}\label{cmd:unsichtbares_label}
\end{beschreibung}
This declares the label but doesn't print anything.
-\achtung{This command is not needed when \cmd{cmpdinit} is used, see section~\ref{sec:cmpdinit} (pages~\pageref{sec:cmpdinit}ff).}
+\achtung{This command is not needed when \cmd{cmpdinit} is used, see
+section~\ref{sec:cmpdinit} (pages~\pageref{sec:cmpdinit}ff).}
\begin{beispiel}
- The hidden version\cmpd*{d} declares the label but doesn't print anything. The next \cmpd{e} continues to count with the next number. With \cmpd{d} the label can be used, of course.
+ The hidden version\cmpd*{d} declares the label but doesn't print anything. The
+ next \cmpd{e} continues to count with the next number. With \cmpd{d} the label
+ can be used, of course.
\end{beispiel}
-You can pretty much use what you like for a label name except for the separator symbols (see sections~\ref{ssec:unterlabel}, \ref{ssec:listen}, \ref{ssec:sub_ranges} and \ref{ssec:trenner}). You shouldn't leave blanks in the name, though. This may not cause an error at all, but \emph{could} declare different compounds with the same name.
+You can pretty much use what you like for a label name except for the separator
+symbols (see sections~\ref{ssec:unterlabel}, \ref{ssec:listen}, \ref{ssec:sub_ranges}
+and \ref{ssec:trenner}). You shouldn't leave blanks in the name, though. This may
+not cause an error at all, but \emph{could} declare different compounds with the
+same name.
\lstset{showspaces=true}
\begin{beispiel}
- \cmpd{aa }, \cmpd{a a }, \cmpd{a a}, \cmpd{ a a}, \cmpd{ aa} and \cmpd{ aa } all have the same label. As well as \cmpd{aa }, \cmpd{a a}, \cmpd{ aa} and \cmpd{aa}.
+ \cmpd{aa }, \cmpd{a a }, \cmpd{a a}, \cmpd{ a a}, \cmpd{ aa} and \cmpd{ aa }
+ all have the same label. As well as \cmpd{aa }, \cmpd{a a}, \cmpd{ aa} and \cmpd{aa}.
\end{beispiel}
\lstset{showspaces=false}\secidx*{Main command}
@@ -223,9 +280,13 @@ If you want a label like \cmpd{a.one}, you need to use the following syntax:
\begin{beschreibung}
\Befehl{cmpd}{<label name>.<subname>}
\end{beschreibung}
-\code{<label name>} is the main name which stays the same, \code{<subname>} varies. This syntax means that the point \code{.} \emph{cannot} be a part of \code{<label name>} or \code{<subname>}. Instead of the point you also can use another symbol, see section~\ref{sssec:sub-input-sep}.
+\code{<label name>} is the main name which stays the same, \code{<subname>} varies.
+This syntax means that the point \code{.} \emph{cannot} be a part of \code{<label name>}
+or \code{<subname>}. Instead of the point you also can use another symbol, see
+section~\ref{sssec:sub-input-sep}.
\begin{beispiel}
- \cmpd{f.one} and \cmpd{f.two} are related, as are \cmpd{g.one} and \cmpd{g.two}. Of course, these labels can be used again: \cmpd{g.two} and \cmpd{f.one}.
+ \cmpd{f.one} and \cmpd{f.two} are related, as are \cmpd{g.one} and \cmpd{g.two}.
+ Of course, these labels can be used again: \cmpd{g.two} and \cmpd{f.one}.
\end{beispiel}
This also works, if the main name has already been used.
@@ -238,7 +299,8 @@ The same way the main name of combined labels can be used solely.
\cmpd{f} and \cmpd{g}
\end{beispiel}
-How you can create a label like \cmpd{f.{one,two}} is explained in section~\ref{ssec:sub_ranges}.
+How you can create a label like \cmpd{f.{one,two}} is explained in
+section~\ref{ssec:sub_ranges}.
\secidx*{Sublabel}
\subsection{Lists}\label{ssec:listen}\secidx{Lists}
@@ -248,34 +310,48 @@ The right description would be something like:
\begin{beschreibung}
\Befehl{cmpd}{<(possibly comma separated list of) label name(s)>}
\end{beschreibung}
-This means that with default settings the comma can't be part of the label name unless hidden in braces. You can change that, see section~\ref{sssec:list-input-sep} on page~\pageref{sssec:list-input-sep}. Section~\ref{sssec:input-sep-bsp} shows an example how a changed input could look like.
+This means that with default settings the comma can't be part of the label name
+unless hidden in braces. You can change that, see section~\ref{sssec:list-input-sep}
+on page~\pageref{sssec:list-input-sep}. Section~\ref{sssec:input-sep-bsp} shows
+an example how a changed input could look like.
\begin{beispiel}
- More than one label can be put inside \verb=\cmpd=, separated by commas. Then a list like \cmpd{a, b, c, e, g.two} is printed.
+ More than one label can be put inside \verb=\cmpd=, separated by commas. Then a
+ list like \cmpd{a, b, c, e, g.two} is printed.
\end{beispiel}
-The Harvard comma (see~\ref{ssec:harvard-comma}) in \code{, and} between \cmpd{e} and \cmpd{g.two} suggests that there are options to customize the list, see sections~\ref{ssec:trenner} and \ref{sec:language_support}.
+The Harvard comma (see~\ref{ssec:harvard-comma}) in \code{, and} between \cmpd{e}
+and \cmpd{g.two} suggests that there are options to customize the list, see
+sections~\ref{ssec:trenner} and \ref{sec:language_support}.
\secidx*{Lists}
\subsection{Lists and ranges of sublabels}\label{ssec:sub_ranges}\index{Sublabel!lists}\index{Sublabel!ranges}
-Sometimes it can be useful to display a label with a list or a range of sublabels. Suppose you have compounds \cmpd{q.one,q.two,q.three,q.four,q.five} which for example differ in their substituents. It can be useful to refer to them all at once: \cmpd[cmpd-all]{q}.
+Sometimes it can be useful to display a label with a list or a range of sublabels.
+Suppose you have compounds \cmpd{q.one,q.two,q.three,q.four,q.five} which for
+example differ in their substituents. It can be useful to refer to them all at
+once: \cmpd[cmpd-all]{q}.
The syntax is rather intuitive -- you just input a list of sublabels:
\begin{beispiel}
list of labels: \cmpd{q.one, q.two, q.three, q.four, q.five}\\
label with list of sublabels: \cmpd{q.{one,two,three,four,five}}
\end{beispiel}
-Since the sublist is input with a comma in the default setting, you have to put them into braces.
+Since the sublist is input with a comma in the default setting, you have to put
+them into braces.
-Using this syntax you also can create ranges of sublabels. As a marker to indicate the range \chemnum uses two points \verb=..=.
+Using this syntax you also can create ranges of sublabels. As a marker to indicate
+the range \chemnum uses two points \verb=..=.
\begin{beispiel}
\cmpd{q.{two..four}}\\
\cmpd{q.{one,three..five}}\\
\cmpd{q.{one..three,five}}
\end{beispiel}
-This means you can neither use the comma nor the two points as part of a sublabel name. How you can use other markers for the input you can read in sections~\ref{sssec:range-input-sep} and \ref{sssec:list-input-sep}.
+This means you can neither use the comma nor the two points as part of a sublabel
+name. How you can use other markers for the input you can read in
+sections~\ref{sssec:range-input-sep} and \ref{sssec:list-input-sep}.
-\chemnum provides an option (see section~\ref{sec:cmpdsetup} for more details), with which all sublabels of a main label can be printed as range.
+\chemnum provides an option (see section~\ref{sec:cmpdsetup} for more details),
+with which all sublabels of a main label can be printed as range.
\begin{beschreibung}
\Option{cmpd-all}{\default{true}/false}
\end{beschreibung}
@@ -283,9 +359,13 @@ This means you can neither use the comma nor the two points as part of a sublabe
\cmpd[cmpd-all]{q}
\end{beispiel}
-In order to get the right sublabels the command needs to know, which sublabels have been declared. This means that they're read from the \verb=\jobname.cmpd= file (supposing your source file is called \verb=\jobname.tex=). So you may need to compile twice (or more) until the labels are printed right.
+In order to get the right sublabels the command needs to know, which sublabels
+have been declared. This means that they're read from the \verb=\jobname.cmpd=
+file (supposing your source file is called \verb=\jobname.tex=). So you may need
+to compile twice (or more) until the labels are printed right.
-If one uses label with sublabel ranges, one might want to use \emph{only} the sublabels in a different place. This is possible with this option:
+If one uses label with sublabel ranges, one might want to use \emph{only} the
+sublabels in a different place. This is possible with this option:
\begin{beschreibung}
\Option{sub-only}{\default{true}/false}
\end{beschreibung}
@@ -302,22 +382,31 @@ If one uses label with sublabel ranges, one might want to use \emph{only} the su
\end{tabular}
\end{beispiel}
-Ranges of sublabels require some care. For one thing one has to know which sublabel is the lower one and which is the higher one. Then one has to know which labels are in between them and what do they represent. As \chemnum can't take care for you, you need to do that for yourself if you want to avoid labels like these:
+Ranges of sublabels require some care. For one thing one has to know which
+sublabel is the lower one and which is the higher one. Then one has to know which
+labels are in between them and what do they represent. As \chemnum can't take care
+for you, you need to do that for yourself if you want to avoid labels like these:
\begin{beispiel}
\cmpd{q.{five..three}} or \cmpd{q.{three,one,four}}.
\end{beispiel}
\section{Initialize labels at once}\label{sec:cmpdinit}\secidx{Initialize labels}
-The commands described in this section are not essential for the usage of \chemnum, but provide additional functionality that some users might find useful.
+The commands described in this section are not essential for the usage of \chemnum,
+but provide additional functionality that some users might find useful.
\subsection{Usage}
\subsubsection{Main labels}
-Perhaps you're missing \paket{chemcompounds}' command \verb=\declarecompound= already. For one thing one has a summary of all used label names. And one may be warned if one uses an uninitialized label name\footnote{for instance due to a typing error}. This behaviour can be realized with these commands:
+Perhaps you're missing \paket{chemcompounds}' command \verb=\declarecompound=
+already. For one thing one has a summary of all used label names. And one may be
+warned if one uses an uninitialized label name\footnote{for instance due to a
+typing error}. This behaviour can be realized with these commands:
\begin{beschreibung}
\Befehl{cmpdinit}{<comma separated list of label names>}
\Befehl[cmpdinita]{cmpdinit*}{<comma separated list of label names>}
\end{beschreibung}
-All compounds set inside \cmd{cmpdinit} are initialized and declared \emph{in the given order}. If one uses a label name that's not in the list, \chemnum produces a warning message.
+All compounds set inside \cmd{cmpdinit} are initialized and declared \emph{in the
+given order}. If one uses a label name that's not in the list, \chemnum produces
+a warning message.
\cmpdreset
\begin{beispiel}
@@ -333,9 +422,11 @@ All compounds set inside \cmd{cmpdinit} are initialized and declared \emph{in th
{}*************************************************
\end{mdframed}
-Please note that for labels with sublabels only the \emph{main name} can and should be initialized. This initializes all compounds with the same main name.
+Please note that for labels with sublabels only the \emph{main name} can and
+should be initialized. This initializes all compounds with the same main name.
-\cmd[cmpdinita]{cmpdinit*} also produces a warning but doesn't declare the labels. They are declared when you first use them in the order of appearance in the text.
+\cmd[cmpdinita]{cmpdinit*} also produces a warning but doesn't declare the labels.
+They are declared when you first use them in the order of appearance in the text.
\cmpdreset
\begin{beispiel}
@@ -351,12 +442,17 @@ Please note that for labels with sublabels only the \emph{main name} can and sho
{}*************************************************
\end{mdframed}
-If you need to use own labels (see page \pageref{ssec:own_labels}) but still want to initialize all labels at once, you should use \cmd[cmpdinita]{cmpdinit*}{}, because then no labels are declared when they're initialized.
+If you need to use own labels (see page \pageref{ssec:own_labels}) but still want
+to initialize all labels at once, you should use \cmd[cmpdinita]{cmpdinit*}{},
+because then no labels are declared when they're initialized.
-This command can be used several times, with or without \verb=*=. A useful way would be a single usage, though, proposedly in the preamble of your document after the \chemnum setup (see section~\ref{sec:cmpdsetup}).
+This command can be used several times, with or without \verb=*=. A useful way
+would be a single usage, though, proposedly in the preamble of your document after
+the \chemnum setup (see section~\ref{sec:cmpdsetup}).
\subsubsection{Sublabels}
-If you'd like a warning for label-sublabel combinations as well, or want to preset their order, you can use
+If you'd like a warning for label-sublabel combinations as well, or want to preset
+their order, you can use
\begin{beschreibung}
\Befehl{cmpdinit}[\key{init-sub}{true}]{<comma separated list of label names>}
\end{beschreibung}
@@ -379,13 +475,16 @@ This will give you a warning in these cases, too.
\end{mdframed}
\subsection{Error instead of warning}
-If you want \chemnum to produce an error instead of a warning when you use an unititialized label name, you can use \cmd{cmpdinit} like this:
+If you want \chemnum to produce an error instead of a warning when you use an
+unititialized label name, you can use \cmd{cmpdinit} like this:
\begin{beschreibung}
\Befehl{cmpdinit}[\key{init-strict}{true}]{<comma separated list ...>}
\end{beschreibung}
-A usage of \key{init-strict}{false} would be the usage without optional argument. Of course the *-version has the same option.
+A usage of \key{init-strict}{false} would be the usage without optional argument.
+Of course the *-version has the same option.
-With \key{init-strict}{true} the \LaTeX\ run will be aborted with a corresponding error message, if a label name is used that hasn't been initialized before.
+With \key{init-strict}{true} the \LaTeX\ run will be aborted with a corresponding
+error message, if a label name is used that hasn't been initialized before.
Of course you can use \cmd{cmpdinit} with both options
\begin{beschreibung}
@@ -394,15 +493,28 @@ Of course you can use \cmd{cmpdinit} with both options
or use \cmd{cmpdsetup}, see section~\ref{sec:cmpdsetup}.
\subsection{Customized input}
-When you're using other tokens for \key{sub-input-sep} (page \pageref{sssec:sub-input-sep}) or \key{sublist-input-sep} (page \pageref{sssec:list-input-sep}), you have to use them with \cmd{cmpdinit} as well.
+When you're using other tokens for \key{sub-input-sep} (page~\pageref{sssec:sub-input-sep})
+or \key{sublist-input-sep} (page~\pageref{sssec:list-input-sep}), you have to
+use them with \cmd{cmpdinit} as well.
-A change of \key{list-input-sep} (page \pageref{sssec:list-input-sep}) doesn't affect \cmd{cmpdinit}. If you want to change the input of \cmd{cmpdinit} you need to use \key{init-input-sep}, see section~\ref{sssec:init-input-sep} on page~\pageref{sssec:init-input-sep}.
+A change of \key{list-input-sep} (page \pageref{sssec:list-input-sep}) doesn't
+affect \cmd{cmpdinit}. If you want to change the input of \cmd{cmpdinit} you need
+to use \key{init-input-sep}, see section~\ref{sssec:init-input-sep} on
+page~\pageref{sssec:init-input-sep}.
\subsection{Why initiate labels?}
-As mentioned in the beginning of this section the initiation of labels is not required. There are two possible reasons, why one would like to use them, anyway.
+As mentioned in the beginning of this section the initiation of labels is not
+required. There are two possible reasons, why one would like to use them, anyway.
\begin{enumerate}
- \item The use of \cmd[cmpdinita]{cmpdinit*} is a way to keep track of which labels you have used and gives you a warning/error message if you use a new one or just have mispelled an existing one. Depending on the number of labels you (have to) use, this can be lots of additional work, though.
- \item The use of \cmd{cmpdinit} does the same thing as \cmd[cmpdinita]{cmpdinit*} \emph{and} declares all the labels in the given order. So if you use it, you won't have to use \cmd[cmpda]{cmpd*} (section~\ref{cmd:unsichtbares_label}) and \cmd[cmpdb]{cmpd+} (section~\ref{cmd:cmpd_plus}). This gives you direct control, which number is given to which compound.
+ \item The use of \cmd[cmpdinita]{cmpdinit*} is a way to keep track of which labels
+ you have used and gives you a warning/error message if you use a new one or just
+ have mispelled an existing one. Depending on the number of labels you (have to)
+ use, this can be lots of additional work, though.
+ \item The use of \cmd{cmpdinit} does the same thing as \cmd[cmpdinita]{cmpdinit*}
+ \emph{and} declares all the labels in the given order. So if you use it, you
+ won't have to use \cmd[cmpda]{cmpd*} (section~\ref{cmd:unsichtbares_label}) and
+ \cmd[cmpdb]{cmpd+} (section~\ref{cmd:cmpd_plus}). This gives you direct control,
+ which number is given to which compound.
\end{enumerate}
\secidx*{Initialize labels}
@@ -411,12 +523,16 @@ With the command
\begin{beschreibung}
\Befehl{cmpdreset}[<number>]
\end{beschreibung}
-it is possible to reset the counter. Without argument it is reset to \verb=1=. So \cmd{cmpdreset} and \cmd{cmpdreset}[1] are the same. Unlike most other \chemnum commands its impact is not only inside the local \TeX\ group but resets the counter globally.
+it is possible to reset the counter. Without argument it is reset to \verb=1=. So
+\cmd{cmpdreset} and \cmd{cmpdreset}[1] are the same. Unlike most other \chemnum
+commands its impact is not only inside the local \TeX\ group but resets the
+counter globally.
\begin{beispiel}
\cmpdreset The numbering starts with 1 again: \cmpd{h, i, j}
\end{beispiel}
-\achtung{You should be careful with how you use this command! Usually it cannot be recommended to reset the counter. Different compounds can get the same label!}
+\achtung{You should be careful with how you use this command! Usually it cannot
+be recommended to reset the counter. Different compounds can get the same label!}
\begin{beispiel}
Same label: \cmpd{a}, \cmpd{h}
@@ -425,25 +541,41 @@ it is possible to reset the counter. Without argument it is reset to \verb=1=. S
\section{Special usage}\secidx{Special usage}
\subsection{Moving arguments -- section titles}
-Using \cmd{cmpd} inside a section title in the first instant doesn't seem to be a problem. This doesn't give any errors and the output looks like expected:
+Using \cmd{cmpd} inside a section title in the first instant doesn't seem to be
+a problem. This doesn't give any errors and the output looks like expected:
\begin{beispiel}[code only]
\section{Compound \cmpd[cmpd-delim]{b}}
\ldots
\end{beispiel}
-However, if you use \verb=\tableofcontents= -- which is rather probable, I guess -- something unwanted happens: because the table of contents is at the beginning of the document, the label is declared in the table of contents instead of at the first appearance in the text. There are two ways to circumvent this:
+However, if you use \verb=\tableofcontents= -- which is rather probable, I
+guess -- something unwanted happens: because the table of contents is at the
+beginning of the document, the label is declared in the table of contents instead
+of at the first appearance in the text. There are two ways to circumvent this:
\begin{enumerate}
- \item You declare your labels in the order you want with \cmd{cmpdinit}{}= (see page \pageref{sec:cmpdinit}) in the preamble or the beginning of the document.
- \item You use \cmd[cmpdb]{cmpd+} to set the label. It will read the label from the file \verb=<jobname>.cmpd= (supposing your main file is called \verb=<jobname>.tex=). This means \emph{at least two}, maybe more \LaTeX\ runs are necessary until all labels are set.
+ \item You declare your labels in the order you want with \cmd{cmpdinit}{}= (see
+ page~\pageref{sec:cmpdinit}) in the preamble or the beginning of the document.
+ \item You use \cmd[cmpdb]{cmpd+} to set the label. It will read the label from
+ the file \verb=<jobname>.cmpd= (supposing your main file is called \verb=<jobname>.tex=).
+ This means \emph{at least two}, maybe more \LaTeX\ runs are necessary until
+ all labels are set.
\end{enumerate}
-The same is true for any other list of moving arguments that is created \emph{before} the actual appearance of the label in the text.
+The same is true for any other list of moving arguments that is created \emph{before}
+the actual appearance of the label in the text.
The command\label{cmd:cmpd_plus}
\begin{beschreibung}
\Befehl[cmpdb]{cmpd+}\ma{<label name>}
\end{beschreibung}
-reads the label name that is to be printed from \verb=\jobname.cmpd=. In a way this is the opposite of \cmd[cmpda]{cmpd*} since it doesn't declare a label but only references and prints it. So in order to use \cmd[cmpdb]{cmpd+}{<label>}, \verb=<label>= must have been declared, either with \cmd{cmpd}{<label>} or with \cmd[cmpda]{cmpd*}{<label>}. It doesn't matter, if this declaration is done before or after the usage of \cmd[cmpdb]{cmpd+}. This command is useful, if the label is used inside a moving argument like in \verb=\section{}=.
+reads the label name that is to be printed from \verb=\jobname.cmpd=. In a way
+this is the opposite of \cmd[cmpda]{cmpd*} since it doesn't declare a label but
+only references and prints it. So in order to use \cmd[cmpdb]{cmpd+}{<label>},
+\verb=<label>= must have been declared, either with \cmd{cmpd}{<label>} or with
+\cmd[cmpda]{cmpd*}{<label>}. It doesn't matter, if this declaration is done before
+or after the usage of \cmd[cmpdb]{cmpd+}. This command is useful, if the label is
+used inside a moving argument like in \verb=\section{}=.
-\achtung{It is not needed when \cmd{cmpdinit} is used, see section~\ref{sec:cmpdinit} (pages~\pageref{sec:cmpdinit}\,ff).}
+\achtung{It is not needed when \cmd{cmpdinit} is used, see section~\ref{sec:cmpdinit}
+(pages~\pageref{sec:cmpdinit}\,ff).}
\begin{beispiel}
\subsubsection{Test section title with compound label \cmpd+[cmpd-delim]{f.one}}
@@ -452,7 +584,9 @@ reads the label name that is to be printed from \verb=\jobname.cmpd=. In a way t
\end{beispiel}
\subsection{Floating environments}\cmpdinit*{float1,float2}
-The usage of \cmd{cmpd} inside a float shouldn't be a problem: labels are declared in the order the floating environment appears in the code. However, to be on the safe side you can of course use \cmd[cmpdb]{cmpd+} here as well.
+The usage of \cmd{cmpd} inside a float shouldn't be a problem: labels are declared
+in the order the floating environment appears in the code. However, to be on the
+safe side you can of course use \cmd[cmpdb]{cmpd+} here as well.
\begin{beispiel}[code and float]
% preamble:
% \usepackage{chemscheme}
@@ -465,17 +599,22 @@ The usage of \cmd{cmpd} inside a float shouldn't be a problem: labels are declar
\end{scheme}
\end{beispiel}
-This also works, of the floating environment is placed before the code, for instance by using the option \verb=[t]=.
+This also works, of the floating environment is placed before the code, for
+instance by using the option \verb=[t]=.
\cmpdinit*{Alc,EtherBr,cpd}
\subsection{Schemes created by external programs}\label{ssec:cmpdref}\secidx{Schemes by external programs}
-If you create your schemes by external programs like for \eg \prog{ChemDraw} or \prog{Marvin\-Sketch}, and want to use \chemnum with them as well, you can use this command:
+If you create your schemes by external programs like for \eg \prog{ChemDraw} or
+\prog{Marvin\-Sketch}, and want to use \chemnum with them as well, you can use
+this command:
\begin{beschreibung}
\Befehl{cmpdref}[<options>]\oa{<tag>}\ma{<label name>}
\end{beschreibung}
\achtung{With v0.5 the order of the optional arguments has changed!}
-This command is inspired by the \verb=\schemeref= command from the package \paket{chemscheme}. It works in a very similar way. You create the scheme and save it with temporary labels as an \verb=eps= file.
+This command is inspired by the \verb=\schemeref= command from the package
+\paket{chemscheme}. It works in a very similar way. You create the scheme and save
+it with temporary labels as an \verb=eps= file.
\begin{beispiel}[code and float]
\begin{scheme}[ht]
\centering
@@ -491,9 +630,16 @@ This command is inspired by the \verb=\schemeref= command from the package \pake
\caption{Scheme with automated labels.}
\end{scheme}
\end{beispiel}
-So you nummerate the compounds with \textsf{TMP1}, \textsf{TMP2} \etc These markers will then be replaced with the corresponding labels. Like \paket{chemscheme} \chemnum uses the \cmd{psfrag} command of the \paket{psfrag} package to do that. This means you have to either compile via \prog{latex}, \prog{dvips}, \prog{ps2pdf}, or for instance use the package \paket{auto-pst-pdf} to be able to use \hologo{pdfLaTeX}. It doesn't work with \hologo{XeLaTeX}, neither probably with \hologo{LuaLaTeX}, the author didn't test that, though.
+So you nummerate the compounds with \textsf{TMP1}, \textsf{TMP2} \etc These markers
+will then be replaced with the corresponding labels. Like \paket{chemscheme} \chemnum
+uses the \cmd{psfrag} command of the \paket{psfrag} package to do that. This means
+you have to either compile via \prog{latex}, \prog{dvips}, \prog{ps2pdf}, or for
+instance use the package \paket{auto-pst-pdf} to be able to use \hologo{pdfLaTeX}.
+It doesn't work with \hologo{XeLaTeX}, neither probably with \hologo{LuaLaTeX},
+the author didn't test that, though.
-In each case it is important that the marker is saved as \emph{text} in the \verb=eps= file.
+In each case it is important that the marker is saved as \emph{text} in the \verb=eps=
+file.
You can customize the labels with the options presented in section~\ref{sec:cmpdsetup}.
\begin{beispiel}[code and float]
@@ -539,44 +685,61 @@ Of course sublabels work in the known way:
\section{Usage with \paket{hyperref}}\label{sec:hyperref}\secidx[Usage with hyperref]{Usage with \textsf{hyperref}}
\subsection{Basics}
-If you are using the package \paket{hyperref} you can make hyperlinked labels in your \prog{pdf}.
+If you are using the package \paket{hyperref} you can make hyperlinked labels in
+your \prog{pdf}.
\begin{beschreibung}
\Option{hyper-use}{\default{true}/false}
\end{beschreibung}
-Setting this option (see section~\ref{sec:cmpdsetup} for more information) to \texttt{true}, the next usage of a label will create a link target and the ones after that will create links to this target. This only works if the label does \emph{not} contain a list or range of sublabels. Also a label set with \cmd[cmpda]{cmpd*} can't be marked as target.
+Setting this option (see section~\ref{sec:cmpdsetup} for more information) to
+\code{true}, the next usage of a label will create a link target and the ones
+after that will create links to this target. This only works if the label does
+\emph{not} contain a list or range of sublabels. Also a label set with \cmd[cmpda]{cmpd*}
+can't be marked as target.
\begin{beispiel}
\cmpdsetup{hyper-use}
- The first time targets are created: \cmpd{a.two,b,c,d,e,f}. Then links are created: \cmpd{a.two,d,e}.
+ The first time targets are created: \cmpd{a.two,b,c,d,e,f}. Then links are created:
+ \cmpd{a.two,d,e}.
- This doesn't work with labels containing a list of sublabels: \cmpd{a,f.{one,two},c}. Since \cmpd{a.two} and \cmpd{a} are different labels they have different link targets.
+ This doesn't work with labels containing a list of sublabels: \cmpd{a,f.{one,two},c}.
+ Since \cmpd{a.two} and \cmpd{a} are different labels they have different link targets.
\end{beispiel}
\subsection{Selected usage}
-Maybe the automated use isn't what you want or need. Maybe is is enough to create a hyperlink in one or two places. This can be achieved with two options:
+Maybe the automated use isn't what you want or need. Maybe is is enough to create
+a hyperlink in one or two places. This can be achieved with two options:
\begin{beschreibung}
\Option{hyper-target}{<link name>}
\Option{hyper-link}{<link name>}
\end{beschreibung}
-With \key{hyper-target} you can set the target. \textbf{Caution}: if you use this option with a list \emph{every} label of the list will get the same link name and \paket{hyperref} will warn you:
+With \key{hyper-target} you can set the target. \textbf{Caution}: if you use this
+option with a list \emph{every} label of the list will get the same link name and
+\paket{hyperref} will warn you:
\begin{mdframed}\ttfamily
- destination with the same identifier (name\{<link name>\}) has been already used, duplicate ignored
+ destination with the same identifier (name\{<link name>\}) has been already used,
+ duplicate ignored
\end{mdframed}
-\key{hyper-link} creates a link for the denominated target. \textbf{Caution}: if you use this option with a list \emph{every} label of the list will refer to the same target.
+\key{hyper-link} creates a link for the denominated target. \textbf{Caution}: if
+you use this option with a list \emph{every} label of the list will refer to the
+same target.
\begin{beispiel}
- Create a link \cmpd[hyper-link=mylink,cmpd-all]{f} but don't forget the corresponding target: \cmpd[hyper-target=mylink,cmpd-all]{f}.
+ Create a link \cmpd[hyper-link=mylink,cmpd-all]{f} but don't forget the
+ corresponding target: \cmpd[hyper-target=mylink,cmpd-all]{f}.
\end{beispiel}
-If you use \key{hyper-link} without the corresponding \key{hyper-target} \paket{hyperref} will issue a warning:
+If you use \key{hyper-link} without the corresponding \key{hyper-target}
+\paket{hyperref} will issue a warning:
\begin{mdframed}\ttfamily
- name\{<link name>\} has been referenced but does not exist, replaced by a fixed one
+ name\{<link name>\} has been referenced but does not exist, replaced by a fixed
+ one
\end{mdframed}
\secidx*[Usage with hyperref]{Usage with \textsf{hyperref}}
\section{Customization}\label{sec:cmpdsetup}
\subsection{The principle}
-\chemnum is customized with a key-value system. They can either be used for all following commands with
+\chemnum is customized with a key-value system. They can either be used for all
+following commands with
\begin{beschreibung}
\Befehl{cmpdsetup}{key1 = value1, key2 = value2}
\end{beschreibung}
@@ -585,9 +748,12 @@ or only for a single command directly with
\Befehl{cmpd}[key1 = value1, key2 = value2]{<label name>}
\end{beschreibung}
-If you use keys without values like \cmd{cmpdsetup}{key1,key2}, default values\label{opt:default} are used. These are \emph{not} necessarily empty are \emph{not} necessarily the default setting of \chemnum.
+If you use keys without values like \cmd{cmpdsetup}{key1,key2}, default values\label{opt:default}
+are used. These are \emph{not} necessarily empty are \emph{not} necessarily the
+default setting of \chemnum.
-The options are divided in to different classes\label{key_classes}, which indicate the scope they're used for. They all follow the form \verb+<class>-option = <value>+:
+The options are divided in to different classes\label{key_classes}, which indicate
+the scope they're used for. They all follow the form \verb+<class>-option = <value>+:
\begin{itemize}
\item \code{cmpd}: These options change the whole label or the main label.
\item \code{sub}, \code{sublist}, \code{subref}: These options have an impact on sublabels.
@@ -616,7 +782,9 @@ you can change the style with which the labels are printed.
\cmpd{a, b, f.two, k}\\ % underlined and in italics
\cmpd[cmpd-weight=normal]{a, b, f.two, k}
\end{beispiel}
-The separate handling of the bold face is because of the greek labels (see section~\ref{ssec:counter}). Depending on the package option \texttt{textgreek}, the bold face must realized differently.
+The separate handling of the bold face is because of the greek labels (see
+section~\ref{ssec:counter}). Depending on the package option \code{textgreek},
+the bold face must realized differently.
\secidx*{Font style}
\subsection{Own labels}\label{ssec:own_labels}\secidx{Own labels}
@@ -627,18 +795,25 @@ With the key
one can choose the label associated with the label name.
\begin{beispiel}
- Own label: \cmpd[cmpd-label = XYZ]{l}; in a list \emph{all new compounds} get this label! \cmpd[cmpd-label = XYZ]{l, a, m}
+ Own label: \cmpd[cmpd-label = XYZ]{l}; in a list \emph{all new compounds} get
+ this label! \cmpd[cmpd-label = XYZ]{l, a, m}
\end{beispiel}
\secidx*{Own labels}
\subsection{Markers in images}\secidx{Markers in images}\label{ssec:marker_in_bildern}
There are several options that affect labels in external images placed with \cmd{cmpdref}.
\begin{beschreibung}
- \option{ref-marker}{<marker>} This changes the default marker that is to be replaced. Default = \code{TMP}
+ \option{ref-marker}{<marker>} This changes the default marker that is to be
+ replaced. Default = \code{TMP}
\option{ref-pos}{\{<tex-pos>\}\{<ps-pos>\}} Default = \code{bb}
- \option{ref-style}{<style>} change the format of the labels in external schemes. Default = \verb=\sffamily=
+ \option{ref-style}{<style>} change the format of the labels in external schemes.
+ Default = \verb=\sffamily=
\end{beschreibung}
-With \key{ref-pos} you can change the default way how \cmd{cmpdref} places the label. The command \cmd{psfrag} that is used internally has two options for that. The first one determines the position of the \TeX-replacement, the second one how it is placed in the box from the marker that is replaced. For details please refer to the documentation of \paket{psfrag}.
+With \key{ref-pos} you can change the default way how \cmd{cmpdref} places the
+label. The command \cmd{psfrag} that is used internally has two options for that.
+The first one determines the position of the \TeX-replacement, the second one how
+it is placed in the box from the marker that is replaced. For details please refer
+to the documentation of \paket{psfrag}.
\secidx*{Markers in images}
\subsection{Counter}\label{ssec:counter}\secidx{Counter}
@@ -671,7 +846,11 @@ Both single labels and whole lists can get delimiters. This is done with the opt
\cmpdsetup{cmpd-delim = ()}
\cmpd{a, b, f.two, k} % in braces
\end{beispiel}
-Please be aware that the default values (see pages \pageref{opt:default} and \pageref{ssec:keys_uebersicht}) of \key{cmpd-delim} and \key{list-delim} and the default setting of \chemnum are \emph{not} the same. By default \chemnum doesn't use delimiters. Also please note that the list delimiters only are used if \cmd{cmpd} contains at least two label names.
+Please be aware that the default values (see pages~\pageref{opt:default} and
+\pageref{ssec:keys_uebersicht}) of \key{cmpd-delim} and \key{list-delim} and the
+default setting of \chemnum are \emph{not} the same. By default \chemnum doesn't
+use delimiters. Also please note that the list delimiters only are used if \cmd{cmpd}
+contains at least two label names.
\begin{beispiel}
\cmpd{a, b, f.two, k}\\ % default
\cmpd[list-delim = {[}{]}]{a, b, f.two, k}\\ % in braces
@@ -680,10 +859,12 @@ Please be aware that the default values (see pages \pageref{opt:default} and \pa
\cmpd{a, b, f.two, k}\\ % in braces
\cmpd{a} % NOT a list!
\end{beispiel}
-If you generally use labels in braces but want to use a single one without braces, you have several possibilities:
+If you generally use labels in braces but want to use a single one without braces,
+you have several possibilities:
\begin{beispiel}
\cmpdsetup{cmpd-delim = ()}
- normally: \cmpd{b}, \cmpd{c}, \cmpd{d.one}, but sometimes so \cmpd[cmpd-delim = ]{e} or so \cmpd-{e}.
+ normally: \cmpd{b}, \cmpd{c}, \cmpd{d.one}, but sometimes so \cmpd[cmpd-delim = ]{e}
+ or so \cmpd-{e}.
\end{beispiel}
With
\begin{beschreibung}\label{cmd:ohne_begrenzer}
@@ -698,18 +879,21 @@ the braces of single labels can easily be removed (but not the ones of a list).
\cmpd-{a, b, f.two, k} % braced once
\end{beispiel}
-Using \cmd{cmpdsetup}{\key{cmpd-delim}{ }} and \cmd{cmpdsetup}{\key{list-delim}{ }} will restore the default behaviour.
+Using \cmd{cmpdsetup}{\key{cmpd-delim}{ }} and \cmd{cmpdsetup}{\key{list-delim}{ }}
+will restore the default behaviour.
\secidx*{Delimiters}
\subsection{Suffix and prefix}\secidx{Suffix and prefix}
-If you want to, you can also add a prefix and/or a suffix to a compound and/or a list.
+If you want to, you can also add a prefix and/or a suffix to a compound and/or a
+list.
\begin{beschreibung}
\Option{cmpd-prefix}{<prefix>}
\Option{cmpd-suffix}{<prefix>}
\Option{list-prefix}{<prefix>}
\Option{list-suffix}{<prefix>}
\end{beschreibung}
-The same rule as for the delimiters applies: list attributes are only used with lists, \ie at least with two items.
+The same rule as for the delimiters applies: list attributes are only used with
+lists, \ie at least with two items.
An example for the label attributes:
\begin{beispiel}
@@ -743,7 +927,10 @@ It can be changed with
\subsection{Separators}\label{ssec:trenner}\secidx{Separators}
\subsubsection{Labels -- input}\label{sssec:sub-input-sep}\index{Separators!labels!input}
-As a default setting \chemnum use the point \code{.} as a marker to separate main labels from sublabels. You can change that as you like. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \verb=@=. Furthermore you should be careful to use different symbols for the other separators (see the next sections).
+As a default setting \chemnum use the point \code{.} as a marker to separate main
+labels from sublabels. You can change that as you like. Tokens you \emph{can't use}
+are \verb=, % #= and \emph{you shouldn't} use \verb=@=. Furthermore you should be
+careful to use different symbols for the other separators (see the next sections).
\begin{beschreibung}
\option{sub-input-sep}{<separator>} Default = \code{.}
\end{beschreibung}
@@ -755,7 +942,12 @@ As a default setting \chemnum use the point \code{.} as a marker to separate mai
\cmpd[sub-input-sep= &]{f&one, g&two}\\
\cmpd[sub-input-sep= *]{f*one, g*two}
\end{beispiel}
-You should -- not only for the sake of consistency -- decide only \emph{once} in the beginning of your document \emph{before} the \verb=\tableofcontents= or in the preamble, which marker you use. Otherwise, the \verb=\tableofcontents= won't know the marker anymore and your labels might be at least displayed wrong in the table of contents. Also you need to setup the marker \emph{before} you use it with \cmd{cmpd} or \cmd{cmpdinit} etc.
+You should -- not only for the sake of consistency -- decide only \emph{once} in
+the beginning of your document \emph{before} the \verb=\tableofcontents= or in
+the preamble, which marker you use. Otherwise, the \verb=\tableofcontents= won't
+know the marker anymore and your labels might be at least displayed wrong in the
+table of contents. Also you need to setup the marker \emph{before} you use it with
+\cmd{cmpd} or \cmd{cmpdinit} etc.
\subsubsection{Labels -- output}\index{Separators!labels!output}
You can separate the labels from the sublabels if you like to.
@@ -771,7 +963,11 @@ You can separate the labels from the sublabels if you like to.
\end{beispiel}
\subsubsection{Sublabels -- input}\label{sssec:range-input-sep}\index{Separators!subabels!input}
-As a default setting \chemnum use two points \code{..} as a marker to detect two sublabels as end and beginning of a range. But you can choose any tokens you like to do that. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \verb=@=. Furthermore you should be careful to use different symbols for the other separators.
+As a default setting \chemnum use two points \code{..} as a marker to detect two
+sublabels as end and beginning of a range. But you can choose any tokens you like
+to do that. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't}
+use \verb=@=. Furthermore you should be careful to use different symbols for the
+other separators.
\begin{beschreibung}
\option{subrange-input-sep}{<separator>} Default = \code{..}
\end{beschreibung}
@@ -782,7 +978,8 @@ As a default setting \chemnum use two points \code{..} as a marker to detect two
\end{beispiel}
\subsubsection{Sublabels -- output}\index{Separators!subabels!output}
-Maybe you don't like the output of \cmpd[cmpd-all]{q} and you want it displayed differently? Then you need this key:
+Maybe you don't like the output of \cmpd[cmpd-all]{q} and you want it displayed
+differently? Then you need this key:
\begin{beschreibung}
\option{subrange-output-sep}{<separator>} Default = \verb|--|
\end{beschreibung}
@@ -793,7 +990,11 @@ Maybe you don't like the output of \cmpd[cmpd-all]{q} and you want it displayed
\end{beispiel}
\subsubsection{Lists -- input}\label{sssec:list-input-sep}\index{Separators!lists!input}
-If you like you can change the list input separator for both main label lists and lists of sublabels. In both cases \chemnum uses the comma \code{,} as default. You can change that as you like. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \verb=@=. Furthermore you should be careful to use different symbols for the other separators.
+If you like you can change the list input separator for both main label lists and
+lists of sublabels. In both cases \chemnum uses the comma \code{,} as default. You
+can change that as you like. Tokens you \emph{can't use} are \verb=, % #= and
+\emph{you shouldn't} use \verb=@=. Furthermore you should be careful to use
+different symbols for the other separators.
\begin{beschreibung}
\option{list-input-sep}{<separator>} Default = \code{,}
\option{sub-input-sep}{<separator>} Default = \code{,}
@@ -805,14 +1006,16 @@ If you like you can change the list input separator for both main label lists an
\cmpdsetup{list-input-sep = ;}
\cmpd{a; b; f.two; k}
\end{beispiel}
-With this you can for example use IUPAC names as label names\footnote{Thanks to Christina L\"udigk who in a way suggested this feature.}.
+With this you can for example use IUPAC names as label names\footnote{Thanks to
+Christina L\"udigk who in a way suggested this feature.}.
\begin{beispiel}
\cmpdsetup{list-input-sep=;}
\cmpd{1,3-dichlorocyclohexanole}
\end{beispiel}
\subsubsection{Lists -- output}\label{sssec:list-output-sep}\index{Separators!lists!output}
-You can change the separator symbol with which lists are printed as well. \chemnum uses the comma for both cases in the default setting.
+You can change the separator symbol with which lists are printed as well. \chemnum
+uses the comma for both cases in the default setting.
\begin{beschreibung}
\option{list-output-sep}{<separator>} Default = \code{,}
\option{sub-output-sep}{<separator>} Default = \code{,}
@@ -826,12 +1029,13 @@ You can change the separator symbol with which lists are printed as well. \chemn
\end{beispiel}
\subsubsection{Lists -- last separator}\label{sssec:last-sep}\index{Separators!list!last seperator}
-The last separator in the main label list is a special case. \chemnum provides two options with which it can be customized.
+The last separator in the main label list is a special case. \chemnum provides
+two options with which it can be customized.
\begin{beschreibung}
\Option{list-last-sep}{<separator>}
\option{list-lang}{US/GB/DE/FR/ES/IT} Default = \code{US}
\end{beschreibung}
-% There is the option \key{list-lang}, which changes language dependent settings. You can choose between \verb=US= (default), \verb=GB=, \verb=DE=, \verb=FR=, \verb=ES= and \verb=IT=.
+
\begin{beispiel}
\cmpd[list-lang = US]{a, b, f.two, k} \cmpd[list-lang = US]{a, b}\\
\cmpd[list-lang = GB]{a, b, f.two, k} \cmpd[list-lang = GB]{a, b}\\
@@ -840,7 +1044,9 @@ The last separator in the main label list is a special case. \chemnum provides t
\cmpd[list-lang = ES]{a, b, f.two, k} \cmpd[list-lang = ES]{a, b}\\
\cmpd[list-lang = IT]{a, b, f.two, k} \cmpd[list-lang = IT]{a, b}
\end{beispiel}
-As you can see the language \key{list-lang}{US} uses the Harvard comma, all other languages don't. You'll find more on language support and the Harvard comma in section~\ref{sec:language_support}.
+As you can see the language \key{list-lang}{US} uses the Harvard comma, all other
+languages don't. You'll find more on language support and the Harvard comma in
+section~\ref{sec:language_support}.
With the key \key{list-last-sep} you also can set the last separator individually.
\begin{beispiel}
@@ -851,7 +1057,8 @@ With the key \key{list-last-sep} you also can set the last separator individuall
\cmpd[list-last-sep = empty]{a, b, f.two, k}
\end{beispiel}
-\key{list-last-sep}{empty} is a special value. If it is used, the separator set with \key{list-output-sep} is used for the whole list.
+\key{list-last-sep}{empty} is a special value. If it is used, the separator set
+with \key{list-output-sep} is used for the whole list.
\begin{beispiel}
\cmpdsetup{list-last-sep = empty}%
\cmpd{a, b, f.two, k}\\
@@ -860,7 +1067,10 @@ With the key \key{list-last-sep} you also can set the last separator individuall
\end{beispiel}
\subsubsection{\code{\textbackslash\textcolor{code}{cmpdinit}} -- input}\label{sssec:init-input-sep}\index{Separators!cmpdinit@\textcolor{code}{\code{\textbackslash cmpdinit}}}
-When you've changed the separator for \cmd{cmpd} you might want to change it for \cmd{cmpdinit} as well. \chemnum uses the comma in the default setting. You can change that as you like. Sie können aber eine beliebige andere Eingabe wählen. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \verb=@=.
+When you've changed the separator for \cmd{cmpd} you might want to change it for
+\cmd{cmpdinit} as well. \chemnum uses the comma in the default setting. You can
+change that as you like. Sie können aber eine beliebige andere Eingabe wählen.
+Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \verb=@=.
\begin{beschreibung}
\option{init-input-sep}{<separator>} Default = \code{,}
\end{beschreibung}
@@ -880,7 +1090,12 @@ A small example how a customized input could look like:
\section{Language support}\label{sec:language_support}\secidx{Language support}
\subsection{Cooperation with \textsf{babel}}
-\chemnum supports the language choice made with the \paket{babel} package for a number of languages. This is done with the \verb=\translate= command of the \paket*{translator} package, if it is available. If \paket*{translator} cannot be loaded, language support must be done manually, see section~\ref{sssec:last-sep}. Manual language settings can of course still be done if \paket*{translator} has been loaded.
+\chemnum supports the language choice made with the \paket{babel} package for a
+number of languages. This is done with the \verb=\translate= command of the
+\paket*{translator} package, if it is available. If \paket*{translator} cannot
+be loaded, language support must be done manually, see section~\ref{sssec:last-sep}.
+Manual language settings can of course still be done if \paket*{translator} has
+been loaded.
\begin{beispiel}
\selectlanguage{ngerman}DE: \cmpd{r,s,t}\\
\selectlanguage{english}EN: \cmpd{r,s,t}\\
@@ -890,16 +1105,35 @@ A small example how a customized input could look like:
\selectlanguage{spanish}ES: \cmpd{r,s,t}\\
\selectlanguage{italian}IT: \cmpd{r,s,t}
\end{beispiel}
-If you find a language missing, please send me an email\footnote{\href{mailto:contact@mychemistry.eu}{contatc@mychemistry.eu}} with the corresponding \textsf{babel} option and the right translation, and I will gladly add it.
+If you find a language missing, please send me an
+email\footnote{\href{mailto:contact@mychemistry.eu}{contatc@mychemistry.eu}} with
+the corresponding \textsf{babel} option and the right translation, and I will
+gladly add it.
\subsection{Harvard comma}\label{ssec:harvard-comma}\secidx{Harvard comma}
-In American English the so-called Harvard comma is quite commonly used. In British English and other European languages it is rather uncommon.
+In American English the so-called Harvard comma is quite commonly used. In British
+English and other European languages it is rather uncommon.
\begin{zitat}[\href{http://en.wikipedia.org/wiki/Serial_comma}{\protect\Wikipedia}, 2011/11/07]
- The serial comma (also known as the Oxford comma or Harvard comma, and sometimes referred to as the series comma) is the comma used immediately before a coordinating conjunction (usually and or or, and sometimes nor) preceding the final item in a list of three or more items. For example, a list of three countries can be punctuated as either "Portugal, Spain, and France" (with the serial comma) or as "Portugal, Spain and France" (without the serial comma).
-
- Opinions vary among writers and editors on the usage or avoidance of the serial comma. In American English, the serial comma is standard usage in non-journalistic writing that follows the \name{Chicago Manual of Style}. Journalists, however, usually follow the AP Stylebook, which advises against it. It is used less often in British English, where it is standard usage to leave it out, with some notable exceptions such as \name{Fowler's Modern English Usage}. In many languages (e.g., French, German, Italian, Polish, Spanish), the serial comma is not the norm and may even go against punctuation rules. It may be recommended in many cases, however, to avoid ambiguity or to aid prosody.
+ The serial comma (also known as the Oxford comma or Harvard comma, and sometimes
+ referred to as the series comma) is the comma used immediately before a coordinating
+ conjunction (usually and or or, and sometimes nor) preceding the final item in a
+ list of three or more items. For example, a list of three countries can be
+ punctuated as either "Portugal, Spain, and France" (with the serial comma) or as
+ "Portugal, Spain and France" (without the serial comma).
+
+ Opinions vary among writers and editors on the usage or avoidance of the serial
+ comma. In American English, the serial comma is standard usage in non-journalistic
+ writing that follows the \name{Chicago Manual of Style}. Journalists, however,
+ usually follow the AP Stylebook, which advises against it. It is used less often
+ in British English, where it is standard usage to leave it out, with some notable
+ exceptions such as \name{Fowler's Modern English Usage}. In many languages (e.g.,
+ French, German, Italian, Polish, Spanish), the serial comma is not the norm and
+ may even go against punctuation rules. It may be recommended in many cases,
+ however, to avoid ambiguity or to aid prosody.
\end{zitat}
-\chemnum uses the Harvard comma when American English is used and doesn't, when other languages are used. However, you have the possibility to disable or enable the Harvard comma as you wish:
+\chemnum uses the Harvard comma when American English is used and doesn't, when
+other languages are used. However, you have the possibility to disable or enable
+the Harvard comma as you wish:
\begin{beschreibung}
\Option{list-serial-comma}{\default{true}/false}
@@ -909,7 +1143,9 @@ In American English the so-called Harvard comma is quite commonly used. In Briti
\selectlanguage{ngerman}DE: \cmpd[list-serial-comma]{r,s,t} vs. \cmpd{r,s,t}\\
\selectlanguage{american}US: \cmpd[list-serial-comma=false]{r,s,t} vs. \cmpd{r,s,t}
\end{beispiel}
-If you choose the language manually, please note that this resets the default behaviour for that language. This means you have to use \key{list-serial-comma} \emph{after} \key{list-lang}.
+If you choose the language manually, please note that this resets the default
+behaviour for that language. This means you have to use \key{list-serial-comma}
+\emph{after} \key{list-lang}.
\begin{beispiel}
wrong: \cmpdsetup{list-serial-comma=false, list-lang=US}\cmpd{r,s,t}\\
right: \cmpdsetup{list-lang=US, list-serial-comma=false}\cmpd{r,s,t}
@@ -974,27 +1210,39 @@ In this section all options are listed.
\end{center}
\subsection{Commands}
-In this section all commands provided by \chemnum as well as their variants are listed.
+In this section all commands provided by \chemnum as well as their variants are
+listed.
\begin{center}
\label{tab:commands}
\begin{tabu*} to \linewidth {X[l]X[p]}\toprule
\bfseries command & \bfseries description \tabularnewline\midrule
- \cmd*{cmpd}[<keyval>]{<labels>} & basic command, declares and prints labels or lists of labels, see pages \pageref{sec:nummerieren}ff. \tabularnewline
- \cmd*[cmpda]{cmpd*}{<labels>} & invisible, declares label, see page \pageref{cmd:unsichtbares_label} \tabularnewline
- \cmd*[cmpdc]{cmpd-}[<keyval>]{<labels>} & without delimiters, see page \pageref{cmd:ohne_begrenzer} \tabularnewline
- \cmd*[cmpdd]{cmpd+-}[<keyval>]{<labels>} & label is read from auxiliary file, see page \pageref{cmd:cmpd_plus} \tabularnewline\midrule
- \cmd*{cmpdinit}[<keyval>]{<labels>} & initialise and declare labels, see pages \pageref{sec:cmpdinit}f. \tabularnewline
- \cmd*[cmpdinita]{cmpdinit*}[<keyval>]{<labels>} & initialise labels, see pages \pageref{sec:cmpdinit}f. \tabularnewline\midrule
- \cmd*{cmpdref}[<keyval>]\oa[<marker>]\ma{<label>} & replace temporary markers in \texttt{eps} files by labels, see page \pageref{ssec:cmpdref} \tabularnewline
- \cmd*[cmpdrefc]{cmpdref-}[<keyval>]\oa[<marker>]\ma{<label>} & replace temporary markers in \texttt{eps} files by labels without delimiters, see page \pageref{cmd:ohne_begrenzer} \tabularnewline\midrule
- \cmd*{cmpdreset}[<num>] & reset counter, siehe page \pageref{sec:cmpdreset} \tabularnewline\midrule
- \cmd*{cmpdsetup}{<keyval>} & setup \chemnum, siehe pages \pageref{sec:cmpdsetup}ff. \tabularnewline\bottomrule
+ \cmd*{cmpd}[<keyval>]{<labels>} & basic command, declares
+ and prints labels or lists of labels, see pages \pageref{sec:nummerieren}ff. \tabularnewline
+ \cmd*[cmpda]{cmpd*}{<labels>} & invisible, declares label,
+ see page \pageref{cmd:unsichtbares_label} \tabularnewline
+ \cmd*[cmpdc]{cmpd-}[<keyval>]{<labels>} & without delimiters, see
+ page \pageref{cmd:ohne_begrenzer} \tabularnewline
+ \cmd*[cmpdd]{cmpd+-}[<keyval>]{<labels>} & label is read from auxiliary
+ file, see page \pageref{cmd:cmpd_plus} \tabularnewline\midrule
+ \cmd*{cmpdinit}[<keyval>]{<labels>} & initialise and declare labels,
+ see pages \pageref{sec:cmpdinit}f. \tabularnewline
+ \cmd*[cmpdinita]{cmpdinit*}[<keyval>]{<labels>} & initialise labels, see
+ pages \pageref{sec:cmpdinit}f. \tabularnewline\midrule
+ \cmd*{cmpdref}[<keyval>]\oa[<marker>]\ma{<label>} & replace temporary markers
+ in \code{eps} files by labels, see page \pageref{ssec:cmpdref} \tabularnewline
+ \cmd*[cmpdrefc]{cmpdref-}[<keyval>]\oa[<marker>]\ma{<label>} & replace temporary
+ markers in \code{eps} files by labels without delimiters, see page \pageref{cmd:ohne_begrenzer} \tabularnewline\midrule
+ \cmd*{cmpdreset}[<num>] & reset counter, see
+ page \pageref{sec:cmpdreset} \tabularnewline\midrule
+ \cmd*{cmpdsetup}{<keyval>} & setup \chemnum, see
+ pages \pageref{sec:cmpdsetup}ff. \tabularnewline\bottomrule
\end{tabu*}
\end{center}
\appendix
\addsec{Credits}
-I would like to thank Joseph \name{Wright} and Russell \name{Hewitt} who provided me with valuable feedback and suggestions to improve \chemnum.
+I would like to thank Joseph \name{Wright} and Russell \name{Hewitt} who provided
+me with valuable feedback and suggestions to improve \chemnum.
\printindex