From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan L Tyree Subject: Re: [patch, ox] Unnumbered headlines Date: Sun, 21 Sep 2014 06:34:14 +1000 Message-ID: <541DE4C6.8040402@gmail.com> References: <87lhqzyubg.fsf@gmx.us> <87bnrrp0tb.fsf@nicolasgoaziou.fr> <87r40n6nrg.fsf@gmx.us> <87egwmaxte.fsf@nicolasgoaziou.fr> <87k34y701i.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVRMZ-0004Gt-1m for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 16:34:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVRMT-0006BM-5y for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 16:34:34 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:63093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVRMS-000695-W4 for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 16:34:29 -0400 Received: by mail-wg0-f47.google.com with SMTP id y10so1186703wgg.18 for ; Sat, 20 Sep 2014 13:34:21 -0700 (PDT) In-Reply-To: <87k34y701i.fsf@gmx.us> 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: Rasmus , emacs-orgmode@gnu.org Cc: tsd@tsdye.com Thanks very much for working on this, Rasmus. I'll try to test it out over the next couple of days. It really will make book production much nicer! Cheers, Alan On 21/09/14 02:02, Rasmus wrote: > Hi, > > I'm happy to finally be able to send an updated version of this patch > that touches most backends in lisp/, but not the manual. I have been > moving over the summer etc. > > You now specify unnumbered headlines with properties. I think this is > better since being unnumbered it's a pretty permanent state. It's > pretty hard to discover though, other than by looking at the output. > > So this works as expected: > > * Some headline > :PROPERTIES: > :UNNUMBERED: t > :END: > > There's no :NUMBERED property and :UNNUMBERED is hardcoded. > > I introduce a new function `org-export-get-headline-id` which returns > the first non-nil from the following list. There's a caveat: > CUSTOM_ID is ensured to be unique! Did I open the famous can of worm? > > 1. The CUSTOM_ID property. > 2. A relative level number if the headline is numbered. > 3. The ID property > 4. A new generated unique ID. > > Anyhow, `org-export-get-headline-id' ensures that we can refer to > unnumbered headlines, which was not possible before. Of course, in > LaTeX such ref to a \section* will be nonsense, so we could introduce > a \pageref here. I'm unsure about whether this conflicts > `org-latex-custom-id-as-label' which I had never seen until today > (also notes on this in patch). > > I have updated backends in lisp/, but I'm at most(!) an "expert" on > LaTeX. However, I have tested all backends to the best of my ability. > > Please feel free to test and let me know about any discrepancies! > > Cheers, > Rasmus > > PS: Not knowing or caring much about md, the links generated by it to > headlines seem wrong. Referring to headline 1 it only prints "1". > Should it be something like "[LABEL](1)"? > > -- Alan L Tyree http://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:typhoon@iptel.org