Wolfgang Engelmann írta:
>  
>    Has anybody used chemmacros in lyx and could provide a minimal
>    example, e.g. for D_2O and the necessary usepackage entrances in the
>    preamble?
>    
>    \usepackage{chemmacros}
>      there and \chD2O in the text gives this error message:
>      ! Undefined control sequence.
>      l.1408
>        ... lithium ions \citep{Engelmann1976}.
>      
>      ----->
>        \chD
>      2O
>      The
>        control sequence at the end of the top line
>      of your error message was never \def'ed. If you have
>      misspelled
>        it (e.g., `\hobx'), type `I' and the correct
>      spelling (e.g., `I\hbox'). Otherwise just continue,
>      and I'll
>        forget about whatever was undefined.
>      
>      Wolfgang
>      p.s. would it be difficult to include chemmacros in lyx without
>      using ERT?
>      
>    
>    
>p, li { white-space: pre-wrap; }

Wolfgang,

chemmacros is a very nice package. It has detailed documentation, I suggest 
that you read it. In the meantime.

In the preamble you put:

\usepackage{chemmacros}

In the document:

In lyx ERT you write:

\ch{D2O H2O Na+ Cl- NH4+}

That's it.

Regards,

bcsikos


Reply via email to