# Equation Definition Alignment Using Xepersian

The following code will define a new environment which will arrange the definitions of equations. I want the explanations to start from right side, but the equations inside the definition align left and without placing its = symbol right below the others (see the picture below) . Here's the MWE

\documentclass{Book}
\usepackage{lipsum,array,tabularx,calc}
\usepackage{xepersian}
\newlength{\conditionwd}
\newenvironment{conditions}[1][که در آن:]
{%
#1\tabularx{\textwidth-\widthof{#1}}[t]{
>{$}l<{$} @{${}={}$} X@{}
}%
}
{\endtabularx\\[\belowdisplayskip]}
\begin{document}
\lipsum
$$\label{eqf12} \tau_{dyn} / \tau_{stat} = (\dot{\tau_{dyn}}/\dot{\tau_0})^\eta$$
\begin{conditions}
\eta & $0.7 \cdot (1-2.5\delta) / f_{cm}^{0.8}$\\
\delta & جابه‌جایی نسبی [میلی متر]\\
f_{cm} & متوسط مقاومت مکعب بتنی [$N / mm^2$]\\
0.1 ~N / mm^2 & $\dot{\tau_0}$
\end{conditions}
\lipsum

\end{document}


I would appreciate any Idea

• Tabular inside conditions is in RTL mode, you need it in LTR mode Feb 8, 2019 at 14:39
• @SalimBou: would you mind if i ask you to send the working code ? Feb 8, 2019 at 14:50

The main direction in your example is RTL (right to left) and your tabular is in RTL mode to change the direction of text to LTR (left to right) you need to add \setLTR from bidi package

You can overwrite alignement of a single row with \multicolumn (direction in math mode is always left to right)

\documentclass{Book}
\usepackage{lipsum,array,tabularx,calc}
\usepackage{xepersian}
\settextfont{Amiri} %Or\settextfont{Yas}

\newlength{\conditionwd}
\newenvironment{conditions}[1][که در آن:]
{%
#1\tabularx{\textwidth-\widthof{#1}}[t]{
>{$}l<{$} @{${}={}$} X@{}
}%
}
{\endtabularx\\[\belowdisplayskip]}

\begin{document}
\lipsum
$$\label{eqf12} \tau_{dyn} / \tau_{stat} = (\dot{\tau_{dyn}}/\dot{\tau_0})^\eta$$

\begin{conditions}
\multicolumn{2}{c}{$\eta = 0.7 \cdot (1-2.5\delta) / f_{cm}^{0.8}$}\\
% or \multicolumn{2}{r} to right align equation in the row
\delta & جابه‌جایی نسبی [میلی متر]\\
f_{cm} & متوسط مقاومت مکعب بتنی [$N / mm^2$]\\
0.1 ~N / mm^2 & $\dot{\tau_0}$
\end{conditions}

\lipsum

\end{document}

• Yes, I was wrong about the alignment, This looks more appropriate, thank you Feb 8, 2019 at 15:44
• I've got a problem: i have lots of this defintions which few of them contain formulas. is it possible to apply this technique only to the formulas in the defintion instead of whole table, so that the whole alignment is right to left? Feb 8, 2019 at 16:10
• What's formulas? can you clarify? Feb 8, 2019 at 16:17
• You want \eta, \delta, f_{cm} on the right or on the left? Feb 8, 2019 at 16:19
• I mean i have lots of these equations in the hole book, which mostly include only text defenitions. so i'd like the main alignment like the image above, and the \eta changes like the second image I've just added . sorry for the bad explanation. Feb 8, 2019 at 16:38