0

I'm writing a mathematical article and I want the equation numbers to appear on the right hand side and the end of the line however they are currently appearing underneath the equation on the left. How can I change this?

EXAMPLE:

\documentclass{article} 
\usepackage[utf8]{inputenc}

\usepackage{natbib} 
\usepackage[section]{placeins} 
\usepackage{graphicx} 
\usepackage{wrapfig} 
\usepackage{float} 
\usepackage{mathtools} 
\usepackage{amsmath} 
\usepackage{geometry} 
\geometry{ a4paper, total={170mm,257mm}, left=20mm, top=20mm, }

\begin{document}
\maketitle

\section{Equations}
The horizontal and vertical links and network nodes can now be defined as the following matrices: \

\textbf{Horizonal Links} \newline

For 1 \leq i \leq m+1 \ $and$ \ 1 \leq j \leq n

\begin{description} 
\item[(a)]

\begin{equation} A_{ij}^X= \begin{cases} 1, & \text{if the link between ($i,j$) and ($i,j+1$) exists}\ \ 0, & \text{otherwise}\ \ \end{cases}

\end{equation} $$

\item[(b)]

\begin{equation} X_{ij} = l_{ij}

\end{equation}

where $l_{ij}$ is the length of the link between ($i,j$) and ($i,j+1$). If >there is no link between ($i,j$) and ($i,j+1$) then $l_{ij}$=0

\end{description}

\bibliographystyle{plain} 
\bibliography{references} 
\end{document}
7
  • Welcome to TeX.SX! Right hand side is the default, so you have leqno or some different setup apparently?
    – user31729
    Nov 16, 2015 at 17:41
  • 1
    Which document class do you use?
    – Mico
    Nov 16, 2015 at 17:42
  • I'm using article at the moment
    – MCCR
    Nov 16, 2015 at 17:43
  • Do you use at one-column or a two-column layout?
    – Mico
    Nov 16, 2015 at 17:44
  • A one-column layout
    – MCCR
    Nov 16, 2015 at 17:44

1 Answer 1

2

Your coding style is, shall we way, not exactly tidy. Here's a minimalist fix-up that should get you going, at least for a little while. Good news: after the code clean-up, the equation numbers show up on the right-hand edge.

\documentclass{article} 

\usepackage[utf8]{inputenc}
\usepackage{natbib} 
\usepackage[section]{placeins} 
\usepackage{graphicx} 
\usepackage{wrapfig} 
\usepackage{float} 
\usepackage{mathtools} 
%%\usepackage{amsmath}  is loaded by 'mathtools' -- no need to load it explicitly
\usepackage{geometry} 
\geometry{ a4paper, total={170mm,257mm}, left=20mm, top=20mm}

\begin{document}

\section{Equations}

The horizontal and vertical links and network nodes can now be defined as the following matrices

\subsection*{Horizonal Links} 

For $1 \leq i \leq m+1$ and $1 \leq j \leq n$

\begin{description} 
\item[(a)]
\begin{equation} 
A_{ij}^X= 
\begin{cases} 
  1, & \text{if the link between ($i,j$) and ($i,j+1$) exists}\\ 
  0, & \text{otherwise}
\end{cases}
\end{equation}

\item[(b)]
\begin{equation} 
    X_{ij} = l_{ij}
\end{equation}
where $l_{ij}$ is the length of the link between ($i,j$) and ($i,j+1$). 
If there is no link between ($i,j$) and ($i,j+1$) then $l_{ij}$=0

\end{description}
\end{document}
1
  • Thanks yeah that's changed it :) yeah I have just been googling as I go along...
    – MCCR
    Nov 16, 2015 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .