emacs-orgmode
[Top][All Lists]
Advanced

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

Bug: ODT export of Chinese text inserts spaces for line breaks


From: James Harkins
Subject: Bug: ODT export of Chinese text inserts spaces for line breaks
Date: Tue, 29 Jun 2021 11:47:06 +0800
User-agent: Zoho Mail

Consider the following org document.

* Test
1本人不想亲自拿到学历学位证书、急于离校者,可书面委托他人代领学历学位证
书,29日起即可离校;2本人想亲自领取学历学位证书者,按学校规定的程序及有关
要求办理离校手续,领取相关证书后离校;

This was produced by pasting in a single, long line, and then using alt-Q (a 
normal thing to do, and good for readability, because org-mode doesn't wrap 
lines by default).

Exporting to ODT produces the following (body text, omitting titles, headers 
and such).

1本人不想亲自拿到学历学位证书、急于离校者,可书面委托他人代领学历学位证 书,29日起即可离校;2本人想亲自领取学历学位证书者,按学校规定的程序及有关 
要求办理离校手续,领取相关证书后离校;

Between 证 and 书, and between 关 and 要, there is a space. Chinese typography does 
not allow for spaces mid-sentence.

So, it would make sense to add a rule to the exporter: if one of the characters 
before or after a source-text line break is a Chinese, Japanese or Korean 
character, do not add a space. (The space is valid, of course, if the 
characters on either side of the line breaks are Roman or [I would guess] 
Cyrillic as well.)

(Side note: Exporting to a LaTeX buffer shows that the line breaks have been 
copied into the .tex document as is -- but, provided that you have a 
`usepackage{xeCJK}` in the preamble, LaTeX produces correct, space-free output. 
So -- Org "gets away with it" because of LaTeX's handling of CJK text. It seems 
for ODT, Org needs to handle the spacing within its own logic.)

This is org 9.1.9... bit old, I know, but I'm gonna take a wild guess that this 
has not been a high-visibility issue.

hjh



reply via email to

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