Merge branch 'maint' master
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 22 Sep 2014 15:43:30 +0000 (17:43 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 22 Sep 2014 15:43:30 +0000 (17:43 +0200)
Conflicts:
lisp/ox-latex.el

1  2 
lisp/ox-latex.el

@@@ -1971,18 -1836,14 +1971,19 @@@ INFO is a plist holding contextual info
          ;; number.  Otherwise, display description or headline's
          ;; title.
          (headline
 -         (let ((label
 -                (format "sec-%s"
 -                        (mapconcat
 -                         'number-to-string
 -                         (org-export-get-headline-number destination info)
 -                         "-"))))
 +         (let* ((custom-label
 +                 (and (plist-get info :latex-custom-id-labels)
 +                      (org-element-property :CUSTOM_ID destination)))
 +                (label
 +                 (or
 +                  custom-label
 +                  (format "sec-%s"
 +                          (mapconcat
 +                           #'number-to-string
 +                           (org-export-get-headline-number destination info)
 +                           "-")))))
-            (if (and (plist-get info :section-numbers) (not desc))
+            (if (and (not desc)
+                     (org-export-numbered-headline-p destination info))
                 (format "\\ref{%s}" label)
               (format "\\hyperref[%s]{%s}" label
                       (or desc