Recent Posts

412 posts found

 posted 5 years ago Andrew Stacey 118 posts Forum: itex2MML – Topic: Bugs This looks like a bug in how Firefox renders MathML, but I thought I’d check with you first. How do $\stackrel{^}{\otimes }$ and $\stackrel{^}{\otimes }$ look to you? To me, the first has the hat offset to the right. I presume that it shouldn’t be so. posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: nlab Ah, I’d better fix that first one then. I’ll keep the second in mind for next time this happens and choose my dates more precisely. posted 5 years ago admin 58 posts Forum: Instiki – Topic: nlab If I simply remove a row from the revisions table, does instiki get confused? The revised_at field in the pages table should match the revised_at field of the last revision of that page. 2. If the timestamps are a bit out of order, does instiki get confused? Or is the revision id the One True Order on the revisions table? The history of a page is reconstructed by sorting on the revised_at date. The revision id is irrelevant to that. posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: nlab Just noticed that you got hit by the same spammer. I think that instiki.org also got hit, but then it’s hard to tell with that site anymore. Seems as though this spammer has gone for every instiki installation under the sun! posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: nlab The azimuth project just got a massive spam hit, 317 pages in total. To deal with that, I ended up working on the database level. What I did was to try to simulate “rollbacks”: copy the data from the last decent copy and paste it as a new row in the “revisions” table. That seemed the safest approach. But it did get me thinking about the database and specifically the “revisions” table. Two questions: If I simply remove a row from the revisions table, does instiki get confused? If the timestamps are a bit out of order, does instiki get confused? Or is the revision id the One True Order on the revisions table? posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: nlab Okay, I’ll take a look at that. Is it obvious which file to add it to, or should I create a new file and add it to the page template? posted 5 years ago admin 58 posts Forum: Instiki – Topic: nlab Sorry. There isn’t a way to localize the Javascript. You could, however, add some site-wide Javascript, which attaches an event listener to some element(s), based on the request-URL. posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: nlab This isn’t nLab-specific, but it’s neither a bug nor a feature requestion: more of a “How do I?”. There’s an effect that I’d like to put on a page (or a family of pages). It’s achievable in CSS using some fancy pseudo-classes, but some browsers don’t support it (notably mobile browsers) so I was pondering a javascript solution. Essentially, it would just modify some CSS properties of certain elements (selected by class) when a link was clicked upon. The details aren’t particularly important. What I want to know is whether or not there is an easy way to add a bit of javascript to a page. I suppose it could be added to all pages, but then it would be better if it were only all pages in a particular web. Something a bit like the stylesheet tweaks, but for javascript. posted 5 years ago admin 58 posts Forum: itex2MML – Topic: Bugs posted 5 years ago admin 58 posts Forum: Instiki – Topic: Bugs On another topic, is there any progress on cache bugs? I’ll take a look, again, at file uploads. For the other, you have not been able to present me with a set of steps to reproduce the bug. So there’s nothing that I can do. posted 5 years ago Andrew Stacey 118 posts Forum: itex2MML – Topic: Bugs The optional argument syntax for extensible arrows doesn’t swallow spaces correctly. If I type \xrightarrow [a]{b} then in LaTeX, this is equivalent to \xrightarrow[a]{b} because spaces are automatically swallowed after commands. However, in iTeX then they are not equivalent: $\stackrel{\left[}{\to }a\right]b\underset{a}{\overset{b}{\to }}$\xrightarrow [a]{b} \xrightarrow[a]{b} posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Bugs Thanks! That’s great. On another topic, is there any progress on cache bugs? With the file uploading, then it doesn’t work at all. When I upload a file to a page then that page doesn’t get expired. We’re also seeing it with renaming pages on the nLab. We’re trying to keep a record of it in case it’s of use to you: http://www.math.ntnu.no/~stacey/Mathforge/nForum/comments.php?DiscussionID=3168 posted 5 years ago admin 58 posts Forum: Instiki – Topic: Bugs D’oh! posted 5 years ago Andrew Stacey 118 posts edited 5 years ago Forum: Instiki – Topic: Bugs I just updated my course installation to the latest one, did the ruby bundle and touch tmp/restart.txt as well. Then I tried to edit the stylesheet and kept getting Internal Application Error. Here’s what the log said: RuntimeError (Instiki could not create directory to store uploaded files. Please make sure that Instiki is allowed to create directory /home/stacey/current/others/instiki/webs/ mathsnotes/files/0 and add files to it.): app/models/web.rb:169:in rescue in create_files_directory' app/models/web.rb:161:in create_files_directory' app/models/wiki.rb:32:in edit_web' app/controllers/admin_controller.rb:59:in edit_web' There’s no reason why Instiki can’t create that directory, but I’m a bit at a loss as to why it is trying to do so. I restarted the web server and got the same error. posted 5 years ago admin 58 posts edited 5 years ago Forum: Heterotic Beast – Topic: Rails 3.1.0 Now on Rails 3.1.1. posted 5 years ago admin 58 posts Forum: Instiki – Topic: Bugs This one’s possibly the most obscure yet! Not terribly obscure at all. But it does highlight how overloaded the WikiLink mechanism is. Ugly as sin! This is probably not the right fix. But it’s a fix. posted 5 years ago Andrew Stacey 118 posts edited 5 years ago Forum: Instiki – Topic: Bugs New one for you. This one’s possibly the most obscure yet! The wiki doesn’t like ampersands in file names; that is, in the [[file|filename :file]] syntax (or whatever the right syntax is). This feels a bit like a “my head hurts when I hit it with a hammer” bug! Obviously, no sane person would put an ampersand in a file name. I did so by accident and it threw “Internal application error” in my face. It was only by looking at the logs that I realised what I’d done. The logs have: ActionController::RoutingError (No route matches {:controller=>"file", :web=>"mathsnotes", :action=>"file", :id=>"lecture.annotations.2011-10-0&.pdf"}): lib/url_generator.rb:83:in file_link' lib/url_generator.rb:43:in make_link' (and a whole load more “in XYZ”s - I presume that the whole trace isn’t necessary) posted 5 years ago admin 58 posts Forum: Instiki – Topic: Bugs posted 5 years ago admin 58 posts Forum: Instiki – Topic: nlab I suppose there is a marginally higher probability that a ‘merge’ will succeed with some lines commented-out, instead of deleted. But I expect that it’s a small effect; hardly worth obsessing-over. posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Bugs This is probably related to that last one. Is the black square inserted at the end of a proof also done by javascript? If so, that might be worth thinking about whether or not it makes the same assumption. In particular, if a proof ends with a bit of displayed maths then the square gets inserted into the containing div which is centred. This looks a little odd. posted 5 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: nlab Back on the CSS thing. I’m going to experiment with taking it out on my course wiki (safer than on the nLab). Since it’s in the main instiki file I guess I have to take it out system-wide (though I could put it back on a per-web basis, I guess). What’s the safest way to do that given that this is a file in the VCS? Should I comment out the line, or delete it? (I want to avoid - as much as possible - breaking things when I do a bzr pull) posted almost 6 years ago distler 105 posts Forum: Instiki – Topic: Bugs Ah. I see. posted almost 6 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Bugs What are you using to show the source? My default is Firebug, though I also use the “View Source Chart” addon. Here’s what Firebug says it sees: 

Theorem . Correct behaviour

Theorem .
1. A list, with
2. Incorrect behaviour
Theorem .

A comment to one side

The theorem

 In particular, note that the second theorem label is a child of the 
element. If I just do the naive “View Source” then this is what I see: 
Theorem

Correct behaviour

Theorem
1. A list, with
2. Incorrect behaviour
Theorem

A comment to one side

The theorem

 So you’re right and wrong. What I’m seeing on the page is not an artefact of Maruku. Since the source sent by Instiki is correct, my guess is that it is Javascript that is converting the 
to a  and is inserting it as a child of the first element. (In my opinion, it should do so only if that first element is a 

, otherwise it should be in a block element all of its own.) posted almost 6 years ago distler 105 posts Forum: Instiki – Topic: Bugs Sorry. Maruku’s HTML output looks perfectly OK (ie, as expected) in your example(s). (View the XHTML source, and tell me what you think is wrong with it.) What you are complaining about is that the CSS doesn’t produce the desired appearance of the output. Since you’ve been mucking about with the CSS of the Theorem Environment, why don’t you muck about some more and get it to format your example correctly. posted almost 6 years ago Andrew Stacey 118 posts edited almost 6 years ago Forum: Instiki – Topic: Bugs Here’s a maruku bug; I guess I’m noting it as much for when (if!) you change engines as for hoping that it’ll get fixed now. In a theorem or proof environment, the conversion of the h6 element to a label doesn’t always work correctly if the following element is a block-level one (list or a div, for example). I’ve been trying to post an example here, but failing miserably. Even the correct syntax doesn’t seem to be working. So I’ve stuck an example at the top of the Sandbox in the nLab: http://ncatlab.org/nlab/show/Sandbox (I originally noticed this on my course wiki.) posted almost 6 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Bugs I was on 759. I’ll upgrade today. I was also probably doing something more complicated than I described, only I can’t remember all the steps, since I was moving content from one page to another and renaming them. I thought I’d described the important ones, but there may have been something that I’d missed. I’ll try to be more observant of my own behaviour in case it occurs again! posted almost 6 years ago distler 105 posts Forum: Instiki – Topic: Bugs Are you using the current revision of Instiki? ‘Cuz that’s not the behaviour I see, when I follow the steps above. posted almost 6 years ago Andrew Stacey 118 posts edited almost 6 years ago Forum: Instiki – Topic: Bugs Looking at the log, what I see is the following: Processing WikiController#save (for 2001:700:300:1470:862b:2bff:fe9b:c741 at 2011-09-21 14:32:27) [POST] Parameters: {"_form_key"=>"809867e64bcc18bbdd650af99b67f93dd935dfad", "content"=>"A load of content", "alter_title"=>"1", "new_name"=>"norm for continuous functions on the interval", "author"=>"Andrew Stacey", "web"=>"mathsnotes", "id"=>"continuous functions on the interval"} Reading page 'continuous functions on the interval' from web 'mathsnotes' Page 'continuous functions on the interval' found 2001:700:300:1470:862b:2bff:fe9b:c741 Reading page 'continuous functions on the interval' from web 'mathsnotes' Page 'continuous functions on the interval' found Maruku took 0.002904876 seconds. Maruku took 0.002353689 seconds. Maruku took 0.310123551 seconds. Maruku took 0.301577887 seconds. At that point, I get lots of Expired fragments, all of which refer to the new page name (or to lists). Then at the end, I see: Redirected to http://mathsnotes.math.ntnu.no/mathsnotes/show/norm+for+continuous+functions+on+the+interval Completed in 789ms (DB: 18) | 302 Found [http://mathsnotes.math.ntnu.no/mathsnotes/save/continuous+functions +on+the+interval] Seconds later, I go back to the tab with the original page in it and click “reload” to get: Processing WikiController#show (for 2001:700:300:1470:862b:2bff:fe9b:c741 at 201 1-09-21 14:32:39) [GET] Parameters: {"web"=>"mathsnotes", "id"=>"continuous functions on the interval"} Reading page 'continuous functions on the interval' from web 'mathsnotes' Page 'continuous functions on the interval' not found Cached fragment hit: views/mathsnotes/show/continuous+functions+on+the+interval (0.1ms) Filter chain halted as [#, @identifier=nil, @options={:only=>#, :if=>#, :unless=>nil}>] did_not_yield. Completed in 3ms (View: 0, DB: 1) | 200 OK [http://mathsnotes.math.ntnu.no/mathsnotes/show/ continuous+functions+on+the+interval] In other words, the cached version is there. (Edit: “A load of content” is a substantial amount.) posted almost 6 years ago Andrew Stacey 118 posts Forum: itex2MML – Topic: Bugs Once again: thank you very much! posted almost 6 years ago distler 105 posts Forum: Instiki – Topic: Bugs I’m not so sure I understand. I created a page, “Foo”. I edited the page, “Foo”, and changed the name to “Bar”. I removed the [[!redirects Foo]] directive, and saved the page. All instances of “Foo” were successfully removed from the Cache. What am I missing?