markdown cells now get confused about subscripts and italics

63 views
Skip to first unread message

Stefan van Zwam

unread,
Sep 29, 2016, 5:53:55 PM9/29/16
to sage-cloud
Small example:

%md
**Lemma 4. ** _There is an $n_0 > 0$ such that $a_n < 2^n$ for all $n > n_0$._

This worked fine a week ago, and I'd like it to work again soon, because we are relying on this to produce a technical report that is to accompany a paper, and we were basically ready for submission.

Since I'm very impatient, is there a way to run last week's SMC?

William Stein

unread,
Sep 29, 2016, 5:59:19 PM9/29/16
to sage-cloud, Harald Schilly
Not easily.

Harald, I think this was likely caused by your

https://github.com/sagemathinc/smc/pull/954/files

>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/6857ad7f-1239-4b88-b482-0c5d3bdb696a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William Stein

CEO, SageMath, Inc.

Harald Schilly

unread,
Sep 30, 2016, 3:37:24 AM9/30/16
to sage-cloud
Hello, I've made some tiny changes, which are necessary to fix some
other bad corner cases. In that case here, the markdown parser seems
to be no longer able to understand, that the first and last underscore
belongs together.

I'll see if I come up with a solution that avoids the bad examples and
still support this case here.

And well, the workaround is:

%md
**Lemma 4.** <i>There is an $n_0 > 0$ such that $a_n < 2^n$ for all $n
> n_0$.</i>

-- h

William Stein

unread,
Sep 30, 2016, 2:54:34 PM9/30/16
to sage-cloud
On Fri, Sep 30, 2016 at 12:36 AM, Harald Schilly
<harald....@gmail.com> wrote:
> Hello, I've made some tiny changes, which are necessary to fix some
> other bad corner cases. In that case here, the markdown parser seems

What Harald did looked good to me and I'm making it live now (should
be about 5-10 minutes -- refresh your browser).
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CAGG4CB5s5d2pQT0PGHcYok7p35Gc-Hphxak_5zWnvhAnEo06fQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



William Stein

unread,
Sep 30, 2016, 2:54:57 PM9/30/16
to sage-cloud
Sorry, with this fix, your original code should work fine.

Stefan van Zwam

unread,
Sep 30, 2016, 10:19:10 PM9/30/16
to sage-cloud
I hear from my student that everything is back to normal. Thanks for the quick fix!

--Stefan

Harald Schilly

unread,
Oct 1, 2016, 1:36:12 PM10/1/16
to sage-cloud
On Sat, Oct 1, 2016 at 4:19 AM, Stefan van Zwam <stefan...@gmail.com> wrote:
> I hear from my student that everything is back to normal. Thanks for the
> quick fix!

ok, good to know it works! this is not so easy, since several worlds
collide in a single syntax.

however, I'm aware that there are constructions similar to yours
reported that do not work. I blame it on the markdown parser itself,
and I assume that you aren't writing anything like that anyways: e.g.

foo _x `x_y` y_ baz

and the workaround is to wrap this into <i> ... </i> instead.

-- h

Stefan van Zwam

unread,
Oct 1, 2016, 6:31:46 PM10/1/16
to sage-cloud
Another issue or two:

1) Resizing the browser window on a moderately complex document will freeze the entire browser window for a number of seconds. This is worse on Chrome than in Safari, but happens with both (I'm on a Mac). You can hear the fan spin up, so there must be quite a bit of stuff going on behind the scenes. I used this sample document to verify:


The momentary freeze also happens when you click away the little "you're on a free server" warning bar, or (in Chrome) when you close the downloads bar at the bottom of the screen.

2) When I write

** Lemma A.1 ** _Let $A$ be the following matrix:
\[
\begin{bmatrix}
1 & 1 & 0\\
1 & 0 & 1\\
0 & 1 & 1
\end{bmatrix}.
\]

and my cursor is on the last line after the \], then hitting <enter> does nothing.

William Stein

unread,
Oct 1, 2016, 8:14:56 PM10/1/16
to sage-cloud
On Sat, Oct 1, 2016 at 3:31 PM, Stefan van Zwam <stefan...@gmail.com> wrote:
> Another issue or two:
>
> 1) Resizing the browser window on a moderately complex document will freeze
> the entire browser window for a number of seconds. This is worse on Chrome
> than in Safari, but happens with both (I'm on a Mac). You can hear the fan
> spin up, so there must be quite a bit of stuff going on behind the scenes. I
> used this sample document to verify:
>
> https://cloud.sagemath.com/projects/1959a137-a9da-445b-ad23-dae137b1c67e/files/2015-09-10-141729.sagews
>
> The momentary freeze also happens when you click away the little "you're on
> a free server" warning bar, or (in Chrome) when you close the downloads bar
> at the bottom of the screen.

This slowdown seems to be in the new code for cell input/output
folding and nested line numbers, so I'll try to make that faster...

>
> 2) When I write
>
> ** Lemma A.1 ** _Let $A$ be the following matrix:
> \[
> \begin{bmatrix}
> 1 & 1 & 0\\
> 1 & 0 & 1\\
> 0 & 1 & 1
> \end{bmatrix}.
> \]
>
> and my cursor is on the last line after the \], then hitting <enter> does
> nothing.

This is now fixed; it was
https://github.com/sagemathinc/smc/issues/199, which wasn't merged
into master and live yet, for some reason.

>
>
> On Saturday, October 1, 2016 at 12:36:12 PM UTC-5, Harald Schilly wrote:
>>
>> On Sat, Oct 1, 2016 at 4:19 AM, Stefan van Zwam <stefan...@gmail.com>
>> wrote:
>> > I hear from my student that everything is back to normal. Thanks for the
>> > quick fix!
>>
>> ok, good to know it works! this is not so easy, since several worlds
>> collide in a single syntax.
>>
>> however, I'm aware that there are constructions similar to yours
>> reported that do not work. I blame it on the markdown parser itself,
>> and I assume that you aren't writing anything like that anyways: e.g.
>>
>> foo _x `x_y` y_ baz
>>
>> and the workaround is to wrap this into <i> ... </i> instead.
>>
>> -- h
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/63df5afe-aaba-4be1-a72a-f224fcd84c0f%40googlegroups.com.

William Stein

unread,
Oct 1, 2016, 11:19:41 PM10/1/16
to sage-cloud
On Sat, Oct 1, 2016 at 5:14 PM, William Stein <wst...@sagemath.com> wrote:
> On Sat, Oct 1, 2016 at 3:31 PM, Stefan van Zwam <stefan...@gmail.com> wrote:
>> Another issue or two:
>>
>> 1) Resizing the browser window on a moderately complex document will freeze
>> the entire browser window for a number of seconds. This is worse on Chrome
>> than in Safari, but happens with both (I'm on a Mac). You can hear the fan
>> spin up, so there must be quite a bit of stuff going on behind the scenes. I
>> used this sample document to verify:
>>
>> https://cloud.sagemath.com/projects/1959a137-a9da-445b-ad23-dae137b1c67e/files/2015-09-10-141729.sagews
>>
>> The momentary freeze also happens when you click away the little "you're on
>> a free server" warning bar, or (in Chrome) when you close the downloads bar
>> at the bottom of the screen.
>
> This slowdown seems to be in the new code for cell input/output
> folding and nested line numbers, so I'll try to make that faster...


I just spent a few hours dramatically speeding the relevant code up,
using various caching and other optimizations. If you try refreshing
your browser enough to clear the cache, you should see a major
improvement -- orders of magnitude.

William
Reply all
Reply to author
Forward
0 new messages