3

I have a multiline equation in a 2-column document. I want the last item after the "+" sign, i.e. L_{p}^{ITM}\delta_{i,B}, to be left-aligned.As can be seen from the picture, the following latex script gives the last item as right-aligned. (Full code is below)

\documentclass[journal]{IEEEtran}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage[noadjust]{cite} 
\usepackage{amsmath,amssymb}
\usepackage{amsthm}
\usepackage{color}
\usepackage[mathscr]{eucal}
\usepackage{graphics,graphicx,multicol}
\usepackage{epsfig}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{cite}
\usepackage{courier}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{rem}[thm]{Remark}
\newtheorem{pro}[thm]{Proposition}
\pagenumbering{arabic}
\pagestyle{plain}
\usepackage{lipsum,booktabs}
\usepackage{subfigure}
\usepackage{algorithmic}
\usepackage[section]{algorithm}
\usepackage{morefloats}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{array}
\usepackage{moredefs}

\begin{document}

\title{Title}
\author{Author}
\maketitle

\begin{abstract}
This is abstract.
\end{abstract}

\providelength{\AxesLineWidth}       \setlength{\AxesLineWidth}{0.5pt}
\providelength{\plotwidth}           \setlength{\plotwidth}{8cm}
\providelength{\LineWidth}           \setlength{\LineWidth}{0.7pt}
\providelength{\MarkerSize}          \setlength{\MarkerSize}{3pt}

\section{Introduction}\label{sec:intro}
Section1

\section{Equations}\label{sec:Eq}
The equation is: 

\begin{align*}\label{eqn:1_1}
   L_{p}(d, h_{TX}, h_{RX}) =  \{\{\overbrace{L_{fs}(R,f)U(0.1-d)}^{L_{p,1}}+\clipbox{-2 0 5 0}{$\overbrace{[L_{fs}(R,f) + \hspace{1em}}^{L_{p,2}}$} \\[\jot]
       \clipbox{100 0 -2 0}{$\overbrace{\phantom{\hspace{10em}}(1 + \log_{10}(d))(L^{EH}_{B}(1,f) - L_{fs}(0.1,f)]\prod(\frac{d-0.05}{0.1})\hspace{1em}}$} +\\
\overbrace{\max\{L_{p}^{EH}(d,f),L_{p}^{ITM}(d,f)\}\prod(\frac{d-41}{80})}^{L_{p,3}} + \clipbox{-2 0 5 0}{$\overbrace{(L_{P}^{ITM}(d,f) + \hspace{1em}}^{L_{p,4}}$} \\[\jot]
       \clipbox{100 0 -2 0}{$\overbrace{\phantom{\hspace{10em}}\max\{L^{EH}_{B}(80,f) - L_{p}^{ITM}(80,f),0\})U(d-80)\hspace{1em}}$}\}\delta_{iA} + \\L_{p}^{ITM}\delta_{i,B}                                     
\end{align*}

\end{document}

enter image description here

2
  • 5
    Welcome to TeX SX! As you have used no &, the alignment is on the end of rows. This being said, could post a full code?
    – Bernard
    Apr 16, 2019 at 20:36
  • I added the full script instead of the script containing the equation alone.
    – darkblue80
    Apr 17, 2019 at 13:50

2 Answers 2

3

Just add a & to the beginning of each line to make it left aligned.

\documentclass[journal]{IEEEtran}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage[noadjust]{cite} 
\usepackage{amsmath,amssymb}
\usepackage{amsthm}
\usepackage{color}
\usepackage[mathscr]{eucal}
\usepackage{graphics,graphicx,multicol}
\usepackage{epsfig}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{cite}
\usepackage{courier}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{rem}[thm]{Remark}
\newtheorem{pro}[thm]{Proposition}
\pagenumbering{arabic}
\pagestyle{plain}
\usepackage{lipsum,booktabs}
\usepackage{subfigure}
\usepackage{algorithmic}
\usepackage[section]{algorithm}
\usepackage{morefloats}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{array}
\usepackage{moredefs}

\begin{document}

\title{Title}
\author{Author}
\maketitle

\begin{abstract}
This is abstract.
\end{abstract}

\providelength{\AxesLineWidth}       \setlength{\AxesLineWidth}{0.5pt}
\providelength{\plotwidth}           \setlength{\plotwidth}{8cm}
\providelength{\LineWidth}           \setlength{\LineWidth}{0.7pt}
\providelength{\MarkerSize}          \setlength{\MarkerSize}{3pt}

\section{Introduction}\label{sec:intro}
Section1

\section{Equations}\label{sec:Eq}
The equation is: 

\begin{align*}\label{eqn:1_1}
   &L_{p}(d, h_{TX}, h_{RX}) =  \{\{\overbrace{L_{fs}(R,f)U(0.1-d)}^{L_{p,1}}
     +\clipbox{-2 0 5 0}{$\overbrace{[L_{fs}(R,f) + \hspace{1em}}^{L_{p,2}}$} 
     \\[\jot]
   &\clipbox{100 0 -2 0}{$\overbrace{\phantom{\hspace{10em}}(1 + 
     \log_{10}(d))(L^{EH}_{B}(1,f) - L_{fs}(0.1,f)]\prod(\frac{d-0.05}{0.1})
     \hspace{1em}}$} +\\
   &\overbrace{\max\{L_{p}^{EH}(d,f),L_{p}^{ITM}(d,f)\}\prod(%
     \frac{d-41}{80})}^{L_{p,3}} + \clipbox{-2 0 5 0}{%
     $\overbrace{(L_{P}^{ITM}(d,f) + \hspace{1em}}^{L_{p,4}}$} \\[\jot]
   &\clipbox{100 0 -2 0}{$\overbrace{\phantom{\hspace{10em}}%
     \max\{L^{EH}_{B}(80,f) - L_{p}^{ITM}(80,f),0\})U(d-80)%
     \hspace{1em}}$}\}\delta_{iA} + \\
   &L_{p}^{ITM}\delta_{i,B}                                     
\end{align*}

\end{document}

enter image description here

I might even suggest making all rows of the equation of equal baselineskip. One can do that with a TABstack:

\documentclass[journal]{IEEEtran}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage[noadjust]{cite} 
\usepackage{amsmath,amssymb}
\usepackage{amsthm}
\usepackage{color}
\usepackage[mathscr]{eucal}
\usepackage{graphics,graphicx,multicol}
\usepackage{epsfig}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{cite}
\usepackage{courier}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{rem}[thm]{Remark}
\newtheorem{pro}[thm]{Proposition}
\pagenumbering{arabic}
\pagestyle{plain}
\usepackage{lipsum,booktabs}
\usepackage{subfigure}
\usepackage{algorithmic}
\usepackage[section]{algorithm}
\usepackage{morefloats}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{array}
\usepackage{moredefs}
\usepackage{tabstackengine}
\TABstackMath
\begin{document}

\title{Title}
\author{Author}
\maketitle

\begin{abstract}
This is abstract.
\end{abstract}

\providelength{\AxesLineWidth}       \setlength{\AxesLineWidth}{0.5pt}
\providelength{\plotwidth}           \setlength{\plotwidth}{8cm}
\providelength{\LineWidth}           \setlength{\LineWidth}{0.7pt}
\providelength{\MarkerSize}          \setlength{\MarkerSize}{3pt}

\section{Introduction}\label{sec:intro}
Section1

\section{Equations}\label{sec:Eq}
The equation is: 

\[\label{eqn:1_1}
\setstackgap{L}{38pt}
\alignCenterstack{
   &L_{p}(d, h_{TX}, h_{RX}) =  \{\{\overbrace{L_{fs}(R,f)U(0.1-d)}^{L_{p,1}}
     +\clipbox{-2 0 5 0}{$\overbrace{[L_{fs}(R,f) + \hspace{1em}}^{L_{p,2}}$} 
     \\
   &\clipbox{100 0 -2 0}{$\overbrace{\phantom{\hspace{10em}}(1 + 
     \log_{10}(d))(L^{EH}_{B}(1,f) - L_{fs}(0.1,f)]\prod(\frac{d-0.05}{0.1})
     \hspace{1em}}$} +\\
   &\overbrace{\max\{L_{p}^{EH}(d,f),L_{p}^{ITM}(d,f)\}\prod(%
     \frac{d-41}{80})}^{L_{p,3}} + \clipbox{-2 0 5 0}{%
     $\overbrace{(L_{P}^{ITM}(d,f) + \hspace{1em}}^{L_{p,4}}$} \\
   &\clipbox{100 0 -2 0}{$\overbrace{\phantom{\hspace{10em}}%
     \max\{L^{EH}_{B}(80,f) - L_{p}^{ITM}(80,f),0\})U(d-80)%
     \hspace{1em}}$}\}\delta_{iA} + \\
   &L_{p}^{ITM}\delta_{i,B}                                     
}
\]

\end{document}

enter image description here

0
0

Just for the sake of variety, here's a completely different solution (which, of course, still takes care to assure that all material fits in the available column width): Instead of displaying a five-line equation with several broken overbraces, I suggest you provide (a) a summary equation and (b) four subequations to give content to the terms L_{p,1} thru L_{p,4}.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .