Apr 26, 2025

xelatex, switching from windows to Mac, Chinese font problems

 之前在windows上的微軟正黑體換到mac上後xelatex就編譯不過了。mac上好像只有黑體沒有正黑體。所以說latex可以獨立於作業軟體mac或windows好像不太對。而且我也遇到不少其它問題。我的mac是macOS Mojave version 10.14.6。

FontAwesome problem on Mac with xelatex

 xelatex fontawesome_problem.tex

This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex)

 restricted \write18 enabled.

entering extended mode

(./fontawesome_problem.tex

LaTeX2e <2020-02-02> patch level 5

L3 programming layer <2020-03-06>

(/usr/local/texlive/2020/texmf-dist/tex/latex/standalone/standalone.cls

Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan

dalone

Apr 24, 2025

Vim notes

Notes. Useful commands.
  1. vim的documentation很爛。看他的documentation真的會瘋掉。好像還是要在網路上找解決方法比較實際。
  2. 游標的位置是在游標方塊的左邊,按i insert插入的話,會在游標方塊的左邊插入。如果有兩個游標方塊(比如說游標在{或}上時),游標的位置是在比較深色的那個。在Mac上是這樣子。
  3. p是貼在游標的右方。P是貼在游標的左方。
  4. select/copy/paste/delete
    1. select
      1. 在我的mac上,我可以在vim裡直接用滑鼠選取文字。
      2. 按shift + 左或右 不能選取文字(重要,跟MS Word不同)
      3. 按v進visual mode,然後按左右選取。
      4. 按ctrl + v,按左右加上下選取。
      5. vi) or vi} or vi" or vi' 選取(), {}, " ", ' ' 內的內容,只要游標在裡面就可以。
      6. viw can select inner word, cursor anyhwere in the word. And if you continue pressing w, visual mode can continue selecting more words.
      7. after v select, you can p paste the info in your register to replace the text v selected. Or you can ctrl v to paste the info in your system clipboard. This works on my Mac.
      8. To paste the content you copy from Vim to other programs, in Vim, press "+y$, this yanks the content to the end of line (y$) into system clipboard, paste into other programs with the usual ctrl v. (在Mac上是cmd v).

    2. ciw - change inner word, word includes underscores but not hyphens
    1. ci' - change inner content in ' ', without ' '.只要指標在' '裡面就可以。
    2. ca' - change outer content in ' ', with ' '.
    3. ci} - change content in { }, without }. 只要指標在{ }裡面就可以。
    4. ca} - change content in { }, with }

    5. daw, cursor anywhere in a word, including the space in front of or after the word.
    6. yaw, cursor anywhere, including the space before or after the word.
    7. yiw, exclude the space