CTeX-org / ctex-kit

Macro Packages and Scripts for Chinese TeX users
976 stars 124 forks source link

Feature: Get current CJK font family #523

Open cykerway opened 4 years ago

cykerway commented 4 years ago

While I can set current CJK font family using \CJKfamily, there doesn't seem to be a way to get it? I think I can get \CJKrmdefault, \CJKsfdefault, \CJKttdefault, \CJKfamilydefault, but I am missing the one for plain, ungrouped text. Whenever I change \CJKfamily, I have to rely on the fact(?) that its scope is limited to the current group to restore its previous value.

How about adding \setCJKfamily and \getCJKfamily macros, moving its current functionalities into \setCJKfamily and making \CJKfamily more like \CJKfamilydefault, etc.?