emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Denis Maier <denismaier@mailbox.org>
To: "Juan Manuel Macías" <maciaschain@posteo.net>,
	"Ihor Radchenko" <yantar92@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Org-syntax: Intra-word markup
Date: Thu, 2 Dec 2021 14:28:16 +0100	[thread overview]
Message-ID: <dc32689a-a49d-5f9b-d5ae-78263b10b745@mailbox.org> (raw)
In-Reply-To: <87sfvbjgho.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 3801 bytes --]

  reply	other threads:[~2021-12-02 13:29 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 10:50 Org-syntax: Intra-word markup Denis Maier
2021-12-02 11:18 ` Ihor Radchenko
2021-12-02 11:30   ` Juan Manuel Macías
2021-12-02 11:36     ` Denis Maier
2021-12-02 12:01       ` Ihor Radchenko
2021-12-02 11:42     ` Marco Wahl
2021-12-02 11:50       ` Denis Maier
2021-12-02 12:10         ` Ihor Radchenko
2021-12-02 12:40           ` Denis Maier
2021-12-02 12:54             ` Ihor Radchenko
2021-12-02 13:14               ` Juan Manuel Macías
2021-12-02 13:28                 ` Denis Maier [this message]
2021-12-02 12:48           ` Max Nikulin
2021-12-02 12:02       ` Ihor Radchenko
2021-12-02 12:00     ` Ihor Radchenko
     [not found]       ` <87r1avtdjy.fsf@ucl.ac.uk>
2021-12-02 12:27         ` Denis Maier
2021-12-02 13:06           ` Eric S Fraga
2021-12-02 12:28       ` Denis Maier
2021-12-02 12:55         ` Ihor Radchenko
2021-12-02 11:58 ` Timothy
2021-12-02 12:26   ` Denis Maier
2021-12-02 13:07     ` Ihor Radchenko
2021-12-02 15:51       ` Max Nikulin
2021-12-02 18:11         ` Tom Gillespie
2021-12-02 19:09           ` Juan Manuel Macías
2021-12-04 13:07             ` Org-syntax: emphasis and not English punctuation Max Nikulin
2021-12-04 16:42               ` Juan Manuel Macías
2021-12-02 20:47           ` Org-syntax: Intra-word markup Denis Maier
2021-12-02 22:44             ` Samuel Wales
2021-12-03 14:53           ` Max Nikulin
2021-12-03 23:51           ` Tim Cross
2021-12-04 15:01             ` Max Nikulin
2021-12-05 23:34               ` Russell Adams
2021-12-05 23:37             ` Russell Adams
2021-12-06  1:39               ` Samuel Wales
2021-12-02 19:03       ` Nicolas Goaziou
2021-12-02 19:34         ` Juan Manuel Macías
2021-12-02 23:05           ` Nicolas Goaziou
2021-12-02 23:24             ` Juan Manuel Macías
2021-12-03 14:24         ` Max Nikulin
2021-12-03 15:01           ` Juan Manuel Macías
2021-12-04 15:57           ` Denis Maier
2021-12-04 17:53             ` Tom Gillespie
2021-12-04 18:37               ` John Kitchin
2021-12-04 21:16                 ` Juan Manuel Macías
2021-12-06 10:57                 ` Raw Org AST snippets for "impossible" markup Max Nikulin
2021-12-06 15:45                   ` Juan Manuel Macías
2021-12-06 16:56                     ` Juan Manuel Macías
2021-12-08 13:09                     ` Max Nikulin
2021-12-08 23:19                       ` Juan Manuel Macías
2021-12-08 23:35                         ` John Kitchin
2021-12-09  7:01                           ` Juan Manuel Macías
2021-12-09 14:56                             ` Max Nikulin
2021-12-09 16:11                               ` Juan Manuel Macías
2021-12-09 22:27                                 ` Juan Manuel Macías
2022-01-03 14:34                                   ` Max Nikulin
2021-12-04 19:04               ` Org-syntax: Intra-word markup Timothy
2021-12-04 21:48                 ` Tom Gillespie
2021-12-06 10:59                   ` Max Nikulin
2022-01-28 14:52                   ` Max Nikulin
2022-01-29  3:13                     ` Ihor Radchenko
2022-01-29 13:05                       ` Juan Manuel Macías
2022-02-02 15:28                         ` Max Nikulin
2022-02-02 20:01                           ` Juan Manuel Macías
2022-02-03 12:10                             ` Max Nikulin
2021-12-06 11:01               ` Denis Maier
2022-01-28 12:12 ` [PATCH] Intra-word markup: \relax Max Nikulin
2022-01-28 13:13   ` Juan Manuel Macías
2022-02-02 15:42     ` Max Nikulin
  -- strict thread matches above, loose matches on Subject: below --
2021-12-02 13:36 Org-syntax: Intra-word markup autofrettage
2021-12-02 15:24 ` Robert Pluim
2021-12-02 17:11   ` autofrettage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc32689a-a49d-5f9b-d5ae-78263b10b745@mailbox.org \
    --to=denismaier@mailbox.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).