From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Exporting in html with numeric references to headlines Date: Mon, 15 Jul 2019 18:54:36 -0400 Message-ID: <8736j629jn.fsf@alphaville.usersys.redhat.com> References: <20190715171632.GA24689@om.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33369) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn9rs-00042M-5A for emacs-orgmode@gnu.org; Mon, 15 Jul 2019 18:54:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn9rr-0004Io-0X for emacs-orgmode@gnu.org; Mon, 15 Jul 2019 18:54:48 -0400 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:45598 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hn9rq-0004HY-QG for emacs-orgmode@gnu.org; Mon, 15 Jul 2019 18:54:46 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hn9rn-000PED-MJ for emacs-orgmode@gnu.org; Tue, 16 Jul 2019 00:54:43 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Shérab writes: > Dear all, > > Assume the following document: > > === > > #+title: test1 > > * Introduction > > Monads will be explained in chapter [[#monads]] > > * Monads > :PROPERTIES: > :CUSTOM_ID: monads > :END: > > Welcome to the monads chapter. > > === > > When I export this to html, the paragraph in the introduction says: > > Monads will be explained in chapter 2 > > with "2" being a link, which is what I am expecting. However the link > does not work and it seems the "#monads" anchor is actually not created. > I can also observe that the links in the table of contents do not seem > to work either. > Am I doing something wrong? I also tried different variations with > <> but was not able to make anything work. As Bruno Barbier points out, you are probably OK: you just have to add more stuff in the first chapter, so that when you click the link, the change is visible. Another way to see it is to look at the HTML file that is produced: if that contains what you expect, then you should be OK. That is a technique that is often useful in debugging export problems, e.g. I often export to PDF (via LaTeX) and I look at the produced LaTeX file (and sometimes tinker with it and process it until I figure out what's wrong). In this case, the HTML looks like this: ,---- | ... |
|

1 Introduction

|
|

| Monads will be explained in chapter 2 |

|
|
|
|

2 Monads

|
|

| Welcome to the monads chapter. |

|
|
| ... `---- which looks correct: the #monads href links the

tag. To test Bruno's hypothesis, I even added a bunch of ,---- | Lorem ipsum
`---- lines between the chapters right in the HTML file to make the second chapter move down "below the fold" and see whether clicking the link works: it did. HTH. -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler