Re: Formatting of multiline equations [again]

1999-10-26 Thread Jean-Marc Lasgouttes

> "Tom" == Tom Crane <[EMAIL PROTECTED]> writes:

Of course, I forgot the file :( Here it is.

JMarc

#This file was created by  Tue Oct 26 14:45:09 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass revtex
\begin_preamble
%\documentstyle[preprint,prl,aps,epsf]{revtex}

\def \rem#1 {{}}
\def \com#1 {{\bf \it #1 }}
\def \p#1 {{\bf #1 \par }}
%\def \rej#1 {{\small \it #1 }}
\def \rej#1 {{}}

\def \endnote#1 {{\small [#1]}}
\def \deg#1 {$#1^\circ$}

%% Tom's defs...
\def \hbn#1 {$h$-BN}
\def \3he#1 {$^{3}$He}
\end_preamble
\options prl,aps,epsf
\language default
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 2
\papersides 2
\paperpagestyle default

\layout Standard

The main problem with this equation is that the bracket sizes don't match
 up.
 The justification I could live with.
\layout Standard


\begin_inset Formula 
\begin{eqnarray*}
r(w) & = & z+\exp \left[ -\int ^{b}_{a}\left( 2x-5y\right) \left\{ 
\frac{2}{5}P_{1}(t)\exp \left( -a\left( u_{y}-u_{x}\right) w\right) +\right. \right. \\
 &  & \hphantom {z+\exp [}6P_{1}(t)\exp \left( -au_{y}w\right) +\\
 &  & \left. \vphantom {\int ^{b}_{a}}\left. 3G_{2}(\tau )\exp \left( -a\left( 
u_{y}+u_{x}\right) w\right) \right\} dt\right] 
\end{eqnarray*}

\end_inset 


\layout Standard

Following your method (I think!) gives this which is not what I need --
 the [{}] need to open on the first line of the matrixed-bit and close on
 the 3rd line of the matrixed bit as the above equation does.
\layout Standard


\begin_inset Formula 
\[
r(w)=z+\exp \left[ -\int ^{b}_{a}\left( 2x-5y\right) \left\{ \begin{array}{cc}
 & \frac{2}{5}P_{1}(t)\exp \left( -a\left( u_{y}-u_{x}\right) w\right) +\\
 & 6P_{1}(t)\exp \left( -au_{y}w\right) +\\
 & 3G_{2}(\tau )\exp \left( -a\left( u_{y}+u_{x}\right) w\right) 
\end{array}\right\} dt\right] \]

\end_inset 


\the_end



Re: Formatting of multiline equations

1999-10-26 Thread Jean-Marc Lasgouttes

> "Tom" == Tom Crane <[EMAIL PROTECTED]> writes:

Tom> I have followed your instructions but I cannot get it to give the
Tom> O/P I need. I have attached a demo .lyx file to better illustrate
Tom> the point. Do you have any more suggestions? Thanks again. Tom.

Try this one (I only modified the first equation). The two tricks used
here are
- \vphantom{\int_a^b} procuces a vertical space (0 width) which height
  is exactly the height of its argument. Assuming that the integral is
  what forces the ] size, it gives the right result.

- \hphantom{z+\exp[} does exactly the same but produces an horizontal
  space. 

More tweaking might be needed for this equation, but I think it
explains the trick. There is also a \phantom{} which sets both height
and width.

JMarc



Re: Formatting of multiline equations

1999-10-25 Thread Mr. Geepus the Sweeper

Tom...

On 25-Oct-99 Tom Crane wrote:

> I have followed your instructions but I cannot get it to give the O/P I need.
> I have attached a demo .lyx file to better illustrate the point. Do you have
> any more suggestions?

I do not think you are going to be able to accomplish what you want...
at least, not by using clean, effortless code.  :)  I tried such things as
nesting a matrix with hard-spaces in some cells (so as to make them invisible,
but still have brackets expand to encompass them)... but I don't think you can
have your opening and closing delimiters match each other precisely in this way.

Maybe someone who actually knows some (La)TeX can tell you how to
"cheat", as I think this is what you'll actually have to do.

(To me, that's too much work -- LyX is supposed to make it easier!  :)


---
// Carl Hudkins ]=[ ICQ: 5723399 ]=[ PGP: 0x50238d9e
// 
// "I've given up on the whole dating scene.  I've
//  decided to reproduce by asexual cell division."
// --Wally

 PGP signature


Re: Formatting of multiline equations

1999-10-25 Thread Tom Crane

Hi,
Thanks for your followup.

"Mr. Geepus the Sweeper" wrote:

> You should be able to achieve something of the sort by doing this:
>
> 1.  In the Math Editor, type out "f(x)=x*2" (or \times or \cdot or
> whatever).
>
> 2.  Now, go to the Math Panel and open the Delimiters dialog; set the left
> and right delimiters to whatever you need, and hit Ok.
>
> 3.  Within the delimiters you just inserted, insert a Matrix with however
> many rows and columns you want... in your example above, you'd probably want
> two columns so you could left-justify your terms, but you could just use one
> column if you're not picky.  The delimiters will grow to surround the entire
> matrix.  You can even nest matrices; they look odd in LyX, but the printed
> output will still be nice.
>

I have followed your instructions but I cannot get it to give the O/P I need.
I have attached a demo .lyx file to better illustrate the point. Do you have any
more suggestions?
Thanks again.
Tom.

--
Tom Crane, Dept. Physics, Royal Holloway, University of London, Egham Hill,
Egham, Surrey, TW20 0EX, England.
Email:  [EMAIL PROTECTED] or [EMAIL PROTECTED]
SPAN:   19.875
Fax:01784 472794




#This file was created by  Mon Oct 25 21:19:09 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass revtex
\begin_preamble
%\documentstyle[preprint,prl,aps,epsf]{revtex}

\def \rem#1 {{}}
\def \com#1 {{\bf \it #1 }}
\def \p#1 {{\bf #1 \par }}
%\def \rej#1 {{\small \it #1 }}
\def \rej#1 {{}}

\def \endnote#1 {{\small [#1]}}
\def \deg#1 {$#1^\circ$}

%% Tom's defs...
\def \hbn#1 {$h$-BN}
\def \3he#1 {$^{3}$He}
\end_preamble
\options prl,aps,epsf
\language default
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 2
\papersides 2
\paperpagestyle default

\layout Standard

The main problem with this equation is that the bracket sizes don't match
 up.
 The justification I could live with.
\layout Standard


\begin_inset Formula 
\begin{eqnarray*}
r(w)= &  & z+\exp \left[ -\int ^{b}_{a}\left( 2x-5y\right) \left\{ 
\frac{2}{5}P_{1}(t)\exp \left( -a\left( u_{y}-u_{x}\right) w\right) +\right. \right. \\
 &  & 6P_{1}(t)\exp \left( -au_{y}w\right) +\\
 &  & \left. \left. 3G_{2}(\tau )\exp \left( -a\left( u_{y}+u_{x}\right) w\right) 
\right\} dt\right] 
\end{eqnarray*}

\end_inset 


\layout Standard

Following your method (I think!) gives this which is not what I need --
 the [{}] need to open on the first line of the matrixed-bit and close on
 the 3rd line of the matrixed bit as the above equation does.
\layout Standard


\begin_inset Formula 
\[
r(w)=z+\exp \left[ -\int ^{b}_{a}\left( 2x-5y\right) \left\{ \begin{array}{cc}
 & \frac{2}{5}P_{1}(t)\exp \left( -a\left( u_{y}-u_{x}\right) w\right) +\\
 & 6P_{1}(t)\exp \left( -au_{y}w\right) +\\
 & 3G_{2}(\tau )\exp \left( -a\left( u_{y}+u_{x}\right) w\right) 
\end{array}\right\} dt\right] \]

\end_inset 


\the_end



RE: Formatting of multiline equations

1999-10-22 Thread Mr. Geepus the Sweeper

Hi...

On 22-Oct-99 Tom Crane wrote:

> f(x) = x*2 (z+3{aterm + 
> another_term + 
> a_third term})
> 
> I would like to make Latex use a 'largish' round-bracket & brace - as it
> would if my equation was all on a single line. How can I do this?? 

You should be able to achieve something of the sort by doing this:

1.  In the Math Editor, type out "f(x)=x*2" (or \times or \cdot or
whatever).

2.  Now, go to the Math Panel and open the Delimiters dialog; set the left
and right delimiters to whatever you need, and hit Ok.

3.  Within the delimiters you just inserted, insert a Matrix with however
many rows and columns you want... in your example above, you'd probably want
two columns so you could left-justify your terms, but you could just use one
column if you're not picky.  The delimiters will grow to surround the entire
matrix.  You can even nest matrices; they look odd in LyX, but the printed
output will still be nice.

Have fun,


---
// Carl Hudkins ]=[ ICQ: 5723399 ]=[ PGP: 0x50238d9e
// 
// "I've given up on the whole dating scene.  I've
//  decided to reproduce by asexual cell division."
// --Wally

 PGP signature


Formatting of multiline equations

1999-10-22 Thread Tom Crane

Dear All,
I am having difficulty formatting & justifying multiline equations
in LyX (1.0.4). I want to spead across, say, 3 lines, an equation
containing at least one nested level of parentheses. eg. Illustrating my
point using the fixed font of this mailer I am trying to get something
like,

f(x) = x*2 (z+3{aterm + 
another_term + 
a_third term})

I would like to make Latex use a 'largish' round-bracket & brace - as it
would if my equation was all on a single line. How can I do this?? 

TIA 
Tom.
-- 

Tom Crane, Dept. Physics, Royal Holloway, University of London, Egham
Hill, Egham, Surrey, TW20 0EX, England.  Email:  
[EMAIL PROTECTED] or [EMAIL PROTECTED] SPAN:  19.875 Fax:  
01784 472794