On Mon, 07 May 2001 10:07:31 +0200 wrote Herbert Voss 
<[EMAIL PROTECTED]>:

> James Brusey wrote:
> > 
> > I'm trying to format a formula of the form:
> > 
> >          {  y       if y > 0
> >      x = {
> >          {  z + y   otherwise
> > 
> > Is there a way to do this with the math editor that I'm just not seeing?
> 
> insert lyx-mathbox and write x= , than insert a via math-panel
> (edit->math symbols) a pair of "parenthesis" the left and
> the dummy right. now insert a matrix with two columns (both 
> liftsided!) and two rows and type the rest.

This could be automated with a math-macro. I tried and defined a makro \cases

However, in 1.1.16 it does not work correct: The arguments (#1 ... #4) are not
red in the editing box (as is told in the manual) and, when called, instead of empty 
boxes it
puts #1 ... #4 verbatim into the array.

(this happens for every argument containing macro I tried)

Guenter
--
[EMAIL PROTECTED]
#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass article
\begin_preamble
% Real- und Imaginärteil mit lateinischen Buchstaben
\renewcommand{\Im}{\mathrm{Im}}
\renewcommand{\Re}{\mathrm{Re}}
% Vektoren als schräge fette Buchstaben
\renewcommand{\vec}[1]{\textbf{\itshape #1}}
\end_preamble
\language german
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\paperorientation portrait
\leftmargin 2cm
\topmargin 1cm
\rightmargin 2cm
\bottommargin 1cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle plain

\layout Standard


\begin_inset FormulaMacro 
\newcommand{\cases}[4]{\left\{ \begin{array}{ll}
\#1 & \#2\\
\#3 & \#4
\end{array}\right. }

\end_inset 


\layout Comment

The macro cases was created with
\layout Comment

M-x math-macro cases 4
\layout Comment

To use it, write 
\backslash 
cases in math-mode and you will get 
\layout Comment


\begin_inset Formula \[
\cases{}{}{}{}\]

\end_inset 

 
\the_end

Reply via email to