Forgot password?
 Create new account
View 2860|Reply 3

定理1接着定理1$'$、定理1$''$

[Copy link]

700

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

kuing Posted at 2013-10-2 22:42:59 |Read mode
这种情况应该会尔偶碰到,在出现  定理1  后,接着有其类似或对偶定理,不宜写成  定理2  而应写成  定理1$'$ ,甚至还接着有  定理1$''$ 等,这时应该怎么处理最好?

我暂时的解决办法是这样的,如果不超出 $''$ ,那么就另外定义两个定理环境,然后让他们的数字跟着原来的定理另外再加上 $'$ 和 $''$,于是就:
\newtheorem{thm}{定理}
\newtheorem{thmp}{定理}
\newtheorem{thmpp}{定理}
\renewcommand\thethmp{\thethm\ensuremath'}
\renewcommand\thethmpp{\thethm\ensuremath{''}}
然后在用的时候就:
  1. \begin {thm}
  2. ……
  3. \end {thm}
  4. \begin {thmp}
  5. ……
  6. \end {thmp}
  7. \begin {thmpp}
  8. ……
  9. \end {thmpp}
Copy the Code
酱子用。

不知你们有没有更好的方法?

700

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

 Author| kuing Posted at 2013-10-2 22:55:44
1#这个方法对引用也没问题,测试文件见附件。
$type thmthmpthmpp.tex (880 Bytes, Downloads: 954)
用 PDFlatex 编译两次即可。

700

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

 Author| kuing Posted at 2015-9-9 16:02:58
刚看到了另一种方法:bbs.ctex.org/forum.php?mod=viewthread&tid=151886
  1. \newtheorem{thm}{Theorem}
  2. \newenvironment{thmbis}[1]
  3.   {\renewcommand{\thethm}{\ref{#1}这个方法的好处在于 定理1 与 定理1' 不必连着。$}%
  4.    \addtocounter{thm}{-1}%
  5.    \begin{thm}}
  6.   {\end{thm}}
  7. \begin{document}
  8. \begin{thm}
  9. $1+1=2$
  10. \end{thm}
  11. \begin{thm}\label{comm}
  12. $a+b=b+a$
  13. \end{thm}
  14. \begin{thm}
  15. $0\ne0$
  16. \end{thm}
  17. \begin{thmbis}{comm}
  18. \label{commm}
  19. $x+y=y+x$
  20. \end{thmbis}
  21. Theorem \ref{commm}.
  22. \end{document}
Copy the Code
这个方法的好处在于 定理1 与 定理1' 不必连着。

700

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

 Author| kuing Posted at 2015-9-9 16:26:37
回复 3# kuing

噢,如果加了 hyperref 宏包,那么这个方法会在 定理1' 的 1 处产生超链接。

手机版Mobile version|Leisure Math Forum

2025-4-21 01:15 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list