Tag Archives: tex

[Solved] Markdown Edit Formula Error: ParseError: KaTeX parse error: {align} can be used only in display mode

Problem description

Edit formula:

$\begin{align}
  & \sum\limits_{i=1}^{n}{k=\frac{1}{2}}n(n+1) \\ 
 & \text{       }=\Theta ({{n}^{2}}) \\ 
\end{align}$

Markdown Error: ParseError: KaTeX parse error: {align} can be used only in display mode
Error: KaTeX parse error: No such environment: align at position 7: \begin{̲a̲l̲i̲g̲n̲}̲ & \sum\limit…

Solution:
Modify {align} to {aligned}, KaTeX is not support align, you need to modify to aligned.
Layout
Next, modify the formula layout so that the formula surrounded by $$ by KaTeX is centered.
\limit can make n and i=1 located directly above and below the accumulation symbol. ​

$$
\begin{aligned} 
\sum_{i=1}^{n} k &=\frac{1}{2} n(n+1) \\ 
&=\Theta \left(n^{2}\right) 
\end{aligned} 
$$

No data: data: get host by name failed in TCP_ Connect() error resolution

the reason is that the version of MiKTeX component in CTeX is too low , which cannot be connected to the server for update. Manual update will give an error message:

No Data:
Data: Get host by name failed in tcp_connect().

solution:
requires a higher version of MiKTeX to be installed. Download the latest version of the installation file from the website https://miktex.org/download. The installation path does not need to be in ctex. Packages that need to be installed can be installed directly in the console.

can also be automatically installed through a pop-up window during compilation in winedit10.3.