Answers inline..
On Mon, 17 Nov 2025 at 16:12, Max Nikulin <[email protected]> wrote:
> On 17/11/2025 00:08, Ihor Radchenko wrote:
> > \section[$\backslash$\texorpdfstring{\(\psi\)}{psi} should
> wrap]{$\backslash$\texorpdfstring{\(\phi\)}{phi} wraps}
>
> Notice that you do not need alternative title to reproduce the issue
> with PDF outline raised by Pedro. You may drop square brackets. It is
> easier to discuss the problem with a minimal example.
>
Actually not Max.
You need them when you want to get both sections and sections with alt
titles of and you want to make them produce a readable outline for the PDF
reader.
> I am a bit surprised that hyperref can not get text representation after
> expansion of commands. Adding \texorpdfstring alternative for every Org
> entity will be tedious.
>
Welcome to reality ;-)
> Perhaps the limitation related to LaTeX snippets and entities in headers
> should be mentioned in the manual. Anyway for formulas it is
> responsibility of the user to provide plain text fallback.
>
> ALT_TITLE property is another layer of this issue.
>
Yes, look at what you have to do when you don't have alt_title.
Using lualatex, at least, let's you add the phi as a unicode character,
which already is a great improvement wrt the status quo in pdflatex [and
now I opened Pandora's box :-) ]:
#+begin_src org
,* \(\textbackslash\texorpdfstring{\phi}{ϕ}\) wraps
#+end_src
which can be simplified to
#+begin_src org
,* \(\textbackslash{}ϕ\) wraps
#end_stc
Best, /PA
--
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 1 of the New Koprocracy