Contents

Drawing Turkish Flag

Scure everything, this article is still related to the previous article about draw the moon and stars.

After drawing the moon and stars, I remembered the Turkish flag, which apparently contains a crescent moon and stars. Finally I tried to draw the Turkish flag using LaTeX. Thank God it was successful and finally I had time to make a guide for Sira friends. Look at the following image.

bendera turki di latex

There is a box that says Turkish Flag, then a red rectangle containing a crescent moon and a star, and the position of the star is tilted to the left. Oh yes, from now on I will use the pronoun friend sira for all loyal readers of silagebra.com. Sobat sira is an acronym for silagebra friends 😉. Hope you like it, heeee….OK, let’s just discuss how to draw the Turkish flag using LaTeX. Prepare a cup of fragrant coffee ☕ and also rengginang to accompany our blogging, heee..

  1. Open your text editor, friend.

  2. Select the article document class and type the following command.

\documentclass{article}
  1. Determine the packages needed for drawing by typing the following command.
\usepackage{fancybox}\usepackage[x11names,dvipsnames]{xcolor}\definecolor{bulanbintang}{rgb} {255,255,255}\usepackage{tikz}\usetikzlibrary{shapes.geometric}
  1. If you want to provide the title, author, and creation date of the document, use the following command in the preamble.
\title{Bendera Turki}\author{Aan Triono }\date{\today}
  1. Entering the body of the document, type the following command to display the title, author and date of creation of the document at the same time so that the flag is positioned in the middle of the page.
\begin{document}\centering\maketitle
  1. Next, to create a box containing the Turkish Flag text, you can create it by writing the following command.
\huge \textcolor{red}{\shadowbox{Bendera Turki}}
  1. Then from the image above you can see that there is empty space/space between the text box and the flag image, so we write the vertical space command as follows, while also giving the command to start drawing.
\vspace{0.5cm}\begin{tikzpicture}
  1. Then we draw a red rectangular box using the following command.
\fill [red] (-5,-4) rectangle (8.5,3.5);

Up to this step, after you have compiled it, the results look like the following image.

bendera turki menggunakan latex

  1. Then we start drawing a white circle as a first step in drawing a crescent moon using the following command.
\fill[bulanbintang,even odd rule] (0,0) circle (2.5);

The compilation results will look like the following image.

lingkaran putih di latex

  1. Then we draw another second red circle, so that the first circle will change shape to a crescent moon using the following command.
\fill[red] (.54,0) circle (2);

The compilation results will look like the following image.

bulan sabit menggunakan latex

  1. Then to draw stars, we use the following command.
\fill[bulanbintang] (2.9,0) node [ regular polygon, regular polygon sides=5, inner sep=0pt, minimum size=1.5cm, ] (A) {} (A.corner 1)\foreach \i in{1, 3, 5, 2, 4} {-- (A.corner \i) } -- cycle;

The compilation results will look like the following image.

bendera turki menggunakan latex

  1. From the image in step 11, you can see that the position of the star is not tilted to the left. To tilt it we use the following command and put it in the \node option.
shape border rotate=20
  1. To conclude the drawing and document commands, we use the following command.
\end{tikzpicture}\end{document}

How are you, sir? Are the compilation results the same as the first image in this article? If not, please repeat the steps and pay attention to the instructions. Don’t miss anything or make a mistake in writing it. Thus the article on drawing the Turkish flag using LaTeX. If there are errors, please correct them, if you have input, please write it here and if you like it, please follow this blog ❤. I hope this is helpful.

Related Content