Closed emylonas closed 8 years ago
I've looked around a bit. First, more explanation:
we are trying to mimic footnotes on a page in the markdown. In regular HTML this would be done by creating matched pairs of <a href="#foo"
and <a name="foo">
elements.
In Markdown Extra and some other versions, this is done as follows:
The link is indicated like this; [anchor-text](#foo)
the anchor is indicated in regular HTML <a name="foo"></a> or
``
I can get the initial link to work in our MD using this:
[FT1](https://library.brown.edu/projects/rome/essays/testtest/#FT1)
but not this:
[FT1](#FT1)
However, this <a name="foo"></a>
just shows up as a literal.
Is it possible to activate the anchor <a>
element?
I'm using this essay to test
https://library.brown.edu/projects/rome/admin/rome_app/essay/36/
Elli, can you take a look at https://worfdev.services.brown.edu/projects/rome/essays/aldini/? Does that seem like it gives you what you need? If so, we'll have to look at it and see if we're OK with that solution.
Yes, that's it. Thank you! --elli
update: I found a better solution. Please take a look at the aldini essay in worfdev again, to see how to do footnotes in markdown.
I think this is ok - comments
[^sometext]
where the marker should appear and [^sometext]: footnote text follows
at the beginning of a line somewhere else. #MORE
and that really borked it. But when i added it to some random non header text, it was fine. So no footnotes on headers.Here's the notes on this implementation of footnotes: https://github.com/trentm/python-markdown2/wiki/footnotes
I see. No word about multiparagraph notes - still, it looks good.
I just enabled this in production. Please try it and let me know if there are issues.
Ben - this was working - and it's working in the display part of the page where you edit the essay. However, on the web, for ex here: https://library.brown.edu/projects/rome/essays/flowerbook/ the link to a footnote in the text is not live, and it doesn't format properly. The actual footnotes themselves at the bottom of the page are missing the footnote marker and the first line of source text. All the footnote text together is wrapped in
.
Was this something that snuck in when you updated TTWR?
yes, this was a problem from the upgrade. I've fixed it, and added an automated test to verify it.
Transcribing from email: EM: Hi Ben - when you set up the django pages in the TTWR project that use markdown, you restricted what we can do in the pages. I'm running into some problems with internal links for some reason - is there some list of which version of md we are using? Also, it looks as if HTML tags work but nothing else?
Ben: Here's the way it's set up:
I don't think there's any custom restrictions on what can be done on these pages - we're just using the package defaults. It looks like this link may have some tips on what's going on, and what needs to be enabled.
If you can send us a list of which tags you need, but don't currently work, we could look into what needs to be done to get it working. It might also be helpful to add some of the tags to a test object in worfdev.