Marked doesn't correctly render footnotes in image titles (<figurecaption>)

kadishmal's Avatar

kadishmal

01 Jun, 2012 07:05 AM

I have the following image with a caption and a footnote in its caption:

Figure 1: Useful technology for the present and the future.[^fn-figure_1]

However, the footnote is rendered incorrectly (see the attached file). It generates the following HTML:


<img src="" alt="Figure 1: Useful technology for the present and the future.Big data, Analytics and the Path from Insights to Value, MIT Solan management review, Winter 2011.

fn-figure_1" />
Figure 1: Useful technology for the present and the future.<a href="#fn:Big data, Analytics and the Path from Insights to Value, MIT Solan management review, Winter 2011.

" title="see footnote" class="footnote">[Big data, Analytics and the Path from Insights to Value, MIT Solan management review, Winter 2011.

]

It should display:

Figure 1: Useful technology for the present and the future.[1]

... where [1] is a footnote.

  1. 1 Posted by kadishmal on 01 Jun, 2012 07:13 AM

    kadishmal's Avatar

    The above code is messed up:

    ![Figure 1: Useful technology for the present and the future.[^fn-figure_1]](/image/path)
    
    [^fn-figure_1]: *Big data, Analytics and the Path from Insights to Value*, MIT Solan management review, Winter 2011.
    

    The above code doesn't work. Prints out:

    <figure>
    <img src="" alt="Figure 1: Useful technology for the present and the future.*Big data, Analytics and the Path from Insights to Value*, MIT Solan management review, Winter 2011.
    
    fn-figure_1" />
    <figcaption>Figure 1: Useful technology for the present and the future.<a href="#fn:*Big data, Analytics and the Path from Insights to Value*, MIT Solan management review, Winter 2011.
    
    " title="see footnote" class="footnote">[*Big data, Analytics and the Path from Insights to Value*, MIT Solan management review, Winter 2011.
    
    ]</a></figcaption></figure>
    

    I also tried wrapping image caption as a link:

    ![[Figure 1: Useful technology for the present and the future.][^fn-figure_1]](/image/path)
    
    [^fn-figure_1]: *Big data, Analytics and the Path from Insights to Value*, MIT Solan management review, Winter 2011.
    

    But it doesn't seem to work either. Outputs:

    <p>![[Figure 1: Useful technology for the present and the future.]<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a>]()</p>
    
  2. Support Staff 2 Posted by Brett on 01 Jun, 2012 11:20 AM

    Brett's Avatar

    Do you get this result using any other Markdown processor? Typically
    that kind of nested markup isn't supported.

  3. 3 Posted by kadishmal on 04 Jun, 2012 03:00 AM

    kadishmal's Avatar

    Yes, I've got the same result in Byword. Like you said such syntax doesn't look to be supported. Mmmm. Do you have any suggestion?

  4. Support Staff 4 Posted by Brett on 07 Jun, 2012 01:44 PM

    Brett's Avatar

    It's really not feasible right now. The best I can offer is to put the footnote before the figure:

     [^fn-figure_1]![Figure 1: Useful technology for the present and the future.](/image/path)
    
     [^fn-figure_1]: This is a footnote
    
  5. 5 Posted by kadishmal on 08 Jun, 2012 01:09 AM

    kadishmal's Avatar

    Nice suggestion. Thank you! Perhaps it's the best solution for now.

  6. Brett closed this discussion on 12 Jun, 2012 09:39 PM.

Comments are currently closed for this discussion. You can start a new one.

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