1

How can I have this behavior in LaTeX please :

enter image description here

Two portions of code in the same line, separated by an arrow.

  • Well, either use a tabular or an alignat environment, however, that's mathmode. You could use listings too – user31729 Apr 30 '16 at 10:24
  • Can I have some source code if it's possible ? – Sidahmed Apr 30 '16 at 10:29
1

In math mode use two array environments:

\documentclass{article}
\begin{document}
\[
\begin{array}{lll}
r1 & = & 12\\
r2 & = & 34\\
r3 & = & r1+r2
\end{array}
\Leftrightarrow
\begin{array}{lll}
r3 & = & 12\\
r2 & = & 34\\
r2 & = & r3+r1
\end{array}
\]
\end{document}

mwe

In text mode use tabular at both sides of $\Leftrightarrow$:

\documentclass{article}
\begin{document}
\begin{tabular}{lll}
r1 & = & 12\\
r2 & = & 34\\
r3 & = & r1+r2
\end{tabular}
$\Leftrightarrow$
\begin{tabular}{lll}
r3 & = & 12\\
r2 & = & 34\\
r2 & = & r3+r1
\end{tabular}
\end{document}

mwe

For plain text is enough two minipages:

\documentclass{article}
\begin{document}
\begin{minipage}{3cm}
Some text come here in a minipage
\end{minipage}
$\Leftrightarrow$
\begin{minipage}{3cm}
More dummy text to see the minipage
\end{minipage}
\end{document}

mwe

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.