LaTeX forum ⇒ Math & ScienceBeginner : i dont know the errors in my Latex document Topic is solved

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

Beginner : i dont know the errors in my Latex document  Topic is solved

Postby hariekd » Sat Nov 28, 2015 1:00 pm

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.
  1. \documentclass{article}
  2. \usepackage{amssymb}
  3. \begin{document}
  4. \centerline{\sc \Large Standard IX - unit 9 Similar Triangles}
  5. \vspace{.5pc}
  6. \centerline{\it (Second Question from Page Number 133)}
  7. \vspace{2pc}
  8. \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?}\\
  9.  
  10. Proof:- Consider $\triangle APQ$ and $\triangle ABC$
  11. \begin{enumerate}
  12. \item $\angle APQ =$ and $\angle ABC$ (Corresponding Angles)
  13. \item $\angle AQP =$ and $\angle ACB$ (Corresponding Angles)
  14. \end{enumerate}
  15. As the two angles of $\triangle APQ$ are equal to the two angles of $\triangle ABC$, these two triangles will be similar.\\
  16.  
  17. \therefore \triangle $APQ$ \sim \triangle $ABC$\\
  18.  
  19.  
  20. As $P$ and $Q$ are the midpoints of $AB$ and $AC$,\\
  21. $AP=\frac{1}{2}AB$ and $AQ=\frac{1}{2}AC$\\
  22.  
  23. $\therefore \frac{AQ}{AC}=$ $\frac{AP}{AB}=$ $\frac{PQ}{BC}=$ $\frac{1}{2}$
  24. \begin{equation}
  25. ie, AP= \frac{1}{2}AB
  26. \end{equation}
  27.  
  28. Consider $\triangle APR$ and $\triangle ABD$
  29. \begin{enumerate}
  30. \item $\angle APR =$ and $\angle ABD$ (Corresponding Angles)
  31. \item $\angle ARP =$ and $\angle ADB$ (Corresponding Angles)
  32. \end{enumerate}
  33. As the two angles of $\triangle APR$ are equal to the two angles of $\triangle ABD$, these two trianlges will be similar.\\
  34.  
  35. \therefore \triangle $APR$ \sim $\triangle ABD$
  36. \newline
  37.  
  38.  
  39. $\therefore \frac{AR}{AD}$ = $\frac{AP}{AB}$= $\frac{1}{2}$ (We have proved $\frac{AP}{AB}$= $\frac{1}{2}$)\\
  40. \begin{equation}
  41. ie, AR=\frac{1}{2}AD
  42. \end{equation}
  43.  
  44. \begin{align}
  45. Area of \triangle APQ
  46. & = \frac{1}{2} X PQ X AR \\
  47. & = \frac{1}{2} X \frac{1}{2}BC X \frac{1}{2}AD ($By using Equation 1 and 2$) \\
  48. & = \frac{1}{4} X \frac{1}{2} X BC X AD \\
  49. & = \frac{1}{4} X Area of $\triangle ABC$ \\
  50. \end{align}
  51. \end{document}

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9604
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Nov 28, 2015 2:55 pm

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

    1. $\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:

  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \usepackage{amssymb}
  4. \begin{document}
  5. \centerline{\sc \Large Standard IX - unit 9 Similar Triangles}
  6. \vspace{.5pc}
  7. \centerline{\it (Second Question from Page Number 133)}
  8. \vspace{2pc}
  9. \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?}\\
  10.  
  11. Proof:- Consider $\triangle APQ$ and $\triangle ABC$
  12. \begin{enumerate}
  13. \item $\angle APQ =$ and $\angle ABC$ (Corresponding Angles)
  14. \item $\angle AQP =$ and $\angle ACB$ (Corresponding Angles)
  15. \end{enumerate}
  16. As the two angles of $\triangle APQ$ are equal to the two angles of $\triangle ABC$, these two triangles will be similar.\\
  17.  
  18. $\therefore \triangle APQ \sim \triangle ABC$\\
  19.  
  20.  
  21. As $P$ and $Q$ are the midpoints of $AB$ and $AC$,\\
  22. $AP=\frac{1}{2}AB$ and $AQ=\frac{1}{2}AC$\\
  23.  
  24. $\therefore \frac{AQ}{AC}=$ $\frac{AP}{AB}=$ $\frac{PQ}{BC}=$ $\frac{1}{2}$
  25. \begin{equation}
  26. ie, AP= \frac{1}{2}AB
  27. \end{equation}
  28.  
  29. Consider $\triangle APR$ and $\triangle ABD$
  30. \begin{enumerate}
  31. \item $\angle APR =$ and $\angle ABD$ (Corresponding Angles)
  32. \item $\angle ARP =$ and $\angle ADB$ (Corresponding Angles)
  33. \end{enumerate}
  34. As the two angles of $\triangle APR$ are equal to the two angles of $\triangle ABD$, these two trianlges will be similar.\\
  35.  
  36. $\therefore \triangle APR \sim \triangle ABD$
  37. \newline
  38.  
  39.  
  40. $\therefore \frac{AR}{AD}$ = $\frac{AP}{AB}$= $\frac{1}{2}$ (We have proved $\frac{AP}{AB}$= $\frac{1}{2}$)\\
  41. \begin{equation}
  42. ie, AR=\frac{1}{2}AD
  43. \end{equation}
  44.  
  45. \begin{align}
  46. Area of \triangle APQ
  47. & = \frac{1}{2} X PQ X AR \\
  48. & = \frac{1}{2} X \frac{1}{2}BC X \frac{1}{2}AD (By using Equation 1 and 2) \\
  49. & = \frac{1}{4} X \frac{1}{2} X BC X AD \\
  50. & = \frac{1}{4} X Area of \triangle ABC \\
  51. \end{align}
  52. \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.

  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \usepackage{amssymb}
  4. \usepackage{parskip}
  5. \begin{document}
  6. \centerline{\sc \Large Standard IX - unit 9 Similar Triangles}
  7. \vspace{.5pc}
  8. \centerline{\it (Second Question from Page Number 133)}
  9. \vspace{2pc}
  10. \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?}
  11.  
  12. Proof:- Consider $\triangle APQ$ and $\triangle ABC$
  13. \begin{enumerate}
  14. \item $\angle APQ =$ and $\angle ABC$ (Corresponding Angles)
  15. \item $\angle AQP =$ and $\angle ACB$ (Corresponding Angles)
  16. \end{enumerate}
  17. As the two angles of $\triangle APQ$ are equal to the two angles of $\triangle ABC$, these two triangles will be similar.
  18.  
  19. $\therefore \triangle APQ \sim \triangle ABC$
  20.  
  21.  
  22. As $P$ and $Q$ are the midpoints of $AB$ and $AC$,
  23. $AP=\frac{1}{2}AB$ and $AQ=\frac{1}{2}AC$
  24.  
  25. $\therefore \frac{AQ}{AC}=$ $\frac{AP}{AB}=$ $\frac{PQ}{BC}=$ $\frac{1}{2}$
  26. \begin{equation}
  27. ie, AP= \frac{1}{2}AB
  28. \end{equation}
  29.  
  30. Consider $\triangle APR$ and $\triangle ABD$
  31. \begin{enumerate}
  32. \item $\angle APR =$ and $\angle ABD$ (Corresponding Angles)
  33. \item $\angle ARP =$ and $\angle ADB$ (Corresponding Angles)
  34. \end{enumerate}
  35. As the two angles of $\triangle APR$ are equal to the two angles of $\triangle ABD$, these two trianlges will be similar.
  36.  
  37. $\therefore \triangle APR \sim \triangle ABD$
  38. \newline
  39.  
  40.  
  41. $\therefore \frac{AR}{AD}$ = $\frac{AP}{AB}$= $\frac{1}{2}$ (We have proved $\frac{AP}{AB}$= $\frac{1}{2}$)
  42. \begin{equation}
  43. ie, AR=\frac{1}{2}AD
  44. \end{equation}
  45.  
  46. \begin{align}
  47. Area of \triangle APQ
  48. & = \frac{1}{2} X PQ X AR \\
  49. & = \frac{1}{2} X \frac{1}{2}BC X \frac{1}{2}AD (By using Equation 1 and 2) \\
  50. & = \frac{1}{4} X \frac{1}{2} X BC X AD \\
  51. & = \frac{1}{4} X Area of \triangle ABC \\
  52. \end{align}
  53. \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

Postby hariekd » Sat Nov 28, 2015 5:42 pm

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


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 1 guest