TyOverby / Pipe

Mozilla Public License 2.0
21 stars 1 forks source link

Handle Escape sequences #17

Open TyOverby opened 10 years ago

TyOverby commented 10 years ago

Right now there is no way to get a literal # sign in math mode because it thinks everything after the # is a comment. We need escape sequences for things. Basically for every symbol used in math mode.

To do this, maybe have a parser that just looks for the \ sign and pairs it up with whatever it is escaping. Then either during the parsing stage or during codegen, it could get escaped out in the actual LaTeX.

meyerkizner commented 10 years ago

I just thought I'd point out that there are two separate, but related issues related to this. As you describe, we need a way to have literal symbols like # appear in math mode; but also, we need to make sure that if we encounter a symbol like & that has semantic meaning in LaTeX but not in our language, that it's escaped in the final LaTeX as well.

TyOverby commented 10 years ago

Yes good point. Unless they actually want to use & as their aligner. Speaking of which, the new alignment method is pretty good. Basically it parses the align arg into an ast and then does an ast traversal on the actual equations looking for something to replace.

On Tue, Mar 4, 2014 at 3:47 AM, meyerkizner notifications@github.comwrote:

I just thought I'd point out that there are two separate, but related issues related to this. As you describe, we need a way to have literal symbols like # appear in math mode; but also, we need to make sure that if we encounter a symbol like & that has semantic meaning in LaTeX but not in our language, that it's escaped in the final LaTeX as well.

Reply to this email directly or view it on GitHubhttps://github.com/TyOverby/Pipe/issues/17#issuecomment-36616433 .

-Ty Overby :wq