From: Maxim Nikulin <firstname.lastname@example.org> To: email@example.com Subject: Re: Bug: ODT export of Chinese text inserts spaces for line breaks Date: Wed, 30 Jun 2021 19:22:21 +0700 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> On 29/06/2021 10:47, James Harkins wrote: > * Test > 1本人不想亲自拿到学历学位证书、急于离校者,可书面委托他人代领学历学位证 > 书,29日起即可离校;2本人想亲自领取学历学位证书者,按学校规定的程序及有关 > 要求办理离校手续,领取相关证书后离校; > Exporting to ODT produces the following (body text, omitting titles, > headers and such). > > 1本人不想亲自拿到学历学位证书、急于离校者,可书面委托他人代领学历学位证 书,29日起即可离校;2本人想亲自领取学历学位证书者,按学校规定的程序及有关 要求办理离校手续,领取相关证书后离校; Confirmed: newlines are copied to ODT document as is and they appear as spaces in libreoffice. I did not tried HTML since I am unsure if browsers should glue paragraphs with newlines into continuous string without spaces. Maybe it is necessary to add some attributes for proper representation (e.g. "lang"), however "#+LANGUAGE: cn" does not help even though libreoffice considers paragraph as Chinese. On 30/06/2021 01:19, Eric Abrahamsen wrote: > There are a few ways to approach this: > > (aref char-script-table ?中) -> 'han > (string-match-p "\\cc" "中") -> 0 > (aref (char-category-set ?中) ?|) -> t Thank you. I have not noticed all features hidden behind \c. I believe, (rx (category can-break)) is more readable and I am a bit surprised that there is no descriptive aliases char-categories such as ?|. Just to add another example: (category-set-mnemonics (char-category-set ?ф)) -> ".LYchjy" and `describe-categories' to decipher it. As to splicing lines, I found `fill-delete-newlines' that uses `fill-nospace-between-words-table' besides ?| category to determine whether space should be suppressed while splicing lines. In addition there are some variables to tune behavior.
prev parent reply other threads:[~2021-06-30 12:23 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-29 3:47 James Harkins 2021-06-29 4:43 ` tumashu 2021-06-29 17:01 ` Bug: " Maxim Nikulin 2021-06-29 18:19 ` Eric Abrahamsen 2021-06-30 12:22 ` Maxim Nikulin [this message]
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 \ --firstname.lastname@example.org' \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: Bug: ODT export of Chinese text inserts spaces for line breaks' \ /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
Code repositories for project(s) associated with this 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 NNTP newsgroup(s).