From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ODqFDUzKqGGihQEAgWs5BA (envelope-from ) for ; Thu, 02 Dec 2021 14:29:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AMYmCUzKqGGBSQAAbx9fmQ (envelope-from ) for ; Thu, 02 Dec 2021 13:29:48 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B50A07088 for ; Thu, 2 Dec 2021 14:29:47 +0100 (CET) Received: from localhost ([::1]:33210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msm9i-0006GK-1P for larch@yhetil.org; Thu, 02 Dec 2021 08:29:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msm8Q-0006GC-AD for emacs-orgmode@gnu.org; Thu, 02 Dec 2021 08:28:26 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:54102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1msm8N-0001Bs-Vd for emacs-orgmode@gnu.org; Thu, 02 Dec 2021 08:28:26 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:105:465:1:4:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4J4cGX6PczzQk9l; Thu, 2 Dec 2021 14:28:20 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1638451698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FOqKBk5DWC5ylViGpeMuDpVNfGSPrSmCugucLCK4IKQ=; b=q19YjaC6YkIInYRuc2AacGD9Yj4lHE0vM8Pu920TK6sasIWBwOCr+4HxujaRRBwFc9CcDW 2YthN6JLBNG7m3zK6lLc+sDAkdtt8AXg7WpCu0TA6r9FQLuviEl6nPGkxzB3MeFD9ymcKs sNJ9P2vqsuOXcntRm/TYnGTRzvfL2LzewJQUfU5/fYU4NhVrvJKmyADYdHV+Z0XbFIxrBt QOM9fPicmeyQ+r02yD8E0ROdoAYfRhUYrwLUymaiFdL8t06yJnveUFLvd/okZ6ykYxl4Lu 0OSWgJWGQM6BJCGlR6SRX2FwcO4vLGEvJHXs8BrzZEpc8z+AgrU0sDi4RWLldw== Content-Type: multipart/alternative; boundary="------------FhX0rD0lGgigfXzeSxsFTp6S" Message-ID: Date: Thu, 2 Dec 2021 14:28:16 +0100 MIME-Version: 1.0 Subject: Re: Org-syntax: Intra-word markup To: =?UTF-8?Q?Juan_Manuel_Mac=c3=adas?= , Ihor Radchenko Cc: orgmode References: <4897bc60-b74f-ccfd-e13e-9b89a1194fdf@mailbox.org> <87o85zi7b0.fsf@localhost> <87czmf9rcf.fsf@posteo.net> <871r2vw7vt.fsf@gmail.com> <875ys7i4w1.fsf@localhost> <30bf8fc6-9099-7b32-3dcf-1841b45cc647@mailbox.org> <87zgpjgoa6.fsf@localhost> <87sfvbjgho.fsf@posteo.net> From: Denis Maier In-Reply-To: <87sfvbjgho.fsf@posteo.net> Received-SPF: pass client-ip=80.241.56.151; envelope-from=denismaier@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638451787; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FOqKBk5DWC5ylViGpeMuDpVNfGSPrSmCugucLCK4IKQ=; b=W/9piU2dFdl07z7NZE+fCC8q6hR2KCtGoNL3YceKcDcxpoeQs/oMGvWDbvdNxnYSyWmwAQ O2iLIzilDiSEe3+nBx118CW/0DcidpU/ScVkRFAutACkWpTwMWiXPz/R5kpEPgqoPxBRkX RRRWvMDl+3rZn1b9SYi9G8Jse98DSQu7aHbRCou9Mq4fGhFMFEnwYTWibn76JShheq/hFy HBAwDWRDhZR9CgAotdNOG3D+7R1xfw99JUPQty2OUjUSPaP+8d01xpwu/C+dPmWxJU1rT7 q1qYBS2uRaHBVgd8FTBwHL194xmWYTPWhjnKdAsnOlu+o0GSv+hewTaGS3Vijg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638451787; a=rsa-sha256; cv=none; b=bpwN+bwVpPf6TDJ79vKfSXYWn82A+g9LJZelDP/ONp3Uu9p5RHeiAtX60K0chfAVz4HJZd GdAjlxXOlV7kPF/Wbznznj6SKImbwaAK/PHWHWhbKVllSPydnFfVqpvX0ZaZhAPjWk0OSV iONQE+TtiyTAnLrHz5s5T5RoblfYGihU2b3jmlPqf5Rsyk6aG8MhR8KIR0jjAjJLiZp4kD cp59JmHRIznWw/enalhAXoVxsFQsUlr1hZgmJdglUKILztgBF0UNFFdn5kqMYmwyz04Jac qiC+deKpJT8IFzSuYTB8MbmsMK+sDqDfYpqhYF1XJw5BFDB/r7fYNKTPXNZjIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=q19YjaC6; dmarc=pass (policy=reject) header.from=mailbox.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=q19YjaC6; dmarc=pass (policy=reject) header.from=mailbox.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B50A07088 X-Spam-Score: -4.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: 06EfdqzboVEo This is a multi-part message in MIME format. --------------FhX0rD0lGgigfXzeSxsFTp6S Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 02.12.2021 um 14:14 schrieb Juan Manuel Macías: > Ihor Radchenko writes: > >> Denis Maier 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 --------------FhX0rD0lGgigfXzeSxsFTp6S Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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


--------------FhX0rD0lGgigfXzeSxsFTp6S--