PS:
WIth LuaLatex you handle alt_title also by
#+begin_src org
* \(\textbackslash{}đ\) wraps
:PROPERTIES:
:ALT_TITLE: \(\textbackslash{}Ï\) wraps too
:END:
#+end_src
So there we don't need the \texorpdfstring{}{} as long as we translate the
backslash as
\textbackslash{} and not as $\backslash$
I did it again (oops) ;-)
Best, /PA
On Mon, 17 Nov 2025 at 18:04, Pedro Andres Aranda Gutierrez <
[email protected]> wrote:
> 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
>
>
--
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