3

I am just starting out with LaTex, and I am having trouble. An image is attached below. Essentially, I can't figure out how to indent only the second line of a paragraph. enter image description here

I would like "formula" to line up under "Find." Here is a link to my LaTex: Link

0
6

You're better off setting the items as a list using enumerate. You can format the presentation using enumitem:

enter image description here

\documentclass[12pt, letterpaper]{article}

\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{fancyhdr,enumitem}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}

\author{not gonna make it that easy}
\title{Math Homework}

\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{40pt}

\fancyhf{}
\rhead{
  nope           \\
  AP Calculus AB \\
  \today
}
\rfoot{Page \thepage}

\setlist[enumerate,1]{font=\bfseries,label=\arabic*.}
\setlist[enumerate,2]{font=\bfseries\itshape,label=\Alph*)}
\setlength{\parindent}{0pt}% Remove paragraph indent

\begin{document}

{\huge\bfseries \LaTeX{} Homework Intro}

%%%%%%%%%%%%%%%%%%%%%%%%%   

\itshape
\begin{enumerate}
  \item
  \begin{enumerate}
    \item
    Find the sum of $34$ and $126$ using a calculator.
    \[
       34 + 126 = \boxed{160}
    \]

    \item
    Find the sum of $24$ and $126$ by hand.
    \[
      \setlength{\arraycolsep}{.5\arraycolsep}%
      \begin{array}{ r }
              34 \\
        {} + 126 \\
        \hline
             160
       \end{array}
    \]
     
%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
  \end{enumerate}
  
  \item
  \begin{enumerate}
    \item
    Find the roots of the quadratic equation $f(x) = x^2 + 2x - 3$ using the quadratic formula.
    \begin{align*}
      x &= \frac{-2 \pm \sqrt{2^2 - 4(1)(-3)}}{2(1)} \\
      x &= \frac{-2 \pm \sqrt{16}}{2} = \frac{-2 \pm 4}{2} = \boxed{1, -3}
    \end{align*}
  
    \item
    Determine the roots of that same equation by graphing.
     
    \begin{center}
      \begin{tikzpicture}
        \begin{axis}[
          xlabel=$x$,
          ylabel=$y$,
          xmin=-4,xmax=2, ymin=-5, ymax=2
        ]
          \addplot{x^2+2*x-3};
          \addplot[mark=*, red, only marks]
          plot coordinates {
            (-3, 0)
            (1, 0)
          };
        \end{axis}
      \end{tikzpicture}
    \end{center}
     
     %%%%%%%%%%%%%%%%%%%
  \end{enumerate}
  
  \item
  Find the derivative of $x^x$.
  \begin{align*}
    \frac{\mathrm{d}}{\mathrm{d}x}(x^x) &= \frac{d}{dx} \bigl( e^{x \ln x} \bigr) \\
                                        &= e^{x \ln x} \cdot \bigl( \ln x + x \bigl( \tfrac{1}{x} \bigr) \bigr) \\
                                        &= \boxed{x^x \cdot (\ln x + 1)}
  \end{align*}

\end{enumerate}

\end{document}

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.