pandoc-crossref icon indicating copy to clipboard operation
pandoc-crossref copied to clipboard

Unnumbered sections use last known header section number

Open d0rf3n opened this issue 4 years ago • 1 comments

image --> image

Perhaps this is like some people want it, but I find it unwanting since they are the same header depth. Also took a look at #230, since I wanted it to show the title in this case. Maybe the mentioned solution in 0.4 would just ignore the heading number if it doesn't exist?

d0rf3n avatar Mar 24 '21 09:03 d0rf3n

Curious.

Unnumbered objects are technically "unreferencable" in the current model, since reference is always in the format "{object type} {object number}". You've basically stumbled on a bug, but the fix here would be to throw an error when referencing an unnumbered section, which I'm not entirely convinced is any better.

The workaround here would be to use pandoc's implicit header references and just write the title out, i.e.

# Test1 {-}
...
In the section [Test1]...

This may be slightly annoying, but it's actually in-line with the stated philosophy of Markdown, so it's neither here nor there.

lierdakil avatar Mar 24 '21 12:03 lierdakil