![newtxtext 與 ntheorem 之間的干擾](https://rvso.com/image/348608/newtxtext%20%E8%88%87%20ntheorem%20%E4%B9%8B%E9%96%93%E7%9A%84%E5%B9%B2%E6%93%BE.png)
我在休息了很長一段時間後嘗試使用LaTeX,我發現新文本文本和定理相互衝突並顯示訊息“Theoremstyle plain已經定義”。另一方面,新TX數學似乎不干涉這裡。
\documentclass[openany,english]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{newtxtext}
\usepackage{amsmath, amssymb, graphicx}
\usepackage[amsmath, thmmarks, thref]{ntheorem}
\begin{document}
hello
\end{document}
我查閱了pdf文件但沒有找到原因;定理文件提到了可能的干擾阿姆斯數學,我處理正確(希望),但沒有提到新文本文本。文件相同新文本文本;沒有提到任何關於定理。
我的問題:我該怎麼做才能解決這個衝突?如果我必須放棄 newtxtext(可能還有 newtxmath),你推薦什麼字體來代替它,並且不可能與 ntheorem 衝突?
提前致謝。
答案1
包裹newtxtext
裝載amsthm
。amsthm
並且ntheorem
不能一起使用。手冊ntheorem
建議使用選項amsthm
。所以你必須阻止newtxtext
加載amsthm
。以下似乎有效:
\documentclass[openany,english]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,graphicx}
\usepackage[amsmath,amsthm,thmmarks,thref]{ntheorem}
\PreventPackageFromLoading{amsthm}
\usepackage{newtxtext}
\begin{document}
hello
\end{document}
它甚至似乎無需任何選項即可工作amsthm
。
如果您不使用 KOMA-Script 類,則必須載入套件scrlfile
才能取得\PreventPackageFromLoading
.