Not signed in (Sign In)

Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

  • Sign in using OpenID

Site Tag Cloud

2-category 2-category-theory abelian-categories adjoint algebra algebraic algebraic-geometry algebraic-topology analysis analytic-geometry arithmetic arithmetic-geometry book bundles calculus categorical categories category category-theory chern-weil-theory cohesion cohesive-homotopy-type-theory cohomology colimits combinatorics complex complex-geometry computable-mathematics computer-science constructive cosmology deformation-theory descent diagrams differential differential-cohomology differential-equations differential-geometry digraphs duality elliptic-cohomology enriched fibration foundation foundations functional-analysis functor gauge-theory gebra geometric-quantization geometry graph graphs gravity grothendieck group group-theory harmonic-analysis higher higher-algebra higher-category-theory higher-differential-geometry higher-geometry higher-lie-theory higher-topos-theory homological homological-algebra homotopy homotopy-theory homotopy-type-theory index-theory integration integration-theory k-theory lie-theory limits linear linear-algebra locale localization logic mathematics measure-theory modal modal-logic model model-category-theory monad monads monoidal monoidal-category-theory morphism motives motivic-cohomology nforum nlab noncommutative noncommutative-geometry number-theory of operads operator operator-algebra order-theory pages pasting philosophy physics pro-object probability probability-theory quantization quantum quantum-field quantum-field-theory quantum-mechanics quantum-physics quantum-theory question representation representation-theory riemannian-geometry scheme schemes set set-theory sheaf sheaves simplicial space spin-geometry stable-homotopy-theory stack string string-theory superalgebra supergeometry svg symplectic-geometry synthetic-differential-geometry terminology theory topology topos topos-theory tqft type type-theory universal variational-calculus

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome to nForum
If you want to take part in these discussions either sign in now (if you have an account), apply for one now (if you don't).
    • CommentRowNumber1.
    • CommentAuthorUrs
    • CommentTimeOct 26th 2016
    • (edited Oct 26th 2016)

    Oh dear, the automatic definition/proposition numbering system is again broken. Check out any nLab page (e.g. this one). Whenever there is a referencing back to prop. number such and such, the numbers have nothing to do with each other.

    This is done via CSS, right? So I suppose some people here might know how to fix this (while Adeel is still busy with his thesis work)?

    • CommentRowNumber2.
    • CommentAuthorMike Shulman
    • CommentTimeOct 26th 2016

    Yes, I think this has been true since the change to environment numbering, as mentioned here. No one at the time seemed able or inclined to fix it.

    • CommentRowNumber3.
    • CommentAuthorUrs
    • CommentTimeOct 26th 2016
    • (edited Oct 26th 2016)

    Thanks, I see. I had missed that all along.

    Okay, I’ll try to make Adeel undo the change that causes the problem, until he finds time to implement it properly. Because this situation is untenable.

  1. I can try to take a look later today. Let me know if Adeel works on it, as then I’ll leave it to him.

    • CommentRowNumber5.
    • CommentAuthorUrs
    • CommentTimeOct 26th 2016

    I had emailed Adeel, but I have no response yet. I suppose if you could do it, he wouldn’t mind, to say the least.

    • CommentRowNumber6.
    • CommentAuthorRichard Williamson
    • CommentTimeOct 26th 2016
    • (edited Oct 26th 2016)

    I have been taking a look. Every time I take a look at the instiki source code, I am put off by how awfully it is structured. It is very difficult to work out what is going on. This may partially be an artefact of Ruby on Rails, but not completely I think.

    There is next to no documentation, the unit tests are very far from comprehensive, and it is an absolute lottery trying to find out where anything is coded.

    To try to find out where the references are coded, I had to resort to grep-ing the git log history, and then doing a diff. To spare anybody else the pain, they were configured in vendor/plugins/maruku/lib/maruku/ext/math, in the parsing.rb and to_html.rb files… but these files have now disappeared! Maruku now seems to have been separated out from instiki: the relevant code is here (search for \ref) and here (search for to_html_divref).

    Looking at this, the crucial point seems to be that \ref{#Whatever} is converted to “a> class=’maruku-ref’ href=’#Whatever’>number</a” (where I have removed tags so that it is not converted to a link here as well!), where ’number’ is taken from the ’num’ parameter/attribute/whatever it’s called in the theorem div. Now, the change that Adeel made does not change the num parameter, it only changes the string that is displayed when the theorem with its number is itself displayed. Hence why the references have not been changed.

    I believe that one could change Adeel’s javascript to alter the num parameter itself, which would fix this. I’ve not written much javascript, and it seems that Adeel has, so he can probably fix this quicker than me. If he really cannot do it, I’m sure I can figure it out.

    • CommentRowNumber7.
    • CommentAuthorUrs
    • CommentTimeOct 26th 2016

    Thanks. Short of adjusting the num-parameter to our new numbering (which eventually we should do), would you know how to revert the new numbering to the old numbering, such that at least we have sensible pages for the time being?

  2. Probably the best way is just to revert Adeel’s last two commits in the git repository. I don’t have the rights to do that, but Mike will certainly know how to do it if he has the rights.

    • CommentRowNumber9.
    • CommentAuthorRichard Williamson
    • CommentTimeOct 26th 2016
    • (edited Oct 26th 2016)

    With regard to changing the num parameter, it may be that my original suggestion, using pure css rather than javascript, would also work, for the per environment numbering at least.I’m not completely sure, though.

    • CommentRowNumber10.
    • CommentAuthorMike Shulman
    • CommentTimeOct 26th 2016

    Where is the relevant git repository?

    • CommentRowNumber11.
    • CommentAuthorRichard Williamson
    • CommentTimeOct 27th 2016
    • (edited Oct 27th 2016)

    Here.

    If you’re asking that question, I guess that you do not have the rights to make changes to the master branch. In any case, the changes would need to be deployed to the server that the nLab is running on. If no-one has the rights to do that except Aqeel, then the only thing we can do is wait for him in any case :-). If someone has access to the server but not the nLab git repository, they could revert the changes locally, and deploy the local version to the server.

    • CommentRowNumber12.
    • CommentAuthoradeelkh
    • CommentTimeOct 27th 2016

    Hi, I’ll look into it now.

    • CommentRowNumber13.
    • CommentAuthoradeelkh
    • CommentTimeOct 27th 2016

    Ok, should be fixed now. As usual the cache has been reset so pages will load a bit slower than normal. Let me know it still doesn’t work.

    • CommentRowNumber14.
    • CommentAuthorUrs
    • CommentTimeOct 27th 2016

    Excellent. Thanks!

    • CommentRowNumber15.
    • CommentAuthorMike Shulman
    • CommentTimeOct 27th 2016

    Awesome!

  3. Nice one!

    It seems to me that referencing across pages, which was also requested once, could be straightforwardly implemented in a similar way, using something which can look up HTML elements across pages, instead of just on the same page. One would need to check whether this would impact performance, but my guess is that it can be done without much performance impact. If it is reasonably trivial, perhaps it is something you could look into when you have the opportunity, Adeel?

    • CommentRowNumber17.
    • CommentAuthorDexter Chua
    • CommentTimeOct 27th 2016

    I tried to look into the code, but also didn’t manage to figure out how things actually work. Morally, I think the code to do the numbering should be done in the Ruby layer when generating the page, rather than adding them ad hoc in the browser after the page is produced. Doing it server-side will probably make it much easier to do cross-reference. However, my impression is that the page generation is handled by an external library, which makes it more difficult to work with…

    (also, the page Introduction to Stable homotopy theory – P struggles to load on my browser)

    • CommentRowNumber18.
    • CommentAuthorDavidRoberts
    • CommentTimeOct 28th 2016

    @Dexter

    (also, the page Introduction to Stable homotopy theory – P struggles to load on my browser)

    Yes, MathJax struggles on those large pages. What’s it like in Firefox, if you’re not using it already?

    • CommentRowNumber19.
    • CommentAuthorDexter Chua
    • CommentTimeOct 28th 2016

    It was on firefox. It was most likely caused by the script trying to run the references. More precisely, firefox killed the script when it reached this line due to it overloading the machine.

  4. Morally, I think the code to do the numbering should be done in the Ruby layer when generating the page, rather than adding them ad hoc in the browser after the page is produced.

    I agree completely.

  5. One can imagine a proper backend for Instiki in which builds up a WikiEntry type/object/whatever from constituent types/objects, including ’Theorem’ types/objects. It would then be trivial to implement referencing. My impression is that Instiki doesn’t have anything like this, but I could be missing something.

    • CommentRowNumber22.
    • CommentAuthorspitters
    • CommentTimeOct 28th 2016

    Perhaps it would be good to create an issue for discussion on the instiki github page. This has been successful before.

    • CommentRowNumber23.
    • CommentAuthoradeelkh
    • CommentTimeNov 1st 2016

    I just pushed a slight optimization of the script, and also moved it out to an external file. That was enough to make the link in #17 start working for me at least (on Firefox).

    It is certainly true that all this should be implemented on the server-side, but this requires some non-trivial work and modifications to Maruku. Same with cross-page referencing (re; #16).

    • CommentRowNumber24.
    • CommentAuthorDexter Chua
    • CommentTimeNov 1st 2016

    Thanks! It seems much better now.

    • CommentRowNumber25.
    • CommentAuthorTodd_Trimble
    • CommentTimeNov 1st 2016

    Thanks for all your good work, Adeel. Were the changes supposed to apply all across ncatlab, including for example private webs? On one of my pages, I have environments labelled 0.1 – 0.19, even though there are separate sections and a {:toc}.

    • CommentRowNumber26.
    • CommentAuthoradeelkh
    • CommentTimeNov 1st 2016

    Strange, I don’t know why it wouldn’t be working on the other webs. Maybe it’s because I had only cleared the main nLab cache; I’ve just now cleared all the caches, maybe that helps? Looking at some pages on Urs’s web, it appears to be working there at least.

    • CommentRowNumber27.
    • CommentAuthorTodd_Trimble
    • CommentTimeNov 1st 2016

    Still the same. Let’s talk about this in email (I can give you my passwd).

    • CommentRowNumber28.
    • CommentAuthorTodd_Trimble
    • CommentTimeNov 1st 2016

    Actually, come to think of it Adeel, the page I was referring to is on my public web, here.

    • CommentRowNumber29.
    • CommentAuthoradeelkh
    • CommentTimeNov 1st 2016

    Fixed now. Apparently the HTML syntax of published pages of private webs differs in a small way which was relevant for the script.

    • CommentRowNumber30.
    • CommentAuthorTodd_Trimble
    • CommentTimeNov 1st 2016

    Wonderful! Thanks so much!

    • CommentRowNumber31.
    • CommentAuthorUrs
    • CommentTimeApr 12th 2017
    • (edited Apr 12th 2017)

    It happens to me that I give a section the same anchor name as some proposition. As in

      ## Topological spaces 
          {#TopologicalSpaces}
    
         +-- {: .num_defn #TopologicalSpaces}
         ###### Definition
    

    I try to avoid this, but it keeps happening. Also copy-and-pasting from other entries sometimes leads to duplication in anchor names.

    The problem is that if an anchor name of some definition/theorem environment gets duplicated at some point in the page, even in another context (headline), then the automatic numbering of references to that environment and many other environments breaks.

    The way it break is curious: instead of some correct number of the form “2.5” what instead appears in these cases now is something like “23”, apparently falling back to the linear counting.

    Anyway, what is troubling about this is that for long pages it is really really tedious to find the anchor name that is duplicated. This is because not only one environment-reference labeling breaks, but many, and usually not in any conceivable linear order, so that it is hard to see which one is the culprit.

    This here is maybe more a warning to others than a bug report: Best to make sure to use different anchor naming conventions for sections than for environments. (For instance I do one in plural, one in singular. I just have to remember each time which of the two possible conventions I am sticking to…)

    But if there were any way to make the parser be more robust against these kinds of code hickups, of course that would be great, too.

    • CommentRowNumber32.
    • CommentAuthorMike Shulman
    • CommentTimeApr 12th 2017

    One possibility for a naming convention would be to prefix one or both of them, like SecTopologicalSpaces and DefTopologicalSpaces. This should be a familiar issue to TeX users; you can’t use the same label name for a section and a definition in TeX either.