thetensor-space / thetensor-space.github.io

Tools to Tame the Tensor
https://TheTensor.Space
MIT License
3 stars 4 forks source link

inline mode as $a^2$ instead of \$$a^2$$ #49

Closed algeboy closed 4 years ago

algeboy commented 4 years ago

If it is possible to use $a^2$ for inline latex that would match how it is done in other systems. \$$ I am guessing was a creation not are requirement but if I am wrong lets explore the best one to use because it will be difficult to edit pages later so best to get this right here.

Alex-Cannon commented 4 years ago

@algeboy after a bit of research, this looks like it'd be possible.

However, this could create issues when you want to use the "$" character by itself. For example, if you had an event:

For entry to our event the cost will be:

$ 5.99
$ 3.99
or 
$ 12.99

Some of this text would be interpreted as KaTex, throw an error because it's invalid Tex, then not render on the page. Do you see how this could be confusing? I'd recommend keeping it the way it is.

algeboy commented 4 years ago

Thanks, but in this case my request is the right way to go. This is DSL (Domain Specific Language) and just like markdown uses # and other characters in special ways, or how < and & have trouble in HTML. The use of $a$ for inline latex is now a decades old tradition. TeX is the oldest language on this site, by a long shot. KaTeX is new but it just a front end for the web. LaTeX has been around making most PDFs you find on the internet for 42 years. Would you believe it is 5 years older than C++? The point is people in this website use TeX and barely ever need the dollar sign. If they need currency for story problems or registration to conference, then they can use euros, write USD or whatever they like as a substitute. In regular latex \$ escapes to the dollar sign, but that seems unnecessary unless it is easy.

So this is just the way it is done, right or wrong. Some websites like WordPress use other symbols concerned that most of their clients want $ more than LaTeX. For us it is the opposite. We never need dollars we always need TeX. That is the main reason I left those products to build my own -- well to have you do it. It slows you down and you cant cut and paste latex from other places if it uses querky non-standard symbols. So we will make do with missing on dollars I think. Thanks for checking with me.

Alex-Cannon commented 4 years ago

Okay, I understand what you're saying. I'll start work on this.