[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] [ox-odt] ODT export Chinese/Han script inserts unexpected spac
From: |
Cantoraz Chou |
Subject: |
Re: [BUG] [ox-odt] ODT export Chinese/Han script inserts unexpected spaces in each consecutive line |
Date: |
Sat, 14 Jan 2023 21:44:32 +0800 |
Ihor Radchenko <yantar92@posteo.net> wrote:
> Fixed, on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cd967ce00
Thanks for your fix!
-----
[OT]
> P.S. As Chinese user, do you have other gotchas Org might need to
> address?
In my experience, most of weird troubles are related to the (1) language
habit or (2) mixed use of Ideographs and alphanumeric.
Eg. for (1).
The Org export option keyword `DATE' use a fixed built-in timestamp
format which is rarely used in Chinese. It's impossible to customize the
format only for exporting, without touching format in Org.
At present, I have to use a macro to format a Org timestamp to the
string, that used for `DATE' keyword.
It's best to provide a option/variable to set the timestamp format used
in exported doc.
Eg. for (2).
With `pangu-spacing' package installed, set
`pangu-spacing-real-insert-separtor' to nil. A well-chosen monospaced
font are also used to ensure one CJK character is alignment with two
Alphanumerics.
Think of following table:
#+begin_src org
| Alphanumeric | Ideograph | Symbol | Mixed |
|--------------+-----------+----------------------+--------------------------|
| ABC αβγ 123 | 一二三四 | ,。、?!;:“”/‘’ | 1一B二c三α四 |
| ABC αβγ 123 | 一二三四 | ,。、?!;:“”/‘’ | A一/二“三”四 |
| ABC αβγ 123 | 一二三四 | ◉○🞛◇✿❀⚛✸ | ◉一○二🞛三◇四✿❀⚛✸ |
| ABC αβγ 123 | 一二三四 | ▶▷✶⬢⬡☀☼ | ▶▷✶⬢⬡☀☼ |
#+end_src
The right border of `Mixed' column isn't aligned, because
`pangu-spacing' insert a space between Chinese and English in an
overlay. (Actual display result as follows)
#+begin_example
| Alphanumeric | Ideograph | Symbol | Mixed |
|--------------+-----------+----------------------+--------------------------|
| ABC αβγ 123 | 一二三四 | ,。、?!;:“”/‘’ | 1 一 B 二 c 三α四 |
| ABC αβγ 123 | 一二三四 | ,。、?!;:“”/‘’ | A 一/二“三”四 |
| ABC αβγ 123 | 一二三四 | ◉○🞛◇✿❀⚛✸ | ◉一○二🞛三◇四✿❀⚛✸ |
| ABC αβγ 123 | 一二三四 | ▶▷✶⬢⬡☀☼ | ▶▷✶⬢⬡☀☼ |
#+end_example
And, if I move the point vertically by Up/Down key in `Symbol' or
`Mixed' column, the point shifts left or right. This has nothing to do
with `pangu-spacing', but probably because some symbols have variable
width in a font.
Usually, I'm not sure if these problems can be called bugs, or which
extensions are responsible of them. Fortunately, these problems are
non-fatal and tolerable generally.