GithubHelp home page GithubHelp logo

中文斜体失效 about sysu-thesis HOT 6 OPEN

sysu-scc avatar sysu-scc commented on August 19, 2024 2
中文斜体失效

from sysu-thesis.

Comments (6)

Lovely-XPP avatar Lovely-XPP commented on August 19, 2024

要不用个\renewcommand进行替换

\renewcommand{\textit}[1]{\kaishu{#1}}

from sysu-thesis.

Huangxt57 avatar Huangxt57 commented on August 19, 2024

要不用个\renewcommand进行替换

是否会对英文斜体输出造成影响?

from sysu-thesis.

Lovely-XPP avatar Lovely-XPP commented on August 19, 2024

会的,我看看有没有其他解决办法

from sysu-thesis.

Lovely-XPP avatar Lovely-XPP commented on August 19, 2024

有一个解决办法,但是不知道为啥会出现超内存的情况:

\renewcommand*{\textit}[1]{{\kaishu \textit{#1}}}

报错

TeX capacity exceeded, sorry [save size=80000].

如果要统一中英文的斜体的话,只能暂时新建一个命令

\newcommand*{\textitt}[1]{{\kaishu \textit{#1}}}

from sysu-thesis.

Lovely-XPP avatar Lovely-XPP commented on August 19, 2024

另外,从底层来看,我发现xelatex并没有正确调用斜体对应的字体,这是fandol字体集的设定:

\setCJKmainfont { FandolSong-Regular.otf }
          [
            cmap       = UniGB-UTF16-H,
            BoldFont   = FandolSong-Bold.otf,
            ItalicFont = FandolKai-Regular.otf
          ]

而我们调用\textit{xxx}的警告却是

Font shape `TU/FandolSong-Regular(1)/m/it' undefined
(Font)	using `TU/FandolSong-Regular(1)/m/n' instead.

说明没有正确调用ItalicFont = FandolKai-Regular.otf

除此之外,我阅读ctex和xeCJK的宏包说明,发现没有办法直接更改斜体字体,最主要的难点在于不能获取当前CJK字体族对应的字体名称,所以从底层更改字体来解决问题比较困难。

from sysu-thesis.

ddddavid-he avatar ddddavid-he commented on August 19, 2024

#61 后的更新中用自定义字体文件可以解决这个问题

from sysu-thesis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.