Why isn’t there a good way of doing symbolic math on a computer?
I want to brush up on my probability theory. I hate using a pen and paper, I lose them, they get damaged, and my handwriting is slow and messy.
In my mind I can envisage a simple symbolic math editor with keyboard shortcuts for common symbols, that would allow you to edit nice, neat latex style equations, as easily as I can edit text. Markdown would be acceptable as long as I can see the equation in it’s pretty form next to it. This doesn’t seem to exist. Python based symbolic math systems, like ‘sagemath’, are hopelessly clunky. Mathematica, although I can’t afford it, doesn’t seem to be what I want either. I want to be able to write math fast, to aid my thinking while proving theorems and doing problems from a textbook, not have the computer do the thinking for me. Latex equation editors I’ve seen are all similarly unwieldy—waiting 10 seconds for it to build the pdf document is totally disruptive to my thought process.
Why isn’t this a solved problem? Is it just that nobody does this kind of thing on a computer? Do I have to overcome my hatred of dead tree media and buy a pencil sharpener?
Also can someone please write a good modern programming language for typesetting? With all due respect to Dr. Knuth, tex is awful.
TeX as a language is awful, but what it can do is wonderful. And of course everyone uses LaTeX (TeX made usable by Lamport), or at least I do, so I see little of the TeX language itself. There was nothing like it when Knuth created it, and almost forty years on, there is still nothing like it. As far as I know, the only other typesetting language that has gained even a niche is the hideous SGML, in comparison to which TeX is a thing of superlative elegance and beauty. TeX has a specialised sublanguage for mathematics, both usable for input (so far as linear text can be) and generating high-quality output, so it became the standard for document preparation in the mathematically based sciences. It’s still inferior to human typesetting, but that’s only available for final printer’s copy. What you had to do back then, well, trip down memory lane omitted for brevity.
To do better than TeX, at this point, needs a lot more than coming up with a better language to think about typesetting with. It will have to replicate the TeX ecosystem, provide two-way conversion between it and TeX, and have a visual interface. Visual interfaces for programming languages are really hard, and they generally don’t get developed beyond demos that wow audiences and then go nowhere.
And it has to be done by one person, because a committee will just create a bloated, Turing-complete mess.
Which is why it hasn’t happened. It needs someone with an expert passion for programming, technical typesetting, design, and languages considered as a medium of thought. Knuth, Jony Ive, and Dijkstra all in one. But anyone like that would have bigger things to do with their talents.
Yes, I understand all that. It is hard to move away from shitty languages once they gained market share.
But latex, while improving on many things compared to base tex is hobbled by tex as well (for example, why do I need to recompile to resolve references, haven’t we invented multipass compilation like half a century ago?) I am happy to double down on “(La)tex is a shitty language.” It’s very useful of course, but the state of typesetting today is sort of like if everyone programmed in Cobol for some reason.
I tend to use TeXmacs for this. It’s a WYSIWYG document editor; you can enter mathematics using (La)TeX syntax, but there are also menus and keyboard shortcuts. It’s free in both senses. No symbolic-manipulation capabilities of its own, but it has some ability to connect to other things that do; I haven’t tried those out.
Mathematica isn’t that far from what you want, I think, and it has the advantage of being able to do a lot of the symbolic manipulation for you. But, as you say, it’s really expensive—though if you haven’t checked out the home and (if applicable) student editions, you should do so; they’re much cheaper. Anyway, the fact that to me it sounds close to what you want makes me suspect that I’m missing or misunderstanding some of your requirements; if you could clarify how it doesn’t meet your needs it may help with suggesting other options.
Excellent! I will mention that I have occasionally had it crash on me (this was in the past, probably an older version of the software, so take it with a grain of salt—but you might want to be slightly more paranoid about saving your work regularly than you would be with, say, a simple text editor).
Been using it for an hour now,and yes, it’s crashed on me once, but no more than half the other programs I use. Already seeing the benefits of it when I spent half an hour doing something, realised there was a mistake at the start, and could then just find/replace stuff instead of scrunching the paper up into a ball and cursing Pierre Laplace. Also I don’t have to deal with the aesthetic trauma of viewing my own handwriting. Outstanding.
Would any of these be useful? That’s just a list I found by Googling /MathJax editor/. I’m not familiar with any of them. MathJax is a Javascript library for rendering mathematics on web pages. The mathematics is written in MathML.
I use pen and paper, and switch to LaTeX when I have something I need to preserve. It’s not very satisfactory, but since anything I might want to publish will have to go through LaTeX at some point, there’s no point in using any other format, unless it had a LaTeX exporter. And pen and paper is far more instant than any method I can imagine of poking mathematics in through a keyboard.
pen and paper is far more instant than any method I can imagine of poking mathematics in through a keyboard.
Yeah… I think I just have to bite this bullet. If you do math professionally and the people you know work onto pen and paper, then that’s the answer.
It’s just.… I feel like I can imagine a system that would be better than pen and paper. There’s so much tedious repetition of symbols when I do algebra on paper, and inevitably while simplifying some big integral I write something wrong, and have to scratch it out, and the whole thing becomes a confusing mess. writing my verbal thoughts down with a keyboard is just as quick and intuitive as a pen and paper. There must be a better way...
Yes, that would also be great, but I a) I can’t afford such a tablet, and b) I strongly suspect that the OCR would be inaccurate enough that I’d end up wishing for a keyboard anyway. Hell accurate voice recognition would be better, but I’m still waiting for that to happen...
I made with my Kindle the experience that it’s better than regular paper books while reading books on a smartphone isn’t. Currently most mathmaticians use paper. If someone would design a mathematical editor that’s better than paper, I think that could be a huge commercial success.
I don’t know either of a program that solves your problem. But writing a transcompiler from mathematical markdown (mathdown?) to Latex should not be that difficult in F#. It should be a fun excercise, if you write the formal grammar.
Yeah I can imagine doing that all right—I wouldn’t actually mind writing in latex even, the problem is the lag. Building a latex document after each change takes time. If the latex was being built in a window next to it, in real time, (say a 1 second lag would probably be fine) there’d be no problem. I’m not looking to publish the math, I just want a thought-aid.
Why isn’t there a good way of doing symbolic math on a computer?
I want to brush up on my probability theory. I hate using a pen and paper, I lose them, they get damaged, and my handwriting is slow and messy.
In my mind I can envisage a simple symbolic math editor with keyboard shortcuts for common symbols, that would allow you to edit nice, neat latex style equations, as easily as I can edit text. Markdown would be acceptable as long as I can see the equation in it’s pretty form next to it. This doesn’t seem to exist. Python based symbolic math systems, like ‘sagemath’, are hopelessly clunky. Mathematica, although I can’t afford it, doesn’t seem to be what I want either. I want to be able to write math fast, to aid my thinking while proving theorems and doing problems from a textbook, not have the computer do the thinking for me. Latex equation editors I’ve seen are all similarly unwieldy—waiting 10 seconds for it to build the pdf document is totally disruptive to my thought process.
Why isn’t this a solved problem? Is it just that nobody does this kind of thing on a computer? Do I have to overcome my hatred of dead tree media and buy a pencil sharpener?
What would be really nice is tablet software that can translate handwritten math into latex, and compile that into pdf.
By the way, what I think you want is not “doing symbolic math on a computer,” but “having a good input method for equations.”
edit: Also can someone please write a good modern programming language for typesetting? With all due respect to Dr. Knuth, tex is awful.
TeX as a language is awful, but what it can do is wonderful. And of course everyone uses LaTeX (TeX made usable by Lamport), or at least I do, so I see little of the TeX language itself. There was nothing like it when Knuth created it, and almost forty years on, there is still nothing like it. As far as I know, the only other typesetting language that has gained even a niche is the hideous SGML, in comparison to which TeX is a thing of superlative elegance and beauty. TeX has a specialised sublanguage for mathematics, both usable for input (so far as linear text can be) and generating high-quality output, so it became the standard for document preparation in the mathematically based sciences. It’s still inferior to human typesetting, but that’s only available for final printer’s copy. What you had to do back then, well, trip down memory lane omitted for brevity.
To do better than TeX, at this point, needs a lot more than coming up with a better language to think about typesetting with. It will have to replicate the TeX ecosystem, provide two-way conversion between it and TeX, and have a visual interface. Visual interfaces for programming languages are really hard, and they generally don’t get developed beyond demos that wow audiences and then go nowhere.
And it has to be done by one person, because a committee will just create a bloated, Turing-complete mess.
Which is why it hasn’t happened. It needs someone with an expert passion for programming, technical typesetting, design, and languages considered as a medium of thought. Knuth, Jony Ive, and Dijkstra all in one. But anyone like that would have bigger things to do with their talents.
Yes, I understand all that. It is hard to move away from shitty languages once they gained market share.
But latex, while improving on many things compared to base tex is hobbled by tex as well (for example, why do I need to recompile to resolve references, haven’t we invented multipass compilation like half a century ago?) I am happy to double down on “(La)tex is a shitty language.” It’s very useful of course, but the state of typesetting today is sort of like if everyone programmed in Cobol for some reason.
That depends on what you consider to be big. It’s not big by the standards of academia. But it might be big by the standards of real world impact.
I tend to use TeXmacs for this. It’s a WYSIWYG document editor; you can enter mathematics using (La)TeX syntax, but there are also menus and keyboard shortcuts. It’s free in both senses. No symbolic-manipulation capabilities of its own, but it has some ability to connect to other things that do; I haven’t tried those out.
Mathematica isn’t that far from what you want, I think, and it has the advantage of being able to do a lot of the symbolic manipulation for you. But, as you say, it’s really expensive—though if you haven’t checked out the home and (if applicable) student editions, you should do so; they’re much cheaper. Anyway, the fact that to me it sounds close to what you want makes me suspect that I’m missing or misunderstanding some of your requirements; if you could clarify how it doesn’t meet your needs it may help with suggesting other options.
YES. Thank you so much. Texmacs seems to be exactly what I wanted.
Excellent! I will mention that I have occasionally had it crash on me (this was in the past, probably an older version of the software, so take it with a grain of salt—but you might want to be slightly more paranoid about saving your work regularly than you would be with, say, a simple text editor).
Been using it for an hour now,and yes, it’s crashed on me once, but no more than half the other programs I use. Already seeing the benefits of it when I spent half an hour doing something, realised there was a mistake at the start, and could then just find/replace stuff instead of scrunching the paper up into a ball and cursing Pierre Laplace. Also I don’t have to deal with the aesthetic trauma of viewing my own handwriting. Outstanding.
Would any of these be useful? That’s just a list I found by Googling /MathJax editor/. I’m not familiar with any of them. MathJax is a Javascript library for rendering mathematics on web pages. The mathematics is written in MathML.
I use pen and paper, and switch to LaTeX when I have something I need to preserve. It’s not very satisfactory, but since anything I might want to publish will have to go through LaTeX at some point, there’s no point in using any other format, unless it had a LaTeX exporter. And pen and paper is far more instant than any method I can imagine of poking mathematics in through a keyboard.
Yeah… I think I just have to bite this bullet. If you do math professionally and the people you know work onto pen and paper, then that’s the answer.
It’s just.… I feel like I can imagine a system that would be better than pen and paper. There’s so much tedious repetition of symbols when I do algebra on paper, and inevitably while simplifying some big integral I write something wrong, and have to scratch it out, and the whole thing becomes a confusing mess. writing my verbal thoughts down with a keyboard is just as quick and intuitive as a pen and paper. There must be a better way...
Would it make sense to write on a tablet and have the computer do OCR? (Hypothetical system.)
Yes, that would also be great, but I a) I can’t afford such a tablet, and b) I strongly suspect that the OCR would be inaccurate enough that I’d end up wishing for a keyboard anyway. Hell accurate voice recognition would be better, but I’m still waiting for that to happen...
Now that I think about it, OCR would be much harder for math than for text.
Kinda-toy example
That means there’s a possible startup.
Ha, in theory, but it looks like the guys at TeXmacs are already selling the product for free, so no dice...
I made with my Kindle the experience that it’s better than regular paper books while reading books on a smartphone isn’t. Currently most mathmaticians use paper. If someone would design a mathematical editor that’s better than paper, I think that could be a huge commercial success.
I don’t know either of a program that solves your problem. But writing a transcompiler from mathematical markdown (mathdown?) to Latex should not be that difficult in F#. It should be a fun excercise, if you write the formal grammar.
Yeah I can imagine doing that all right—I wouldn’t actually mind writing in latex even, the problem is the lag. Building a latex document after each change takes time. If the latex was being built in a window next to it, in real time, (say a 1 second lag would probably be fine) there’d be no problem. I’m not looking to publish the math, I just want a thought-aid.
I believe that there is an editor called lyx that lets you do this.