Ihor Radchenko writes:
Denis Maier <denismaier@mailbox.org> writes:
Can you create an example of such scenario and post it as a bug?
Probably, we just need to strip all zero-width spaces at the basic ox.el
level.
To be clear: That's not an org bug. It's just that latex won't be able
such a word. If | is a zero width space, the word "hyphen|ation" is not
the same as "hyphenation".
1. hyphenation
2. hyphen|ation
You are right for your example, but if we force the user to put
*hyphen*|ation to create bold emphasis, it should not be any different
compared to @@latex:\textbf{hyphen}ation@@. Meanwhile the *hyphen*|ation
gets exported as \textbf{hyphen}|ation keeping the zero width space.
--
I would say that they are very random cases, and therefore difficult to
reproduce. In the 'hyphenation' example, if we load the package
showhypehns, you see that:
/hyphen/ation (with zero width sp)
and
\emph{hyphen}ation
they are cut in the same way. But differently from
hyphenation (without emphasis)
(compiled with LuaTeX).
Anyway, I have come across some curious cases. For example, a long time
ago I had defined a macro for text in other languages:
#+MACRO: lg (eval (if (org-export-derived-backend-p org-export-current-backend 'latex) (concat "@@latex:\\foreignlanguage{@@" $1 "@@latex:}{@@" "\u200B" $2 "\u200B" "@@latex:}@@") $2))
I needed to add before and after a zero width space, but doing so, the
shape of the text was altered. That can be reproduced with this example:
#+LaTeX_Header: \usepackage{showhyphens}
#+LaTeX_Header:\usepackage{lipsum,multicol}
#+LaTeX_Header:\usepackage[spanish]{babel}
#+LaTeX_Header: \def\example{\lipsum[1]}
#+LaTeX_Header: \def\zwsp{\char"200B{}}
#+OPTIONS: toc:nil
@@latex:\begin{multicols}{2}@@
@@latex:\foreignlanguage{italian}{\zwsp\example\zwsp}@@
@@latex:\foreignlanguage{italian}{\example}@@
@@latex:\end{multicols}@@
Best regards,
Juan Manuel