Maths — your first formula · คณิตศาสตร์ — สูตรแรกของคุณ
Maths mode
- This is what LaTeX is famous for. To write maths, switch into maths mode with dollar signs:
- Text between
$ ... $is typeset as maths, right inside your sentence. This is inline maths.
โหมดคณิตศาสตร์
- นี่คือสิ่งที่ LaTeX มีชื่อเสียงที่สุด ในการเขียนสมการ ให้สลับเข้าสู่ โหมดคณิตศาสตร์ โดยใช้เครื่องหมายดอลลาร์:
The equation $E = mc^2$ changed physics.
- ข้อความระหว่าง
$ ... $จะถูกจัดรูปแบบเป็นคณิตศาสตร์อยู่ภายในประโยคของคุณ นี่คือ คณิตศาสตร์ในบรรทัดเดียว (inline maths)
Powers and indices
^raises a superscript (a power);_lowers a subscript:
- For more than one character, group them with braces:
$x^{10}$,$a_{i+1}$.
เลขชี้กำลังและเลขชี้ตำแหน่ง
^ใช้สำหรับ เลขชี้กำลัง (superscript);_ใช้สำหรับ เลขชี้ตำแหน่ง (subscript):
$x^2$, $a_1$, and $x^2 + y^2 = r^2$
- For more than one character, group them with braces:
$x^{10}$,$a_{i+1}$.
Big, centred equations
- For an important equation on its own line, use display maths
\[ ... \]:
- Now write your own inline formula in the task below.
สมการใหญ่ที่จัดกึ่งกลาง
- สำหรับสมการสำคัญที่ต้องการแสดงบนบรรทัดตัวเอง ให้ใช้ คณิตศาสตร์แบบแสดงเต็มบรรทัด (display maths)
\[ ... \]:
\[ a^2 + b^2 = c^2 \]
- ตอนนี้ลองเขียนสูตร inline ของคุณเองในโจทย์ด้านล่าง
Common mistakes
- Inline maths goes in
$...$; a missing closing$breaks everything after it. - Display maths uses
\[ ... \].
ข้อผิดพลาดที่พบบ่อย
- คณิตศาสตร์ในบรรทัดเดียวต้องใส่ใน
$...$; การขาด$ที่ปิดท้ายจะทำให้ Everything หลังมันพังทลายไป - คณิตศาสตร์แบบแสดงเต็มบรรทัดใช้
\[ ... \]
Replace the words with real maths. Write the area of a circle as an inline formula: $A = \pi r^2$. The $ ... $ turns on maths mode, \pi is π, and ^2 is the power. · แทนที่คำด้วยคณิตศาสตร์จริง เขียนพื้นที่วงกลมในรูปแบบ สูตรในบรรทัด: $A = \pi r^2$. $ ... $ เปิดโหมดคณิตศาสตร์, \pi คือ π, และ ^2 คือเลขชี้กำลัง
For an important equation, give it its own line with display maths \[ ... \]. Write Pythagoras' theorem: \[ a^2 + b^2 = c^2 \]. · สำหรับสมการที่สำคัญ ให้给它 own line ด้วย display maths \[ ... \]. เขียนทฤษฎีบทพีทาโกรัส: \[ a^2 + b^2 = c^2 \].