Re: Mathed sub/superscripts highlighting
Darren Freeman wrote: What I am most concerned about is being able to write chemical formulas with each element as a nucleus. I guess if I ensure the nucleus is math-text then it will work anyway but there must be others who would like this to work without brace insets. Maybe there should be a chemical mode or chemical inset within mathed? Spare a thought for anybody who wants to write down: $\mbox{La}_5\mbox{Pr}_2\mbox{Eu}_4\mbox{Yb}_3 \mbox{Si}_{12}\mbox{Sn}_{16}\Rightarrow\mbox{Purple}_2\mbox{Monkey}_1 \mbox{Dishwasher}_3$ Have you tried the mhchem package? You can type something like \ce{La(NH3)3.6H2O} or \ce{CH3CO2-} and it'll come out properly formatted. http://www.tug.org/texlive/devsrc/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf As with my earlier suggestion that you use the SIUnits package, there's usually a LaTeX package out there that can typeset better than you can. That, after all, is the point. Angus
Re: Mathed sub/superscripts highlighting
Darren Freeman wrote: > What I am most concerned about is being able to write chemical formulas > with each element as a nucleus. I guess if I ensure the nucleus is > math-text then it will work anyway but there must be others who would > like this to work without brace insets. > > Maybe there should be a chemical mode or chemical inset within mathed? That might be useful, but not for this reason. > Spare a thought for anybody who wants to write down: > > $\mbox{La}_5\mbox{Pr}_2\mbox{Eu}_4\mbox{Yb}_3 > \mbox{Si}_{12}\mbox{Sn}_{16}\Rightarrow\mbox{Purple}_2\mbox{Monkey}_1 > \mbox{Dishwasher}_3$ > > :) > > Suggestion: can you define \nuc{} to mean the same as {}? Then \nuc > would be used for multiple char nuclei and LyX would have no ambiguity > in parsing it. That would be a hack that will cause complaints from whose who want readable TeX export. Another idea I had is to automatically insert a brace inset if you enter more than one character of a nucleus. It is certainly not a good idea UI wise, but IMHO better than the current situation. Of course the best thing would be if the braces could be part of the nucleus. Read the old discussions, we were not able to find a reliable solution for this problem. Georg
Re: Mathed sub/superscripts highlighting
Darren Freeman wrote: > The multi-char nucleus is saved and loaded properly by LyX, right? No, it becomes a single char nucleus. Try it. > So > why not export with braces? It shouldn't be that often that people > import LaTeX that was generated by LyX, right? They do that all the time they load a .lyx file, because math is stored as TeX in .lyx files. And they do that if they use undo/redo, because that also uses the TeX serialization. Therefore reading that back _must_ work. Georg
Re: Mathed sub/superscripts highlighting
On Wed, 2007-06-27 at 20:37 +0200, Georg Baum wrote: > Am Mittwoch, 27. Juni 2007 17:39 schrieb Alfredo Braunstein: > > And there is an inconsistency: we pretend to have a multi-char > > nucleus internally but we output something else to latex. It's a pity > that > > there's no good solution. Maybe it would be better to not have muti-char > > nucleus at all and force the user to enter a brace inset? > > I think so. What I am most concerned about is being able to write chemical formulas with each element as a nucleus. I guess if I ensure the nucleus is math-text then it will work anyway but there must be others who would like this to work without brace insets. Maybe there should be a chemical mode or chemical inset within mathed? Spare a thought for anybody who wants to write down: $\mbox{La}_5\mbox{Pr}_2\mbox{Eu}_4\mbox{Yb}_3 \mbox{Si}_{12}\mbox{Sn}_{16}\Rightarrow\mbox{Purple}_2\mbox{Monkey}_1 \mbox{Dishwasher}_3$ :) Suggestion: can you define \nuc{} to mean the same as {}? Then \nuc would be used for multiple char nuclei and LyX would have no ambiguity in parsing it. Have fun, Darren
Re: Mathed sub/superscripts highlighting
On Wed, 2007-06-27 at 17:39 +0200, Alfredo Braunstein wrote: > Georg Baum wrote: > > Currently everything is working perfectly. There is only one drawback > > concerning the representation on screen: For things like {ab}^{c} the > > braces around {ab} are shown in red, and if you want to enter such things > > you need to enter a brace inset around ab. This is what Jean-Marc wanted > > I disagree, this is not just representation on screen, it's cumbersome to > enter them. And there is an inconsistency: we pretend to have a multi-char > nucleus internally but we output something else to latex. It's a pity that > there's no good solution. Maybe it would be better to not have muti-char > nucleus at all and force the user to enter a brace inset? No no no no! The UI behaviour is nice at the moment. The problem is that while I was told the multi-char nucleus would have braces around it, this isn't happening. The multi-char nucleus is saved and loaded properly by LyX, right? So why not export with braces? It shouldn't be that often that people import LaTeX that was generated by LyX, right? Then the problem of importing brace insets can be solved a bit later. Those who don't make use of this feature won't notice anyway. Have fun, Darren
Re: Mathed sub/superscripts highlighting
Am Mittwoch, 27. Juni 2007 17:39 schrieb Alfredo Braunstein: > Georg Baum wrote: > > >> Alfredo> From a quick research with svn I've found two seemingly > >> Alfredo> relevant (not sure really) entries. Seems we don't output > >> Alfredo> them because it's a problem reading them back? > > > > To which braces do you refer? The one of the sub/superscript are AFAIK > > always output. It would probably be possible to leave them out, but why? > > The ones around a multiple character nucleus need to be added manually (by > > a brace inset). Reading braces back is in no case a problem. > > Yes, the second ones. Optimally we should output braces around a multiple > char nucleus. I forgot that it is possible to create such a thing. This is of course a problem. > IUC the problem is that on reading them back we would have > added a brace inset that was not there originally. Exactly. That might be tolerable, but the real problem with this approach is that the invariant mathinset == parse(mathinset.asString()) would no longer be true. This invariant is assumed at several places in the code (one being undo). > >> This is very fragile stuff. > > > > That depends. It is fragile if you try to be clever during parsing and > > remove insets that have been created previously, and add them back in > > write() again. As long as you do normal parsing without removing insets it > > is quite robust. > > Currently everything is working perfectly. There is only one drawback > > concerning the representation on screen: For things like {ab}^{c} the > > braces around {ab} are shown in red, and if you want to enter such things > > you need to enter a brace inset around ab. This is what Jean-Marc wanted > > I disagree, this is not just representation on screen, it's cumbersome to > enter them. Exactly what I wrote. I don't see the disagreement :-) > And there is an inconsistency: we pretend to have a multi-char > nucleus internally but we output something else to latex. It's a pity that > there's no good solution. Maybe it would be better to not have muti-char > nucleus at all and force the user to enter a brace inset? I think so. Georg
Re: Mathed sub/superscripts highlighting
Georg Baum wrote: >> Alfredo> From a quick research with svn I've found two seemingly >> Alfredo> relevant (not sure really) entries. Seems we don't output >> Alfredo> them because it's a problem reading them back? > > To which braces do you refer? The one of the sub/superscript are AFAIK > always output. It would probably be possible to leave them out, but why? > The ones around a multiple character nucleus need to be added manually (by > a brace inset). Reading braces back is in no case a problem. Yes, the second ones. Optimally we should output braces around a multiple char nucleus. IUC the problem is that on reading them back we would have added a brace inset that was not there originally. >> This is very fragile stuff. > > That depends. It is fragile if you try to be clever during parsing and > remove insets that have been created previously, and add them back in > write() again. As long as you do normal parsing without removing insets it > is quite robust. > Currently everything is working perfectly. There is only one drawback > concerning the representation on screen: For things like {ab}^{c} the > braces around {ab} are shown in red, and if you want to enter such things > you need to enter a brace inset around ab. This is what Jean-Marc wanted I disagree, this is not just representation on screen, it's cumbersome to enter them. And there is an inconsistency: we pretend to have a multi-char nucleus internally but we output something else to latex. It's a pity that there's no good solution. Maybe it would be better to not have muti-char nucleus at all and force the user to enter a brace inset? A/
Re: Mathed sub/superscripts highlighting
Jean-Marc Lasgouttes wrote: >> "Alfredo" == Alfredo Braunstein >> <[EMAIL PROTECTED]> writes: > > Alfredo> Darren Freeman wrote: >>> According to the View->Source panel, these both result in $Ge^{3}$. >>> >>> Did this get broken recently? I have been using this "feature" to >>> put my chemical elements as the nucleus of a subscript for a while >>> and I'd hate to think it was for nothing. >>> >>> Also, shouldn't LyX refrain from outputting the curly braces on the >>> sub/superscript unless it's more than one char? > > Alfredo> From a quick research with svn I've found two seemingly > Alfredo> relevant (not sure really) entries. Seems we don't output > Alfredo> them because it's a problem reading them back? To which braces do you refer? The one of the sub/superscript are AFAIK always output. It would probably be possible to leave them out, but why? The ones around a multiple character nucleus need to be added manually (by a brace inset). Reading braces back is in no case a problem. > Maybe JMarc or > Alfredo> Georg know what's happening? > > Yes, I tried to 'optimize' this stuff last summer, and the result was > that I introduced several strange bugs (in particular one that only > happened in windows (and for which no reason as been found AFAICR)). > > This is very fragile stuff. That depends. It is fragile if you try to be clever during parsing and remove insets that have been created previously, and add them back in write() again. As long as you do normal parsing without removing insets it is quite robust. Currently everything is working perfectly. There is only one drawback concerning the representation on screen: For things like {ab}^{c} the braces around {ab} are shown in red, and if you want to enter such things you need to enter a brace inset around ab. This is what Jean-Marc wanted to optimize, but we came to the conclusion that it is not possible to do this in a way that would always work. Georg
Re: Mathed sub/superscripts highlighting
> "Alfredo" == Alfredo Braunstein <[EMAIL PROTECTED]> writes: Alfredo> Darren Freeman wrote: >> According to the View->Source panel, these both result in $Ge^{3}$. >> >> Did this get broken recently? I have been using this "feature" to >> put my chemical elements as the nucleus of a subscript for a while >> and I'd hate to think it was for nothing. >> >> Also, shouldn't LyX refrain from outputting the curly braces on the >> sub/superscript unless it's more than one char? Alfredo> From a quick research with svn I've found two seemingly Alfredo> relevant (not sure really) entries. Seems we don't output Alfredo> them because it's a problem reading them back? Maybe JMarc or Alfredo> Georg know what's happening? Yes, I tried to 'optimize' this stuff last summer, and the result was that I introduced several strange bugs (in particular one that only happened in windows (and for which no reason as been found AFAICR)). This is very fragile stuff. JMarc
Re: Mathed sub/superscripts highlighting
Darren Freeman wrote: > According to the View->Source panel, these both result in $Ge^{3}$. > > Did this get broken recently? I have been using this "feature" to put my > chemical elements as the nucleus of a subscript for a while and I'd hate > to think it was for nothing. > > Also, shouldn't LyX refrain from outputting the curly braces on the > sub/superscript unless it's more than one char? >From a quick research with svn I've found two seemingly relevant (not sure really) entries. Seems we don't output them because it's a problem reading them back? Maybe JMarc or Georg know what's happening? A/ $ svn -r15859 log r15859 | baum | 2006-11-11 16:26:31 +0100 (Sat, 11 Nov 2006) | 11 lines Revert revision 14819 and my faulty fix for it. * src/mathed/InsetMathScript.C (InsetMathScript::write): Do not add braces to the nucleus * src/mathed/MathParser.C (Parser::parse1): Do not remove brace insets from the nucleus of script insets * src/mathed/InsetMathNest.C (InsetMathNest::script): ditto $ svn -r15858:15859 diff InsetMathScript.cpp Index: InsetMathScript.C === --- InsetMathScript.C (revision 15858) +++ InsetMathScript.C (revision 15859) @@ -421,11 +421,7 @@ void InsetMathScript::write(WriteStream & os) const { if (nuc().size()) { - if (nuc().size() == 1 - && ! nuc().begin()->nucleus()->asScriptInset()) - os << nuc(); - else - os << '{' << nuc() << '}'; + os << nuc(); //if (nuc().back()->takesLimits()) { if (limits_ == -1) os << "\\nolimits "; $ svn -r14819 log r14819 | lasgouttes | 2006-08-23 12:57:49 +0200 (Wed, 23 Aug 2006) | 14 lines Handle properly script insets which nucleus has more than one element (like {a'}^{2}). (froward port from 14802) * src/mathed/math_nestinset.C (script): when creating a script inset, handle specially previous atom if it is a MathBraceInset (this is used in interactive input). * src/mathed/math_parser.C (parse1): when creating a script inset, handle specially previous atom if it is a MathBraceInset (this is used in parsing phase). * src/mathed/math_scriptinset.C (write): put nucleus into braces if it contains more than one element or is itself a script inset.
Re: Mathed sub/superscripts highlighting
On Mon, 2007-05-21 at 17:21 +0200, Jean-Marc Lasgouttes wrote: > > "Darren" == Darren Freeman <[EMAIL PROTECTED]> writes: > > Darren> On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: > >> {Ge}^3 is different to > >> > >> Ge^3 and G^3 and e^3, which have all the same vertical height. > > Darren> So how does one enter {Ge}^3 in LyX other than ERT? > > Once you have your e^3 entered, your can go in the 'e' box and add the > G. Not very intuitive, I know... According to the View->Source panel, these both result in $Ge^{3}$. Did this get broken recently? I have been using this "feature" to put my chemical elements as the nucleus of a subscript for a while and I'd hate to think it was for nothing. Also, shouldn't LyX refrain from outputting the curly braces on the sub/superscript unless it's more than one char? Have fun, Darren
Re: Mathed sub/superscripts highlighting
On Tue, May 22, 2007 at 07:49:44PM +0200, Andre Poenitz wrote: > On Tue, May 22, 2007 at 02:11:08AM +0200, Enrico Forestieri wrote: > > On Mon, May 21, 2007 at 07:28:40PM +0200, Andre Poenitz wrote: > > > > As I was asking, does this really mean anything? > > > > > > Sure. Just look at the output of {Ge}^1 and Ge^1. > > > > > > The superscript is in different heights above baseline. > > > > Not in TeX, unless the math font you use has unusually tall capital letters. > > Have you tried? > > I have a difference of ~<1mm without chaning fonts. I was speaking out of memory. I had tried a lot of combinations when I implemented the TeX rules about sub/superscript placement, but I was confusing some cases, apparently. What I said is true for G^1 and e^1, as both have the same height, but not for {Ge}^1 which indeed has a different height. I quickly checked that this is so because of rule G/18a and I am glad to see that this difference can also be seen on the LyX screen, meaning that I must have done a good job ;-) -- Enrico
Re: Mathed sub/superscripts highlighting
On Tue, May 22, 2007 at 02:11:08AM +0200, Enrico Forestieri wrote: > On Mon, May 21, 2007 at 07:28:40PM +0200, Andre Poenitz wrote: > > > As I was asking, does this really mean anything? > > > > Sure. Just look at the output of {Ge}^1 and Ge^1. > > > > The superscript is in different heights above baseline. > > Not in TeX, unless the math font you use has unusually tall capital letters. Have you tried? I have a difference of ~<1mm without chaning fonts. Andre'
Re: Mathed sub/superscripts highlighting
Darren Freeman <[EMAIL PROTECTED]> writes: > Hmmm... I recently reported a bug in which I couldn't generate output if > I had math-text with special chars in it, but I think my report wasn't > dealt with. So I ended up leaving them for later in the hopes the bug > would be fixed. > > I like to do things like this: C-m, "1.55\ \mu m", select everything > inside mathed, C-m again. If you'd really like a bug to be fixed, then file a bug report in bugzilla. Otherwise, the report will just be lost. Angus
Re: Mathed sub/superscripts highlighting
Enrico Forestieri wrote: > On Mon, May 21, 2007 at 07:28:40PM +0200, Andre Poenitz wrote: > >> On Mon, May 21, 2007 at 11:12:33PM +1000, Darren Freeman wrote: >>> On Mon, 2007-05-21 at 14:52 +0200, Abdelrazak Younes wrote: Darren Freeman wrote: > Is this sensible? Does it have meaning at the LaTeX level but perhaps > shouldn't be shown to the user? (Such as LyX automatically determining > who to hang each subscript off at output time instead). There is a difference and View->Source will tell you what this difference is: Ge_{33} Ge{}_{33} In the first case, only 'e' is within the four corner marks. In the second case, a little dot will tell you that an empty symbol is used. >>> As I was asking, does this really mean anything? >> Sure. Just look at the output of {Ge}^1 and Ge^1. >> >> The superscript is in different heights above baseline. > > Not in TeX, unless the math font you use has unusually tall capital letters. put it in a box and measure the height, it is different. Herbert
Re: Mathed sub/superscripts highlighting
Enrico Forestieri wrote: > On Mon, May 21, 2007 at 05:21:51PM +0200, Jean-Marc Lasgouttes wrote: > >>> "Darren" == Darren Freeman <[EMAIL PROTECTED]> writes: >> Darren> On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: {Ge}^3 is different to Ge^3 and G^3 and e^3, which have all the same vertical height. >> Darren> So how does one enter {Ge}^3 in LyX other than ERT? >> >> Once you have your e^3 entered, your can go in the 'e' box and add the >> G. Not very intuitive, I know... > > No, this is not sufficient as the nucleus still is "e" in this case. > If you save and reload the file, you will notice that. > You have to put Ge in a brace inset (using \{) if you want "Ge" as the > nucleus. However, in this case it will not make a visual difference, it is 0.74pt in this case ... > given the rules for sub/superscript placement. However, you will notice > the difference between "\int e^3", where \int is added to the 'e' box, > and "{\int e}^3" (even in LyX :). Herbert
Re: Mathed sub/superscripts highlighting
On Mon, 2007-05-21 at 19:23 +0200, Andre Poenitz wrote: > On Mon, May 21, 2007 at 10:34:54PM +1000, Darren Freeman wrote: > > Does it have meaning at the LaTeX level but perhaps > > shouldn't be shown to the user? (Such as LyX automatically determining > > who to hang each subscript off at output time instead). > > How should LyX know that you want {Ge}_33 and not Ge_33 'automatically'? > Note that you can get what you want by entering \{. > > Apart from that, the Ge should not be in italics anyway, and > incidentally C-m C-m Ge 33 gives you corners around Ge, not > just the e. Hmmm... I recently reported a bug in which I couldn't generate output if I had math-text with special chars in it, but I think my report wasn't dealt with. So I ended up leaving them for later in the hopes the bug would be fixed. I like to do things like this: C-m, "1.55\ \mu m", select everything inside mathed, C-m again. Problem is, the above only works at the moment without the \mu. I get LaTeX errors about missing $ inserted. So I just let everything be italics in the hopes that LyX is fixed by the time I submit :) Have fun, Darren
Re: Mathed sub/superscripts highlighting
On Mon, May 21, 2007 at 07:28:40PM +0200, Andre Poenitz wrote: > On Mon, May 21, 2007 at 11:12:33PM +1000, Darren Freeman wrote: > > On Mon, 2007-05-21 at 14:52 +0200, Abdelrazak Younes wrote: > > > Darren Freeman wrote: > > > > Is this sensible? Does it have meaning at the LaTeX level but perhaps > > > > shouldn't be shown to the user? (Such as LyX automatically determining > > > > who to hang each subscript off at output time instead). > > > > > > There is a difference and View->Source will tell you what this > > > difference is: > > > > > > Ge_{33} > > > Ge{}_{33} > > > > > > In the first case, only 'e' is within the four corner marks. In the > > > second case, a little dot will tell you that an empty symbol is used. > > > > As I was asking, does this really mean anything? > > Sure. Just look at the output of {Ge}^1 and Ge^1. > > The superscript is in different heights above baseline. Not in TeX, unless the math font you use has unusually tall capital letters. -- Enrico
Re: Mathed sub/superscripts highlighting
On Mon, May 21, 2007 at 05:26:19PM +0200, Abdelrazak Younes wrote: > Jean-Marc Lasgouttes wrote: > >> "Darren" == Darren Freeman <[EMAIL PROTECTED]> writes: > > > > Darren> On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: > >>> {Ge}^3 is different to > >>> > >>> Ge^3 and G^3 and e^3, which have all the same vertical height. > > > > Darren> So how does one enter {Ge}^3 in LyX other than ERT? > > > > Once you have your e^3 entered, your can go in the 'e' box and add the > > G. Not very intuitive, I know... > > And the resulting LateX ouput is exactly the same anyway. So I'd say > it's better to not publicize this non-feature ;-) This is due to the fact that the exponent in G^3 and e^3 is at the same height (unless you have a font with unusually tall capital letters, such as dunhill, f.ex.). Anyway, entering 'Ge' in the same box doesn't change the fact that the nucleus still is 'e', such that only the ascent and descent values of 'e' are taken into account for sub/superscript placement. You have to put 'Ge' in a brace inset if you want 'Ge' as the nucleus (but in this case you will not notice any difference, as explained above). -- Enrico
Re: Mathed sub/superscripts highlighting
On Mon, May 21, 2007 at 05:21:51PM +0200, Jean-Marc Lasgouttes wrote: > > "Darren" == Darren Freeman <[EMAIL PROTECTED]> writes: > > Darren> On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: > >> {Ge}^3 is different to > >> > >> Ge^3 and G^3 and e^3, which have all the same vertical height. > > Darren> So how does one enter {Ge}^3 in LyX other than ERT? > > Once you have your e^3 entered, your can go in the 'e' box and add the > G. Not very intuitive, I know... No, this is not sufficient as the nucleus still is "e" in this case. If you save and reload the file, you will notice that. You have to put Ge in a brace inset (using \{) if you want "Ge" as the nucleus. However, in this case it will not make a visual difference, given the rules for sub/superscript placement. However, you will notice the difference between "\int e^3", where \int is added to the 'e' box, and "{\int e}^3" (even in LyX :). -- Enrico
Re: Mathed sub/superscripts highlighting
On Mon, May 21, 2007 at 05:37:33PM +0200, Edwin Leuven wrote: > Helge Hafting wrote: > >The only difference here is that one _33 hangs off Ge, and > >the other _33 hangs off Ge^44. Notice how they end up > >at different heights. > > selecting Ge and clicking on superscript put the Ge in the superscript > and puts the cursor there: > > ^{Ge|} This is consistent with the rest of Mathed. It always happens 'something' with the selected part, not with the surrounding stuff. Andre'
Re: Mathed sub/superscripts highlighting
On Mon, May 21, 2007 at 11:12:33PM +1000, Darren Freeman wrote: > On Mon, 2007-05-21 at 14:52 +0200, Abdelrazak Younes wrote: > > Darren Freeman wrote: > > > Is this sensible? Does it have meaning at the LaTeX level but perhaps > > > shouldn't be shown to the user? (Such as LyX automatically determining > > > who to hang each subscript off at output time instead). > > > > There is a difference and View->Source will tell you what this > > difference is: > > > > Ge_{33} > > Ge{}_{33} > > > > In the first case, only 'e' is within the four corner marks. In the > > second case, a little dot will tell you that an empty symbol is used. > > As I was asking, does this really mean anything? Sure. Just look at the output of {Ge}^1 and Ge^1. The superscript is in different heights above baseline. > I tried this in a fresh document and can't see a difference in the > generated output. > Does TeX consider Ge_{33} to be a Ge with a subscript, or a G followed > by an e with a subscript, or treat both as equivalent? G followed by e with subscript. Andre'
Re: Mathed sub/superscripts highlighting
On Mon, May 21, 2007 at 10:34:54PM +1000, Darren Freeman wrote: > Hi all, > > Let's say I enter something in a math insert other than an equation (as > I often do). Pick "Ge33As12Se55" as an example, a chemical formula. > (numbers are subscripts) > > When I'm editing a subscript, the four little corner marks that > highlight the subscript will include the lower-case letter of the > preceding element. Sure this makes sense if that were a variable > carrying the subscript, but in this case it doesn't. > > Shouldn't the highlighting on the subscript just surround the subscript > itself? Same for superscripts. Is there any meaning to the way it is > grouped at the moment? Yes, it's the way it is processed by LaTeX later. > I see it is possible to actually delete the lowercase letter and end up > with a subscript hanging on its own, you can then add another letter > into the subscript selection and have the subscript hang off that one. > Is this sensible? I believe so. > Does it have meaning at the LaTeX level but perhaps > shouldn't be shown to the user? (Such as LyX automatically determining > who to hang each subscript off at output time instead). How should LyX know that you want {Ge}_33 and not Ge_33 'automatically'? Note that you can get what you want by entering \{. Apart from that, the Ge should not be in italics anyway, and incidentally C-m C-m Ge 33 gives you corners around Ge, not just the e. Andre'
Re: Mathed sub/superscripts highlighting
Helge Hafting wrote: The only difference here is that one _33 hangs off Ge, and the other _33 hangs off Ge^44. Notice how they end up at different heights. selecting Ge and clicking on superscript put the Ge in the superscript and puts the cursor there: ^{Ge|} perhaps it makes more sense to take Ge as the base and put the cursor in the superscript? {Ge}^{|} please ignore if this doesn't make sense, since i am not exactly a latex expert (currently trying to find an elegant way to have caption width match the width of my tabulars while the caption is above the tabular! :(
Re: Mathed sub/superscripts highlighting
Jean-Marc Lasgouttes wrote: "Darren" == Darren Freeman <[EMAIL PROTECTED]> writes: Darren> On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: {Ge}^3 is different to Ge^3 and G^3 and e^3, which have all the same vertical height. Darren> So how does one enter {Ge}^3 in LyX other than ERT? Once you have your e^3 entered, your can go in the 'e' box and add the G. Not very intuitive, I know... And the resulting LateX ouput is exactly the same anyway. So I'd say it's better to not publicize this non-feature ;-) Abdel.
Re: Mathed sub/superscripts highlighting
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: As I was asking, does this really mean anything? Abdelrazak> I _don't_ know. But I guess that if the TeX source is Abdelrazak> different, there should be a reason. The vertical alignment depends on the ascent/descent of the nucleus. I guess that {Ge}^33 is not the same as Ge^33. Correct. For an example, type Ge_33 Ge^44 _33 (You should get a Ge with a 33 subscript, and a Ge with both a subscript and a superscript.) The only difference here is that one _33 hangs off Ge, and the other _33 hangs off Ge^44. Notice how they end up at different heights. Similiarly, a subscript hanging off another subscript goes deeper down, a superscript on a large bracket goes higher up than the subscript on "Ge" and so on. Helge Hafting
Re: Mathed sub/superscripts highlighting
> "Darren" == Darren Freeman <[EMAIL PROTECTED]> writes: Darren> On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: >> {Ge}^3 is different to >> >> Ge^3 and G^3 and e^3, which have all the same vertical height. Darren> So how does one enter {Ge}^3 in LyX other than ERT? Once you have your e^3 entered, your can go in the 'e' box and add the G. Not very intuitive, I know... JMarc
Re: Mathed sub/superscripts highlighting
Am 21.05.2007 um 16:48 schrieb Darren Freeman: On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: {Ge}^3 is different to Ge^3 and G^3 and e^3, which have all the same vertical height. So how does one enter {Ge}^3 in LyX other than ERT? Using \{ maybe? Stefan PGP.sig Description: Signierter Teil der Nachricht
Re: Mathed sub/superscripts highlighting
On Mon, 2007-05-21 at 16:16 +0200, Herbert Voss wrote: > {Ge}^3 is different to > > Ge^3 and G^3 and e^3, which have all the same vertical height. So how does one enter {Ge}^3 in LyX other than ERT? Have fun, Darren
Re: Mathed sub/superscripts highlighting
Jean-Marc Lasgouttes wrote: >> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > >>> As I was asking, does this really mean anything? > > Abdelrazak> I _don't_ know. But I guess that if the TeX source is > Abdelrazak> different, there should be a reason. > > The vertical alignment depends on the ascent/descent of the nucleus. I > guess that {Ge}^33 is not the same as Ge^33. {Ge}^3 is different to Ge^3 and G^3 and e^3, which have all the same vertical height. Herbert
Re: Mathed sub/superscripts highlighting
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> As I was asking, does this really mean anything? Abdelrazak> I _don't_ know. But I guess that if the TeX source is Abdelrazak> different, there should be a reason. The vertical alignment depends on the ascent/descent of the nucleus. I guess that {Ge}^33 is not the same as Ge^33. JMarc
Re: Mathed sub/superscripts highlighting
Am 21.05.2007 um 15:12 schrieb Darren Freeman: On Mon, 2007-05-21 at 14:52 +0200, Abdelrazak Younes wrote: Darren Freeman wrote: Is this sensible? Does it have meaning at the LaTeX level but perhaps shouldn't be shown to the user? (Such as LyX automatically determining who to hang each subscript off at output time instead). There is a difference and View->Source will tell you what this difference is: Ge_{33} Ge{}_{33} In the first case, only 'e' is within the four corner marks. In the second case, a little dot will tell you that an empty symbol is used. As I was asking, does this really mean anything? I tried this in a fresh document and can't see a difference in the generated output. Does TeX consider Ge_{33} to be a Ge with a subscript, or a G followed by an e with a subscript, or treat both as equivalent? \sum_i and \sum {}_i are different for sure. With a letter like e it might be invisible though. Stefan PGP.sig Description: Signierter Teil der Nachricht
Re: Mathed sub/superscripts highlighting
Darren Freeman wrote: On Mon, 2007-05-21 at 14:52 +0200, Abdelrazak Younes wrote: Darren Freeman wrote: Is this sensible? Does it have meaning at the LaTeX level but perhaps shouldn't be shown to the user? (Such as LyX automatically determining who to hang each subscript off at output time instead). There is a difference and View->Source will tell you what this difference is: Ge_{33} Ge{}_{33} In the first case, only 'e' is within the four corner marks. In the second case, a little dot will tell you that an empty symbol is used. As I was asking, does this really mean anything? I _don't_ know. But I guess that if the TeX source is different, there should be a reason. Abdel.
Re: Mathed sub/superscripts highlighting
On Mon, 2007-05-21 at 14:52 +0200, Abdelrazak Younes wrote: > Darren Freeman wrote: > > Is this sensible? Does it have meaning at the LaTeX level but perhaps > > shouldn't be shown to the user? (Such as LyX automatically determining > > who to hang each subscript off at output time instead). > > There is a difference and View->Source will tell you what this > difference is: > > Ge_{33} > Ge{}_{33} > > In the first case, only 'e' is within the four corner marks. In the > second case, a little dot will tell you that an empty symbol is used. As I was asking, does this really mean anything? I tried this in a fresh document and can't see a difference in the generated output. Does TeX consider Ge_{33} to be a Ge with a subscript, or a G followed by an e with a subscript, or treat both as equivalent? Have fun, Darren
Re: Mathed sub/superscripts highlighting
Darren Freeman wrote: Hi all, Let's say I enter something in a math insert other than an equation (as I often do). Pick "Ge33As12Se55" as an example, a chemical formula. (numbers are subscripts) When I'm editing a subscript, the four little corner marks that highlight the subscript will include the lower-case letter of the preceding element. Sure this makes sense if that were a variable carrying the subscript, but in this case it doesn't. Shouldn't the highlighting on the subscript just surround the subscript itself? Same for superscripts. Is there any meaning to the way it is grouped at the moment? I see it is possible to actually delete the lowercase letter and end up with a subscript hanging on its own, you can then add another letter into the subscript selection and have the subscript hang off that one. Is this sensible? Does it have meaning at the LaTeX level but perhaps shouldn't be shown to the user? (Such as LyX automatically determining who to hang each subscript off at output time instead). There is a difference and View->Source will tell you what this difference is: Ge_{33} Ge{}_{33} In the first case, only 'e' is within the four corner marks. In the second case, a little dot will tell you that an empty symbol is used. Abdel.
Mathed sub/superscripts highlighting
Hi all, Let's say I enter something in a math insert other than an equation (as I often do). Pick "Ge33As12Se55" as an example, a chemical formula. (numbers are subscripts) When I'm editing a subscript, the four little corner marks that highlight the subscript will include the lower-case letter of the preceding element. Sure this makes sense if that were a variable carrying the subscript, but in this case it doesn't. Shouldn't the highlighting on the subscript just surround the subscript itself? Same for superscripts. Is there any meaning to the way it is grouped at the moment? I see it is possible to actually delete the lowercase letter and end up with a subscript hanging on its own, you can then add another letter into the subscript selection and have the subscript hang off that one. Is this sensible? Does it have meaning at the LaTeX level but perhaps shouldn't be shown to the user? (Such as LyX automatically determining who to hang each subscript off at output time instead). Have fun, Darren