%%% ==================================================================== %%% @LaTeX-style-file{ %%% author = "Stefan Schulz", %%% version = "1.2", %%% date = "9 OCT 1996", %%% filename = "chemcono.sty", %%% address = "Institut fuer Organische Chemie, Universitaet %%% Hamburg, Martin-Luther-King-Platz 6, D-20146 %%% Hamburg, Germany" %%% email = "sschulz@chemie.uni-hamburg.de %%% codetable = "ISO/ASCII", %%% keywords = "chemical compound numbering", %%% supported = "maybe", %%% abstract = "LaTeX style file for using compound numbers %%% in chemistry documents. It works like %%% \cite and the \thebibliography, using \fcite %%% and \theffbibliography instead. It allows compound %%% names in documents to be numbered and does not %%% affect the normal citation routines. %%% Very helpful for writing chemistry papers. %%% This style does: %%% - Compound-numbering. Any compound gets a number %%% using \fcite, bold face as default. This number %%% is printed every time you type \fcite. %%% - The compounds are numbered according to the %%% entries in the \theffbibliography. %%% - The \ffbibliography generates an chapter with %%% the heading 'Compound numbers'. %%% See comments and examples below.", %%% } %%% ==================================================================== % % HISTORY: % % Writing chemistry papers, very often a consective numbering for compounds % according to their appearance in the text is required. First, I have no % knowledge of any basic Tex. I extracted the definitions for \cite and % \thebibliography from latex.ltx and article.cls and repkaced every % occurrence of the string cit by ffcit % and bib by ffbib. In addition, I also performed some small formatting % changes. Thus, this package worked nicely % in a document with 300 compound numbers and 700 citations in latex209 and latex2e. % % Version 1.0 % Latex209. % % Version 1.1 % Same thing for Latex2e. % % Version 1.2 % Now works with Latex2e of 1996/06/01 % % USAGE: % Load package chemcono. For every compound, use \fcite like \cite for citations. % After a \clearpage at the end of your document use theffbibliography like % the normal thebibliography, with \ffbibitem instead of \bibitem: % \begin{theffbibliography}{99} % \ffbibitem{f1} danaidone % \ffbibitem{f2} thio ether % \end{theffbibliography} % After compilation and printout, discard the last page. % If you want other formatting than bold face numbers, use % \renewcommand{\fcite}[1]{\underline{\ffcite{#1}}} % which gives in this case an underlined number. % Look at example.tex. % % I have added the file drftcono.sty, which bases on the drftcite.sty file from D. Arseneau. % When using drftcono.sty, you get the tags of the compound numbers instead the real numbers. % In the compound number section, small superscripts show which label has been used first, second, % and so on. You have to load drftcono.sty after chemcono.sty. For the final version, just comment % out drftcono.sty as in example.tex. % % COMPLICATIONS: % You must not use identical labels for \fcite and \cite. Otherwise Latex gets % confused. As a hint, I identify every comopund label by a preceding f as in % \fcite{f1}, and every citation label with a c, like \cite{c1}. % % FUTURE: % I would like to have the option for removing the printout of % theffbibliography. Than one would not need to discard the last page. % Because I have no knowledge of any programming, I do not know how to do % this. I also do not know whether the goal of this style could be achieved % much more easily. Any hints a welcome. %% %%% %%% %%% \message{bibliography,} \def\ffbibitem{\@ifnextchar[\@lffbibitem\@ffbibitem} \def\@lffbibitem[#1]#2{\item[\@ffbiblabel{#1}\hfill]\if@filesw {\let\protect\noexpand \immediate \write\@auxout{\string\ffbibcite{#2}{#1}}}\fi\ignorespaces} \def\@ffbibitem#1{\item\if@filesw \immediate\write\@auxout {\string\ffbibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces} \def\ffbibcite{\@newl@bel b} \let\ffcitation\@gobble \DeclareRobustCommand\ffcite{% \@ifnextchar [{\@tempswatrue\@ffcitex}{\@tempswafalse\@ffcitex[]}} \def\@ffcitex[#1]#2{% \let\@ffcitea\@empty \@ffcite{\@for\@ffciteb:=#2\do {\@ffcitea\def\@ffcitea{,\penalty\@m\ }% \edef\@ffciteb{\expandafter\@firstofone\@ffciteb}% \if@filesw\immediate\write\@auxout{\string\ffcitation{\@ffciteb}}\fi \@ifundefined{b@\@ffciteb}{\mbox{\reset@font\bfseries ?}% \G@refundefinedtrue \@latex@warning {ffcitation `\@ffciteb' on page \thepage \space undefined}}% {\hbox{\csname b@\@ffciteb\endcsname}}}}{#1}} \let\ffbibdata=\@gobble \let\ffbibstyle=\@gobble \def\ffbibliography#1{% \if@filesw \immediate\write\@auxout{\string\ffbibdata{#1}}% \fi \@input@{\jobname.bbl}} \def\ffbibliographystyle#1{% \ifx\@begindocumenthook\@undefined\else \expandafter\AtBeginDocument \fi {\if@filesw \immediate\write\@auxout{\string\ffbibstyle{#1}}% \fi}} \def\noffcite#1{\@bsphack \@for\@ffciteb:=#1\do{% \edef\@ffciteb{\expandafter\@firstofone\@ffciteb}% \if@filesw\immediate\write\@auxout{\string\ffcitation{\@ffciteb}}\fi \@ifundefined{b@\@ffciteb}{\G@refundefinedtrue \@latex@warning{ffcitation `\@ffciteb' undefined}}{}}% \@esphack} \expandafter\let\csname b@*\endcsname\@empty \def\@ffcite#1#2{{#1\if@tempswa , #2\fi}} \def\@ffbiblabel#1{[#1]} \special{src: 136 CHEMCONO.STY} %Inserted by TeXtelmExtel \let\l@table\l@figure \newdimen\ffbibindent \setlength\ffbibindent{1.5em} \newenvironment{theffbibliography}[1] {\section*{Compound numbers \@mkboth{\MakeUppercase Compound nmbers}{\MakeUppercase Compound numbers}}% \list{\@ffbiblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@ffbiblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openffbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy\clubpenalty4000\widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `theffbibliography' environment}}% \endlist} \let\@openffbib@code\@empty \newcommand{\fcite}[1]{\textbf{\ffcite{#1}}}