11/07/2017 Development Update: LaTeX!

post by habryka (habryka4) · 2017-11-07T11:06:58.012Z · LW · GW · 19 comments

Contents

19 comments

19 comments

Comments sorted by top scores.

comment by AABoyles · 2017-11-07T21:41:50.392Z · LW(p) · GW(p)

Excellent, Thank you!

comment by habryka (habryka4) · 2017-11-07T11:07:08.175Z · LW(p) · GW(p)

comment by gjm · 2017-11-08T14:11:44.842Z · LW(p) · GW(p)

The LaTeX editing box does some sort of autocompletion. Unfortunately it's incredibly annoying because it (1) usually doesn't autocomplete to what I am actually trying to enter, (2) it is hard to predict, and (3) it seems inconsistent as to whether if I keep typing the thing it's autocompleted to it will (a) just move my cursor forward through the completion or (b) add extra stuff after it. So, e.g., if I type $\delta then I end up with what I wanted (except that for some reason the autocompleter sometimes wants to give me \Delta rather than \delta) but if I type $\epsilon then I get \epsilonsilon.

In at least some cases where the completion is ambiguous (e.g., \delta versus \Delta -- of course it's ambiguous only because the autocompleter is choosing to ignore case) it looks as if the autocompleter is giving me whichever completion I have used most recently, so if I change \Delta to \delta then the next time I enter a formula I'll get \delta instead. This seems like a well-intentioned feature, and maaaaybe it will turn out to work well, but it seems to me like the main effect is to make the system less predictable and therefore slower and more unpleasant to use. (I don't want to have to ask myself every time I type a character "has this thing just changed what I typed to something else, and if so is it what I want or not?". I want to let my fingers enter LaTeX on autopilot and have the right thing happen. Or, if what they have to do is to enter some weird abbreviated version of LaTeX defined by the autocompleter, I can learn to do that. But if the system is learning and adapting its behaviour, it stops me learning and adapting mine, and as long as its behaviour is often wrong (which I think is inevitable) this is not a net win.

Replies from: habryka4
comment by habryka (habryka4) · 2017-11-28T08:24:54.203Z · LW(p) · GW(p)

Yeah, I noticed this myself, and I am also not a huge fan of it. I am using an open-source LaTeX editor, and while the autocomplete is clearly well-intentioned, it’s too agressive in a bunch of situations.

I might try to turn it off completely, or maybe find some way to make it less aggressive.

comment by gjm · 2017-11-07T14:43:03.708Z · LW(p) · GW(p)

! I had a weird glitch when I first tried to use this -- my comment box got excitingly corrupted, I couldn't delete things, etc. -- but that seems to have corrected itself now.

Replies from: gjm
comment by gjm · 2017-11-07T14:44:00.407Z · LW(p) · GW(p)

... Except that now my comment appears to begin "refresh to render LaTeX!" which I promise is not what I wrote, and refreshing does not in fact appear to render LaTeX :-).

Replies from: habryka4, habryka4
comment by habryka (habryka4) · 2017-11-07T19:22:51.537Z · LW(p) · GW(p)

Huh, your comment rendered fine when I just clicked Edit and submit again. Which means it’s probably a permission problem and only admins can right now use LaTeX (I guess one could frame it as the LW version of Orwellian newspeak, where we constrict the masses to a simpler form of communication, while the elites get access to the whole beauty of mathematics :P)

Replies from: AABoyles
comment by AABoyles · 2017-11-07T21:45:56.405Z · LW(p) · GW(p)

The fronted plugin worked when I submitted my comment, but I'm getting the "refresh to render LaTex" message as well. Neither refreshes nor fresh browser sessions seem to yield latex.

Replies from: habryka4
comment by habryka (habryka4) · 2017-11-07T22:08:51.529Z · LW(p) · GW(p)

Yep, it does appear to be a permission problem. This should be fixed in the next few hours, and I should get more used to testing my stuff with non-admin accounts.

Replies from: gjm
comment by gjm · 2017-11-07T22:13:19.187Z · LW(p) · GW(p)

I am manfully resisting the temptation to write a comment that actually says "refresh to render LaTeX!" just to mess with you.

Replies from: Habryka
comment by Habryka · 2017-11-07T23:06:15.880Z · LW(p) · GW(p)

(i.e. There should be no further issues with LaTeX not rendering)

comment by habryka (habryka4) · 2017-11-07T19:18:57.878Z · LW(p) · GW(p)

Ah, I think I am not cleaning up the LaTeX section of a comment properly when you delete it. Or maybe you used some kind of LaTeX that broke my renderer. I will improve the feedback mechanism here, so that if it fails to render the LaTeX it sets the content to the error, as opposed to just encouraging you again and again to reload the page :P

comment by bwest · 2017-11-28T00:20:14.308Z · LW(p) · GW(p)

Does latex work in posts? I wrote up a draft post and I'm pretty sure that I used the correct syntax, but I don't see the formulas being formatted.

Maybe it does not work unless the post is fully submitted instead of just a draft? I didn't want to submit the post just to test that out though.

Replies from: Benito, Benito
comment by Ben Pace (Benito) · 2017-11-28T00:49:46.514Z · LW(p) · GW(p)

I just tried to make you a new draft with the LaTex fixed. Unfortunately (a) ~20% of it didn't quite work, and (b) now that it's saved it has the same 'refresh to render LaTex' error people in other comments had.

Alas, it looked so delightful in my editor! The dev team should get to this in the next week (a few frontpage changes are top priority right now, but if it's a quick fix we'll jump to it).

P.S. As a rule, once you enter something in our editor and then hit spacebar, you will see the final copy - it's very much a 'What you see is what you get', and LaTex should look like LaTex as you edit.

Replies from: habryka4
comment by habryka (habryka4) · 2017-11-28T08:23:12.119Z · LW(p) · GW(p)

There was a LaTeX error that was highlighted in bright yellow in the post (it said “wrong instance of ’&’ “). Right now the way we render LaTeX, any LaTeX error will cause all LaTeX in a comment to fail to render, which I think I can improve, but might be a bit of work.

The draft now has proper formatting and should work. Let me know if there are any problems.

Replies from: bwest
comment by bwest · 2017-11-28T15:11:43.511Z · LW(p) · GW(p)

Thanks Oliver and Ben!

I believe it is working now; I posted it here: https://www.lesserwrong.com/posts/tW37uofzXd7ngW8Np/big-advance-in-infinite-ethics

comment by Ben Pace (Benito) · 2017-11-28T00:22:00.757Z · LW(p) · GW(p)

Pretty sure it should work regardless of draft-nature. Oliver should be awake in ~9 hours to reply.

comment by Chris_Leong · 2017-11-08T06:16:26.029Z · LW(p) · GW(p)

Out of curiosity, was Latex supported on the old Less Wrong?

Replies from: habryka4