From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cDW4Hy9kdWfGQAEAe85BDQ:P1 (envelope-from ) for ; Wed, 01 Jan 2025 15:50:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id cDW4Hy9kdWfGQAEAe85BDQ (envelope-from ) for ; Wed, 01 Jan 2025 16:50:07 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=KoYu198V; 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=1735746607; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GOlXld4DBfxzzevsJ68kS4QoaXCbGE9AQdps1XgT1jQ=; b=nJb+HEEzSrld0tn0FIroF13Cqq/nM8y3EigKmhl9nhlzNJmy2PSRNgbNdyda7Y5D4j6I0c 6TMYdomPZ/1XN4Gq1vAgNVFdBWvr7adhHidzTwRfQpp2m7EAA/CGZbcEXvehJPeKDq+X7k IEOYKLZTL03xGEzoch7NRBg4+cgidiflZ21MEd8xajvDsWdnrjT4xeZzhhnIrNnNl8kO/1 p9mQFOWI/KCvHY01BKvMt0tvXYpCIpv0XbP2YFHqTOnnI3r1OPUCg3xMAKJd3vgGw2CXzH 9aFAEB+Yt06O7ZFYkdvxJgw+aa3YzA6sscJcKG6BO+iakJm/RGM0ZcrU7vGvEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=KoYu198V; 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-Seal: i=1; s=key1; d=yhetil.org; t=1735746607; a=rsa-sha256; cv=none; b=h3P0/VeDOT78EbgSPEu9b3A/MGQHSMsRbqHp6Ekhlx+QMzLN7YMSyGdBycMZcLTieQiDHo 4StXMC1Zk9fYQJ8EV/1Lb9xFygTjZfsXQKkpsQJk7rP7CP3r1zefUjweRLufBGGBBmieJS ApxUoIm6XdYVO6tSF+95pxLzGaUq5RIe9V34QPg14FaUTdalLWGDJ/xG+ok9QKVm61Xa9q bl8q9mi1327gT97CC32mEDh3i5Di+FsGRMz6I8GRlI4QTsEMeoPdkB4qKr/GijWliOvGo2 DsJpKOJmLR1VbVi81enHwO8+55e8c/odqYm8ivRldJIkA8J4l88Eub3xcz07Rg== 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 48FAF8C376 for ; Wed, 01 Jan 2025 16:50:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tT0yF-0000C2-Da; Wed, 01 Jan 2025 10:49:19 -0500 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 1tT0yB-0000BW-KU for emacs-orgmode@gnu.org; Wed, 01 Jan 2025 10:49:15 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tT0y9-0006TB-Gu for emacs-orgmode@gnu.org; Wed, 01 Jan 2025 10:49:15 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-aaeec07b705so975288866b.2 for ; Wed, 01 Jan 2025 07:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735746552; x=1736351352; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GOlXld4DBfxzzevsJ68kS4QoaXCbGE9AQdps1XgT1jQ=; b=KoYu198VAbGuOiRXuR04LpmNW/+i8qX24Wfma2eqCZa9e0woGd71XdFPkpgMq2ewYP p4mPQtVnYYK96iEJTmbk+71pG5FPz3NkwDdBYTGNg1uYOJq3bcvrip9ioma2RdMm4szs UXgV/sHOIrCb6w1ttOg0IeTYqQyDF/Eur9EtlJYvtT57ORcYHlzb+m1zXcZ54AhGbHTR oqYCz1kR2d36kFZ6/b8XGh9c0TmBOmLTSZ2D9PHo9I+vmXISICG+yFPABw0ZkRVTnCQh LncGm+/AXLnTu+XAOUb20SQ5coIUN7RIdLhzj5IpKa0KBboI8ntei07svetvbAG7HnSe 8C0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735746552; x=1736351352; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GOlXld4DBfxzzevsJ68kS4QoaXCbGE9AQdps1XgT1jQ=; b=VJcOQ+80Dtmm6zas0jvCTJBxYkbBFRX+OpOc/WZG4Oq8jLFrJ0pZmmyeMbSGHdBBJe z9ka7JvPO77UlhxMEbXUmQvCXO9oSWU5Dcr+8PduKhpVFpb2mRDq17yeS2N9olm3hlPl U4wMQrlGSbIieTBI7NnKL4GvSZ+RBUrbHGs5qvFgOAPMa0UUoqpTlmXC2Ytdv+9Z7leU 9/gaL8nJOBSG8+jA0gatgKcqXyw1m8ruyTKBandKJsJKTH3+ZYVtUWr8IVSsEaf73Q2W RSeWz9sgZOFRHZ6PsHgEP0u3upumtVV9siq6gBzp383ZGCLORDwQ/JBx8cjl+YCzz+/Z kCIA== X-Gm-Message-State: AOJu0Yy4UHQ0821POl2JU7pvqqgdIlppDxKzV0MuVHXdMbRHbaVYV3Tb 2QCRodATS1A/NLEjq7wtqVIviZSPPiuYXXKh27WF0W9O8doc6KWXQqc8hTVOjndDsLH5sBDoSVT iD4W38Oj11wvXy+AUbAM7ICA1HIM= X-Gm-Gg: ASbGncsD2esUGGh/gLiqzxENu610Brwsa9EaL6vZPgCTA5/CZO6BjDTSiiWEtWyURNI 9QXOka+Aj5k2EX2bWpNTb/RuNVt1wzScEEOsHSg== X-Google-Smtp-Source: AGHT+IE80ctfyTpv669EZRSnoLK7JQ7KpZkg08iym9fGpFOdjjgxrIAtZkyf7BYWbwGgx5Sq9SLwgQlnNCBz9QMf+HU= X-Received: by 2002:a17:906:fd87:b0:aae:bd4c:22c0 with SMTP id a640c23a62f3a-aaebd4c23dcmr3224792366b.19.1735746551249; Wed, 01 Jan 2025 07:49:11 -0800 (PST) MIME-Version: 1.0 References: <495AE5B0-0551-40EC-B501-B681E479D261@gmail.com> <87wmfl3ttn.fsf@localhost> <87r05t3szf.fsf@localhost> <87v7v12juz.fsf@localhost> <87ikqyfxvm.fsf@localhost> In-Reply-To: <87ikqyfxvm.fsf@localhost> From: Pedro Andres Aranda Gutierrez Date: Wed, 1 Jan 2025 16:48:45 +0100 Message-ID: Subject: Re: [PATCH]: ox-latex.eel: handle unnumbered sections in TOC correctly To: Ihor Radchenko Cc: Org Mode List Content-Type: multipart/alternative; boundary="0000000000009b8126062aa6fcc3" Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paaguti@gmail.com; helo=mail-ej1-x631.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -5.56 X-Spam-Score: -5.56 X-Migadu-Queue-Id: 48FAF8C376 X-TUID: EScocOFsL2TV --0000000000009b8126062aa6fcc3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 1 Jan 2025 at 14:47, Ihor Radchenko wrote: > Pedro Andres Aranda Gutierrez writes: > > > Attached is a patch that fixes adding an unnumbered section to the TOC > with > > test cases. You will need to add the Title you want to appear in the To= C > in > > :ALT_TITLE: I'm looking at a new property to copy the section title. > > Something like > > :ALT_TITLE_COPY: t > > But I'm open to suggestions. > > Not sure. > If we look into the manual, here is what it says: > > 13.3 Table of Contents > ... > Org includes both numbered and unnumbered headlines in the table of > contents(1). If you need to exclude an unnumbered headline, along with > all its children, set the =E2=80=98UNNUMBERED=E2=80=99 property to =E2=80= =98notoc=E2=80=99 value. > ... > (1) At the moment, some export backends do not obey this > specification. For example, LaTeX export excludes every unnumbered > headline from the table of contents. > But this happens because of the way LaTeX works... So, ox-latex is technically not right when it ignores unnumbered > headings in TOC. > The basis is there... we might need to rewrite (org-latex-headings) a lot - I fear. > We might consider changing the current defaults to be consistent with > the rest of export backends + a defcustom/export option to allow users > fall back to historic defaults. > Call them LaTeX-native defaults (sounds better than historic). BTW, since my patch produces correct LaTeX code vs. the current state, could you please apply it to avoid the error which triggered all this until we get something better. The documentation would need to modified slightly to For example, LaTeX export excludes every unnumbered headline from the table of contents, unless you set the 'ALT_TITLE' property to the heading you want to see in the table of contents. > > -- > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at . > Support Org development at , > or support my work at > Happy New Year, /PA --=20 Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet --0000000000009b8126062aa6fcc3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, 1 Jan 2= 025 at 14:47, Ihor Radchenko <yan= tar92@posteo.net> wrote:
Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Attached is a patch that fixes adding an unnumbered section to the TOC= with
> test cases. You will need to add the Title you want to appear in the T= oC in
> :ALT_TITLE: I'm looking at a new property to copy the section titl= e.
> Something like
> :ALT_TITLE_COPY: t
> But I'm open to suggestions.

Not sure.
If we look into the manual, here is what it says:

13.3 Table of Contents
...
=C2=A0 =C2=A0Org includes both numbered and unnumbered headlines in the tab= le of
contents(1).=C2=A0 If you need to exclude an unnumbered headline, along wit= h
all its children, set the =E2=80=98UNNUMBERED=E2=80=99 property to =E2=80= =98notoc=E2=80=99 value.
...
=C2=A0 =C2=A0(1) At the moment, some export backends do not obey this
specification.=C2=A0 For example, LaTeX export excludes every unnumbered headline from the table of contents.

Bu= t this happens because of the way LaTeX works...=C2=A0=C2=A0

=
So, ox-latex is tec= hnically not right when it ignores unnumbered
headings in TOC.

The basis is there... = we might need to rewrite (org-latex-headings) a lot - I fear.
=C2= =A0
We might conside= r changing the current defaults to be consistent with
the rest of export backends + a defcustom/export option to allow users
fall back to historic defaults.

Call th= em LaTeX-native defaults (sounds better than historic).=C2=A0
BTW, since my patch produces correct LaTeX code vs. the current= state, could you please apply it to avoid the error which triggered all th= is until we get something better.
The documentation would need to= modified slightly to

For example, LaTeX export ex= cludes every unnumbered headline from the table of contents, unless you set= the 'ALT_TITLE' property to the heading you want to see in the tab= le of contents.

=C2=A0

--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,=
or support my work at <https://liberapay.com/yantar92>

Happy New Year, /PA--
Fr= agen sind nicht da, um beantwortet zu werden,
Fragen sind da um ge= stellt zu werden
Georg Kreisler

Headaches= with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uni= ter.operation we should run a leader-deposed hook here, but we can't ye= t

--0000000000009b8126062aa6fcc3--