summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-05 00:16:09 +0000
committerKarl Berry <karl@freefriends.org>2011-09-05 00:16:09 +0000
commitf5b4e2827c52206834b8c921b5a037c615b24f3a (patch)
tree6d63b57e789ca438eb428611c52fd797dc7d1e83 /Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex
parentb16b1651b5d296cd70188fe4ff2f1a72f81c4993 (diff)
chemnum (4sep11)
git-svn-id: svn://tug.org/texlive/trunk@23814 c570f23f-e606-0410-a88d-b1316a301751
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.tex43
1 files changed, 28 insertions, 15 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 46f1f65dd2c..8eafd9d0d2c 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 numbering method for chemical compounds - %
% ------------------------------------------------------------------------------------- %
% - Clemens NIEDERBERGER - %
-% - 2011/08/02 - %
+% - 2011/09/03 - %
% ------------------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -104,9 +104,22 @@
\newcommand*\changefont[3]{\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont}
+\ExplSyntaxOn
+\DeclareDocumentEnvironment { myquote } { m }
+ {
+ \quote
+ \small \changefont { cmss } { m } { sl }
+ }
+ {
+ \par\noindent
+ \parbox { \linewidth } { \raggedleft \normalfont \itshape #1 }
+ \endquote
+ }
+\ExplSyntaxOff
+
\newcommand*\chemnum{\textsf{chemnum}\xspace}
-\newcommand*\CNversion{v0.3\xspace}
-\newcommand*\CNdate{2011/08/03\xspace}
+\newcommand*\CNversion{v0.3a\xspace}
+\newcommand*\CNdate{2011/09/03\xspace}
\newcommand*\paket[1]{\textsf{#1}\footnote{\url{http://www.ctan.org/pkg/#1}}}
\newcommand*\eg{\mbox{e.\,g.}\xspace}
@@ -186,17 +199,15 @@ If you don't have the \textsf{textgreek} package installed and don't need to use
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{quote}\small\changefont{cmss}{m}{sl}
- After compilation and printout, discard the last page.\\
- \parbox{\linewidth}{\raggedleft\normalfont\itshape Stefan Schulz}
-\end{quote}
+\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{quote}\small\changefont{cmss}{m}{sl}
- 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.\\
-\parbox{\linewidth}{\raggedleft\normalfont\itshape Stephan Schenk}
-\end{quote}
+\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.
+\end{myquote}
Some points still left me unsatisfied, though:
\begin{enumerate}
\item Compounds usually need to be declared with \lstinline=\declarecompound=. They need to be declared in any case if you need a label like \textbf{1a}. Then, one even needs to choose the label by hand, what somehow undermines the automatic numbering principle.
@@ -372,6 +383,7 @@ As mentioned in the beginning of this section the initiation of labels is not re
\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.
\end{enumerate}
+\newpage
\section{Resetting the counter}\label{sec:cmpdreset}
With the command
\begin{framed}
@@ -432,8 +444,8 @@ 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 with external programs}\label{ssec:cmpdref}
-If you create your schemes with external programs like for \eg \textsc{ChemDraw} and want to use \chemnum with them as well, you can use this command:
+\subsection{Schemes created by external programs}\label{ssec:cmpdref}
+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>}=
\end{framed}
@@ -453,7 +465,7 @@ This command is inspired by the \lstinline=\schemeref= command from the package
\caption{Scheme with automatted 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 \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}.
In each case it is important that the marker is saved as \emph{text} in the \lstinline=eps= file.
@@ -496,7 +508,7 @@ Of course sublabels work in the known way:
\end{scheme}
\end{beispiel}
-\cmpdreset[9]
+\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
@@ -765,6 +777,7 @@ 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}
+\newpage
\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}