Hello Nicolas, On 2015-12-12 10:01, Nicolas Goaziou writes: > Hello, > > Alan Schmitt writes: > >> I have the following files I want to export to html: >> >> common.org: >> #+TITLE: Unison Binaries >> #+OPTIONS: toc:nil num:nil >> #+HTML_HEAD: >> >> * sidebar >> :PROPERTIES: >> :CUSTOM_ID: sidebar >> :HTML_CONTAINER_CLASS: container-sidebar >> :END: >> >> - [[file:index.org::#OSX][Mac OS X]] >> >> index.org (extract) >> #+INCLUDE: "common.org" >> >> * body >> :PROPERTIES: >> :CUSTOM_ID: mainbody >> :HTML_CONTAINER_CLASS: container-mainbody >> :END: >> >> ** Unison Binaries >> >> *** Mac OS X >> :PROPERTIES: >> :CUSTOM_ID: OSX >> :END: >> >> When I try to export index.org to index.html, I get: >> >> Reference "#OSX" in file "index.org" cannot be resolved without >> publishing >> >> What does it mean? And why can't the reference be resolved? Should I not >> use CUSTOM_ID for relative links? > > Usually, Org cannot resolve an external link if it doesn't know about > the external file, i.e., if it doesn't publish it. I see. > HTML export is a special case because resolving custom-id links is > trivial (the back-end doesn't alter them). So I guess we can use that to > make it work in this special case, even though it will fail in other > back-ends. > > I pushed the change in master. Let me know if it works for you. It almost works: the generated html uses two '#' instead of one:
  • Mac OS X
  • Should I remove the '#' from the link? Thanks a lot, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ (Updated December 13, 2015, Mauna Loa Obs.): 401.31 ppm