Anda di halaman 1dari 28

A Template LTEX Bahasa Indonesia

Hayi Nukman

cb

Kata Pengantar

Ini adalah template yang saya buat dari dari kumpulan beberapa template yang saya dapatkan di internet. Untuk beberapa konfigurasi seperti Style Section yang diberi kotak sumbernya saya sudah lupa (soalnya sudah lama) sehingga mohon maaf jika sumbernya tidak saya sertakan. Dokumen ini dikompilasi dengan XeLatex atau Texlive, dengan menggunakan Editor Gummi untuk mempermudah saya dalam A menanggulangi error dalam penulisan syntax LTEX. Bagi yang berminat untuk mengembangkan lebih lanjut, atau membuat template versinya sendiri, silahkan saja didownload dan digunakan. Dokumen ini berlisesi CC-BY, dimana anda bebas untuk mengcopy, mengembangkan dan mendistribusikannya baik secara komersial maupun tidak.

Daftar Isi

A Mengenal LTEX

1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 3 3 4 4 4 5 5 5 5 6

1 Programming A 1.1 Gambar dalam LTEX . . . . . . 1.2 Sourcecode . . . . . . . . . . 1.2.1 Verbatim Environment 1.2.2 Listing Environment . . 1.2.3 Verbatim full Color . . . 1.3 Algoritma dan Pseudocode . . 1.3.1 If - Else . . . . . . . . . 1.3.2 For loop . . . . . . . . . 1.3.3 While Loop . . . . . . . 1.3.4 Return Variable . . . . 1.3.5 Blok Algoritma . . . . . 1.3.6 INFO . . . . . . . . . .

II

Scientific

8
9 9 9

2 Grafik 2.1 Grafik dengan TikZ . . . . . . . . . . . . . . . . . . . 2.1.1 Grafik Sederhana . . . . . . . . . . . . . . . . ii

Hayi Nukman

A (2012), LTEXTemplate

2.1.2 Grafik 3 Dimensi . . . . . 2.1.3 Beberapa Contoh lainnya 2.1.4 Info detail . . . . . . . . 2.2 Grafik dengan Paket XY . . . . 2.2.1 Contoh 1 . . . . . . . . . 2.2.2 Contoh 2 . . . . . . . . . 2.2.3 Contoh 3 . . . . . . . . . 2.2.4 Info . . . . . . . . . . . . 3 Matematika 3.1 Matematika . . . . . . . . 3.1.1 Equation . . . . . . 3.1.2 Akar . . . . . . . . . 3.1.3 SUM . . . . . . . . . 3.1.4 Integral . . . . . . . 3.1.5 Fungsi . . . . . . . . 3.2 Penggunaan lebih lanjut di 3.2.1 Beberapa Contoh .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

10 11 13 13 13 13 14 14 15 15 15 15 16 16 16 17 17 19 19 19 22 22 22

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Matematika . . . . . . . .

4 Kimia 4.1 Grafik Kimia . . . . . . . . . . . . . . . . . . . . . . . 4.2 ION . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lampiran A Contoh Lampiran A.1 Konversi byte Array ke Bitmap . . . . . . . . . . . .

iii

BAGIAN I
A Mengenal L TEX

BAB

Programming

A 1.1 Gambar dalam L TEX

Gambar 1.1: Contoh Gambar Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.

Hayi Nukman

A (2012), LTEXTemplate

1.2 Sourcecode

1.2.1
13 14 15 16 17

Verbatim Environment
<RadioGroup android:id=@+id/radioGroup1 android:layout_width=match_parent android:layout_height=wrap_content >

1.2.2

1 2 3 4 5 6 7 8 9 10 11 12

Listing Environment

package lab.andro.tes; public class Sample { private String sample; public Sample(String sample) { this.sample = sample; } public String getSample() { return sample; }

Sample

1.2.3
1 2 3 4 5 6 7

Verbatim full Color


<TextView android:id=@+id/textView1 android:layout_width=wrap_content android:layout_height=wrap_content android:text=Nilai /> <RadioGroup android:id=@+id/radioGroup1

Hayi Nukman

A (2012), LTEXTemplate

8 9

android:layout_width=match_parent android:layout_height=wrap_content >

Untuk ketiga bagian di atas, slihakan baca source latex dari dokumen ini.

1.3 Algoritma dan Pseudocode

1.3.1

If - Else

if i maxval then i0 else if i + k maxval then ii+k end if end if


1 2 3 4 5 6 7 8 9

\begin{algorithmic} \If {$i\geq maxval$} \State $i\gets 0$ \Else \If {$i+k\leq maxval$} \State $i\gets i+k$ \EndIf \EndIf \end{algorithmic}

1.3.2

For loop

for i = 1 10 do ii+1 end for


1 2 3 4 5

\begin{algorithmic} \For{$i = 1 \to 10$} \State $i \gets i + 1$ \EndFor \end{algorithmic}

Hayi Nukman

A (2012), LTEXTemplate

1.3.3

While Loop

while i 10 do i=i+1; end while


1 2 3 4 5

\begin{algorithmic} \While{$i \leq 10$} \State i=i+1; \EndWhile \end{algorithmic}

1.3.4

Return Variable

function Increment(a) aa+1 return a end function


1 2 3 4 5 6

\begin{algorithmic} \Function{Increment}{$a$} \State $a \gets a+1$ \State \Return $a$ \EndFunction \end{algorithmic}

1.3.5

Blok Algoritma

Start Start Start One(x) Ending Start Unknown(0) Until (True) End Start End End
1 2

\algblock[Name]{Start}{End} \algblockdefx[NAME]{START}{END}%

Hayi Nukman

A (2012), LTEXTemplate

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

[2][Unknown]{Start #1(#2)}% {Ending} \algblockdefx[NAME]{}{OTHEREND}% [1]{Until (#1)} \begin{algorithmic} \Start \Start \START[One]{x} \END \START{0} \OTHEREND{\texttt{True}} \End \Start \End \End \end{algorithmic}

1.3.6

INFO

Untuk Algoritma dan Pseudocode, dapat anda baca detailnya beserta contoh-contohnya di: http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode

Halaman Kosong

BAGIAN II Scientific

BAB

Grafik

2.1 Grafik dengan TikZ

2.1.1

Grafik Sederhana
6 5 4 1

2 3
1 2 3 4 5 6 7 8 9 10

\begin{tikzpicture} [scale=.8,auto=left,every node/.style={circle,fill=blue!20}] \node (n6) at (1,10) {6}; \node (n4) at (4,8) {4}; \node (n5) at (8,9) {5}; \node .(n1) at (11,8) {1}; \node (n2) at (9,6) {2}; \node (n3) at (5,5) {3}; \foreach \from/\to in {n6/n4,n4/n5,n5/n1,n1/n2,n2/n5,n2/n3,n3/n4}

Hayi Nukman

A (2012), LTEXTemplate

11 12 13

\draw (\from) -- (\to); \end{tikzpicture}

2.1.2

Grafik 3 Dimensi
.

.
. .

1 2 3 4 5 6 7 8 9 10 11 12

\usetikzlibrary{calc,3d} \newcommand{\setxyz}[1]{% \pgfmathsetmacro{\xone}{cos(180+#1)}% \pgfmathsetmacro{\yone}{sin(180+#1)}% \pgfmathsetmacro{\xtwo}{cos(360-#1)}% \pgfmathsetmacro{\ytwo}{sin(360-#1)}% } \setxyz{17} \begin{tikzpicture}% [x = {(\xone cm,\yone cm)}, y = {(\xtwo cm,\ytwo cm)}, z = {(0cm,1cm)}]

10

Hayi Nukman

A (2012), LTEXTemplate

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

\GraphInit[vstyle=Shade] \SetVertexNoLabel \begin{scope}[canvas is xy plane at z=-5] \Vertex{x} \end{scope} \begin{scope}[canvas is xy plane at z=0] \grEmptyCycle[prefix=a]{5} \end{scope} \EdgeFromOneToAll{x}{a}{}{5} \Edges(a0,a1,a2,a3,a4,a0) \begin{scope}[canvas is xy plane at z=5] \Vertex{y} \end{scope} \EdgeFromOneToAll{y}{a}{}{5} \end{tikzpicture}

2.1.3

Beberapa Contoh lainnya


. .

.
.

1 2 3 4 5 6

\begin{tikzpicture} \usepgflibrary{arrows} \GraphInit[vstyle=Art] \SetUpEdge[style={->,>=angle 45,bend right=10},color=blue] \grCirculant[RA=3]{9}{1,-2,3,-4} \end{tikzpicture}

11

Hayi Nukman

A (2012), LTEXTemplate

1 2 3 4 5

\begin{tikzpicture} \draw (-1,0) to[bend left] (1,0); \draw (-1.2,.1) to[bend right] (1.2,.1); \draw[rotate=0] (0,0) ellipse (100pt and 50pt); \end{tikzpicture}

1
1 2

sin . 1 1 2 1 2 1 cos 1

1 2 3 4 5 6 7 8 9 10 11

\begin{tikzpicture}[scale=3] \draw[step=.5cm, gray, very thin] (-1.2,-1.2) grid (1.2,1.2); \filldraw[fill=green!20,draw=green!50!black] (0,0) -- (3mm,0mm) arc (0:30:3mm) -- cycle; \draw[->] (-1.25,0) -- (1.25,0) coordinate (x axis); \draw[->] (0,-1.25) -- (0,1.25) coordinate (y axis); \draw (0,0) circle (1cm); \draw[very thick,red] (30:1cm) -- node[left,fill=white] {$\sin \alpha$} (30:1cm |- x axis); \draw[very thick,blue] (30:1cm |- x axis) -- node

12

Hayi Nukman

A (2012), LTEXTemplate

12 13 14 15 16 17 18 19 20 21

[below=2pt,fill=white] {$\cos \alpha$} (0,0); \draw (0,0) -- (30:1cm); \foreach \x/\xtext in {-1, -0.5/-\frac{1}{2}, 1} \draw (\x cm,1pt) -- (\x cm,-1pt) node [anchor=north,fill=white] {$\xtext$}; \foreach \y/\ytext in {-1, -0.5/-\frac{1}{2}, 0.5/\frac{1}{2}, 1} \draw (1pt,\y cm) -- (-1pt,\y cm) node [anchor=east,fill=white] {$\ytext$}; \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 1
A O Do
/B 

1 2 3 4

\begin{displaymath} \xymatrix{ A \ar[r] & B \ar[d] \\ D \ar[u] & C \ar[l] } \end{displaymath}

2.2.2

Contoh 2
A @ PP P B
@@ PPP @@ PPP @@ PPP @ PPP  '

13

Hayi Nukman

A (2012), LTEXTemplate

1 2 3 4 5 6

\begin{displaymath} \xymatrix{ A \ar[d] \ar[dr] \ar[drr] & & \\ B & C & D } \end{displaymath}

2.2.3

Contoh 3
A
g f

/B  /C
g

D
1 2 3 4 5

\begin{displaymath} \xymatrix{ A \ar[r]|f \ar[d]|g & B \ar[d]|{g} \\ D \ar[r]|{f} & C } \end{displaymath}

2.2.4

Info

Lebih detail bagaimana cara menggunakan serta contoh-contoh lainnya dapat dilihat di: http://en.wikibooks.org/wiki/LaTeX/Xypic

14

BAB

Matematika

3.1 Matematika

3.1.1

Equation
x = a0 + a1 + a2 + 1 1 1 a3 + a4 (3.1)

1 2 3 4 5

\begin{equation} x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + a_4}}} \end{equation}

3.1.2

Akar

a b

1 2 3

\[ \sqrt{\frac{a}{b}} \]

15

Hayi Nukman

A (2012), LTEXTemplate

Atau n 1 + x + x2 + x3 + . . .
1 2 3

\[ \sqrt[n]{1+x+x^2+x^3+\ldots} \]

3.1.3

SUM
10 i=1

t2 i

1 2 3

\[ \sum_{i=1}^{10} t_i ^2 \]

3.1.4

Integral

ex dx

1 2 3

\[ \int_0^\infty e^{-x}\,\mathrm{d}x \]

3.1.5

Fungsi
f (n) =

n/2 (n + 1)/2

if n is even if n is odd

1 2 3 4 5 6 7

\[ f(n) = \left\{ \begin{array}{l l} n/2 & \quad \text{if $n$ is even}\\ -(n+1)/2 & \quad \text{if $n$ is odd}\\ \end{array} \right. \]

16

Hayi Nukman

A (2012), LTEXTemplate

Serta masih banyak lagi yang lainnya. Detail lengkap silahkan buka http://en.wikibooks.org/wiki/LaTeX/Mathematics.

3.2 Penggunaan lebih lanjut di Matematika

3.2.1

Beberapa Contoh

Diambil dari: http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics ex 1 [ 0 ] ex 1 0 lim = lim = x0 x0 2 2x H 2


1 2 3 4 5

\[ \lim_{x\to 0}{\frac{e^x-1}{2x}} \overset{\left[\frac{0}{0}\right]}{\underset{\mathrm{H}}{=}} \lim_{x\to 0}{\frac{e^x}{2}}={\frac{1}{2}} \]


complex number

z= x +
real

iy
imaginary

1 2 3 4 5 6

\[ z = \overbrace{ \underbrace{x}_\text{real} + \underbrace{iy}_\text{imaginary} }^\text{complex number} \]

complex number

z= x +
real

iy
imaginary

1 2

\[ z = \overbracket[3pt]{

17

Hayi Nukman

A (2012), LTEXTemplate

3 4 5 6

\underbracket{x}_{\text{real}} + \underbracket[0.5pt][7pt]{iy}_{\text{imaginary}} }^{\text{complex number}} \]

A B C
or that way
1 2 3 4

this way

\[ A \xleftarrow{\text{this way}} B \xrightarrow[\text{or that way}]{} C \]

Serta masih banyak lagi yang lainnya.

18

BAB

Kimia

4.1 Grafik Kimia


E F A . B
1

D C

\chemfig{A*6(-B-C-D-E-F-)}

\chemfig{*6(=-=-=-)}

4.2 ION
O . O 19

Hayi Nukman

A (2012), LTEXTemplate

\chemfig{-(-[1]O^{-})=[7]O}

O . N O
1 2

\chemfig{-\chemabove{N}{\scriptstyle\oplus} (=[1]O)-[7]O^{\ominus}}

20

Lampiran

21

Lampiran

Contoh Lampiran

A.1 Konversi byte Array ke Bitmap

1 2 3

Source:[2]
byte[] albumArt = mediaRetriever.getEmbeddedPicture(); if (albumArt != null) { Bitmap artwork = BitmapFactory.decodeByteArray( albumArt, 0, albumArt.length); imageView.setImageBitmap(artwork); }

4 5 6

Konversi byte Array ke Bitmap Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci 22

Hayi Nukman

A (2012), LTEXTemplate

sit amet orci dignissim rutrum. Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris.

23

Bibliography

A [1] Wikibook LTEX http://en.wikibooks.org/wiki/LaTeX

[2] byte[] to Image Android http://stackoverflow.com/questions/2714700/byte-toimage-android [3] Graph Theory in LaTeX http://graphtheoryinlatex.blogspot.com/

24

Anda mungkin juga menyukai