CTeX-org / ctex-kit

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

Ubuntu 18.04 LTS 如何添加隶书字体? #520

Closed harvey-wei closed 4 years ago

harvey-wei commented 4 years ago

OS: Ubuntu 18.04 LTS Tex Editor: TexStudio Latex Distribution: Texlive2020 The LiSu font has already been installed from the command line by sudo apt install ttf-mscorefonts-installer

zepinglee commented 4 years ago

The LiSu font is not included in the ttf-mscorefonts-installer package.

https://packages.debian.org/sid/ttf-mscorefonts-installer

harvey-wei commented 4 years ago

The LiSu font is not included in the ttf-mscorefonts-installer package.

https://packages.debian.org/sid/ttf-mscorefonts-installer Thanks. I made a mistake. I just checked and spotted that I directly exploit the LiSu font transferred from Windows 10. In LibreOffice on Ubuntu, LiSu font works well. But the problem is how to use LiSu in the CTex document. image

zepinglee commented 4 years ago

You can configure the font as in ctex-fontset-windows.def:

https://github.com/CTeX-org/ctex-kit/blob/d7ecde5a77bd33ca489d45d4b267f178da494dab/ctex/ctex.dtx#L10722

https://github.com/CTeX-org/ctex-kit/blob/d7ecde5a77bd33ca489d45d4b267f178da494dab/ctex/ctex.dtx#L10741

harvey-wei commented 4 years ago

You can configure the font as in ctex-fontset-windows.def:

https://github.com/CTeX-org/ctex-kit/blob/d7ecde5a77bd33ca489d45d4b267f178da494dab/ctex/ctex.dtx#L10722

https://github.com/CTeX-org/ctex-kit/blob/d7ecde5a77bd33ca489d45d4b267f178da494dab/ctex/ctex.dtx#L10741 Many Thanks! But should I make the configuration in the ctex-fontset-ubuntu.def in the way you indicated?

harvey-wei commented 4 years ago

image As illustrated in the above screenshot, \lishu still does not work even though the modification is made.

zepinglee commented 4 years ago

The configuration is not suitable in ctex-fontset-ubuntu.def since LiSu is not natively provided in Ubuntu. You can move it to the preamble in your document.

harvey-wei commented 4 years ago

The configuration is not suitable in ctex-fontset-ubuntu.def since LiSu is not natively provided in Ubuntu. You can move it to the preamble in your document.

Moving it the preamble copes with the issue perfectly! Thanks!