Export and import pdf bookmarks
It is sometimes useful to export and import the bookmarks of an existing pdf file to a new pdf file with smaller size. This can be easily done using pdftk. pdftk is available as GUI and commandline tools. In MacOS, it is better to use it in the terminal. After installation of pdftk, the bookmarks of one pdf file can be extracted from an existing pdf file and imported to a new pdf file using the following lines.
2023-04-24
1 min read
How to setup an IPA input method
Use RIME RIME is an input method engine. It can run different input method schemas, and of course, IPA. There are two schemas which are available in RIME, yunlong and xsampa. To use these schemas, you need to install RIME. It can be installed on Windows, MacOS and Linux. After installation, there are two files you need to modify to complete the configuration. The first is default.custom.yaml. My configurations of this file are as below.
2022-11-01
2 min read
在 LaTeX 中显示生僻字
在 LaTeX 里显示生僻字是一个棘手的问题。用xeCJK包可以解决这个问题,而且不用在文件中遇见生僻字就改字体。 xeCJK包的使用手册中有FallBack的选项(8 页),可以用以下两种办法指定生僻字的字体 \setCJKmainfont[FallBack=SimSun-ExtB]{SimSun} \setCJKmainfont{SimSun} \setCJKfallbackfamilyfont{\CJKrmdefault}{SimSun-ExtB} 第一种办法是在指定字体时用FallBack参数指定备用字体,第二种办法是在指定字体之后再用\setCJKfallbackfamilyfont指定备用字体。二者是等价的。但是要注意的是,在用FallBack时,必须在导入xeCJK宏包时设置AutoFallBack=true。
2022-11-01
1 min read