emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Org-syntax: Intra-word markup


From: Denis Maier
Subject: Re: Org-syntax: Intra-word markup
Date: Thu, 2 Dec 2021 14:28:16 +0100

Am 02.12.2021 um 14:14 schrieb Juan Manuel Macías:
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

Thanks Juan Manuel. I should have tried that first. Hyphenation is the same for both /hyphen/​ation (with zero width sp) and \emph{hyphen}ation. (Maybe I can nudge Hans Hagen to add some low level trickery in context that removes the groups before doing the hyphenation... but that's a different story.) Anyway, as Juan Manuel shows there can be cases where zero width spaces cause problems.

Denis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]