Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数学公式编号问题 #1

Closed
FengHZ opened this issue May 10, 2018 · 8 comments
Closed

数学公式编号问题 #1

FengHZ opened this issue May 10, 2018 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@FengHZ
Copy link

FengHZ commented May 10, 2018

config/package.tex下没有对数学公式以及相应编号的环境。可以增加以下语句解决:

\usepackage{amsmath}
\renewcommand{\thesection}{%
  \ifnum\c@chapter<1 \@arabic\c@section
  \else \thechapter.\@arabic\c@section
  \fi
}
\numberwithin{equation}{section}% reset equation counter for sections
\numberwithin{equation}{subsection}
% Omit `.0` in equation numbers for non-existent subsections.
\renewcommand*{\theequation}{%
  \ifnum\value{subsection}=0 %
    \thesection
  \else
    \thesubsection
  \fi
  .\arabic{equation}%
}

这样采用以下带编号的数学公式环境时可以自动生成(section.subsection)的编号

\begin{equation}
\end{equation}
@TheNetAdmin
Copy link
Owner

TheNetAdmin commented May 10, 2018

根据编写规则2.3.1.2节:应用从“1”开始的阿拉伯数字进行编号,并将编号置于括号内。

不过也规定了:公式较多时,应分章编号。

原模板直接调用equation环境可以产生第一种编号,第二种编号(按章节编号)的风格我认为可以作为专业格式的一部分,请问你的专业是什么,专业英文简称是什么,我添加一下这个编号格式

@FengHZ
Copy link
Author

FengHZ commented May 10, 2018

@TheNetAdmin 您好,我的专业是数学科学学院,英文简称就是School of Math。我没有注意到原来的编写规则,以为都是和数院一样按章节编号的通用规则,真是抱歉了。

我上面添加的语句可以直接在package.tex里添加,然后亲测是可以使用的。麻烦您了。

@TheNetAdmin
Copy link
Owner

TheNetAdmin commented May 10, 2018

@FengHZ 我更新了v1.2.0版本,尝试把新版本config/format目录下的内容迁移过来,并在config/format/format.tex中,将cs格式引入改为math格式引入(参考README.md),然后编译看一下结果怎么样。

@TheNetAdmin TheNetAdmin self-assigned this May 10, 2018
@TheNetAdmin TheNetAdmin added the enhancement New feature or request label May 10, 2018
@FengHZ
Copy link
Author

FengHZ commented May 10, 2018

@TheNetAdmin 您好,编码公式会出现(0.x.y)的格式,0好像是章节的标号,不知能不能去掉~我原来在config/package.tex里加了

\renewcommand{\thesection}{%
  \ifnum\c@chapter<1 \@arabic\c@section
  \else \thechapter.\@arabic\c@section
  \fi
}

去掉了章节编号。

@TheNetAdmin
Copy link
Owner

TheNetAdmin commented May 10, 2018

@FengHZ 我在v1.2.0里config/format/general/numbering.tex中去掉了section的chapter前缀,你看这个文件你有更新吗

\renewcommand*{\thesection}{\arabic{section}}

或者你需要保留章编号前缀吗?如果需要我可以将你的这个thesection的编号加入math专业格式

我编译得到的结果是
image

@FengHZ
Copy link
Author

FengHZ commented May 10, 2018

@TheNetAdmin 我重新更新了这个文件,现在可以了~谢谢!

@FengHZ
Copy link
Author

FengHZ commented May 10, 2018

@TheNetAdmin 不用保留章节编号,用section.subsection即可~谢谢

@TheNetAdmin
Copy link
Owner

OK,issue关闭,如有问题可以重开此issue。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants