emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Cantoraz Chou <cantoraz@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CAJg5Zf04PPHdkSiXx9x9dOBAFE3dL0Ge8YANDz==cwde_H-uoQ@mail.gmail.com> (raw)
In-Reply-To: <87k01q7sm5.fsf@localhost>

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.

  reply	other threads:[~2023-01-14 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  3:49 [BUG] [ox-odt] ODT export Chinese/Han script inserts unexpected spaces in each consecutive line Cantoraz Chou
2023-01-13  8:20 ` Ihor Radchenko
2023-01-14 13:44   ` Cantoraz Chou [this message]
2023-01-14 13:54     ` Timestamp format during export (was: [BUG] [ox-odt] ODT export Chinese/Han script inserts unexpected spaces in each consecutive line) Ihor Radchenko
2023-01-14 14:00     ` Pixel table alignment " Ihor Radchenko

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='CAJg5Zf04PPHdkSiXx9x9dOBAFE3dL0Ge8YANDz==cwde_H-uoQ@mail.gmail.com' \
    --to=cantoraz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).