emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX export is broken with 'num:nil` and 'ALT_TITLE`
@ 2024-12-25 17:45 Rudolf Adamkovič
  2024-12-26 15:08 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Rudolf Adamkovič @ 2024-12-25 17:45 UTC (permalink / raw)
  To: emacs-orgmode

REPRODUCTION:

1. Create a file containing:

   #+OPTIONS: num:nil
   
   * Test
   :PROPERTIES:
   :ALT_TITLE: alt
   :END:
   
   This is a test.

2. Open the file.
3. Export to a PDF file with LaTeX.

EXPECTED:

  Test

  This is a test.

ACTUAL:

  [
  alt]Test This is a test.

Rudy
-- 
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
--- Edsger W. Dijkstra, 1981

Rudolf Adamkovič <rudolf@adamkovic.org> [he/him]
http://adamkovic.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: LaTeX export is broken with 'num:nil` and 'ALT_TITLE`
  2024-12-25 17:45 LaTeX export is broken with 'num:nil` and 'ALT_TITLE` Rudolf Adamkovič
@ 2024-12-26 15:08 ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2024-12-26 15:08 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: emacs-orgmode

Rudolf Adamkovič <rudolf@adamkovic.org> writes:

> REPRODUCTION:
>
> 1. Create a file containing:
>
>    #+OPTIONS: num:nil
>    
>    * Test
>    :PROPERTIES:
>    :ALT_TITLE: alt
>    :END:
>    
>    This is a test.
>
> 2. Open the file.
> 3. Export to a PDF file with LaTeX.

Confirmed.
This is because [<alt-title>] is inserted into the sectioning command
unconditionally, regardless whether sectioning command supports such an
optional argument.

I suspect that the proper way to handle this problem is changing
structure of `org-latex-classes' to explicitly specify alt-title
placeholder.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re:  LaTeX export is broken with 'num:nil` and 'ALT_TITLE`
@ 2024-12-26 17:08 Pedro Andres Aranda Gutierrez
  2024-12-26 17:15 ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 4+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-12-26 17:08 UTC (permalink / raw)
  To: rudolf; +Cc: Org Mode List

Hi Rudolf,

After playing around with the generated LaTeX in overleaf, I have to conclude that the problem is that ALT_TITLE should be not generated for unnumbered chapters, sections, etc. As far as my LaTeX goes, you use the [alt_title] to get something different in the TOC, so it makes no sense and LaTeX doesn’t cater for it.

Solutions from the org-mode side: 
1. You don’t use ALT_TITLE if section is unnumbered (easier)
2. We make org-mode throw an error in this case (???)

Discussion open ;-)

Seasons greetings,
/PA

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: LaTeX export is broken with 'num:nil` and 'ALT_TITLE`
  2024-12-26 17:08 Pedro Andres Aranda Gutierrez
@ 2024-12-26 17:15 ` Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 4+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-12-26 17:15 UTC (permalink / raw)
  To: rudolf; +Cc: Org Mode List, Ihor Radchenko

A MWE:

——
\documentclass{article}

\title{test}
\author{paranda }
\date{December 2024}

\begin{document}

\maketitle
\tableofcontents

\section{Introduction}

\subsection[Sub - shown 1]{Sub intro - shown}
This section shows up with a modified heading
\subsection*{Sub intro - hidden}
This subsection doesn't show up in the ToC
\subsection{Sub intro - shown 2}
This subsection shows up as is in the ToC
\end{document}
—— 
> El 26 dic 2024, a las 18:08, Pedro Andres Aranda Gutierrez <paaguti@gmail.com> escribió:
> 
> Hi Rudolf,
> 
> After playing around with the generated LaTeX in overleaf, I have to conclude that the problem is that ALT_TITLE should be not generated for unnumbered chapters, sections, etc. As far as my LaTeX goes, you use the [alt_title] to get something different in the TOC, so it makes no sense and LaTeX doesn’t cater for it.
> 
> Solutions from the org-mode side: 
> 1. You don’t use ALT_TITLE if section is unnumbered (easier)
> 2. We make org-mode throw an error in this case (???)
> 
> Discussion open ;-)
> 
> Seasons greetings,
> /PA



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-26 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-25 17:45 LaTeX export is broken with 'num:nil` and 'ALT_TITLE` Rudolf Adamkovič
2024-12-26 15:08 ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2024-12-26 17:08 Pedro Andres Aranda Gutierrez
2024-12-26 17:15 ` Pedro Andres Aranda Gutierrez

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