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 definitions 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 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
    • CommentTimeJun 12th 2011
    • (edited Jun 12th 2011)

    Igor Khavkine is having problems with included svg-graphics not discplaying at reductions deformations resolutions in physics.

    Can anyone help? Does it only work if one includes the svg-source code directly?

    • CommentRowNumber2.
    • CommentAuthorAndrew Stacey
    • CommentTimeJun 12th 2011

    Yes, SVGs have to be inline. This is actually a browser thing, not an Instiki thing. For some strange reason, Firefox doesn’t allow SVGs as an “image” format, only as an embedded format. I don’t know about other browsers, but certainly some are behind FF in SVG support (I think Opera is better for SVGs, but it’s worse for MathML sadly).

    • CommentRowNumber3.
    • CommentAuthorUrs
    • CommentTimeJun 12th 2011

    Thanks, Andrew.

    So Igor has now made the SVG source code be included directly. There is still a problem, though:

    the code being included is apparently not quite the code in the inclusion file. For instance currently it strips off all the code for arrow heads.

    Do you know what causes this and what might fix it?

    • CommentRowNumber4.
    • CommentAuthorAndrew Stacey
    • CommentTimeJun 12th 2011

    Bleugh. Normally I’ll not hear any complaints against my beloved SVG, but this time I have to admit that the peculiarities of it are a little irritating.

    SVG comes in many shapes and forms: being an XML dialect, it can itself be further refined. So editors such as Inkscape can add their own extensions to basic SVG. That’s fine for Inkscape, it’s also fine for stand-alone SVGs, but it makes them potentially non-compliant when included in to other XML documents - in some cases, such as on the nLab, the containing document has to know what dialect of SVG the included file will be. So we accept only ordinary SVG here. Fortunately, decent editors such as Inkscape can export their documents in “Plain SVG”. But of course the first step is knowing that that is what you have to do! So:

    Step One: Save your SVGs from Inkscape as “Plain SVG” (but see below …)

    Even then, the SVG can contain a lot of crud. Also, there are often different ways of specifying the same information. Instiki is quite strict on what it will select - it works on a whitelist system rather than a blacklist. (It has to in order to be safe; there are some quite nasty things that one can insert in to pages without it being at all obvious what’s happened.) So the SVG should be further processed to ensure that all of its information is in the right places and Instiki will not strip it out. To do this, one uses a Python script called scour. So:

    Step Two: Run your SVG through scour, use the following options:

    python ~/local/share/scour/scour.py --remove-metadata --strip-xml-prolog --enable-id-stripping -i diagram.svg -o diagramSc.svg
    

    (hopefully obvious which bits need changing for someone else’s system)

    If you have a modern enough version of Inkscape, it comes with scour built-in as an extension (or it can be added). In which case Steps One and Two can be combined in to:

    Step One-and-Two: Save your SVGs from Inkscape as “Optimized SVG” (but check that the extension version is the same as the latest version of scour).

    That’s my usual workflow. However, in this case I discovered a further wrinkle which was extremely irritating. As I said, Instiki likes to have its information presented in a certain way. The above puts that information in that way. Except that there is at least one piece of information that Instiki likes to have in the alternative way, and this was controlling how the arrowheads were being displayed. So that bit of information needed further processing to put it back again. Doing this involved:

    cat diagramSc.svg|perl -lpe 's/^ *//;s/overflow="visible"/style="overflow:visible"/g' > diagramScLab.svg
    

    Once I’d done that, it all worked.

    (Personally, I think that Instiki should accept things as scour presents them, so I’ll mention this to Jacques as something to think about.)

    Anyway, I did this on the diagrams at the relevant page.

    • CommentRowNumber5.
    • CommentAuthorUrs
    • CommentTimeJun 12th 2011

    Thanks a lot for taking care of this and for the explanations. We should add some of this to the HowTo pages.

    • CommentRowNumber6.
    • CommentAuthorUrs
    • CommentTimeJun 12th 2011

    I have now added a section How to include SVG into the HowTo-page.