summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex671
1 files changed, 411 insertions, 260 deletions
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex
index 12936db8f55..290da2d63b4 100644
--- a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex
+++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex
@@ -3,7 +3,7 @@
% - a comprehensive approach for the numbering of chemical compounds - %
% ------------------------------------------------------------------------------------- %
% - Clemens NIEDERBERGER - %
-% - 2011/12/01 - %
+% - 2011/12/08 - %
% ------------------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -29,12 +29,12 @@
% - chemnum_doc_en.tex, chemnum-codehelper.tex, scheme-tmp.eps, scheme-bla.eps, - %
% - README and the derived files chemnum_doc_de.pdf and chemnum_doc_en.pdf - %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[DIV11]{scrartcl}
-\usepackage[ngerman,german,naustrian,austrian,english,british,american,canadian,french,canadien,spanish,italian]{babel}
+\documentclass[DIV11,toc=index]{scrartcl}
+\usepackage[ngerman,german,naustrian,austrian,english,british,american,canadian,frenchb,canadien,spanish,italian]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage[textgreek]{chemnum}
-\usepackage{textcomp,microtype,libertine,url,xspace,longtable,tabu,booktabs,chemscheme}
+\usepackage{textcomp,microtype,libertine,url,xspace,longtable,tabu,booktabs,chemscheme,makeidx}
\usepackage[version=3]{mhchem}
\usepackage[normalem]{ulem}
\usepackage[dvipsnames]{xcolor}
@@ -46,6 +46,19 @@
\usepackage{chemfig,chemmacros}
\input{chemnum-codehelper}
+\begin{filecontents}{index_en.ist}
+ preamble "\\begin{theindex}\n Section headings are typeset \\textbf{bold}, packages \\textsf{sans serif}, commands \\textcolor{code}{brown}, and keys \\textcolor{key}{green}.\\newline\n\n"
+ heading_prefix "{\\bfseries "
+ heading_suffix "\\hfil}\\nopagebreak\n"
+ headings_flag 1
+ delim_0 "\\dotfill "
+ delim_1 "\\dotfill "
+ delim_2 "\\dotfill "
+ delim_r "--"
+ suffix_2p "\\nohyperpage{\\,f.}"
+ suffix_3p "\\nohyperpage{\\,ff.}"
+\end{filecontents}
+
\usepackage{hyperref}
\hypersetup{colorlinks=true,
allcolors=myblue,
@@ -60,31 +73,30 @@
pdfcreator={LaTeX}
}
-\newcommand*\changefont[3]{\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont}
-
\ExplSyntaxOn
-\DeclareDocumentEnvironment { myquote } { m }
- {
- \quote
- \small \changefont { cmss } { m } { sl }
- }
+\NewDocumentCommand \keyentry { mmm }
{
- \par\noindent
- \parbox { \linewidth } { \raggedleft \normalfont \itshape #1 }
- \endquote
+ \noindent
+ \textcolor{key}{ \texttt { #1 } }
+ \texttt { ~=~#2 }
+ \hfill type:~
+ \texttt { #3 }
+ \index { #1 @ \textcolor{key}{ \texttt { #1 } } }
}
\ExplSyntaxOff
-\newcommand*\chemnum{{\scshape\textcolor{myblue}{chemnum}}\xspace}
-\newcommand*\CNversion{v0.3e\xspace}
-\newcommand*\CNdate{2011/12/01\xspace}
+\GetFileInfo{chemnum}
+\newcommand*\chemnum{{\scshape\textcolor{myblue}{\filename}}\xspace}
+\newcommand*\CNversion{\fileversion\xspace}
+\newcommand*\CNdate{\filedate\xspace}
+\newcommand*\CNinfo{\fileinfo\ with \LaTeXe.}
-\newcommand*\paket[1]{\textsf{#1}\footnote{\url{http://www.ctan.org/pkg/#1}}}
\newcommand*\eg{\mbox{e.\,g.}\xspace}
\newcommand*\ie{\mbox{i.\,e.}\xspace}
\newcommand*\etc{\mbox{etc.}\xspace}
-\cmpdinit*{a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,benzene,r,s,t}
+\cmpdinit*{a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,benzene,r,s,t,{1,3-dichlorocyclohexanole}}
+\makeindex
\begin{document}
\selectlanguage{english}
\begin{titlepage}
@@ -97,8 +109,9 @@
\vskip.25cm
\normalsize\url{http://www.mychemistry.eu/}\\
\href{mailto:contact@mychemistry.eu}{contact@mychemistry.eu}
- \begin{center}\Large\color{myblue}
- A comprehensive approach for the numbering of chemical compounds with \LaTeXe.
+ \begin{center}
+ \Large\color{myblue} \CNinfo \\[16pt]
+ \normalcolor English documentation
\end{center}
\vskip3cm \cmpdinit*{glucose.alpha, glucose.beta, glucose.chain}
\cmpd*[sub-counter = greek]{glucose.alpha, glucose.beta}\cmpd*{glucose.chain}
@@ -123,34 +136,72 @@
\cmpdreset
\tableofcontents
-\section{Licence, Requirements}
+\section{A very short readme}
\chemnum \CNversion underlies the \LaTeX\ Project Public License Version 1.3 or later.\newline(\url{http://www.latex-project.org/lppl.txt})
-\chemnum internally loads the packages \textsf{expl3} and \paket{xparse}. \textsf{xparse} is part of the \paket{l3packages} bundle, \textsf{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}.
-\section{Package Options}\label{sec:package_options}
+In this command you can easily distinguish between a \textcolor{code}{\ttfamily\textbackslash command}, a \textcolor{key}{\ttfamily key} belonging to a key/value pair and \texttt{other code}.
+
+\section{News and a word of apology}
+In the update to v0.4 there have been some changes made with the keys. 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 keys have new names:
+\begin{center}
+ \begin{tabular}{ll}\toprule
+ \bfseries old name & \bfseries new name \\\midrule
+ \key{cmpd-sep} & \key{sub-output-sep} \\
+ \key{sub-marker} & \key{sub-input-sep} \\
+ \key{sub-range-sep} & \key{subrange-output-sep} \\
+ \key{sub-range-marker} & \key{subrange-input-sep} \\
+ \key{strict} & \key{init-strict} \\
+ \key{sub-init} & \key{init-sub} \\\bottomrule
+ \end{tabular}
+\end{center}
+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{f.{one,two}}, see page \pageref{sssec:list-output-sep}. \\
+ \key{sublist-input-sep} & list separation in the input of labels like \cmpd{f.{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
+ \end{tabular}
+\end{center}
+
+Also new is the way how lists and ranges of sublabels are input. The key \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}.
+
+With v0.4 this documentation got an index.
+
+\section{Package options}\label{sec:package_options}\secidx{Package options}
\chemnum has one package option.
\begin{framed}
\centering\lstinline+\usepackage[textgreek = <value>]{chemnum}+
\end{framed}
-With this you can both choose between the three different styles of the \textsf{textgreek} package\footnote{See the \textsf{textgreek} documentation for details.} or load \chemnum without the \textsf{textgreek} package. Available values are \lstinline=artemisia=, \lstinline=cbgreek=, \lstinline=euler= and \lstinline=false=. Using \lstinline+\usepackage[textgreek]{chemnum}+ is the same as \lstinline+\usepackage[textgreek = cbgreek]{chemnum}+. If you use \chemnum without option \textsf{textgreek} is not used. This corresponds to \lstinline+\usepackage[textgreek = false]{chemnum}+, the default setting.
+With this you can both choose between the three different styles of the \paket{textgreek} package\footnote{See the \paket*{textgreek} documentation for details.} or load \chemnum without the \paket{textgreek} package. Available values are \lstinline=artemisia=, \lstinline=cbgreek=, \lstinline=euler= and \lstinline=false=. Using \lstinline+\usepackage[textgreek]{chemnum}+ is the same as \lstinline+\usepackage[textgreek = cbgreek]{chemnum}+. If you use \chemnum without option \textsf{textgreek} is not used. This corresponds to \lstinline+\usepackage[textgreek = false]{chemnum}+, the default setting.
This document was set with \lstinline+\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.
The first one -- \paket{chemcono} -- redefined bibliography commands for that purpose. Compounds have to be declared in what is called \lstinline=\theffbibliography=. Then one can reference them with \lstinline=\fcite=. However, it produces a list of compounds in the text. So the package author suggests:
-\begin{myquote}{Stefan Schulz}
+\begin{myquote}[Stefan Schulz]
After compilation and printout, discard the last page.
\end{myquote}
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 \textsf{chemcono} any more. When he wrote the package he basically used the same mechanism to create the labels as \textsf{chemcono} did.
-\begin{myquote}{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 \lstinline=\bibitem= and \lstinline=\cite= in pretty much the same way as \textsf{chemcono} does by extracting the corresponding code from \lstinline=article.cls= and \lstinline=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.
+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{myquote}[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 \lstinline=\bibitem= and \lstinline=\cite= in pretty much the same way as \paket{chemcono} does by extracting the corresponding code from \lstinline=article.cls= and \lstinline=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{myquote}
Some points still left me unsatisfied, though:
\begin{enumerate}
@@ -162,16 +213,15 @@ Some points still left me unsatisfied, though:
Then there is \paket{bpchem}, which provides commands similar to \lstinline=\label= \lstinline=\ref=: \lstinline=\CNlabel{}=, \lstinline=\CNlabelnoref{}= and \lstinline=\CNref{}=. It provides commands for sublabels, too: \lstinline=\CNlabelsub{}{}=, \lstinline=\CNlabelsubnoref{}{}= and \lstinline=\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 \textsf{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.
-\newpage
\section{Numbering compounds}\label{sec:nummerieren}
-\subsection{Basic command}
-The main command of this package is
+\subsection{Main command}\secidx{Main command}
+The main command of this package is this one:
\begin{framed}
-\centering\lstinline=\cmpd{<label name>}=
+ \centering\cmd{cmpd}{<label name>}
\end{framed}
\noindent When \lstinline=<label name>= is used the first time, the label is created, saved (= declared) and printed. Each further use just prints the label.
@@ -182,26 +232,28 @@ The main command of this package is
If it is necessary to declare a compound without printing the label, this is possible with
\begin{framed}\label{cmd:unsichtbares_label}
-\centering\lstinline=\cmpd*{<label name>}=
+\centering\cmd[cmpda]{cmpd*}{<label name>}
\end{framed}
-\noindent This declares the label but doesn't print anything. \textbf{This command is not needed when} \lstinline=\cmpdinit{}= \textbf{is used, see section \ref{sec:cmpdinit} (pages \pageref{sec:cmpdinit}ff).}
+\noindent This declares the label but doesn't print anything. \textbf{This command is not needed when} \cmd{cmpdinit}{} \textbf{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.
\end{beispiel}
-You can pretty much use what you like for a label name\footnote{There are restrictions, see section \ref{ssec:listen} on page \pageref{ssec:listen}, section \ref{sssec:list-input-sep} on page \pageref{sssec:list-input-sep}, section \ref{ssec:unterlabel} on page \pageref{ssec:unterlabel} and section \ref{ssec:sub_label_marker} on page \pageref{ssec:sub_label_marker}.}. 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}.
\end{beispiel}
+\lstset{showspaces=false}\secidx*{Main command}
-\subsection{Sublabels}\label{ssec:unterlabel}
+\subsection{Sublabel}\label{ssec:unterlabel}\secidx{Sublabel}
If you want a label like \cmpd{a.one}, you need to use the following syntax:
\begin{framed}
-\centering\lstinline=\cmpd{<label name>.<subname>}=
+ \centering\cmd{cmpd}{<label name>.<subname>}
\end{framed}
-\noindent \lstinline=<label name>= is the main name which stays the same, \lstinline=<subname>= varies. This syntax means that the point \lstinline=.= \emph{cannot} be a part of \lstinline=<label name>= or \lstinline=<subname>=.
+\noindent \lstinline=<label name>= is the main name which stays the same, \lstinline=<subname>= varies. This syntax means that the point \lstinline=.= \emph{cannot} be a part of \lstinline=<label name>= or \lstinline=<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}.
@@ -219,33 +271,86 @@ 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[sub-list={one,two}]{f} is explained in section \ref{ssec:lists_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}
-There is actually more to the \lstinline=\cmpd= command. It also prints lists of labels.
+\subsection{Lists}\label{ssec:listen}\secidx{Lists}
+There is actually more to the \cmd{cmpd} command. It also prints lists of labels.
The right description would be something like:
\begin{framed}
-\centering\lstinline=\cmpd{<(possibly comma separated list of) label name(s)>}=
+ \centering\cmd{cmpd}{<(possibly comma separated list of) label name(s)>}
\end{framed}
-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}.
+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 \cmd{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 \verb=, 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}.
+
+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.
+
+Using this syntax you also can create ranges of sublabels. As a marker to indicate the range \chemnum uses two points \lstinline=..=.
+\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}.
+
+\chemnum provides a key (see section \ref{sec:cmpdsetup} for more details), with which all sublabels of a main label can be printed as range.
+\begin{framed}
+ \keyentry{cmpd-all}{true/false}{boolean}
+\end{framed}
+\begin{beispiel}
+ \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 \lstinline=<jobname>.cmpd= file (supposing your source file is called \lstinline=<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 key:
+\begin{framed}
+ \keyentry{sub-only}{true/false}{boolean}
+\end{framed}
+\begin{beispiel}
+ % uses packages `chemfig', `mhchem' and `booktabs'
+ \cmpd*{benzene.H,benzene.Me,benzene.OH,benzene.NH2}
+ \chemname{\chemfig{*6(=-=-(-R)=-)}}{\cmpd[cmpd-all]{benzene}}
+ \begin{tabular}{lll}
+ & \ce{{}-R} & Name \\\midrule
+ \cmpd[sub-only]{benzene.H} & \ce{{}-H} & Benzene \\
+ \cmpd[sub-only]{benzene.Me} & \ce{{}-CH3} & Toluene \\
+ \cmpd[sub-only]{benzene.OH} & \ce{{}-OH} & Phenol \\
+ \cmpd[sub-only]{benzene.NH2} & \ce{{}-NH2} & Phenylamine (Aniline)
+ \end{tabular}
+\end{beispiel}
-\section{Initialize labels at once}\label{sec:cmpdinit}
+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.
\subsection{Usage}
\subsubsection{Main labels}
Perhaps you're missing \textsf{chemcompounds}' command \lstinline=\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{framed}
-\centering\lstinline=\cmpdinit{<comma separated list of label names>}=
-\centering\lstinline=\cmpdinit*{<comma separated list of label names>}=
+ \centering\cmd{cmpdinit}{<comma separated list of label names>}
+ \centering\cmd[cmpdinita]{cmpdinit*}{<comma separated list of label names>}
\end{framed}
-All compounds set inside \lstinline=\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}
@@ -263,7 +368,7 @@ All compounds set inside \lstinline=\cmpdinit{}= are initialized and declared \e
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.
-\lstinline=\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}
@@ -279,91 +384,96 @@ Please note that for labels with sublabels only the \emph{main name} can and sho
{}*************************************************
\end{framed}
-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 \lstinline=\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}).
\subsubsection{Sublabels}
If you'd like a warning for label-sublabel combinations as well, or want to preset their order, you can use
\begin{framed}
-\centering\lstinline+\cmpdinit[!!sub-init = true!!]{<comma separated list of label names>}+
+ \centering\cmd{cmpdinit}[\key{init-sub}{true}]{<comma separated list of label names>}
\end{framed}
\noindent This will give you a warning in these cases, too.
\cmpdreset
\begin{beispiel}
- \cmpdinit[sub-init = true]{E.e} \cmpd{E.e, E.f}
+ \cmpdinit[init-sub = true]{E.{e,f,g}}
+ \cmpd{E.e, E.h}
\end{beispiel}
\begin{framed}
\small\ttfamily\noindent
{}*************************************************\\
- {}* chemnum warning: "cmpd-sub-init"\\
+ {}* chemnum warning: "cmpd-init-sub"\\
{}* \\
- {}* You used \verb=\cmpdinit= and "{}sub-init = true"{} but didn't initiate sub-compound\\
- {}* "{}E.f"{} on line 1.\\
+ {}* You used \verb=\cmpdinit= and "{}init-sub = true"{} but didn't initiate sub-compound\\
+ {}* "{}E.h"{} on line 1.\\
{}*************************************************
\end{framed}
\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 \lstinline=\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{framed}
-\centering\lstinline+\cmpdinit[!!strict=true!!]{<comma separated list of label names>}+
+ \centering\cmd{cmpdinit}[\key{init-strict}{true}]{<comma separated list of label names>}
\end{framed}
-A usage of \lstinline+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 \lstinline+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 \lstinline=\cmpdinit= with both keys:
+Of course you can use \cmd{cmpdinit} with both keys
\begin{framed}
-\centering\lstinline+\cmpdinit[strict = true, sub-init = true]{<comma separated list of label names>}+
+ \centering\cmd{cmpdinit}[\key{init-strict}{true}, \key{init-sub}{true}]{<comma separated list of label names>}
\end{framed}
+\noindent 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.
-If you have chosen a different sublabel marker (see page \pageref{ssec:sub_label_marker}) you need to use it with \lstinline+\cmpdinit[sub-init = true]+ 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}.
\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.
\begin{enumerate}
- \item The use of \lstinline=\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 \lstinline=\cmpdinit= does the same thing as \lstinline=\cmpdinit*= \emph{and} declares all the labels in the given order. So if you use it, you won't have to use \lstinline=\cmpd*= (section \ref{cmd:unsichtbares_label}) and \lstinline=\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}
-\section{Resetting the counter}\label{sec:cmpdreset}
+\section{Resetting the counter}\label{sec:cmpdreset}\secidx{Reset the counter}
With the command
\begin{framed}
-\centering\lstinline=\cmpdreset[<number>]=
+ \centering\cmd{cmpdreset}[<number>]
\end{framed}
-\noindent it is possible to reset the counter. Without argument it is reset to \verb=1=. So \lstinline=\cmpdreset= and \lstinline=\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.
-
+\noindent 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}
\textbf{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}
\end{beispiel}
+\secidx*{Reset the counter}
\section{Special usage}
\subsection{Moving arguments -- section titles}
-Using \lstinline=\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 \lstinline=\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 \lstinline=\cmpdinit{}= (see page \pageref{sec:cmpdinit}) in the preamble or the beginning of the document.
- \item You use \lstinline=\cmpd+= to set the label. It will read the label from the file \lstinline=<jobname>.cmpd= (supposing your main file is called \lstinline=<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 \lstinline=<jobname>.cmpd= (supposing your main file is called \lstinline=<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 command\label{cmd:cmpd_plus}
\begin{framed}
-\centering\lstinline=\cmpd+{<label name>}=
+ \centering\cmd[cmpdb]{cmpd+}{<label name>}
\end{framed}
-reads the label name that is to be printed from \lstinline=<jobname>.cmpd=. In a way this is the opposite of \lstinline=\cmpd*= since it doesn't declare a label but only references and prints it. So in order to use \lstinline=\cmpd+{<label>}=, \lstinline=<label>= must have been declared, either with \lstinline=\cmpd{<label>}= or with \lstinline=\cmpd*{<label>}=. It doesn't matter, if this declaration is done before or after the usage of \lstinline=\cmpd+=. This command is useful, if the label is used inside a moving argument like in \lstinline=\section{}=. \textbf{It is not needed when} \lstinline=\cmpdinit{}= \textbf{is used, see section \ref{sec:cmpdinit} (pages \pageref{sec:cmpdinit}ff).}
+reads the label name that is to be printed from \lstinline=<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>}, \lstinline=<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 \lstinline=\section{}=. \textbf{It is not needed when} \cmd{cmpdinit}{} \textbf{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}}
@@ -372,7 +482,7 @@ reads the label name that is to be printed from \lstinline=<jobname>.cmpd=. In a
\end{beispiel}
\subsection{Floating environments}\cmpdinit*{float1,float2}
-The usage of \lstinline=\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 \lstinline=\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}
@@ -388,10 +498,10 @@ The usage of \lstinline=\cmpd= inside a float shouldn't be a problem: labels are
This also works, of the floating environment is placed before the code, for instance by using the option \lstinline=[t]=.
\cmpdinit*{Alc,EtherBr,cpd}
-\subsection{Schemes created by external programs}\label{ssec:cmpdref}
+\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 \textsc{ChemDraw} or \textsc{Marvin\-Sketch}, and want to use \chemnum with them as well, you can use this command:
\begin{framed}
-\centering\lstinline=\cmpdref[<keyval>][<tag>]{<label name>}=
+ \centering\cmd{cmpdref}[<keyval>][<tag>]{<label name>}
\end{framed}
This command is inspired by the \lstinline=\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 \lstinline=eps= file.
\begin{beispiel}[code and float]
@@ -406,10 +516,10 @@ This command is inspired by the \lstinline=\schemeref= command from the package
\cmpdref{EtherBr} % replaces TMP2
% \cmpdref{third} would replace TMP3
\includegraphics{scheme-tmp}
- \caption{Scheme with automatted labels.}
+ \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 \textsf{chemscheme} \chemnum uses the \lstinline=\psfrag= command to do that. This means you have to either compile via \textsc{latex}, \textsc{dvips}, \textsc{ps2pdf}, or for instance use the package \paket{auto-pst-pdf} to be able to use \textsc{pdflatex}.
+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 \lstinline=\psfrag= command of the \paket{psfrag} package to do that. This means you have to either compile via \textsc{latex}, \textsc{dvips}, \textsc{ps2pdf}, or for instance use the package \paket{auto-pst-pdf} to be able to use \textsc{pdflatex}.
In each case it is important that the marker is saved as \emph{text} in the \lstinline=eps= file.
@@ -420,7 +530,7 @@ You can customize the labels with the keys presented in section \ref{sec:cmpdset
\cmpdref[cmpd-style=\bf\sf\textcolor{green}]{Alc} % replaces TMP1
\cmpdref[cmpd-style=\bf\sf\textcolor{green}]{EtherBr} % replaces TMP2
\includegraphics{scheme-tmp}
- \caption{Scheme with automatted labels.}
+ \caption{Scheme with automated labels.}
\end{scheme}
\end{beispiel}
@@ -448,20 +558,57 @@ Of course sublabels work in the known way:
\cmpdref{cpd.red}
\cmpdref{cpd.ox}
\includegraphics{scheme-tmp}
- \caption{Scheme with automatted labels and sublabels.}
+ \caption{Scheme with automated labels and sublabels.}
\end{scheme}
\end{beispiel}
+\cmpdreset[10]\secidx*{Schemes by external programs}
+
+\section{Usage with \textsf{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 \textsc{pdf}.
+\begin{framed}
+ \keyentry{hyper-use}{true/false}{boolean}
+\end{framed}
+Setting this key (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.
+
+\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}.
+
+ 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 keys:
+\begin{framed}
+ \keyentry{hyper-target}{<link name>}{literal}\\
+ \keyentry{hyper-link}{<link name>}{literal}
+\end{framed}
+With \key{hyper-target} you can set the target. \textbf{Caution}: if you use this key with a list \emph{every} label of the list will get the same link name and \paket{hyperref} will warn you:
+\begin{framed}\ttfamily
+destination with the same identifier (name{<link name>}) has been already used, duplicate ignored
+\end{framed}
+
+\key{hyper-link} creates a link for the denominated target. \textbf{Caution}: if you use this key 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}.
+\end{beispiel}
+
+If you use \key{hyper-link} without the corresponding \key{hyper-target} \paket{hyperref} will issue a warning:
+\begin{framed}\ttfamily
+name{<link name>} has been referenced but does not exist, replaced by a fixed one
+\end{framed}
+\secidx*[Usage with hyperref]{Usage with \textsf{hyperref}}
-\newpage\cmpdreset[9]
\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
\begin{framed}
-\centering\lstinline+\cmpdsetup{key1 = value1, key2 = value2}+
+ \centering\cmd{cmpdsetup}{key1 = value1, key2 = value2}
\end{framed}
\noindent or only for a single command directly with
\begin{framed}
-\centering\lstinline+\cmpd[key1 = value1, key2 = value2]{<label name>}+
+ \centering\cmd{cmpd}[key1 = value1, key2 = value2]{<label name>}
\end{framed}
There are different kinds of keys. Depending on it they can have different kinds of values.
@@ -472,21 +619,23 @@ There are different kinds of keys. Depending on it they can have different kinds
\item[\ttfamily boolean] These keys can either have the value \lstinline=true= or \lstinline=false=.
\end{description}
-If you use keys without values like \lstinline+\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. \emph{All} of \chemnum's keys have default values. They are listed in section \ref{tab:keys} on page \pageref{tab:keys}.
+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. \emph{All} of \chemnum's keys have default values. They are listed in section \ref{tab:keys} on page \pageref{tab:keys}.
The keys are divided in to different classes\label{key_classes}, which indicate the scope they're used for. They all follow the form \lstinline+<class>-key = <value>+:
\begin{description}
\item[\ttfamily cmpd] These keys change the whole label or the main label.
- \item[\ttfamily sub] These keys have an impact on sublabels.
+ \item[\texttt{sub}, \texttt{sublist}, \texttt{subref}] These keys have an impact on sublabels.
\item[\ttfamily list] Keys which change the output of lists.
- \item[\ttfamily ref] Keys which have an impact on \lstinline=\cmpdref=.
+ \item[\ttfamily ref] Keys which have an impact on \cmd{cmpdref}.
+ \item[\ttfamily hyper] Keys which have an impact on the usage with \paket{hyperref}.
+ \item[\ttfamily init] Keys which have an impact in the initialization of the labels.
\end{description}
-\subsection{Font style}\label{ssec:schriftstil}
+\subsection{Font style}\label{ssec:schriftstil}\secidx{Font style}
With the keys
\begin{framed}
-\noindent\lstinline+cmpd-style = <style>+ \hfill type: \lstinline=macro=
-\noindent\lstinline+cmpd-weight = bold/normal+ \hfill type: \lstinline=choice=
+ \keyentry{cmpd-style}{<style>}{macro}\\
+ \keyentry{cmpd-weight}{bold/normal}{choice}
\end{framed}
\noindent you can change the style with which the labels are printed.
@@ -502,29 +651,32 @@ With the keys
\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.
+\secidx*{Font style}
-\subsection{Own labels}\label{ssec:own_labels}
+\subsection{Own labels}\label{ssec:own_labels}\secidx{Own labels}
With the key
\begin{framed}
-\noindent\lstinline+cmpd-label = <label>+ \hfill type: \lstinline=literal=
+ \keyentry{cmpd-label}{<label>}{literal}
\end{framed}
\noindent 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}
\end{beispiel}
+\secidx*{Own labels}
-\subsection{Own markers in images}
-If you don't want to use \lstinline=TMP= as temporary markers for \lstinline=\cmpdref= (see page \pageref{ssec:cmpdref}), you can change this. For example into \lstinline=tmp=: \label{key:key-tag}
+\subsection{Own markers in images}\secidx{Own markers in images}
+If you don't want to use \lstinline=TMP= as temporary markers for \cmd{cmpdref} (see page \pageref{ssec:cmpdref}), you can change this. For example into \lstinline=tmp=: \label{key:key-tag}
\begin{beispiel}[code only]
\cmpdsetup{ref-marker = tmp}
\end{beispiel}
+\secidx*{Own markers in images}
-\subsection{Counter}\label{ssec:counter}
+\subsection{Counter}\label{ssec:counter}\secidx{Counter}
You can change the format of the counters, too, if you like.
\begin{framed}
-\noindent\lstinline+cmpd-counter = <counter>+ \hfill type: \lstinline=choice=\\
-\lstinline+sub-counter = <counter>+ \hfill type: \lstinline=choice=\label{key:sub-counter}
+ \keyentry{cmpd-counter}{<counter>}{choice}\\
+ \keyentry{sub-counter}{<counter>}{choice}\label{key:sub-counter}
\end{framed}
You can choose between \lstinline=arabic=, \lstinline=alph=, \lstinline=Alph=, \lstinline=greek=, \lstinline=Greek=, \lstinline=roman=, \lstinline=Roman= and \lstinline=Symbol=.
@@ -536,12 +688,13 @@ Please note: a change of format only affects labels \emph{which are not yet decl
\cmpd{f.three,f.four}\\ % be careful: the main label already exists and isn't changed!
\cmpd[cmpd-counter,sub-counter = greek]{p.one,p.two}
\end{beispiel}
+\secidx*{Counter}
-\subsection{Delimiters}
+\subsection{Delimiters}\secidx{Delimiters}
Both single labels and whole lists can get delimiters. This is done with the keys
\begin{framed}
-\noindent\lstinline+cmpd-delim = <odelim><cdelim>+ \hfill type: \lstinline=literal=\\
-\lstinline+list-delim = <odelim><cdelim>+ \hfill type: \lstinline=literal=\\
+ \keyentry{cmpd-delim}{<odelim><cdelim>}{literal}\\
+ \keyentry{list-delim}{<odelim><cdelim>}{literal}\\
values need \emph{two} tokens!
\end{framed}
\begin{beispiel}
@@ -551,7 +704,7 @@ values need \emph{two} tokens!
\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 \lstinline=cmpd-delim= and \lstinline=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 \lstinline=\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
@@ -567,8 +720,8 @@ If you generally use labels in braces but want to use a single one without brace
\end{beispiel}
With
\begin{framed}\label{cmd:ohne_begrenzer}
-\centering\lstinline=\cmpd-{<label name>}=\\
-\lstinline=\cmpdref-{<label name>}=
+ \centering\cmd[cmpdc]{cmpd-}{<label name>}\\
+ \cmd[cmpdrefc]{cmpdref-}{<label name>}
\end{framed}
\noindent the braces of single labels can easily be removed (but not the ones of a list).
\begin{beispiel}
@@ -578,15 +731,16 @@ With
\cmpd-{a, b, f.two, k} % braced once
\end{beispiel}
-Using \lstinline+\cmpdsetup{cmpd-delim = }+ and \lstinline+\cmpdsetup{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}
+\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.
\begin{framed}
-\noindent\lstinline+cmpd-prefix = <prefix>+ \hfill type: \lstinline=literal=\\
-\lstinline+cmpd-suffix = <prefix>+ \hfill type: \lstinline=literal=\\
-\lstinline+list-prefix = <prefix>+ \hfill type: \lstinline=literal=\\
-\lstinline+list-suffix = <prefix>+ \hfill type: \lstinline=literal=
+ \keyentry{cmpd-prefix}{<prefix>}{literal}\\
+ \keyentry{cmpd-suffix}{<prefix>}{literal}\\
+ \keyentry{list-prefix}{<prefix>}{literal}\\
+ \keyentry{list-suffix}{<prefix>}{literal}
\end{framed}
The same rule as for the delimiters applies: list attributes are only used with lists, \ie at least with two items.
@@ -594,7 +748,7 @@ An example for the label attributes:
\begin{beispiel}
\cmpd{a, b, f.two, k}\\ % default
\cmpd[cmpd-prefix = Nr.]{a, b, f.two, k}\\
- \cmpdsetup{cmpd-prefix = \textnumero}
+ \cmpdsetup{cmpd-prefix = \(\rightarrow\)}
\cmpd{a, b, f.two, k}\\
\cmpd{a} % NOT a list!
\end{beispiel}
@@ -613,30 +767,69 @@ Between prefix, label and suffix there is a space inserted as default behaviour:
\end{beispiel}
It can be changed with
\begin{framed}
-\noindent\lstinline+cmpd-space = <space>+ \hfill Typ: \lstinline=literal=
+ \keyentry{cmpd-space}{<space>}{literal}
\end{framed}
\begin{beispiel}
\cmpd[cmpd-suffix=sx,cmpd-prefix=px,cmpd-space={}]{k}
\end{beispiel}
+\secidx*{Suffix and prefix}
+
+\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 \lstinline=.= 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 \lstinline=@=. Furthermore you should be careful to use different symbols for the other separators (see the next sections).
+\begin{framed}
+ \keyentry{sub-input-sep}{<separator>}{literal}
+\end{framed}
+\begin{beispiel}
+ \cmpdsetup{sub-input-sep = !}
+ \cmpd{f!one, g!two}\\
+ \cmpd[sub-input-sep= +]{f+one, g+two}\\
+ \cmpd[sub-input-sep= ~]{f~one, g~two}\\
+ \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 \lstinline=\tableofcontents= or in the preamble, which marker you use. Otherwise, the \lstinline=\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.
-\subsection{Separators}\label{ssec:trenner}
-\subsubsection{In case of labels}
-If you have labels with sublabels, you can use a separator symbol:
+\subsubsection{Labels -- output}\index{Separators!labels!output}
+You can separate the labels from the sublabels if you like to.
\begin{framed}
-\noindent\lstinline+cmpd-sep = <separator>+ \hfill type: \lstinline=literal=
+ \keyentry{sub-output-sep}{<separator>}{literal}
\end{framed}
\begin{beispiel}
\cmpd{a, b, f.two, f.three, k}\\ % default
- \cmpd[cmpd-sep = -]{a, b, f.two, f.three, k}\\
- \cmpdsetup{cmpd-sep = $\cdot$}
+ \cmpd[sub-output-sep = -]{a, b, f.two, f.three, k}\\
+ \cmpdsetup{sub-output-sep = $\cdot$}
\cmpd{a, b, f.two, f.three, k}\\
- \cmpd[cmpd-sep = :]{a, b, f.two, f.three, k}
+ \cmpd[sub-output-sep = :]{a, b, f.two, f.three, k}
\end{beispiel}
-\subsubsection{In case of lists -- input}\label{sssec:list-input-sep}
-If you like you can change the list input seperator. Predefined is the comma.
+\subsubsection{Sublabels -- input}\label{sssec:range-input-sep}\index{Separators!subabels!input}
+As a default setting \chemnum use two points \lstinline=..= 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 \lstinline=@=. Furthermore you should be careful to use different symbols for the other separators.
\begin{framed}
-\noindent\lstinline+list-input-sep = <separator>+ \hfill type: \lstinline=literal=
+ \keyentry{subrange-input-sep}{<separator>}{literal}
+\end{framed}
+\begin{beispiel}
+ \cmpd[subrange-input-sep=:]{q.{one:four}}\\
+ \cmpdsetup{subrange-input-sep=--}
+ \cmpd{q.{one--four}}
+\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:
+\begin{framed}
+ \keyentry{subrange-output-sep}{<separator>}{literal}
+\end{framed}
+\begin{beispiel}
+ \cmpd[subrange-output-sep={ {\normalfont to} }]{q.{one..four}}\\
+ \cmpdsetup{subrange-output-sep=-}
+ \cmpd{q.{one..four}}
+\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 \texttt{,} as default. You can change that as you like. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \lstinline=@=. Furthermore you should be careful to use different symbols for the other separators.
+\begin{framed}
+ \keyentry{list-input-sep}{<separator>}{literal}\\
+ \keyentry{sub-input-sep}{<separator>}{literal}
\end{framed}
\begin{beispiel}
\cmpd{a, b, f.two, k}\\ % default
@@ -645,12 +838,17 @@ If you like you can change the list input seperator. Predefined is the comma.
\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\"udingk 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{In case of lists -- generally}
-In case of lists you also can set a separator symbol, which determines how the labels are separated from each other. This is the comma as default.
+\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.
\begin{framed}
-\noindent\lstinline+list-output-sep = <separator>+ \hfill type: \lstinline=literal=
+ \keyentry{list-output-sep}{<separator>}{literal}\\
+ \keyentry{sub-output-sep}{<separator>}{literal}
\end{framed}
\begin{beispiel}
\cmpd{a, b, f.two, k}\\ % default
@@ -660,13 +858,13 @@ In case of lists you also can set a separator symbol, which determines how the l
\cmpd{a, b, f.two, k}
\end{beispiel}
-\subsubsection{In case of lists -- last separator}\label{sssec:last-sep}
-The last separator in a list is a special case. \chemnum provides two keys with which it can be customized.
+\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 keys with which it can be customized.
\begin{framed}
-\noindent\lstinline+list-last-sep = <separator>+ \hfill type: \lstinline=literal=\\
-\lstinline+list-lang = <lang>+ \hfill type: \lstinline=choice=
+ \keyentry{list-last-sep}{<separator>}{literal}\\
+ \keyentry{list-lang}{<lang>}{choice}
\end{framed}
-There is the \lstinline=choice= key \lstinline=list-lang=, which changes language dependent settings. You can choose between \lstinline=US= (default), \lstinline=GB=, \lstinline=DE=, \lstinline=FR=, \lstinline=ES= and \lstinline=IT=.
+There is the \lstinline=choice= key \key{list-lang}, which changes language dependent settings. You can choose between \lstinline=US= (default), \lstinline=GB=, \lstinline=DE=, \lstinline=FR=, \lstinline=ES= and \lstinline=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}\\
@@ -677,7 +875,7 @@ There is the \lstinline=choice= key \lstinline=list-lang=, which changes languag
\end{beispiel}
As you can see the language \lstinline=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 \lstinline=list-last-sep= you also can set the last separator individually.
+With the key \key{list-last-sep} you also can set the last separator individually.
\begin{beispiel}
\cmpdsetup{list-lang = GB}%
\cmpd[list-last-sep = {and also}]{a, b, f.two, k}\\
@@ -686,168 +884,119 @@ With the key \lstinline=list-last-sep= you also can set the last separator indiv
\cmpd[list-last-sep = empty]{a, b, f.two, k}
\end{beispiel}
-\lstinline=empty= is a special value. If it is used, the separator set with \lstinline=list-output-sep= is used for the whole list.
+\lstinline=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}\\
\cmpd[list-output-sep = ;]{a, b, f.two, k}\\
- \cmpd[list-output-sep = {\ and}]{a, b, f.two, k}
-\end{beispiel}
-
-\subsection{Sublabel marker}\label{ssec:sub_label_marker}
-As a default setting \chemnum uses the point \lstinline=.= as a token to divide main label names from sub label names. You can change that as you like. Tokens you \emph{can't use} are \verb=, % #= and \emph{you shouldn't} use \lstinline=@=.
-\begin{framed}
-\noindent\lstinline+sub-marker = <separator>+ \hfill type: \lstinline=literal=
-\end{framed}
-\begin{beispiel}
- \cmpdsetup{sub-marker = !}%
- \cmpd{f!one, g!two}\\
- \cmpd[sub-marker= +]{f+one, g+two}\\
- \cmpd[sub-marker= ~]{f~one, g~two}\\
- \cmpd[sub-marker= &]{f&one, g&two}\\
- \cmpd[sub-marker= *]{f*one, g*two}\\
- \cmpd[sub-marker=\marker]{f\marker one,g\marker 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 \lstinline=\tableofcontents= or in the preamble, which marker you use. Otherwise, the \lstinline=\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 \lstinline=\cmpd= or \lstinline=\cmpdinit= etc.
-
-\subsection{Lists and ranges of sublabels}\label{ssec:lists_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}.
-
-\chemnum provides two keys to create such an output and two keys to customize the range.
-\begin{framed}
- \noindent\lstinline+cmpd-all = <bool>+ \hfill type: \lstinline=boolean=\\
- \noindent\lstinline+sub-list = {<list of sublabel names>}+ \hfill type: \lstinline=other=\\
- \noindent\lstinline+sub-range-sep = <separator>+ \hfill type: \lstinline=literal=\\
- \noindent\lstinline+sub-range-marker = <marker>+ \hfill type: \lstinline=literal=
-\end{framed}
-The type of the key \lstinline=sub-list= differs from other keys. It is similar to \lstinline=literal=. Best you look at the example below.
-
-\begin{beispiel}
- List of labels: \cmpd{q.one, q.two, q.three, q.four, q.five} \\
- All at once: \cmpd[cmpd-all]{q}
-\end{beispiel}
-
-If you don't want to address all sublabels but some of them, you can use the key \lstinline=sub-list=\label{key:sub-list}. As input you write a comma separated list of sublabel names associated with the main label you use.
-\begin{beispiel}
- \cmpd[sub-list={one,three,four}]{q}
-\end{beispiel}
-
-You also can use this key to print a range of sublabels. As a marker between the names of the sublabels two points \lstinline=..= are used.
-\begin{beispiel}
- \cmpd[sub-list={two..four}]{q}\\
- \cmpd[sub-list={one,three..five}]{q}\\
- \cmpd[sub-list={one..three,five}]{q}
-\end{beispiel}
-
-With the keys \lstinline=sub-range-sep= and \lstinline=sub-range-marker= you can both change the symbol that's used to indicate the range and the marker you use to input a range.
-\begin{beispiel}
- \cmpdsetup{sub-range-sep = {--}, sub-range-marker = : }
- \cmpd[sub-list={two:four}]{q}
+ \cmpd[list-output-sep = {\ und}]{a, b, f.two, k}
\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 \lstinline=<jobname>.cmpd= file (supposing your source file is called \lstinline=<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 key:
+\subsubsection{\texttt{\textbackslash\textcolor{code}{cmpdinit}} -- input}\label{sssec:init-input-sep}\index{Separators!cmpdinit@\textcolor{code}{\texttt{\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 \lstinline=@=.
\begin{framed}
- \noindent\lstinline+sub-only = <bool>+\hfill type: \lstinline=boolean=
+ \keyentry{init-input-sep}{<separator>}{literal}
\end{framed}
-\begin{beispiel}
- % use packages `chemfig', `mhchem' and `booktabs'
- \cmpd*{benzene.H,benzene.Me,benzene.OH,benzene.NH2}
- \chemname{\chemfig{*6(=-=-(-R)=-)}}{\cmpd[cmpd-all]{benzene}}
- \begin{tabular}{lll}
- & \ce{{}-R} & Name \\\midrule
- \cmpd[sub-only]{benzene.H} & \ce{{}-H} & Benzene \\
- \cmpd[sub-only]{benzene.Me} & \ce{{}-CH3} & Toluene \\
- \cmpd[sub-only]{benzene.OH} & \ce{{}-OH} & Phenol \\
- \cmpd[sub-only]{benzene.NH2} & \ce{{}-NH2} & Phenylamine (Aniline)
- \end{tabular}
-\end{beispiel}
-For the time being the \lstinline=sub-list= key requires a little caution. Unfortunately automatic sorting isn't quite as trivial as one would wish. So you have to use the sublabel names in the right order if you want to avoid labels like these:
+\subsubsection{An example}\label{sssec:input-sep-bsp}
+A small example how a customized input could look like:
\begin{beispiel}
- \cmpd[sub-list={five..three}]{q} or \cmpd[sub-list={three,one,four}]{q}.
+ \cmpdsetup{
+ sub-input-sep = ! ,
+ subrange-input-sep = : ,
+ sublist-input-sep = / ,
+ list-input-sep = +
+ }
+ \cmpd{a + f ! one + q ! one / three : five}
\end{beispiel}
+\secidx*{Separators}
-\section{Language Support}\label{sec:language_support}
+\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 \lstinline=\translate= command of the \textsf{translator} package, if it is available. If \textsf{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 \textsf{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 \lstinline=\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{german}\cmpd{r,s,t}\\
- \selectlanguage{naustrian}AU: \cmpd{r,s,t} \selectlanguage{austrian}\cmpd{r,s,t}\\
+ \selectlanguage{ngerman}DE: \cmpd{r,s,t}\\
\selectlanguage{english}EN: \cmpd{r,s,t}\\
\selectlanguage{british}GB: \cmpd{r,s,t}\\
\selectlanguage{american}US: \cmpd{r,s,t}\\
- \selectlanguage{canadian}CDN-EN: \cmpd{r,s,t}\\
- \selectlanguage{canadien}CDN-FR: \cmpd{r,s,t}\\
\selectlanguage{french}FR: \cmpd{r,s,t}\\
\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.
-\subsection{Harvard Comma}\label{ssec:harvard-comma}
+\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.
-\begin{myquote}{\href{http://en.wikipedia.org/wiki/Serial_comma}{Wikipedia}, 2011/11/07}
+\begin{myquote}[\href{http://en.wikipedia.org/wiki/Serial_comma}{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 \textsc{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 \textsc{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{myquote}
\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{framed}
-\noindent\lstinline+list-serial-comma = <bool>+ \hfill Typ: \lstinline=boolean=\label{key:list-serial-comma}
+ \keyentry{list-serial-comma}{true/false}{boolean}\label{key:list-serial-comma}
\end{framed}
\begin{beispiel}
\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 \lstinline=list-serial-comma= \emph{after} \lstinline=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}
\end{beispiel}
+\secidx*{Harvard comma}\secidx*{Language support}
\section{Overview}
\subsection{Keys}\label{ssec:keys_uebersicht}
In this section all keys are listed.
\begin{center}
\label{tab:keys}
- \begin{longtabu*}{>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l}\toprule
- \normalfont\bfseries key & \normalfont\bfseries default & \normalfont\bfseries type \\\midrule
- cmpd-style & & macro \\
- cmpd-weight & bold & choice \\
- cmpd-label & & literal \\
- cmpd-delim$^\mathrm{a}$ & () & literal \\
- cmpd-odelim & & literal \\
- cmpd-cdelim & & literal \\
- cmpd-prefix & & literal \\
- cmpd-suffix & & literal \\
- cmpd-space & \lstinline=\penalty\@m\ = & literal \\
- cmpd-sep & & literal \\
- cmpd-counter & arabic & choice \\
- cmpd-all & true & boolean \\\midrule
- sub-marker & . & literal \\
- sub-counter & alph & choice \\
- sub-list & & other$^\mathrm{b}$ \\
- sub-range-sep & - & literal \\
- sub-range-marker & .. & literal \\
- sub-only & & boolean \\\midrule
- list-delim$^\mathrm{a}$ & () & literal \\
- list-odelim & & literal \\
- list-cdelim & & literal \\
- list-prefix & & literal \\
- list-suffix & & literal \\
- list-input-sep & , & literal \\
- list-output-sep & , & literal \\
- list-lang & US & choice \\
- list-last-sep & and$^\mathrm{c}$ & literal \\
- list-serial-comma & & boolean \\\midrule
- ref-tag & TMP & literal \\\bottomrule
+ \begin{longtabu*}{l>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l}\toprule
+ \bfseries key & \normalfont\bfseries default & \normalfont\bfseries predefined & \normalfont\bfseries type \\\midrule
+ \key{cmpd-style} & & & macro \\
+ \key{cmpd-weight} & bold & bold & choice \\
+ \key{cmpd-label} & & & literal \\
+ \key{cmpd-delim}$^\mathrm{a}$ & () & & literal \\
+ \key{cmpd-odelim} & & & literal \\
+ \key{cmpd-cdelim} & & & literal \\
+ \key{cmpd-prefix} & & & literal \\
+ \key{cmpd-suffix} & & & literal \\
+ \key{cmpd-space} & \lstinline=\penalty\@m\ = & \lstinline=\penalty\@m\ = & literal \\
+ \key{cmpd-counter} & arabic & arabic & choice \\
+ \key{cmpd-all} & true & false & boolean \\\midrule
+ \key{sub-only} & true & false & boolean \\
+ \key{sub-counter} & alph & alph & choice \\
+ \key{sub-output-sep} & & , & literal \\
+ \key{sub-input-sep} & . & . & literal \\
+ \key{sublist-output-sep} & , & , & literal \\
+ \key{sublist-input-sep} & , & , & literal \\
+ \key{subrange-output-sep} & -- & -- & literal \\
+ \key{subrange-input-sep} & .. & .. & literal \\\midrule
+ \key{list-delim}$^\mathrm{a}$ & () & & literal \\
+ \key{list-odelim} & & & literal \\
+ \key{list-cdelim} & & & literal \\
+ \key{list-prefix} & & & literal \\
+ \key{list-suffix} & & & literal \\
+ \key{list-input-sep} & , & , & literal \\
+ \key{list-output-sep} & , & , & literal \\
+ \key{list-lang} & US & US$^\mathrm{b}$ & choice \\
+ \key{list-last-sep} & and$^\mathrm{c}$ & & literal \\
+ \key{list-serial-comma} & true & true$^\mathrm{c}$ & boolean \\\midrule
+ \key{ref-tag} & TMP & TMP & literal \\
+ \key{ref-style} & & \lstinline=\sffamily= & macro \\\midrule
+ \key{init-strict} & true & false & boolean \\
+ \key{init-sub} & true & false & boolean \\
+ \key{init-input-sep} & , & , & literal \\\midrule
+ \key{hyper-use} & true & false & boolean \\
+ \key{hyper-target} & & & literal \\
+ \key{hyper-link} & & & literal \\\bottomrule
\end{longtabu*}
- \begin{tabular}{>{\footnotesize}r>{\footnotesize\raggedright}p{.3\linewidth}}
+ \setlength\extrarowheight{-1pt}
+ \begin{tabular}{>{\footnotesize}r>{\footnotesize\raggedright}p{.7\linewidth}}
a & value needs \emph{two} tokens. \tabularnewline
- b & input is a comma separated list, see p.\,\pageref{key:sub-list}. \tabularnewline
- c & depends on the value of \lstinline=list-lang= and the usage of \textsf{babel}.
+ b & depends in the usage of \paket*{babel}. \tabularnewline
+ c & depends on the value of \key{list-lang} and the usage of \paket*{babel}.
\end{tabular}
\end{center}
@@ -855,22 +1004,24 @@ In this section all keys are listed.
In this section all commands provided by \chemnum as well as their variants are listed.
\begin{center}
\label{tab:commands}
- \begin{tabu*}{l>{\raggedright}p{.5\linewidth}}\toprule
- \bfseries command & \bfseries description \tabularnewline\midrule
- \lstinline=\cmpd[]{}= & basic command, declares and prints labels or lists of labels, see pages \pageref{sec:nummerieren}ff. \tabularnewline
- \lstinline=\cmpd*{}= & invisible, declares label, see page \pageref{cmd:unsichtbares_label} \tabularnewline
- \lstinline=\cmpd-[]{}= & without delimiters, see page \pageref{cmd:ohne_begrenzer} \tabularnewline
- \lstinline=\cmpd+-[]{}= & label is read from auxiliary file, see page \pageref{cmd:cmpd_plus} \tabularnewline\midrule
- \lstinline=\cmpdinit{}= & initialise and declare labels, see pages \pageref{sec:cmpdinit}f. \tabularnewline
- \lstinline=\cmpdinit*{}= & initialise labels, see pages \pageref{sec:cmpdinit}f. \tabularnewline\midrule
- \lstinline=\cmpdref[][]{}= & replace temporary markers in \texttt{eps} files by labels, see page \pageref{ssec:cmpdref} \tabularnewline
- \lstinline=\cmpdref-[][]{}= & replace temporary markers in \texttt{eps} files by labels without delimiters, see page \pageref{cmd:ohne_begrenzer} \tabularnewline\midrule
- \lstinline=\cmpdreset[]= & reset counter, siehe page \pageref{sec:cmpdreset} \tabularnewline\midrule
- \lstinline=\cmpdsetup{}= & setup \chemnum, siehe pages \pageref{sec:cmpdsetup}ff. \tabularnewline\bottomrule
+ \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>][<marker>]{<label>} & replace temporary markers in \texttt{eps} files by labels, see page \pageref{ssec:cmpdref} \tabularnewline
+ \cmd[cmpdrefc]{cmpdref-}[<keyval>][<marker>]{<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
\end{tabu*}
\end{center}
\section{Credits}
I would like to thank Joseph \textsc{Wright} and Russell \textsc{Hewitt} who provided me with valuable feedback and suggestions to improve \chemnum.
+\printindex
+
\end{document} \ No newline at end of file