]> code.delx.au - gnu-emacs/blobdiff - lisp/org/ox-latex.el
Merge from emacs-24; up to 2014-07-16T17:06:12Z!rgm@gnu.org
[gnu-emacs] / lisp / org / ox-latex.el
index 53cc54f00f77befc4e0132571b718379cd54902a..2c71f7d785a3f6296e772ce90932e5ddaca8f2cd 100644 (file)
@@ -524,7 +524,7 @@ When nil, no transformation is made."
   :package-version '(Org . "8.0")
   :type '(choice
          (string :tag "Format string")
-         (const :tag "No formatting")))
+         (const :tag "No formatting" nil)))
 
 
 ;;;; Text markup
@@ -689,9 +689,9 @@ These options are supplied as a comma-separated list to the
 a list containing two strings: the name of the option, and the
 value.  For example,
 
-  (setq org-latex-listings-options
+  \(setq org-latex-listings-options
     '((\"basicstyle\" \"\\\\small\")
-      (\"keywordstyle\" \"\\\\color{black}\\\\bfseries\\\\underbar\")))
+      \(\"keywordstyle\" \"\\\\color{black}\\\\bfseries\\\\underbar\")))
 
 will typeset the code in a small size font with underlined, bold
 black keywords.
@@ -1526,17 +1526,16 @@ holding contextual information."
               (when priority (format "\\framebox{\\#%c} " priority))
               title
               (when tags (format "\\hfill{}\\textsc{:%s:}"
-                                 (mapconcat 'identity tags ":"))))))
-        (format (concat "\\begin{center}\n"
-                        "\\fbox{\n"
-                        "\\begin{minipage}[c]{.6\\textwidth}\n"
-                        "%s\n\n"
-                        "\\rule[.8em]{\\textwidth}{2pt}\n\n"
-                        "%s"
-                        "\\end{minipage}\n"
-                        "}\n"
-                        "\\end{center}")
-                full-title contents))))))
+                                 (mapconcat #'identity tags ":"))))))
+        (concat "\\begin{center}\n"
+                "\\fbox{\n"
+                "\\begin{minipage}[c]{.6\\textwidth}\n"
+                full-title "\n\n"
+                (and (org-string-nw-p contents)
+                     (concat "\\rule[.8em]{\\textwidth}{2pt}\n\n" contents))
+                "\\end{minipage}\n"
+                "}\n"
+                "\\end{center}"))))))
 
 
 ;;;; Italic
@@ -1810,7 +1809,7 @@ INFO is a plist holding contextual information.  See
      ;; description.
      ((string= type "radio")
       (let ((destination (org-export-resolve-radio-link link info)))
-       (when destination
+       (if (not destination) desc
          (format "\\hyperref[%s]{%s}"
                  (org-export-solidify-link-text
                   (org-element-property :value destination))
@@ -1843,7 +1842,8 @@ INFO is a plist holding contextual information.  See
                           '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