Sunday, 11 August 2013

Unusual problem with eqnarray

Unusual problem with eqnarray

I have this code that gives me two problems:
y and x are displayed incorrectly in the first and third row of the
eqnarray, like if they had a \rm in front of them, why?
it gives me
main.tex:91 Undefined control sequence.
<argument> \D
^0
l.91 \Gamma(\Dz
(t)\to f)&=&\frac{1}{2}\rm{e}^{-\tau}\left|\Af\right|^2 \{ \l...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
have I forgot to declare something? Here is my example code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xfrac}
\title{ aaa }
\author{ Federico Leo Redi }
\date{June 2011}
%% %%%%%%%%%%%%%%%%%%%%%%%
%% Packages to be used
%% %%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsfonts} %for integers using \mathbb{Z}
\usepackage{lineno} % for line numbering during review
\usepackage{graphicx} % to include figures (can also use other packages)
\usepackage{caption}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{subcaption}
\usepackage{wrapfig,booktabs}
\usepackage{xfrac}
%\usepackage{epstopdf}
\usepackage{xspace} %
% predefined symbold
\usepackage{multirow}
\usepackage{floatrow}
% Table float box with bottom caption, box width adjusted to content
\newfloatcommand{capbtabbox}{table}[][\FBwidth]
\usepackage{blindtext}
\usepackage{color}
\usepackage{colortbl}
\usepackage{amsmath} % Adds a large collection of math symbols
\usepackage{ifthen} % for conditional statements
%\graphicspath{{./}} % Make Latex search fig subdir for figures
% %%%%%%% CHOOSE --------
\newboolean{pdflatex}
%\setboolean{pdflatex}{false} % use this if using eps figures
\setboolean{pdflatex}{true} % use this if using non-eps figures
%
\newboolean{articletitles}
\setboolean{articletitles}{true} % False removes titles in references
\newboolean{uprightparticles}
\setboolean{uprightparticles}{false} %Set to true to get roman particle
symbols
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{upgreek} % Adds in support for greek letters in roman typeset
\usepackage{hyperref} % Hyperlinks in references
\usepackage[all]{hypcap} % Internal hyperlinks to floats.
\usepackage{natbib}
\usepackage{graphicx}
\def\CP {\ensuremath{C\!P}\xspace}
\def\CPV {\ensuremath{C\!PV}\xspace}
\def\C {\ensuremath{C}\xspace}
\def\P {\ensuremath{P}\xspace}
\newcommand{\Ap} {\ensuremath}\xspace}
\newcommand{\Apnoef} {\ensuremath}\xspace}
\newcommand{\Acp} {\ensuremath}\xspace}
\newcommand{\Araw} {\ensuremath}\xspace}
\newcommand{\AGamma} {\ensuremath}\xspace} %
\newcommand{\Af} {\ensuremath{{\cal A}_f}\xspace}
\newcommand{\Afb} {\ensuremath{\bar{\cal A}_f}\xspace}
\newcommand{\Am} {\ensuremath{{\cal A}_m}\xspace}
\newcommand{\Adir}{\ensuremath{{\cal A}^{\rm dir}}\xspace}
\def\DDbar {\ensuremath{\kern -0.1em \stackrel{\kern 0.1em
\textsf{\fontsize{5pt}{1em}\selectfont(---)}}{D}\kern -0.3em}\xspace}
\def\Dz{\ensuremath{\D^0}\xspace}
\begin{document}
\maketitle
% (4) %
\begin{eqnarray}
\label{eq:p-1}
\Gamma(\Dz(t)\to f)&=&\frac{1}{2}\rm{e}^{-\tau}\left|\Af\right|^2 \{
\left(1+|\lambda_f|^2\right)\cosh(y\tau)+\left(1-
|\lambda_f|^2\right)\cos(x\tau)\nonumber\\
&+&2\Re(\lambda_f)\sinh(y\tau)-2\Im(\lambda_f)\sin(x\tau)\},\nonumber\\
\Gamma(b(t)\to f)&=&\frac{1}{2}\rm{e}^{-\tau}\left|\bar\Af\right|^2 \{
\left(1+|\lambda^{-1}_f|^2\right)\cosh(y\tau)+\left(1-
|\lambda^{-1}_f|^2\right)\cos(x\tau)\nonumber\\
&+&2\Re(\lambda^{-1}_f)\sinh(y\tau)-2\Im(\lambda^{-1}_f)\sin(x\tau)\},
\end{eqnarray}
%
\end{document}

No comments:

Post a Comment