From de9453852106fbdb542fa4751c355fd02da052bd Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 4 Nov 2010 08:03:48 +0100 Subject: [PATCH 1/2] inlinetasks: fix latex export wrt conversion to lists * org-inlinetask.el (org-inlinetask-export-handler): Remove protection from @ so it can be removed during LaTeX export. Remove terminator as it is already handled by org-exp.el. --- lisp/org-inlinetask.el | 26 +++++++++++--------------- 1 files changed, 11 insertions(+), 15 deletions(-) diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index c000999..c305d56 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -183,15 +183,13 @@ Either remove headline and meta data, or do special formatting." (setq headline (concat (if (match-end 2) (concat - (org-add-props - (format - "@ %s@" - (if (member (match-string 2 headline) - org-done-keywords) - "done" "todo") - (match-string 2 headline) - (match-string 2 headline)) - nil 'org-protected t) + (format + "@ %s@" + (if (member (match-string 2 headline) + org-done-keywords) + "done" "todo") + (match-string 2 headline) + (match-string 2 headline)) " ") "") (match-string 4 headline))) (when content @@ -200,11 +198,11 @@ Either remove headline and meta data, or do special formatting." (if (string-match "[ \t\n]+\\'" content) (setq content (substring content 0 (match-beginning 0)))) (setq content (org-remove-indentation content)) - (if latexp (setq content (concat "\\quad \\\\\n" content))))) + (setq content (if latexp (concat "\\nbsp\\\\ \\quad " content))))) (insert (make-string (org-inlinetask-get-current-indentation) ?\ ) - "- ") + "- ") (setq indent (make-string (current-column) ?\ )) - (insert headline " ::") + (insert headline " :: ") (if content (insert (if htmlp " " (concat "\n" indent)) (mapconcat 'identity (org-split-string content "\n") @@ -212,7 +210,7 @@ Either remove headline and meta data, or do special formatting." (insert "\n")) (insert indent) (backward-delete-char 2) - (insert "THISISTHEINLINELISTTEMINATOR\n")))))) + (unless latexp (insert "THISISTHEINLINELISTTEMINATOR\n"))))))) (defun org-inlinetask-get-current-indentation () "Get the indentation of the last non-while line above this one." @@ -266,8 +264,6 @@ Either remove headline and meta data, or do special formatting." '(add-hook 'org-font-lock-hook 'org-inlinetask-fontify)) (eval-after-load "org-html" '(add-hook 'org-export-html-final-hook 'org-inlinetask-remove-terminator)) -(eval-after-load "org-latex" - '(add-hook 'org-export-latex-final-hook 'org-inlinetask-remove-terminator)) (eval-after-load "org-ascii" '(add-hook 'org-export-ascii-final-hook 'org-inlinetask-remove-terminator)) (eval-after-load "org-docbook" -- 1.7.3.2