* Preserving non breaking spaces in HTML export (maybe other?)
@ 2023-06-27 10:33 Étienne Deparis
2023-06-27 10:54 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: Étienne Deparis @ 2023-06-27 10:33 UTC (permalink / raw)
To: emacs-orgmode
Hi,
If I’m not wrong, I think I just came across a little issue while
using
HTML export in org mode.
As a french writer, we use a lot of non-breaking spaces¹ in
various
situation. For exemple before double column or question mark:
Ceci est un exemple :
N’est-il pas interessant ?
¹ https://en.wikipedia.org/wiki/Non-breaking_space
Above I use a "narrow no-breaking space", but historically other
might
have used plain non-breaking space ( ).
However, after export all those spaces have disapeared. I cannot
find
where in the code this replacement is made, thus if one know
better how
the exporter run here, it would be great to share. It would let me
try
to work around this.
By order of preference, I’d have expected:
- spaces to be replaced by their HTML entity (either   or
)
- spaces left as this (no replacement).
I’m also curious about the rational behind the replacement. Is
this to
protect something?
Thank you very much for your help,
Étienne
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserving non breaking spaces in HTML export (maybe other?)
2023-06-27 10:33 Preserving non breaking spaces in HTML export (maybe other?) Étienne Deparis
@ 2023-06-27 10:54 ` Ihor Radchenko
2023-06-27 11:14 ` Étienne Deparis
0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-06-27 10:54 UTC (permalink / raw)
To: etienne; +Cc: emacs-orgmode
Étienne Deparis <etienne@depar.is> writes:
> Ceci est un exemple :
>
> N’est-il pas interessant ?
> ...
> ...
> However, after export all those spaces have disapeared. I cannot
> find
> where in the code this replacement is made, thus if one know
> better how
> the exporter run here, it would be great to share. It would let me
> try
> to work around this.
I cannot reproduce.
May you please provide more detailed steps starting from emacs -Q?
See https://orgmode.org/manual/Feedback.html#Feedback
> - spaces to be replaced by their HTML entity (either   or
> )
You can achieve it using space entities.
> - spaces left as this (no replacement).
This is what should happen now.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserving non breaking spaces in HTML export (maybe other?)
2023-06-27 10:54 ` Ihor Radchenko
@ 2023-06-27 11:14 ` Étienne Deparis
2023-06-27 12:04 ` Ihor Radchenko
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Étienne Deparis @ 2023-06-27 11:14 UTC (permalink / raw)
To: emacs-orgmode
mar. 27 juin 2023 à 12:54, yantar92@posteo.net a écrit :
>
> I cannot reproduce.
Oh, very sorry, actually it effectively leaves the spaces as this
in the
output file. I was confused by Firefox, who makes the replacement
🙁
(interpret non-breaking spaces UTF-8 char as breaking, and replace
them
by regular space when copy/pasting text…).
Thus it means this is not an org mode issue, but more like a
publication
process issue, and then…
>> - spaces to be replaced by their HTML entity (either   or
>> )
>
> You can achieve it using space entities.
I’m not sure to understand your proposal: directly write
into my
org document?
Actually I think I found the solution directly in the
documentation¹
🤦. I’ve no idea how I skip it during my first search.
¹ https://orgmode.org/org.html#Filters-1
I’m sorry for the pollution on the list.
Étienne
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserving non breaking spaces in HTML export (maybe other?)
2023-06-27 11:14 ` Étienne Deparis
@ 2023-06-27 12:04 ` Ihor Radchenko
2023-06-27 15:59 ` Max Nikulin
2023-06-27 16:00 ` Max Nikulin
2 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2023-06-27 12:04 UTC (permalink / raw)
To: etienne; +Cc: emacs-orgmode
Étienne Deparis <etienne@depar.is> writes:
>>> - spaces to be replaced by their HTML entity (either   or
>>> )
>>
>> You can achieve it using space entities.
>
> I’m not sure to understand your proposal: directly write
> into my
> org document?
You can write \nbsp{}.
See https://orgmode.org/manual/Special-Symbols.html
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserving non breaking spaces in HTML export (maybe other?)
2023-06-27 11:14 ` Étienne Deparis
2023-06-27 12:04 ` Ihor Radchenko
@ 2023-06-27 15:59 ` Max Nikulin
2023-06-27 16:00 ` Max Nikulin
2 siblings, 0 replies; 6+ messages in thread
From: Max Nikulin @ 2023-06-27 15:59 UTC (permalink / raw)
To: etienne, emacs-orgmode
On 27/06/2023 18:14, Étienne Deparis wrote:
>
> Oh, very sorry, actually it effectively leaves the spaces as this in the
> output file. I was confused by Firefox, who makes the replacement 🙁
> (interpret non-breaking spaces UTF-8 char as breaking, and replace them
> by regular space when copy/pasting text…).
I do not see any issue with Firefox. It might be OS or locale-dependent
however.
Copy from Firefox running as en_US.UTF-8 on Linux and pasting to Emacs
preserves "NARROW NO-BREAK SPACE" (`describe-char').
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserving non breaking spaces in HTML export (maybe other?)
2023-06-27 11:14 ` Étienne Deparis
2023-06-27 12:04 ` Ihor Radchenko
2023-06-27 15:59 ` Max Nikulin
@ 2023-06-27 16:00 ` Max Nikulin
2 siblings, 0 replies; 6+ messages in thread
From: Max Nikulin @ 2023-06-27 16:00 UTC (permalink / raw)
To: etienne, emacs-orgmode
On 27/06/2023 18:14, Étienne Deparis wrote:
>
> Oh, very sorry, actually it effectively leaves the spaces as this in the
> output file. I was confused by Firefox, who makes the replacement 🙁
> (interpret non-breaking spaces UTF-8 char as breaking, and replace them
> by regular space when copy/pasting text…).
I do not see any issue with Firefox. It might be OS or locale-dependent
however.
Copy from Firefox running as en_US.UTF-8 on Linux and pasting to Emacs
preserves "NARROW NO-BREAK SPACE" (`describe-char').
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-27 16:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 10:33 Preserving non breaking spaces in HTML export (maybe other?) Étienne Deparis
2023-06-27 10:54 ` Ihor Radchenko
2023-06-27 11:14 ` Étienne Deparis
2023-06-27 12:04 ` Ihor Radchenko
2023-06-27 15:59 ` Max Nikulin
2023-06-27 16:00 ` Max Nikulin
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).