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 AGa+HFxkYGLYLQAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 21:51:56 +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 UOfJHFxkYGKkcgAA9RJhRA (envelope-from ) for ; Wed, 20 Apr 2022 21:51:56 +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 DA8423C766 for ; Wed, 20 Apr 2022 21:51:55 +0200 (CEST) Received: from localhost ([::1]:57350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhGMk-0004qT-W1 for larch@yhetil.org; Wed, 20 Apr 2022 15:51:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhFQ3-000602-6O for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 14:51:15 -0400 Received: from mail-vi1eur04olkn0815.outbound.protection.outlook.com ([2a01:111:f400:fe0e::815]:9477 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhFQ0-0007gD-Dq for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 14:51:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mjAFPyTckmNglv9znQhnn9aRecE0aKV2Z4kyX0uyDEPe2jP2NMO1PaBLnmQW2M00SQ+KuHdl/bwUuL8kml3lSul15yuH08kUX7mm+9Gd9bvTYiFWIUMpvgBqiOybVw4cA+2bpZ2UDCGl2f5XbNm2Nqjov6uUl1vExrRJwXo7/aMz6EMPG3MdOc/XmTE2nm1ld5W2EQnYRC6IZUKYofyGOcgiP8H17x2MQ3juer9ZmEmkiIdB4FYaa74VVZCpqMe1El4vuYnzTYS4IiinIis38ph/c2JBV8N3BZbKFfBF25tEGYhAt1IwsvqmLj1DDtXYri5cAn9wxB+5jCeuOBwD6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+lhJAS+j+A3o2fkSsRFs+mmQC6ibfOA2MlSV2pYPCu8=; b=ESe5CLYDH60ujVlRiwu62BajImFrv+tiEgiWFDmJmFNuig5+tS2ETSkSvPl9/dxWKlQWxPISU1mBVckHCZU6iuLIbUneuByZxQgUmScy+PPSEqvptA7BGjJJyTjZUzHxzPTAxtx+9Apyk6CrYvg7F09ERJIztxEgKM4kb3Icg1g/mcuCnMZ7+AfM8pQdzORBCOccStQH3SCX2DZr4VmR8yKShRGkj1mCEoKUeZ2540glCcnlAZicPqP5wSJ0VBu21bED/fnS6xIAw0iyY+ZE09ievbGcTnmIIwj1GbL/J94/iG5MNNBm+eYo/hxvr4+tI5ITXRWXIbXnhQ4jR6HhwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM0PR04MB5649.eurprd04.prod.outlook.com (2603:10a6:208:12a::21) by PAXPR04MB8390.eurprd04.prod.outlook.com (2603:10a6:102:1c2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Wed, 20 Apr 2022 18:46:05 +0000 Received: from AM0PR04MB5649.eurprd04.prod.outlook.com ([fe80::5994:7147:dc2c:bfaa]) by AM0PR04MB5649.eurprd04.prod.outlook.com ([fe80::5994:7147:dc2c:bfaa%3]) with mapi id 15.20.5164.026; Wed, 20 Apr 2022 18:46:05 +0000 From: =?Windows-1252?Q?Vitus_Sch=E4fftlein?= To: "emacs-orgmode@gnu.org" Subject: WG: ox-html: exporting LaTeX-environments Thread-Topic: ox-html: exporting LaTeX-environments Thread-Index: AQHYTdupT0bZsziPkUufbTt6UunTUazrvQgAgAUIivuACGucFw== Date: Wed, 20 Apr 2022 18:46:05 +0000 Message-ID: References: <87lewax3rt.fsf@dell-desktop.WORKGROUP> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [lVlP0AVz00dHWbWULYF/mGnwX0IjAxSt] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5976b1eb-ca65-4fef-1326-08da22fe06d9 x-ms-traffictypediagnostic: PAXPR04MB8390:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XMU5wkx8ylhzW0FFB3DQC1Zon0ShTuknMRwHo5ySYIdOvKnA1nlKgD2sNWWO2xDEIPX0nlB5x8Dm0CC9RjXVI5wYlWwQwT9nAEqpSuhRBFSqLFelTtuCChSFPPn1ReAKz33msTS6Rz1ymJ5HI8jdBQIl0EjRaryDK2jqhKfQdSrRteuDqmLz6VbVrKlmI3Onlxli7bbwCn9Wv3bcyA+6Ogjn6PlkvV/tpi22LksVD9eGZdQhuX5sdL8HUYyygN3c87e+bW0mfgiyri+BaSL115KJlWbahi3y2Rrmlwc58lkmWYBp0FKWPeow7Fcb7ZUa98YrTD1iwQJitql4sISsm2x/92syQjHehDyjuzjitfLYBPZ7VPDPK0fEmVmlo7Ow3wwaY5WvuZi4epDVKyBj/dFkIcmo3Ul5F4PnItZ9lB6rv5mgH5/z6JTUL9KKdYEvqP+qCuiX6/Gg5cTRG6UR3G6M73yRAQCbggLlBIKEiiTFcRiGJJGCmNdyLyUM7FUGlvH0Do73+e+P0ch2V1Ulxbp5708SgQcB2FfOuNhpbpVfBIoSpa9BzjctimikoQ8IhxVZBL4EkAWXvTlLlzar95Tq1hqP8+zAkslpB7yWFXA6dAOJaHacjcLr4F6Hqqfd x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?cRuvX3jbG6ufWV60ZMJ4NR8W9TpWmzf3GpwPjeL7jVrE4tTjX9KC5Us/?= =?Windows-1252?Q?eEHIz86ZzREZTYIyBy+l2MCKVQW3uNGdSeximdy+o/6mWKqRjS+dtCrG?= =?Windows-1252?Q?zCM9Y0vzQ2qyEG1krQBKRFEbo+N5Ct2UV8CbsSZ+cfUjUeBnTCgbdGgv?= =?Windows-1252?Q?SItaq1ewOwkEYGTynv3YXNc6+JhOudlCdtUF9SJKuJwLTDqOzcKsrYIj?= =?Windows-1252?Q?mds5n2Qa+xX0Llc/a5jPFNSNPdp91CD2ER1yt1sA+kmhefwaRNAZwotV?= =?Windows-1252?Q?h9Cc0D4YYL6dUSzMxha3qt9Dtjq2y/07S36slgXAH52DuQlxe6KI18o7?= =?Windows-1252?Q?Qx7N+DWfPj4Rv7/egtf+MaeQtrKxQTVWykullP7Q++Si/kdK5J6u7qR/?= =?Windows-1252?Q?V42qc61uk+blX03I0LwwiFEoTeYE3E5uoK6wz4cX20cyoK3VHoLK19dl?= =?Windows-1252?Q?i6YK23/p+510tpGqiA8w5tQMI3ywyr4cfW8sVusMi5ZTaoohk8a09osC?= =?Windows-1252?Q?/tsMiyIU3gbVv+eVBWgweBnUUcCk7M9Yb07H4/TO6laaWjsYduJb/g4+?= =?Windows-1252?Q?iQI2IX3IpBCzUfArBTjNI3gppfTeJhjRcl6zFiX28TKBTqkGKkCe6qNQ?= =?Windows-1252?Q?PIkoY/Bk+OfagZ+R2qgaiOVX6XT/qLhORmuyUyVsikauWgExgdCJE2AI?= =?Windows-1252?Q?ycL+1uKkYBKfP6Ezuu7LJOI50L6G8D6xXfZPnB7KZtYISxCBee1gf2WH?= =?Windows-1252?Q?pJAjurC5hsOsfLP6vXM1bYvchDR/GmZGqMWenpvAz/6H99BF7OcFaqkg?= =?Windows-1252?Q?mq3T8LQPmB+qRa6tsOw1MP/aIiC7PJar/BcdH1ZbxMI3Qej1Aar0FppS?= =?Windows-1252?Q?pFh5VWj2QzZeeMZruGUkd0mhGBWRfxjaBzDZRG1eIBQ6wJQyE2ZJQFIn?= =?Windows-1252?Q?9906qYlpknTYfVq29dOVg5vhQN0aZqTChPdt2RdYbCtz2gFA5X2Xdyra?= =?Windows-1252?Q?5E3odIMeTcdZrutOZ8+SHoaIYZAJCby1WTMC67X8hjC9Lo6Kvqu0q7P3?= =?Windows-1252?Q?qmOS4z+rbMCl3kX6HPd++rosU5w5b1MDs++AtogRavglpuk5LGqxCgiz?= =?Windows-1252?Q?GgQMN3Gv97AsYOswAFZ6SuDdkNAPKmxzYGVHBuXOrx0fmuwY30xLl7Ul?= =?Windows-1252?Q?MImorXJC1uKtyIqZvaGBGw+7WonRYgAJMkGzsGSN6HJ936mcOlOluj9I?= =?Windows-1252?Q?SyRTvc/JF2oDs2OomOGEYZqizN9UiRNPq2DcJOkuqIgkk2JRrPemDzWM?= =?Windows-1252?Q?CtYrrDmMA0F3MHsxQmWkPJ9P8YlBZ+hm6xJiz9YANIaDCgViyfMd9G2O?= =?Windows-1252?Q?FLWkXhgvgYFyVLMM7UZWJhrWR0HX7pEF4Agj3PsmhBRBNbgiPurK7bXd?= =?Windows-1252?Q?mXBk3alQcB5HyV5BPsl1LW5eECOtAmDQNbkmUdfZrqL4CbeI8tQCIVx3?= =?Windows-1252?Q?R+P0M/ZWa/Ec/jXXT3OVjVPN5zhq7sU0HoKabe9ZoEWM/hw7xx0=3D?= Content-Type: multipart/alternative; boundary="_000_AM0PR04MB5649F055CD26FE763C185328A8F59AM0PR04MB5649eurp_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-03a34.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5649.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 5976b1eb-ca65-4fef-1326-08da22fe06d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2022 18:46:05.7648 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8390 Received-SPF: pass client-ip=2a01:111:f400:fe0e::815; envelope-from=vitusschaefftlein@live.de; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650484316; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=+lhJAS+j+A3o2fkSsRFs+mmQC6ibfOA2MlSV2pYPCu8=; b=j1F1EYaNVAs0xKygIQmF8VU5nauR7dLlYJoqwI05Ir/yF3+pO9R7GnyLviRX8+X41zjp77 zanPKdM3rcGQ+h57Wwpl1NkX1CvAOhmIYqENz6VCl+OPyWfpPr0NQZ0ES2YXcgkmF2M+n9 AdQ2DzIf5+jaTA4URmQzHqPL+I9JeM7LNcTepjtq0VhhrOszah1rJ6gswq+TfwaVbiU5j6 nOY1991Yu9e6qyx3SZsrAPqQ/FIT1HNVB9t9oWLwbWDXpZDRYUlqtNXvoZGgtxz8t7zhGV LRDOgXpgWCyilB0GWdfZfd3klJrHXAXubYLQG5EsR2WveqySjcKsMR04OT6mVQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1650484316; a=rsa-sha256; cv=pass; b=lmajV9nr6tX/WO2dSPBAaJoczKYA/aKdNzqHTk1n5Y5fKQ2osFLmEMrc2cUVMfKR0+bYhK /u8L+rAREhEwXpdbNprChmRsBgkMLeEfC7Yi1F/AAnxFFncZqYBI0kviPMzhfFudImfNNm dlc/IceZ4dGci5XgFisjShsxZK82Czb7BG97DX5ThxRi6/bp5Q3Pu7qOQlwPLqkdarOlSm Z9JivnmDTt/zPzaYuD+YU0DXa0MfnVYacQt0tsQ4h/uHeQ/BbFwh5S3dtb7KxLziGRRYRH VjmmR0CdW/P9i+ZpWFOon+2b0xW0pF8AdZ0vLnjCmcYtMRfgnmSklkCWJlaNcQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=none; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=live.de (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: 0.66 Authentication-Results: aspmx1.migadu.com; dkim=none; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=live.de (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: DA8423C766 X-Spam-Score: 0.66 X-Migadu-Scanner: scn1.migadu.com X-TUID: NiVYRbZ9wKYb --_000_AM0PR04MB5649F055CD26FE763C185328A8F59AM0PR04MB5649eurp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable [Bump] Dear Thibault, dear list, thanks for your fast answer, Thibault! I am happy to have convinced you of= dropping the extra \n's. The patch you addressed works fine for the aster= isk issue: Only those environments get an extra asterisk which are in org-l= atex-math-environments-re. Nonetheless, I think we should make that variabl= e more user-friendly by not requiring one huge regexp but a list of environ= ment names like ("foo" "bar" "baz"). Unfortunately, the patch does not have any impact on the numbering problem.= I guess we actually need org-html--latex-environments-leave-unlabelled to = get this running. I just wanna give two examples why it is not useful to la= ble every environment. 1. Imagine you do not need links to your equations and use the \tag command= in your equation environment to get the right equation numbers within the = svg. This looks nicer anyway because the font is the same and the formattin= g is perfect. If we did not have org-html--latex-environments-leave-unlabel= led, there would be both the line number within the equation and, below it,= another in-text-line-number on a new line. Same goes for the figure-enviro= nment which provides its own caption. In general, everything that has its o= wn counter within the svg should not receive extra equation numbers. 2. There are some environments you do not want labelled. Imagine you compil= e a table summarizing the most important formulas of your post. This is not= an equation and it should not be numbered, but it is. Below the table then= is a number which looks awful. You will find an example of the problem here: https://uni-muenster.sciebo.d= e/s/8gW9dCx7q8NHIeV [https://uni-muenster.sciebo.de/apps/files_sharing/publicpreview?file=3D/li= ne_numbers.png&t=3D8gW9dCx7q8NHIeV&x=3D200&y=3D200] sciebo - www.hochschulcloud.nrw line_numbers.png is publicly shared uni-muenster.sciebo.de Since I am in the position of setting up a blog just now, I can only stress= this variable is needed. I wish I could help you with the code more than I= have done with my suggestions. But maybe some one else on the list has an = idea? Best Regards, Vitus ________________________________________ Von: Thibault Marin [thibault.marin@gmx.com] Gesendet: Dienstag, 12. April 2022 07:15 An: Vitus Sch=E4fftlein Cc: emacs-orgmode@gnu.org Betreff: Re: ox-html: exporting LaTeX-environments Hi Vitus, list. My memory is quite fuzzy on this and I won't have a chance to take a deep look until later, but I will try to share the information I have. On Mon, 11 Apr 2022 19:38:13 +0000 (9 hours, 37 minutes, 37 seconds ago), V= itus Sch=E4fftlein wrote: Dear org-mode mailing list, [...] 3. Any LaTeX environment name foo is changed to foo* (except it already e= nds with an asterisk). For example, \begin{tabular} is changed to \begin{tabular*}; = same for \end{tabular}. But tabular* differs from tabular in needing an extra wid= th-argument, so the export won=92t work properly. I had submitted a patch trying to address this (https://list.orgmode.org/87h7ok3qi2.fsf@dell-desktop.WORKGROUP/, I have attached a new version rebased on main to this message). It never made it in and I failed to follow-up. This patch (or something similar) could help with this issue. It basically only adds the star for math environments (using org-html--math-environment-p) [...] Now the newline commands \n before and after %s are exported as whitespac= e. Just replacing \n%s\n by %s (that is, leaving the newlines out) solves the problem. HTML= ignores newlines anyway. This seems to work better indeed; the \n's were just cosmetic. [...] 1 Create a new variable ox-html-latex-environments-no-number of the form = ("foo" "bar" "baz" ...), which contains all environments that should not receiv= e equation numbers. I don't know whether org-html--math-environment-p (as used in the attached patch) is sufficient to determine whether we need to add a star to the environment or if we need another variable (in my use cases, testing for a match environment is sufficient but it may not be the case in general). [...] I don=92t know how to express in elisp what is in brackets, though. Does = this make sense to you? I am a beginner with elisp, so I can only state the ideas I have but not im= plement them (yet). This can be made to work if there is a consensus that we want to add a ox-html-latex-environments-no-number variable (I can try to help with that if needed, even though my elisp isn't great) [...] (let ((formula-link (org-html-format-latex (org-html--unlabel-latex-environment latex-frag) processing-type info))) The patch should address that, I would be curious to see if you encounter additional problematic cases after applying it. Thanks for resurrecting this and for your help detecting and fixing the iss= ues. Best, thibault --_000_AM0PR04MB5649F055CD26FE763C185328A8F59AM0PR04MB5649eurp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
[Bump]
 
Dear Thibault, dear list,

thanks for your fast answer, Thibault!  I am happy to have convinced y= ou of dropping the extra \n's.  The patch you addressed works fine for= the asterisk issue: Only those environments get an extra asterisk which ar= e in org-latex-math-environments-re. Nonetheless, I think we should make that variable more user-friendly by not requiring o= ne huge regexp but a list of environment names like ("foo" "= bar" "baz").

Unfortunately, the patch does not have any impact on the numbering problem.= I guess we actually need org-html--latex-environments-leave-unlabelled to = get this running. I just wanna give two examples why it is not useful to la= ble every environment.

1. Imagine you do not need links to your equations and use the \tag command= in your equation environment to get the right equation numbers within the = svg. This looks nicer anyway because the font is the same and the formattin= g is perfect. If we did not have org-html--latex-environments-leave-unlabelled, there would be both the lin= e number within the equation and, below it, another in-text-line-number on = a new line. Same goes for the figure-environment which provides its own cap= tion. In general, everything that has its own counter within the svg should not receive extra equation numbe= rs.
2. There are some environments you do not want labelled. Imagine you compil= e a table summarizing the most important formulas of your post. This is not= an equation and it should not be numbered, but it is. Below the table then= is a number which looks awful.

You will find an example of the pro= blem here: https://uni-muenster.sciebo.de/s/8gW9dCx7q8NHI= eV
3D"=
line_numbers.png is publicly shared
uni-muenster.sciebo.de


Since I am in the position of setting up a blog just now, I can only stress= this variable is needed. I wish I could help you with the code more than I= have done with my suggestions. But maybe some one else on the list has an = idea?

Best Regards,
Vitus
________________________________________
Von: Thibault Marin [thibault.marin@gmx.com]
Gesendet: Dienstag, 12. April 2022 07:15
An: Vitus Sch=E4fftlein
Cc: emacs-orgmode@gnu.org
Betreff: Re: ox-html: exporting LaTeX-environments

Hi Vitus, list.

My memory is quite fuzzy on this and I won't have a chance to take a
deep look until later, but I will try to share the information I have.

On Mon, 11 Apr 2022 19:38:13 +0000 (9 hours, 37 minutes, 37 seconds ago), V= itus Sch=E4fftlein <vitusschaefftlein@live.de> wrote:

  Dear org-mode mailing list,

  [...]

  3. Any LaTeX environment name foo is changed to foo* (except it alre= ady ends with an
   asterisk). For example, \begin{tabular} is changed to \begin{t= abular*}; same for
   \end{tabular}. But tabular* differs from tabular in needing an= extra width-argument, so
   the export won=92t work properly.

I had submitted a patch trying to address this
(https://list.orgmode.org/87h7ok3qi2.fsf@dell-desktop.WORKGROUP/, I have attached a new version rebased on main to this message).  It never mad= e
it in and I failed to follow-up.  This patch (or something similar) could help with this issue.  It basically only adds the star for math<= br> environments (using org-html--math-environment-p)

  [...]

  Now the newline commands \n before and after %s are exported as whit= espace. Just replacing
  \n%s\n by %s (that is, leaving the newlines out) solves the problem.= HTML ignores newlines
  anyway.

This seems to work better indeed; the \n's were just cosmetic.

  [...]

  1 Create a new variable ox-html-latex-environments-no-number of the = form ("foo"
   "bar" "baz" ...), which contains all envir= onments that should not receive equation
   numbers.

I don't know whether org-html--math-environment-p (as used in the
attached patch) is sufficient to determine whether we need to add a star to the environment or if we need another variable (in my use cases,
testing for a match environment is sufficient but it may not be the case in general).

  [...]

  I don=92t know how to express in elisp what is in brackets, though. = Does this make sense to you? I
  am a beginner with elisp, so I can only state the ideas I have but n= ot implement them (yet).

This can be made to work if there is a consensus that we want to add a
ox-html-latex-environments-no-number variable (I can try to help with
that if needed, even though my elisp isn't great)

  [...]

  (let ((formula-link
            &nb= sp; (org-html-format-latex
            &nb= sp;  (org-html--unlabel-latex-environment latex-frag)
            &nb= sp;  processing-type info)))

The patch should address that, I would be curious to see if you
encounter additional problematic cases after applying it.

Thanks for resurrecting this and for your help detecting and fixing the iss= ues.

Best,

thibault

--_000_AM0PR04MB5649F055CD26FE763C185328A8F59AM0PR04MB5649eurp_--