mailing-list for TeXmacs Users

Text archives Help


Re: How to make a macro to automatically add space between CJK and non-CJK


Chronological Thread 
  • From: Hammer Functor <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: Re: How to make a macro to automatically add space between CJK and non-CJK
  • Date: Mon, 4 Apr 2022 13:55:51 +0800

Dear Chien-ting,

It’s perhaps easier to command your input method engine to flush a space when you switch to another input method or when you press left-SHIFT. Solution of similar problem can be found here https://gist.github.com/lotem/2390510, if you use rime as your CJK im. CJK and non-CJK input means different modes in your im, but they differ in TeXmacs just just in their codepoints. 

You can also set a after-save-hook, to insert space around consecutive CJK characters. But that’s more complicated. Configure TeXmacs to dynamically recognize CJK input, I guess, is way more complicated than that. 

Sincerely,
Hammer

On Apr 4, 2022, at 1:51 AM, Chen Chien-ting <address@hidden> wrote:

Hello everyone,

I'm interested in using TeXMacs, but I find that I have to make a macro
or plugin to add a space between CJK ideographs and Non-CJK letters.
However, It seems that there is nothing to make me detect the char index
of a character/letter to determine whether a space should be put after
it in the manual . How can I find the method to make a character
detection and to use it to automatically add spaces? or is there any
extension/plugins to add spaces automatically?

Sincerely yours,

Chien-ting




Archive powered by MHonArc 2.6.24.

Top of page