News for hackers. Stuff that matters.
Re:Mathify – Simple Text Equation to LaTeX by ephimetheus on Sunday March 26, 2017 @12:53PM (#13961677)
I don't get it, why not just use LaTeX? The syntax is already almost the same anyway..
Re:Mathify – Simple Text Equation to LaTeX by umanwizard on Sunday March 26, 2017 @12:57PM (#13961695)
"$$x+\frac{32}{2}$$" is not "almost the same" as "x+32/2".
Re:Mathify – Simple Text Equation to LaTeX by IshKebab on Sunday March 26, 2017 @01:41PM (#13961942)
Using / instead of \frac is by far the biggest difference, so it is "almost the same".
Re:Mathify – Simple Text Equation to LaTeX by aaossa on Sunday March 26, 2017 @01:58PM (#13962068)
Just wanted to point out that this is not friendly for beginners. A beginner will be lost between a lot of "\frac"s and "{}"s (I don't know the name in English, sorry). Been there
Re:Mathify – Simple Text Equation to LaTeX by clishem on Sunday March 26, 2017 @02:29PM (#13962260)
The problem is that this is a really tiny subset of what you can write with LaTeX, even for high school students it won't be enough. I'd much rather use something like https://www.codecogs.com/latex/eqneditor.php as a beginner.
Re:Mathify – Simple Text Equation to LaTeX by OJFord on Tuesday March 28, 2017 @03:58PM (#13980109)
Yep - even 'min' is missing. `min_` becomes `m \in _`, seemingly no way to force it to work, `{min}` or `\min` don't.
Re:Mathify – Simple Text Equation to LaTeX by 18nleung on Sunday March 26, 2017 @02:00PM (#13962085)
{} are "brackets"/"curly brackets" :)
Re:Mathify – Simple Text Equation to LaTeX by umanwizard on Sunday March 26, 2017 @02:23PM (#13962217)
No, [ ] are brackets; { } are braces.

(Disambiguating with an adjective does make it ok to use either -- "Curly brackets" are still { }, and "square braces" are still [ ] )

Re:Mathify – Simple Text Equation to LaTeX by milesrout on Sunday March 26, 2017 @10:02PM (#13964588)
No, they aren't. () are brackets, [] are square brackets, {} are curly brackets. 'Brackets' always refers to () unless specifically you say 'square'.

Stop imposing your stupid American stuff on people.

Re:Mathify – Simple Text Equation to LaTeX by Y_Y on Sunday March 26, 2017 @11:00PM (#13964808)
I agree with your content, but not your tone. I'd like to add that one often hears "round brackets" as an unambiguous terms for the first category. And where's love for angle brackets <chevrons>?
Re:Mathify – Simple Text Equation to LaTeX by umanwizard on Sunday March 26, 2017 @11:48PM (#13965045)
There are substantially more Americans than people in any other English-speaking country, and, to top it off, we're on an American forum.

It's not "stupid" to assume the dialect we're using is American English. Why the aggressiveness?

Re:Mathify – Simple Text Equation to LaTeX by jsilence on Monday March 27, 2017 @01:54AM (#13965467)
Because the cultural ignorance you are showing is annoying. There are vastly more people speaking english in the world than there are US Americans. On top of that: Most of the Americans are speaking spanish and portuguese. America != US America for one.
Re:Mathify – Simple Text Equation to LaTeX by aaossa on Sunday March 26, 2017 @02:05PM (#13962121)
Thanks! :)
Re:Mathify – Simple Text Equation to LaTeX by milesrout on Sunday March 26, 2017 @10:02PM (#13964586)
No, they won't.
Re:Mathify – Simple Text Equation to LaTeX by lottin on Sunday March 26, 2017 @03:35PM (#13962690)
"x+32/2" and "x+\frac{32}{2}" do different things in LaTeX, but both are correct.
Re:Mathify – Simple Text Equation to LaTeX by contravariant on Sunday March 26, 2017 @07:56PM (#13964116)
To be fair, this solution replaces the "$$" with several 10s of kilobytes of javascript.
Re:Mathify – Simple Text Equation to LaTeX by godelski on Monday March 27, 2017 @01:20AM (#13965358)
That's what I was confused about. This is almost exactly LaTeX. The major difference is no "\". And it adds unneeded \left, \right, and just braces everywhere.

The biggest differences is in this example, I looked at all of them:

f'(x) = lim_{h -> 0} {f(x+h) - f(x)}/h

vs

f'(x) = \lim_{h\to 0}\frac{f(x+h) - f(x)}{h}

While the code it produces is way more than needed. See [1] for the crap it produces.

The key differences here are "\", "->" instead of "\to" (which \to makes more sense to me), and "/" instead of "\frac{}{}" (which I'll give to Mathify). But because LaTeX supports a lot more there is no question which one is actually easier.

[1] {f'{ \left( x \right) } = \lim _{{h \to 0}} \frac{{f{ \left( x+h \right) } - f{ \left( x \right) }}}{h}}

Re:Mathify – Simple Text Equation to LaTeX by wenqin123 on Sunday March 26, 2017 @12:58PM (#13961698)
I mainly made it for stuff like division where you have to type in \frac{}{} every time. So instead of typing \frac{x}{3} you can just type x/3 and get the same result.
Re:Mathify – Simple Text Equation to LaTeX by jmmcd on Sunday March 26, 2017 @01:48PM (#13961989)
I was surprised to learn just the other week that `\frac x3` will give what you want, in Latex.
Re:Mathify – Simple Text Equation to LaTeX by godelski on Monday March 27, 2017 @01:24AM (#13965373)
This works for a lot of stuff. If you are only giving one input it'll work. So things like "\sin x", "x^2" \frac12" work. Interestingly you need a space in the sin example but not in the others. But "x^12" is the same as "x^{1} 2". So be careful with the shortcut.
Re:Mathify – Simple Text Equation to LaTeX by gunnihinn on Monday March 27, 2017 @03:11AM (#13965727)
It's not surprising if you know how TeX lexes things, which you should never ever learn.
Re:Mathify – Simple Text Equation to LaTeX by marvy on Sunday March 26, 2017 @03:33PM (#13962682)
I remember being surprised when I first saw \frac12, and I was like "that works?". The response I got was "of course". In retrospect, I admit that's the right answer: once you get TeX well enough, it's obvious.
Re:Mathify – Simple Text Equation to LaTeX by stablemap on Sunday March 26, 2017 @01:20PM (#13961824)
Often I do want to output x/3; is there a way to do that here?
Re:Mathify – Simple Text Equation to LaTeX by wenqin123 on Sunday March 26, 2017 @02:37PM (#13962305)
Sorry I haven't thought of a good solution for that yet, but if you really want to write a / you can do: "x text{/} 3"
Re:Mathify – Simple Text Equation to LaTeX by wjn0 on Sunday March 26, 2017 @02:43PM (#13962340)
Maybe some simple quoting scheme for "literals"?
Re:Mathify – Simple Text Equation to LaTeX by bootload on Sunday March 26, 2017 @04:51PM (#13963214)
"why not just use LaTeX?"

Augment. Why not let the silicon do the grunt work of remembering latex and let the user get on with the job?