SVGs in Marked

js's Avatar

js

09 Apr, 2013 08:23 AM

I am trying to use a set of automatically generated SVGs in a document I am writing in Marked. When the SVGs appear in Marked they have a huge margin above and below the image content. If I try with jpeg/png this is not an issue, but I would like it to work with SVG also. Am I doing something wrong?

The SVGs have no margin at all in omnigraffle where they are created and no border or margin when they are rendered in Safari.

Thanks

  1. Support Staff 1 Posted by Brett on 09 Apr, 2013 10:17 AM

    Brett's Avatar

    Can you get me a copy of one of the svgs for testing, either here or in a private discussion?

    -Brett

  2. 2 Posted by Joey Scully on 09 Apr, 2013 08:59 PM

    Joey Scully's Avatar

    Hi Brett,

    please find the test SVG form omnigraffle.

    thanks

    --
    Joey Scully
    Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

  3. Support Staff 3 Posted by Brett on 09 Apr, 2013 09:13 PM

    Brett's Avatar

    Are you inserting these as image tags? (![](image name.svg))?

    -Brett

  4. 4 Posted by Joey Scully on 09 Apr, 2013 09:19 PM

    Joey Scully's Avatar

    Yep - inserting with image tag.

    --
    Joey Scully
    Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

  5. Support Staff 5 Posted by Brett on 09 Apr, 2013 09:33 PM

    Brett's Avatar

    Ok. I haven't worked much with SVG. It appears that it's not properly working as an image when the CSS to constrain the width is applied (max-width:100%).

    I'll need to play around with it and do some Googling to see if there's a workaround.

    For now, I found that if you put a <div markdown=0></div> into the markup and just paste the actual XML contents of the SVG into that, it works… not the handiest for readability, though.

  6. 6 Posted by joey machineeat... on 11 Apr, 2013 01:03 PM

    joey machineeater's Avatar

    cheers Brett, seems like a reasonable work around. Ill hang on till it
    works for SVG to use it for the documentation proces I am trying to
    automate. Thanks for looking into it.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac