Re: How to enter text in math mode?
Am Donnerstag, den 04.12.2008, 21:36 + schrieb Guenter Milde: > On 2008-12-04, Tobias Hilbricht wrote: > > So my question: How do I enter something like > > \text{\ce{H+ + OH- <=>> H2O}} > > > in math mode? > > 1. Type it as normal text in your paragraph. > > 2. Mark it and press Ctrl-M to convert to Math > > 3. Repeat (mark and Ctrl-M) to convert to Text-in-Math. Dear Guenther, thanks a lot, your advice does the trick! Yours Tobias Hilbricht
Re: How to enter text in math mode?
On 2008-12-04, Tobias Hilbricht wrote: > I am using LyX 1.5.5 on Ubuntu Linux 8.04 (Hardy) ... > So my question: How do I enter something like \text{\ce{H+ + OH- <=>> H2O}} > in math mode? 1. Type it as normal text in your paragraph. 2. Mark it and press Ctrl-M to convert to Math 3. Repeat (mark and Ctrl-M) to convert to Text-in-Math. (Tested with LyX 1.6.0 on Debian. AFAIK, this worked also in 1.5. In earlier Versions, the trick is to drag and drop the LaTeX-math expression with the mouse in a math box.) BTW: 1.6.0 on Debian also allows entering spaces in Text-in-Math and you leaves this mode with right arrow. Maybe upgrading to 1.5.7 helps (if 1.6.0 is not an option). Günter
Re: How to enter text in math mode?
Am Donnerstag, den 04.12.2008, 16:45 + schrieb Erez Yerushalmi: > Then I'm really sorry. I tried it with lyx 1.6.0 and \ce is not > recognized. I probably need to load in the mhchem package. Dear Erez, I probably was not clear enough. mhchem is a LaTeX package to write chemical compounds and reactions. \ce is a macro of mhchem, so you have call for mhchem in LyX under Document -> Settings -> Preamble. I would like to enter mhchem macros in math mode rather than in plain ERT, because then I have a preview. Somebody published in the LyX wiki a little HowTo and an example file mhchem.lyx: http://wiki.lyx.org/LyX/LyXForX (see the point Chemistry - Typesetting formulae) If you open mhchem.lyx with a plain text editor then that somebody managed to get this line into *mhchem.lyx*: \begin_inset Formula $\text{\ce{H+ + OH- <=>> H2O}}$ I can open mhchem.lyx with LyX and see a preview of the reaction. I can copy and paste it in LyX and see a preview. But I cannot reproduce typing this in with LyX 1.5.5 on Ubuntu 8.04 and I want to know if I miss something, if it is a bug or a regression (perhaps it did work only with older versions?). I hope I could point out my problem?! Yours sincerely Tobias Hilbricht > I think I don't really understand what equation you are trying to put > it. > \ce{...} is a macro of the mhchem package.
Re: How to enter text in math mode?
Am Donnerstag, den 04.12.2008, 16:24 + schrieb Erez Yerushalmi: > press control-M and then control-M again. When you want to return to math > in the same math box, just do space. Dear Erez, thank you for your quick reply. I am afraid it is not that simple, because what you suggested is just what I try to do with the following: \ce{H+ + OH- <=>> H2O} \ce{...} is a macro of the mhchem package. So be so kind and tell me if you can do Ctrl-m Ctrl-m and type in the macro mentioned above without the cursor jumping out of the mbox when entering a space. I can do what you said with simple text, but not with the macro above. I am using. If it works for you, do you use LyX 1.5.5, perhaps on Ubuntu 8.04? Yours Tobias Hilbricht > > internet site: When I type Ctrl-m Ctrl-m in order to get into text in > > math mode, I end up in an mbox, and as soon as I enter a space after H+ > > to write something like this into that mbox: \ce{H+ + OH- <=>> H2O}, the > > cursor jumps out of the box. So I can only type single compounds, but no > > reactions.
Re: How to enter text in math mode?
If I understood you correctly, this is very easy. press control-M and then control-M again. When you want to return to math in the same math box, just do space. see below \mbox{a text }andnowmath erez On Thu, Dec 4, 2008 at 4:18 PM, Tobias Hilbricht <[EMAIL PROTECTED]>wrote: > Dear readers of this list, > > I am using LyX 1.5.5 on Ubuntu Linux 8.04 (Hardy) to write down some > chemistry. I found the following hint in the LyX Wiki on using the LaTeX > package mhchem in LyX math mode in order to preview the formulas on > screen: > http://wiki.lyx.org/LyX/LyXForX (see the point Chemistry - Typesetting > formulae) > However, I am unable to reproduce the example mhchem.lyx given on that > internet site: When I type Ctrl-m Ctrl-m in order to get into text in > math mode, I end up in an mbox, and as soon as I enter a space after H+ > to write something like this into that mbox: \ce{H+ + OH- <=>> H2O}, the > cursor jumps out of the box. So I can only type single compounds, but no > reactions. > If I type Ctrl-m to enter math mode and then press Ctrl-l to enter ERT > \text{\ce{H+ + OH- <=>> H2O}} the cursor also jumps out of the text-box > as soon as I enter a space after H+. Again, as a result, only single > compounds are possible with preview. > The LaTeX amsmath-package is available and checked in LyX document > settings. It is possible to enter pure ERT like $\text{\ce{H+ + OH- <=>> > H2O}}$ and get it typeset by LyX/LaTeX, but then I have no preview. > > So my question: How do I enter something like \text{\ce{H+ + OH- <=>> > H2O}} in math mode? > > Thanks for helpful hints > > Yours sincerely > > Tobias Hilbricht > > > -- Erez Yerushalmi PhD Student Warwick University, UK http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi
How to enter text in math mode?
Dear readers of this list, I am using LyX 1.5.5 on Ubuntu Linux 8.04 (Hardy) to write down some chemistry. I found the following hint in the LyX Wiki on using the LaTeX package mhchem in LyX math mode in order to preview the formulas on screen: http://wiki.lyx.org/LyX/LyXForX (see the point Chemistry - Typesetting formulae) However, I am unable to reproduce the example mhchem.lyx given on that internet site: When I type Ctrl-m Ctrl-m in order to get into text in math mode, I end up in an mbox, and as soon as I enter a space after H+ to write something like this into that mbox: \ce{H+ + OH- <=>> H2O}, the cursor jumps out of the box. So I can only type single compounds, but no reactions. If I type Ctrl-m to enter math mode and then press Ctrl-l to enter ERT \text{\ce{H+ + OH- <=>> H2O}} the cursor also jumps out of the text-box as soon as I enter a space after H+. Again, as a result, only single compounds are possible with preview. The LaTeX amsmath-package is available and checked in LyX document settings. It is possible to enter pure ERT like $\text{\ce{H+ + OH- <=>> H2O}}$ and get it typeset by LyX/LaTeX, but then I have no preview. So my question: How do I enter something like \text{\ce{H+ + OH- <=>> H2O}} in math mode? Thanks for helpful hints Yours sincerely Tobias Hilbricht