emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: rudolf@adamkovic.org, Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: LaTeX export is broken with 'num:nil` and 'ALT_TITLE`
Date: Mon, 30 Dec 2024 08:17:30 +0100	[thread overview]
Message-ID: <CAO48Bk_9LvxAQAibHsbkxL5foRvMvZ-=rZoSeKeiBwLYaTZc+g@mail.gmail.com> (raw)
In-Reply-To: <CAO48Bk8ieZxXivee0sQtD=pFKJJRuh2CHXeV-fV4NwFRkcYXCQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2010 bytes --]

Hi,

just an MWE to show how this can be done without ALT_TITLE. The first part
is close to what Rudolf was looking for, so it might be something we could
see to include in org-mode, right?

Happy New Year,
/PA



On Fri, 27 Dec 2024 at 19:07, Pedro Andres Aranda Gutierrez <
paaguti@gmail.com> wrote:

> @Rudolf, WDYT?
> How can I phrase it? It looks like you were trying something that LaTeX
> doesn't allow...
>
> Best, /PA
>
> On Fri, 27 Dec 2024 at 19:00, Ihor Radchenko <yantar92@posteo.net> wrote:
>
>> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>>
>> >> I am slightly concerned about generality of dropping ALT_TITLE from
>> >> unnumbered sectioning command.
>> > ...
>> > I do think we can. Unnumbered sectioning commands never appear in the
>> ToC...
>> > Unless you use additional magic like, ...
>>
>> Good. I am not concerned about hacks, I am concerned about users who
>> customized `org-latex-classes' to use something non-standard for
>> sectioning.
>>
>> But if doing so is not expected in general, I'd rather accept your fix
>> until someone comes and complains. Fixing the existing bug with default
>> settings is more important than fixing possible bug (affecting less
>> users) with custom sectioning.
>>
>> --
>> 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>
>>
>
>
> --
> 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
>
>

-- 
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

[-- Attachment #1.2: Type: text/html, Size: 3590 bytes --]

[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 867 bytes --]

#+TITLE: Unnumbered sections in ToC - MWE
#+OPTIONS: num:nil

* This is a test
@@latex: \addcontentsline{toc}{section}{Test}@@

With this you can control what appears in the ToC:

#+BEGIN_EXAMPLE
 * This is a test
 @@latex: \addcontentsline{toc}{section}{Test}@@
#+END_EXAMPLE


* <<sec:mysec>>This is another test
@@latex: \addcontentsline{toc}{section}{\nameref{sec:mysec}}@@

And you can also use ~nameref~ to get the full title into the ToC, since ~org~
calls the ~hyperref~ package:

#+BEGIN_EXAMPLE
 * <<sec:mysec>>This is another test
 @@latex: \addcontentsline{toc}{section}{\nameref{sec:mysec}}@@
#+END_EXAMPLE

Although for this, you'll need, for example,  to add the following to your local variables:

#+BEGIN_EXAMPLE
# org-latex-prefer-user-labels: t
#+END_EXAMPLE

# Local variables:
# org-latex-prefer-user-labels: t
# spell-check-lang: "en_GB"
# End:

  reply	other threads:[~2024-12-30  7:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 17:08 LaTeX export is broken with 'num:nil` and 'ALT_TITLE` Pedro Andres Aranda Gutierrez
2024-12-26 17:15 ` Pedro Andres Aranda Gutierrez
2024-12-27  6:59   ` Pedro Andres Aranda Gutierrez
2024-12-27 17:43     ` Ihor Radchenko
2024-12-27 17:56       ` Pedro Andres Aranda Gutierrez
2024-12-27 18:01         ` Ihor Radchenko
2024-12-27 18:07           ` Pedro Andres Aranda Gutierrez
2024-12-30  7:17             ` Pedro Andres Aranda Gutierrez [this message]
2024-12-30 12:44           ` [PATCH]: ox-latex.eel: handle unnumbered sections in TOC correctly Pedro Andres Aranda Gutierrez
2024-12-30 16:53             ` Ihor Radchenko
     [not found]               ` <CAO48Bk8dXigB0qbXzCuKZK9X4=Woy2+4xpA2QtC4O8Lx_224BA@mail.gmail.com>
2025-01-01  6:43                 ` Pedro Andres Aranda Gutierrez
2025-01-01 13:48                   ` Ihor Radchenko
2025-01-01 15:48                     ` Pedro Andres Aranda Gutierrez
2025-01-02 17:12                       ` Ihor Radchenko
2025-01-03  7:10                         ` Pedro Andres Aranda Gutierrez
  -- strict thread matches above, loose matches on Subject: below --
2024-12-25 17:45 LaTeX export is broken with 'num:nil` and 'ALT_TITLE` Rudolf Adamkovič
2024-12-26 15:08 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO48Bk_9LvxAQAibHsbkxL5foRvMvZ-=rZoSeKeiBwLYaTZc+g@mail.gmail.com' \
    --to=paaguti@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rudolf@adamkovic.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).