From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: numbered equations in html export Date: Tue, 01 Jul 2014 15:29:22 +0200 Message-ID: <878uodryvh.fsf@nicolasgoaziou.fr> References: <87zjgucq06.fsf@gmail.com> <87oaxano52.fsf@nicolasgoaziou.fr> <877g3xd82k.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1y7D-0003I5-CF for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 09:29:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1y75-0005pB-JQ for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 09:28:55 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:57613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1y75-0005p3-Cb for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 09:28:47 -0400 In-Reply-To: <877g3xd82k.fsf@gmail.com> (Eric Schulte's message of "Tue, 01 Jul 2014 00:19:43 -0400") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Org Mode Mailing List Hello, Eric Schulte writes: > Nicolas Goaziou writes: >> Only captioned equations are numbered. Behaviour is undefined for other >> equations. > Why is this the default behavior? It looks to me like even when they're > present captions on equations aren't displayed for HTML or LaTeX export. LaTeX export uses its own numbering mechanism over which Org has no control. It is true that captions are not used in latex environments, but that's orthogonal to the problem. Let's put it aside for now. HTML export relies on Org's mechanism to number objects (i.e., `org-export-get-ordinal'). It conforms to numbering rules of other elements, like tables. It is important for tables to require a caption. Otherwise, a list of tables would have non-consecutive numbers. Equations are consistent with this. > Additionally I don't see why captions should be related to, or required > for, the numbering of equations. It is odd to reference a number used nowhere. For example, it is confusing to follow an "equation 2" link and see a page full of equations with no attached number below. Admittedly, this point is moot as long as captions are not visible on latex environments. I think this should be fixed instead. Another advantage is that you can always link to an unnumbered equation (just providing a name and no caption), which would not be possible if every named equation was numbered. > In a related issue which I believe is more convincingly a bug; links to > equations (whether numbered or not, with or without captions) don't > actually point anywhere. A link to the name is constructed, but no > anchor with the name is inserted into the page. This looks like a limitation from `org-html-latex-environment' (there is a comment about it) due to mathjax handling. > Would it make sense to change the current behavior as follows? > > 1. On HTML export all named equations are made into targets for a link > based on their name. It makes sense, there is just mathjax case to handle. It could go along with your other patch protecting characters, as a special treatment related to mathjax. > 2. All named and referenced equations are numbered. IMO it would be more sensible to handle captions for equations, for the reasons explained above. Regards, -- Nicolas Goaziou