Math & ScienceBeginner : i dont know the errors in my Latex document

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
hariekd
Posts: 2
Joined: Sat Nov 28, 2015 12:55 pm

Beginner : i dont know the errors in my Latex document

Post by hariekd »

I am a new latex user. I have prepared a maths proof for my students. Even i get the out put, the source file shows so many errors. pls indicate me about the errors.

Code: Select all

\documentclass{article}
\usepackage{amssymb}
\begin{document}
\centerline{\sc \Large Standard IX - unit 9 Similar Triangles}
\vspace{.5pc}
\centerline{\it (Second Question from Page Number 133)}
\vspace{2pc}
\textbf{In a trianlge, a line is drawn parallel to one side and a small triangle is cut off. If the Parallel line drawn is through the mid-point of one side, then how much of the area of the original triangle is the area of the small triangle?}\\

Proof:- Consider $\triangle APQ$ and $\triangle ABC$
\begin{enumerate}
\item $\angle APQ =$ and $\angle ABC$ (Corresponding Angles)
\item $\angle AQP =$ and $\angle ACB$ (Corresponding Angles)
\end{enumerate}
As the two angles of $\triangle APQ$ are equal to the two angles of $\triangle ABC$, these two triangles will be similar.\\

\therefore \triangle $APQ$ \sim \triangle $ABC$\\


As $P$ and $Q$ are the midpoints of $AB$ and $AC$,\\
$AP=\frac{1}{2}AB$ and $AQ=\frac{1}{2}AC$\\

$\therefore \frac{AQ}{AC}=$ $\frac{AP}{AB}=$ $\frac{PQ}{BC}=$ $\frac{1}{2}$
\begin{equation}
ie, AP= \frac{1}{2}AB
\end{equation}

Consider $\triangle APR$ and $\triangle ABD$
\begin{enumerate}
\item $\angle APR =$ and $\angle ABD$ (Corresponding Angles)
\item $\angle ARP =$ and $\angle ADB$ (Corresponding Angles)
\end{enumerate}
As the two angles of $\triangle APR$ are equal to the two angles of $\triangle ABD$, these two trianlges will be similar.\\

\therefore \triangle $APR$ \sim $\triangle ABD$
\newline


$\therefore \frac{AR}{AD}$ = $\frac{AP}{AB}$= $\frac{1}{2}$ (We have proved $\frac{AP}{AB}$= $\frac{1}{2}$)\\
\begin{equation}
ie, AR=\frac{1}{2}AD
\end{equation}

\begin{align}
Area of \triangle APQ 
& = \frac{1}{2} X PQ X AR \\
& = \frac{1}{2} X \frac{1}{2}BC X \frac{1}{2}AD ($By using Equation 1 and 2$) \\ 
& = \frac{1}{4} X \frac{1}{2} X BC X AD \\
& = \frac{1}{4} X Area of $\triangle ABC$ \\
\end{align}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Beginner : i dont know the errors in my Latex document

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

Very good that you started with LaTeX. I recommend to read an introductory text. For example, my book LaTeX Beginner's Guide, or a free text such as LaTeX for Complete Novices.

By the way, this weekend my publisher sells my two LaTeX ebooks, so also the LaTeX Cookbook, (all ebooks) with 50% discount (link)
  • There are problems with inline math mode in the text, that is, math formulas within normal text. Start with a $, later end with a $. A rule of thumb, symbols are in math mode too. So, for example write

    Code: Select all

    $\therefore \triangle APQ \sim \triangle ABC$
  • Don't use $ within align, because this is already (displayed) math mode.
  • Load the amsmath package for extended math support.
Here is the corrected error-free code, but some more things can be improved:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\centerline{\sc \Large Standard IX - unit 9 Similar Triangles}
\vspace{.5pc}
\centerline{\it (Second Question from Page Number 133)}
\vspace{2pc}
\textbf{In a trianlge, a line is drawn parallel to one side and a small triangle is cut off. If the Parallel line drawn is through the mid-point of one side, then how much of the area of the original triangle is the area of the small triangle?}\\

Proof:- Consider $\triangle APQ$ and $\triangle ABC$
\begin{enumerate}
\item $\angle APQ =$ and $\angle ABC$ (Corresponding Angles)
\item $\angle AQP =$ and $\angle ACB$ (Corresponding Angles)
\end{enumerate}
As the two angles of $\triangle APQ$ are equal to the two angles of $\triangle ABC$, these two triangles will be similar.\\

$\therefore \triangle APQ \sim \triangle ABC$\\


As $P$ and $Q$ are the midpoints of $AB$ and $AC$,\\
$AP=\frac{1}{2}AB$ and $AQ=\frac{1}{2}AC$\\

$\therefore \frac{AQ}{AC}=$ $\frac{AP}{AB}=$ $\frac{PQ}{BC}=$ $\frac{1}{2}$
\begin{equation}
ie, AP= \frac{1}{2}AB
\end{equation}

Consider $\triangle APR$ and $\triangle ABD$
\begin{enumerate}
\item $\angle APR =$ and $\angle ABD$ (Corresponding Angles)
\item $\angle ARP =$ and $\angle ADB$ (Corresponding Angles)
\end{enumerate}
As the two angles of $\triangle APR$ are equal to the two angles of $\triangle ABD$, these two trianlges will be similar.\\

$\therefore \triangle APR \sim \triangle ABD$
\newline


$\therefore \frac{AR}{AD}$ = $\frac{AP}{AB}$= $\frac{1}{2}$ (We have proved $\frac{AP}{AB}$= $\frac{1}{2}$)\\
\begin{equation}
ie, AR=\frac{1}{2}AD
\end{equation}

\begin{align}
Area of \triangle APQ
& = \frac{1}{2} X PQ X AR \\
& = \frac{1}{2} X \frac{1}{2}BC X \frac{1}{2}AD (By using Equation 1 and 2) \\
& = \frac{1}{4} X \frac{1}{2} X BC X AD \\
& = \frac{1}{4} X Area of \triangle ABC \\
\end{align}
\end{document}
For example, don't end a text line by \\. This is a command just for ending lines in a table or a multi-line math formula. An empty line is sufficient as a paragraph break.

It seems that you (mis)use \\ to get a space between paragraph. For this purpose, you could load the parskip package and remove the \\ in normal text.

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{parskip}
\begin{document}
\centerline{\sc \Large Standard IX - unit 9 Similar Triangles}
\vspace{.5pc}
\centerline{\it (Second Question from Page Number 133)}
\vspace{2pc}
\textbf{In a triangle, a line is drawn parallel to one side and a small triangle is cut off. If the Parallel line drawn is through the mid-point of one side, then how much of the area of the original triangle is the area of the small triangle?}

Proof:- Consider $\triangle APQ$ and $\triangle ABC$
\begin{enumerate}
\item $\angle APQ =$ and $\angle ABC$ (Corresponding Angles)
\item $\angle AQP =$ and $\angle ACB$ (Corresponding Angles)
\end{enumerate}
As the two angles of $\triangle APQ$ are equal to the two angles of $\triangle ABC$, these two triangles will be similar.

$\therefore \triangle APQ \sim \triangle ABC$


As $P$ and $Q$ are the midpoints of $AB$ and $AC$,
$AP=\frac{1}{2}AB$ and $AQ=\frac{1}{2}AC$

$\therefore \frac{AQ}{AC}=$ $\frac{AP}{AB}=$ $\frac{PQ}{BC}=$ $\frac{1}{2}$
\begin{equation}
ie, AP= \frac{1}{2}AB
\end{equation}

Consider $\triangle APR$ and $\triangle ABD$
\begin{enumerate}
\item $\angle APR =$ and $\angle ABD$ (Corresponding Angles)
\item $\angle ARP =$ and $\angle ADB$ (Corresponding Angles)
\end{enumerate}
As the two angles of $\triangle APR$ are equal to the two angles of $\triangle ABD$, these two trianlges will be similar.

$\therefore \triangle APR \sim \triangle ABD$
\newline


$\therefore \frac{AR}{AD}$ = $\frac{AP}{AB}$= $\frac{1}{2}$ (We have proved $\frac{AP}{AB}$= $\frac{1}{2}$)
\begin{equation}
ie, AR=\frac{1}{2}AD
\end{equation}

\begin{align}
Area of \triangle APQ
& = \frac{1}{2} X PQ X AR \\
& = \frac{1}{2} X \frac{1}{2}BC X \frac{1}{2}AD (By using Equation 1 and 2) \\
& = \frac{1}{4} X \frac{1}{2} X BC X AD \\
& = \frac{1}{4} X Area of \triangle ABC \\
\end{align}
\end{document}
Maybe you learned LaTeX from some old examples, which are not perfect. Reading a book or an introduction can help to get a better start, such as I meant above.

Stefan
LaTeX.org admin
hariekd
Posts: 2
Joined: Sat Nov 28, 2015 12:55 pm

Re: Beginner : i dont know the errors in my Latex document

Post by hariekd »

Thank you Stefan Sir, for your great support. I got the exact output which i want... Thank you....
Post Reply