angstrom symbol in math mode

2001-04-24 Thread Brad Langhorst

I'm not able to get \AA to work in math mode (works fine in normal mode)
No error - it just display nothing in the DVI.

Any suggestions?

thanks!

brad



Re: angstrom symbol in math mode

2001-04-24 Thread Laurent DUVAL

*I'm not able to get \AA to work in math mode (works fine in normal mode)
*No error - it just display nothing in the DVI.

Write  \textrm{ in the math mode, then \AA between the brackets.
Works here.




Re: angstrom symbol in math mode

2001-04-24 Thread Brad Langhorst

On Tuesday 24 April 2001 11:36 am, Laurent DUVAL wrote:
> *I'm not able to get \AA to work in math mode (works fine in normal mode)
> *No error - it just display nothing in the DVI.
>
> Write  \textrm{ in the math mode, then \AA between the brackets.
> Works here.

thanks!
that \textrm works great

what is the acronym (what does rm standfor?)

brad



Re: angstrom symbol in math mode

2001-04-24 Thread Brad Langhorst

On Tuesday 24 April 2001 11:36 am, Laurent DUVAL wrote:
> *I'm not able to get \AA to work in math mode (works fine in normal mode)
> *No error - it just display nothing in the DVI.
>
> Write  \textrm{ in the math mode, then \AA between the brackets.
> Works here.

okay so that worked very nicely for a minute - then i saved the file and 
tried to re-open it.

Unfortunately lyx comes up with
Line ~116: Math parse error: Expected {.  Maybe you forgot to enclose an 
argument in {}
Line ~116: Math parse error: Unmatching braces
 Math Panic, expect problems!

(that is re-typed so any typos are mine)

bummer
so I started munging about in the relevant section now it consistenly saves 
as this

\begin_inset Formula \( \Delta vol=\frac{4\pi }{3}abs\left( 
r_{pH2}-r_{pH7}\right) ^{3}=\frac{4\pi }{3}\left( 17.87\textrm{ }\AA 
-16.03\textrm{ }\AA \textrm{ }\right) ^{3}=\frac{4\pi }{3}*6.263\textrm{ }\AA 
\textrm{ }^{3}=26.24\textrm{ }\AA \textrm{ }^{3} \)
\end_inset

yes those \AAs were inside the {} before 
and there was only one \textrm section per \AA 
If I fix this in a text editor to

\begin_inset Formula \( \Delta vol=\frac{4\pi }{3}abs\left( 
r_{pH2}-r_{pH7}\right) ^{3}=\frac{4\pi }{3}\left( 17.87\textrm{ \AA 
}-16.03\textrm{ \AA }\right) ^{3}=\frac{4\pi }{3}*6.263\textrm{ \AA 
}^{3}=26.24\textrm{ \AA }^{3} \)
\end_inset 

it just reverts back with the next save (and no angstrom symbols are 
displayed in dvi viewer (just spaces)

To re-interate 
I can create a formula containging angstrom symbols which look fine in a dvi 
viewer until i close and re-open the file.  
After this happens I get the error mentioned above 
In trying to correct the error i lose the angstrom symbols and something 
funny happens when lyx saves the \textrm sections

does \AA not count as an argument?

thanks for any suggestions for how to resolve this issue.

brad



Re: angstrom symbol in math mode

2001-04-24 Thread Andre Poenitz

> okay so that worked very nicely for a minute - then i saved the file and 
> tried to re-open it.
> 
> Unfortunately lyx comes up with

Which version of LyX is that?

Well, it is actually likely that any version of LyX show this behaviour,
the mathed parser is not correct in every case.

> If I fix this in a text editor to
> 
> \begin_inset Formula \( \Delta vol=\frac{4\pi }{3}abs\left( 
> r_{pH2}-r_{pH7}\right) ^{3}=\frac{4\pi }{3}\left( 17.87\textrm{ \AA 
> }-16.03\textrm{ \AA }\right) ^{3}=\frac{4\pi }{3}*6.263\textrm{ \AA 
> }^{3}=26.24\textrm{ \AA }^{3} \)
> \end_inset 

Try \AA{}. Maybe it helps.
 
> it just reverts back with the next save (and no angstrom symbols are 
> displayed in dvi viewer (just spaces)
> 
> To re-interate 
> I can create a formula containging angstrom symbols which look fine in a dvi 
> viewer until i close and re-open the file.  
> After this happens I get the error mentioned above 
> In trying to correct the error i lose the angstrom symbols and something 
> funny happens when lyx saves the \textrm sections
> 
> does \AA not count as an argument?

It certainly should.

Andre'

-- 
André Pönitz . [EMAIL PROTECTED]



Re: angstrom symbol in math mode

2001-04-25 Thread Brad Langhorst

Thanks for everybody's input here.
Sounds like I'll have to take a gander at the source to see what the problem 
is.

Lyx is 1.1.5fix2
\AA{} does not work
{\AA} does not work
only 
textrm{\AA} seems to have any function at all

let me know if you all come up with anything in the meantime

brad
On Wednesday 25 April 2001 12:48 am, Andre Poenitz wrote:
> > okay so that worked very nicely for a minute - then i saved the file and
> > tried to re-open it.
> >
> > Unfortunately lyx comes up with
>
> Which version of LyX is that?
>
> Well, it is actually likely that any version of LyX show this behaviour,
> the mathed parser is not correct in every case.
>
> > If I fix this in a text editor to
> >
> > \begin_inset Formula \( \Delta vol=\frac{4\pi }{3}abs\left(
> > r_{pH2}-r_{pH7}\right) ^{3}=\frac{4\pi }{3}\left( 17.87\textrm{ \AA
> > }-16.03\textrm{ \AA }\right) ^{3}=\frac{4\pi }{3}*6.263\textrm{ \AA
> > }^{3}=26.24\textrm{ \AA }^{3} \)
> > \end_inset
>
> Try \AA{}. Maybe it helps.
>
> > it just reverts back with the next save (and no angstrom symbols are
> > displayed in dvi viewer (just spaces)
> >
> > To re-interate
> > I can create a formula containging angstrom symbols which look fine in a
> > dvi viewer until i close and re-open the file.
> > After this happens I get the error mentioned above
> > In trying to correct the error i lose the angstrom symbols and something
> > funny happens when lyx saves the \textrm sections
> >
> > does \AA not count as an argument?
>
> It certainly should.
>
> Andre'



Re[2]: angstrom symbol in math mode

2001-04-24 Thread Guenter Milde

On Wed, 25 Apr 2001 06:48:54 +0200 (CEST) wrote Andre Poenitz <[EMAIL PROTECTED]>:

> > okay so that worked very nicely for a minute - then i saved the file and 
> > tried to re-open it.
...
> Which version of LyX is that?

This also happen with 1.1.6fix1 here.

However, if I use \mbox{\AA} instead of \textrm, everything works fine.

Guenter

--
[EMAIL PROTECTED]




Re[2]: angstrom symbol in math mode

2001-04-25 Thread Guenter Milde

On Wed, 25 Apr 2001 07:29:32 -0400 wrote Brad Langhorst <[EMAIL PROTECTED]>:

> Thanks for everybody's input here.
> Sounds like I'll have to take a gander at the source to see what the problem 
> is.
> 
> Lyx is 1.1.5fix2
> \AA{} does not work
> {\AA} does not work
> only 
> textrm{\AA} seems to have any function at all
> 
> let me know if you all come up with anything in the meantime

Did you already try \mbox{\AA}? It works fine here (lyx 1.1.6 on Linux)
See also the attached testfile.


--
[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

Ein Test der akzentuierten Zeichen im Mathe modus
\layout Standard


\begin_inset Formula \( 50\mbox {\AA } \)
\end_inset 


\the_end



Re[4]: angstrom symbol in math mode

2001-04-26 Thread Guenter Milde

On Wed, 25 Apr 2001 18:14:55 +0300 wrote Dekel Tsur <[EMAIL PROTECTED]>:

> > 2) add something like \rho or \pi for \AA to the math mode so that we don't 
> > have to enter another mode to get this symbol  (and maybe others?)
 
 
> Perhaps a better solution is to put the following lines in the preamble
>   \let\oldAA=\AA
>   \renewcommand{\AA}{\ensuremath{\mbox{\oldAA}}}

or even better
   \let\oldAA=\AA
   \renewcommand{\AA}{\mbox{\oldAA}}

no \ensuremath needed here as \mbox also works in text mode ;-)

Guenter


--
[EMAIL PROTECTED]




Re: Re[2]: angstrom symbol in math mode

2001-04-25 Thread Brad Langhorst

On Wednesday 25 April 2001 09:05 am, Guenter Milde wrote:
> On Wed, 25 Apr 2001 07:29:32 -0400 wrote Brad Langhorst 
<[EMAIL PROTECTED]>:
> > Thanks for everybody's input here.
> > Sounds like I'll have to take a gander at the source to see what the
> > problem is.
> >
> > Lyx is 1.1.5fix2
> > \AA{} does not work
> > {\AA} does not work
> > only
> > textrm{\AA} seems to have any function at all
> >
> > let me know if you all come up with anything in the meantime
>
> Did you already try \mbox{\AA}? It works fine here (lyx 1.1.6 on Linux)
> See also the attached testfile.

I've just tried the mbox method (i must have missed it before)
this seems stable across saves and reopening
the  saved version looks like this

\begin_inset Formula \( \Delta vol=\frac{4\pi }{3}\left( 
r_{pH2}-r_{pH7}\right) ^{3}=\frac{4\pi }{3}\left( 17.87\mbox {\AA 
}-16.03\mbox {\AA }\right) ^{3}=\frac{4\pi }{3}*6.263\mbox {\AA 
}^{3}=26.24\mbox {\AA }^{3} \)


Well that puts my homework out the door but doesn't explain this textrm 
problem (I think its save to say its a problem with textrm since the mbox 
method works).
Thanks for the workaround!

I think my goal is now two fold
1) figure out what this textrm is all about and why it gets funky on save and 
reopen
2) add something like \rho or \pi for \AA to the math mode so that we don't 
have to enter another mode to get this symbol  (and maybe others?)

Thanks again for all your kind help and suggestions for how to get this 
working.

brad





































\end_insert

>
> --
> [EMAIL PROTECTED]


Content-Type: TEXT/x-lyx; charset="iso-8859-1"; name="aatest.lyx"
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Description: 




Re: Re[2]: angstrom symbol in math mode

2001-04-25 Thread Dekel Tsur

On Wed, Apr 25, 2001 at 09:40:59AM -0400, Brad Langhorst wrote:
> I think my goal is now two fold
> 1) figure out what this textrm is all about and why it gets funky on save and 
> reopen
> 2) add something like \rho or \pi for \AA to the math mode so that we don't 
> have to enter another mode to get this symbol  (and maybe others?)

Put the following line in the preamble
  \newcommand{\mAA}{\mbox{\AA}}
in the preamble, and then use \mAA in math mode.

Perhaps a better solution is to put the following lines in the preamble
  \let\oldAA=\AA
  \renewcommand{\AA}{\ensuremath{\mbox{\oldAA}}}
and then you can use \AA in math mode.



Re: Re[2]: angstrom symbol in math mode

2001-04-25 Thread Brad Langhorst

Sorry I think I wasn't clear in my earlier post
 I did try the mbox function and it  works fine.

I would like to figure out what the problem is with the math parser's 
handling of the textrm function and possibly add something like \rho
or \pi for \AA to the math parser so that it is easier to use that symbol.

thanks again for everybody's help/interest!


brad
On Wednesday 25 April 2001 09:05 am, Guenter Milde wrote:
> On Wed, 25 Apr 2001 07:29:32 -0400 wrote Brad Langhorst 
<[EMAIL PROTECTED]>:
> > Thanks for everybody's input here.
> > Sounds like I'll have to take a gander at the source to see what the
> > problem is.
> >
> > Lyx is 1.1.5fix2
> > \AA{} does not work
> > {\AA} does not work
> > only
> > textrm{\AA} seems to have any function at all
> >
> > let me know if you all come up with anything in the meantime
>
> Did you already try \mbox{\AA}? It works fine here (lyx 1.1.6 on Linux)
> See also the attached testfile.
>
>
> --
> [EMAIL PROTECTED]


Content-Type: TEXT/x-lyx; charset="iso-8859-1"; name="aatest.lyx"
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Description: