Figure definition and figure foot

enreas's Avatar

enreas

31 Jul, 2014 04:56 PM

Hello.

I'm working with markdown, using figures like this:

...
![figure_15_003]
...
[figure_15_003]: 15/15_003.png "**Figure 15.3.** This is the description of the figure."
...

Is it possible to use Marked to place the figure description in HTML after the <img>, as a <p>?

Thanks in advance for your help and time.

  1. Support Staff 1 Posted by Brett on 31 Jul, 2014 06:26 PM

    Brett's Avatar

    The text used in the title becomes both the alt tag and the figcaption element in MultiMarkdown. You have to use this format:

     ![Anything in here will go into the **alt** attribute and **figcaption** tag][fig_15_003]
    
     [fig_15_003]: 15/15_003.png "Anything out here only gets put into the 'title' tag of the image"
    

    Not all of the built-in themes are great at figcaption display, I need to work on that. If you need some custom CSS to help out, let me know.

  2. 2 Posted by enreas on 01 Aug, 2014 04:31 PM

    enreas's Avatar

    I've been trying that syntax and it's exactly what's I need, thanks a lot. I will take a better look at MultiMarkdown.

    I've noticed something strange, though. This gets rendered:

    ![Anything in here will go into the **alt** attribute and **figcaption** tag][fig_15_003]

    But this doesn't:

    ![**Anything** in here will go into the **alt** attribute and **figcaption** tag][fig_15_003]

    Notice that the bold mark is first in the caption. If I include an space at the beginning of the caption then it gets rendered:

    ![ **Anything** in here will go into the **alt** attribute and **figcaption** tag][fig_15_003]

    I'm using version 2.2 (825).

  3. Support Staff 3 Posted by Brett on 01 Aug, 2014 05:07 PM

    Brett's Avatar

    A link/image title has to start with an alphanumeric character.

    -Brett

  4. 4 Posted by enreas on 01 Aug, 2014 05:43 PM

    enreas's Avatar

    Oh, I see. Thanks again.

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