1

Here's my code:

\documentclass{article}
\begin{document}
\begin{enumerate}
    \item Solve the equation \\
    \hspace*{24cm} $x^2 = y$
\end{enumerate}
\end{document}

I want it such that there's a blank space/indent so that the equation starts further right than the instructions. I've tried \indent, \paragraph, and \hspace* as you can see and none of it seems to work. I know I could get this to work by starting a new level of enumerate, but I was just wondering if there was another way, since I have to do this many times in the document.

4
  • 2
    Are you sure that you don't want \item Solve the equation \[x^2 = y.\]? If you are, you can try \\ \quad $x^2=y$.
    – Sigur
    Commented Feb 17, 2016 at 19:31
  • 2
    Indentation by 24 cm? How wide is your papersize?
    – user31729
    Commented Feb 17, 2016 at 19:31
  • 2
    welcome to the site! :) have you tried using \[x^2=y\]?
    – cmhughes
    Commented Feb 17, 2016 at 19:31
  • I haven't tried [x^2=y] and it works great! Thank you! Commented Feb 17, 2016 at 19:49

2 Answers 2

1

Something like this (although I would not use it personally this way)? Using \hfill to 'push' the equation to the right margin.

(I assume that the original \hspace*{24cm} was meant to shift the equation to the right margin)

However, this might look awkward for a bunch of several equations.

\documentclass{article}
\begin{document}
\begin{enumerate}
    \item Solve the equation 

    \hfill $x^2 = y$
\end{enumerate}
\end{document}

enter image description here

0
\documentclass{article}
\begin{document}
    \begin{enumerate}
        \item Solve the equation \\
              \makebox[\linewidth]{$x^2 = y$} % centred equation
    \end{enumerate}
\end{document}

You must log in to answer this question.

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