2025年12月25日 星期四

github 使用

github 初始

 https://chatgpt.com/share/694c86c7-1788-800e-97de-5c492ec415e5


在 ubuntu 下用 ssh,可先用此指令設定

git remote set-url origin git@github.com:usrname/reponame.git


快速 push

git add . && git commit -m "update something" && git push -u origin main

2025年12月23日 星期二

使用 jupyter notebook,預設讓數學式以 latex 美觀呈現的方法

 讓 jupyter notebook 跑 sage 時都顯示漂亮數學式的方法


edit:

~/.ipython/profile_default/startup/00-sage-display.py


加入:

try:

    get_ipython().run_line_magic("display", "latex")

except Exception:

    pass


2025年12月16日 星期二

LuaLaTeX 的文件寫法

\documentclass[12pt]{article}

\usepackage{luatexja}
\usepackage{luatexja-fontspec}

% 英文
\setmainfont{TeX Gyre Termes}

% 中文
\setmainjfont{cwTeX Q Ming Medium}


\begin{document}

Hello,

這是一個 LuaLaTeX 的測試文件。


中文(台灣繁體)測試:
台灣、繁體中文、注音符號


我打江南走過,那等在季節裡的容顏。

數學測試:
\[
E = mc^2
\]

\end{document}