LaTeX forum ⇒ Math & ScienceNew at LaTeX coding Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Philosophaie
Posts: 17
Joined: Sat Mar 21, 2015 8:59 pm

New at LaTeX coding

Postby Philosophaie » Wed Mar 25, 2015 6:08 pm

I am new at LaTeX.

Could someone fix my code so it works.

  1. \documentclass[10pt,a4paper]{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amsfonts}
  5. \usepackage{amssymb}
  6. \begin{document}
  7. Some text here.
  8. $C_x = R1\timesR2 = \begin{array}{\hat{i} \hat{j} \hat{k}\\X1 Y1 Z1\\X2 Y2 Z2} \end{array}$
  9. $C_{x_{12}} = (Y1 * Z2 - Z1 * Y2)$
  10. $C_{y_{12}} = (Z1 * X2 - X1 * Z2)$
  11. $C_{z_{12}} = (X1 * Y2 - Y1 * X2))$
  12.  
  13. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 3582
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Mar 25, 2015 6:44 pm

It would be better to state explicit errors problemm constructs. That means a meaningful title as well. For example, i have no idea how the output is supposed to look like.

  1. \documentclass[10pt,a4paper]{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amsfonts}
  5. \usepackage{amssymb}
  6. \begin{document}
  7. Some text here.
  8. \begin{align*}
  9. C_x &= R1\times R2 = \begin{array}{c}%
  10. \hat{i} \hat{j} \hat{k}\\
  11. X1 Y1 Z1\\
  12. X2 Y2 Z2\\
  13. \end{array}\\
  14. C_{x_{12}} &= (Y1 * Z2 - Z1 * Y2)\\
  15. C_{y_{12}} &= (Z1 * X2 - X1 * Z2)\\
  16. C_{z_{12}} &= (X1 * Y2 - Y1 * X2))
  17. \end{align*}
  18.  
  19. \end{document}


You can read a lot about mathematical typesetting in Math mode.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 4 guests