Document Classesntheorem: cannot toggle to normalfont/always italic

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

ntheorem: cannot toggle to normalfont/always italic

Post by warrence »

hi

i'm messing around with the ntheorem package for about one week by now and still can't get it to do want i want... ;)
in the past i used the package amsmath with something like this:

Code: Select all

\theoremstyle{plain}
\newtheorem{satzenv}{Satz}[section]
\newtheorem{lemenv}{Lemma}[section]

\theoremstyle{definition}
\newtheorem{defenv}{Definition}[section]
\newtheorem{bspenv}{Beispiel}[section]

\theoremstyle{remark}
\newtheorem*{bemenv*}{Bemerkung}
\newtheorem*{vereinbenv}{Vereinbarung}
this creates theorem-like environments for my purposes. the theorem styles used are predefined by amsthm (i suppose). "plain" lets the headline appear in bold and upright, the body font in italic. "definition" uses bold and upright headline font and upright body font. the "remark" style finally uses italic font for both, headline and body.
now i'm trying to get the same appearance using ntheorem (because i want to use other features of this package). my code is something like this:

Code: Select all

\theoremstyle{plain}
\newframedtheorem{satzenv}{Satz}[section]
\newtheorem{lemenv}{Lemma}[section]

\theorembodyfont{\upshape}
\newtheorem{defenv}{Definition}[section]
....
\upshape does not change the appearance of the text. it is still italic, just as in "satzenv" above. in the documentation one example used the same line and there it worked. I also tried \normalfont and \normalfont\upshape with no effect.
I call the package by

Code: Select all

\usepackage[framed, amsthm]{ntheorem}
the other packages i use are the following (maybe there is a conflict with one of them):

Code: Select all

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman, english]{babel}
\usepackage{array, paralist}
\usepackage[pdftex]{geometry}
\usepackage{amsmath, amssymb}
\usepackage{multicol, multirow}
\usepackage{ulem}
\usepackage{makeidx}
\usepackage[ngerman, english]{varioref}
\usepackage{bbm, stmaryrd}
\usepackage{calc}
\usepackage{wrapfig, picins}
\usepackage{ifthen}
\usepackage{color}
\usepackage{marginnote}
\usepackage{framed}
\usepackage[framed, amsthm]{ntheorem}
\usepackage[bookmarksopen, colorlinks=false, pdfpagemode=UseNone, pdfstartview=Fit]{hyperref}
i would be grateful for any solutions or ideas, why i can't toggle to normal font style. thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: ntheorem: cannot toggle to normalfont/always italic

Post by balf »

I noticed that you use hyperref, but do not use the hyperref option of ntheorem. Maybe the problem is there? Also, try with inverse loading order.

B.A.
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

ntheorem: cannot toggle to normalfont/always italic

Post by warrence »

i tried loading ntheorem with

Code: Select all

\usepackage[framed, amsthm, hyperref]{ntheorem}
and after hyperref, but this did not help.
thanks anyway
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Re: ntheorem: cannot toggle to normalfont/always italic

Post by Stefan Kottwitz »

Hi warrence,

maybe it's better to do without the amsthm option. It is recommended by the ntheorem authors not to use amsthm but to use the ntheorem features instead for defining the theorem environments.
If you want to use amsthm like it is now I could give you a small warkaround that disables \itshape inside defenv environments.

Stefan
LaTeX.org admin
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

ntheorem: cannot toggle to normalfont/always italic

Post by warrence »

okay, it works without the amsthm option. but this raises the next problem. i used amsthm for an proof-environment which displayed a small box at its end. apparently ntheorem can do this as well. in the documentation is said, that i have to use the package option "thmmarks". when i do so, i get the error
! LaTeX /b/c9/cError:/b/c0/c Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.525 \end{equation}
although i did not specify a symbol yet, everyting i changed is

Code: Select all

\usepackage[framed, hyperref]{ntheorem}
to

Code: Select all

\usepackage[framed, hyperref, thmmarks]{ntheorem}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

ntheorem: cannot toggle to normalfont/always italic

Post by Stefan Kottwitz »

Hi warrence,

try

Code: Select all

\usepackage[framed, hyperref, thmmarks, amsmath]{ntheorem}
amsmath option, not amsthm.

Stefan
LaTeX.org admin
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

Re: ntheorem: cannot toggle to normalfont/always italic

Post by warrence »

hi
thanks a lot, Stefan. It works, you made my day ;)
Post Reply