diff options
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.tex | 222 |
1 files changed, 100 insertions, 122 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 192d5bf33cc..12936db8f55 100644 --- a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex +++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex @@ -1,9 +1,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % - chemnum - chemnum_doc_en.tex - % -% - a comprehensive numbering method for chemical compounds - % +% - a comprehensive approach for the numbering of chemical compounds - % % ------------------------------------------------------------------------------------- % % - Clemens NIEDERBERGER - % -% - 2011/11/08 - % +% - 2011/12/01 - % % ------------------------------------------------------------------------------------- % % - http://www.mychemistry.eu/ - % % - contact@mychemistry.eu - % @@ -26,72 +26,29 @@ % - The Current Maintainer of this work is Clemens Niederberger. - % % - - % % - This work consists of the files chemnum.sty, chemnum_doc_de.tex, - % -% - chemnum_doc_en.tex, bsp.tex, scheme-tmp.eps, scheme-bla.eps README and the - % -% - derived files chemnum_doc_de.pdf and chemnum_doc_en.pdf - % +% - 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} - +\usepackage[T1]{fontenc} \usepackage[utf8]{inputenx} -\usepackage{chemnum,textcomp,lmodern,microtype,url,xspace,booktabs,longtable,tabu,chemscheme} +\usepackage[textgreek]{chemnum} +\usepackage{textcomp,microtype,libertine,url,xspace,longtable,tabu,booktabs,chemscheme} \usepackage[version=3]{mhchem} \usepackage[normalem]{ulem} \usepackage[dvipsnames]{xcolor} \colorlet{code}{RawSienna} + \colorlet{shadecolor}{yellow!20} + \definecolor{myblue}{rgb}{0.02,0.04,0.48} + \definecolor{myred}{rgb}{0.65,0.04,0.07} \usepackage[runs=2]{auto-pst-pdf} \usepackage{chemfig,chemmacros} -\input{bsp} -\lstset{ - language=[LaTeX]TeX, - basicstyle={\ttfamily}, % Grundstil - extendedchars=true, - numbers=left, % Zeilennummern - numberstyle=\tiny, % Größe des Zeilennummern - numberblanklines=true, % Leerzeilen nummerieren - gobble=0, % das erste Leerzeichen abschneiden - xleftmargin=20pt, % Einrückung links - breaklines=true, % Zeilenumbruch - literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1, - moredelim=[is][\color{red!25!purple}]{!!}{!!},% Hervorhebung - moredelim=[is][\color{black}]{++}{++}, % Hervorhebung der Keywords rückgängig - commentstyle={\color[named]{Gray}}, - keywordstyle=\color{code}, - texcsstyle=[30]\color{code}, - moretexcs=[30] - { - @m, - bf, - cmpd, - cmpdinit, - cmpdref, - cmpdreset, - cmpdsetup, - CNlabel, - CNlabelnoref, - CNref, - CNlabelsub, - CNlabelsubnoref, - CNrefsub, - declarecompound, - compound, - compoundprefix, - compoundsuffix, - fcite, - lstinline, - penalty, - psfrag, - schemeref, - sf, - tableofcontents, - textcolor, - textnumero, - theffbibliography, - uline - } - }% +\input{chemnum-codehelper} \usepackage{hyperref} \hypersetup{colorlinks=true, + allcolors=myblue, plainpages=false, bookmarksopen=true, bookmarksopenlevel=2, @@ -118,32 +75,31 @@ } \ExplSyntaxOff -\newcommand*\chemnum{\textsf{chemnum}\xspace} -\newcommand*\CNversion{v0.3c\xspace} -\newcommand*\CNdate{2011/11/08\xspace} +\newcommand*\chemnum{{\scshape\textcolor{myblue}{chemnum}}\xspace} +\newcommand*\CNversion{v0.3e\xspace} +\newcommand*\CNdate{2011/12/01\xspace} \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,benzol} +\cmpdinit*{a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,benzene,r,s,t} \begin{document} \selectlanguage{english} \begin{titlepage} \centering - \Huge chemnum \CNversion + \Huge\textcolor{myblue}{\biolinumshadow[\fontsize{1.5cm}{1.6cm}\fontshape{sc}]{chemnum}} \vskip.5cm - \Large \CNdate + \Large \CNversion \qquad \CNdate \vskip.5cm \large Clemens \textsc{Niederberger} \vskip.25cm \normalsize\url{http://www.mychemistry.eu/}\\ \href{mailto:contact@mychemistry.eu}{contact@mychemistry.eu} - \vskip2cm - \begin{abstract} - \chemnum is a new and hopefully comprehensive approach for the numbering of chemical compounds. - \end{abstract} + \begin{center}\Large\color{myblue} + A comprehensive approach for the numbering of chemical compounds with \LaTeXe. + \end{center} \vskip3cm \cmpdinit*{glucose.alpha, glucose.beta, glucose.chain} \cmpd*[sub-counter = greek]{glucose.alpha, glucose.beta}\cmpd*{glucose.chain} \setatomsep{2em} @@ -172,16 +128,16 @@ \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 also needs the packages \paket{etoolbox}, \paket{psfrag} and (sometimes) \paket{textgreek}, see section \ref{sec:package_options}. +\chemnum also needs the packages \paket{etoolbox}, \paket{psfrag} and either \paket{textgreek} or \paket{bm}, see section \ref{sec:package_options}. \section{Package Options}\label{sec: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=. If you use \chemnum without option, then \textsf{textgreek} is loaded with the \lstinline=cbgreek= style. Using \lstinline+\usepackage[textgreek]{chemnum}+ is the same as \lstinline+\usepackage[textgreek = cbgreek]{chemnum}+ and \lstinline+\usepackage{chemnum}+. +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. -If you don't have the \textsf{textgreek} package installed and don't need to use greek labels, you can use \lstinline+\usepackage[textgreek = false]{chemnum}+. Then choosing the counter options \lstinline=greek= or \lstinline=Greek= will the result in using \lstinline=alph= or \lstinline=Alph=, respectively (see section \ref{ssec:counter}). +This document was set with \lstinline+\usepackage[textgreek]{chemnum}+. \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. @@ -234,7 +190,7 @@ If it is necessary to declare a compound without printing the label, this is pos 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: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\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. \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}. @@ -265,13 +221,14 @@ The same way the main name of combined labels can be used solely. How you can create a label like \cmpd[sub-list={one,two}]{f} is explained in section \ref{ssec:lists_ranges}. -\subsection{Lists} +\subsection{Lists}\label{ssec:listen} There is actually more to the \lstinline=\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)>}= \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}. \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. @@ -526,9 +483,10 @@ The keys are divided in to different classes\label{key_classes}, which indicate \end{description} \subsection{Font style}\label{ssec:schriftstil} -With the key +With the keys \begin{framed} \noindent\lstinline+cmpd-style = <style>+ \hfill type: \lstinline=macro= +\noindent\lstinline+cmpd-weight = bold/normal+ \hfill type: \lstinline=choice= \end{framed} \noindent you can change the style with which the labels are printed. @@ -540,8 +498,10 @@ With the key \cmpd[cmpd-style = \uline]{a, b, f.two, k}\\ % underlined \cmpd{a, b, f.two, k}\\ % default again \cmpdsetup{cmpd-style = \itshape\uline} - \cmpd{a, b, f.two, k} % underlined and in italics + \cmpd{a, b, f.two, k}\\ % underlined and in italics + \cmpd[cmpd-weight=normal]{a, b, f.two, k} \end{beispiel} +The separate handling of the bold face is because of the greek labels (see section \ref{ssec:counter}). Depending on the package option \texttt{textgreek}, the bold face must realized differently. \subsection{Own labels}\label{ssec:own_labels} With the key @@ -591,7 +551,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: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 \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. \begin{beispiel} \cmpd{a, b, f.two, k}\\ % default \cmpd[list-delim = {[}{]}]{a, b, f.two, k}\\ % in braces @@ -673,16 +633,30 @@ If you have labels with sublabels, you can use a separator symbol: \cmpd[cmpd-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. +\begin{framed} +\noindent\lstinline+list-input-sep = <separator>+ \hfill type: \lstinline=literal= +\end{framed} +\begin{beispiel} + \cmpd{a, b, f.two, k}\\ % default + \cmpd[list-input-sep = +]{a + b + f.two + k}\\ + \cmpd{a, b, f.two, k}\\ + \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.}. + \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. \begin{framed} -\noindent\lstinline+list-sep = <separator>+ \hfill type: \lstinline=literal= +\noindent\lstinline+list-output-sep = <separator>+ \hfill type: \lstinline=literal= \end{framed} \begin{beispiel} \cmpd{a, b, f.two, k}\\ % default - \cmpd[list-sep = ]{a, b, f.two, k}\\ + \cmpd[list-output-sep = ]{a, b, f.two, k}\\ \cmpd{a, b, f.two, k}\\ - \cmpdsetup{list-sep = ;} + \cmpdsetup{list-output-sep = ;} \cmpd{a, b, f.two, k} \end{beispiel} @@ -712,12 +686,12 @@ 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-sep= is used for the whole list. +\lstinline=empty= is a special value. If it is used, the separator set with \lstinline=list-output-sep= is used for the whole list. \begin{beispiel} \cmpdsetup{list-last-sep = empty}% \cmpd{a, b, f.two, k}\\ - \cmpd[list-sep = ;]{a, b, f.two, k}\\ - \cmpd[list-sep = {\ and}]{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} @@ -731,7 +705,8 @@ As a default setting \chemnum uses the point \lstinline=.= as a token to divide \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= *]{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. @@ -794,47 +769,6 @@ For the time being the \lstinline=sub-list= key requires a little caution. Unfor \cmpd[sub-list={five..three}]{q} or \cmpd[sub-list={three,one,four}]{q}. \end{beispiel} -\subsection{Overview}\label{ssec:uebersicht} -In this section all keys are listed. Please be aware that the default values 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. -\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 & \lstinline=\textbf= & macro \\ - 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-sep & , & literal \\ - list-lang & US & choice \\ - list-last-sep & and$^\mathrm{c}$ & literal \\ - list-serial-comma & & boolean \\\midrule - ref-tag & TMP & literal \\\bottomrule - \end{longtabu*} - \begin{tabular}{>{\footnotesize}r>{\footnotesize\raggedright}p{.3\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}. - \end{tabular} -\end{center} - \section{Language Support}\label{sec: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. @@ -873,7 +807,51 @@ If you choose the language manually, please note that this resets the default be right: \cmpdsetup{list-lang=US, list-serial-comma=false}\cmpd{r,s,t} \end{beispiel} -\section{List of commands} +\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 + \end{longtabu*} + \begin{tabular}{>{\footnotesize}r>{\footnotesize\raggedright}p{.3\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}. + \end{tabular} +\end{center} + +\subsection{Commands} In this section all commands provided by \chemnum as well as their variants are listed. \begin{center} \label{tab:commands} |