diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-29 00:20:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-29 00:20:35 +0000 |
commit | c3543d4162f0c935de31c1c1198d9f6e04992485 (patch) | |
tree | 46982a08a7d8a6fac0ef88ed58073013e8c53258 /Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex | |
parent | ec4fd129ad01f534716631faed103a0aab51eb94 (diff) |
chemnum (5jun13)
git-svn-id: svn://tug.org/texlive/trunk@31025 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.tex | 917 |
1 files changed, 528 insertions, 389 deletions
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex index f9febf60146..8d9cc7b8b24 100644 --- a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex +++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex @@ -1,7 +1,6 @@ % arara: pdflatex: { shell: on } -% arara: makeindex: { sort: true, style: chemnum_en.ist } -% arara: pdflatex: { shell: on } % arara: pdflatex: { shell: on } +% !arara: pdflatex: { shell: on } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % - chemnum - chemnum_en.tex % - a comprehensive approach for the numbering of chemical compounds @@ -40,12 +39,20 @@ \RequirePackage[ngerman,german,naustrian,austrian,british,american,canadian,frenchb, canadien,spanish,italian,english]{babel} \RequirePackage[textgreek=artemisia]{chemnum} +\PassOptionsToPackage{supstfm=libertinesups}{superiors} \documentclass[DIV11,toc=index]{cnpkgdoc} \docsetup{ pkg = chemnum, code-box = {skipabove=1ex,skipbelow=1ex} } +\cnpkgusecolorscheme{friendly} +\renewcommand*\othersectionlevelsformat[3]{% + \textcolor{main}{#3\autodot}\enskip} +\renewcommand*\partformat{% + \textcolor{main}{\partname~\thepart\autodot}} +\usepackage{libertinehologopatch} \usepackage{fnpct} + \addcmds{ @m,arrow,bf, ch,chemfig,chemname,cmpd,cmpdinit,cmpdref,cmpdreset,cmpdsetup, @@ -60,22 +67,26 @@ uline } -\usepackage{textcomp,longtable,tabu,booktabs,chemscheme,hologo} +\usepackage{textcomp,longtable,tabu,booktabs,chemscheme} + \usepackage[iupac=strict]{chemmacros} \chemsetup[chemformula]{format=\libertineLF} \usepackage{chemfig} \usepackage[runs=2]{auto-pst-pdf} +\usepackage{imakeidx} +\indexsetup{noclearpage,othercode=\footnotesize} +\makeindex[columns=3,intoc,options={-sl \jobname.ist}] \usepackage{filecontents} \begin{filecontents*}{\jobname.ist} - preamble "\\begin{theindex}\n Section headings are typeset \\textbf{bold}, packages \\textsf{sans serif}, commands \\textcolor{code}{brown}, and options \\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 "--" + delim_0 "\\dotfill\\hyperpage{" + delim_1 "\\dotfill\\hyperpage{" + delim_2 "\\dotfill\\hyperpage{" + delim_r "}\\textendash\\hyperpage{" + delim_t "}" suffix_2p "\\nohyperpage{\\,f.}" suffix_3p "\\nohyperpage{\\,ff.}" \end{filecontents*} @@ -85,7 +96,13 @@ \let\CNversion\cnpkgdocpkgversion \let\CNdate\cnpkgdocpkgdate -\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}} +\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} +} \TitlePicture{% \selectlanguage{english} @@ -97,11 +114,23 @@ \begin{scheme}[h] \centering\small \schemestart - \chemfig{?(-[:-170]HO)-[:-50](-[:170]HO)-[:10](-[:-55,0.7]OH)-[:-10](-[6,0.8]OH)-[:130]O-[:-170]?(-[:150,0.7]-[2,0.7]OH)} + \chemfig{ + ?(-[:-170]HO) + -[:-50](-[:170]HO) + -[:10](-[:-55,0.7]OH) + -[:-10](-[6,0.8]OH) + -[:130]O-[:-170]?(-[:150,0.7]-[2,0.7]OH) + } \arrow(alpha--chain){<=>} \chemfig{[2]OH-[3]-!x-!x-!y-!x-=[1]O} \arrow(--beta){<=>} - \chemfig{?(-[:-170]HO)-[:-50](-[:170]HO)-[:10](-[:-55,0.7]OH)-[:-10](-[:10]OH)(-[6,,,,draw=none]\vphantom{OH})-[:130]O-[:-170]?(-[:150,0.7]-[2,0.7]OH)} + \chemfig{ + ?(-[:-170]HO) + -[:-50](-[:170]HO) + -[:10](-[:-55,0.7]OH) + -[:-10](-[:10]OH)(-[6,,,,draw=none]\vphantom{OH}) + -[:130]O-[:-170]?(-[:150,0.7]-[2,0.7]OH) + } \arrow(@chain--chainlabel){0}[-90,.2] \normalsize\cmpd[cmpd-delim]{glucose.chain} \arrow(@chainlabel--){0}[,2.5] \normalsize\cmpd[cmpd-delim]{glucose.beta} \arrow(@chainlabel--){0}[180,2.3] \normalsize\cmpd[cmpd-delim]{glucose.alpha} @@ -111,30 +140,53 @@ open-chain form \cmpd[cmpd-delim]{glucose.chain}.} \end{scheme}} -\makeindex +\newcommand*\Default[1]{% + \hfill\llap{% + \ifblank{#1} + {(initially~empty)} + {Default:~\code{#1}}% + }\newline +} + +\usepackage{marginnote} +\makeatletter +\providecommand*\sinceversion[1]{% + \@bsphack + \marginnote{% + \footnotesize\sffamily\RaggedRight + \textcolor{black!75}{Introduced in version~#1}}% + \@esphack} +\providecommand*\changedversion[1]{% + \@bsphack + \marginnote{% + \footnotesize\sffamily\RaggedRight + \textcolor{black!75}{Changed in version~#1}}% + \@esphack} + \begin{document} \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. +\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{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} @@ -165,138 +217,149 @@ These ones are new: \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}. \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. \begin{beschreibung} - \Option{textgreek}{artemisia/\default{cbgreek}/euler/false} Default: \code{false} + \Option{textgreek}{artemisia|\default{cbgreek}|euler|false}\Default{false} + Choose if and with which option \paket*{textgreek} is used. \end{beschreibung} This document was set with \verb+\usepackage[textgreek=artemisia]{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: +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. + 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 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 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. \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. - -\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. +\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. If you notice any feature missing, please let me know by sending me an email. \section{Numbering compounds}\label{sec:nummerieren} \subsection{Main command}\secidx{Main command}\cmpdreset + The main command of this package is this one: \begin{beschreibung} - \Befehl{cmpd}{<label name>} + \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 \begin{beschreibung} - \Befehl[cmpda]{cmpd*}\ma{<label name>}\label{cmd:unsichtbares_label} + \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}. + 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{Sublabel}\label{ssec:unterlabel}\secidx{Sublabel} If you want a label like \cmpd{a.one}, you need to use the following syntax: \begin{beschreibung} - \Befehl{cmpd}{<label name>.<subname>} + \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. @@ -314,70 +377,74 @@ section~\ref{ssec:sub_ranges}. \secidx*{Sublabel} \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: +There is actually more to the \cmd{cmpd} command. It also prints lists of +labels. The right description would be something like: \begin{beschreibung} - \Befehl{cmpd}{<(possibly comma separated list of) label name(s)>} + \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 +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} + \Option{cmpd-all}{\default{true}|false}\Default{false} + Show all sublabels. \end{beschreibung} \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 \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: +sublabels in a different place. This is possible with this option: \begin{beschreibung} - \Option{sub-only}{\default{true}/false} + \Option{sub-only}{\default{true}|false}\Default{false} + Print only the sublabel. \end{beschreibung} \begin{beispiel} % uses packages `chemfig', `chemmacros' and `booktabs' @@ -392,31 +459,34 @@ sublabels in a different place. This is possible with this option: \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: +already. With it for one thing one had a summary of all used label names. +And there was a warning if one used 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>} + \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} @@ -433,10 +503,12 @@ a warning message. \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. +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} @@ -452,19 +524,20 @@ They are declared when you first use them in the order of appearance in the text {}************************************************* \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>} + \Befehl{cmpdinit}[\key{init-sub}{true}]{<comma separated list of label names>} \end{beschreibung} This will give you a warning in these cases, too. @@ -488,61 +561,68 @@ This will give you a warning in these cases, too. 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 ...>} + \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} - \Befehl{cmpdinit}[\key{init-strict}{true}, \key{init-sub}{true}]{<comma separated list ...>} + \Befehl{cmpdinit}[\key{init-strict}{true}, \key{init-sub}{true}]{<comma separated list ...>} \end{beschreibung} 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 +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. +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} \section{Resetting the counter}\label{sec:cmpdreset}\secidx{Reset the counter} With the command \begin{beschreibung} - \Befehl{cmpdreset}[<number>] + \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} @@ -551,41 +631,47 @@ be recommended to reset the counter. Different compounds can get the same label! \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: +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>} + \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{}=. - -\achtung{It is not needed when \cmd{cmpdinit} is used, see section~\ref{sec:cmpdinit} -(pages~\pageref{sec:cmpdinit}\,ff).} +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).% +} \begin{beispiel}[code only] \subsubsection{Test section title with compound label \cmpd+[cmpd-delim]{f.one}} @@ -594,9 +680,9 @@ used inside a moving argument like in \verb=\section{}=. \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} @@ -614,16 +700,16 @@ 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}[<tag>]\oa{<options>}\ma{<label name>} - \Befehl[cmpdrefa]{cmpdref+}[<tag>]\oa{<options>}\ma{<label name>} + \Befehl{cmpdref}[<tag>]\oa{<options>}\ma{<label name>} + \Befehl[cmpdrefa]{cmpdref+}[<tag>]\oa{<options>}\ma{<label name>} \end{beschreibung} 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. +\paket{chemscheme}. It works in a very similar way. You create the scheme +and save it with temporary labels as an \verb=eps= file. Like \cmd{cmpd+} the plussed variant only references a label but does not declare it. @@ -643,18 +729,20 @@ declare it. \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. - -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}. +So you nummerate the compounds with \textsf{TMP1}, \textsf{TMP2} etc. These +markerswill 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. + +You can customize the labels with the options presented in +section~\ref{sec:cmpdsetup}. \begin{beispiel}[code and float] \begin{scheme}[ht] \centering @@ -698,44 +786,49 @@ 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} + \Option{hyper-use}{\default{true}|false}\Default{false} + Link labels with \paket{hyperref}'s hyperlink commands. \end{beschreibung} 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. +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>} + \Option{hyper-target}{<link name>}\Default{} + Set a hyperlink target. + \Option{hyper-link}{<link name>}\Default{} + Set a hyperlink. \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\small 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}. @@ -751,36 +844,44 @@ If you use \key{hyper-link} without the corresponding \key{hyper-target} \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} + \Befehl{cmpdsetup}{key1 = value1, key2 = value2} \end{beschreibung} or only for a single command directly with \begin{beschreibung} - \Befehl{cmpd}[key1 = value1, key2 = value2]{<label name>} + \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. - \item \code{list}: Options which change the output of lists. - \item \code{ref}: Options which have an impact on \cmd{cmpdref}. - \item \code{hyper}: Options which have an impact on the usage with \paket{hyperref}. - \item \code{init}: Options which have an impact in the initialization of the labels. + \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. + \item \code{list}: Options which change the output of lists. + \item \code{ref}: Options which have an impact on \cmd{cmpdref}. + \item \code{hyper}: Options which have an impact on the usage with + \paket{hyperref}. + \item \code{init}: Options which have an impact in the initialization of the + labels. \end{itemize} \subsection{Font style}\label{ssec:schriftstil}\secidx{Font style} With the keys \begin{beschreibung} - \Option{cmpd-style}{<style>} - \option{cmpd-weight}{bold/normal} Default = \code{bold} + \Option{cmpd-style}{<style>}\Default{} + formatting commands for the labels. The last command can demand an + argument. + \Option{cmpd-weight}{bold|normal}\Default{bold} + setting labels in bold series. The setting for this is extra since greek + labels internally have to be treated a little differently. \end{beschreibung} you can change the style with which the labels are printed. @@ -796,16 +897,15 @@ you can change the style with which the labels are printed. \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 \code{textgreek}, -the bold face must realized differently. +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} -With the key \begin{beschreibung} - \Option{cmpd-label}{<label>} + \Option{cmpd-label}{<label>}\Default{} + This key let's you choose the label associated with the label name. \end{beschreibung} -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 @@ -814,43 +914,53 @@ one can choose the label associated with the label name. \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}. +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-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-marker}{<marker>}\Default{TMP} + This changes the default marker that is to be replaced. + \Option{ref-pos}{\{<tex-pos>\}\{<ps-pos>\}}\Default{bb} + explained below + \Option{ref-style}{<style>}\Default{\cmd*{sffamily}} + change the format of the labels in external schemes. \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}. +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} You can change the format of the counters, too, if you like. \begin{beschreibung} - \option{cmpd-counter}{arabic/alph/Alph/greek/Greek/roman/Roman/Symbol} Default = \code{arabic} - \option{sub-counter}{arabic/alph/Alph/greek/Greek/roman/Roman/Symbol} Default = \code{alph} + \Option{cmpd-counter}{arabic|alph|Alph|greek|Greek|roman|Roman|Symbol}\Default{arabic} + The counter format for the main labels. + \Option{sub-counter}{arabic|alph|Alph|greek|Greek|roman|Roman|Symbol}\Default{alph} + The counter format for sublabels. \end{beschreibung} -Please note: a change of format only affects labels \emph{which are not yet declared}! +Please note: a change of format only affects labels \emph{which are not yet + declared}! \begin{beispiel} \cmpdsetup{cmpd-counter = Alph, sub-counter = arabic} - \cmpd{a, b, f.two, k}\\ % no affect with existing labels + % no affect with existing labels + \cmpd{a, b, f.two, k}\\ \cmpd{n.one,n.two,o.one}\\ - \cmpd{f.three,f.four}\\ % be careful: the main label already exists and isn't changed! + % be careful: the main label already exists and isn't changed! + \cmpd{f.three,f.four}\\ \cmpd[cmpd-counter,sub-counter = greek]{p.one,p.two} \end{beispiel} \secidx*{Counter} \subsection{Delimiters}\secidx{Delimiters} -Both single labels and whole lists can get delimiters. This is done with the options +Both single labels and whole lists can get delimiters. This is done with the +options \begin{beschreibung} - \option{cmpd-delim}{<odelim><cdelim>} values need \emph{two} tokens! - \option{list-delim}{<odelim><cdelim>} values need \emph{two} tokens! + \Option{cmpd-delim}{<odelim><cdelim>}\Default{} + Delimiters to the single labels, need to be \emph{two} tokens! + \Option{list-delim}{<odelim><cdelim>}\Default{} + Delimiters to a list of labels, need to be \emph{two} tokens! \end{beschreibung} \begin{beispiel} \cmpd{a, b, f.two, k}\\ % default @@ -860,10 +970,10 @@ Both single labels and whole lists can get delimiters. This is done with the opt \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. +\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 @@ -872,19 +982,20 @@ contains at least two label names. \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} - \Befehl[cmpdc]{cmpd-}\ma{<label name>} - \Befehl[cmpdrefc]{cmpdref-}\ma{<label name>} + \Befehl[cmpdc]{cmpd-}\ma{<label name>} + \Befehl[cmpdrefc]{cmpdref-}\ma{<label name>} \end{beschreibung} -the braces of single labels can easily be removed (but not the ones of a list). +the braces of single labels can easily be removed (but not the ones of a +list). \begin{beispiel} \cmpd{a, b, f.two, k}\\ % default \cmpdsetup{cmpd-delim = (), list-delim = []} @@ -892,21 +1003,25 @@ 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. \begin{beschreibung} - \Option{cmpd-prefix}{<prefix>} - \Option{cmpd-suffix}{<prefix>} - \Option{list-prefix}{<prefix>} - \Option{list-suffix}{<prefix>} + \Option{cmpd-prefix}{<prefix>}\Default{} + Set a prefix for a label. + \Option{cmpd-suffix}{<prefix>}\Default{} + Set a suffix for a label. + \Option{list-prefix}{<prefix>}\Default{} + Set a prefix for a list. + \Option{list-suffix}{<prefix>}\Default{} + Set a suffix for a list. \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} @@ -925,7 +1040,8 @@ An example for the list attributes: \cmpd{a} % NOT a list! \end{beispiel} -Between prefix, label and suffix there is a space inserted as default behaviour: +Between prefix, label and suffix there is a space inserted as default +behaviour: \begin{beispiel} \cmpd[cmpd-suffix=sx,cmpd-prefix=px]{k} \end{beispiel} @@ -940,13 +1056,14 @@ 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=%=, \verb=,= and \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=%=, \verb=,= and \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{.} + \Option{sub-input-sep}{<separator>}\Default{.} + The token that separates sublabels from main labels. \end{beschreibung} \begin{beispiel} \cmpdsetup{sub-input-sep = !} @@ -956,17 +1073,18 @@ next sections). \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. \begin{beschreibung} - \Option{sub-output-sep}{<separator>} + \Option{sub-output-sep}{<separator>}\Default{} + the separator between main and sublabels in the output. \end{beschreibung} \begin{beispiel} \cmpd{a, b, f.two, f.three, k}\\ % default @@ -977,13 +1095,14 @@ 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=%=, \verb=,= and \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=%=, \verb=,= and +\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{..} + \Option{subrange-input-sep}{<separator>}\Default{..} + The tokens that indicate a range of sublabels \end{beschreibung} \begin{beispiel} \cmpd[subrange-input-sep=:]{q.{one:four}}\\ @@ -995,7 +1114,9 @@ symbols for the other separators. 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|--| + \Option{subrange-output-sep}{<separator>}\Default{--} + The tokens that are placed between the sublabels of a range in the + output. \end{beschreibung} \begin{beispiel} \cmpd[subrange-output-sep={ {\normalfont to} }]{q.{one..four}}\\ @@ -1004,14 +1125,17 @@ differently? Then you need this key: \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=%=, \verb=,= -and \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=%=, \verb=,= and \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{,} + \Option{list-input-sep}{<separator>}\Default{,} + Separator between main labels in the input. + \Option{sub-input-sep}{<separator>}\Default{,} + Separator between sublabels in the input. \end{beschreibung} \begin{beispiel} \cmpd{a, b, f.two, k}\\ % default @@ -1020,19 +1144,21 @@ careful to use different symbols for the other separators. \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{,} + \Option{list-output-sep}{<separator>}\Default{,} + Separator between main labels in the output of a list. + \Option{sub-output-sep}{<separator>}\Default{,} + Separator between sublabels in the output of a sublist. \end{beschreibung} \begin{beispiel} \cmpd{a, b, f.two, k}\\ % default @@ -1043,11 +1169,13 @@ uses the comma for both cases in the default setting. \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} + \Option{list-last-sep}{<separator>}\Default{} + The separator between the last two labels in the output of a list. + \Option{list-lang}{US|GB|DE|FR|ES|IT}\Default{US} + The language setting for a list. \end{beschreibung} \begin{beispiel} @@ -1058,11 +1186,12 @@ two options with which it can be customized. \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. +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}\\ @@ -1071,8 +1200,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}\\ @@ -1080,14 +1209,16 @@ with \key{list-output-sep} is used for the whole list. \cmpd[list-output-sep = {\ und}]{a, b, f.two, k} \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=%=, \verb=,= and \verb=#= and \emph{you -shouldn't} use \verb=@=. +\subsubsection{\cmd*{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. Tokens you \emph{can't use} are +\verb=%=, \verb=,= and \verb=#= and \emph{you shouldn't} use \verb=@=. \begin{beschreibung} - \option{init-input-sep}{<separator>} Default = \code{,} + \Option{init-input-sep}{<separator>}\Default{,} + The separator for the input of labels in \cmd{cmpdinit}. \end{beschreibung} \subsubsection{An example}\label{sssec:input-sep-bsp} @@ -1105,10 +1236,10 @@ 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=\GetTranslation= command of the -\paket*{translations}\footnote{\paket*{translations} is part of the -\paket*{exsheets} bundle.} package. +\chemnum supports the language choice made with the \paket{babel} package for +a number of languages. This is done with the \verb=\GetTranslation= command +of the \paket*{translations}\footnote{\paket*{translations} is part of the + \paket*{exsheets} bundle.} package. \begin{beispiel} \selectlanguage{ngerman}DE: \cmpd{r,s,t}\\ @@ -1120,37 +1251,40 @@ number of languages. This is done with the \verb=\GetTranslation= command of the \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. +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}{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} + \Option{list-serial-comma}{\default{true}|false}\Default{true} + (De-) Activate the serial comma. \end{beschreibung} \begin{beispiel} @@ -1158,8 +1292,8 @@ the Harvard comma as you wish: \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}. +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} @@ -1255,11 +1389,16 @@ listed. \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. -Many thanks also to Jonas \name{Rivetti} who provided the Italian translation. +Many thanks also to Jonas \name{Rivetti} who provided the Italian +translation. +\indexprologue{% + Section headings are typeset \textbf{bold}, packages \textsf{sans serif}, + commands \textcolor{code}{brown}, and options \textcolor{key}{yellow}.% +} \printindex -\end{document}
\ No newline at end of file +\end{document} |