Template Latex: Buku

download Template Latex: Buku

of 28

  • date post

    13-May-2015
  • Category

    Education

  • view

    861
  • download

    14

Embed Size (px)

description

Preview Template Latex Buku. File source Latexnya dapat di download di: http://www.mediafire.com/?whzovex4kbopemq

Transcript of Template Latex: Buku

  • 1.Template LTEXABahasaIndonesia Hayi Nukmancb

2. Kata PengantarIni adalah template yang saya buat dari dari kumpulan beber-apa template yang saya dapatkan di internet. Untuk beberapakonfigurasi seperti Style Section yang diberi kotak sumbernyasaya sudah lupa (soalnya sudah lama) sehingga mohon maafjika sumbernya tidak saya sertakan.Dokumen ini dikompilasi dengan XeLatex atau Texlive, denganmenggunakan Editor Gummi untuk mempermudah saya dalammenanggulangi error dalam penulisan syntax LTEX. Bagi yang Aberminat untuk mengembangkan lebih lanjut, atau membuattemplate versinya sendiri, silahkan saja didownload dan digu-nakan. Dokumen ini berlisesi CC-BY, dimana anda bebas untukmengcopy, mengembangkan dan mendistribusikannya baik se-cara komersial maupun tidak.i 3. Daftar IsiIMengenal LTEXA 11 Programming 21.1 Gambar dalam LTEX . . . . . . A. . . . . . . . . . . . . 21.2 Sourcecode . . . . . . . . . .. . . . . . . . . . . . . 31.2.1 Verbatim Environment. . . . . . . . . . . . . 31.2.2 Listing Environment . . . . . . . . . . . . . . . 31.2.3 Verbatim full Color . . . . . . . . . . . . . . . . 41.3 Algoritma dan Pseudocode . .. . . . . . . . . . . . . 41.3.1 If - Else . . . . . . . . . . . . . . . . . . . . . . 41.3.2 For loop . . . . . . . . .. . . . . . . . . . . . . 51.3.3 While Loop . . . . . . .. . . . . . . . . . . . . 51.3.4 Return Variable . . . . . . . . . . . . . . . . . 51.3.5 Blok Algoritma . . . . .. . . . . . . . . . . . . 51.3.6 INFO . . . . . . . . . .. . . . . . . . . . . . . 6II Scientific 82 Grafik92.1 Grafik dengan TikZ . . . . . . . . . . . . . . . . . . .92.1.1 Grafik Sederhana . . . . . . . . . . . . . . . .9 ii 4. Hayi Nukman A(2012), LTEXTemplate 2.1.2 Grafik 3 Dimensi . . . . . . . . . . . . . . . . . 10 2.1.3 Beberapa Contoh lainnya. . . . . . . . . . . . 11 2.1.4 Info detail . . . . . . . .. . . . . . . . . . . . 13 2.2 Grafik dengan Paket XY . . . . . . . . . . . . . . . . 13 2.2.1 Contoh 1 . . . . . . . . . . . . . . . . . . . . . 13 2.2.2 Contoh 2 . . . . . . . . . . . . . . . . . . . . . 13 2.2.3 Contoh 3 . . . . . . . . . . . . . . . . . . . . . 14 2.2.4 Info . . . . . . . . . . . . . . . . . . . . . . . . 143 Matematika153.1 Matematika . . . . . . . .. . . . . . . . . . . . . . . 153.1.1 Equation . . . . . .. . . . . . . . . . . . . . . 153.1.2 Akar . . . . . . . . .. . . . . . . . . . . . . . . 153.1.3 SUM . . . . . . . . . . . . . . . . . . . . . . . . 163.1.4 Integral . . . . . . .. . . . . . . . . . . . . . . 163.1.5 Fungsi . . . . . . . .. . . . . . . . . . . . . . . 163.2 Penggunaan lebih lanjut diMatematika. . . . . . . 173.2.1 Beberapa Contoh . . . . . . . . . . . . . . . . 174 Kimia 194.1 Grafik Kimia . . . . . . . . . . . . . . . . . . . . . . .194.2 ION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Lampiran22A Contoh Lampiran 22A.1 Konversi byte Array ke Bitmap . . . . . . . . . . . . 22iii 5. BAGIAN IMengenal L TEX A1 6. BAB1 Programming1.1 Gambar dalam L TEX AGambar 1.1: Contoh GambarLorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut pu-rus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Cur-abitur dictum gravida mauris. Nam arcu libero, nonummy eget,consectetuer id, vulputate a, magna. Donec vehicula augue euneque. Pellentesque habitant morbi tristique senectus et netus etmalesuada fames ac turpis egestas. Mauris ut leo. Cras viverrametus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultri-ces. Phasellus eu tellus sit amet tortor gravida placerat. Integersapien est, iaculis in, pretium quis, viverra ac, nunc. Praesenteget sem vel leo ultrices bibendum. Aenean faucibus. Morbi do-lor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabiturauctor semper nulla. Donec varius orci eget risus. Duis nibh mi,congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orcisit amet orci dignissim rutrum.2 7. Hayi Nukman A(2012), LTEXTemplate 1.2 Sourcecode 1.2.1 Verbatim Environment 13 17 1.2.2 Listing Environment 1package lab.andro.tes;23public class Sample {4private String sample;56public Sample(String sample) {7this.sample = sample;8}9public String getSample() {10 return sample;11 }12 } Sample 1.2.3 Verbatim full Color 1 6Untuk ketiga bagian di atas, slihakan baca source latex dari doku-men ini.1.3 Algoritma dan Pseudocode1.3.1If - Elseif i maxval theni0elseif i + k maxval thenii+kend ifend if1 begin{algorithmic}2 If {$igeq maxval$}3 State $igets 0$4 Else5 If {$i+kleq maxval$}6 State $igets i+k$7 EndIf8 EndIf9 end{algorithmic}1.3.2For loopfor i = 1 10 do ii+1end for1 begin{algorithmic}2 For{$i = 1 to 10$}3 State $i gets i + 1$4 EndFor5 end{algorithmic}4 9. Hayi Nukman A (2012), LTEXTemplate1.3.3 While Loop while i 10 do i=i+1; end while1begin{algorithmic}2While{$i leq 10$}3State i=i+1;4EndWhile5end{algorithmic}1.3.4 Return Variable function Increment(a)aa+1return a end function1begin{algorithmic}2Function{Increment}{$a$}3State $a gets a+1$4State Return $a$5EndFunction6end{algorithmic}1.3.5 Blok Algoritma Start Start Start One(x) Ending Start Unknown(0) Until (True) End Start End End1algblock[Name]{Start}{End}2algblockdefx[NAME]{START}{END}% 5 10. Hayi Nukman A (2012), LTEXTemplate3[2][Unknown]{Start #1(#2)}%4{Ending}5 algblockdefx[NAME]{}{OTHEREND}%6[1]{Until (#1)}7 begin{algorithmic}8 Start9Start10START[One]{x}11END12START{0}13OTHEREND{texttt{True}}14 End15 Start16 End17End18end{algorithmic} 1.3.6 INFO Untuk Algoritmadan Pseudocode, dapatanda bacadetailnya besertacontoh-contohnya di: http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode 6 11. Halaman Kosong 12. BAGIAN IIScientific8 13. BAB2Grafik 2.1 Grafik dengan TikZ 2.1.1 Grafik Sederhana6 541 231 begin{tikzpicture}2 [scale=.8,auto=left,every node/.style={circle,fill=blue!20}]3 node (n6) at (1,10) {6};4 node (n4) at (4,8) {4};5 node (n5) at (8,9) {5};6 node .(n1) at (11,8) {1};7 node (n2) at (9,6) {2};8 node (n3) at (5,5) {3};910foreach from/to in {n6/n4,n4/n5,n5/n1,n1/n2,n2/n5,n2/n3,n3/n4}9 14. Hayi Nukman A(2012), LTEXTemplate11draw (from) -- (to);1213end{tikzpicture} 2.1.2 Grafik 3 Dimensi. . ... ...1 usetikzlibrary{calc,3d}2 newcommand{setxyz}[1]{%3 pgfmathsetmacro{xone}{cos(180+#1)}%4 pgfmathsetmacro{yone}{sin(180+#1)}%5 pgfmathsetmacro{xtwo}{cos(360-#1)}%6 pgfmathsetmacro{ytwo}{sin(360-#1)}%7 }8 setxyz{17}9 begin{tikzpicture}%10[x = {(xone cm,yone cm)},11y = {(xtwo cm,ytwo cm)},12z = {(0cm,1cm)}]10 15. Hayi NukmanA(2012), LTEXTemplate13GraphInit[vstyle=Shade]14SetVertexNoLabel15begin{scope}[canvas is xy plane at z=-5]16Vertex{x}17end{scope}18begin{scope}[canvas is xy plane at z=0]19grEmptyCycle[prefix=a]{5}20end{scope}21EdgeFromOneToAll{x}{a}{}{5}22Edges(a0,a1,a2,a3,a4,a0)23begin{scope}[canvas is xy plane at z=5]24Vertex{y}25end{scope}26EdgeFromOneToAll{y}{a}{}{5}27end{tikzpicture} 2.1.3 Beberapa Contoh lainnya. .. .. . .. ..1 begin{tikzpicture}2 usepgflibrary{arrows}3 GraphInit[vstyle=Art]4 SetUpEdge[style={->,>=angle 45,bend right=10},color=blue]5 grCirculant[RA=3]{9}{1,-2,3,-4}6 end{tikzpicture} 11 16. Hayi Nukman A (2012), LTEXTemplate .1begin{tikzpicture}2draw (-1,0) to[bend left] (1,0);3draw (-1.2,.1) to[bend right] (1.2,.1);4draw[rotate=0] (0,0) ellipse (100pt and 50pt);5end{tikzpicture} 1 1 2 sin . 11 cos 121 211begin{tikzpicture}[scale=3]2 draw[step=.5cm, gray, very thin] (-1.2,-1.2)3 grid (1.2,1.2);4 filldraw[fill=green!20,draw=green!50!black]5 (0,0) -- (3mm,0mm) arc (0:30:3mm) -- cycle;6 draw[->] (-1.25,0) -- (1.25,0) coordinate (x axis);7 draw[->] (0,-1.25) -- (0,1.25) coordinate (y axis);8 draw (0,0) circle (1cm);9 draw[very thick,red] (30:1cm) -- node[left,fill=white]10{$sin alpha$} (30:1cm |- x axis);11draw[very thick,blue] (30:1cm |- x axis) -- node 12 17. Hayi NukmanA(2012), LTEXTemplate12[below=2pt,fill=white] {$cos alpha$} (0,0);13 draw (0,0) -- (30:1cm);14 foreach x/xtext in {-1, -0.5/-frac{1}{2}, 1}15 draw (x cm,1pt) -- (x cm,-1pt) node16[anchor=north,fill=white] {$xtext$};17 foreach y/ytext in {-1, -0.5/-frac{1}{2},180.5/frac{1}{2}, 1}19 draw (1pt,y cm) -- (-1pt,y cm) node20 [anchor=east,fill=white] {$ytext$};21 end{tikzpicture} 2.1.4 Info detail Info lebih lengkap untuk Grafik menggunakan TikZ ini silahkan akses: http://graphtheoryinlatex.blogspot.com 2.2 Grafik dengan Paket XY 2.2.1 Contoh 1A /BODoC1 begin{displaymath}2 xymatrix{ A ar[r]B ar[d] 3D ar[u]C ar[l] }4 end{displaymath} 2.2.2 Contoh 2PA @ PP @@ PPP @@ PPP @@ PPP@PPPBCD 13 18. Hayi Nukman A(2012), LTEXTemplate1begin{displaymath}2xymatrix{3A ar[d] ar[dr] ar[drr] 4BCD }5end{displaymath}62.2.3Contoh 3A f/Bg g Df /C1begin{displaymath}2xymatrix{3A ar[r]|f ar[d]|gB ar[d]|{g} 4D ar[r]|{f}C }5end{displaymath}2.2.4InfoLebih detail bagaimana cara menggunakan serta contoh-contohlainnya dapat dilihat di: http://en.wikibooks.org/wiki/LaTeX/Xy-pic14 19. BAB 3 Matematika3.1 Matematika3.1.1 Equation1x = a0 +(3.1)1 a1 + 1a2 +a3 + a41begin{equation}2x = a_0 + cfrac{1}{a_13+ cfrac{1}{a_24+ cfrac{1}{a_3 + a_4}}}5end{equation}3.1.2 Akarab1[2sqrt{frac{a}{b}}3] 15 20. Hayi NukmanA(2012), LTEXTemplateAtaun1 + x + x2 + x3 + . . .1[2sqrt[n]{1+x+x^2+x^3+ldots}3]3.1.3 SUM 10 t2i i=11[2 sum_{i=1}^{10} t_i ^23]3.1.4 Integral ex dx 01[2 int_0^infty e^{-x},mathrm{d}x3]3.1.5 Fungsi{n/2 if n is evenf (n) =(n + 1)/2if n is odd1[2 f(n) = left{3 begin{array}{l l}4 n/2quad text{if $n$ is even}5 -(n+1)/2quad text{if $n$ is odd}6 end{array} right.7] 16 21. Hayi NukmanA(2012), LTEXTemplateSerta masih banyak lagi yang lainnya. Detail lengkap silahkanbuka http://en.wikibooks.org/wiki/LaTeX/Mathematics.3.2 Penggunaan lebih lanjut diMatematika3.2.1 Beberapa ContohDiambil dari: http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematicsex 1 [ 0 ] 0 ex 1lim = lim =x0 2x H x0 221[2 lim_{xto 0}{frac{e^x-1}{2x}}3 overset{left[frac{0}{0}right]}{underset{mathrm{H}}{=}}4 lim_{xto 0}{frac{e^x}{2}}={frac{1}{2}}5]complex number z= x +iyrealimaginary1[2 z = overbrace{3underbrace{x}_text{real} +4underbrace{iy}_text{imaginary}5 }^text{complex number}6]complex numberz= x +iyrealimaginary1[2 z = over