Greek Characters in EcoCyc and on the WWW

by Markus Krummenacker <>

started 96-4-8


The EcocCyc knowledgebase is able to display metabolites, the small chemical compounds. Many of them have greek letters in their names or synonyms, and so it was desirable to make these show adequately. This facility is now available in the Common LISP / CLIM GUI, and partially, as far as supported by existing browsers and standards, through the EcoCyc WWW server as well.

Proposed HTML standard

Greek letters (and math symbols) are described in the proposed HTML 3 standard. Unfortunately, current WWW browsers seem to have not yet incorporated this facility.

The syntax in strings within EcoCyc

Some standard HTML tags are understood, and can be embedded in the strings of names, citations, and comments. They are:
                             syntax:               appearance:
                             ------                ----------

italic                    <I>stuff</I>          stuff           
bold                      <B>stuff</B>          stuff           
super-script            <SUP>stuff</SUP>        stuff         
sub-script              <SUB>stuff</SUB>        stuff         
Actual Greek letters are marked up using the suggested syntax of the HTML 3 standard, as mentioned above. Note that these are only the lower case letters. The following escape sequences are supported:
syntax:      appearance:
------       ----------

&alpha;      α   
&beta;       β    
&gamma;      γ   
&delta;      δ   
&epsilon;    ε 
&zeta;       ζ    
&eta;        η     
&theta;      θ   
&iota;       ι    
&kappa;      κ   
&lambda;     λ  
&mu;         μ      
&nu;         ν      
&xi;         ξ      
&omicron;    ο 
&pi;         π      
&rho;        ρ     
&sigma;      σ   
&tau;        τ     
&upsilon;    υ 
&phi;        φ     
&chi;        χ     
&psi;        ψ     
&omega;      ω   
In order to print upper case greek letters as well, the following enhancement is proposed (and used within EcoCyc):
The idea is to write the letters within the escape sequence entities in upper case if the resulting greek character should be printed in upper case, and likewise for the lower case. So the following additional escape sequences are defined:
syntax:      appearance:
------       ----------

&ALPHA;      &ALPHA; 
&BETA;       &BETA;  
&GAMMA;      &GAMMA; 
&DELTA;      &DELTA; 
&ZETA;       &ZETA;  
&ETA;        &ETA;   
&THETA;      &THETA; 
&IOTA;       &IOTA;  
&KAPPA;      &KAPPA; 
&MU;         &MU;    
&NU;         &NU;    
&XI;         &XI;    
&PI;         &PI;    
&RHO;        &RHO;   
&SIGMA;      &SIGMA; 
&TAU;        &TAU;   
&PHI;        &PHI;   
&CHI;        &CHI;   
&PSI;        &PSI;   
&OMEGA;      &OMEGA; 

The following way of specifying capital letters is currently still supported in EcoCyc, but its use is officially discouraged, as such tags will not (yet) be filtered out when output occurs on the WWW version.

Should the need arise for writing extended greek text, the following two tags were invented out of the blue for use in EcoCyc. Note that these are highly non-standard, but they allow the printing of upper case letters as well. Currently, they work in EcoCyc by mapping the letters in between the tags into the Symbol Font, which should be available on most systems.


same as <SYMBOL>:      <GREEK>stuff</GREEK>      
Both of the above would be essentially equivalent to:


Some real world examples:

The common-name of AMMONIUM is "NH<SUB>4</SUB><SUP>+</SUP>".
The common-name of CHOLANATE2 is "3-α,12-α-dihydroxy-7-oxo-5-β-cholanate".
The common-name of CHOLESTADIEN-BETA-OL-DESMOSTEROL is "&DELTA;<SUP>5,24</SUP>-cholestadien-3-β-ol-desmosterol" or in the deprecated format "<GREEK>D</GREEK><SUP>5,24</SUP>-cholestadien-3-β-ol-desmosterol".

return to kr's home page