====== Chem plugin ======
---- plugin ----
description: Format a molecular formula
author : Ikuo Obataya
email : i.obataya@gmail.com
type : syntax
lastupdate : 2008-09-29
compatible : 2006/11/06 or later
depends :
conflicts :
similar :
tags : formula chemistry science
downloadurl: http://symplus.edu-wiki.org/_media/computer/source/chem.zip
----
[[http://symplus.edu-wiki.org/en/chem_plugin|Details and Download]] page
^ ZIP file ^
|{{http://symplus.edu-wiki.org/_media/computer/source/chem.zip|chem.zip}} (1KB)|
This DokuWiki plugin formats a molecular formula easily.
^ Appearance |**C2H5O2-Na+**|
^ Without the plugin |%%C2H5O2-Na+%%|
^ Using Chem plugin |C2H5O2-Na+|
The latest version supports to export Open Document format using [[plugin:odt|ODT]] plugin.
=====Examples=====
C2H6
C2H6
Na2HPO4 12H2O
Na2HPO4 12H2O
C2H5O2-Na+
C2H5O2|-Na+ // | is a splitter.
Cl2H6N2Pt2+
Cl2H6N2Pt2+
Al2(SO4)3
Al2(SO4)3
====== another Version ======
The original plugin works very fine.
For those of you who have to write more chemical formulars and have some extra wishes like easier syntax, nuclid-number, and a nicer output in DokuWiki pages the following suggestion could help you.
__Syntax__: 92|235U3|2+ would appear as 2359232+; the single numbers are optional so expressions like U2+, U2, 235U or 92|235U are recognized as well as all the brackets.
__Unfortunately there are some limitations__:
* Due to many preg_matches the entering and leaving of DokuWiki editmenu takes quite long
* :!: ODT-Support doesn't work - but that´s just due to a lack of regular expressions to get the formatting out. (May someone could give me a hand here)
* :!: if you use ions and have multiple elements the shifting breaks as I just optimized it for one digit. (May someone could give me a hand here)
>I'll work on it soon (in Apr, maybe ;-) --- //[[ikuo_obataya@symplus.co.jp|iobataya]] 2010/04/04 22:23//
>>I'd like to apply a new syntax for notation of isotopes in order to simplify either the DW syntax and the regular expressions.
*Put on ^ before nucleons within a element. (-> superscript)
*Put on _ before atomic number within a element. (-> subscript)
#EXAMPLE
^14_6C (carbon-14)
^235_92U (uranium-235)
What do you think ?
--- //iobataya 2010/04/21 05:45//
My server moved to new place.
--- [[user>iobataya]] //2010/12/06 22:50//