2

MWE:

\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm}

\begin{document}

\begin{gather*}
y=3x-6 --- {1}\\
y=-x+5 --- {2}\\
\end{gather*}

\end{document}

Picture: enter image description here

How do I join the three dashes?

I tried \rule and \line but they only give me a line aligned to the bottom of the text.

  • 1
    A simple solution is to put --- in an \mbox{---} command. – Guido Apr 4 '15 at 9:27
2

If you want rule:

\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm}

\begin{document}

\begin{gather*}
y=3x-6 \mathrel{\vcenter{\hbox{\rule{2cm}{1pt}}}} {1}\\
y=-x+5 \mathrel{\vcenter{\hbox{\rule{2cm}{1pt}}}} {2}\\
\end{gather*}

\end{document}

enter image description here

Depending on how long the rule should be, you may change the dimension or simply use \text{---}..

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.