Skip to content

A strange bug related to equation environment #9

@Clark-Young

Description

@Clark-Young

When I try add below to my .tex file and compile it,

To understand how to calculate the exchange correlation density, let's clarify some definitions. The exchange correlation energy density is defined as \begin{equation}
  E[\rho] = \int \rho(\bfit{r}) \varepsilon[\rho, \nabla \rho, \nabla^2 \rho, \cdots] (\bfit{r})\mathrm{d} \bfit{r}
\end{equation}

I got an error:
Bad register code (32768).
__regex_query_set_aux:nN ...__regex_curr_pos_int

But when I try to get an mwe like

\documentclass[11pt, paperstyle=light yellow, color entry,
  title in boldface, title in sffamily, use style = classical]{jwjournal}
% paperstyle = ... 用于调节纸张颜色,可选项包括:lightyellow、yellow、parchment、green、lightgray、gray、nord、dark
% color entry 可以为每个条目的标题增添更多色彩
% scroll 可以开启卷轴模式,生成类似于长截图的单页 pdf
\usepackage{unicode-math}
\usepackage{amsmath}
\UseLanguage { English } % 设置文档语言为英语
\newcommand{\bfit}[1]{\symbfit{#1}}
\begin{document}


2025-07-08 Sunny | Anywhere

2025-08-28 Cloudy | French Family Science Center

[More about the Exchange Correlation Density]

To understand how to calculate the exchange correlation density, let's clarify some definitions. The exchange correlation energy density is defined as \begin{equation}
  E[\rho] = \int \rho(\symbfit{r}) \varepsilon[\rho, \nabla, \nabla^2, \cdots] (\bfit{r})\mathrm{d} \bfit{r}
\end{equation}

\end{document}

I could complile it successfully. No bugs arised.

and if I change the equation environment to $$ $$, no bugs arised.

If I add subscripts like,

$$
E_{xc}[\rho] = \int \rho(\symbfit{r}) \varepsilon_{xc}[\rho, \nabla \rho, \nabla^2 \rho, \cdots] (\symbfit{r})\mathrm{d} \symbfit{r}
$$

the bug arrised again.

I'm not sure what happened here. If you need more information, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions