Freddie Witherden wrote: > Hi all, > > I have been toying around with a couple of ideas which might be worth > investigating for the LaTeX printer. First off, different bracket > styles depending on the nesting level. So it might go: > { [ ( ( ) ) ] }; exactly how to do this I am unsure. It depends on how > easy it is to maintain the nesting level. Ideally {} and [] should > only be used for adjacent brackets, for example: > > (x*(y+3)+4)^3 doesn't really require nested brackets, but: > > [a*exp(z*I)] does. > > This is the kind of thing that I might be tempted towards the evils of > regular expressions to achieve. Hopefully, however there is a much > more elegant solution. > > Secondly, constant expanding. If one has a fraction <x>/k where k is a > constant it is often nice to pull the constant out front when > printing, giving 1/k * <x> where <x> is an arbitrary expression. This, > again sacrifices horizontal space for better readability (a larger > font size can be used for <x>). I am yet to look into how hard this > would be to achieve, however. > > Finally, an option to use exp() as opposed to {e}^{<x>}. This is most > useful when outputting the solutions to differential equations, which > often raise e to quite a large fraction/expression. Using exp() leads > to better readability (due to the larger font size and greater > spacing). I propose the following: we have a configuration option to > choose between {e}^{x}, exp(x) and auto, where auto uses heuristics to > decide (as soon as you get to needing brackets or fractions exp() is > often nicer). > > Be interested to know what you all think -- and if you have any > implementation hints. > > Regards, Freddie. > When you say configuration option I assume you mean a global switch so you can turn the option off and on for different parts of the program.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---