From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id UFqcHUjNFWfjfgAAqHPOHw:P1 (envelope-from ) for ; Mon, 21 Oct 2024 03:40:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id UFqcHUjNFWfjfgAAqHPOHw (envelope-from ) for ; Mon, 21 Oct 2024 05:40:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ghRzc0BA; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729482056; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=5ivYB+rtWWUZxzDQrhLk7UR+EsirNBIJAyIbvO7gmv4=; b=g5fTJj8A9OULf5NiUDeR4yhLg9HNIK5QVgnb5I2jMuuh4RE9QqDVao8Z98bEoFd9gBFKQv FjSjBlEemXWsFn/O6RfXAx3hSqmcS4pLbQLWdsayZfTLreN7mAioo+442tZudqnxbI2/S8 fJmNwXP0zkdDf+A2UF8wfUof9zOuWDVSOxSKmaH7wW0S6c/TkfGii6g6yyxEu1XAqlkK5y utmB6HhPZhwHsH+YEkR7tXSRTcUXaz/aU2C4m/HPmikV6H8sfOwWOqGGRiDqkrqJJzhtHN lN+fiuz10Pxe7H3fkxFBxI1+xH/waJkBV+TTICxY5LOzYF7jzOWvGfKV1CTsMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729482056; a=rsa-sha256; cv=none; b=KGVVUjVerBnmT/6/bZq5N2AP4mX+hTKbIbJM4aCAAk1efr0t0ftoHK/JaU+6/nxaB/mnTa wcJVY+ZSHNzgbxjtDfdBiPGlECHu3SpGsf1GlJouztcC0JqcHcvh98Glf/SHy71MdFEq/A RCGFmYkWOSP1excKqLZvuyRS95q81RPoxZMDHvivzrPsRIQLhdOWzAm6NEhMBGGUlFhN7f t0aVMKC2kgB2vp/aJFX+kdg9hPsogOz9uWdIEjaoGg0+QwFUIUlP2XpWMx3hSt0uy07GHS 7kWHHDyMg5amRNSwtSCbpesvsW9tgRsIzMG9g8dL68flnB2dHjYIm+9OZXlXWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ghRzc0BA; 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"; dmarc=pass (policy=none) header.from=gmail.com 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 03FE281A69 for ; Mon, 21 Oct 2024 05:40:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2jH8-0004F5-Io; Sun, 20 Oct 2024 23:40:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2jH6-0004EW-5q for emacs-orgmode@gnu.org; Sun, 20 Oct 2024 23:40:08 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2jH4-00021c-8D for emacs-orgmode@gnu.org; Sun, 20 Oct 2024 23:40:07 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20c803787abso30124995ad.0 for ; Sun, 20 Oct 2024 20:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729482004; x=1730086804; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5ivYB+rtWWUZxzDQrhLk7UR+EsirNBIJAyIbvO7gmv4=; b=ghRzc0BAX8o5c8eAm1ZAC1pBnnVju4b3leGEk1IjD+JBEE5zQxX5z24dl8pzwfK7b2 9K/78HroCSj2JLLK06Ym2Hsd07DYhipIRrICZdBPekykE8y3fDk3idgR2O8acygCTH37 RVTBhywrlrwRWaH8IsZ4gsVa+qEiirJYJg7K5YVwcr8jrIdgrAZ+wOpwUX25rAlUAD7G QhnMcVpAreplAmjeC+OdvIVutCMyx0IX7UkjhXLPGodjJbIaY98beqjJ4qmnPFPhOQjO aUmGO5j+/q2thkgGNgY/J62vjPsAQt95s8wOxsIGx+zpDR6nPAWvgKDhB01dxhvQoJmR lNIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729482004; x=1730086804; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5ivYB+rtWWUZxzDQrhLk7UR+EsirNBIJAyIbvO7gmv4=; b=bpgN9SEHA59bbepDOeHp73TZ58k2b/u8Rodo6R7SAL+fufnc2Z+sjUsO7vT4hIzQnE Q2my90WkQod3ZfKScGIriuroh86MdOKoI/s0/RZx04XKjmGQHFJfHZDvfW3ZF/RjCjmt pHre9BIysGqnLJQfsqnRKcUpAA63SZHBTsxxZh8/fIwLxZ5osIl2W6VbudSt7pltUthF 62Ga+ZPbny0zBgXnNxTb5UWIWUTrmLfiS5xLA6ljESsa0cqRavkl3YLZTB9V3gKi5lUo vWNrad6ibGTNfHpBneIqhN42saB4oJlcEkYNeG9GcbCgALlADonBNyVWWPJvK3rZb6ya NwYA== X-Gm-Message-State: AOJu0Yz6gMxZJcD0c5GjgILwQHshluVEVE092WP3X2JUyAet+XvQJAsn E8JYaaaFLOYJo1vEkKLmWyexm78q3HBrwIL0fAKUV2RfljGi7GMsUrI0fA== X-Google-Smtp-Source: AGHT+IHMJdmF3ZkBIyAhJ/7SXgyUy4fG3tJa19zKg6fA7tLQeZPTeRMPqxthwCje8h6ao9qINnEg6Q== X-Received: by 2002:a17:902:e847:b0:20b:a73b:3f5 with SMTP id d9443c01a7336-20e5c14b4bamr152696975ad.14.1729482003969; Sun, 20 Oct 2024 20:40:03 -0700 (PDT) Received: from ?IPV6:2401:4900:1c5e:b98:599f:1de1:4ff3:8acf? ([2401:4900:1c5e:b98:599f:1de1:4ff3:8acf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e7eee6365sm16639725ad.39.2024.10.20.20.40.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Oct 2024 20:40:03 -0700 (PDT) Message-ID: Date: Mon, 21 Oct 2024 09:10:00 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How can I export a table to HTML with header and footers To: "Dr. Volker Zell" Cc: emacs-orgmode@gnu.org References: <8c43d08b-f13b-4f43-82d2-bb042eb40cf3@gmail.com> <9f759599-e81b-430c-b152-16a6edcf6a37@volkerzell.de> Content-Language: en-US From: Raghavendra Nyshadham In-Reply-To: <9f759599-e81b-430c-b152-16a6edcf6a37@volkerzell.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=raghnysh@gmail.com; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.52 X-Spam-Score: -3.52 X-Migadu-Queue-Id: 03FE281A69 X-Migadu-Scanner: mx13.migadu.com X-TUID: J5l8k0ni8fXa On 2024-10-20 18:35 +05:30, Dr. Volker Zell wrote: > how would you do it with the export-filter mechanism of Org mode... > mayb this comes in handy later For example, as follows. #+title: Org Tables to DataTables #+html_doctype: html5 #+html_head: #+html_head: #+html_head: #+html_head: #+html_head: This is an example table. #+attr_html: :id example :class cell-border hover compact :width 100% | Name | Position | Office | |-------------+------------------+---------------| | Tiger Nixon | System Architect | Edinburgh | | Ashton Cox | Technical Author | San Francisco | ------------------------------------------------------------ This is another example table. #+attr_html: :id another-example :class display | Author | Title | Shelf | |-------------------+-------------------------+-------| | Capote, Truman | In cold blood | D3B | | Chandler, Raymond | The high window | D3B | | Dai, Mamang | The legends of Pensam | D3B | | Desai, Kiran | The inheritance of loss | D3B | | Farrell, J. G. | The hill station | C1B | # https://list.orgmode.org/87pprzuc74.fsf@gmx.us/T/#m0d6059de7f7301a19faee0de340d9067276f24cb #+begin_src emacs-lisp :exports results :results none ;; List of lists of the form `(id footer1 footer2 ...)'. (setq my-tfoot-specs '(("example" "Name" "Position" "Office") ("another-example" "Author" "Title" "Shelf"))) (defun my-insert-tfoot (tfoot-spec) "Insert a tfoot as per TFOOT-SPEC in the current buffer." (goto-char (point-min)) (let* ((id (car tfoot-spec)) (footers (cdr tfoot-spec)) (regex (rx (and (literal (format "id=\"%s\"" id)) (*? anychar) "")))) (when (re-search-forward regex nil t) (insert "\n" (mapconcat #'identity footers "") "")))) (defun my-insert-tfeet (text backend _info) "Insert tfeet for tables in TEXT in HTML export." (when (org-export-derived-backend-p backend 'html) (with-temp-buffer (insert text) (mapc #'my-insert-tfoot my-tfoot-specs) (buffer-string)))) (make-local-variable 'org-export-filter-final-output-functions) (add-to-list 'org-export-filter-final-output-functions #'my-insert-tfeet) #+end_src