Search In This Website

Minggu, 20 Juli 2025

Latihan FPB Dalam Dokumen Latex Preview

1. Open the Latex editor
2. Type this following Latex code in your Latex editor:

% !TEX TS-program = pdflatex


%% File Description:

%% GCD (Great Common Divisor)

%% using Prime Factorization Division Method Table


\documentclass{article}

%% Loading the package

%------------------------

\usepackage{bookman}

\usepackage{array}

\usepackage{multirow}

\usepackage{makecell}

\usepackage{amsmath}

\usepackage{amsthm}

\usepackage{bm}

\usepackage{fullpage}

%------------------------


%% custom theorem environment

%---------------------------

%% define theorem style

\newtheoremstyle{definition}

 {\topsep} % Space above

 {\topsep} % Space below

 {} % Body font

 {} % Indent amount

 {\bfseries} % Theorem head font

 {.} % Punctuation after theorem head

 {.5em} % Space after theorem head

 {} % Theorem head spec ( can be left empty, meaning `normal` )


\theoremstyle{definition}

%\redeclaretheorem[style=normalhead]{theorem}

%% define theorem environment

\newtheorem{theorem}{Langkah}[section]

%---------------------------


%% custom table properties

%---------------------------

%% resize row height

%% use one of this command below:

%\setlength\extrarowheight{2.5pt}

\renewcommand{\arraystretch}{2}

%% resize border width can be more thick or thin

\setlength{\arrayrulewidth}{1.5pt}

%% resize space between columns and border

\setlength{\tabcolsep}{5pt}

%% new centering column type

\newcolumntype{P}[1]{>{\centering\Large{}\arraybackslash}p{#1}}

%---------------------------


%% custom preview package

\usepackage[active,floats,tightpage,multi]{preview}

\setlength\PreviewBorder{0.25pt}

\PreviewEnvironment{minipage}

%---------------------------


\begin{document}

\Large{}

\begin{minipage}{0.5\linewidth}

\section{Menentukan FPB}

Menentukan Faktor Persekutuan Terbesar (FPB) dari dua bilangan.\\[-0.75em]


Marilah kita menentukan FPB dari masalah sebagai berikut:\\

\end{minipage}


\begin{minipage}{0.5\linewidth}

\textbf{Contoh:}\\[-0.5em]


Pak Yudi memiliki 12 apel dan 18 jeruk. Apel dan jeruk tersebut akan dimasukkan ke dalam kantong plastik. Berapa kantong plastik yang dibutuhkan, jika setiap kantong berisi apel dan jeruk dengan jumlah yang sama?\\

\end{minipage}


\begin{minipage}{0.5\linewidth}

\textbf{Jawab:}\\[-0.5em]


\begin{theorem} % Langkah 1

Menentukan faktorisasi prima dari bilangan-bilangan itu:

\end{theorem}

\end{minipage}


\begin{minipage}{0.5\linewidth}

\centering

\hspace{1em}

\begin{minipage}{0.25\linewidth}

$$\begin{array}{|r}

\llap{\textbf{2}~~~~} \textbf{12} \\ \hline

\llap{\textbf{2}~~~~~~} \textbf{6} \\ \hline

\llap{\textbf{3}~~~~~~} \textbf{3} \\ \hline

\textbf{1} \\

\end{array}$$

\end{minipage}

\qquad\qquad

\begin{minipage}{0.25\linewidth}

$$

\begin{array}{|r}

\llap{\textbf{2}~~~~} \textbf{18} \\ \hline

\llap{\textbf{3}~~~~~~} \textbf{9} \\\hline

\llap{\textbf{3}~~~~~~} \textbf{3} \\ \hline

\textbf{1} \\

\end{array}

$$

\end{minipage}\bigskip

\end{minipage}


\begin{minipage}{0.5\linewidth}

\bigskip

Faktorisasi prima dari 12 adalah \\$12 = 2 \times 2 \times 3 = \mathbf{2^{2}} \times \mathbf{3}$\\

Faktorisasi prima dari 18 adalah \\$18 = 2 \times 3 \times 3 = \mathbf{2} \times \mathbf{3^{2}}$\\

\end{minipage}


\begin{minipage}{0.5\linewidth}\smallskip

\begin{theorem} %Langkah 2

Mengambil faktor yang sama dari bilangan-bilangan itu.

\end{theorem}

\hspace{0.75em} Mengambil faktor 2 dari $\textbf{2}^{\textbf{2}}$,\ $\textbf{2}$\\

\indent\hspace{0.75em} Mengambil faktor 3 dari $\textbf{3}$,\ $\textbf{3}^{\textbf{2}}$\\

\end{minipage}


\begin{minipage}{0.5\linewidth}

\indent\hspace{0.75em} FPB dari 12 dan 18 adalah\\

\indent\hspace{0.75em} 2 $\boldsymbol\times$ 3 = 6 \\[-0.5em]


Jadi, kantong plastik yang diperlukan adalah 6 buah. Setiap kantong plastik memuat 2 apel dan 3 jeruk. %, seperti terlihat pada gambar berikut.\hfill\\

\end{minipage}

\end{document}

3. Save Latex code file as mFPB1prvw.tex

4. Then build or typeset the Latex code file.
5. Then you can see the output below.

Output











Tidak ada komentar:

Posting Komentar