--- org-latex.el 2010-08-20 15:58:28.000000000 +0200 +++ org-latex.mod.el 2010-08-20 16:06:26.000000000 +0200 @@ -1795,8 +1795,24 @@ (defun org-export-latex-fontify () "Convert fontification to LaTeX." + ;; max recursive level set to 2, + ;; so one level of nested emphasis works + (org-export-latex-fontify-recursive 2) +) + +(defun org-export-latex-fontify-recursive (reclevel) + "Convert fontification to LaTeX, recursive part." (goto-char (point-min)) (while (re-search-forward org-emph-re nil t) + (if (> reclevel 1) + (let ((mdata (match-data))) + (unwind-protect + ;; now it is ok to change the original match data. + (save-excursion + (save-restriction + (narrow-to-region (match-beginning 4) (match-end 4)) + (org-export-latex-fontify-recursive (1- reclevel)))) + (set-match-data mdata)))) ;; The match goes one char after the *string*, except at the end of a line (let ((emph (assoc (match-string 3) org-export-latex-emphasis-alist))