Sfoglia il codice sorgente

contrib/lisp/org-e-texinfo: Properly format table heading rows

* contrib/lisp/org-e-texinfo.el (org-e-texinfo-table-row): Check if the row is part of the first row group.  If it is treat it as @headitem rather than a normal @item.
Jonathan Leech-Pepin 12 anni fa
parent
commit
2b9cc23dd0
1 ha cambiato i file con 13 aggiunte e 1 eliminazioni
  1. 13 1
      contrib/lisp/org-e-texinfo.el

+ 13 - 1
contrib/lisp/org-e-texinfo.el

@@ -1623,7 +1623,19 @@ a communication channel."
   ;; Rules are ignored since table separators are deduced from
   ;; borders of the current row.
   (when (eq (org-element-property :type table-row) 'standard)
-    (concat "@item " contents "\n")))
+   (let ((rowgroup-tag
+	  (cond
+	   ;; Case 1: Belongs to second or subsequent rowgroup.
+	   ((not (= 1 (org-export-table-row-group table-row info)))
+	    "@item ")
+	   ;; Case 2: Row is from first rowgroup.  Table has >=1 rowgroups.
+	   ((org-export-table-has-header-p
+	     (org-export-get-parent-table table-row) info)
+	    "@headitem ")
+	   ;; Case 3: Row is from first and only row group.
+	   (t "@item "))))
+     (when (eq (org-element-property :type table-row) 'standard)
+       (concat rowgroup-tag contents "\n")))))
 
 ;;; Target