Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加英文翻译 #424

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

增加英文翻译 #424

wants to merge 6 commits into from

Conversation

stone-zeng
Copy link
Member

目前是由 @DavidFangWJ 同学为 xeCJK 进行了翻译,首先感谢他的贡献!

有些问题觉得仍要讨论:

  1. 英文文档是否独立为一个单独的文件?一是代码这边要不要分开,另外是 PDF 是否要分为两个。

    • diagboxseealso 宏包直接把中英文统一在单独的文档中,但这样的缺点是无法(很难)做区别设置,如 例 x 这种;
    • luatexja 没有把代码部分放进 .dtx,而是直接用 .dtx 生成双语文档,也有两个独立的 PDF 文件;
    • chemfig 比较类似,但没有用 .dtx,而是直接维护两个 .tex 文件,代码也是独立的;
    • 我自己的 zhlipsum 是把中英文文档写在一起,然后靠外部的 Lua 脚本生成英文文档的 .tex 文件,PDF 也有两个;
    • 最后,注意到 siunitxfontspec 最近都把巨大的 .dtx 拆分成了若干部分,是否有必要考虑呢?
  2. ctxdocctxdocstrip 中有一些平台相关的代码(主要是字体设置),可以统一使用 ctex 本身的跨平台方案;另外可以对英文文档做一些额外的处理(加个选项什么的?)。

  3. ctxdocctxdocstrip 虽然不算公开的功能,但至少可以在 ctex 宏包的文档说明一下。类似的还有 ctexpatchctexhook

@zepinglee
Copy link
Member

话说 @DavidFangWJ 不是有 github 帐号吗,可以自己 push 呀

@DavidFangWJ
Copy link

@zepinglee 我是自己不会,只好……(尴尬)

@RuixiZhang42
Copy link
Member

撒花庆祝!!!

还有一点是:是否考虑对「代码实现」也进行英化

@qinglee
Copy link
Member

qinglee commented Apr 21, 2019

英文文档可以作为一个单独的文档,现阶段比较省事一些。如果要塞进 .dtx 里,我倾向于 luatexja 的处理方式。

ctexpatchctexhook 只是减少外部依赖自己造的轮子,都有传统宏包可供使用,并且使用的是 LaTeX3 语法,并不鼓励外部使用,不提也罢。

ctex/ctex.dtx Outdated Show resolved Hide resolved
@Liam0205
Copy link
Contributor

英文文档可以作为一个单独的文档,现阶段比较省事一些。如果要塞进 .dtx 里,我倾向于 luatexja 的处理方式。

这是我的锅。是我建议仿照 diagbox 的方式写双语文档的。

@RuixiZhang42
Copy link
Member

新增的范例

%   \begin{ctexexam}
%   % 导言区
%   \setmainfont{Source Serif Pro}
%   \setsansfont{Source Sans Pro}
%   \setmonofont{Source Code Pro}
%   \setCJKmainfont{Source Han Serif SC}
%   \setCJKsansfont{Source Han Sans SC}
%   \setCJKmonofont{Source Han Sans HW SC}
%   \end{ctexexam}

使用不当。根据 Source Han Serif/Sans 的官方用户手册,Source Serif/Sans Pro 的字重、相对大小全部是经过西文设计师调整之后才加到对应的 Source Han 系列里面的。我的想法是尽量避免「不专业」的范例。

相关链接:

@stone-zeng
Copy link
Member Author

我的想法是这边只用来说明一下语法,不代表是使用示例。改成这样可好?干脆换成别的字体了。

\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
\setCJKmainfont{Source Han Serif SC}
\setCJKsansfont{Source Han Sans SC}
\setCJKmonofont{Source Han Sans HW SC}

或者下面说明一下这个例子不推荐实际使用。文档后面我其实也想加一些实际的案例,比如可以摘录 ctex 的一些配置。

至于中西文的「严格」匹配,大概只有等 variable font 实际可用的时候了(笑)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants