summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemnum
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-08 22:40:12 +0000
committerKarl Berry <karl@freefriends.org>2011-11-08 22:40:12 +0000
commit613fcc4fa7a253ed46c5a3aa36e0b8cbe0831928 (patch)
tree582f16d8042e24b4e35cf64c1a374c1452dd1811 /Master/texmf-dist/doc/latex/chemnum
parent8b70788fa0333ae44b46195dd78f8614438443c9 (diff)
chemnum (8nov11)
git-svn-id: svn://tug.org/texlive/trunk@24547 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/chemnum')
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/README2
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/bsp.tex3
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.pdfbin634556 -> 657073 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.tex154
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.pdfbin618627 -> 639318 bytes
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.tex151
6 files changed, 193 insertions, 117 deletions
diff --git a/Master/texmf-dist/doc/latex/chemnum/README b/Master/texmf-dist/doc/latex/chemnum/README
index 016891fd79a..48d5ce5285e 100644
--- a/Master/texmf-dist/doc/latex/chemnum/README
+++ b/Master/texmf-dist/doc/latex/chemnum/README
@@ -11,7 +11,7 @@ chemnum also needs the packages etoolbox, psfrag and textgreek
to be fully functioning.
Clemens NIEDERBERGER
-2011/11/03
+2011/11/08
http://www.mychemistry.eu/
contact@mychemistry.eu
diff --git a/Master/texmf-dist/doc/latex/chemnum/bsp.tex b/Master/texmf-dist/doc/latex/chemnum/bsp.tex
index 850fd13495d..e7d4f7bfc96 100644
--- a/Master/texmf-dist/doc/latex/chemnum/bsp.tex
+++ b/Master/texmf-dist/doc/latex/chemnum/bsp.tex
@@ -3,7 +3,7 @@
% - a comprehensive numbering method for chemical compounds - %
% ------------------------------------------------------------------------------------- %
% - Clemens NIEDERBERGER - %
-% - 2011/11/03 - %
+% - 2011/11/08 - %
% ------------------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -107,6 +107,7 @@
schemename,
schemestart,
schemestop,
+ selectlanguage,
setarrowoffset,
setatomsep,
setcompoundsep,
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.pdf b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.pdf
index afb79cc6066..ce85d34cfed 100644
--- a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.pdf
+++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.tex b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.tex
index 5edb8f73c95..a562e5049b0 100644
--- a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.tex
+++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_de.tex
@@ -3,7 +3,7 @@
% - a comprehensive numbering method for chemical compounds - %
% ------------------------------------------------------------------------------------- %
% - Clemens NIEDERBERGER - %
-% - 2011/11/03 - %
+% - 2011/11/08 - %
% ------------------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -30,13 +30,14 @@
% - derived files chemnum_doc_de.pdf and chemnum_doc_en.pdf - %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[DIV11]{scrartcl}
-\usepackage[ngerman]{babel}
+\usepackage[ngerman,german,naustrian,austrian,english,british,american,canadian,french,canadien,spanish,italian]{babel}
+
\usepackage[utf8]{inputenx}
\usepackage[dvipsnames]{xcolor}
\colorlet{code}{RawSienna}
\colorlet{shadecolor}{yellow!20}
\usepackage[runs=2]{auto-pst-pdf}
-\usepackage{chemnum,textcomp,lmodern,microtype,url,xspace,booktabs,array,chemscheme}
+\usepackage{chemnum,textcomp,lmodern,microtype,url,xspace,longtable,tabu,booktabs,chemscheme}
\usepackage[version=3]{mhchem}
\renewcommand*\schemename{Schema}
\usepackage[normalem]{ulem}
@@ -118,17 +119,17 @@
\ExplSyntaxOff
\newcommand*\chemnum{\textsf{chemnum}\xspace}
-\newcommand*\CNversion{v0.3b\xspace}
-\newcommand*\CNdate{2011/11/03\xspace}
+\newcommand*\CNversion{v0.3c\xspace}
+\newcommand*\CNdate{2011/11/08\xspace}
\newcommand*\paket[1]{\textsf{#1}\footnote{\url{http://www.ctan.org/pkg/#1}}}
\newcommand*\zB{\mbox{z.\,B.}\xspace}
\newcommand*\bzw{\mbox{bzw.}\xspace}
\newcommand*\usw{\mbox{usw.}\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,benzol,r,s,t}
\begin{document}
-
+\selectlanguage{ngerman}
\begin{titlepage}
\centering
\Huge chemnum \CNversion
@@ -173,19 +174,6 @@
\chemnum benötigt außerdem die Pakete \paket{etoolbox} und \paket{psfrag} und (manchmal) das Paket \paket{textgreek}, siehe Abschnitt \ref{sec:package_options}.
-\section{Neu in \chemnum \CNversion}
-Neu seit \CNversion ist folgendes:\cmpd*{a.one,a.two,a.three,a.four,a.five}
-\begin{itemize}
- \item der Key \lstinline=sub-cmpd-sep= heißt jetzt \lstinline=sub-marker=, siehe Seite \pageref{ssec:sub_label_marker}
- \item der Key \lstinline=cmpd-sub-counter= heißt jetzt \lstinline=sub-counter=, siehe Seite \pageref{key:sub-counter}
-\end{itemize}
-Diese Umbenennung folgt dem Wunsch, die Keys ihrer Verwendung nach logisch in verschiedene Klassen zu unterteilen, siehe Seite \pageref{key_classes}.
-\begin{itemize}
- \item mehrere Keys zum Erstellen von Labels der Art \cmpd[sub-list={one..three,five}]{a}, siehe Abschnitt \ref{ssec:lists_ranges} ab Seite \pageref{ssec:lists_ranges}.
- \item der Befehl \lstinline=\cmpdref= zum Esetzen von Text-Strings in \lstinline=eps=-Dateien, siehe Abschnitt \ref{ssec:cmpdref}.
- \item der Key \lstinline=ref-tag=, siehe Seite \pageref{key:key-tag}.
-\end{itemize}
-
\section{Paket-Optionen}\label{sec:package_options}
\chemnum hat eine Option.
\begin{framed}
@@ -291,8 +279,6 @@ Die richtige Beschreibung des Befehls lautet also eher:
Mehrere Label k\"onnen einfach durch Kommata getrennt eingegeben werden. Dann wird eine Liste wie \cmpd{a, b, c, e, g.two} ausgegeben.
\end{beispiel}
-Wie das nicht-US-Amerikenern merkwürdig anmutende \verb=, and= zwischen \cmpd{e} und \cmpd{g.two} schon vermuten lässt, kann man die Ausgabe der Liste noch verändern, siehe Abschnitt \ref{ssec:trenner} (S.\,\pageref{ssec:trenner}).
-
\section{Label zentral initialisieren}\label{sec:cmpdinit}
Die in diesem Abschnitt beschriebenen Befehle sind für den Einsatz von \chemnum nicht nötig, stellen aber Funktionen bereit, die der ein oder andere Anwender nützlich finden könnte.
@@ -665,6 +651,19 @@ Beispiel für die Listen-Attribute:
\cmpd{a} % KEINE Liste!
\end{beispiel}
+Zwischen Präfix, Label und Suffix ist per Default ein Leerraum:
+\begin{beispiel}
+ \cmpd[cmpd-suffix=Sx,cmpd-prefix=Px]{k}
+\end{beispiel}
+Dieser kann durch
+\begin{framed}
+\noindent\lstinline+cmpd-space = <space>+ \hfill Typ: \lstinline=literal=
+\end{framed}
+\noindent geändert werden.
+\begin{beispiel}
+ \cmpd[cmpd-suffix=Sx,cmpd-prefix=Px,cmpd-space={}]{k}
+\end{beispiel}
+
\subsection{Trenner}\label{ssec:trenner}
\subsubsection{Bei Labeln}
Haben Sie Label mit Sublabeln, können Sie dort auch ein Trenn-Symbol verwenden.
@@ -692,13 +691,13 @@ Auch bei Listen lässt sich ein Trennsymbol festlegen, das bestimmt, wie einzeln
\cmpd{a, b, f.two, k}
\end{beispiel}
-\subsubsection{Bei Listen -- letzter Trenner}
+\subsubsection{Bei Listen -- letzter Trenner}\label{sssec:last-sep}
Der letzte Trenner bei Listen, derjenige zwischen dem vorletzten und letzten aufgelisteten Label, ist ein besonderer Fall. Hierfür gibt es zwei Schlüssel, mit dem er angepasst werden kann.
\begin{framed}
\noindent\lstinline+list-last-sep = <separator>+ \hfill Typ: \lstinline=literal=\\
\lstinline+list-lang = <lang>+ \hfill Typ: \lstinline=choice=
\end{framed}
-Zum einen gibt es den \lstinline=choice=-Schlüssel \lstinline=list-lang=, mit dem Sprachspezifische Einstellungen ge\-än\-dert werden können. Zur Auswahl stehen \lstinline=US= (default), \lstinline=GB=, \lstinline=DE=, \lstinline=FR=, \lstinline=ES= und \lstinline=IT=\footnote{Wenn Ihnen eine Sprache fehlt oder Sie einen Fehler bei den Übersetzungen finden, senden Sie mir doch bitte eine E-Mail.}.
+Zum einen gibt es den \lstinline=choice=-Schlüssel \lstinline=list-lang=, mit dem Sprachspezifische Einstellungen ge\-än\-dert werden können. Zur Auswahl stehen \lstinline=US= (default), \lstinline=GB=, \lstinline=DE=, \lstinline=FR=, \lstinline=ES= und \lstinline=IT=.
\begin{beispiel}
\cmpd[list-lang = US]{a, b, f.two, k} \cmpd[list-lang = US]{a, b}\\
\cmpd[list-lang = GB]{a, b, f.two, k} \cmpd[list-lang = GB]{a, b}\\
@@ -707,8 +706,9 @@ Zum einen gibt es den \lstinline=choice=-Schlüssel \lstinline=list-lang=, mit d
\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}
+Wie Sie sehen, verwendet die Spracheinstellung \lstinline=US= per Default das Harvard-Komma, alle anderen Sprachen verwenden es nicht. Mehr zur Sprach-Unterstützung und zum Harvard-Komma finden Sie in Abschnitt \ref{sec:language_support}.
-Zum anderen können Sie den letzten Trenner mit \lstinline=list-last-sep= auch individuell festlegen.
+Sie können den letzten Trenner mit \lstinline=list-last-sep= auch individuell festlegen.
\begin{beispiel}
\cmpdsetup{list-lang = DE}%
\cmpd[list-last-sep = {und auch}]{a, b, f.two, k}\\
@@ -799,53 +799,91 @@ In der Zwischenzeit benötigt der Key \lstinline=sub-list= etwas Aufmerksamkeit.
\cmpd[sub-list={five..three}]{q} or \cmpd[sub-list={three,one,four}]{q}.
\end{beispiel}
-\newpage
\subsection{Übersicht}\label{ssec:uebersicht}
Im folgenden sind alle verfügbaren Schlüssel aufgelistet. Bitte beachten Sie, dass die Default-Werte von \lstinline=cmpd-delim= und \lstinline=list-delim= \emph{nicht} mit der Voreinstellung von \chemnum über\-ein\-stim\-men. \chemnum setzt in der Voreinstellung \emph{keine} Begrenzer.
\begin{center}
\label{tab:keys}
- \begin{tabular}{>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l}\toprule
+ \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-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 \\\midrule
- ref-tag & TMP & literal \\\bottomrule
- \end{tabular}
- \\%\hspace*{1em}
+ 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 & Benötigt \emph{zwei} Token als Wert. \tabularnewline
b & Eingabe ist eine Komma-separierte Liste, siehe Seite \pageref{key:sub-list}. \tabularnewline
- c & Hängt vom Wert von \lstinline=list-lang= ab.
+ c & Hängt vom Wert von \lstinline=list-lang= und der Verwendung von \textsf{babel} ab.
\end{tabular}
\end{center}
-\newpage
+\section{Sprachunterstützung}\label{sec:language_support}
+\subsection{Zusammenarbeit mit \textsf{babel}}
+\chemnum unterstützt die Sprachauswahl durch das \paket{babel}-Paket für eine Reihe von Sprachen. Dies geschieht mit Hilfe des \textsf{translator} Pakets, falls es vorhanden. Kann \textsf{translator} nicht geladen werden, muss die Sprachunterstützung von Hand vorgenommen werden, siehe Abschnitt \ref{sssec:last-sep}. Die Einstellung von Hand funktioniert natürlich auch, wenn \textsf{translator} geladen wurde.
+\begin{beispiel}
+ \selectlanguage{ngerman}DE: \cmpd{r,s,t} \selectlanguage{german}\cmpd{r,s,t}\\
+ \selectlanguage{naustrian}AU: \cmpd{r,s,t} \selectlanguage{austrian}\cmpd{r,s,t}\\
+ \selectlanguage{english}EN: \cmpd{r,s,t}\\
+ \selectlanguage{british}GB: \cmpd{r,s,t}\\
+ \selectlanguage{american}US: \cmpd{r,s,t}\\
+ \selectlanguage{canadian}CDN-EN: \cmpd{r,s,t}\\
+ \selectlanguage{canadien}CDN-FR: \cmpd{r,s,t}\\
+ \selectlanguage{french}FR: \cmpd{r,s,t}\\
+ \selectlanguage{spanish}ES: \cmpd{r,s,t}\\
+ \selectlanguage{italian}IT: \cmpd{r,s,t}
+\end{beispiel}
+Bei weitem nicht alle Sprachen werden unterstützt, schon allein aus Machbarkeitsgründen. Falls Ihnen eine Sprache fehlen sollte, senden Sie mir bitte eine E-Mail\footnote{\href{mailto:contact@mychemistry.eu}{contatc@mychemistry.eu}} mit der dazugehörigen \textsf{babel} Option und der richtigen Übersetzung, und ich werde sie gerne hinzufügen.
+
+\subsection{Harvard-Komma}\label{ssec:harvard-comma}
+Im US-Amerikanischen ist die Verwendung des sogenannten Harvard- oder Oxford-Kommas weit verbreitet, im Britischen und in anderen europäischen Sprachen ist sie eher unüblich.
+\begin{myquote}{\href{http://en.wikipedia.org/wiki/Serial_comma}{Wikipedia}, 2011/11/07}
+ The serial comma (also known as the Oxford comma or Harvard comma, and sometimes referred to as the series comma) is the comma used immediately before a coordinating conjunction (usually and or or, and sometimes nor) preceding the final item in a list of three or more items. For example, a list of three countries can be punctuated as either "Portugal, Spain, and France" (with the serial comma) or as "Portugal, Spain and France" (without the serial comma).
+
+ Opinions vary among writers and editors on the usage or avoidance of the serial comma. In American English, the serial comma is standard usage in non-journalistic writing that follows the \textsc{Chicago Manual of Style}. Journalists, however, usually follow the AP Stylebook, which advises against it. It is used less often in British English, where it is standard usage to leave it out, with some notable exceptions such as \textsc{Fowler's Modern English Usage}. In many languages (e.g., French, German, Italian, Polish, Spanish), the serial comma is not the norm and may even go against punctuation rules. It may be recommended in many cases, however, to avoid ambiguity or to aid prosody.
+\end{myquote}
+\chemnum verwendet das Harvard-Komma bei der Verwendung von American English, nicht aber bei anderen Sprachen. Sie haben jedoch die Möglichkeit, das Harvard-Komma mit dem Schlüssel
+\begin{framed}
+\noindent\lstinline+list-serial-comma = <bool>+ \hfill Typ: \lstinline=boolean=\label{key:list-serial-comma}
+\end{framed}
+\noindent nach Belieben zu (De-)Aktivieren.
+\begin{beispiel}
+ \selectlanguage{ngerman}DE: \cmpd[list-serial-comma]{r,s,t} vs. \cmpd{r,s,t}\\
+ \selectlanguage{american}US: \cmpd[list-serial-comma=false]{r,s,t} vs. \cmpd{r,s,t}
+\end{beispiel}
+Wenn Sie die Spracheinstellung manuell vornehmen, beachten Sie, dass dabei auf die Voreinstellung der Sprache zurückgesetzt wird. Daher sollte \lstinline=list-serial-comma= \emph{nach} \lstinline=list-lang= verwendet werden.
+\begin{beispiel}
+ falsch: \cmpdsetup{list-serial-comma=false, list-lang=US}\cmpd{r,s,t}\\
+ richtig: \cmpdsetup{list-lang=US, list-serial-comma=false}\cmpd{r,s,t}
+\end{beispiel}
+
\section{Liste der Befehle}
Im folgenden werden alle von \chemnum definierten Befehle und deren Varianten aufgelistet.
\begin{center}
\label{tab:commands}
- \begin{tabular}{l|>{\raggedright}p{.5\linewidth}}\toprule
+ \begin{tabu*}{l>{\raggedright}p{.5\linewidth}}\toprule
\bfseries Befehl & \bfseries Beschreibung \tabularnewline\midrule
\lstinline=\cmpd[]{}= & Hauptbefehl, erzeugt und schreibt Label oder Liste von Labeln, siehe Seite \pageref{sec:nummerieren}ff. \tabularnewline
\lstinline=\cmpd*{}= & unsichtbar, erzeugt Label, siehe Seite \pageref{cmd:unsichtbares_label} \tabularnewline
@@ -857,7 +895,7 @@ Im folgenden werden alle von \chemnum definierten Befehle und deren Varianten au
\lstinline=\cmpdref-[][]{}= & temporäre Label in \texttt{eps}-Dateien durch Label ohne Begrenzer ersetzen, siehe Seite \pageref{cmd:ohne_begrenzer} \tabularnewline\midrule
\lstinline=\cmpdreset[]= & Zähler zurücksetzen, siehe Seite \pageref{sec:cmpdreset} \tabularnewline\midrule
\lstinline=\cmpdsetup{}= & \chemnum einstellen, siehe Seite \pageref{sec:cmpdsetup}ff. \tabularnewline\bottomrule
- \end{tabular}
+ \end{tabu*}
\end{center}
\section{Dank}
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.pdf b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.pdf
index 1c15c303335..220f97e332f 100644
--- a/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.pdf
+++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_doc_en.pdf
Binary files differ
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 1357f246d0a..192d5bf33cc 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/11/01 - %
+% - 2011/11/08 - %
% ------------------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -30,9 +30,10 @@
% - derived files chemnum_doc_de.pdf and chemnum_doc_en.pdf - %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[DIV11]{scrartcl}
-\usepackage[english]{babel}
+\usepackage[ngerman,german,naustrian,austrian,english,british,american,canadian,french,canadien,spanish,italian]{babel}
+
\usepackage[utf8]{inputenx}
-\usepackage{chemnum,textcomp,lmodern,microtype,url,xspace,booktabs,array,chemscheme}
+\usepackage{chemnum,textcomp,lmodern,microtype,url,xspace,booktabs,longtable,tabu,chemscheme}
\usepackage[version=3]{mhchem}
\usepackage[normalem]{ulem}
\usepackage[dvipsnames]{xcolor}
@@ -118,8 +119,8 @@
\ExplSyntaxOff
\newcommand*\chemnum{\textsf{chemnum}\xspace}
-\newcommand*\CNversion{v0.3b\xspace}
-\newcommand*\CNdate{2011/11/03\xspace}
+\newcommand*\CNversion{v0.3c\xspace}
+\newcommand*\CNdate{2011/11/08\xspace}
\newcommand*\paket[1]{\textsf{#1}\footnote{\url{http://www.ctan.org/pkg/#1}}}
\newcommand*\eg{\mbox{e.\,g.}\xspace}
@@ -128,7 +129,7 @@
\cmpdinit*{a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,benzol}
\begin{document}
-
+\selectlanguage{english}
\begin{titlepage}
\centering
\Huge chemnum \CNversion
@@ -173,19 +174,6 @@
\chemnum also needs the packages \paket{etoolbox}, \paket{psfrag} and (sometimes) \paket{textgreek}, see section \ref{sec:package_options}.
-\section{New in \chemnum \CNversion}
-Since \CNversion the following is new:\cmpd*{a.one,a.two,a.three,a.four,a.five}
-\begin{itemize}
- \item the key \lstinline=sub-cmpd-sep= now is \lstinline=sub-marker=, see page \pageref{ssec:sub_label_marker}
- \item the key \lstinline=cmpd-sub-counter= now is \lstinline=sub-counter=, see page \pageref{key:sub-counter}
-\end{itemize}
-The renaming follows the wish, to distinguish different classes of keys indicating the scope they're used for, see page \pageref{key_classes}.
-\begin{itemize}
- \item several keys to create labels like \cmpd[sub-list={one..three,five}]{a}, see section \ref{ssec:lists_ranges} on page \pageref{ssec:lists_ranges}.
- \item the command \lstinline=\cmpdref=, which replaces strings in \lstinline=eps= files, see section \ref{ssec:cmpdref}.
- \item the key \lstinline=ref-tag=, see page \pageref{key:key-tag}.
-\end{itemize}
-
\section{Package Options}\label{sec:package_options}
\chemnum has one package option.
\begin{framed}
@@ -222,6 +210,7 @@ Then there is \paket{bpchem}, which provides commands similar to \lstinline=\lab
If you notice any feature missing, please let me know by sending me an email.
+\newpage
\section{Numbering compounds}\label{sec:nummerieren}
\subsection{Basic command}
The main command of this package is
@@ -287,8 +276,7 @@ The right description would be something 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.
\end{beispiel}
-
-The -- in the eyes of non-US Americans odd looking -- \verb=, and= between \cmpd{e} and \cmpd{g.two} suggests that there are options to customize the list, see section \ref{ssec:trenner} (page \pageref{ssec:trenner}).
+The Harvard comma (see \ref{ssec:harvard-comma}) in \verb=, and= between \cmpd{e} and \cmpd{g.two} suggests that there are options to customize the list, see sections \ref{ssec:trenner} and \ref{sec:language_support}.
\section{Initialize labels at once}\label{sec:cmpdinit}
The commands described in this section are not essential for the usage of \chemnum, but provide additional functionality that some users might find useful.
@@ -383,7 +371,6 @@ 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}
@@ -660,6 +647,18 @@ 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:
+\begin{beispiel}
+ \cmpd[cmpd-suffix=sx,cmpd-prefix=px]{k}
+\end{beispiel}
+It can be changed with
+\begin{framed}
+\noindent\lstinline+cmpd-space = <space>+ \hfill Typ: \lstinline=literal=
+\end{framed}
+\begin{beispiel}
+ \cmpd[cmpd-suffix=sx,cmpd-prefix=px,cmpd-space={}]{k}
+\end{beispiel}
+
\subsection{Separators}\label{ssec:trenner}
\subsubsection{In case of labels}
If you have labels with sublabels, you can use a separator symbol:
@@ -687,13 +686,13 @@ In case of lists you also can set a separator symbol, which determines how the l
\cmpd{a, b, f.two, k}
\end{beispiel}
-\subsubsection{In case of lists -- last separator}
+\subsubsection{In case of lists -- last separator}\label{sssec:last-sep}
The last separator in a list is a special case. \chemnum provides two keys with which it can be customized.
\begin{framed}
\noindent\lstinline+list-last-sep = <separator>+ \hfill type: \lstinline=literal=\\
\lstinline+list-lang = <lang>+ \hfill type: \lstinline=choice=
\end{framed}
-There is the \lstinline=choice= key \lstinline=list-lang=, which changes language dependent settings. You can choose between \lstinline=US= (default), \lstinline=GB=, \lstinline=DE=, \lstinline=FR=, \lstinline=ES= and \lstinline=IT=\footnote{If you're missing a language or have caught me with an error please send me an e-mail.}.
+There is the \lstinline=choice= key \lstinline=list-lang=, which changes language dependent settings. You can choose between \lstinline=US= (default), \lstinline=GB=, \lstinline=DE=, \lstinline=FR=, \lstinline=ES= and \lstinline=IT=.
\begin{beispiel}
\cmpd[list-lang = US]{a, b, f.two, k} \cmpd[list-lang = US]{a, b}\\
\cmpd[list-lang = GB]{a, b, f.two, k} \cmpd[list-lang = GB]{a, b}\\
@@ -702,6 +701,7 @@ There is the \lstinline=choice= key \lstinline=list-lang=, which changes languag
\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 \lstinline=US= uses the Harvard comma, all other languages don't. You'll find more on language support and the Harvard comma in section \ref{sec:language_support}.
With the key \lstinline=list-last-sep= you also can set the last separator individually.
\begin{beispiel}
@@ -794,53 +794,90 @@ 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}
\label{tab:keys}
- \begin{tabular}{>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l}\toprule
+ \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-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 \\\midrule
- ref-tag & TMP & literal \\\bottomrule
- \end{tabular}
- \hspace*{1em}
+ 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=.
+ c & depends on the value of \lstinline=list-lang= and the usage of \textsf{babel}.
\end{tabular}
\end{center}
-\newpage
+\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.
+\begin{beispiel}
+ \selectlanguage{ngerman}DE: \cmpd{r,s,t} \selectlanguage{german}\cmpd{r,s,t}\\
+ \selectlanguage{naustrian}AU: \cmpd{r,s,t} \selectlanguage{austrian}\cmpd{r,s,t}\\
+ \selectlanguage{english}EN: \cmpd{r,s,t}\\
+ \selectlanguage{british}GB: \cmpd{r,s,t}\\
+ \selectlanguage{american}US: \cmpd{r,s,t}\\
+ \selectlanguage{canadian}CDN-EN: \cmpd{r,s,t}\\
+ \selectlanguage{canadien}CDN-FR: \cmpd{r,s,t}\\
+ \selectlanguage{french}FR: \cmpd{r,s,t}\\
+ \selectlanguage{spanish}ES: \cmpd{r,s,t}\\
+ \selectlanguage{italian}IT: \cmpd{r,s,t}
+\end{beispiel}
+If you find a language missing, please send me an email\footnote{\href{mailto:contact@mychemistry.eu}{contatc@mychemistry.eu}} with the corresponding \textsf{babel} option and the right translation, and I will gladly add it.
+
+\subsection{Harvard Comma}\label{ssec:harvard-comma}
+In American English the so-called Harvard comma is quite commonly used. In British English and other European languages it is rather uncommon.
+\begin{myquote}{\href{http://en.wikipedia.org/wiki/Serial_comma}{Wikipedia}, 2011/11/07}
+ The serial comma (also known as the Oxford comma or Harvard comma, and sometimes referred to as the series comma) is the comma used immediately before a coordinating conjunction (usually and or or, and sometimes nor) preceding the final item in a list of three or more items. For example, a list of three countries can be punctuated as either "Portugal, Spain, and France" (with the serial comma) or as "Portugal, Spain and France" (without the serial comma).
+
+ Opinions vary among writers and editors on the usage or avoidance of the serial comma. In American English, the serial comma is standard usage in non-journalistic writing that follows the \textsc{Chicago Manual of Style}. Journalists, however, usually follow the AP Stylebook, which advises against it. It is used less often in British English, where it is standard usage to leave it out, with some notable exceptions such as \textsc{Fowler's Modern English Usage}. In many languages (e.g., French, German, Italian, Polish, Spanish), the serial comma is not the norm and may even go against punctuation rules. It may be recommended in many cases, however, to avoid ambiguity or to aid prosody.
+\end{myquote}
+\chemnum uses the Harvard comma when American English is used and doesn't, when other languages are used. However, you have the possibility to disable or enable the Harvard comma as you wish:
+\begin{framed}
+\noindent\lstinline+list-serial-comma = <bool>+ \hfill Typ: \lstinline=boolean=\label{key:list-serial-comma}
+\end{framed}
+\begin{beispiel}
+ \selectlanguage{ngerman}DE: \cmpd[list-serial-comma]{r,s,t} vs. \cmpd{r,s,t}\\
+ \selectlanguage{american}US: \cmpd[list-serial-comma=false]{r,s,t} vs. \cmpd{r,s,t}
+\end{beispiel}
+If you choose the language manually, please note that this resets the default behaviour for that language. This means you have to use \lstinline=list-serial-comma= \emph{after} \lstinline=list-lang=.
+\begin{beispiel}
+ wrong: \cmpdsetup{list-serial-comma=false, list-lang=US}\cmpd{r,s,t}\\
+ right: \cmpdsetup{list-lang=US, list-serial-comma=false}\cmpd{r,s,t}
+\end{beispiel}
+
\section{List of commands}
In this section all commands provided by \chemnum as well as their variants are listed.
\begin{center}
\label{tab:commands}
- \begin{tabular}{l|>{\raggedright}p{.5\linewidth}}\toprule
+ \begin{tabu*}{l>{\raggedright}p{.5\linewidth}}\toprule
\bfseries command & \bfseries description \tabularnewline\midrule
\lstinline=\cmpd[]{}= & basic command, declares and prints labels or lists of labels, see pages \pageref{sec:nummerieren}ff. \tabularnewline
\lstinline=\cmpd*{}= & invisible, declares label, see page \pageref{cmd:unsichtbares_label} \tabularnewline
@@ -852,7 +889,7 @@ In this section all commands provided by \chemnum as well as their variants are
\lstinline=\cmpdref-[][]{}= & replace temporary markers in \texttt{eps} files by labels without delimiters, see page \pageref{cmd:ohne_begrenzer} \tabularnewline\midrule
\lstinline=\cmpdreset[]= & reset counter, siehe page \pageref{sec:cmpdreset} \tabularnewline\midrule
\lstinline=\cmpdsetup{}= & setup \chemnum, siehe pages \pageref{sec:cmpdsetup}ff. \tabularnewline\bottomrule
- \end{tabular}
+ \end{tabu*}
\end{center}
\section{Credits}