GeneralNewTheorem structure

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
OA-Uwe
Posts: 8
Joined: Fri Jul 06, 2007 10:22 am

NewTheorem structure

Post by OA-Uwe »

Again hi,

I have a problem with a formatted project I got.

They use the NewTheorem structure in the following way:

\newtheorem{mylist}{}[chapter]

What happens is that this causes the line to be indented (the " " between {} and [chapter]).
Where and how can I override this gap?

Any input welcome!
Regards,
Uwe

Recommended reading 2024:

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

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

User avatar
countbela666
Posts: 64
Joined: Thu Apr 26, 2007 2:44 pm

NewTheorem structure

Post by countbela666 »

Hi Uwe,

the indentation emerges because of the blank theorem name, which is followed by a space and the number. You could overcome this problem by defining your own theorem style "noname" that does not need a name and supresses the space before the number (cp. theorem package documentation p. 9). Have a look at the following code:

Code: Select all

\documentclass[english]{report}
\usepackage{babel,blindtext,ntheorem}
\makeatletter
\newtheoremstyle{noname}
  {\item[\hskip\labelsep \theorem@headerfont ##2\theorem@separator]}%
  {\item[\hskip\labelsep \theorem@headerfont ##2\ (##3)\theorem@separator]}
\makeatother
\theoremstyle{noname}
\newtheorem{mylist}{}[chapter]
\begin{document}
  \chapter{chap1}
  \blindtext
  \begin{mylist}{test}
    \item bar 
    \item baz 
  \end{mylist}
  \blindtext
\end{document}
Regards
Marcel
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
Post Reply