From 9a60b93d932393eda4a216d79bdcd04c44dd3a24 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 16 May 2014 10:33:20 +0200 Subject: [PATCH] ox-latex: Fix export of inlinetasks with empty contents * lisp/ox-latex.el (org-latex-inlinetask): Skip body if contents are empty. Thanks to Michael Weylandt for reporting it and providing a preliminary patch. http://permalink.gmane.org/gmane.emacs.orgmode/86384 --- lisp/ox-latex.el | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 53cc54f00..2c0152b8c 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -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