0

I am trying to use flalign environment, but the tag is not centered. I know that each entry after \\ is taken as an independent equation in flalign, but is there a way to produce the same result below with a vertically centered tag?

enter image description here

\documentclass{IEEEtran}

\renewcommand{\arraystretch}{1.3}
\newcommand {\scalelinespace} [1] {\rule{0pt}{#1\normalbaselineskip}}
\usepackage{amsmath}


\begin{document}

\newcommand{\graphpath}[3][L]{\zeta_{\substack{\vspace{0.5mm} \\ #1}}
    \left[\upsilon_{#2}, \thinspace \upsilon_{#3}\right]
                            }

\begin{flalign}
    &&  \graphpath[L]{l}{m}
        = &\left[\upsilon_{l}, \thinspace \upsilon_{x_{1}}, \thinspace \upsilon_{x_{2}}, \thinspace \cdots, \thinspace x_{n}, \thinspace \upsilon_{m} \right] & \hspace{1mm}
\\
    \text{where} && &\phantom{\left[\right.} l \neq x_{1} \neq x_{2} \cdots \neq n \neq m & \hspace{1mm}
    \notag
\end{flalign}

\end{document}
  • Why do you use flalign since you have at most one alignment point? – Bernard Aug 19 '18 at 22:26
  • I want to use it because I want to save space. I could have used align, but if I had inserted 'where' using intertext, it would have taken a whole line on its own. What I want is to flush 'where' to the very left end and align two lines of the equations, but assign one tag for both of them (because one is just a condition to satisfy) – Al-Motasem Aldaoudeyeh Aug 19 '18 at 22:34
  • Semantically, I don't feel necessary to align both lines, so the condition could be inserted in the \intertext. – Bernard Aug 19 '18 at 22:39
  • I understand fully that the alignment may not be really necessary, but some reviewers need to be spoon-fed everything, so I work as hard as I can to make the text as clear as it could get. – Al-Motasem Aldaoudeyeh Aug 19 '18 at 22:43
0

I can propose these two variants, which rely on the fleqn environment from nccmath: it makes equations aligned at the left margin for equations inside the environment (works like subequations)Inside I put an aligned with two columns, nested in an equation environment:

\documentclass{IEEEtran}

\renewcommand{\arraystretch}{1.3}
\newcommand {\scalelinespace} [1] {\rule{0pt}{#1\normalbaselineskip}}
\usepackage{amsmath, nccmath}

\begin{document} 

\newcommand{\graphpath}[3][L]{\zeta_{\mkern-1.5mu#1\strut}
\left[\upsilon_{#2}, \,\upsilon_{#3}\right]
                        }

\begin{fleqn}
\begin{equation}
\begin{aligned}
    && \graphpath[L]{l}{m}
        = &\left[\upsilon_{l}, \,\upsilon_{x_{1}}, \,\upsilon_{x_{2}}, \, \cdots, \, x_{n}, \,\upsilon_{m} \right] 
\\
    \text{where} && &\phantom{\left[\right.} l \neq x_{1} \neq x_{2} \cdots \neq n \neq m 
\end{aligned}
\end{equation}
\end{fleqn}
\begin{fleqn}
\vskip3ex
\begin{equation}
\begin{aligned}
    && &\graphpath[L]{l}{m}
=\left[\upsilon_{l}, \thinspace \upsilon_{x_{1}}, \,\upsilon_{x_{2}}, \,\cdots, \,  x_{n}, \, \upsilon_{m} \right] 
\\
    \text{where} && & l\neq x_{1}\neq x_{2}\cdots \neq n \neq m 
\end{aligned}
\end{equation}
\end{fleqn}

\end{document} 

enter image description here

  • Excellent solution! But I disagree with all my heart how the OP uses \substack{\vspace{0.5mm} \\ #1} and \left[...\right]. Also, writing consecutive \neq’s are questionable and could be very confusing… I’d prefer something like where $l$, $x_1$, $x_2$, \dots, $n$, $m$ are distinct indices. – Ruixi Zhang Aug 19 '18 at 23:02
  • @Ruixi Zhang: I confess I didn't look at this part of the code. I suppose it's to have a lower placement of the subscript when it's a capital letter. Do you have another solution? – Bernard Aug 19 '18 at 23:08
  • Yes, Bernard is right. It just about lowering the subscript. Try to remove \substack{\vspace{0.5mm} \\ #1} and replace it with #1 alone. It will look not yield a good appearance when using the letter 'L' – Al-Motasem Aldaoudeyeh Aug 19 '18 at 23:27
  • 1
    @Al-MotasemAldaoudeyeh: I propose another, simpler definition for \graphicspath, with a tighter horizontal spacing for the index. PLease see the updated code and the resulting screenshot. B.t.w., \thinspace is just \, (simpler to type). – Bernard Aug 20 '18 at 0:13

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.