From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kCpBHVDcfmIoFQEAbAwnHQ (envelope-from ) for ; Sat, 14 May 2022 00:31:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6JM0HVDcfmK5OAAA9RJhRA (envelope-from ) for ; Sat, 14 May 2022 00:31:44 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B15E43ABE for ; Sat, 14 May 2022 00:31:44 +0200 (CEST) Received: from localhost ([::1]:58662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npdp0-0004hw-Pi for larch@yhetil.org; Fri, 13 May 2022 18:31:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npdoT-0004fs-W4 for emacs-orgmode@gnu.org; Fri, 13 May 2022 18:31:10 -0400 Received: from mx0b-000b4001.pphosted.com ([148.163.143.220]:58212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npdoS-00077H-CX for emacs-orgmode@gnu.org; Fri, 13 May 2022 18:31:09 -0400 Received: from pps.filterd (m0166823.ppops.net [127.0.0.1]) by mx0b-000b4001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24DJIXFt012653 for ; Fri, 13 May 2022 22:31:07 GMT Received: from az1-msa-prod02.server.ufl.edu (az1-msa-prod02.server.ufl.edu [128.227.74.23]) by mx0b-000b4001.pphosted.com (PPS) with ESMTPS id 3g150f0ekm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 13 May 2022 22:31:07 +0000 Received: from X570 (ip24-170-202-143.ga.at.cox.net [24.170.202.143]) (Authenticated sender: presnell) by az1-msa-prod02.server.ufl.edu (Postfix) with ESMTPSA id 7C5B04005E for ; Fri, 13 May 2022 18:31:06 -0400 (EDT) User-agent: mu4e 1.6.10; emacs 29.0.50 From: Brett Presnell To: emacs-orgmode@gnu.org Subject: Multi-line headers with longtable Date: Fri, 13 May 2022 18:29:34 -0400 Message-ID: <87mtfloyj9.fsf@ufl.edu> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: w-HKTWI99IygB0ERMoZbix1o9XXsCHr0 X-Proofpoint-ORIG-GUID: w-HKTWI99IygB0ERMoZbix1o9XXsCHr0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-13_11,2022-05-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 spamscore=0 adultscore=0 phishscore=0 impostorscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=785 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205130096 Received-SPF: pass client-ip=148.163.143.220; envelope-from=presnell@member.fsf.org; helo=mx0b-000b4001.pphosted.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652481104; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=3FLO5znb39M9YZ+uuXU8RDkPWGnz2boAjh2N9ts/vB0=; b=HeqQn1aidUJybgUVhixKebijGZYYUuZep5kBqcTkKc8ivxi5F7jfcu9a0hH1jo+pkxuuYE PQ4FNB8KR1D9UrckzqMAJlUqJzZh+OSvRpGTPItPcxvyxTNI2SB7bmHQaT8BLkl/3ovJmI U3EmYX8cLcAsHZHFCmNsSO/ka/KyUmzoZ+ate8UyaOokNJje7H2K35iub0NJGFdiTV5YBn WYxDiTrUdLY09oMBMMe1AASdM/NE2TM06OzbeMKQxGWVIkggl5GEPi8Ovs5865cSEheR6A pS+9gnSDqOwyHZx316Nl4Ju94oxDV/O0NcKj4/G0F1VQM3QBlNw89GMdEAF+qg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652481104; a=rsa-sha256; cv=none; b=NmA8ho362GYZDWrsVappHhQrBKEP+rVwSMZuH3rfVs48N6DSlwacbF2g5smgcvz5p/iAwI Y9kTAbvuWn/ZLiFjxC+VCZF6DvpPVE8FbO5tKlja7CEQDg3VTc7xtR/z/G53U/zZ0JXgYH ehRo1Dgz7NOZyjN7Zgn8umgAdZrgPND24x4f0ZpwOt2OpFxGAdgziG0icn36feNAxzJ2tN zfrONBV05NmhxUDNsF1mKkjarx14RSIpt2YlXokEQOndQp3sHLbHA0C7BUUZS/uv9hWmlG W2JA6CmPhnxRCGgGPHLZRqHU5YMd/boP7xo/55U8fsVTpfExcQvAlirE5CjYxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=member.fsf.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.17 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=member.fsf.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1B15E43ABE X-Spam-Score: 2.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: MJPP4FdYN6A1 Sorry I sent this twice. Forgot that I was subscribed from my member.fsf.org email address. I have come upon a problem with export of multi-line table headers in long (multi-page) tables. I can't imagine that this hasn't come up before, but I wasn't able to google up any other reports, so ... As a simple example (using \pagebreak to reduce the number of rows required to illustrate the problem), exporting the org table #+attr_latex: :environment longtable | First | Second | | Column | Column | |--------------+--------| | a | 1 | | b | 2 | | \pagebreak c | 3 | | d | 4 | to LaTeX yields \begin{longtable}{lr} First & Second\\ Column & Column\\ \hline \endfirsthead \multicolumn{2}{l}{Continued from previous page} \\ Column & Column \\ \hline \endhead \hline\multicolumn{2}{r}{Continued on next page} \\ \endfoot \endlastfoot \hline a & 1\\ b & 2\\ \pagebreak c & 3\\ d & 4\\ \end{longtable} \end{document} Notice that only the "firsthead" has the multi-line table header; on the 2nd page the columns will both have the one-line header "Column" when I/we want the full column headers on every page. This is using org version 9.5.3 and GNU Emacs 29.0.50 (snapshot). I think that the problem occurs in the handling of the header in org-latex-table-row. The 2nd row ends the header, so in the excerpted code below it is output as =contents=, i.e., it gets inserted for the 4th %s. Of course this means that the previous lines of the header are missing. ;; Special case for long tables. Define header and footers. ((and longtablep (org-export-table-row-ends-header-p table-row info)) (let ((columns (cdr (org-export-table-dimensions (org-export-get-parent-table table-row) info)))) (format "%s \\endfirsthead \\multicolumn{%d}{l}{%s} \\\\ %s %s \\\\\n %s \\endhead %s\\multicolumn{%d}{r}{%s} \\\\ \\endfoot \\endlastfoot" (if booktabsp "\\midrule" "\\hline") columns (org-latex--translate "Continued from previous page" info) (cond ((not (org-export-table-row-starts-header-p table-row info)) "") (booktabsp "\\toprule\n") (t "\\hline\n")) contents (if booktabsp "\\midrule" "\\hline") (if booktabsp "\\midrule" "\\hline") columns (org-latex--translate "Continued on next page" info)))) ;; When BOOKTABS are activated enforce bottom rule even when ;; no hline was specifically marked. ((and booktabsp (not (org-export-get-next-element table-row info))) "\\bottomrule"))))))