I seem to be getting excactly 100 errors with my align enviroment, at texnicCenter is trying to convince me that the problem is around the \end{align} - line. My code is as follows:
\begin{subequations}
\begin{align}
det(\underline{\underline{A}}_3-\lambda\underline{\underline{I}}) &= (-\lambda)((-1)^{1+1}(\emph{\lambda^2+b_1\lambda+b_2})+0\cdot(\underline{\underline{A}}_{21})+(-b_3((-1)^{3+1}\cdot1)) \\
det(\underline{\underline{A}}_3-\lambda\underline{\underline{I}}) &=(-\lambda)(\emph{\lambda^2+b_1\lambda+b2})-b_3 \\
det(\underline{\underline{A}}_3-\lambda\underline{\underline{I}}) &= -\lambda^3 - b_1\lambda^2 - b_2\lambda - b_3 \\
det(\underline{\underline{A}}_3-\lambda\underline{\underline{I}}) &= -(\lambda^3 + b_1\lambda^2 + b_2\lambda + b_3)
\end{align}
\end{subequations}
Could the problem be that the equations are too large? I'm lost at this problem, hope someone can help.
General ⇒ Problems with align
NEW: TikZ book now 40% off at Amazon.com for a short time.
Problems with align
It's the presence of the two \emph macros. You can only use \emph in text mode (i.e., not display/math mode).-Niels wrote:Could the problem be that the equations are too large? I'm lost at this problem, hope someone can help.
Note that you should also be using \det instead of det, but that won't give you an error either way.
Also make SURE you have a \usepackage{amsmath} somewhere up top or else you won't be able to use align.
Re: Problems with align
How can i emphasize elements in display math then?
Problems with align
I'm not quite sure why you'd ever want to. Think about exactly what you're doing --- are you sure that the math equivalent of "\emph" is what you really want? (remember that "\emph" in text mode will italicize upright text and upright italicized text)-Niels wrote:How can i emphasize elements in display math then?
You can use the mathematical "font" macros:
- \mathrm (note: most people use \mathrm when they SHOULD be using \operatorname)
- \mathbf (bold)
- \boldsymbol (from amsmath)
- \mathit (italicized)
- \mathcal (caligraphic, which gets redefined by several packages)
- \mathfrak (Fraktur --- from amsfonts)
- \mathbb (blackboard bold)
- \boxed (puts a box around things (good solution for your case?))
[ Note that there is also a \vec macro that, unless redefined, puts a small arrow over top of "vectors". ]
If you want to draw attention to part of your formula, it's better to use things like \underbrace and \overbrace. For example...
Code: Select all
\begin{equation*}
x = A + \overbrace{C + D}^{\text{Some stuff}}\end{equation*}
Code: Select all
\begin{equation*}
x = A + \mathord{\overbrace{C + D}^{\text{Some stuff}}}\end{equation*}
So try using \boxed in place of your \emph. If you don't like that, consider \underbrace or \overbrace or split things up onto multiple lines or add more space or.... etc. etc.
Problems with align
From a mathematical standpoint, I don't really understand why you write four equations that you can simply express as a single chain of equalities. Try this, which in addition corrects some obvious missprints:
You can even reduce it a bit more (or you may need to break the first line if the line width is small). Please note the command \uuline, which could be a convenient replacement of your \undeline{\underline{...}} scheme.
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{accents}
\begin{document}
\newcommand{\uuline}[1]{\underaccent{\bar}{\underaccent{\bar}{#1}}}
\begin{equation}
\begin{split}
\det(\uuline{A}_3-\lambda\uuline{I})&= (-\lambda)(-1)^{1+1}
(\lambda^2+b_1\lambda+b_2)+0\cdot(\uuline{A}_{21})+\bigl(-b_3((-1)^{3+1}\cdot1)\bigr) \\
&=(-\lambda)(\lambda^2+b_1\lambda+b_2)-b_3 \\
&= -\lambda^3 - b_1\lambda^2 - b_2\lambda - b_3 \\
&= -(\lambda^3 + b_1\lambda^2 + b_2\lambda + b_3)
\end{split}
\end{equation}
\end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.