improve katex style

This commit is contained in:
JamesFlare1212
2024-11-19 16:54:06 -05:00
parent fc70b1776c
commit 47358d25a8
4 changed files with 180 additions and 169 deletions

View File

@@ -47,3 +47,8 @@ details summary strong {
margin-bottom: 0;
}
}
.katex-display {
overflow-x: auto;
overflow-y: clip;
}

View File

@@ -183,7 +183,7 @@ V(n002): 2.56098 voltage
V(n003): 2.43902 voltage
```
and the voltage is the difference in potential. Based on that, we can caculate the theoretic values of $V(R1)$, $V(R2) = V(R3)$ and $V(R4)$.
and the voltage is the difference in potential. Based on that, we can calculate the theoretic values of $V(R1)$, $V(R2) = V(R3)$ and $V(R4)$.
$$
\begin{align*}
@@ -211,7 +211,7 @@ $$
Let's make a table to compare the results
|Iteams|Analysis|Simulation|Experiement|diff|$\%$diff|
|Items|Analysis|Simulation|Experiment|diff|$\%$diff|
|:-:|:-:|:-:|:-:|:-:|-:|
|$V(R1)$|$2.4390V$|$2.4390V$|$2.4963V$|$57.28mV$|$2.3\%$|
|$V(R2)$|$0.1219V$|$0.1219V$|$0.1665V$|$44.54mV$|$26.8\%$|
@@ -240,9 +240,9 @@ Using the expectation $I(R1) = I(R2) + I(R3)$ from Analysis. We can check
$$
\begin{align*}
& I(R1) + I(R2) + I(R3) \\\
=& -0.000243902 + 0.000121951 + 0.000121951 \\\
=& \; \boxed{0}
& \quad \thickspace I(R1) + I(R2) + I(R3) \\\
&= -0.000243902 + 0.000121951 + 0.000121951 \\\
&= \boxed{0}
\end{align*}
$$
@@ -266,10 +266,10 @@ Use the expectation $V(n001) - V(n002) - V(n003) = 0$ from Analysis. We can chec
$$
\begin{align*}
& V(n001) - V(n002) - V(n003) \\\
=& \; 2.43902 - 0.12196 - 0.12196\\\
=& \; 0 \\\
& \; 0 = 0 \; \boxed{\text{True}}
& \quad \thickspace V(n001) - V(n002) - V(n003) \\\
&= 2.43902 - 0.12196 - 0.12196 \\\
&= 0 \\\
\boxed{\text{True}}
\end{align*}
$$
@@ -316,7 +316,7 @@ $$
Then, we can check these current result with simulation data.
|Iteams|Analysis|Simulation|Experiement|diff|$\%$diff|
|Items|Analysis|Simulation|Experiment|diff|$\%$diff|
|:-:|:-|:-|:-|:-:|-:|
|$I(R1)$|$0.2439mA$|$0.2439mA$|$0.2496mA$|$0.005728mA$|$2.3\%$|
|$I(R2)$|$0.1665mA$|$0.1665mA$|$0.1219mA$|$0.044549mA$|$26.8\%$|
@@ -423,7 +423,7 @@ $$
Let's make a table to compare the results
|Iteams|Analysis|Simulation|Experiement|diff|$\%$diff|
|Items|Analysis|Simulation|Experiment|diff|$\%$diff|
|:-:|:-:|:-:|:-:|:-:|-:|
|$V(R1)$|$2.5V$|$2.5V$|$2.5539V$|$0.0539V$|$2.1\%$|
|$V(R2)$|$2.5V$|$2.5V$|$2.5204V$|$0.0204V$|$0.8\%$|
@@ -697,7 +697,7 @@ $$
Let's make a table to compare the results
|Iteams|Analysis|Simulation|Experiement|diff|$\%$diff|
|Items|Analysis|Simulation|Experiment|diff|$\%$diff|
|:-:|:-:|:-:|:-:|:-:|-:|
|$V(R1)$|$5V$|$5V$|$5.0305V$|$0.0305V$|$0.6\%$|
|$V(R2)$|$5V$|$5V$|$5.0305V$|$0.0305V$|$0.6\%$|
@@ -736,7 +736,7 @@ $$
I_{total} &= I(R2) + I(R1) \\\
I_{total} &= 0.0005 + 0.0005 \\\
I_{total} &= 0.001 \\\
& 0.001 = 0.001 \; \boxed{\text{True}}
& 0.001 = 0.001 \\; \boxed{\text{True}}
\end{align*}
$$
@@ -954,7 +954,7 @@ We know the simulation output is
V(n001): 5 voltage
```
and the voltage is the difference in potential. Based on that, we can caculate the theoretic values of $V(R1)$ and $V(R2)$.
and the voltage is the difference in potential. Based on that, we can calculate the theoretic values of $V(R1)$ and $V(R2)$.
$$
\begin{align*}
@@ -1006,7 +1006,7 @@ $$
\end{align*}
$$
|Iteams|Analysis|Simulation|Experiement|diff|$\%$diff|
|Items|Analysis|Simulation|Experiment|diff|$\%$diff|
|:-:|:-:|:-:|:-:|:-:|-:|
|$I(R1)$|$0.5mA$|$0.5mA$|$0.50305mA$|$0.00305mA$|$0.6\%$|
|$I(R2)$|$0.5mA$|$0.5mA$|$0.50305mA$|$0.00305mA$|$0.6\%$|
@@ -1149,9 +1149,11 @@ The wheatstone bridge is better than a normal voltage divider because it is more
When a wheatstone bridge is balanced, meaning R1/R2=R3/R4, the current flowing through the galvanometer in the center of the wheatstone bridge is 0. When current is zero, the calculated resistance is no longer affected by innate resistance of wires, resistors, and voltameters. This allows measurements with the wheatstone bridge to be more accurate than a voltage divider.
Advantages:
- Wheatstone bridge is more accurate than voltage divider
- Voltage source does not need to be calibrated to measure resistance
Disadvantages:
- Voltage divider is easier and cheaper to make
- Lower power consumption

View File

@@ -192,9 +192,9 @@ print(ratings['3520029'])
在这个家庭作业中,假设你有两个名为 `movies.json``ratings.json` 的文件。请从这些文件中读取数据,并让用户输入一个年份范围(最小和最大年份)以及两个权重:`w1``w2`。找到在 min 到 max 年之间制作的所有电影(包含 min 和 max。对于每部电影计算其综合评分为
$$
(w1 \times imdb_rating + w2 \times average_twitter_rating) / (w1 + w2)
$$
```python
(w1 * imdb_rating + w2 * average_twitter_rating) / (w1 + w2)
```
其中 `imdb_rating` 来自于 movies 文件,而 `average_twitter_rating` 是 ratings 文件中的平均评分。

View File

@@ -238,7 +238,8 @@ I(V1): -0.000243902 device_current
$$
\begin{align*}
I(R1) + I(R2) + I(R3) &= -0.000243902 + 0.000121951 + 0.000121951 \\\
& \quad \thickspace I(R1) + I(R2) + I(R3) \\\
&= -0.000243902 + 0.000121951 + 0.000121951 \\\
&= \boxed{0}
\end{align*}
$$
@@ -263,7 +264,8 @@ $$
$$
\begin{align*}
V(n001) - V(n002) - V(n003) &= 2.43902 - 0.12196 - 0.12196 \\\
& \quad \thickspace V(n001) - V(n002) - V(n003) \\\
&= 2.43902 - 0.12196 - 0.12196 \\\
&= 0 \\\
\boxed{\text{True}}
\end{align*}
@@ -730,7 +732,7 @@ $$
I_{total} &= I(R2) + I(R1) \\\
I_{total} &= 0.0005 + 0.0005 \\\
I_{total} &= 0.001 \\\
& 0.001 = 0.001 \; \boxed{\text{True}}
& 0.001 = 0.001 \\; \boxed{\text{True}}
\end{align*}
$$
@@ -1137,9 +1139,11 @@ $V = 4.441V, T = 30.25 \degree C$
惠斯通电桥比普通分压器更灵敏,因为它的输出电压受电阻比例变化的影响较小。当惠斯通电桥平衡时(即 $R1/R2 = R3/R4$),中心的电流表中的电流为零。此时,计算出的阻值不再受到导线、电阻和伏特计固有电阻的影响,从而使得测量结果更准确。
优点:
- 惠斯通电桥比分压器更准确
- 电压源不需要校准即可测量阻值
缺点:
- 分压器更容易且成本更低制作
- 功耗较低