I can't reproduce the error with the code snipset:
\listfiles
\documentclass[12pt, a4paper, twoside]{book}
\usepackage[top=1.50in, bottom=1.50in, left=1.25in, right=1.25in]{geometry}
\usepackage[shortlabels]{enumitem}
\usepackage{pdfpages}
\usepackage{balance}
\usepackage{color}
\begin{document}
Hello World
\end{document}
The file runs without errors or warnings.
The version list:
*File List*
book.cls 2007/10/19 v1.4h Standard LaTeX document class
bk12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
geometry.sty 2010/09/12 v5.6 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
enumitem.sty 2011/09/28 v3.5.2 Customized lists
pdfpages.sty 2012/04/03 v0.4s Insert pages of external PDF documents (AM)
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
eso-pic.sty 2010/10/06 v2.0c eso-pic (RN)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pppdftex.def 2012/04/03 v0.4s Pdfpages driver for pdfTeX (AM)
balance.sty 1999/02/23 4.3 (PWD)
supp-pdf.mkii
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
***********
In the comments the OP assumes the following as culprit:
\usepackage{pgfplots}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-0.5*((x-#1)/#2)^2)}%
}
The function can be found in the French Wikipedia:
Then μ and σ are the first and second parameter of your new function gauss
. But there is a third paramter, the function argument x
itself.
\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-0.5*((#3-#1)/#2)^2)}%
}
Then the function is called with three arguments: μ, σ, and x.
\pgfmathparse{gauss(0,1,2)}
The function can also be optimized. For example, the calculations with constants can be moved outside:
\pgfmathparse{1/(sqrt(2*pi)}
\let\gaussAux\pgfmathresult
\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{\gaussAux/#2*exp(-0.5*((#3-#1)/#2)^2)}%
}
When you say
\newtheorem{abc}{Abc}[section]
\newtheorem{xyz}[abc]{Xyz}
you're telling LaTeX that the statement environments abc
and xyz
must share the counter; so no counter xyz
is defined.
You could do
\theoremstyle{definition}
\newtheorem{Gcal}{Grande Caloria \textit{Cal} o \textit{kcal}}[section]
\newtheorem{Pcal}[Gcal]{Piccola Caloria \textit{cal}}
\newtheorem{CalS}[Gcal]{Calore Specifico}
Note that one \theoremstyle{definition}
declaration suffices.
Actually there's a better way.
\documentclass[12pt,a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsthm,mathtools}
\usepackage{amsmath, textcomp}
\usepackage{titling}
\theoremstyle{definition}
\newtheorem{vardef*}{\vardefname}[section]
\newcommand\vardefname{} % initialize
\newenvironment{vardef}[1]
{\renewcommand\vardefname{#1}\begin{vardef*}}
{\end{vardef*}}
\begin{document}
\chapter{1}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\chapter{2}
\section{2.1}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\begin{vardef}{Grande Caloria \textit{Cal} o \textit{kcal}}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{vardef}
\begin{vardef}{Piccola Caloria \textit{cal}}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{vardef}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\begin{vardef}{Calore Specifico}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{vardef}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{document}
You have just a generic environment for definitions and give the title at statement time rather than having a different environment for each in the preamble.
Best Answer
You're just missing a backslash in the command definition, it should be