## Friday, October 08, 2010

### CDK Book in progress

Very much overdue, but still in progress, is my book on CDK programming. I am in love with the writing environment, a mix of make, Groovy and LaTeX, where the code snippets are written in Groovy and embedded into LaTeX (see CDK - The Documentation). The Groovy script is actually run by the build system, allowing me to embed the output too.

In the LaTeX source code I, therefore, have something like:
The list of supported hybridization types can be listed with:

\codeverb{HybridizationTypes}

listing these types:

\codeout{HybridizationTypes}

refering to a groovy script that looks like:
#import org.openscience.cdk.interfaces.*;
#
IAtomType.Hybridization.each {
println it
}

Actually, the above is preprocessed to give the LaTeX view as well as the actual Groovy script run.

Since last year, I have pimped the output a bit, and the above now looks like: