Jose Capco wrote:

I went to document in Layout menu, then I went to
preamble and put this


\newcommand\Z{\mathbb{Z}}

And went to my document and changed to mathmode and
typed \Z in it.. in LaTeX this would be understood as
\mathbb{Z} and everything would go fine.. but in LyX,
apparently the preamble was disregarded .. an error
occured when I tried to view this in dvi saying that
\Z is an undefined control sequence (which would have
happened in LaTeX had I not but \newcommand in the
preamble) ..

"\Z is an undefined control sequence" is an error message of LaTeX, not of LyX!

So later I learned by reading the userguide that I
have to use math-macro ..

No, you mustn't. You can of course use all LaTeX commands.

\newcommand{\Z}{\mathbb{Z}}
works fine for me, see the attached example LyX-file.

regards Uwe
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
\newcommand{\Z}{\mathbb{Z}}
\end_preamble
\options fleqn
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 4
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle empty
\bullet 1
        1
        34
        -1
\end_bullet
\bullet 2
        2
        35
        -1
\end_bullet
\bullet 3
        2
        7
        -1
\end_bullet

\layout Standard


\begin_inset Formula \[
\Z\]

\end_inset 


\the_end

Reply via email to