Photobucket SELAMAT DATANG DI:http://ahmadsyahbio.blogspot.com Sebagai kumpulan bacaan di ambil dari berbagai sumber untuk menambah pengetahuan kita semoga bermanfaat silahkan tinggalkan komentar anda...terimakasih.

Rabu, 17 Februari 2010

Matematik II

Getting to Grips dengan Lateks - Matematika II

by Andrew Roberts oleh Andrew Roberts
This tutorial builds on the basic foundations presented in the previous tutorial . Tutorial ini dibangun di atas fondasi dasar yang disajikan dalam tutorial sebelumnya. If you often include a lot of maths in your documents, then you will probably find that you wish to have slightly more control over presentation issues. Jika Anda sering memasukkan banyak matematika dalam dokumen Anda, maka Anda mungkin akan menemukan bahwa Anda ingin memiliki sedikit lebih banyak kontrol atas masalah presentasi. Some of the topics covered make writing equations more complex - but who said typesetting mathematics was easy?! Beberapa topik yang dibahas membuat tulisan persamaan yang lebih kompleks - tetapi yang mengatakan typesetting matematika itu mudah?!

Adding text to equations Menambahkan teks ke persamaan

I doubt it will be every day that you will need to include some text within an equation. Aku ragu akan setiap hari bahwa Anda akan perlu menyertakan beberapa teks dalam suatu persamaan. However, sometimes it needs to be done. Namun, kadang-kadang perlu dilakukan. Just sticking the text straight in the maths environment won't give you the results you want. Hanya teks menempel lurus di lingkungan matematika tidak akan memberi Anda hasil yang Anda inginkan. For example: Contoh:
\begin{equation} \ begin (equation)
  50 apples \times 100 apples = lots of apples 50 apel \ times 100 apel = banyak apel
\end{equation} \ end (equation) 
Persamaan tanpa kata-kata yang berbeda
There are two noticeable problems. Ada dua masalah nyata. Firstly, there are no spaces between numbers and text, nor spaces between multiple words. Pertama, tidak ada spasi di antara angka dan teks, atau ruang di antara beberapa kata. Secondly, the words don't look quite right --- the letters are more spaced out than normal. Both issues are simply artifacts of the maths mode, in that it doesn't expect to see words. Kedua, kata-kata tidak terlihat benar --- surat-surat lebih jarak keluar dari biasanya. Kedua isu tersebut hanya artefak dari modus matematika, dalam arti bahwa hal itu tidak mengharapkan untuk melihat kata-kata. Any spaces that you type in maths mode are ignored and Latex spaces elements according to its own rules. Spasi yang anda ketik dalam modus matematika diabaikan dan elemen-elemen ruang Lateks sesuai dengan aturan sendiri. It is assumed that any characters represent variable names. Diasumsikan bahwa ada karakter yang mewakili nama-nama variabel. To emphasise that each symbol is an individual, they are not positioned as closely together as with normal text. Untuk menekankan bahwa setiap simbol adalah seorang individu, mereka tidak diposisikan sebagai erat bersama-sama dengan teks biasa.
There are a number of ways that text can be added properly. Ada sejumlah cara yang dapat ditambahkan teks dengan benar. The typical way is to wrap the text with the \mbox{...} command. Cara yang khas adalah untuk membungkus teks dengan \ mbox {...} perintah. This command hasn't been introduced before, however, it's job is basically to create a text box just width enough to contain the supplied text. Perintah ini belum pernah diperkenalkan sebelumnya, Namun, pada dasarnya tugas untuk membuat kotak teks hanya cukup lebar untuk menampung teks yang disediakan. Text within this box cannot be broken across lines. Teks dalam kotak ini tidak dapat dibatalkan di seluruh baris. Let's see what happens when the above equation code is adapted: Mari kita lihat apa yang terjadi ketika kode persamaan di atas disesuaikan:
Persamaan menggunakan kata-kata mboxes untuk menampilkan The text looks better. Teks terlihat lebih baik. However, there are no gaps between the numbers and the words. Namun, tidak ada kesenjangan antara angka dan kata-kata. Unfortunately, you are required to explicitly add these. There are many ways to add spaces between maths elements, however, for the sake of simplicity, I find it easier, in this instance at least, just to literally add the space character in the affected \mbox (s) itself (just before the text.) Sayangnya, Anda diminta untuk secara eksplisit menambahkan. Ada banyak cara untuk menambahkan spasi di antara unsur-unsur matematika Namun, demi kesederhanaan, saya merasa lebih mudah, dalam hal ini setidaknya, hanya untuk benar-benar menambahkan karakter spasi di terpengaruh \ mbox (s) itu sendiri (tepat sebelum teks.)
\begin{equation} \ begin (equation)
  50 \mbox{ apples} \times 100 \mbox{ apples} = 50 \ mbox (apel) \ times 100 \ mbox (apel) = 
  \mbox{lots of apples} \ mbox (banyak apel)
\end{equation} \ end (equation) 
Persamaan menggunakan mboxes untuk menampilkan kata-kata, termasuk 
spasi

Formatted text Teks berformat

Using the \mbox is fine and gets the basic result. Menggunakan \ mbox baik dan mendapatkan hasil dasar. Yet, there is an alternative that offers a little more flexibility. Namun, ada alternatif lain yang menawarkan lebih banyak fleksibilitas. You may recall from Tutorial 7 (Formatting) , the introduction of font formatting commands, such as \textrm , \textit , \textbf , etc. These commands format the argument accordingly, eg, \textbf{bold text} gives bold text . These commands are equally valid within a maths environment to include text. Anda mungkin ingat dari Tutorial 7 (Memformat), pengenalan perintah format font, seperti \ textrm, \ textit, \ textbf, dll format perintah ini argumen yang sesuai, misalnya, \ textbf (tebal teks) memberikan format teks tebal. Ini Perintah yang sama berlaku dalam lingkungan matematika untuk memasukkan teks. The added benefit here is that you can have better control over the font formatting, rather than the standard text achieved with \mbox . Keuntungan tambahan di sini adalah bahwa Anda dapat memiliki kontrol yang lebih baik atas format font, daripada teks standar dicapai dengan \ mbox.
\begin{equation} 50 \textrm{ apples} \times 100 \textbf{ apples} = \textit{lots of apples} \end{equation} \ begin (equation) 50 \ textrm (apel) \ times 100 \ textbf (apel) = \ textit (banyak apel) \ end (equation) 
Persamaan menggunakan perintah format teks standar dan format untuk
 menampilkan kata-kata
However, as is the case with Latex, there is more than one way to skin a cat! Namun, seperti halnya dengan Lateks, ada lebih dari satu cara untuk kulit kucing! There are a set of formatting commands very similar to the font formatting ones just used, except they are aimed specifically for text in maths mode. Ada seperangkat perintah formatnya sangat mirip dengan format font yang hanya digunakan, kecuali mereka yang ditujukan khusus untuk teks dalam modus matematika. So why bother showing you \textrm and co if there are equivalents for maths? Jadi, mengapa repot-repot menunjukkan kepada Anda \ textrm dan rekan apakah ada setara untuk matematika? Well, that's because they are subtly different. Yah, itu karena mereka agak berbeda. The maths formatting commands are: Format perintah yang matematika adalah:
Command Command Format Format Example Contoh
\mathrm{...} \ mathrm {...} Roman Roman Persamaan diformat di Roma
\mathit{...} \ mathit {...} Italic Italic Persamaan diformat dalam Cetak miring
\mathbf{...} \ mathbf {...} Bold Bold Persamaan diformat di Bold
\mathsf{...} \ mathsf {...} Sans serif Sans serif Persamaan diformat dalam sans serif
\mathtt{...} \ mathtt {...} Typewriter Typewriter Persamaan diformat di Mesin ketik
\mathcal{...} \ mathcal {...} Calligraphy Kaligrafi Persamaan diformat dalam Kaligrafi
The maths formatting commands can be wrapped around the entire equation, and not just on the textual elements: they only format letters, numbers, and uppercase Greek, and the rest of the maths syntax is ignored. Format perintah yang matematika dapat melilit seluruh persamaan, dan tidak hanya pada unsur-unsur tekstual: mereka format hanya huruf, angka, dan huruf besar Yunani, dan sisanya dari matematika sintaks ini diabaikan. So, generally, it is better to use the specific maths commands if required. Note that the calligraphy example gives rather strange output. Jadi, pada umumnya, lebih baik untuk menggunakan perintah matematika khusus jika diperlukan. Perhatikan bahwa contoh kaligrafi memberikan output agak aneh. This is because for letters, it requires upper case characters. Hal ini karena untuk surat-surat, itu memerlukan karakter huruf besar. The reminding letters are mapped to special symbols. Surat yang mengingatkan dipetakan simbol-simbol khusus.

Changing text size of equations Mengubah ukuran teks persamaan

Probably a rare event, but there may be a time when you would prefer to have some control of the size. Mungkin jarang terjadi, tapi mungkin ada saat ketika Anda akan memilih untuk memiliki kontrol ukuran. For example, using text-mode maths, by default a simple fraction will look like this: Sebagai contoh, dengan menggunakan modus teks matematika, secara default fraksi sederhana akan terlihat seperti ini: pecahan 1 / 2 in font kecil where as you may prefer to have it displayed larger, like when in display mode, but still keeping it inline, like this: dimana Anda dapat memilih untuk memilikinya ditampilkan lebih besar, seperti ketika dalam modus layar, tapi tetap menjaga hal itu inline, seperti ini: pecahan 1 / 2 in normal font . .
A simple approach is to utilise the predefined sizes for maths elements: Suatu pendekatan sederhana adalah dengan memanfaatkan ukuran standar untuk unsur-unsur matematika:
\displaystyle \ displaystyle Size for equations in display mode Ukuran untuk persamaan dalam mode tampilan
\textstyle \ textstyle Size for equations in text mode Ukuran untuk persamaan dalam mode teks
\scriptstyle \ scriptstyle Size for first sub/superscripts Ukuran untuk pertama sub / superscripts
\scriptscriptstyle \ scriptscriptstyle Size for subsequent sub/superscripts Ukuran untuk selanjutnya sub / superscripts
A classic example to see this in use is typesetting continued fractions. The following code provides an example. Sebuah contoh klasik untuk melihat ini yang digunakan adalah melanjutkan penyusunan huruf pecahan. Kode berikut memberikan contoh.
\begin{equation} \ begin (equation)
  x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}} x = a_0 + \ frac (1) (a_1 + \ frac (1) (a_2 + \ frac (1) (a_3 + a_4)))
\end{equation} \ end (equation) 
Sebuah fraksi terus ditampilkan menggunakan ukuran standar
As you can see, as the fractions continue, they get smaller (although they will not get any smaller as in this example, they have reached the \srciptscriptstyle limit. If you wanted to keep the size consistent, you could declare each fraction to use the display style instead, eg, Seperti yang Anda lihat, sebagai pecahan melanjutkan, mereka mendapatkan yang lebih kecil (walaupun mereka tidak akan memperoleh lebih kecil seperti dalam contoh ini, mereka telah mencapai \ srciptscriptstyle batas. Jika anda ingin menjaga ukuran konsisten, Anda bisa menyatakan setiap fraksi untuk menggunakan bukannya gaya tampilan, misalnya,
\begin{equation} \ begin (equation)
  x = a_0 + \frac{1}{\displaystyle a_1 x = a_0 + \ frac (1) (\ displaystyle a_1 
          + \frac{1}{\displaystyle a_2 + \ Frac (1) (\ displaystyle a_2 
          + \frac{1}{\displaystyle a_3 + a_4}}} + \ Frac (1) (\ displaystyle a_3 + a_4)))
\end{equation} \ end (equation) 
Sebuah fraksi terus ditampilkan menggunakan ukuran standar
Another approach is to use the \DeclareMathSizes command to select your preferred sizes. Pendekatan lain adalah dengan menggunakan \ DeclareMathSizes perintah untuk memilih ukuran pilihan Anda. You can only define sizes for \displaystyle }, \textstyle , etc. One potential downside is that this command sets the global maths sizes, as it can only be used in the document preamble. Anda hanya dapat menetapkan ukuran untuk \ displaystyle), \ textstyle, dll Salah satu potensi downside adalah bahwa perintah ini menetapkan ukuran matematika global, karena hanya dapat digunakan dalam dokumen basa-basi.
However, it's fairly easy to use: \DeclareMathSizes{ds}{ts}{ss}{sss} , where ds is the display size , ts is the text size , etc. The values you input are assumed to be point (pt) size. In the example document (mathsize2.pdf) , the math sizes have been made much larger than necessary to illustrate that the changes have taken place. Namun, ini cukup mudah digunakan: \ DeclareMathSizes (ds) (ts) (ss) (sss), di mana ds adalah ukuran layar, ts adalah ukuran teks, dan lain-lain nilai yang Anda input diasumsikan titik (pt) ukuran. Dalam contoh dokumen (mathsize2.pdf), ukuran matematika yang telah dibuat jauh lebih besar daripada yang diperlukan untuk menggambarkan bahwa perubahan telah terjadi.
NB the changes only take place if the value in the first argument matches the current document text size. NB perubahan hanya dilakukan jika nilai pada argumen pertama sesuai dengan ukuran teks dokumen saat ini. It is therefore common to see a set of declarations in the preamble, in the event of the main font being changed. Oleh karena itu sering melihat serangkaian deklarasi dalam pembukaan, dalam acara font utama yang berubah. Eg, Misalnya
\DeclareMathSizes{10}{18}{12}{8}   % For size 10 text \ DeclareMathSizes (10) (18) (12) (8)% Untuk ukuran teks 10
\DeclareMathSizes{11}{19}{13}{9}   % For size 11 text \ DeclareMathSizes (11) (19) (13) (9)% Untuk ukuran teks 11
\DeclareMathSizes{12}{20}{14}{10}  % For size 12 text \ DeclareMathSizes (12) (20) (14) (10)% Untuk ukuran 12 teks 

Multi-lined equations ( eqnarray environment) Multi-berbaris persamaan (eqnarray lingkungan)

Imagine that you have an equation that you want to manipulate, for example, to simplify it. Bayangkan bahwa Anda memiliki suatu persamaan yang ingin Anda memanipulasi, misalnya, untuk menyederhanakannya. Often this is done over a number of steps to help the reader understand how to get from the original equation to the final result. Sering kali ini dilakukan melalui sejumlah langkah untuk membantu pembaca memahami bagaimana untuk mendapatkan dari persamaan asli untuk hasil akhir. This should be a relatively simple task, but as we shall see, the skills for displaying mathematics from the previous tutorial are not adequate. Ini harus menjadi tugas relatif sederhana, tetapi seperti yang akan kita lihat, keterampilan untuk menampilkan matematika dari tutorial sebelumnya tidak memadai. Using what we know so far: Menggunakan apa yang kita ketahui sejauh ini:
Multi-line persamaan menggunakan serangkaian persamaan individu. This clearly looks rather ugly. Ini jelas tampak agak jelek. One way to the various elements neatly aligned is to use a table, and place equations inline. Salah satu cara untuk berbagai elemen rapi selaras adalah dengan menggunakan sebuah meja, dan tempat persamaan inline. Let's have a go: Mari kita pergi:
\begin{tabular}{ rl } \ begin (tabular) (rl)
\(10xy^2+15x^2y-5xy\) & \(= 5\left(2xy^2+3x^2y-xy\right)\) \\ \ (10xy ^ 2 +15 x ^ 2y-5xy \) & \ (= 5 \ left (2xy ^ 2 +3 x ^ 2y-xy \ right) \) \ \
 & \(= 5x\left(2y^2+3xy-y\right)\) \\ & \ (= 5x \ left (2y ^ 2 +3 xy-y \ right) \) \ \
 & \(= 5xy\left(2y+3x-1\right)\) & \ (= 5xy \ left (2y 3 x-1 \ right) \)
 \end{tabular} \ end (tabular) 
Multi-line persamaan menggunakan dua kolom tabel.
That doesn't look too bad. Yang tidak tampak terlalu buruk. Perhaps the extra space between the equation on the left and the equals sign being larger than the gap on the right doesn't look perfect. Mungkin spasi tambahan antara persamaan di sebelah kiri dan tanda sama dengan menjadi lebih besar daripada kesenjangan di sebelah kanan tidak tampak sempurna. That could be rectified by adding an extra column and putting the equals sign in the central one: Yang dapat diperbaiki dengan menambahkan kolom ekstra dan meletakkan tanda sama dengan di tengah satu:
\begin{tabular}{ rcl } \ begin (tabular) (RCL)
  \(10xy^2+15x^2y-5xy\) & \(=\) & \(5\left(2xy^2+3x^2y-xy\right)\) \\ \ (10xy ^ 2 +15 x ^ 2y-5xy \) & \ (= \) & \ (5 \ left (2xy ^ 2 +3 x ^ 2y-xy \ right) \) \ \
   & \(=\) & \(5x\left(2y^2+3xy-y\right)\) \\ & \ (= \) & \ (5x \ left (2y ^ 2 +3 xy-y \ right) \) \ \
   & \(=\) & \(5xy\left(2y+3x-1\right)\) & \ (= \) & \ (5xy \ left (2y 3 x-1 \ right) \)
\end{tabular} \ end (tabular) 
Multi-line persamaan menggunakan tiga kolom tabel.
Looking better. Kelihatan lebih baik. Another issue is that the vertical space between the rows makes makes the equations on the right-hand side look a little crowded. Masalah lainnya adalah bahwa ruang vertikal di antara deretan membuat membuat persamaan di sisi kanan tampak agak ramai. It would be nice to add a little space --- make the rows in the table a little taller. Akan menyenangkan untuk menambah sedikit ruang --- membuat baris dalam tabel sedikit lebih tinggi. (You need to add \usepackage{array} to your preamble for this to work.) (Anda perlu menambahkan \ usepackage (array) Pembukaan Anda untuk bekerja.)
% add some extra height. % Menambahkan beberapa ekstra tinggi. Needs the array package. Kebutuhan paket array. See preamble. Lihat basa-basi.
\setlength{\extrarowheight}{0.3cm} \ SetLength (\ extrarowheight) (0.3cm)
Multi-line persamaan menggunakan tiga kolom tabel dan baris ekstra 
tinggi. However, by this stage, we've had to do quite a bit of extra leg work, and there is still one important disadvantage at the end of it. Namun, pada tahap ini, kami harus melakukan sedikit pekerjaan kaki ekstra, dan masih ada satu kelemahan penting di akhir itu. You can't add equation numbers. Anda tidak dapat menambahkan angka persamaan. Because once you are within the tabular environment, you can only use the inline type of maths display. Karena setelah Anda berada dalam lingkungan tabel, Anda hanya dapat menggunakan jenis inline matematika layar. For equation numbers, you need to use the display mode equation package, but you can't in this instance. Untuk persamaan angka, Anda harus menggunakan mode tampilan persamaan paket, tetapi Anda tidak bisa dalam hal ini. This is where eqnarray becomes extremely useful. Ini adalah tempat eqnarray menjadi sangat berguna.
eqnarray , as the name suggests borrows from the array } package which is basically a simplified tabular environment. eqnarray, seperti namanya meminjam dari array) paket yang pada dasarnya merupakan lingkungan tabular disederhanakan. The array package was introduced in tutorial 9 (Mathematics I) for producing matrices. Paket array diperkenalkan di tutorial 9 (Matematika I) untuk menghasilkan matriks. Here is how to use eqnarray for this example: Berikut adalah cara menggunakan eqnarray untuk contoh ini:
\begin{eqnarray} \ begin (eqnarray)
  10xy^2+15x^2y-5xy & = & 5\left(2xy^2+3x^2y-xy\right) \\ 10xy ^ 2 +15 x ^ 2y-5xy & = & 5 \ left (2xy ^ 2 +3 x ^ 2y-xy \ right) \ \
   & = & 5x\left(2y^2+3xy-y\right) \\ & = & 5x \ left (2y ^ 2 +3 xy-y \ right) \ \
   & = & 5xy\left(2y+3x-1\right) & = & 5xy \ left (2y 3 x-1 \ right)
\end{eqnarray} \ end (eqnarray) 
Multi-line eqnarray persamaan menggunakan paket.
As you can see, everything is laid out nicely and as expected. Seperti yang Anda lihat, semuanya disusun dengan baik dan seperti yang diharapkan. Well, except that each row within the array has been assigned its own equation number. Well, kecuali bahwa setiap baris dalam array telah ditetapkan nomor persamaan sendiri. Whilst this feature is useful in some instances, it is not required here --- just the one number will do! Meskipun fitur ini berguna dalam beberapa kasus, tidak diperlukan di sini --- hanya satu nomor akan lakukan! To suppress equation numbers for a given row, add a \nonumber command just before the end of row command ( \\ ). Untuk menekan nomor persamaan untuk suatu baris, ajukan \ nonumber perintah sebelum akhir baris perintah (\ \).
\begin{eqnarray} \ begin (eqnarray)
  10xy^2+15x^2y-5xy & = & 5\left(2xy^2+3x^2y-xy\right) \nonumber \\ 10xy ^ 2 +15 x ^ 2y-5xy & = & 5 \ left (2xy ^ 2 +3 x ^ 2y-xy \ right) \ nonumber \ \
   & = & 5x\left(2y^2+3xy-y\right) \nonumber \\ & = & 5x \ left (2y ^ 2 +3 xy-y \ right) \ nonumber \ \
   & = & 5xy\left(2y+3x-1\right) & = & 5xy \ left (2y 3 x-1 \ right)
\end{eqnarray} \ end (eqnarray) 
Multi-line eqnarray persamaan menggunakan paket, tanpa semua angka 
persamaan.
If you don't care for equation number at all, then rather than adding \\nonumber to every row, use the starred version of the environment, ie, \begin{equarray*} ... Jika Anda tidak peduli untuk nomor persamaan sama sekali, maka daripada menambahkan \ \ nonumber untuk setiap baris, gunakan versi membintangi lingkungan, yaitu, \ begin (equarray *) ... \end{equarray*} . \ end (equarray *).
NB There is a limit of 3 columns in the eqnarray environment. If you need anymore flexibility, you are best advised to seek the AMS Maths packages. NB Ada batasan dari 3 kolom dalam lingkungan eqnarray. Jika Anda perlu lagi fleksibilitas, Anda disarankan untuk mencari terbaik AMS paket Matematika.

Breaking up long equations Putus persamaan panjang

Let us first see an example of a long equation. Mari kita lihat contoh persamaan panjang. (Note, when you view the example document for this topic, you will see that this equation is in fact wider than the text width. It's not as obvious on this webpage!) (Catatan, bila Anda melihat contoh dokumen untuk topik ini, anda akan melihat bahwa persamaan ini pada kenyataannya lebih lebar dari lebar teks. Ini tidak sejelas pada halaman web ini!)
Contoh persamaan panjang Latex doesn't break long equations to make them fit within the margins as it does with normal text. Lateks tidak membatalkan persamaan lama untuk membuat mereka cocok dalam marjin seperti halnya dengan teks biasa. It is therefore up to you to format the equation appropriately (if they overrun the margin.) This typically requires some creative use of an eqnarray to get elements shifted to a new line and to align nicely. Oleh karena itu, terserah Anda untuk memformat persamaan dengan tepat (jika mereka menyerbu margin.) Hal ini biasanya memerlukan beberapa penggunaan kreatif untuk mendapatkan unsur-unsur eqnarray dialihkan ke jalur baru dan untuk menyelaraskan dengan baik. Eg, Misalnya
\begin{eqnarray*} \ begin (eqnarray *)
  \left(1+x\right)^n & = & 1 + nx + \frac{n\left(n-1\right)}{2!}x^2 \\ \ left (1 + x \ right) ^ n & = & 1 + nx + \ frac (n \ left (n-1 \ right)) (2!) x ^ 2 \ \
  & & + \frac{n\left(n-1\right)\left(n-2\right)}{3!}x^3 \\ & & + \ Frac (n \ left (n-1 \ right) \ left (n-2 \ right)) (3!) X ^ 3 \ \
  & & + \frac{n\left(n-1\right)\left(n-2\right)\left(n-3\right)}{4!}x^4 \\ & & + \ Frac (n \ left (n-1 \ right) \ left (n-2 \ right) \ left (n-3 \ right)) (4!) X ^ 4 \ \
  & & + \ldots & & + \ Ldots
\end{eqnarray*} \ end (eqnarray *) 
Contoh dari persamaan lama putus dengan eqnarray
It may just be that I'm more sensitive to these kind of things, but you may notice that from the 2nd line onwards, the space between the initial plus sign and the subsequent fraction is (slightly) smaller than normal. (Observe the first line, for example.) This is due to the fact that Latex deals with the + and - signs in two possible ways. Mungkin saja bahwa aku lebih peka terhadap hal-hal semacam ini, tetapi Anda mungkin menyadari bahwa dari baris ke-2 dan seterusnya, ruang antara tanda plus awal dan fraksi berikutnya adalah (sedikit) lebih kecil dari biasanya. (Patuhi pertama baris, misalnya.) Hal ini disebabkan oleh fakta bahwa Lateks berhubungan dengan + dan - tanda-tanda dalam dua kemungkinan cara. The most common is as a binary operator. Yang paling umum adalah sebagai operator biner. When two maths elements appear either side of the sign, it is assumed to be a binary operator, and as such, allocates some space either side of the sign. Ketika dua elemen matematika muncul kedua sisi tanda, diasumsikan untuk menjadi operator biner, dan karena itu, mengalokasikan beberapa ruang kedua sisi tanda. The alternative way is a sign designation. Cara alternatif adalah tanda penunjukan. This is when you state whether a mathematical quantity is either positive or negative. Ini adalah ketika Anda menyatakan apakah kuantitas matematis positif atau negatif. This is common for the latter, as in maths, such elements are assumed to be positive unless a - is prefixed to it. Hal ini biasa terjadi untuk yang kedua, seperti dalam matematika, elemen-elemen seperti diasumsikan positif kecuali - ini diawali untuk itu. In this instance, you want the sign to appear close to the appropriate element to show their association. Dalam contoh ini, Anda ingin tanda muncul dekat dengan elemen yang tepat untuk menunjukkan asosiasi. It is this interpretation that Latex has opted for in the above example. Penafsiran inilah yang Lateks telah memilih untuk dalam contoh di atas.
To add the correct amount of space, you can add an invisible character using {} , as illustrated here: Untuk menambahkan jumlah ruang yang benar, Anda dapat menambahkan karakter yang tak terlihat menggunakan (), seperti yang digambarkan di sini:
\begin{eqnarray*} \ begin (eqnarray *)
  \left(1+x\right)^n & = & 1 + nx + \frac{n\left(n-1\right)}{2!}x^2 \\ \ left (1 + x \ right) ^ n & = & 1 + nx + \ frac (n \ left (n-1 \ right)) (2!) x ^ 2 \ \
  & & {} + \frac{n\left(n-1\right)\left(n-2\right)}{3!}x^3 \\ & & () + \ Frac (n \ left (n-1 \ right) \ left (n-2 \ right)) (3!) X ^ 3 \ \
  & & {} + \frac{n\left(n-1\right)\left(n-2\right)\left(n-3\right)}{4!}x^4 \\ & & () + \ Frac (n \ left (n-1 \ right) \ left (n-2 \ right) \ left (n-3 \ right)) (4!) X ^ 4 \ \
  & & {} + \ldots & & () + \ Ldots
\end{eqnarray*} \ end (eqnarray *) 
Menggunakan ruang yang tak terlihat.
Alternatively, you could avoid this issue altogether by leaving the + at the end of the previous line rather at the beginning of the current line: Atau, Anda bisa menghindari masalah ini sama sekali dengan meninggalkan + di akhir baris sebelumnya lebih pada awal baris saat ini:
Broken persamaan, dengan + di akhir setiap baris. There is another convention of writing long equations that Latex supports. Ada konvensi lain menulis persamaan yang panjang Lateks mendukung. This is the way I see long equations typeset in books and articles, and admittedly is my preferred way of displaying them. Sticking with the eqnarray approach, using the \lefteqn{...} command around the content before the = sign gives the following result: Ini adalah cara saya melihat persamaan mengeset panjang dalam buku-buku dan artikel, dan diakui adalah cara yang saya sukai menampilkan mereka. Eqnarray Perekat dengan pendekatan, dengan menggunakan \ lefteqn {...} perintah di isi sebelum tanda = memberikan berikut Hasilnya:
\begin{eqnarray*} \ begin (eqnarray *)
  \lefteqn{\left(1+x\right)^n = } \\ \ lefteqn (\ left (1 + x \ right) ^ n =) \ \
  & & 1 + nx + \frac{n\left(n-1\right)}{2!}x^2 + \\ & & 1 + nx + \ frac (n \ left (n-1 \ right)) (2!) X ^ 2 + \ \
  & & \frac{n\left(n-1\right)\left(n-2\right)}{3!}x^3 + \\ & & \ Frac (n \ left (n-1 \ right) \ left (n-2 \ right)) (3!) X ^ 3 + \ \
  & & \frac{n\left(n-1\right)\left(n-2\right)\left(n-3\right)}{4!}x^4 + \\ & & \ Frac (n \ left (n-1 \ right) \ left (n-2 \ right) \ left (n-3 \ right)) (4!) X ^ 4 + \ \
  & & \ldots & & \ Ldots
\end{eqnarray*} \ end (eqnarray *) 
Menggunakan perintah lefteqn
Notice that the first line of the eqnarray contains the \lefteqn only. Perhatikan bahwa baris pertama berisi eqnarray \ lefteqn saja. And within this command, there are no column separators ( & ). Dan dalam perintah ini, tidak ada kolom pemisah (&). The reason this command displays things as it does is because the \lefteqn prints the argument, however, tells Latex that the width is zero. Alasan perintah ini menampilkan hal-hal seperti itu dilakukan adalah karena \ lefteqn mencetak argumen, bagaimanapun, mengatakan Lateks yang luasnya adalah nol. This results in the first column being empty, with the exception of the inter-column space, which is what gives the subsequent lines their indentation. Hal ini mengakibatkan kolom pertama yang kosong, dengan pengecualian pada kolom antar ruang, yang memang memberikan garis berikutnya lekukan mereka.

Controlling horizontal spacing Pengendalian jarak horisontal

Latex is obviously pretty good at typesetting maths --- it was one of the chief aims of the core Tex system that Latex extends. Lateks jelas cukup bagus di matematika typesetting --- itu adalah salah satu tujuan utama dari inti sistem yang Tex Latex meluas. However, it can't always be relied upon to accurately interpret formulae in the way you did. Namun, tidak selalu dapat diandalkan untuk menafsirkan secara akurat formula dalam cara yang Anda lakukan. It has to make certain assumptions when there are ambiguous expressions. Hal ini untuk membuat asumsi tertentu ketika ada ekspresi ambigu. The result tends to be slightly incorrect horizontal spacing. Hasilnya cenderung sedikit salah spasi horisontal. In these events, the output is still satisfactory, yet, any perfectionists will no doubt wish to fine-tune their formulae to ensure spacing is correct. Dalam peristiwa ini, output masih memuaskan, namun, setiap perfeksionis akan tidak diragukan lagi ingin menyempurnakan rumus mereka untuk memastikan jarak sudah benar. These are generally very subtle adjustments. Ini biasanya sangat halus penyesuaian.
There are other occasions where Latex has done its job correctly, but you just want to add some space, maybe to add a comment of some kind. Ada kesempatan lain di mana Lateks telah melakukan tugasnya dengan benar, tetapi Anda hanya ingin menambahkan beberapa ruang, mungkin untuk menambahkan komentar semacam. For example, in the following equation, it is preferable to ensure there is a decent amount of space between the maths and the text. Sebagai contoh, dalam persamaan berikut, lebih disukai untuk memastikan ada cukup banyak ruang antara matematika dan teks.
\[f(n) = \left\{ \ [f (n) = \ left \ ( 
\begin{array}{ll} \ begin (array) (II)
  n/2 & \quad \mbox{if $n$ is even}\\ n / 2 & \ quad \ mbox (if $ n $ adalah bahkan) \ \
  -(n+1)/2 & \quad \mbox{if $n$ is odd}\\ \end{array} \right. - (n +1) / 2 & \ quad \ mbox (if $ n $ ganjil) \ \ \ end (array) \ right. \] \] 
Contoh di mana Anda membutuhkan ruang besar dalam ekspresi
Latex has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. Lateks telah mendefinisikan dua perintah yang dapat digunakan di mana saja dalam dokumen (bukan hanya matematika) untuk memasukkan beberapa ruang horisontal. They are \quad and \qquad Mereka adalah \ quad dan \ qquad
A \quad is a space equal to the current font size. A \ quad adalah sebuah ruang yang sama dengan ukuran font saat ini. So, if you are using an 11pt font, then the space provided by \quad will also be 11pt (horizontally, of course.) The \qquad gives twice that amount. Jadi, jika Anda menggunakan font 11pt, maka ruang yang disediakan oleh \ quad juga akan 11pt (horisontal, tentu saja.) The \ qquad memberi dua kali lipat jumlah itu. As you can see from the code from the above example, \quad s were used to add some separation between the maths and the text. Seperti yang dapat Anda lihat dari kode dari contoh di atas, \ quad s digunakan untuk menambahkan beberapa pemisahan antara matematika dan teks.
OK, so back to the fine tuning as mentioned at the beginning of the document. Oke, kembali ke fine tuning seperti yang disebutkan pada awal dokumen. A good example would be displaying the simple equation for the indefinite integral of y with respect to x : Sebuah contoh yang baik akan menampilkan persamaan sederhana untuk waktu yang tidak terbatas integral dari y terhadap x:
Rumus integral yang tak terbatas If you were to try this, you may write: Jika Anda mencoba ini, Anda dapat menulis:
\begin{verbatim} \ begin (verbatim)
\[ \int y \mathrm{d}x \] \ [\ Int y \ mathrm (d) x \]
\end{verbatim} \ end (verbatim) 
Integral yang tak terbatas dengan spasi yang tidak tepat.
However, this doesn't give the correct result. Namun, hal ini tidak memberikan hasil yang benar. Latex doesn't respect the whitespace left in the code to signify that the y and the d x are independent entities. Lateks tidak menghormati spasi yang tersisa di kode untuk menandakan bahwa y dan d x adalah entitas independen. Instead, it lumps them altogether. Sebaliknya, gumpalan mereka sama sekali. A \quad would clearly be overkill is this situation --- what is needed are some small spaces to be utilised in this type of instance, and that's what Latex provides: A \ quad jelas akan memerlukan banyak usaha keras adalah situasi ini --- apa yang diperlukan adalah beberapa ruang kecil untuk digunakan dalam jenis ini misalnya, dan itulah yang Lateks menyediakan:
Command Command Description Deskripsi Size Ukuran
\, \ small space ruang kecil 3/18 of a quad 3 / 18 dari sebuah quad
\: \: medium space ruang media 4/18 of a quad 4 / 18 dari sebuah quad
\; \; large space ruang besar 5/18 of a quad 5 / 18 dari sebuah quad
\! \! negative space ruang negatif -3/18 of a quad -3/18 Dari sebuah quad
NB you can use more than one command in a sequence to achieve a greater space if necessary. NB Anda dapat menggunakan lebih dari satu perintah secara berurutan untuk mencapai ruang yang lebih besar jika perlu.
So, to rectify the current problem: Jadi, untuk memperbaiki masalah saat ini:
\int y\, \mathrm{d}x \ int y \, \ mathrm (d) x Integral tak terbatas ruang kecil
\int y\: \mathrm{d}x \ int y \: \ mathrm (d) x Integral tak terbatas dengan ruang media
\int y\; \mathrm{d}x \ int y \; \ mathrm (d) x Integral tak terbatas dengan ruang besar
The negative space may seem like an odd thing to use, however, it wouldn't be there if it didn't have some use! Ruang negatif mungkin tampak seperti hal yang aneh untuk digunakan, bagaimanapun, itu tidak akan ada jika tidak memiliki beberapa menggunakan! Take the following example: Ambil contoh berikut:
Formula untuk koefisien binomial dengan terlalu banyak ruang 
(secara default) The matrix-like expression for representing binomial coefficients is too padded. Matriks-seperti persamaan untuk mewakili koefisien binomial terlalu empuk. There is too much space between the brackets and the actual contents within. Ada terlalu banyak ruang di antara tanda kurung dan isi yang sebenarnya dalam. This can easily be corrected by adding a few negative spaces after the left bracket and before the right bracket. Hal ini dapat dengan mudah diperbaiki dengan menambahkan beberapa spasi negatif setelah braket kiri dan kanan sebelum braket.
\[\left(\!\!\! \ [\ left (\! \! \!
  \begin{array}{c} \ begin (array) (c)
    n \\ n \ \
    r r
  \end{array} \ end (array)
  \!\!\!\right) = {^n}C_r = \frac{n!}{r!(nr)!} \! \! \! \ right) = (^ n) C_r = \ frac (n!) (r! (nr)!)
\] \] 
Formula untuk koefisien binomial dengan pengurangan ruang

Introduction to AMS maths Pengenalan AMS matematika

This section is still under development. Bagian ini masih dalam pengembangan.

Summary Ringkasan

As you can begin to see, typesetting maths can be tricky at times. Ketika Anda dapat mulai melihat, typesetting matematika bisa rumit di kali. However, because Latex provides so much control, you can get professional quality mathematics typesetting for relatively little effort (once you've had a bit of practise, of course!). Namun, karena Lateks menyediakan begitu banyak kontrol, Anda bisa mendapatkan kualitas profesional matematika typesetting untuk usaha yang relatif kecil (setelah Anda memiliki sedikit berlatih, tentu saja!). It would be possible to keep going and going with maths topics because it seems potentially limitless. Akan mungkin untuk terus dan pergi dengan topik matematika karena berpotensi tampaknya terbatas. However, with these two tutorials, you should be able to get along sufficiently. Namun, dengan dua tutorial, Anda harus bisa bergaul cukup.

Tidak ada komentar:

Posting Komentar

Previous Next Home