On 2023-03-29, at 05:12, Ruijie Yu via General discussions about Org-mode. <emacs-orgmode@gnu.org> wrote:
> Hello, > > I am working on a piece of CJK text, which requires italicization. > > --8<---------------cut here---------------start------------->8--- > 任何一个章节可以通过增加例如 =TODO= 或者 =HOLD= 等关键词来被设置成 /待办/ 。 > --8<---------------cut here---------------end--------------->8--- > > Note the spaces before and after the pair of `?/'. Without these > spaces, the HTML export does not show "待办" as italicized, but instead > treat them as inline literal `?/' characters, which is expected in > current Org implementation. > > Also note that -- unlike English -- Chinese sentences rarely use spaces > (if at all), so showing the space simply because the Org grammar needs > it seems unnatural. > > However, I don't immediately see how to resolve the issue natively in > Org. If we allow `?/' to italicize regardless of spaces, then things > like Unix paths would no longer work. > > So, I came up with using LaTeX like this: > > --8<---------------cut here---------------start------------->8--- > 任何一个章节可以通过增加例如 =TODO= 或者 =HOLD= 等关键词来被设置成\(\textit{待办}\)。 > --8<---------------cut here---------------end--------------->8--- > > This has two drawbacks: > 1. (network-related?) Delay. Apparently HTML uses MathJax to render > LaTeX, and my browser experiences a 1-second delay due to it needing to > download JS code from MathJax and doing some processing. > 2. Transferability. This only resolves the issue of /italicization/. > What if I need to underscore or bold a piece of text (likely), or to add > an inline code block with CJK characters (unlikely)? I would have to > search for how to do each in LaTeX and write the workaround accordingly, > instead of simply using the Org markup syntax for each of them. > > Are there any other solutions than what I have currently? My go-to solution (and not only mine, I guess) is to use a zero-width space. I even have a command to do this: (defun insert-zero-width-space () "Insert Unicode character \"zero-width space\"." (interactive) (insert 8203)) Hth, -- Marcin Borkowski http://mbork.pl