if (n->link_data->label == NULL) {
/* This link was specified as [](#bar) */
/* do as told, even if it doesn't make sense */
g_string_append_printf(out, "\\href{%s}{}", n->link_data->source);
} else {
g_string_append_printf(out, "\\autoref{%s}", n->link_data->label);
}
I am not sure why it needs to do what it is told even if it doesn't make sense :)
Anyhow, I hacked it to the following:
if (n->link_data->label == NULL) {
g_string_append_printf(out, "\\autoref{%s}", n->link_data->source + 1);
}
Which I only recommend as a last resort until this gets sorted.
Kind regards.
On Tuesday, May 7, 2013 3:28:39 PM UTC+2, Skrummel wrote:
Hi there,
With the new version of Markdown (4.0b) it seems that the Latex references changed from \autoref{labelname} to \href{labelname}{}, which unfortunately is not working properly for me.
The problem arise when I insert a image (or equation) in Markdown using the following:
![Caption][labelname]
[labelname]: path/to/image
And make the reference with [](#labelname).
I use mmd2tex and then pdflatex to compile, this correctly inserts the figure in Latex and also creates a \href{labelname}{}, however in the PDF this reference is not showing up and pdflatex throws the following error:
pdfTeX warning (dest): name{labelname} has been referenced but does not exist,
replaced by a fixed one
Anyone got any ideas on how to fix this? The same Markdown compiled beautifully under version 3.