Mengubah text alignment

Teks dalam dokumen LaTeX selalu rata kanan-kiri. Kalau ingin membuat teks rata kiri atau kanan saja, simak caranya berikut ini.

\documentclass[12pt,a5paper]{article}
\renewcommand*\rmdefault{bch}
\usepackage{kantlipsum}
\newlength{\normalparindent}
\setlength{\normalparindent}{\parindent}
\raggedright
\setlength{\parindent}{\normalparindent}
\begin{document}
\kant[1-3]
\end{document}

\raggedright membuat teks rata kiri. Kalau ingin teks rata kanan, ganti dengan \raggedleft

Rata kiri
Rata kiri

Bisa juga menggunakan paket ragged2e seperti ini:

\documentclass[12pt]{article}
\usepackage[a5paper]{geometry}
\renewcommand*\rmdefault{bch}
\usepackage{kantlipsum}
\usepackage{ragged2e}
\setlength\RaggedRightParindent{15pt}
\RaggedRight
\begin{document}
\kant[1-3]
\end{document}
ragged2e
ragged2e

Selamat mencoba, semoga bermanfaat.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s