Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
When one clicks on the 'Show N more comments' thingie on, say, a question, the LaTeX rendering of comments which were visible goes away. IIRC, it used to be the case that the old comments stayed rendered but the newly displayed ones did not have their latex rendered...
By the way: can we make the comment editing boxes bigger? The corresponding textarea elements currently have a rows="3" attribute, but editing up to 300 characters in 3 lines is quite annoying---specially since there is no preview.
Changing the comments so that LaTeX renders properly when you fetch more comments is possible. Daniel LeCheminant has done it on http://math-preview.stackexchange.com/, but it requires completely replacing the javascript for managing comments, and I'm not willing to commit to maintaining such a large difference between MO and the default SE code. If you have any ideas for how to post-process the comments after they've been fetched without rewriting this code, please let me know.
The small text area for comments has always bothered me too (though I use Chrome, which allows easy resizing). I've used css to change the height of the box to 130px, which should be tall enough to fit 600 characters.
Thanks for the bigger textareas! I have no idea what sort of access you have to the source or how/if you patch it, really, but you could change the rows="3" attribute in the textarea instead of its height. This textarea is constructed in code, as far as I can see, in the renderForm function defined in question.js:
var renderForm = function(postId, jDiv) {
var jForm = $("#form-comments-" + postId);
if (jForm.length > 0) {
var form = '<table><tr><td><textarea name="comment" cols="68" rows="3" maxlength="' + maxCommentLength;
form += '" onblur="comments.updateTextCounter(this)" ';
Changing the rows="3" in the line starting with var form=.... into rows="8" might also do the trick, slightly more cleanly.
@Mariano: I can't edit question.js at all. The only way I can make that modification is by overwriting the comments function by loading some other piece of javascript (this is what I did with the editor to incorporate jsMath into the preview). I'm a bit hesitant to do this, which is why I made the change in css instead. It looks like the comments function is under 300 lines long, and I can probably get away with a very small diff, so my hesitation may be unfounded ... I'll think about it.
Urgh. I am waaaaaay too spoilt by open source software, I guess. In those circumstances, changing the height in CSS is probably the way to go.
(I wonder if MO's data is available in some form which would make porting it to a F/OSS app possible, were it to exist?)
@Mariano: I think overwriting the comments function may actually be reasonable. In any case, I don't really see why I would be any less reluctant to do this if SE were F/OSS.
Yes, MO's data will be available in a form which would make porting to a F/OSS app possible, but isn't right now. Beta 7 of SE will be rolled out Monday or Tuesday, and will include a way for me to get an XML dump of the database. Right now, there isn't an open alternative that I think is worth switching to, but there are some in the works.
@Anton: If SE were F/OSS, you could overwrite question.js in the copy you deployed in your own server?
@Mariano: Yes, I understand that, but I would still have to maintain the code difference relative to the trunk. I guess the one thing we would gain is that you'd only end up loading the code once, rather than loading the original and then overwriting it with the modified version, but I think that browsers cache javascript heavily enough that it wouldn't make much difference.
Ok, I've loaded a customized version of the comment function in the footer. Now the text field should be 9 rows tall and LaTeX should always render in comments.
That's quite nice. It works really well!
@Anton: Very nice addition, thank you! I've been observing a minor overall regression in LaTeX rendering when using Firefox 3.6. I often have to reload pages in order to have the LaTeX rendered (even outside comments), which didn't happen before.
Not possible. But a workaround is to write your comment in the answer field, where you have preview. Then cut-and-paste into the comment field and post. (You will get a question about abandoning the answer you started.)
1 to 17 of 17