2

[EDIT V.1]

Good day to all. I am new to LaTex and I have two problems:

  1. The warning "Undefined Control Sequence," which doesn't really seem to bother the parsing (I'm doing it in Overleaf), because everything still parses. The warning starts from line 13 and it repeats for every \end{align} onwards. (It could probably be the main cause of the misalignment)
  2. The \begin{align} \end{align} don't align in some parts. (They somehow don't center-align)

In this below picture, using the previous page number (2) as the benchmark for center-align, 'Contoh 6' clearly doesn't center-align except for the beginning.

enter image description here

In this below picture, it starts fine, but when starting from Untuk x < -1 it's not center-aligned anymore.

enter image description here

While for the picture below (Contoh 7), this is the smoothest one I can get.

enter image description here

I would really appreciate any pointers on what is happening, what I have done wrong, and/or how to fix these problems. Thank you very much.

Here's the full tex code:

\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}    % Math symbols such as \mathbb
\usepackage{amsthm}
\usepackage{pgfplots}   % plots
\usepackage[a4paper, total={6in, 10.5in}]{geometry}

\title{Soal}
\author{Penulis }
\date{Juni 2024}

\begin{document}

\maketitle

\section*{Introduction}

Contoh 1
\begin{align}
    \frac{a+ab+bc}{ab}&\neq \frac{\cancel a+\cancel a \cancel b+\cancel bc}{\cancel a \cancel b}\\& \neq 1+c
\end{align}
\begin{align}
    \frac{a+ab+bc}{ab} &=\frac{a}{ab}+\frac{ab}{ab}+\frac{bc}{ab}\tag{1}\\ & = \frac{1}{b}+1+\frac{c}{a}\tag{2}\\& = 1+\frac{1}{b}+\frac{c}{a}\tag{3}
\end{align}
\\
Contoh 2
\begin{align}
    a+(-(-b)^2)&= a+(-b^2)\tag{1}\\&= a-b^2\tag{2}
\end{align}
\begin{align}
    a+(-(-b)^2)&=a+(-(-b)(-b))\tag{1}\\&=a+(-(b^2))\tag{2}\\&=a+(-b^2)\tag{3}\\&=a+(-1*b^2)\tag{4}\\&=a+(-1)(b^2)\tag{5}\\&=a-(1)(b^2)\tag{6}\\&=a-b^2\tag{7}
\end{align}

\newpage

Contoh 3
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}&\neq \frac{\cancel a - b^{\cancel 2}}{\cancel a - \cancel b}+\frac{\cancel a - \cancel b}{\cancel b - \cancel a}\tag{1}\\&\neq \frac{-b}{1}+1\tag{2}\\&\neq -b+1\tag{3}
\end{align}
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}&=\frac{a-b^2}{a-b}+\frac{a-b}{-(a-b)}\tag{1}\\&=\frac{a-b^2}{a-b}+\frac{\cancel {a-b}}{-\cancel {(a-b)}}\tag{2}\\&=\frac{a-b^2}{a-b}+\frac{1}{-1}\tag{3}\\&=\frac{a-b^2}{a-b}+(-1)\tag{4}\\&=\frac{a-b^2}{a-b}-1\tag{5}
\end{align}
\\
Contoh 4
\begin{align}
    \frac{a}{b}-\frac{c}{d}&\neq \frac{a-c}{b-d}\tag{1}
\end{align}
\begin{align}
    \frac{a}{b}-\frac{c}{d}&=\frac{a*d-c*b}{bd}\tag{1}\\&=\frac{ad-bc}{bd}\tag{2}
\end{align}
\\
Contoh 4 Diputar balik (mirip contoh 1)
\begin{align}
    \frac{ad-bc}{bd}&=\frac{ad}{bd}-\frac{bc}{bd}\tag{1}\\&=\frac{a\cancel d}{b\cancel d}-\frac{\cancel bc}{\cancel bd}\tag{2}\\&=\frac{a}{b}-\frac{c}{d}\tag{3}
\end{align}

\newpage

Contoh 5
\begin{align}
    x+3&>0\\x&>-3\\\\\therefore{}L&=(-3;\infty)
\end{align}
\\
Contoh 6
\begin{align}
    x^2-5x-6&\ge0\\(x+1)(x-6)&\ge0
\end{align}
Jangan langsung dibuat $x \le -1$ atau $x \ge 6$, buat dulu kayak di bawah:
\begin{align*}
    x&=-1\\x&=6
    \clap{Artinya, $x = -1$ dan $x = 6$ adalah garis batas dan mereka termasuk.}
\end{align*}
Habis itu cek apakah dengan x di sebelah kiri dan kanan 2 dan 3 pertidsaksamaan di atas akan valid
\begin{align*}
    \text{Untuk $x \le -1$}\\
    ((-2)^2)-5(-2)-6\ge0\\
    4+10-6\ge0\\
    8\ge0\\\\
    \text{Untuk $-1 \le x \le 6$}\\
    (0)^2-5(0)-6\ge0\\
    0-0-6\ge0\\
    -6\ge0\\\\
    \text{Untuk $x \ge 6$}\\
    (7^2)-5(7)-6\ge0\\
    49-35-6\ge0\\
    8\ge0\\\\
    \therefore L=(-\infty;-1)\lor(6;\infty)
\end{align*}

\newpage

Contoh 7
\begin{align*}
    |x+10|&=2x-3\\\\
    \clap{Bagian Satu: Positif}\\
    (+1)(x+10)&=2x-3\\
    +(x+10)&=2x-3\\
    (x+10)&=2x-3\\
    x+10&=2x-3\\   
    x+10-10&=2x-3-10\\
    x&=2x-13\\
    x-2x&=2x-2x-13\\
    -x&=-13\\
    x&=13\\\\
    \clap{Bagian Dua: Negatif}\\
    (-1)(x+10)&=2x+3\\
    -(x+10)&=2x+3\\
    -x-10&=2x+3\\
    -x-10+10&=2x+3+10\\
    -x&=2x+13\\
    -x-2x&=2x+13-2x\\
    -3x&=13\\
    x&=\frac{13}{3}\\\\
    \therefore L&=\{13;\frac{13}{3}\}
\end{align*}

\newpage

Contoh 8
\begin{align*}
    |2x-5|&> x+8\\\\
    \clap{Bagian Satu: Positif}\\
    (2x-5)&=x+8\\
    2x-5-x&=x+8-x\\
    x-5&=8\\
    x-5+5&=8+5\\
    x&=13\\\\
    \clap{Bagian Dua: Negatif}\\
    -(2x-5)&=x+8\\
    -2x+5&=x+8\\
    -2x+5-x&=x+8-x\\
    -3x+5&=8\\
    -3x+5-5&=8-5\\
    -3x&=3\\
    \frac{-3x}{-3}&=\frac{3}{-3}\\
    x&=-1\\
    \clap{Artinya, x = -1 dan x = 13 adalah garis batas, tapi mereka tidak termasuk.}
\end{align*}
Pas diurain, ga langsung pake tanda $\ge$, tapi pake sama dengan dulu, baru sekarang kita tes:
\begin{align*}
    \clap{Untuk $x < -1$ (-1 tidak termasuk)}\\
    |2(-2)-5|&>(-2)+8\\
    |-4-5|&>6\\
    |-9|&>6\\
    9&>6\\\\
    \clap{Untuk $-1 < x < 13$}\\
    |2(0)-4|&>0+8\\
    |-4|&>8\\
    4&>8\\\\
    \clap{Untuk $x > 13$ (13 tidak termasuk)}\\
    |2(13)-4|&>13+8\\
    |26-4|&>21\\
    |22|&>21\\
    22&>21\\\\
    \clap{Seluruh x yang memenuhi pertidaksamaan di atas hanyalah $x < -1$ atau $x > 13$}\\\\
    \therefore L&=(\infty;-1)\lor(13;\infty)
\end{align*}
\end{document}

Now, I am going to give the revision version:

  1. I have changed \\\\ to \\[\baselineskip].
  2. I have changed the \\ where I want just an empty space/enter with \medskip.
  3. I have inserted \noindent before all of my first word in each page.
  4. I have, however, not changed clap{} to intertext{} due to visual reason. intertext{} makes my text hard to read (all got left-aligned), while with clap{} it serves well to what I want visually. Now, it's easy to follow along and easy to read.
  5. I have commented A4 and resize the page instead (using simply total).

Page 5 looks like below (is what I want visually) : enter image description here

The whole tex code is below:

\documentclass{article}
% \usepackage{graphicx} % Required for inserting images
\usepackage{mathtools}
% \usepackage{amsmath}
\usepackage{amssymb}    % Math symbols such as \mathbb
% \usepackage{pgfplots}   % plots
\usepackage[a4paper]{geometry} % , total={6.5in, 10in}
\usepackage{cancel}
% \pgfplotsset{compat=1.18}

\title{Problems}
\author{Penulis }
\date{Juni 2024}

\begin{document}

\maketitle

%\section*{Introduction}

\noindent
Contoh 1
\begin{align*}
    \frac{a+ab+bc}{ab}
    &\neq \frac{\cancel a+\cancel a \cancel b+\cancel bc}{\cancel a \cancel b}\\
    & \neq 1+c
\end{align*}
\begin{align*}
    \frac{a+ab+bc}{ab} 
    &=\frac{a}{ab}+\frac{ab}{ab}+\frac{bc}{ab}\tag{1}\\ 
    & = \frac{1}{b}+1+\frac{c}{a}\tag{2}\\
    & = 1+\frac{1}{b}+\frac{c}{a}\tag{3}
\end{align*}

\medskip\noindent
Contoh 2
\begin{align}
    a+(-(-b)^2)
    &= a+(-b^2)\tag{1}\\
    &= a-b^2\tag{2}
\end{align}
\begin{align}
    a+(-(-b)^2)&=a+(-(-b)(-b))\tag{1}\\
    &=a+(-(b^2))\tag{2}\\
    &=a+(-b^2)\tag{3}\\
    &=a+(-1*b^2)\tag{4}\\
    &=a+(-1)(b^2)\tag{5}\\
    &=a-(1)(b^2)\tag{6}\\
    &=a-b^2\tag{7}
\end{align}

\newpage

\noindent
Contoh 3
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}
    &\neq \frac{\cancel a - b^{\cancel 2}}{\cancel a - \cancel b}+\frac{\cancel a - \cancel b}{\cancel b - \cancel a}\tag{1}\\
    &\neq \frac{-b}{1}+1\tag{2}\\
    &\neq -b+1\tag{3}
\end{align}
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}
    &=\frac{a-b^2}{a-b}+\frac{a-b}{-(a-b)}\tag{1}\\
    &=\frac{a-b^2}{a-b}+\frac{\cancel {a-b}}{-\cancel {(a-b)}}\tag{2}\\
    &=\frac{a-b^2}{a-b}+\frac{1}{-1}\tag{3}\\
    &=\frac{a-b^2}{a-b}+(-1)\tag{4}\\
    &=\frac{a-b^2}{a-b}-1\tag{5}
\end{align}

\medskip\noindent
Contoh 4
\begin{align}
    \frac{a}{b}-\frac{c}{d}
    &\neq \frac{a-c}{b-d}\tag{1}
\end{align}
\begin{align*}
    \frac{a}{b}-\frac{c}{d}
    &=\frac{a*d-c*b}{bd}\tag{1}\\
    &=\frac{ad-bc}{bd}\tag{2}
\end{align*}

\medskip\noindent
Contoh 4 Diputar balik (mirip contoh 1)
\begin{align*}
    \frac{ad-bc}{bd}
    &=\frac{ad}{bd}-\frac{bc}{bd}\tag{1}\\
    &=\frac{a\cancel d}{b\cancel d}-\frac{\cancel bc}{\cancel bd}\tag{2}\\
    &=\frac{a}{b}-\frac{c}{d}\tag{3}
\end{align*}

\newpage

\noindent
Contoh 5
\begin{align*}
    x+3&>0\\
    x&>-3
\end{align*}
\begin{align*}
    \therefore{}L=(-3;\infty)
\end{align*}

\medskip\noindent
Contoh 6
\begin{align*}
    x^2-5x-6&\ge0\\
    (x+1)(x-6)&\ge0
\end{align*}
Jangan langsung dibuat $x \ge -1$ dan $x \ge 6$, buat dulu kayak di bawah:
\begin{align*}
    x&=-1\\
    x&=6\\
    \clap{Artinya, $x=-1$ dan $x=6$ adalah garis batas dan mereka termasuk.}
\end{align*}
Habis itu cek apakah dengan x di sebelah kiri dan kanan dari $x = -1$ dan $x = 6$ pertidsaksamaan di atas akan valid:
\begin{align*}
    \text{Untuk $x\le -1$}\\
    ((-2)^2)-5(-2)-6&\ge0\\
    4+10-6&\ge0\\
    8&\ge0\\[\baselineskip]
    \text{Untuk $-1\le x\le 6$}\\
    (0)^2-5(0)-6&\ge0\\
    0-0-6&\ge0\\
    -6&\ge0\\[\baselineskip]
    \text{Untuk $x\ge 6$}\\
    (7^2)-5(7)-6&\ge0\\
    49-35-6&\ge0\\
    8&\ge0
\end{align*}
\begin{align*}
    \therefore L=(-\infty;-1)\lor(6;\infty)
\end{align*}

\newpage

\noindent
Contoh 7
\begin{align*}
    |x+10|&=2x-3\\[\baselineskip]
    \clap{Bagian Satu: Positif}\\
    (+1)(x+10)&=2x-3\\
    +(x+10)&=2x-3\\
    (x+10)&=2x-3\\
    x+10&=2x-3\\   
    x+10-10&=2x-3-10\\
    x&=2x-13\\
    x-2x&=2x-2x-13\\
    -x&=-13\\
    x&=13\\[\baselineskip]
    \clap{Bagian Dua: Negatif}\\
    (-1)(x+10)&=2x+3\\
    -(x+10)&=2x+3\\
    -x-10&=2x+3\\
    -x-10+10&=2x+3+10\\
    -x&=2x+13\\
    -x-2x&=2x+13-2x\\
    -3x&=13\\
    x&=\frac{13}{3}
\end{align*}
\begin{align*}
    \therefore L=\{13;\frac{13}{3}\}
\end{align*}

\newpage

\noindent
Contoh 8
\begin{align*}
    |2x-5|&> x+8\\[\baselineskip]
    \clap{Bagian Satu: Positif}\\
    (2x-5)&=x+8\\
    2x-5-x&=x+8-x\\
    x-5&=8\\
    x-5+5&=8+5\\
    x&=13\\[\baselineskip]
    \clap{Bagian Dua: Negatif}\\
    -(2x-5)&=x+8\\
    -2x+5&=x+8\\
    -2x+5-x&=x+8-x\\
    -3x+5&=8\\
    -3x+5-5&=8-5\\
    -3x&=3\\
    \frac{-3x}{-3}&=\frac{3}{-3}\\
    x&=-1\\
    \clap{Artinya, x = -1 dan x = 13 adalah garis batas, tapi mereka tidak termasuk.}
\end{align*}
Pas diurain, ga langsung pake tanda $\ge$, tapi pake sama dengan dulu, baru sekarang kita tes:
\begin{align*}
    |2x-5|&> x+8\\[\baselineskip]
    \clap{Untuk $x < -1$ ($-1$ tidak termasuk)}\\
    |2(-2)-5|&>(-2)+8\\
    |-4-5|&>6\\
    |-9|&>6\\
    9&>6\\[\baselineskip]
    \clap{Untuk $-1 < x < 13$}\\
    |2(0)-4|&>0+8\\
    |-4|&>8\\
    4&>8\\[\baselineskip]
    \clap{Untuk $x > 13$ (13 tidak termasuk)}\\
    |2(14)-4|&>14+8\\
    |28-4|&>22\\
    |24|&>22\\
    24&>22\\[\baselineskip]
    \clap{Seluruh x yang memenuhi pertidaksamaan di atas hanyalah $x < -1$ atau $x > 13$}
\end{align*}
\begin{align*}
    \therefore L&=(-\infty;-1)\lor(13;\infty)\\
\end{align*}
\end{document}
16
  • 3
    Welcome. // To localize your problem I suggest to make a copy of your file, and either delete or comment out (prefered way) useful chunks of code; in your case perhaps doing so pagewise is a good starting point. // If you deleted the problematic part, your file will compile. Revitalizing it, repeat this process, i.e. deactivate (as described) useful parts there. // Pay attention to the first (one or two) error messages.
    – MS-SPO
    Commented Jun 16 at 8:51
  • 1
    Hello. Thank you. With your suggestion, I tackled my first problem: missing a \usepackage{cancel}. Now, I'm on to the next one.
    – user323452
    Commented Jun 16 at 9:07
  • 3
    errors do bother the parsing: as you discovered even if you get a PDF at the end, its content and the output can be wrong. So never ignore a red number in overleaf. Commented Jun 16 at 9:42
  • 3
    if you get any error only use the pdf as a debugging aid, tex only recovers enough to syntax check the rest of the document it makes no attempt to make usable pdf output after an error. Commented Jun 16 at 9:46
  • 3
    \usepackage[a4paper, total={6in, 10.5in}]{geometry} makes no sense you are specifying the paper size is A4 (which is a standard size defined in millimeters) then specify its height and width in inches. the two settings are clearly contradictory. Commented Jun 16 at 9:48

2 Answers 2

5

Only use packages that you need in the document, never use \\\\ and only use \clap if you want the content to over_lap_ the surrounding text.

enter image description here

See comments added inline in the document

\documentclass{article}
% not used \usepackage{graphicx} % Required for inserting images
\usepackage{mathtools}
% not needed as you have mathtools \usepackage{amsmath}
\usepackage{amssymb}    % Math symbols such as \mathbb
% not used \usepackage{amsthm}
% not used \usepackage{pgfplots}   % plots

% self contradictory \usepackage[a4paper, total={6in, 10.5in}]{geometry}
\usepackage{cancel}% needed

\title{Soal}
\author{Penulis }
\date{Juni 2024}

\begin{document}

\maketitle

\section*{Introduction}

Contoh 1
\begin{align}
    \frac{a+ab+bc}{ab}&\neq \frac{\cancel a+\cancel a \cancel b+\cancel bc}{\cancel a \cancel b}\\& \neq 1+c
\end{align}
\begin{align}
    \frac{a+ab+bc}{ab} &=\frac{a}{ab}+\frac{ab}{ab}+\frac{bc}{ab}\tag{1}\\ & = \frac{1}{b}+1+\frac{c}{a}\tag{2}\\& = 1+\frac{1}{b}+\frac{c}{a}\tag{3}
\end{align}
% no\\
Contoh 2
\begin{align}
    a+(-(-b)^2)&= a+(-b^2)\tag{1}\\&= a-b^2\tag{2}
\end{align}
\begin{align}
    a+(-(-b)^2)&=a+(-(-b)(-b))\tag{1}\\&=a+(-(b^2))\tag{2}\\&=a+(-b^2)\tag{3}\\&=a+(-1*b^2)\tag{4}\\&=a+(-1)(b^2)\tag{5}\\&=a-(1)(b^2)\tag{6}\\&=a-b^2\tag{7}
\end{align}

\newpage

Contoh 3
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}&\neq \frac{\cancel a - b^{\cancel 2}}{\cancel a - \cancel b}+\frac{\cancel a - \cancel b}{\cancel b - \cancel a}\tag{1}\\&\neq \frac{-b}{1}+1\tag{2}\\&\neq -b+1\tag{3}
\end{align}
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}&=\frac{a-b^2}{a-b}+\frac{a-b}{-(a-b)}\tag{1}\\&=\frac{a-b^2}{a-b}+\frac{\cancel {a-b}}{-\cancel {(a-b)}}\tag{2}\\&=\frac{a-b^2}{a-b}+\frac{1}{-1}\tag{3}\\&=\frac{a-b^2}{a-b}+(-1)\tag{4}\\&=\frac{a-b^2}{a-b}-1\tag{5}
\end{align}
% no\\
Contoh 4
\begin{align}
    \frac{a}{b}-\frac{c}{d}&\neq \frac{a-c}{b-d}\tag{1}
\end{align}
\begin{align}
    \frac{a}{b}-\frac{c}{d}&=\frac{a*d-c*b}{bd}\tag{1}\\&=\frac{ad-bc}{bd}\tag{2}
\end{align}
% no\\
Contoh 4 Diputar balik (mirip contoh 1)
\begin{align}
    \frac{ad-bc}{bd}&=\frac{ad}{bd}-\frac{bc}{bd}\tag{1}\\&=\frac{a\cancel d}{b\cancel d}-\frac{\cancel bc}{\cancel bd}\tag{2}\\&=\frac{a}{b}-\frac{c}{d}\tag{3}
\end{align}

\newpage

Contoh 5
\begin{align}
  x+3&>0\\x&>-3\\% never use \\\\
  \therefore{}L&=(-3;\infty)
\end{align}
% never use \\ after align \\
Contoh 6
\begin{align}
    x^2-5x-6&\ge0\\(x+1)(x-6)&\ge0
\end{align}
Jangan langsung dibuat $x \le -1$ atau $x \ge 6$, buat dulu kayak di bawah:
\begin{align*}
  x&=-1\\x&=6\\
  % no \clap
    \intertext{\centering Artinya, $x = -1$ dan $x = 6$ adalah garis batas dan mereka termasuk.}
\end{align*}
Habis itu cek apakah dengan x di sebelah kiri dan kanan 2 dan 3 pertidsaksamaan di atas akan valid
\begin{align*}
    \text{Untuk $x \le -1$}\\
    ((-2)^2)-5(-2)-6\ge0\\
    4+10-6\ge0\\
    8\ge0\\% no\\
    \intertext{\centering Untuk $-1 \le x \le 6$}
    (0)^2-5(0)-6\ge0\\
    0-0-6\ge0\\
    -6\ge0\\% no\\
    \intertext{Untuk $x \ge 6$}\\
    (7^2)-5(7)-6\ge0\\
    49-35-6\ge0\\
    8\ge0\\% \\
    \therefore L=(-\infty;-1)\lor(6;\infty)
\end{align*}

\newpage

Contoh 7
\begin{align*}
    |x+10|&=2x-3\\% no \\
    % no
  \intertext{\centering Bagian Satu: Positif}
    (+1)(x+10)&=2x-3\\
    +(x+10)&=2x-3\\
    (x+10)&=2x-3\\
    x+10&=2x-3\\   
    x+10-10&=2x-3-10\\
    x&=2x-13\\
    x-2x&=2x-2x-13\\
    -x&=-13\\
    x&=13\\% no\\
    \intertext{\centering Bagian Dua: Negatif}
    (-1)(x+10)&=2x+3\\
    -(x+10)&=2x+3\\
    -x-10&=2x+3\\
    -x-10+10&=2x+3+10\\
    -x&=2x+13\\
    -x-2x&=2x+13-2x\\
    -3x&=13\\
    x&=\frac{13}{3}\\% no\\
    \therefore L&=\{13;\frac{13}{3}\}
\end{align*}

\newpage

Contoh 8
\begin{align*}
    |2x-5|&> x+8\\%\\
    \intertext{\centering Bagian Satu: Positif}
    (2x-5)&=x+8\\
    2x-5-x&=x+8-x\\
    x-5&=8\\
    x-5+5&=8+5\\
    x&=13\\%\\
    \intertext{\centering Bagian Dua: Negatif}
    -(2x-5)&=x+8\\
    -2x+5&=x+8\\
    -2x+5-x&=x+8-x\\
    -3x+5&=8\\
    -3x+5-5&=8-5\\
    -3x&=3\\
    \frac{-3x}{-3}&=\frac{3}{-3}\\
    x&=-1\\
    \intertext{\centering Artinya, x = -1 dan x = 13 adalah garis batas, tapi mereka tidak termasuk.}
\end{align*}
Pas diurain, ga langsung pake tanda $\ge$, tapi pake sama dengan dulu, baru sekarang kita tes:
\begin{align*}
    \intertext{\centering Untuk $x < -1$ (-1 tidak termasuk)}
    |2(-2)-5|&>(-2)+8\\
    |-4-5|&>6\\
    |-9|&>6\\
    9&>6\\%\\
    \intertext{\centering Untuk $-1 < x < 13$}
    |2(0)-4|&>0+8\\
    |-4|&>8\\
    4&>8\\%no\\
    \intertext{\centering Untuk $x > 13$ (13 tidak termasuk)}
    |2(13)-4|&>13+8\\
    |26-4|&>21\\
    |22|&>21\\
    22&>21\\%\\
    \intertext{\centering Seluruh x yang memenuhi pertidaksamaan di atas hanyalah $x < -1$ atau $x > 13$}
    \therefore L&=(\infty;-1)\lor(13;\infty)
\end{align*}
\end{document}
3
  • Hey! Thank you for showing the code, I have copy-pasted it to my Overleaf and took a good look. It helped me. Anyway, first question: Why is it a taboo to write `\\\\`? I usually use double enters for distinguishing one context from another (in this case from different problems or [for x <= 1 then ... -> double enters -> for x > 3 then ...]). The second one is: I usually work in Word and use A4 size in inches. Why is it a taboo for using inches in managing the total size of the A4 paper? I mean, any practical reason/concern? Cheers!
    – user323452
    Commented Jun 16 at 12:56
  • It is not so much the units but the fact that you specify it at all. If you specify A4 paper then that has specified the height and width of the paper. If you specify the height and width again either you specify exactly the ISO standard size, which means that the new setting will do nothing, or you specify a different size which means the size is no longer ISO A4 size so the first setting is pointless. do you want A4 size paper or 6in by 10.5in size paper? you can not possibly have both at the same time. Commented Jun 16 at 16:03
  • 2
    \\\\ is wrong as it is not adding vertical space, it is adding a line of the display with no content, it would for example not be discarded at a page break as tex thinks it is a formula not white space. Use \\[\baselineskip] to have an extra space after a line Commented Jun 16 at 16:06
3

My main recommendation is that you replace all instances of \clap with \intertext, a macro provided by the amsmath package. No need for \\\\ either before or after the \intertext instructions; actually, don't provide \\ after \intertext either.

Do be sure to load the cancel package, though.

The following screenshots show the first and fifth/final page of the full output of your modified code.


enter image description here


enter image description here


\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{mathtools}
%%\usepackage{amsmath}  %% 'amsmath' is loaded automatically by 'mathtools'
\usepackage{amssymb}    % Math symbols such as \mathbb
\usepackage{amsthm}
\usepackage{pgfplots}   % plots
\usepackage[a4paper, %total={6in, 10.5in}
           ]{geometry}
\usepackage{cancel} %            <-- new
\usepackage[indonesian]{babel} % <-- new

\title{Soal}
\author{Penulis}
\date{Juni 2024}

\begin{document}

\maketitle

\section*{Introduction}

Contoh 1
\begin{align}
    \frac{a+ab+bc}{ab}
    &\neq \frac{\cancel{a}+\cancel{a} \cancel{b}+\cancel{b}c}{\cancel{a} \cancel{b}}\\
    & \neq 1+c
\end{align}
\begin{align}
    \frac{a+ab+bc}{ab} 
    &=\frac{a}{ab}+\frac{ab}{ab}+\frac{bc}{ab}\tag{1}\\ 
    & = \frac{1}{b}+1+\frac{c}{a}\tag{2}\\
    & = 1+\frac{1}{b}+\frac{c}{a}\tag{3}
\end{align}

\medskip\noindent
Contoh 2
\begin{align}
    a+(-(-b)^2)
    &= a+(-b^2)\tag{1}\\
    &= a-b^2\tag{2}
\end{align}
\begin{align}
    a+(-(-b)^2)
    &=a+(-(-b)(-b))\tag{1}\\
    &=a+(-(b^2))\tag{2}\\
    &=a+(-b^2)\tag{3}\\
    &=a+(-1\cdot b^2)\tag{4}\\
    &=a+(-1)(b^2)\tag{5}\\
    &=a-(1)(b^2)\tag{6}\\
    &=a-b^2\tag{7}
\end{align}

\newpage

\noindent
Contoh 3
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}
    &\neq \frac{\cancel{a} - b^{\cancel 2}}{\cancel{a} - \cancel{b}}
         +\frac{\cancel{a} - \cancel{b}}{\cancel{b} - \cancel{a}}\tag{1}\\
    &\neq \frac{-b}{1}+1\tag{2}\\
    &\neq -b+1\tag{3}
\end{align}
\begin{align}
    \frac{a-b^2}{a-b}+\frac{a-b}{b-a}
    &=\frac{a-b^2}{a-b}+\frac{a-b}{-(a-b)}\tag{1}\\
    &=\frac{a-b^2}{a-b}+\frac{\cancel {a-b}}{-\cancel {(a-b)}}\tag{2}\\
    &=\frac{a-b^2}{a-b}+\frac{1}{-1}\tag{3}\\
    &=\frac{a-b^2}{a-b}+(-1)\tag{4}\\
    &=\frac{a-b^2}{a-b}-1\tag{5}
\end{align}

\medskip\noindent
Contoh 4
\begin{align}
    \frac{a}{b}-\frac{c}{d}
    &\neq \frac{a-c}{b-d}    \tag{1}
\end{align}
\begin{align}
    \frac{a}{b}-\frac{c}{d}
    &=\frac{a\cdot d-c\cdot b}{bd}\tag{1}\\
    &=\frac{ad-bc}{bd}            \tag{2}
\end{align}

\medskip\noindent
Contoh 4 Diputar balik (mirip contoh 1)
\begin{align}
    \frac{ad-bc}{bd}
    &=\frac{ad}{bd}-\frac{bc}{bd}\tag{1}\\
    &=\frac{a\cancel{d}}{b\cancel{d}}-\frac{\cancel{b}c}{\cancel{b}d}\tag{2}\\
    &=\frac{a}{b}-\frac{c}{d}\tag{3}
\end{align}

\newpage

\noindent
Contoh 5
\begin{align}
    x+3&>0\\
    x&>-3\\[\jot]
    \therefore{}L
    &=(-3;\infty)
\end{align}

\medskip\noindent
Contoh 6
\begin{align}
    x^2-5x-6 &\ge0\\
    (x+1)(x-6) &\ge0
\end{align}

Jangan langsung dibuat $x \le -1$ atau $x \ge 6$, buat dulu kayak di bawah:
\begin{align*}
    x&=-1\\
    x&=6
\intertext{Artinya, $x = -1$ dan $x = 6$ adalah garis batas dan mereka termasuk.}
\end{align*}

Habis itu cek apakah dengan x di sebelah kiri dan kanan 2 dan 3 pertidsaksamaan di atas akan valid
\begin{align*}
\intertext{Untuk $x \le -1$}%%\\
    ((-2)^2)-5(-2)-6\ge0\\
    4+10-6\ge0\\
    8\ge0\\%%[1\baselineskip]
\intertext{Untuk $-1 \le x \le 6$}%%\\
    (0)^2-5(0)-6\ge0\\
    0-0-6\ge0\\
    -6\ge0\\%%[1\baselineskip]
\intertext{Untuk $x \ge 6$}%%\\
    (7^2)-5(7)-6\ge0\\
    49-35-6\ge0\\
    8\ge0\\[\jot]
    \therefore L=(-\infty;-1)\lor(6;\infty)
\end{align*}

\newpage
\noindent
Contoh 7
\begin{align*}
    |x+10|&=2x-3\\%%[1\baselineskip]
\intertext{Bagian Satu: Positif}%%\\
    (+1)(x+10)&=2x-3\\
    +(x+10)&=2x-3\\
    (x+10)&=2x-3\\
    x+10&=2x-3\\   
    x+10-10&=2x-3-10\\
    x&=2x-13\\
    x-2x&=2x-2x-13\\
    -x&=-13\\
    x&=13\\%%[1\baselineskip]
\intertext{Bagian Dua: Negatif}%%\\
    (-1)(x+10)&=2x+3\\
    -(x+10)&=2x+3\\
    -x-10&=2x+3\\
    -x-10+10&=2x+3+10\\
    -x&=2x+13\\
    -x-2x&=2x+13-2x\\
    -3x&=13\\
    x&=\frac{13}{3}\\[\jot]
    \therefore L&=\left\{13;\frac{13}{3}\right\}
\end{align*}

\newpage

\noindent
Contoh 8
\begin{align*}
    |2x-5|&> x+8\\%%[1\baselineskip]
\intertext{Bagian Satu: Positif}%%\\
    (2x-5)&=x+8\\
    2x-5-x&=x+8-x\\
    x-5&=8\\
    x-5+5&=8+5\\
    x&=13\\%%[1\baselineskip]
\intertext{Bagian Dua: Negatif}%%\\
    -(2x-5)&=x+8\\
    -2x+5&=x+8\\
    -2x+5-x&=x+8-x\\
    -3x+5&=8\\
    -3x+5-5&=8-5\\
    -3x&=3\\
    \frac{-3x}{-3}&=\frac{3}{-3}\\
    x&=-1\\
\intertext{Artinya, $x = -1$ dan $x = 13$ adalah garis batas, tapi mereka tidak termasuk.}
\end{align*}

Pas diurain, ga langsung pake tanda $\ge$, tapi pake sama dengan dulu, baru sekarang kita tes:
\begin{align*}
\intertext{Untuk $x < -1$ (-1 tidak termasuk)}%%\\
    |2(-2)-5|&>(-2)+8\\
    |-4-5|&>6\\
    |-9|&>6\\
    9&>6\\%%[1\baselineskip]
\intertext{Untuk $-1 < x < 13$}%%\\
    |2(0)-4|&>0+8\\
    |-4|&>8\\
    4&>8\\%%[1\baselineskip]
\intertext{Untuk $x > 13$ (13 tidak termasuk)}%%\\
    |2(13)-4|&>13+8\\
    |26-4|&>21\\
    |22|&>21\\
    22&>21\\%%[1\baselineskip]
\intertext{Seluruh $x$ yang memenuhi pertidaksamaan di atas hanyalah $x < -1$ atau $x > 13$}%%\\%%[1\baselineskip]
    \therefore L&=(\infty;-1)\lor(13;\infty)\,.
\end{align*}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .