jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.01k stars 3.35k forks source link

Reference Not Found Error #6592

Open tkurtbond opened 4 years ago

tkurtbond commented 4 years ago

When I process the following reST file (notice it the whole file is indented 3 spaces)

   **Option:** Arachnaurs' webs are made with a neurotoxin_ that can
   quickly paralyze their prey!  When wrapped in a web, make a Vigor
   roll or quickly lose consciousness.

   .. _neurotoxin: https://www.sciencenews.org/article/spiders-poisonous-webs-neuro-toxins-genes

into ms or PDF via ms output with the command

pandoc -s -r rst -w ms -o rnf.ms.pdf rnf.rst

I get the errors

[WARNING] Reference not found for 'neurotoxin' at chunk line 1 column 57
<standard input>:70: macro error: pdfhref has no destination

and the resulting output PDF file and .ms file indeed do not have the link.

Here's the .ms file that was generated:

.QS
.LP
\f[B]Option:\f[R] Arachnaurs\[aq] webs are made with a \c
.pdfhref W -D "" -A "\c" \
 -- "neurotoxin"
\& that can quickly paralyze their prey! When wrapped in a web, make a
Vigor roll or quickly lose consciousness.
.QE

I'm using the following version of Pandoc:

pandoc 2.10.1
Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5

My OS information is:

Mac OS X, Version 10.15.6, Build 19G73
jgm commented 4 years ago

If you unindent it, it will work.

Looks like we're wrongly assuming that the reference definitions will be unindented.