2

I'd appreciate if you can assist me with re-arranging the following for getting better form in order to display this long equation.

\documentclass[preprint,12pt,authoryear]{elsarticle}
\rho \epsilon {\bf \ddot u_{0}(v},t)=\epsilon \int_{\mathcal{R}} f(\eta_{00},\xi_{00})dA'+\\
    \frac{1}{2} \epsilon^2 \int_{\mathcal{R}} \left( \big [\frac{\partial \bf f}{\partial \eta}(\eta_{00},\xi_{00}) \big]{\bf a'(v},t)+\big [\frac{\partial \bf f}{\partial \xi}(\eta_{00},\xi_{00})]k \right )dA'
5
  • 2
    Hi! Welcome to the site :) I think it would really be best to ask the second question separately (assuming the question isn't already answered somewhere on the site) as the two parts are quite unrelated. The best advice I can give you is that Stackexchange is not a forum, or bulletin board, or help centre, but a Q & A site which aims to be a repository of information on various topics. So it's best to have a question just about linking to equations, and a question just about equation breaking, and then the info can be concentrated and others with the same Q can find the info more easily
    – Au101
    Jan 31, 2016 at 3:23
  • Also, please provide a complete small document we can copy-paste-compile. For example, it matters what the current \linewidth is and that obviously depends on the class and any packages or settings which adjust the paper size or layout dimensions. Also, don't use commands such as \bf in LaTeX as they are 20+ years deprecated. (Was this ever correct in maths mode? Maybe. I am quite ignorant of those times.)
    – cfr
    Jan 31, 2016 at 3:34
  • @ Au101I edited the question.
    – Mohammad
    Jan 31, 2016 at 3:34
  • @ cfr sure. \documentclass[preprint,12pt,authoryear]{elsarticle}
    – Mohammad
    Jan 31, 2016 at 3:36
  • That cannot be compiled. It lacks a document environment and it does not initiate maths mode. I get errors when I copy, paste and try to compile.
    – cfr
    Jan 31, 2016 at 3:43

2 Answers 2

3

You could use an align* environment to display the two-line equation.

enter image description here

Note that I've enlarged the square brackets in the second line. I've also replaced various {\bf ...} constructs with \mathbf{...} directives.

\documentclass[preprint,12pt,authoryear]{elsarticle}
\usepackage{amsmath} % for 'align*' environment
\begin{document}
\begin{align*}
\rho \epsilon \ddot{\mathbf{u}}_{0}(\mathbf{v},t)
&=\epsilon \int_{\mathcal{R}} f(\eta_{00},\xi_{00})\,dA'\\
&\quad+\frac{1}{2} \epsilon^2 \int_{\mathcal{R}} 
\biggl( \biggl[ \frac{\partial \mathbf{f}}{\partial \eta}(\eta_{00},\xi_{00}) \biggr]\mathbf{a}'(\mathbf{v},t)+
\biggl[ \frac{\partial \mathbf{f}}{\partial \xi}(\eta_{00},\xi_{00})\biggr]k \biggr) \,dA'
\end{align*}
\end{document}
4
  • @ Mico, the equation number is disappeared after your change? why?
    – Mohammad
    Jan 31, 2016 at 3:55
  • @Mohammad - You didn't indicate in your posting that you need the equation to be numbered. If you need a numbered equation, change align* to align and add \notag before the end of the first line.
    – Mico
    Jan 31, 2016 at 4:12
  • @ Mico, it does work. Can I use to \label{eq:#} in front of align in order to cite the equation in text? Thanks for time.
    – Mohammad
    Jan 31, 2016 at 4:19
  • @Mohammad - Not before \begin{align}, but on the line you want to be numbered.
    – Mico
    Jan 31, 2016 at 4:56
4

If you also want a reference, you could instead use the split environment provided by amsmath inside an equation:

\documentclass[preprint,12pt,authoryear]{elsarticle}
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{e:myeqn}
  \begin{split}
    \rho \epsilon \mathbf{\ddot u_{0}(v},t)={} &\epsilon \int_{\mathcal{R}} f(\eta_{00},\xi_{00})dA'+\\
    &\frac{1}{2} \epsilon^2 \int_{\mathcal{R}} \left( \bigg [\frac{\partial \mathbf{f} }{\partial \eta}(\eta_{00},\xi_{00}) \bigg]\mathbf{a'(v},t)+\bigg [\frac{\partial \mathbf{f}}{\partial \xi}(\eta_{00},\xi_{00})\bigg]k \right )dA'
  \end{split}
\end{equation}
We can now refer to equation \eqref{e:myeqn}.
\end{document}

long equation with cross-reference

EDITED to incorporate Mico's and daleif's corrections.

3
  • what is the difference between split & align..since both give same result. Is it not?
    – Mohammad
    Jan 31, 2016 at 4:21
  • 1
    @cfr you might want to use ={} & , look at the space after =
    – daleif
    Jan 31, 2016 at 8:16
  • 2
    @Mohammad split is sort of an inner construction case it has to be used inside an existing math construction. It does not add line numbers, so you can get a single number for the entire multi line construction. Split supports a single alignment block, ie at most one & per line. Personally I use aligned or alignedat a lot more as they support multiple alignment blocks, plus they start in the middle of the page, not at the left edge (as I think split does),tjis can save vertical space when combined with the equation env
    – daleif
    Jan 31, 2016 at 8:21

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.