diff options
author | Matti Picus <matti.picus@gmail.com> | 2023-02-09 13:28:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 13:28:59 +0200 |
commit | 684aa6b4999c5f5a61b89344d651d3d51340f183 (patch) | |
tree | 74339b1bf431e3d72c3e8d397c35cb270fef55c5 /doc | |
parent | 7774bc88b29fe9906bc32b3ca6c2cd91f9459bdf (diff) | |
parent | b4a9ab4d88b547524ce6627c02f0789f91c55f12 (diff) | |
download | numpy-684aa6b4999c5f5a61b89344d651d3d51340f183.tar.gz |
Merge pull request #23172 from jfbu/latex_missingchars
DOC: LaTeX/PDF: add support for a few needed Chinese characters
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/conf.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 121973138..ed5c11781 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -258,6 +258,17 @@ latex_elements = { # Additional stuff for the LaTeX preamble. latex_elements['preamble'] = r''' +\newfontfamily\FontForChinese{FandolSong-Regular}[Extension=.otf] +\catcode`琴\active\protected\def琴{{\FontForChinese\string琴}} +\catcode`春\active\protected\def春{{\FontForChinese\string春}} +\catcode`鈴\active\protected\def鈴{{\FontForChinese\string鈴}} +\catcode`猫\active\protected\def猫{{\FontForChinese\string猫}} +\catcode`傅\active\protected\def傅{{\FontForChinese\string傅}} +\catcode`立\active\protected\def立{{\FontForChinese\string立}} +\catcode`业\active\protected\def业{{\FontForChinese\string业}} +\catcode`(\active\protected\def({{\FontForChinese\string(}} +\catcode`)\active\protected\def){{\FontForChinese\string)}} + % In the parameters section, place a newline after the Parameters % header. This is default with Sphinx 5.0.0+, so no need for % the old hack then. |