On Sunday, 29 April 2012 17:31:27 UTC+1, fiddlosopher wrote: > > +++ niczero [Apr 29 12 06:49 ]: > > It would be very useful if there was a --qualified_auto_links that > made > > all > > auto links be qualified with their chapter ref. > > Currently > > # Foo > > ## Bar > > means the subheading gets an auto link of "bar", but I'd like the > > option > > of having it as "foo_bar" so it's not impacted by the possibility of > > another chapter having a (sub)heading of 'Bar'. > > Pandoc won't produce duplicate identifiers. If you have two > sections named "Bar", the first will get the id "bar", and the > second will get "bar-1", etc. See the README section on header > identifiers. > > Also see the --id-prefix option. > > John > ---- The trouble is, my links are generated by code, and the code can't easily predict whether it should link to bar-23 or bar-32; in fact it currently doesn't know that 'bar' is wrong, so all links end up pointing at the first instance of 'bar'. However it's natural to know which chapter you're linking to, so having a predictable per-chapter prefix would solve such problems. This isn't just a problem with generated links, it gets much worse if you're trying to do the job manually. My reading of '--id-prefix' suggests I can't use it per chapter and still have inter-chapter links working. Is that right? Nic -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pandoc-discuss/-/S_X_WkCIJNAJ. To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/pandoc-discuss?hl=en.