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

[BUG]定理定义等环境格式问题 #102

Open
mwh-aki opened this issue Jun 5, 2023 · 1 comment
Open

[BUG]定理定义等环境格式问题 #102

mwh-aki opened this issue Jun 5, 2023 · 1 comment

Comments

@mwh-aki
Copy link

mwh-aki commented Jun 5, 2023

描述您的问题 (Describe the bug)

定理、定义等环境并未首行缩进。
定理、定义等环境内的字体和字号是否应和正文一致?
尝试修改cls但改不出来orz,烦请拨冗解惑,感恩感谢制作组。

环境与版本信息

  1. 代码版本(Code version)(留空则默认最新):
  2. 操作系统 (OS):MacOs
  3. Texstudio 2021
@paopaopaojiang
Copy link

  • 首行缩进需要将所有定理环境添加\hspace{2em},具体在300行左右
  • 关于字体,其实我认为定理环境内楷体还挺好看的,不过proof环境和example环境应该跟正文字体一致,所以我设置了example环境和证明环境为normalfont
  • 总体来说,我修改的内容包括两部分。一个是证明环境,将292行的
    \if@npu@lang@chs\newtheorem*{proof}{证明}\else\newtheorem*{proof}{Proof}\fi}
    修改为
\if@npu@lang@chs
    \theorembodyfont{\normalfont}                 %添加此行使证明中字体与正文一致
    \newtheorem*{proof}{\hspace{2em}证明}
    \else\newtheorem*{proof}{Proof}\fi}

另一个是295到301行,将

\newtheorem{theorem}{定理}[chapter]
    \newtheorem{axiom}[theorem]{公理}
    \newtheorem{corollary}[theorem]{推论}
    \newtheorem{lemma}[theorem]{引理}
    \newtheorem{definition}[theorem]{定义}
    \newtheorem{example}[theorem]{例}
    \newtheorem{proposition}[theorem]{命题}

修改为

    \newtheorem{axiom}{\hspace{2em}公理}[chapter]
    \newtheorem{corollary}{\hspace{2em}推论}[chapter]
    \newtheorem{lemma}{\hspace{2em}引理}[chapter]
    \newtheorem{definition}{\hspace{2em}定义}[chapter]
    \newtheorem{proposition}{\hspace{2em}命题}[chapter]
    \newtheorem{remark}{\hspace{2em}注}[chapter]
    \theorembodyfont{\normalfont}            %此行命令之下的环境都会让字体与正文一致
    \newtheorem{example}{\hspace{2em}例}[chapter]
  • 在修改的时候发现了一个小问题,在proof环境里面如果使用equation环境结尾的话不会自动添加小方块,所以建议最后用文字结尾。

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

No branches or pull requests

2 participants