MMD URL/link that generates a footnote with the text of link in the footnote

na
napaxton
Posts: 43
Joined: Wed Jan 19, 2011 5:42 pm
Platform: Mac

Wed Mar 29, 2017 3:44 am Post

I'm doing some self-educating on MMD -> LaTeX by using the Scapple manual, and I notice one rather cool feature that I don't quite understand how Ioa (or Fletcher?) did.

So when there is a bit of MMD text like this:

This manual has been written using [Scrivener](http://www.literatureandlatte.com/scrivener.php)


The generated LaTeX is:
This manual has been written using \href{http://www.literatureandlatte.com/scrivener.php}{Scrivener}\footnote{\href{http://www.literatureandlatte.com/scrivener.php}{http:/\slash http://www.literatureandlatte.com\slash scrivener.php}}


In other words, the LaTeX doesn't just have the embedded hyperlink, there is also a footnote created with the text of the hyperlink (as well as embedded link). Is this happening via Preset Replacements? Or is this a wonderful trick that I have somehow missed?

User avatar
AmberV
Posts: 20612
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Wed Mar 29, 2017 3:53 am Post

You should be getting that behaviour out of the box with MMD->LaTeX (so yes, Fletcher). Here is what I get when I use MMD on the command-line, which is as about as pure an experience as you can get:

Code: Select all

$ mmd2tex
Test [links](http://www.literatureandlatte.com/)
<^D>


Output:

Code: Select all

Test \href{http://www.literatureandlatte.com/}{links}\footnote{\href{http://www.literatureandlatte.com/}{http:/\slash www.literatureandlatte.com\slash }}


Mind, I'm still using MMD 5.4.0, I've not upgraded to 6.0 yet as I ran into issues with some of my XSLT workflow and didn't have time to sort it out yet.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

na
napaxton
Posts: 43
Joined: Wed Jan 19, 2011 5:42 pm
Platform: Mac

Wed Mar 29, 2017 6:05 pm Post

Huh. Most of my URLs (of late, at least) have been in the footnotes [^Lorem] syntax, and I haven't observed this behavior.

Is there perhaps some Scrivener option that I've enabled that would shut this behavior off? Failing that, I suppose I am just unobservant. :D

User avatar
AmberV
Posts: 20612
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Thu Mar 30, 2017 12:29 am Post

Okay, it might not do that when using a hyperlink inside of a footnote, if that is what you mean, since that would entail making a footnote of a footnote.

As I say though, the above example was done purely on the shell with the MMD command-line interface. I didn’t use Scrivener for the test and it doesn’t generally mess with MMD syntax at all as a rule of thumb, save for the few things it generates from its own internal features like embedded images and its own footnotes.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles