I'm dissatisfied with the results of how babel
renders CJK scripts (it's hard to get protrusion and punctuation kerning looking nice and lines can break before punctuation—some of these issues can be worked around easily enough, but not all).
I'm experimenting with luatexja
which gives nicer rendering results, at least for Japanese.
My end goal is to have nice Chinese (simplified and traditional) and Japanese (and Korean I guess) as well as other languages that babel
supports in the same document. And be able to switch between languages easily, ideally hooking into babel
's \selectlanguage
to make required CJK changes. I'm beginning to think this is too hard.
(Note: I'm not trying to replace babel
I just want the better output that luatexja
gives.)
But for Chinese scripts there are a few oddities I don't understand.
In the MWE example below, the kerning between the ?and ” seems too large in comparison with 。and ”.
Is it meant to be like this? (I'm not a Chinese reader/speaker).
If not, can I tweak luatexja
in some way?
I notice that similar problems occur if I try and load Noto Serif CJK TC. The kerning between 。and ” is completely wrong in this case.
(I would like to keep using LuaLaTeX rather than XeLaTeX.)
MWE
%! TeX Program = lualatex
\documentclass{article}
\pagestyle{empty}
\usepackage{luatexja-fontspec}
\setmainjfont{Noto Serif CJK SC}
\begin{document}
“你们一路上争论些什么?”
“谁想为首,就该在众人中做最小的,做众人的仆人。”
\end{document}
luatexja-fontspec
is an alternative tobabel
? As far as I can tell, it isn't. For Japanese, I'd assume you'd want eitherbabel
orpolyglossia
. Ditto for Chinese, but the support looks to be more rudimentary (and possibly only available inbabel
). The space you show is nothing to do with the package. It's determined by the font. The package apparently modifies something for the second line, but not the first. If you load the same font with plainfontspec
, the second line shows a similar space at the end.babel
CJK setup does not change kerning between characters (they are all full width). And lack of protrusion makes things look ugly. So if you have a comma or period at the end of a line you get a nasty gap. Also you can get line breaks before punctuation which is undesirable. Some of these things can be worked around by manually adjusting things withmicrotype
and loading custom kerning options, but kerning between latin characters and things like opening quote marks in Chinese requires lower level changes.luatexja
deals with these problems.luatexja
doesn't serve a purpose. But why do you want to use it rather than babel or polyglossia? Don't you want both? (Not both babel and polyglossia, of course.)luatexja
output is better thanbabel
CJK. I still want to usebabel
for other languages. (My use case is producing multilingual parallel texts - e.g., with English, Thai, Persian, Japanese, Simplified Chinese.) I think it would be a nice feature forbabel
to support something likeluatexja
as an optional backend for CJK scripts. That way for simple texts you could do whatbabel
does now. But for better output, you could ask forluatexja
but still use thebabel
front end for language switching.