I found that even after using prompts, inline formulas still cannot be displayed correctly when using the web version of GitHub Copilot.
Some inline formulas are correctly wrapped in a single $ so that the formulas are displayed correctly, but most inline formulas are incorrectly wrapped in two $s, making the formulas unable to display correctly.
The link to the web version of GitHub Copilot is https://github.com/copilot
The model version I am using is o3-mini.
What prompt should I use to display the formula correctly, or is it an internal issue with GitHub Copilot Web?
This is the issue from gitub https://github.com/microsoft/vscode-copilot-release/issues/978
Below is the personal instruction I used.
Please use the correct LaTeX math formula formatting in your responses:
1. Inline formulas: Use single dollar signs, for example $E=mc^2$
2. Display formulas: Use double dollar signs
Below is an example. You can see that some inline formulas are incorrectly enclosed with two dollar signs, so they are not displayed correctly.
The Leibniz criterion (or alternating series test) states that an alternating series
$$
\sum_{n=1}^{\infty} (-1)^{n-1} a_n,
$$
converges if the sequence $(a_n)$ satisfies the following two conditions:
1. The sequence is monotonically decreasing:
$$
a_1 \ge a_2 \ge a_3 \ge \cdots \ge 0,
$$
2. The terms converge to zero:
$$
\lim_{n\to\infty} a_n = 0.
$$
Below is a classical proof of the criterion.
---
**Proof:**
Define the \( n \)th partial sum of the series by
$$
s_n = \sum_{k=1}^n (-1)^{k-1} a_k.
$$
We will show that the sequence \( (s_n) \) converges by demonstrating that the partial sums form two sequences—one consisting of the even-indexed partial sums and one consisting of the odd-indexed partial sums—that are monotonic and bounded, and that they “squeeze” the series into a unique limit.
1. **Consider the subsequence of odd-indexed partial sums:**
Let
$$
s_{2n-1} = a_1 - a_2 + a_3 - \cdots + a_{2n-1}.
$$
To see that \( (s_{2n-1}) \) is decreasing, observe that
$$
s_{2n-1} - s_{2n+1} = \Big[a_1 - a_2 + \cdots + a_{2n-1}\Big] - \Big[a_1 - a_2 + \cdots + a_{2n-1} - a_{2n} + a_{2n+1}\Big].
$$
This simplifies to
$$
s_{2n-1} - s_{2n+1} = a_{2n} - a_{2n+1}.
$$
Since \( a_{2n} \ge a_{2n+1} \) (by the monotonicity assumption), we have
$$
s_{2n-1} \ge s_{2n+1}.
$$
Thus, the odd-indexed partial sums form a decreasing sequence.
2. **Consider the subsequence of even-indexed partial sums:**
Let
$$
s_{2n} = a_1 - a_2 + a_3 - \cdots - a_{2n}.
$$
Now, compare consecutive even-indexed partial sums:
$$
s_{2n+2} - s_{2n} = \Big[s_{2n} - a_{2n+1} + a_{2n+2}\Big] - s_{2n} = - a_{2n+1} + a_{2n+2}.
$$
Because \( a_{2n+1} \ge a_{2n+2} \), it follows that
$$
- a_{2n+1} + a_{2n+2} \ge 0,
$$
so
$$
s_{2n+2} \ge s_{2n}.
$$
Therefore, the even-indexed partial sums form an increasing sequence.
3. **Bounding the two subsequences:**
Notice that for every \( n \),
$$
s_{2n} \le s_{2n-1}.
$$
This is because \( s_{2n-1} = s_{2n} + a_{2n} \) and \( a_{2n} \ge 0 \).
Consequently, the entire sequence of partial sums is "squeezed" between these two subsequences:
- The increasing sequence \( (s_{2n}) \) is bounded above by \( s_1 \) (since \( s_1 \) is the first odd partial sum).
- The decreasing sequence \( (s_{2n-1}) \) is bounded below by \( s_{2n} \).
By the Monotone Convergence Theorem, both sequences converge; denote
$$
\lim_{n\to\infty} s_{2n} = L \quad \text{and} \quad \lim_{n\to\infty} s_{2n-1} = M.
$$
Since
$$
s_{2n} \le s_{2n-1}
$$
for all \( n \) and the difference between them is \( s_{2n-1} - s_{2n} = a_{2n} \), which tends to 0 by assumption, we obtain
$$
\lim_{n\to\infty} \big(s_{2n-1} - s_{2n}\big) = 0.
$$
Therefore, \( L = M \).
4. **Conclusion:**
Since both subsequences converge to the same limit \( L \), the sequence of partial sums \( (s_n) \) converges to \( L \). That is,
$$
\sum_{n=1}^{\infty} (-1)^{n-1} a_n = L.
$$
Thus, the Leibniz criterion confirms that the alternating series converges.
---
This completes the proof.




