Monday, October 27, 2014

Teks dan Bayangannya

Seringkali dapat kita rasakan bahwa suatu teks yang disertai dengan bayangannya tampak sangat menarik ketika dilihat. 
Perhatikan teks "Sebuah harapan Baru" pada gambar di samping ini! Tampak bahwa teks tersebut disertai dengan bayangannya.

Bagaimana cara membuat bayangan teks dalam $\small\LaTeX$?

Untuk hal ini kita memerlukan paket shadowtext dari Yori Zwols. Petunjuk teknisnya dapat Anda pelajari pada dokumen yang terlampir di bawah ini.
Dokumen tersebut saya susun dalam jaringan melalui Online LaTeX Editor ShareLaTeX dengan menggunakan kelas dokumen Beamer Fancyslides dari Pawel Lupkowski.

Adapun tentang bagaimana cara membuat pembesaran objek dari bagian gambar akan dijelaskan pada tulisan lain.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 



Saturday, October 25, 2014

Cancel

Dalam proses pengerjaan hitung Matematika sering ditemukan penyederhanaan dalam bentuk pembagian antara suatu faktor terhadap penyebut suatu pecahan dari faktor lainnya. 
Perhatikan gambar di samping! Bagaimana hal itu dapat dilakukan?

Salah satunya, kita memerlukan paket cancel dari Don­ald Arse­neau. Paket ini digunakan untuk membuat ruas garis diagonal (yaitu untuk "mencoret") dan ruas garis berpanah (yang menunjuk "ke suatu nilai") dalam proses penyederhanaan terhadap perhitungan (operasi pembagian) dalam Matematika.

Paket cancel memiliki empat macam perintah yaitu:

  • \cancel, untuk mencoret berbentuk slash
  • \bcancel, untuk mencoret berbentuk backslash
  • \xcancel, untuk mencoret berbentuk silang (yaitu penggabungan \cancel dan \bcancel sekaligus)
  • \cancelto{}{}, untuk mencoret berbentuk panah

Pewarnaan dibentuk oleh perintah baru:
\renewcommand{\CancelColor}{\color{blue}}
Berikut ini contoh-contoh hasil penggunaan dari keempat perintah tersebut.
Contoh-contoh lainnya:
Perhatikan contoh terakhir, "pencoretan" dengan ruas garis berpanah mengarah ke bawah. Ini memerlukan perintah baru dan untuk itu saya gunakan paket tikz dengan library calc sebagai berikut.
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand*\canc[1]{%
  \mathchoice
    {\scriptstyle#1}
    {\scriptstyle#1}
    {\scriptscriptstyle#1}
    {\scriptscriptstyle#1}
}
\newcommand*\Dcancelto[2][0]{%
  \kern9pt%
  \begin{tikzpicture}[baseline=(current bounding box.center).anchor=west]
    \node[anchor=east,inner sep=2pt] (a) {#2};
    \draw[->,blue] ($(a.north west)+(1pt,-2pt)$) -- ($(a.south east)+(0pt,2pt)$) node at ($(a.south east)+(4pt,1pt)$) {$\canc{#1}$};
\end{tikzpicture}
}
Nah, berikut ini pengkodean selengkapnya untuk semua contoh tersebut di atas. Dokumen ini saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 
\documentclass{scrartcl}
\usepackage{amsmath,concmath}
\usepackage{gentium}
\usepackage{adjustbox}
\usepackage{cancel}
\usepackage[svgnames]{xcolor}
\usepackage[margin=2cm]{geometry}
%----------------------------------------
\usepackage{tikz}
\usetikzlibrary{fadings,patterns}
\usetikzlibrary{calc}
\newcommand*\canc[1]{%
  \mathchoice
    {\scriptstyle#1}
    {\scriptstyle#1}
    {\scriptscriptstyle#1}
    {\scriptscriptstyle#1}
}
\newcommand*\Dcancelto[2][0]{%
  \kern9pt%
  \begin{tikzpicture}[baseline=(current bounding box.center).anchor=west]
    \node[anchor=east,inner sep=2pt] (a) {#2};
    \draw[->,blue] ($(a.north west)+(1pt,-2pt)$) -- ($(a.south east)+(0pt,2pt)$) node at ($(a.south east)+(4pt,1pt)$) {$\canc{#1}$};
\end{tikzpicture}
}
%----------------------------------------
\renewcommand{\CancelColor}{\color{blue}} %change cancel color to blue

\begin{document}

\begin{tikzfadingfrompicture}[name=distress]
\node[text=transparent!0] {\it\Huge\textbf{Penggunaan Paket Cancel}};
\end{tikzfadingfrompicture}
\begin{tikzpicture}
\fill[preaction={fill},pattern color=CadetBlue,pattern=crosshatch dots] (-8,-1) rectangle (8,1);
\fill[pattern color=Khaki,
  pattern=crosshatch,
  path fading=distress,
  fit fading=false
] (-7,-1) rectangle (7,1);
\end{tikzpicture}

\vspace{1cm}
%http://tex.stackexchange.com/questions/107668/how-to-use-cancel-command
\abovedisplayskip=0pt

\adjustbox{valign=t}{\begin{minipage}{0.45\textwidth}
Hasil perintah {\tt\textbackslash cancel}

\[
\frac{a\cancel{b}}{\cancel{b}}=a
\]
    \end{minipage}}%
    \hfill
\adjustbox{valign=t}{\begin{minipage}{0.45\textwidth}
Hasil perintah {\tt\textbackslash bcancel}

\[
\frac{a\bcancel{b}}{\bcancel{b}}=a
\]
    \end{minipage}}%
    \hfill

\bigskip
\adjustbox{valign=t}{\begin{minipage}{0.45\textwidth}
Hasil perintah {\tt\textbackslash xcancel}

\[
\frac{a\xcancel{b}}{\xcancel{b}}=a
\]
    \end{minipage}}%
    \hfill
\adjustbox{valign=t}{\begin{minipage}{0.45\textwidth}
Hasil perintah {\tt\textbackslash cancelto}

\[
\cancel{2}\cdot\frac{9}{\cancelto{2}{4}}=\frac{9}{2}
\]
    \end{minipage}}%
    \hfill

\vspace{1cm}
\adjustbox{valign=t}{\begin{minipage}{0.3\textwidth}
\[\cancel{\text{Ini dicoret}}\]
    \end{minipage}}%
    \hfill
\adjustbox{valign=t}{\begin{minipage}{0.3\textwidth}
\[ \bcancel{\frac{4}{7}\times\frac{3}{4}} \]
    \end{minipage}}%
    \hfill
%http://tex.stackexchange.com/questions/14385/cancel-package-downward-arrow
\adjustbox{valign=t}{\begin{minipage}{0.3\textwidth}
\[ \Dcancelto[3]{18}\cdot\frac{5}{\bcancel{6}}=15 \]
    \end{minipage}}%
    \hfill
    
\vspace{1cm}
\centering
\fbox{\parbox{0.7\textwidth}{\begin{align*}
\lim_{x\to2}\frac{x^2-4}{\sqrt{5x-1}-\sqrt{3x+3}} &= \lim_{x\to2}\frac{(x-2)(x+2)}{5x-1-(3x+3)}\times \frac{2(3)}{1}\\
 &= \lim_{x\to2}\frac{(x-2)(x+2)}{5x-1-3x-3}\times \frac{6}{1}\\
 &= \lim_{x\to2}\frac{(x-2)(x+2)}{2x-4}\times 6\\
 &= \lim_{x\to2}\frac{\cancel{(x-2)}(x+2)}{2\cancel{(x-2)}}\times 6\\
 &= \lim_{x\to2}\frac{x+2}{2}\times 6\\
 &= \frac{2+2}{2}\times 6\\
 &= 12
\end{align*}}}

\end{document}



Sunday, October 5, 2014

Kurva Parametrik #3

Ini adalah tiga contoh terakhir dari kurva parametrik, setelah yang ini dan yang itu. Semuanya saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 







Contoh 7

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[-latex,scale=2.15]

% Draw the lines at multiples of pi/12
\foreach \ang in {0,...,31} {
  \draw [lightgray] (0,0) -- (\ang * 180 / 16:4);
}

% Concentric circles and radius labels
\foreach \s in {0, 1, 2, 3} {
  \draw [lightgray] (0,0) circle (\s + 0.5);
  \draw (0,0) circle (\s);
  \node [fill=white] at (\s, 0) [below] {\scriptsize $\s$};
}

% Add the labels at multiples of pi/4
\foreach \ang/\lab/\dir in {
  0/0/right,
  1/{\pi/4}/{above right},
  2/{\pi/2}/above,
  3/{3\pi/4}/{above left},
  4/{\pi}/left,
  5/{5\pi/4}/{below left},
  7/{7\pi/4}/{below right},
  6/{3\pi/2}/below} {
  \draw (0,0) -- (\ang * 180 / 4:4.1);
  \node [fill=white] at (\ang * 180 / 4:4.2) [\dir] {\scriptsize $\lab$};
}

% The double-lined circle around the whole diagram
\draw [style=double] (0,0) circle (4);

\fill [fill=red!50!black, opacity=0.5] plot [domain=-pi/2:pi/2] (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\draw [thick,color=red,domain=0:2*pi,samples=200,smooth] plot (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\node [fill=white] at (2,1) {$r=2-2\sin\theta$};
\end{tikzpicture} 

\end{document}





Contoh 8

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[-latex,scale=2.15]
\fill [fill=Tomato, opacity=0.75] plot [domain=-pi/2:pi/2] (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\draw [thick,color=Tomato,domain=0:2*pi,samples=200,smooth] plot (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\node [fill=white] at (0,0.75) {\fontsize{.5cm}{1.95cm}\selectfont$r=2-2\sin\theta$};
\end{tikzpicture} 

\end{document}




Contoh 9

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
    \usepgfplotslibrary{polar}
    \usepgfplotslibrary{units}
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
            }}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=2.5]
\begin{axis}[
    domain=-pi/2:pi/2, % The range over which to evaluate the functions
    xtick={-1,...,1}, ytick={-1,...,1}, % Tick marks only on integers between -1 and 1
    axis lines=middle, % Axis lines go through (0,0)
    enlargelimits=true, % Make the axis lines a bit longer than required for the plots
    samples=101, % Number of samples for evaluating the functions (use an odd number to capture the (0,0) point
    xlabel=$x$, ylabel=$y$, % Axis labels
    clip=false % So the labels aren't cut off
]
\addplot [thick, IndianRed]
    ( {sqrt(2) * sin(deg(x))},
      {abs(sin(deg(x*2)))} )
    node [pos=0.8, anchor=south] {$f(x) = |x|\sqrt{2-x^2}$}; % Add a text node at 80% of the plot length
\addplot [thick, SeaGreen]
    ( {sqrt(2) * sin(deg(x))},
      {-abs(sin(deg(x*2)))} )
    node [pos=0.8, anchor=north] {$f(x) = -|x|\sqrt{2-x^2}$};
\end{axis}
\end{tikzpicture}

\end{document}




Kurva Parametrik #2


Melanjutkan contoh-contoh sebelumnyaberikut ini saya tampilkan kembali tiga contoh kurva parametrik lainnya. Semuanya saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 


Contoh 4

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
    \usepgfplotslibrary{polar}
    \usepgfplotslibrary{units}
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
            }}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=2]
   \begin{polaraxis}[grid=none, axis lines=none]
     \addplot[mark=none,domain=0:360,samples=300] {cos(225*x)};
   \end{polaraxis}
\draw node [LemonChiffon] at (3.45,3.45) {\fontsize{.5cm}{1.95cm}\selectfont$\cos 225x$};
 \end{tikzpicture}

\end{document}




Contoh 5

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
    \usepgfplotslibrary{polar}
    \usepgfplotslibrary{units}
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
            }}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=2.25]
\begin{polaraxis}[
axis lines*=none,
ytick=\empty,xlabel=\empty,
axis line style = {draw=white,line width=0.0001pt},
hide y axis,
xticklabel={
\pgfmathparse{\tick/180}
\pgfmathifisint{\pgfmathresult}{$\pgfmathprintnumber[int detect]{\pgfmathresult}\pi$}%
{$\pgfmathprintnumber[frac,frac denom=6,frac whole=false]{\pgfmathresult}\pi$}
}
]
\addplot[IndianRed,thick,mark = none, domain = 0.4:12, samples = 600, data cs = polarrad]{sin(x)};
\end{polaraxis}
\end{tikzpicture}

\end{document}




Contoh 6

\documentclass[a4paper,10pt]{standalone}

\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}

\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
    \usepgfplotslibrary{polar}
    \usepgfplotslibrary{units}
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
            }}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=2.25]
\begin{polaraxis}[enlargelimits=false,
axis lines*=none,xlabel=\empty,
hide y axis,
xticklabel=$\pgfmathprintnumber{\tick}^\circ$]
\addplot[IndianRed,thick,samples=100,
domain=0:360]{0.5 + 0.5*cos(x)};
        %Supercardioid
\end{polaraxis}
\end{tikzpicture}

\end{document}




Kurva Parametrik #1

Dalam matematika, persamaan parametrik dari suatu kurva menyatakan koordinat titik-titik pada kurva itu sebagai fungsi dari suatu variabel, yang disebut parameter. Sebagai contoh, 
\begin{align}
x &= \cos t \\
y &= \sin t
\end{align}
adalah persamaan parametrik untuk lingkaran satuan, di mana $t$ adalah parameter. Secara bersama-sama, kedua persamaan itu disebut representasi parametrik dari kurva tersebut. (wikipedia)

Nah, berikut ini saya tampilkan tiga contoh kurva parametrik. Semuanya saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 




Contoh 1

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.text}
\usetikzlibrary{arrows,intersections,decorations.markings}
\tikzset{
    arrow inside/.style = {
        postaction = {
            decorate,
            decoration={
                markings,
                mark=at position 0.5 with {\arrow{>}}
            }
        }
    }
}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=1.25]
    
\fill [draw=MidnightBlue,fill=none,very thick,
         postaction={decorate,
                     decoration={raise=4pt,
                                 text along path,text color=DarkSlateGray,
text={}
                                }}]
                     plot[thick,domain=-8:8,samples=500]({7*cos(\x r)^3},{7*sin(\x r)^3});
\draw node [Maroon] at (0,0) {\fontsize{.75cm}{1.95cm}\selectfont$\left(7\cos x^3,\ 7\sin x^3\right)$};
\end{tikzpicture}

\end{document}



Contoh 2

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.text}
\usetikzlibrary{arrows,intersections,decorations.markings}
\tikzset{
    arrow inside/.style = {
        postaction = {
            decorate,
            decoration={
                markings,
                mark=at position 0.5 with {\arrow{>}}
            }
        }
    }
}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=1]
    
\fill [draw=MidnightBlue,fill=none,very thick,
         postaction={decorate,
                     decoration={raise=4pt,
                                 text along path,text color=DarkSlateGray,
text={}
                                }}]
                     plot[domain=-2.5:2.5,samples=500]({(\x)^3-3*\x},{3*(\x)^2-16});
\draw node [Maroon] at (0,-1) {\fontsize{.75cm}{1.95cm}\selectfont$\left(x^3-3x,\ 3x^2-16\right)$};
\end{tikzpicture}

\end{document}



Contoh 3

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{xpicture}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
    \usepgfplotslibrary{polar}
    \usepgfplotslibrary{units}
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
            }}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=2.25]
        \begin{polaraxis}
[axis lines*=none,ytick=\empty,xlabel=\empty,ylabel=\empty,hide y axis,
axis line style = {draw=White,line width=0.0001pt},]
            \def\FREQUENCY{3}
            \addplot[IndianRed,domain=0:360,samples=360,smooth,thick] (x,{30-25*sin(\FREQUENCY*x)});
            \addplot[dashed,domain=0:2*pi,samples=360] (deg(x),30);
\addplot[mark=*,only marks] coordinates {(0,0)};
        \end{polaraxis}
    \end{tikzpicture}

\end{document}



Wednesday, September 24, 2014

Memperbesar Ukuran Huruf dengan fix-cm

Bila suatu ketika Anda ingin membuat huruf yang lebih besar dengan ukuran tertentu, apa yang Anda lakukan?

Contoh pada gambar di atas dibuat dengan menggunakan
\usepackage{quattrocento}
\usepackage{tikz}
\definecolor{warna17}{RGB}{62,96,111}
dengan perintah
\upshape\usefont{T1}{Quattrocento-TLF}{m}{n}\color{warna17}\fontsize{5cm}{5.5cm}\selectfont\bfseries AQUA
Pilihan lainnya adalah dengan menggunakan paket fix-cm.
fix-cm adalah salah satu dari beberapa paket yang memungkinkan kita untuk membuat huruf (font) lebih besar dari yang disediakan oleh $\small\LaTeX$ secara asal (default).

Pada contoh di bawah ini digunakan tiga macam ukuran huruf dalam dokumen, berturut-turut
\fontsize {.75cm}{1.95cm}\selectfont
\fontsize {1,5 cm}{1.95cm}\selectfont
\fontsize {80pt}{90pt}\selectfont
Berikut ini contoh pengkodean selengkapnya dan dokumen yang dihasilkannya yang saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[indonesian]{babel}
\usepackage{dejavu}
\usepackage[margin=2cm,bmargin=1cm]{geometry}
\usepackage{fix-cm}
\usepackage{xcolor}
\definecolor{warna4}{RGB}{25, 131, 82}
\definecolor{warna17}{RGB}{62,96,111}
\definecolor{warna16}{RGB}{152,31,32}
\parindent0pt

\begin{document}
\fontsize{.75cm}{1.95cm}\selectfont
{\color{warna4}\textbackslash fontsize\{0.75cm\}\{1.95cm\}\textbackslash selectfont} 

Tinggi huruf = 0,75 cm\\
Jarak antarbaris = 1,95 -- 0,75 = 1,2 cm \\
Jika kita membuat angka terlalu kecil, maka \LaTeX\, akan memastikan baris-baris itu tidak tumpang tindih. 

\bigskip
{\color{warna17}\fontsize{1,5 cm}{1.95cm}\selectfont
Tinggi huruf = 1,5 cm, antarbaris = 0,45 cm. }

\bigskip
\fontsize {80pt} {90pt}\selectfont
{\color{warna16}Huruf 80pt.}\\
\boldmath $\sqrt{x^2-x+3}$
\end{document}



Friday, September 19, 2014

Keterangan Gambar (Caption) di dalam Minipage

Tentang apa itu minipage, saya telah menuliskannya di sini. Begitu pun tentang pilihan agar dokumen di dalamnya merapat ke tepi atas, dapat Anda tinjau kembali di sana. Sekarang perhatikan contoh berikut ini.
Saya ingin memuat gambar beserta keterangan (caption)-nya di dalam minipage. Masalahnya, keterangan gambar pada umumnya dihasilkan hanya bila kita memuatnya dalam environment figure, sedangkan environment minipage tidak dapat memuat environment figure. Lalu, bagaimana caranya?

Ternyata cukup sederhana, saya hanya perlu memuat paket caption pada preamble dan memberikan perintah \captionof{figure} setelah gambar.
\usepackage{caption}
\captionof{figure}{}
Dalam contoh dokumen di bawah ini, Gambar 1 dibuat seperti biasa (tanpa menggunakan (environment minipage) sedangkan Gambar 2, seperti tampak di atas, dibuat di dalam minipage.

Sebagai tambahan informasi, untuk penulisan matematika saya gunakan paket concmath dan untuk penulisan teks saya gunakan paket gentium. Selain itu, untuk gambar dengan TikZ pada kedua gambar, saya gunakan
\usetikzlibrary{decorations.markings}
\tikzset{
    thickest/.style={line width=3pt},
    empty/.style={decoration={markings,
    mark=at position #1 with {\fill[white,draw=black,thin] circle (3pt);}},postaction={decorate}},
    full/.style={decoration={markings,
    mark=at position #1 with {\fill circle (3pt);}},postaction={decorate}},
}
Nah, berikut ini contoh pengkodean dan hasil dokumennya yang saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 
\documentclass[10pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[indonesian]{babel}
\usepackage{concmath,gentium}
\usepackage[lmargin=2cm,rmargin=1cm,tmargin=1.5cm,margin=1.75cm]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\tikzset{
    thickest/.style={line width=3pt},
    empty/.style={decoration={markings,
    mark=at position #1 with {\fill[white,draw=black,thin] circle (3pt);}},postaction={decorate}},
    full/.style={decoration={markings,
    mark=at position #1 with {\fill circle (3pt);}},postaction={decorate}},
}

\parindent0pt
\let\ds\displaystyle

\begin{document}

{\bfseries\large Soal 1}
\begin{align}
\frac{x+4}{x-3} &< 2
\end{align}

{\bfseries\large Jawaban}\\
Kita tidak dapat hanya mengalikan kedua ruas dengan $x - 3$, karena kita tidak tahu apakah $x - 3$ positif atau negatif.
\begin{align*}
\text{\bfseries Kasus 1}\quad 
x-3 > 0\qquad (\text{Ini berarti}\quad x > 3.) & \\
&& \frac{x+4}{x-3} &< 2\\
&& x+4 &< 2x-6 && \text{Kalikan dengan nilai positif $x-3$.}\\
&& 4 &< x-6 && \text{Kurangi oleh $x$.}\\
&& 10 &< x && \text{Tambahkan dengan 6.}
\end{align*}
Dengan demikian, untuk $x > 3$, ketidaksamaan yang diberikan berlaku jika dan hanya jika $x > 10$. 
\begin{align*}
\text{\bfseries Kasus 2}\quad 
x-3 < 0\qquad (\text{Ini berarti}\quad x < 3.) & \\
&& \frac{x+4}{x-3} &< 2\\
&& x+4 &> 2x-6 && \text{Kalikan dengan nilai negatif $x-3$.}\\
&& 4 &> x-6 && \text{Kurangi oleh $x$.}\\
&& 10 &> x && \text{Tambahkan dengan 6.}
\end{align*}
Dengan demikian, untuk $x < 3$, ketidaksamaan yang diberikan berlaku jika dan hanya jika $x < 10$.\\ 
Tetapi $x<3 berakibat="" berlaku="" boldmath="" dan="" itu="" jadi="" karena="" ketidaksamaan="" nilai="" oleh="" semua="" untuk="" x="">10$ atau $x < 3$. \\
Seperti ditunjukkan dalam Gambar 1.2, penyelesaiannya adalah gabungan dari interval $\left(10, \infty\right)$ dan $\left(-\infty, 3\right)$.
\unboldmath

\begin{figure}[!ht]
\centering
\begin{tikzpicture}[x=3mm,y=1.2em]
       \draw (-6,2) -- (19,2);
       
       \node[anchor=north] at (0,1.75) {0};
       \node[anchor=north] at (3,1.75) {3};
       \node[anchor=north] at (10,1.75) {10};
       
% ARROWS

\draw[full=1] (0,2) ;
\draw[thickest,empty=0,-stealth] (3,2) -- (-6,2);
\draw[thickest,empty=0,-stealth] (10,2) -- (19,2);
\end{tikzpicture}
\caption{}
\end{figure}
    
\bigskip
{\bfseries\large Soal 2}\\
Jika suatu garis $L$ memiliki persamaan $3x + 2y = 4$, buktikan bahwa titik $P(x, y)$ terletak di atas $L$ jika dan hanya jika $3x + 2y> 4$.

\bigskip
{\bfseries\large Jawaban}\\
\adjustbox{valign=t}{\begin{minipage}{0.6\textwidth}
Dengan menyelesaikannya dalam $y$, kita peroleh persamaan 
\[y = -\frac{3}{2}x + 2\]
Untuk setiap nilai $x$ yang tetap, garis vertikal dengan nilai absis tersebut memotong garis itu di titik $Q$ dengan ordinat \[\ds-\frac{3}{2}x + 2\] (lihat Gambar 3.2). \\
Titik-titik sepanjang garis vertikal itu yang terletak di atas $Q$ berordinat 
\begin{align*}
y &> -\frac{3}{2}x + 2 && \text{ini setara dengan}\\
2y &> -3x + 4 && \text{sehingga}\\
3x + 2y &> 4 &&
\end{align*}
    \end{minipage}}%
    \hfill
% 
\adjustbox{valign=t}{\begin{minipage}{0.35\textwidth}
\centering
\begin{tikzpicture}[x=3mm,y=1.2em]
    \draw[thick,-stealth] (-5,0) -- (8,0);
    \draw[thick,-stealth] (0,-2) -- (0,8); 
    \draw[-,line width=1.25pt] (5.94,-1.45) -- (-4.55,6.41);
    \draw[-,dashed] (-3,-2) -- (-3,8);
    
    \node[anchor=north east] at (-3,0) {$x$};
    \node[anchor=north east] at (-3,5.25) {$Q$};
    
\draw[full=0,-] (-3,5.25);
\draw[full=0,-] (-3,0);
\end{tikzpicture}
 \captionof{figure}{}
    \end{minipage}}%
    \hfill

\end{document}



Related Posts Plugin for WordPress, Blogger...