all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to remove spaces for soft line-breaks
@ 2013-07-08  0:59 Yujie Wen
  2013-07-08  8:22 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Yujie Wen @ 2013-07-08  0:59 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org Mode


[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]

Hi, Experts there,

  I encountered with an i18n problem while I was writing some Chinese
documents in Org-mode.

  The problem is, when the documents is exported to HTML pages, there will
be a space for soft line-breaks, which is natural for English but redundant
for Chinese.

  Please see the attached pictures for what soft line-breaks and the
redundant spaces are.

  I am wondering whether there is a way to forbid such spaces, or if no
such a way, whether it is possible to work out a patch to forbid it.


Regards,
Yujie

[-- Attachment #1.2: Type: text/html, Size: 661 bytes --]

[-- Attachment #2: emacs.png --]
[-- Type: image/png, Size: 35156 bytes --]

[-- Attachment #3: exported.png --]
[-- Type: image/png, Size: 76898 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to remove spaces for soft line-breaks
  2013-07-08  0:59 How to remove spaces for soft line-breaks Yujie Wen
@ 2013-07-08  8:22 ` Bastien
  2013-07-09  4:52   ` Christian Wittern
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-07-08  8:22 UTC (permalink / raw)
  To: Yujie Wen; +Cc: emacs-orgmode@gnu.org Mode

Hi Yujie,

Yujie Wen <yjwen.ty@gmail.com> writes:

> I am wondering whether there is a way to forbid such spaces, or if
> no such a way, whether it is possible to work out a patch to forbid
> it.

I would try M-x visual-line-mode RET and see if you like it.

HTH,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to remove spaces for soft line-breaks
  2013-07-08  8:22 ` Bastien
@ 2013-07-09  4:52   ` Christian Wittern
  2013-07-09  5:23     ` Yujie Wen
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Wittern @ 2013-07-09  4:52 UTC (permalink / raw)
  To: emacs-orgmode

Hi Bastien, Yujie
On 2013-07-08 17:22, Bastien wrote:
> Hi Yujie,
>
> Yujie Wen <yjwen.ty@gmail.com> writes:
>
>> I am wondering whether there is a way to forbid such spaces, or if
>> no such a way, whether it is possible to work out a patch to forbid
>> it.
> I would try M-x visual-line-mode RET and see if you like it.
Well, this will not solve the problem for the OP, which occurs during export.

What has to be done, I think, is to remove the CR/LF characters for Chinese 
(and Japanese, Korean etc.) text when exporting to HTML, because they will 
otherwise show up in the displayed HTML as single space characters.
I guess, this requires either a derived custom export engine or a 
internationalization framework that allows the specification of the text 
language.

Christian


-- 
Christian Wittern, Kyoto

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to remove spaces for soft line-breaks
  2013-07-09  4:52   ` Christian Wittern
@ 2013-07-09  5:23     ` Yujie Wen
  0 siblings, 0 replies; 4+ messages in thread
From: Yujie Wen @ 2013-07-09  5:23 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org Mode

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

Hi, Christian,

2013/7/9 Christian Wittern <cwittern@gmail.com>

> Hi Bastien, Yujie
>
> On 2013-07-08 17:22, Bastien wrote:
>
>> Hi Yujie,
>>
>> Yujie Wen <yjwen.ty@gmail.com> writes:
>>
>>  I am wondering whether there is a way to forbid such spaces, or if
>>> no such a way, whether it is possible to work out a patch to forbid
>>> it.
>>>
>> I would try M-x visual-line-mode RET and see if you like it.
>>
> Well, this will not solve the problem for the OP, which occurs during
> export.
>
> What has to be done, I think, is to remove the CR/LF characters for
> Chinese (and Japanese, Korean etc.) text when exporting to HTML, because
> they will otherwise show up in the displayed HTML as single space
> characters.
>
I used to thinking of removing CR/LF at the parsing or exporting stage. But
now I think it is not a perfect solution since it will remove by mistake
some meaningful spaces. For example, in an English/Chinese mixed texts
whereas lines are sometimes broken at between two English words, which is
often the case when we fill graphs with m-q.

Discerning meaningful and meaningless spaces for Chinese and Japanese is
rather too complicated a topic. Chinese rarely use spaces for separating
words, Japanese sometimes use spaces for separating syntax elements.
Korean, by my instinct at staring on Korean scripts, does use spaces to
separate words.

I guess, this requires either a derived custom export engine or a
> internationalization framework that allows the specification of the text
> language.
>
> Christian
>
>
> --
> Christian Wittern, Kyoto
>
>
>
Regards,
Yujie

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-09  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08  0:59 How to remove spaces for soft line-breaks Yujie Wen
2013-07-08  8:22 ` Bastien
2013-07-09  4:52   ` Christian Wittern
2013-07-09  5:23     ` Yujie Wen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.