Matej Cepl schrieb:
On 2003-09-30, 04:27 GMT, Herbert Voß wrote:

be sure, that you are always in mathmode!

\newcommand{\test}[4]{
        $\left[\begin{array}{cc}
        \textit{#1}  &  #4 \\
        \textrm{#2}  &  \textrm{#3}
\end{array}\right]$%
}


\test{verb}{VAL}{\test{SPR}{COMP}{intr}{a}}{a}



or alternatively


$\test{verb}{VAL}{$\test{SPR}{COMP}{intr}{a}$}{a}$


Shouldn't this be done by LyX? I have just created these macros with LyX

no, it was your decision to use \textit and textrm inside the math mode, which complicates things.

through math-macro (and I have sent .lyx file to the list to show it).
And how should I actually achieve it in LyX? Could you please send me
back corrected .lyx file, which would compile?

use mathit and mathrm, then everything is okay.


Herbert

p.s.: do not use special classes and font settings
for demo files.
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
\lyxformat 225
\textclass article
\options draft
\language american
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize 11
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 1
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes 0
\end_header

\begin_layout Standard


\begin_inset FormulaMacro 
\newcommand{\test}[4]{\left[\begin{array}{cc}
 \mathit{#1}  &  #4 \\
\mathrm{#2}  &  \mathrm{#3}\end{array}\right]}
\end_inset 


\end_layout

\begin_layout Standard


\begin_inset Formula $\test{verb}{VAL}{\test{SPR}{COMP}{intr}{a}}{a}$
\end_inset 


\end_layout

\end_document

Reply via email to