TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried using LaTeX after a long period of rest, and I found out that newtxtext and ntheorem collide with each other with the message 'Theoremstyle plain already defined'. On the other hand, newtxmath doesn't seem to interfere here.

\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} 

I looked up the pdf documentations but couldn't find the reason; ntheorem documentation mentions about the possible interference with amsmath, with which I dealt correctly(hopefully), but nothing was mentioned about newtxtext. Same for the documentation for newtxtext; nothing was mentioned about ntheorem.

My question: what should I do in order to solve this collision? If I have to give up newtxtext(and possibly newtxmath), what fonts do you recommend in place of it that doesn't possibly collide with ntheorem?(I think it's too useful to give up...)

Thanks in advance.

share|improve this question
1  
newtxtext loads amsthm. I don't think, that loading a theorem package inside a font package is a good idea, but it does. – Schweinebacke 5 hours ago
    
@Taxxi - I am unable to replicate the issue you report, using either MacTeX2016 or MikTeX2.9. Please tell us which TeX distribution -- including its vintage -- you use. – Mico 4 hours ago
    
@Mico I reinstalled MikTeX today so it's the latest version. I actually reproduced it right now one more time... I also have to mention I didn't have this problem before; it just happened today after a long break. – Taxxi 3 hours ago
    
@Taxxi - I stand corrected! Somewhere between versions 1.5 and 1.515 (release date of the latter version: 2017/01/22) of newtxtext the instruction \RequirePackage{amsmath,amsthm} % in case of theoremfont made it into the package's code. (I just ran an update on my TeX distribution -- I had last done so about 10 days ago...) A bit unfortunate, to put it mildly. – Mico 3 hours ago
up vote 5 down vote accepted

Package newtxtext loads amsthm. amsthm and ntheorem cannot be used together. The ntheorem manuals recommends to use option amsthm instead. So you have to prevent newtxtext from loading amsthm. Following seems to work:

\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} 

It even seems to work without option amsthm.

If you do not use a KOMA-Script class, you have to load package scrlfile to get \PreventPackageFromLoading.

share|improve this answer
    
@Mico There is an unconditional \RequirePackage{amsmath,amsthm} in newtxtext.sty "just in case the user wants to specify theoremfont" – Andrew Swann 3 hours ago
    
@AndrewSwann - Indeed, I just noticed this myself, after running an update on my system. (I had last done so 10 days ago.) I've posted a comment to this effect below the original posting. – Mico 3 hours ago
    
You should mention the issue to the author of newtx; he's usually prompt to fix weaknesses in his package. – egreg 1 hour ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.