edemaine
• Joined on Oct 14, 2019

edemaine commented on issue catsoop/catsoop#93

Syntax Highlighting in Inline Code Blocks

Triple backtick already makes <pre> only if it contains multiple lines. (If you can look at the raw versions of my posts above, they use it a lot.) Here's an example: https://spec.commonmark.org/0.29/#example-115 But reading that section of the CommonMark spec, it's definitely not standard to allow info strings in an inline triple backtick.

1 week ago

edemaine commented on pull request catsoop/catsoop#96

Replace Ace with CodeMirror

If you want to match your old Ace fold feature, you probably also want to include BASE/scripts/codemirror/fold/foldcode.js and maybe fold/foldgutter.js/fold/foldgutter.css. See [this demo](https://codemirror.net/demo/folding.html).

1 week ago

edemaine commented on pull request catsoop/catsoop#96

Replace Ace with CodeMirror

I believe you need to specify mode: 'python'. Or are you already getting syntax highlighting?

1 week ago

edemaine commented on issue catsoop/catsoop#93

Syntax Highlighting in Inline Code Blocks

I think <code lang="python">...</code> and python...  both look good. With python... , there's a slight worry that you might have meant something else (python...), but I can't think of a case where you wouldn't want a space between text and code... maybe function(x) could occur naturally, but I guess you can filter that out easily enough (only when [a-z]+ precedes   ). Another alternative would be something like: markdown Now we set python x = 5  (you can use triple-back-tick inline as well), which seems more "consistent", but also especially ambiguous... I did a bit of searching, and [it seems that](https://stackoverflow.com/questions/23226224/inline-code-syntax-highlighting-in-github-markdown) the "standard" way is currently  x = 5{:.python} or  x = 5{:.code-python}  (couldn't tell which) -- basically forcing a CSS class on the <code> tag.

1 week ago

edemaine commented on pull request catsoop/catsoop#92

Emoji in Markdown

I could see smiley faces occasionally useful to some, though I don't really have the short_name's memorized so probably wouldn't have much use myself. If needed, I usually just find the Unicode symbol and paste it in. (unless I have autocomplete, like here -- maybe I'd use it with a suitable autocompletion in an editor GUI -- though I actually get a 500 error if I include an emoji in this message) I feel like there's no need to imagify the emoji, though -- not worth the extra distribution size for ... compatibility with old fonts/browser that have no emoji?

1 week ago

edemaine commented on issue catsoop/catsoop#86

Footnotes break inside showhide

I was going to ask what the difference was between <showhide> and <details>. Maybe a default <summary>? Perhaps you could mogrify the former into the latter, perhaps after Markdown processing as you suggest.

1 week ago

edemaine commented on issue catsoop/catsoop#81

GUI Authoring Tool

A kind of in-between would be a two-column layout with source on the left and current rendering on the right (or vice versa), ideally aligned block-by-block (inspired by the Notion example). Some <python> blocks will render as nothing (e.g. when setting up variables but not printing anything); others will render with what they print. But this would quickly give a sense of what various blocks of the page are doing, while also making clear that there are some "invisible" chunks that are presumably doing useful things. (Users should understand that some blocks have side effects, and should be careful about them.)

2 weeks ago

edemaine commented on issue catsoop/catsoop#81

GUI Authoring Tool

Back on topic, I happening to be checking out [Notion](https://www.notion.so/educators) today and saw the following animation, which made me think of this thread (on the gooer side): ![](https://www.notion.so/front/educators/features/educators-text-editor-v2.gif) Dragging chunks of text around seemed particularly cool...

2 weeks ago

edemaine commented on pull request catsoop/catsoop#84

Change Default Ports

Ah, right -- the old default wasn't in the config. Oh well, at least the changelog makes it clear. Is it worth mentioning there "to avoid conflict with X11"?

2 weeks ago

edemaine commented on pull request catsoop/catsoop#84

Change Default Ports

Reading over the diff, this looks good to me! Regarding [your point](https://catsoop.mit.edu/git/catsoop/catsoop/issues/83#issuecomment-353): > slight pain port as everyone has to change their NGINX configurations after that change Presumably it's fine if people aren't changing the config files? It's more for fresh installations. Also, the prompt during installation will hopefully remind people...

2 weeks ago

edemaine opened issue catsoop/catsoop#83

Consider changing default ports

2 weeks ago

edemaine commented on issue catsoop/catsoop#81

GUI Authoring Tool

Indeed, that works - maybe you could add it to the documentation? I guess the next problem is that a local server doesn't work well when being accessed from another machine. I usually do Catsoop work on a Linux server, not on my desktop filesystem, and things don't work well when accessing the server from my desktop (given the references to localhost). But maybe this would be better on another thread...

2 weeks ago

edemaine commented on issue catsoop/catsoop#81

GUI Authoring Tool

Yeah, I know local copy is the intended way to do this, but I never got local catsoop to work. Trying to follow those instructions again, the issue seems to be that port 6011 is in use on my machine, but I can't figure out by which process (having tried [all of these](https://www.cyberciti.biz/faq/what-process-has-open-linux-port/), I can see it's in use, but no process is listed). If I recall the last time I looked at this, I believe port 6011 is hard-coded into the code -- perhaps it could be overridable in config or an environment variable.

2 weeks ago

edemaine commented on issue catsoop/catsoop#81

GUI Authoring Tool

Interesting idea. What comes to mind to me is the Github/Gitlab interface for editing text files in a repo. At its simplest level (no preview), it seems like this would work fine on Catsoop (but maybe it's not gooey/WYSIWYG enough?). It would seem pretty powerful with preview added, which I could see doing via a round-trip to the server. Actually I would find it incredibly useful to test how a page would render before I actually commit it to the repo, which I think wouldn't be terrible to do?

2 weeks ago

edemaine commented on issue catsoop/catsoop#69

Remove MathJax?

Ah, I see, both plain TeX features... That explains where the 6.006 macro came from. :) Their listing on the KaTeX support table probably comes from those being supported by MathJax and not KaTeX, so are worth considering. I'm not sure there's an official policy on TeX vs. LaTeX -- I don't recall it coming up -- but there is a policy toward behaving like (La)TeX does. This is tricky here, because \cases already has a meaning in LaTeX (with amsmath), namely, the same as \begin{cases}. Ah, luckily, it turns out that \cases actually produces an error in LaTeX:  Package amsmath Error: Old form \cases' should be \begin{cases}.  So it would be reasonable (and I think easy) to support both \cases and \eqalign in KaTeX, as they don't have another inconsistent behavior in LaTeX.

2 weeks ago

edemaine commented on issue catsoop/catsoop#69

Remove MathJax?

I believe \cases is a macro defined in 6.006 macros.tex only, and it should really die. It overwrites \begin{cases} (which LaTeX expands to \cases) so breaks amsmath. [\eqalign`](https://www.tutorialspoint.com/tex_commands/eqalign.htm) does look easy... I'd never heard of that one. Indeed, it seems to be defined in plain TeX, but not LaTeX. Is it in a LaTeX package or something?

2 weeks ago

edemaine commented on issue catsoop/catsoop#69

Remove MathJax?

Feel free to open issues for missing features on the KaTeX side -- but it also probably exists as a long-standing issue. :) But if something comes up as a priority, let me know... By the way, are you using KaTeX to do server-side rendering? Now that you're without MathJax, this is an option... but maybe a little more difficult because the server is in Python, so you'd need Node installed.

2 weeks ago

edemaine commented on issue catsoop/catsoop#72

"Dark Mode" and User Settings Page

In Coauthor, it's a global setting per user, but I already had lots of those. In one way it's annoying: I might prefer dark mode on my laptops, say, but light mode on my desktops. There are a couple of alternatives: * The default setting on Coauthor is to detect the OS-level preference via prefers-color-scheme media query. This is fine if users don't want to customize each site they use... * A simpler option in your case would be to put it in the cookie, or a new cookie, or localstorage (if that could work). Then it's configured per-computer anyway, which could be nice, and you don't need to build user-global preferences. See https://github.com/edemaine/coauthor/blob/master/client/theme.coffee

1 month ago

edemaine commented on pull request catsoop/catsoop#68

add support for showing line numbers next to highlighted code blocks

Looks nice! That background color helps a lot.

1 month ago

edemaine commented on issue catsoop/catsoop#71

Better Inline Code Editor

FWIW, I switched Coauthor from Ace to CodeMirror a while ago. It generally seems better and better maintained. It's still not great on mobile (until the forthcoming v6), but usable with some keyboards at least. (Is Gitea using Ace? I couldn't get this text written on Android, and had to copy/paste it in.)

1 month ago