2025年12月26日 星期五

在 Netlify 上放 quarto 原始檔案讓它 build 的方法

netlify.md

Fix option 1: Add package.json with plugin

From the root of your Quarto project (the same directory as netlify.toml):

  1. If you do not have package.json yet, create it with:

    npm init -y
  2. Install the Quarto Netlify plugin as a dependency:

    npm install --save-dev @quarto/netlify-plugin-quarto # or equivalently: # npm install -D @quarto/netlify-plugin-quarto

    This will add something like:

    { "devDependencies": { "@quarto/netlify-plugin-quarto": "^0.0.5" } }

    to package.json.[2][5][1]

  3. Ensure your netlify.toml in the repo root contains at least:

    [[plugins]] package = "@quarto/netlify-plugin-quarto" [build] command = "quarto render" publish = "_site"
  4. Commit package.json, package-lock.json (or pnpm-lock.yaml/yarn.lock), and netlify.toml, push to GitHub, and trigger a new deploy.[2][3]

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}

2025年12月7日 星期日

如何用 miniconda 再安裝 jupyter lab

$ conda create -n jlab python=3.11

$ conda activate jlab

$ conda install -c conda-forge jupyterlab

$ jupyter lab


update

$ conda update -c conda-forge jupyterlab



2025年11月14日 星期五

如何在 Ubuntu 20.04 安裝 wxMaxima 24.04.2

1. 下載原始碼

wget https://github.com/wxMaxima-developers/wxmaxima/archive/refs/tags/Version-24.02.2.tar.gz -O wxmaxima-24.02.2.tar.gz

2. 解壓縮

tar xzf wxmaxima-24.02.2.tar.gz

cd wxmaxima-Version-24.02.2

3. 依此安裝

mkdir -p build

cd build

以下這一步是關鍵

cmake -S . -B ../build-wxm -DWXM_DISABLE_WEBVIEW=on ..

進入目錄

cd ../build-wxm

開始編譯程式

cmake --build .

測試

./wxmaxima-local

若成功,可以安裝:

sudo cmake --build . -- install



2025年10月21日 星期二

如何在 Netlify 架設 Quarto 網站

參考:
 https://chatgpt.com/share/68f70a75-b748-800e-96a2-39b957d0fe9b


備註:
1. 在 Netlify 上 Build command 留空白就好,不要打 quarto render
2. 在 ubuntu 下用 ssh,可先用此指令設定
git remote set-url origin git@github.com:usrname/reponame.git

3. 快速 push
git add . && git commit -m "init quarto site" && git push -u origin main

2025年5月13日 星期二

免費手寫軟體

 

軟體功能安裝方式
Xournal++免費筆記軟體,支援手寫、PDF 匯入註解sudo apt install xournalpp
Krita強大繪圖軟體,可繪製幾何圖、滑順筆觸sudo apt install krita
OpenBoard教學專用白板,可錄影與備課官方網站下載 .deb 安裝包
GIMP圖像處理,也可做簡單圖形教學sudo apt install gimp