免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖

新定义了一个环境,怎么调整字号?

如下定义的环境:
\newtheorem*{note}{说明}
想让这个环境里的字号变成scriptsize或者其它的,应该怎么弄?
分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友

如果你用的是 amsthm 宏包的话,在 \newtheorem 之前,先用 \newtheoremstyle 定义一个定理样式,然后再用 \theoremstyle 将定理样式设成它,之后再 \newtheorem 。

不过其实我觉得像这种情况你直接用 \newenvironment{note}{...}{...} 不也可以么?

TOP

回复 2# kuing

谢谢,查了一下,但没编译通过,也不知道错在哪里了。查了texdoc amsthm,里面的示例也看了,还是不明白。能请版主帮看看吗?代码如下:
  1. \documentclass[a4paper]{book}
  2. \usepackage{amsmath}
  3. \newtheoremstyle{mysty}{3pt}{3pt}{\normalfont}{0cm}{\normalfont }{}{1em}{}
  4. \theoremstyle{mysty}
  5. \newtheorem{note}{Note}
  6. \begin{document}

  7. \end{document}
复制代码

TOP

回复 3# abababa

晚点先,先吃饭

TOP

回复 3# abababa

???你都没使用 amsthm,你写的是 amsmath

TOP

回复 5# kuing

谢谢,我明白了。原来直接用ntheorem那个也可以,如果同时用了ntheorem和这个amsthm反而出了很多问题。现在是这样的:
  1. \usepackage[amsmath, thmmarks]{ntheorem}
  2. {
  3.         \theoremstyle{nonumberplain}
  4.         \theoremheaderfont{\indent\bfseries}
  5.         \theorembodyfont{\normalfont}
  6.         \theoremsymbol{\ensuremath{\Box}}
  7.         \newtheorem{proof}{证明}
  8. }
  9. %\newtheoremstyle{xtheorem}{3pt}{3pt}{\normalfont}{0pt}{\indent\bfseries}{}{0pt}{}
  10. %\theoremstyle{xtheorem}
  11. \theoremheaderfont{\indent\bfseries}
  12. \theorembodyfont{\normalfont}
  13. \newtheorem{example}{例}[chapter]
  14. %\newtheoremstyle{xtheoremsharp}{3pt}{3pt}{\normalfont}{0pt}{\indent\bfseries}{}{0pt}{}
  15. %\theoremstyle{xtheoremsharp}
  16. \theoremsymbol{\textup{\#}}
  17. \newtheorem{definition}{定义}[chapter]
  18. \newtheorem{theorem}{定理}[chapter]
  19. \newtheorem{corollary}{推论}[theorem]
  20. %\newtheoremstyle{xnote}{3pt}{3pt}{\scriptsize}{0pt}{\indent\bfseries}{}{0pt}{}
  21. %\theoremstyle{xnote}
  22. \theorembodyfont{\scriptsize}
  23. \newtheorem*{note*}{说明}
复制代码

TOP

回复 6# abababa

早说嘛,ntheorem 比 amsthm 强大,且不能混用,所以我一开始就说“如果你用的是 amsthm 宏包的话……”。

TOP

返回列表 回复 发帖