Am Dienstag, 13. Mai 2008 12:35 schrieb Helge Hafting: Thanks Helge and Joachim. I did indeed misspell it. Will have a look at the chem packages, which you recommend.
Wolfgang > Wolfgang Engelmann wrote: > > I got stuck with the following: > > According to Markus Kohm (Koma-script) one can declare a new command for > > sub-scribing chemical formula such as > > H_2 > > by declaring a new command \Molek > > \newcommand*{\Molek}[2]{#1\texstsubscript{#2}} > > which I did by putting this in the preamble of my Koma-book document. > > In the text I write in an ERT-box > > \Molek H{2} > > but get 'Undefined control sequence' \Molek H{2} > > > > Same error, if I put only > > > > \Molek > > in ERT > > > > and > > H{2} > > afterward. > > > > I use koma(book) for my LyX document. > > > > Can somebody give me some help? > > > > Wolfgang > > Replace the mis-spelled "\texstsubscript" with "\textsubscript". (No 's' > in "text") > > > You also need: > \usepackage{fixltx2e} > > in the preamble, so that the \textsubscript command gets defined. > > Note that this way of using \Molek only works with single-letter atoms. > For chlorine, you need something like \Molek{Cl}{2} > > You may want to have a look at the chemsym and bpchem packages, > that lets you typeset all sorts of chemical formulae. > > Helge Hafting