newtxtext 與 ntheorem 之間的干擾

newtxtext 與 ntheorem 之間的干擾

我在休息了很長一段時間後嘗試使用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裝載amsthmamsthm並且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.

相關內容