Re: Using LyX for calculations (was Rendering of LyX's math screen fonts.)
On 9/11/2013 9:03 a.m., Georg Baum wrote: Jerry wrote: I know that LyX has hooks for some computer algebra systems (Mathematica, Maple, Maxima) and Octave. I have played with these a little (Octave and Mathematica) and it seems potentially useful but possibly not fully developed in LyX. It is only very basic (and therefore not much advertised). I'm curious to know how you and others have used this corner of LyX. I did not use this interface. I did manual calculations involving bigger equations that I would otherwise have done on paper. I used LyX only because I could easily incorporate corrections (and print the result again for final proof reading). Georg Slightly off topic, but the LaTeX package calcul83.sty, lyx module and explanatory document at http://marc.info/?l=lyx-users&m=138122526923848&w=2 allow numerical evaluation of formulae in LyX's math editor (also some extra facilities like iterating functions and creating tables of values) using instant preview, without having to hunt through the menus to activate a CAS. In fact the expl language of LaTeX3 seems to me sufficiently usable and powerful enough to create a CAS in TeX. Reinventing the wheel of course but it would be kind of nice to have such things evaluate under instant preview. Andrew
Re: Using LyX for calculations (was Rendering of LyX's math screen fonts.)
Jerry wrote: > I know that LyX has hooks for some computer algebra systems (Mathematica, > Maple, Maxima) and Octave. I have played with these a little (Octave and > Mathematica) and it seems potentially useful but possibly not fully > developed in LyX. It is only very basic (and therefore not much advertised). > I'm curious to know how you and others have used this corner of LyX. I did not use this interface. I did manual calculations involving bigger equations that I would otherwise have done on paper. I used LyX only because I could easily incorporate corrections (and print the result again for final proof reading). Georg
Re: Using LyX for calculations (was Rendering of LyX's math screen fonts.)
I only tried them out for very simple cases as well. Begging the pardon of LyX's developers, you'll find this resource much more developed in texmacs, if you're not aware of it: http://www.texmacs.org/tmweb/home/welcome.en.html There, you'll find interfaces for several different CAS, such as those you mentioned. On Thursday 07 November 2013 15:02:39 Jerry wrote: > I know that LyX has hooks for some computer algebra systems (Mathematica, > Maple, Maxima) and Octave. I have played with these a little (Octave and > Mathematica) and it seems potentially useful but possibly not fully developed > in LyX. > > I'm curious to know how you and others have used this corner of LyX. > > Jerry > > On Nov 7, 2013, at 1:30 PM, Georg Baum wrote: > > > PS: It is funny that you also use the math editor for calculations. I used > > to do that a lot for my thesis, but always thought I was the only one. > -- Rudi Gaelzer Institute of Physics Federal University of Rio Grande do Sul BRAZIL Registered linux user # 153741
Re: Rendering of LyX's math screen fonts.
On Thursday 07 November 2013 21:30:14 Georg Baum wrote: > Rudi Gaelzer wrote: > > > So I ask you LyXperts: is it possible to configure the math mode editor so > > that it uses also mathabx and other different math fonts? The roadmap to > > LyX 2.1 mentions enhanced support for math font selection (OpenType fonts) > > and support ofr cropped PDF/EPS. However, AFAIU, these enhancements will > > have an effect on IP and on the exported document. Seems to me that the > > math editor will still use the same screen fonts. Or am I wrong? > > You are right, the mentioned features do not affect the look of the math > editor. However, there are some new symbols in 2.1, mainly from stmaryrd.sty > and mathtools.sty. To some extent you can also add some on your own: The > screen appearance of math symbols is defined in the file lib/symbols, which > contains some very basic documentation for 2.1. > Basically, there are three kinds of symbol definitions in that file: > > 1) symbols supported by special insets (like the decorations) > 2) symbols supported by fonts (like the ones from fontmath.ltx) > 3) symbols without any builtin support > > Adding symbols of type 1) and 2) requires some programming in LyX, and 2) > requires also a true type font containing the symbols in a certain order, > but symbols of type 3) can easily be added by users: All lines starting with > \def are of this kind. For example, you could define \partialslash like > this: > > \def\partialslash{\partial\kern-12mu/} > > The slash is a bit too short, but maybe there is a longer one already > supported by mathed, which you could use instead. Although this looks like a > TeX macro definition, it is not used for the output, only for display in > LyX. There is basically no documentation how exactly this \def works, you > have to use trial and error. You could also make the mathabx package load > automatically if this symbol is used (works only for packages in the > compiled in feature list of LyX, and mathabx is in there): > > \def\partialslash{\partial\kern-12mu/} mathabx > > I strongly advise against doing so, because this makes your LyX document > depend on your personal installation, and it would not typeset on vanilla > installations. This feature is rather for symbols distributed with the > official symbols file. > > Finally, if you want some symbols to appear officially in LyX, you could add > them to bug , but please note that font changing packages like txfonts > will not be used. Thanks a lot for the tips. I'll try them out as soon as I have some time. > > > Georg > > > PS: It is funny that you also use the math editor for calculations. I used > to do that a lot for my thesis, but always thought I was the only one. I guess we're not the only ones. I even know some guys that do calculations directly in latex... boy, that should be fun... > > > > -- Rudi Gaelzer Institute of Physics Federal University of Rio Grande do Sul BRAZIL Registered linux user # 153741
Using LyX for calculations (was Rendering of LyX's math screen fonts.)
I know that LyX has hooks for some computer algebra systems (Mathematica, Maple, Maxima) and Octave. I have played with these a little (Octave and Mathematica) and it seems potentially useful but possibly not fully developed in LyX. I'm curious to know how you and others have used this corner of LyX. Jerry On Nov 7, 2013, at 1:30 PM, Georg Baum wrote: > PS: It is funny that you also use the math editor for calculations. I used > to do that a lot for my thesis, but always thought I was the only one.
Re: Rendering of LyX's math screen fonts.
Rudi Gaelzer wrote: > So I ask you LyXperts: is it possible to configure the math mode editor so > that it uses also mathabx and other different math fonts? The roadmap to > LyX 2.1 mentions enhanced support for math font selection (OpenType fonts) > and support ofr cropped PDF/EPS. However, AFAIU, these enhancements will > have an effect on IP and on the exported document. Seems to me that the > math editor will still use the same screen fonts. Or am I wrong? You are right, the mentioned features do not affect the look of the math editor. However, there are some new symbols in 2.1, mainly from stmaryrd.sty and mathtools.sty. To some extent you can also add some on your own: The screen appearance of math symbols is defined in the file lib/symbols, which contains some very basic documentation for 2.1. Basically, there are three kinds of symbol definitions in that file: 1) symbols supported by special insets (like the decorations) 2) symbols supported by fonts (like the ones from fontmath.ltx) 3) symbols without any builtin support Adding symbols of type 1) and 2) requires some programming in LyX, and 2) requires also a true type font containing the symbols in a certain order, but symbols of type 3) can easily be added by users: All lines starting with \def are of this kind. For example, you could define \partialslash like this: \def\partialslash{\partial\kern-12mu/} The slash is a bit too short, but maybe there is a longer one already supported by mathed, which you could use instead. Although this looks like a TeX macro definition, it is not used for the output, only for display in LyX. There is basically no documentation how exactly this \def works, you have to use trial and error. You could also make the mathabx package load automatically if this symbol is used (works only for packages in the compiled in feature list of LyX, and mathabx is in there): \def\partialslash{\partial\kern-12mu/} mathabx I strongly advise against doing so, because this makes your LyX document depend on your personal installation, and it would not typeset on vanilla installations. This feature is rather for symbols distributed with the official symbols file. Finally, if you want some symbols to appear officially in LyX, you could add them to bug , but please note that font changing packages like txfonts will not be used. Georg PS: It is funny that you also use the math editor for calculations. I used to do that a lot for my thesis, but always thought I was the only one.
Rendering of LyX's math screen fonts.
This is a recurrent problem for me, and I think it's for other as well. Certainly someone has already discussed this issue in this list (or in the devel list), but every time I take some time to browse through them, I cannot find it, or perhaps I'm not sufficiently knowledgeable on the internal working of LyX to really identify the subject... Anyway, whenever I'm editing a mathematical equation and have a need for a symbol not included in the standard latex and AMStex sets, I have to look for it elsewhere. A good place to look for new symbols is the 'The Comprehensive LaTeX Symbol List' http://mirror.ctan.org/info/symbols/comprehensive/symbols-a4.pdf So, if I want the "\partialslash" symbol, I have to edit the preamble and insert "\usepackage{mathabx}". If I want the double square bracket delimiters "\ldbrack" and "\rdbrack", I have to \usepackage{txfonts}, and so forth. It works fine to generate the exported document in PDF or PS and also with Instant Preview. However, the math equation editor (or math mode) does not render non-AMS/latex symbols, but leaves them as ERT's. That's ok if you are creating a document with LyX, but for those of us that use LyX to make mathematical calculations as well, the rendition of all symbols goes a long way to facilitate the visualization of the mathematical expression. So I ask you LyXperts: is it possible to configure the math mode editor so that it uses also mathabx and other different math fonts? The roadmap to LyX 2.1 mentions enhanced support for math font selection (OpenType fonts) and support ofr cropped PDF/EPS. However, AFAIU, these enhancements will have an effect on IP and on the exported document. Seems to me that the math editor will still use the same screen fonts. Or am I wrong? -- Rudi Gaelzer Institute of Physics Federal University of Rio Grande do Sul BRAZIL Registered linux user # 153741