metafont
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

chemarrow.tex
text/x-tex

Download raw (7.0 KB)

\documentclass[DIV=9, pagesize=auto]{scrartcl}

\usepackage{fixltx2e}
\usepackage{etex}
\usepackage{lmodern}
\usepackage{mflogo}
\usepackage{wasysym}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{array}
\usepackage{microtype}
\usepackage[unicode=true]{hyperref}

\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
\makeatletter
\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
\makeatother

\addtokomafont{title}{\rmfamily}

\title{The \pkg{chemarrow} package}
\subtitle{New arrow heads for chemical reaction schemes}
\author{Thomas Schroeder\\\mail{schroeder@ictw.chemie.uni-karlsruhe.de}}
\date{4 February 2001}


\begin{document}

\maketitle

\tableofcontents

\section{What's the name of the game?}

\LaTeX\ can be used to typeset many kinds of different documents, but 
typesetting chemical reactions is esthetically not very pleasing because 
\LaTeX's own arrows \cmd{\rightarrow}, \cmd{\leftarrow} and \cmd{\rightleftharpoons} which 
you might use for this purpose are too short and the arrow heads are not 
like the ``standard'' ones you will find in books or journals on chemistry.

The macro \texttt{chemarrow.sty} in conjunction with the font \texttt{arrow.mf} is supposed 
to make the typesetting of chemical reaction schemes in \LaTeX\ easier and 
especially nicer looking.


\section{Dateien}

\begin{tabular}{@{}>{\ttfamily}l>{\raggedright\arraybackslash}p{85mm}@{}}
  arrow.mf                 & \MF\ source code of the \pkg{arrow} font                         \\
  arrow.tfm                & \texttt{.tfm} Datei of \pkg{arrow} for the use with \TeX         \\
  chemarrow.sty            & macro for the typesetting of arrows in chemical reaction schemes \\
  Readme.txt               & English Readme                                                   \\
  testchem.tex             & test file for \texttt{chemarrow.sty} and \texttt{arrow.mf}       \\
  Liesmich.txt             & German Readme                                                    \\
  Type 1/arrow Mac.sit.hqx & type~1 version of \pkg{arrow} for Macintosh                      \\
  Type 1/arrow PC.zip      & type~1 version of \pkg{arrow} for PC/Unix                        \\
  Type 1/arrow.mp          & \MP\ source code of \pkg{arrow}
\end{tabular}

\medskip

There is no need to copy the FontLab file \texttt{arrow.vfb} included in both of the 
type~1 archives, I just put it there in case you want to enhance my designs \smiley


\section{Usage}

The examples in the file \texttt{testchem.tex} should be sufficient for the
understanding of how \texttt{chemarrow.sty} works, and there's also a short 
description in \texttt{chemarrow.sty} of all the newly defined commands. To use the 
package, \texttt{arrow.tfm} must be copied to a directory where \LaTeX\ will be 
searching for \texttt{.tfm} files, \texttt{arrow.mf} must be copied to a directory where 
\MF\ will be searching for \MF\ sources. The required \texttt{.pk} files 
should be produced automatically by a \textsc{dvi} previewer or a printer driver.

There are also type~1 fonts of \texttt{arrow.mf} in Mac and PC/Unix format so that 
you can produce PDF documents easily. To use the type~1 font it must be 
copied to a directory where \TeX\ and friends will be searching for type~1 
fonts, the best place would of course be where the Computer Modern type~1 
fonts reside.

If dvips is supposed to use the type~1 font instead of the \texttt{.pk} font you 
must add this line to \texttt{psfonts.map}:
%
\begin{itemize}
\item for Macintosh:\\
  \verb+arrow arrow <arrow+
  
\item for PC/Unix:\\
  \verb+arrow arrow <arrow.pfb+
\end{itemize}

If you use pdf\TeX\ instead of \texttt{dvips} and Acrobat Distiller you must also add 
this line to \texttt{pdftex.map}:
%
\begin{verbatim}
arrow <arrow.pfb
\end{verbatim}


\section{Disclaimer}

The macro \texttt{chemarrow.sty} and the font \texttt{arrow.mf} are quick hacks for my own 
needs, I cannot guarantee that they will work an other systems than my own. 
In exchange I am publishing this package as free software which means you 
can do whatever you like with it and it comes for free. I would just like 
to ask that in case you do make changes und publish the package or any parts of 
it to add your own name or replace it with mine. Thank you.

Any hints and suggestions will be accepted gratefully.


\section{History}

As I was looking for new arrows I found a quite new font named \texttt{cryst.mf} by 
Ulrich Mueller which I rather liked. After a few modifications the new font 
\texttt{arrow.mf} was born.

I received a macro by Andreas Hertwig with which you can typeset arrows 
that will change in size. I modified this macro to my needs and replaced the 
original arrows with the arrows from \texttt{arrow.mf}. The original macro was apparently 
posted in a \TeX\ mailing list, but its author is unfortunately unknown. So, if 
you are the original author and read this I'd like to thank you for your work!

The most time consuming and complicated part was to produce a type~1 font 
from my \MF\ sources. Unfortunately there is no free software to do 
this \frownie
Also, if you include \texttt{.pk} fonts into PDF documents you won' get nice results 
because Acrobat Reader renders them very poorly. Therefore it is vital to 
include type~1 fonts into a PDF document \frownie

Using \texttt{arrow.mp} which is a slightly modified \texttt{arrow.mf} in combination with 
\MP\ and \texttt{mfplain} I was able to produce graphics in the EPS format which I 
imported into a demo of FontLab~3.0. After a few steps and reducing the 
size to 79\% I was able to save the font in type~1 format.


\section{Problems}

Unfortunately I am no expert on creating fonts. This is probably why the 
arrows will show on some platforms only at 125\% or larger. Below 125\% there 
will only be some strokes \frownie

I think if someone did a manual hinting of the font then this problem 
would be remedied, but this will probably not be me because this is out of 
my league and beyond the time limit of the demo of FontLab \smiley

So if there is somebody out there who is able to help me with this problem 
I'd be grateful.


\section{Future versions}

To tell you the truth, I don't really know if there will be future versions 
because as far as I'm concerned the package works as it is supposed to. 
The direct linking of the \pkg{arrow} font in \texttt{chemarrow.sty} is maybe not so nice, 
so this might be something I will change in the future. The rendering 
problem of PDF documents on some platforms is also not very nice so if 
some sort of solution pops up I will publish it.


\section{Thank-Yous}

\begin{itemize}
\item D. E. Knuth for \TeX
\item L. Lamport for \LaTeX
\item to the \LaTeX3 team for \LaTeXe
\item A. Hertwig for being so nice to give me the original macro
\item to the unknown author of the original macro
\item U. Mueller for \texttt{cryst.mf}
\end{itemize}


\section{Author}

Thomas Schroeder\\
\mail{schroeder@ictw.chemie.uni-karlsruhe.de}

PS: Sorry for any misspellings and such, English is not my native 
language \smiley

\end{document}