From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] ox-latex.el --- CUSTOM_ID-as-section-label-in-latex-export Date: Mon, 24 Jun 2013 18:48:17 +0200 Message-ID: <87ppvbv4j2.fsf@gmail.com> References: <87wqpjxyoo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur9w1-0008Ju-53 for emacs-orgmode@gnu.org; Mon, 24 Jun 2013 12:48:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur9vz-0005pN-3N for emacs-orgmode@gnu.org; Mon, 24 Jun 2013 12:48:09 -0400 Received: from mail-wg0-x236.google.com ([2a00:1450:400c:c00::236]:53630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur9vy-0005oY-UG for emacs-orgmode@gnu.org; Mon, 24 Jun 2013 12:48:07 -0400 Received: by mail-wg0-f54.google.com with SMTP id n11so8697885wgh.9 for ; Mon, 24 Jun 2013 09:48:06 -0700 (PDT) In-Reply-To: <87wqpjxyoo.fsf@gmail.com> (Eric Schulte's message of "Mon, 24 Jun 2013 10:26:15 -0600") 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: > From c087e84a8fd80b277bf064eb31f1b893c25f1b4a Mon Sep 17 00:00:00 2001 > From: Eric Schulte > Date: Mon, 24 Jun 2013 10:25:03 -0600 > Subject: [PATCH] CUSTOM_ID as section label in latex export > > When exporting to HTML, custom ids of headlines become references to > the resulting section in the exported document. This is both more > stable and more readable than using section numbers. This commit adds > this option to the latex exporter. Thanks for the patch. Though, it isn't as stable as relying on section numbers: there is no guarantee the custom id will be unique nor that it will not contain any forbidden character. This patch also breaks cross references, which expects labels to be built from section number (see `org-latex-link'). Since you (almost?) never need to write \ref{custom-id} in the Org buffer, I don't think it is bad to keep current label system. Another option would be to have both \label{sec-...} and \label{custom-id}. But it would require the user to check validity of its id. Regards, -- Nicolas Goaziou