From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aN9MKnNoU18LKQAA0tVLHw (envelope-from ) for ; Sat, 05 Sep 2020 10:29:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wHomJnNoU1/ycAAA1q6Kng (envelope-from ) for ; Sat, 05 Sep 2020 10:29:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 14D0E9402C8 for ; Sat, 5 Sep 2020 10:29:07 +0000 (UTC) Received: from localhost ([::1]:37944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEVRQ-00024I-Rf for larch@yhetil.org; Sat, 05 Sep 2020 06:29:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEVR7-000248-Fi for emacs-orgmode@gnu.org; Sat, 05 Sep 2020 06:28:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:32929) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEVR6-0003EW-EE; Sat, 05 Sep 2020 06:28:44 -0400 Received: from [2a01:e35:2fe1:f780:68c6:8f4c:dae1:2381] (port=39536 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1kEVR5-0004KA-JA; Sat, 05 Sep 2020 06:28:43 -0400 Received: by guerry (Postfix, from userid 1000) id 6775A1A60D46; Sat, 5 Sep 2020 12:28:41 +0200 (CEST) From: Bastien To: Marco Falconi Subject: Re: Bug: Exporting internal link to special latex block [9.3.7 (9.3.7-14-gb2b587-elpa @ /home/lobo/.emacs.d/elpa/org-20200720/)] Organization: GNU References: <87lfjd6kmk.fsf@uniroma3.it> X-Woof-Bug: confirmed Date: Sat, 05 Sep 2020 12:28:41 +0200 In-Reply-To: <87lfjd6kmk.fsf@uniroma3.it> (Marco Falconi's message of "Tue, 21 Jul 2020 15:52:19 +0200") Message-ID: <87d0305xgm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: Xh6Bu4/xRXbq Hi Marco, Marco Falconi writes: > I am trying to export to html a labeled latex special block (a theorem > environment, defined by #+begin_theorem [...] #+end_theorem ). I have named the theorem with > > #+NAME: thm:mv (I also tried with #+LABEL: and the behavior described below does not change). > > I have a link to such block later in the body, in the form [[thm:mv]]. The link works > perfectly in the org file, however it is exported incorrectly to html. > > In fact, while the theorem environment gets exported in the html as > >
>

> [...] >

>
> > , > > the link does not href to "#thm:mv" as expected, but to an auto-generated label: > >

> 1 >

> > I have tried to play around a bit with export options, but to no avail. > > Is this a known bug? I also confirm this bug. I've had a quick look. It looks like `org-export-get-reference' get fooled by trying to provide with a "new reference". I hope Nicolas can have a look because this area of the code is quite complexe. Thanks, -- Bastien