1

I am fairly new to latex, so i am using a "base" i got, to write my thesis in. At the beginning of the tex file, the following lines are placed, to define theorems and definitons:

\newtheorem{theorem}{Tétel}[section]
\newtheorem{lemma}{Lemma}
\newtheorem{definition}{Definíció}[section]

My problem is, that when i am trying to use it, this happens Code:

\begin{definition}
Az $S\in[a,b]\to\mathbb{R}$ függvényt \textbf{l-ed fokú spline}-nak nevezzük, ha 
\begin{enumerate}
\item $S\arrowvert_{I_{k}}\in\mathbb{P}_{l} (k\in1..n+1)$
\item $S \in \mathcal{C}^{l-1} $
\item $S$ spline \textbf{interpolációs spline}, ha
 $S(t_{i})=f(t_{i}) \forall t_{i}\in \tau$ alappontra.
\end{enumerate}
\end{definition}

result: enter image description here

my problem is the bracket after the definition Also i get the following error at the 2nd line

Something is wrong -- perhaps missing an \item

here is a very minimal version of my document

\documentclass[oneside,titlepage,12pt,a4paper]{report}
%\documentclass[12pt]{report}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{newlfont}
%\usepackage[ansinew]{inputenc}
\usepackage[magyar]{babel}  
\usepackage[utf8]{inputenc}     
\usepackage{t1enc}              
\usepackage{graphicx}
\usepackage{color}
%\usepackage[colorlinks]{hyperref}
%\usepackage[active,new,noold,marker]{xrcs}
\usepackage{euler}
\usepackage{amssymb,latexsym}
\usepackage{amsmath}
\usepackage{graphics}
\usepackage{algorithm} 
\usepackage{algpseudocode} %ezzel összeakadhat \usepackage{algorithmic} 
\usepackage{rotating}
\usepackage{bigstrut}
\usepackage{subfigure}
\usepackage{appendix}
\usepackage{setspace}
\usepackage{pdfpages}


\newtheorem{theorem}{Tétel}[section]
\newtheorem{lemma}{Lemma}
\newtheorem{definition}{Definíció}[section]

\textwidth=6.truein \textheight=9.truein \hoffset=-.5truein
\voffset=-.8truein

\frenchspacing              
\setlength{\parskip}{\smallskipamount}  
\renewcommand{\appendixtocname}{Függelék}
\renewcommand{\appendixpagename}{Függelék}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\sgn}{sign}
\DeclareMathOperator{\PRD}{PRD}
\DeclareMathOperator{\CR}{CR}
\newcommand{\conj}[1]{\overline{#1}}

\newenvironment{myprogfont}{\fontfamily{pcr}\selectfont}{\par}
\DeclareTextFontCommand{\textprogfont}{\myprogfont}

\begin{document}

\section{Spline-ok}
\label{sec:Spline}
Ebben a fejezetben a spline-ok és az interpolációs problémák témakörének a dolgozathoz kapcsolódó részeit fogom ismertetni.

\subsection{Alapfogalmak, tulajdonságok}
\label{subsec:Def}

A továbbiakban legyen $[a,b]\subset\mathbb{R}$, ennek $\tau=\{t_{0}, t_{1}, .. t_{n+1}\}$: $a=t_{0}<t_{1}<...<t_{n}<t_{n+1}=b$ egy felosztása. 
$I_{k}:=[x_{k-1}, x_{k}] (k\in1..n+1)$
\begin{definition}
Az $S\in[a,b]\to\mathbb{R}$ függvényt \textbf{l-ed fokú spline}-nak nevezzük, ha 
\begin{enumerate}
\item $S\arrowvert_{I_{k}}\in\mathbb{P}_{l} (k\in1..n+1)$
\item $S \in \mathcal{C}^{l-1} $
\item $S$ spline \textbf{interpolációs spline}, ha
 $S(t_{i})=f(t_{i}) \forall t_{i}\in \tau$ alappontra.
\end{enumerate}
\end{definition}

\end{document}
  • Welcome to TeX.SX! I tried your code (in a minimal document -- which you don't provide ;-)) and there are no [...] there -- so, whatever you have done, it's not answerable until you provide the document that produces this issue! – user31729 Apr 26 '16 at 16:40
  • @ChristianHupfer i commented with a minimal document below – Andesz Apr 26 '16 at 17:05
  • What exactly in the setup is placing the number before the definition name? – daleif Apr 26 '16 at 17:11
  • \newtheorem{definition}{Definíció}[section] <- the section part right here – Andesz Apr 26 '16 at 17:37
  • 2
    @andesz2x4: no problems means no brackets – user31729 Apr 26 '16 at 18:08
1

I can reproduce your issue with this minimal document:

\documentclass{report}
\usepackage[magyar]{babel}

\usepackage{amsthm}

\newtheorem{definition}{Definíció}[section]

\begin{document}

\begin{definition}
Az $S\in[a,b]$
\end{definition}

\end{document}

but only compiling with TeX Live 2012. Here is the console output, note the error message.

> /usr/local/texlive/2012/bin/x86_64-darwin/pdflatex andesz.tex 
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 restricted \write18 enabled.
entering extended mode
(./andesz.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 piedmontese, polish, portuguese, romanian, romansh, russian, sanskrit, serbian
, serbianc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, u
ppersorbian, welsh, loaded.
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2012/texmf-dist/tex/generic/babel/magyar.ldf
(/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.def)))
(/usr/local/texlive/2012/texmf-dist/tex/latex/amscls/amsthm.sty) (./andesz.aux)

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11 A
      z $S\in[a,b]$
? 
[1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./andesz.aux) )</usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts
/cm/cmbxti10.pfb></usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfont
s/cm/cmmi10.pfb></usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts
/cm/cmr10.pfb></usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts/c
m/cmsy10.pfb></usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts/cm
/cmti10.pfb>
Output written on andesz.pdf (1 page, 40242 bytes).
Transcript written on andesz.log.

The magyar option to babel is not compatible with amsthm and there's nothing you can do about it, except

  1. removing the call to amsthm; or

  2. updating your (very old) TeX distribution.

The second strategy seems the best. Indeed, there is no problem if I run your test file with TeX Live 2013 or later.


Side notes

You're calling very obsolete packages.

  • \usepackage{newlfont} and \usepackage{latexsym} should be removed

  • \usepackage{t1enc} should become \usepackage[T1]{fontenc}

  • \usepackage{subfigure} should become \usepackage{subfig} (but this requires changing \subfigure and \subtable into \subfloat.

  • thank you, i will update my tex. sadly, i need babel magyar for special characters used in hungarian – Andesz May 1 '16 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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