Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I created this equation in my thesis. But, it is too big. Half equation dont appear. How I can align it ?

\documentclass[12pt,twoside,a4paper,openright]{report}
\usepackage{color}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\usepackage[official]{eurosym}
\usepackage[lmargin=3.0cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}
\usepackage{fancyhdr}
\usepackage{graphicx}
\graphicspath{  {fig/} }
\usepackage{mathtools}
\usepackage[round]{natbib}
\usepackage{xr}
\usepackage{siunitx}
\usepackage{booktabs, multicol, multirow}
\usepackage{pdflscape}
\usepackage{emptypage}
\usepackage{epstopdf}
\usepackage{setspace}
\usepackage{nomencl}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{gensymb}
\usepackage{chemformula}

\begin{document}

    \begin{equation}
    \label{equacao_silica}
    \text{Quantidade de Sílica (wt\%)}
      = ( \text{Perda de Massa (580\degree C-900\degree C)} \times \frac{101,4}{44}) - ( \text{Perda de Massa (30\degree C-200\degree C)})- ( \text{Resíduos de GCC)})
    \end{equation}

\end{document}
share|improve this question
1  
Please provide a full minimum working example (MWE), starting with \documentclass, ending with \end{document}, that shows the problem, along with which packages are loaded, etc. –  Steven B. Segletes Jun 18 at 16:05

4 Answers 4

You should use the power of the mathtools package you are already loading.

First place the equation body in a split. The general syntax is

\begin{equation}
  \begin{split}
    First line left &= first line right \\
                    &= second line \\
                    &= third line
  \end{split}
\end{equation}

where the & indicate points that will be aligned vertically.

In your case the left hand side of the equation before the = is rather wide, so put it on a line on its own (without an &) and use \MoveEqLeft to move it to the left, thent add alignment points at the left end of subsequent lines.

You equation will need three lines in total. The last, starting with a minus sign, should have an extra indentation relative to the previous line. This can be provided via &\qquad, but it crops up so often I define an extra macro \eqbreak.

Sample output

\documentclass[12pt,twoside,a4paper,openright]{report}
\usepackage{color}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\usepackage[official]{eurosym}
\usepackage[lmargin=3.0cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}
\usepackage{mathtools}
\usepackage{siunitx}
\usepackage{gensymb}
\usepackage{chemformula}

\newcommand{\eqbreak}[1][2]{\\&\hskip#1em}

\begin{document}

\begin{equation}
  \label{equacao_silica}
  \begin{split}
    \MoveEqLeft \text{Quantidade de Sílica (wt\%)} \\
    &= \Bigl( \text{Perda de Massa
    (\SI{580}{\degreeCelsius}-\SI{900}{\degreeCelsius})}
    \times \frac{101{,}4}{44}\Bigr)
    \eqbreak
    - \bigl(\text{Perda de Massa
    (\SI{30}{\degreeCelsius}-\SI{200}{\degreeCelsius})}\bigr) 
    - (\text{Resíduos de GCC})
  \end{split}
\end{equation}

\end{document}

Other changes made

  • use of \SI for numbers with units
  • increased sizes of some brackets to improve grouping
  • decimal comma written as {,}

Also note that mathtools loads amsmath, so you do not need to load amsmath later. However, see the documentation of amsmath for many of the features it has for displayed equations and splitting them over several lines.

Addition: As Svend Tveskæg points out, the rewriting of the decimal comma can also be accomplished by using \num from siuntx with the appropriate locale. This can be set globally by modifying the extra commands for a babel language. Unfortunately there is no portuguese locale support, but I guess that french is the closest:

Sample locale use

\documentclass{article}

\usepackage[portuguese]{babel}

\usepackage{siunitx}
\addto\extrasportuguese{\sisetup{locale = FR}}

\usepackage{mathtools}

\begin{document}

\begin{equation*}
  \frac{\num{101,4}}{\num{44}}
\end{equation*}

\end{document}
share|improve this answer
    
I would use \num[locale = DE]{104.4} instead of 101{,}4. (Maybe locale = DE should be declared globally.) –  Svend Tveskæg Jun 18 at 17:24
1  
@SvendTveskæg Thanks, thats interesting. I have updated my answer with a variation on that. –  Andrew Swann Jun 18 at 18:32
    
It should be \num{101.4} instead of \num{101,4}. –  Svend Tveskæg Jun 18 at 18:43
    
@SvendTveskæg Both will work (try changing removing the locale change). For a native Portuguese speaker the comma will be most natural. –  Andrew Swann Jun 18 at 18:47
    
Good point. :) –  Svend Tveskæg Jun 18 at 18:54

You can cheat a little and use \binom to put your quantities into two lines:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation}
\label{equacao_silica}
\binom{\text{Quantidade}}{\text{d Sílica (wt\%)}}
  = \binom{\text{Perda de Massa}}{\text{(580\degree C-900\degree C)}}
     \times \frac{101,4}{44} -
     \binom{\text{Perda de Massa}}{\text{(30\degree C-200\degree C)}}
     - ( \binom{\text{Resíduos}}{\text{de GCC)}})\\
\end{equation}

\end{document}

which gives this:

enter image description here

By playing around with this a little more your should be able to get the equation number in the right place (and fixing up the mathematics as your formula was hard to read and I think I got it slightly wrong).

However, I think that this is the wrong approach. Presumably Quantidade de Sílica is a function computing the amount of silicon and Perda de Massa is some sort of function computing the mass loss for the given temperature etc. So I think that it is much better practice to define these functions properly and then write your equation like this:

enter image description here

You probably have better (shorthand) notation of these functions, but you can typeset something along these lines with:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator{\QS}{QS}
\DeclareMathOperator{\PM}{PM}
\DeclareMathOperator{\Res}{Res}

\begin{document}
\begin{equation}
\label{equacao_silica}
\QS(wt\%) = \PM(500^\degree\text{C}-900^\degree\text{C})\times\frac{101,4}{44}
     -\PM(30^\degree\text{C}-200^\degree\text{C})- \Res
\end{equation}

\end{document}
share|improve this answer

The equation is simply too long to fit on a single line. You could use a multline environment to break it up across two lines or a nested equation/split environment to break it up across three lines. (I personally prefer the latter approach.)

enter image description here

\documentclass[12pt,twoside,a4paper,openright]{report}
\usepackage{color}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\usepackage[official]{eurosym}
\usepackage[lmargin=3.0cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}
\usepackage{fancyhdr}
\usepackage{graphicx}
\graphicspath{  {fig/} }
\usepackage{mathtools}
\usepackage[round]{natbib}
\usepackage{xr}
\usepackage{siunitx}
\usepackage{booktabs, multicol, multirow}
\usepackage{pdflscape}
\usepackage{emptypage}
\usepackage{epstopdf}
\usepackage{setspace}
\usepackage{nomencl}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{gensymb}
\usepackage{chemformula}

\begin{document}
    \begin{multline}
    \label{equacao_silica}
    \text{Quantidade de Sílica (wt\%)}
      = \bigl( \text{Perda de Massa (580\degree C--900\degree C)}
        \bigr) \times \frac{101,4}{44} \\
      - \bigl( \text{Perda de Massa (30\degree C--200\degree C)} \bigr)
      - ( \text{Resíduos de GCC)}
    \end{multline}

    \begin{equation}\begin{split}
    \label{equacao_silica}
    \text{Quantidade de Sílica (wt\%)}
      &= \bigl( \text{Perda de Massa (580\degree C--900\degree C)}
         \bigr) \times \frac{101,4}{44} \\
      &\quad - \bigl( \text{Perda de Massa (30\degree C--200\degree C)}\bigr)\\
      &\quad - ( \text{Resíduos de GCC)}
    \end{split}\end{equation}
\end{document}
share|improve this answer

You can try one of these solutions, with multlineor multlined, the main difference being the placement of the equation number. Using the siunitx helps for a correct degree Celsius horizontal spacing:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier, heuristica}
\usepackage{mathtools}
\usepackage{siunitx}
\usepackage[showframe, nomarginpar]{geometry} %

\begin{document}

\begin{equation}
\text{Quantidade de Sílica (wt\%)} =
\begin{multlined}[t]
\label{equacao_silica}
\text{(Perda de Massa)}\bigl(\SI{580}{\celsius} - \SI{900}{\celsius}\bigr) \times \frac{101,4}{44}\\[4pt]
- \text{(Perda de Massa)} \bigl(\SI{30}{\celsius } -\SI{200}{\celsius}\bigr)- \text{(Resíduos de GCC)})
\end{multlined}
\end{equation}

Or, if you prefer the number aligned with the second line:

\begin{multline}
\label{equacao_silica}
\text{Quantidade de Sílica (wt\%)} =\text{(Perda de Massa)}\bigl(\SI{580}{\celsius} - \SI{900}{\celsius}\bigr) \times \frac{101,4}{44}\\
- \text{(Perda de Massa)} \bigl(\SI{30}{\celsius } -\SI{200}{\celsius}\bigr)- \text{(Resíduos de GCC)})
\end{multline}

\end{document} 

enter image description here

share|improve this answer
    
I suspect the - between the two temperatures is not a "minus" sign. Instead, it is probably (the OP might provide definitive clarification...) a range indicator -- "loss of mass between 589 degrees and 900 degrees" -- and should thus probably be typeset as a text-mode en-dash. –  Mico Jun 18 at 18:43
    
@Mico: I wondered, but thought it wasn't compatible with the product with a fraction in the first term. May be I was not fanciful enough:) –  Bernard Jun 18 at 18:48
    
Let's hope the OP provides some clarification... –  Mico Jun 18 at 18:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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