#second column is right aligned instead of left aligned

1 messages · Page 1 of 1 (latest)

ebon swallow
#

my code looks like this:

&\sum_{i \in V} w_{i}^{(a)} x_{ij}  \geq \left(1-\tau^{(a)} \right) \mu^{(a)} x_{j j} & j \in V ; a \in A \\
&\sum_{i \in V} w_{i}^{(a)} x_{ij}  \leq \left(1+\tau^{(a)}\right) \mu^{(a)} x_{j j} & j \in V ; a \in A \\
&\sum_{i \in \cup_{v \in S}\left(N^{v} \backslash S \right)} x_{i j}-\sum_{i \in S} x_{i j}  \geq 1-|S| & j \in V ; S \subset\left[V \backslash\left(N^{j} \cup\{i\}\right)\right]\\
&x_{i j}  \in\{0,1\} &  i, j \in V
\end{flalign}```
and i would like the second column (j \in V ...)  to be left aligned but its right aligned, why? and how do i fix that?
marsh bobcat
#

On the second ampersand, the flalign env creates a new column (an flushes it to the right, flalign stands for flush align I guess)

#

You could try this the following

\begin{flalign}
&\sum_{i \in V} w_{i}^{(a)} x_{ij}  \geq \left(1-\tau^{(a)} \right) \mu^{(a)} x_{j j}, \quad j \in V ; a \in A \\
&\sum_{i \in V} w_{i}^{(a)} x_{ij}  \leq \left(1+\tau^{(a)}\right) \mu^{(a)} x_{j j}, \quad j \in V ; a \in A \\
&\sum_{i \in \cup_{v \in S}\left(N^{v} \backslash S \right)} x_{i j}-\sum_{i \in S} x_{i j}  \geq 1-|S|, \quad j \in V ; S \subset\left[V \backslash\left(N^{j} \cup\{i\}\right)\right]\\
&x_{i j}  \in\{0,1\}, \quad  i, j \in V
\end{flalign}
#

I replaced the second ampersand with a large space (quad)

brisk latch
#
$$\openup1\jot
\halign to \displaywidth{\tabskip=2em
  $\displaystyle #$\hss&
  $\displaystyle #$\hss\tabskip=0pt plus1fil&
  \hfil\llap{#}\tabskip=0pt\cr
  \sum_{i \in V} w_{i}^{(a)} x_{ij}  \geq \left(1-\tau^{(a)} \right) \mu^{(a)} x_{j j} & j \in V ; a \in A & (1)\cr
  \sum_{i \in V} w_{i}^{(a)} x_{ij}  \leq \left(1+\tau^{(a)}\right) \mu^{(a)} x_{j j} & j \in V ; a \in A & (2)\cr
\sum_{i \in \cup_{v \in S}\left(N^{v} \backslash S \right)} x_{i j}-\sum_{i \in S} x_{i j}  \geq 1-|S| & j \in V ; S \subset\left[V \backslash\left(N^{j} \cup\{i\}\right)\right] & (3)\cr
  x_{i j} \in\{0,1\} & i, j \in V & (4)\cr
}$$

My attempt using old-school TeX. LMK if you want clarification

glass pebbleBOT
glass pebbleBOT
#

skySLAYER

$\begin{align}
y & = \sqrt{\frac{x^3}{2}}\\
& = \left(frac{x^3}{2}\right)^{\frac{1}{2}}\\
& = \frac{x^{\frac{3}{2}}{2}\\
\end{align}$
```Compilation error:```! Package amsmath Error: \begin{align} allowed only in paragraph mode.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.65 $\begin{align}
                   
You've lost some text.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.```
brisk latch
#

@light axle don’t post your question on another person’s post.