<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%===============================================================================
% Source: pst-flags-doc.tex
% Remark: Manual for flags drawn using LaTeX package &lt;pst-flags.sty&gt;
% Author: Amit Manohar Manthanwar
% Mailer: manthanwar@hotmail.com
% WebURL: https://manthanwar.github.io
% GitHub: https://github.com/manthanwar/PST-Flags
% Rights: Copyright (c)2022-2023 Amit Manohar Manthanwar
%-------------------------------------------------------------------------------
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN archives
% in directory macros/latex/base/lppl.txt or web url
% https://www.latex-project.org/lppl.txt
%===============================================================================
%---------------+---------+----------------------------------------------------
% Revision Log  | Author  | Description
%---------------+---------+----------------------------------------------------
% 14-Dec-2022   | AMM     | Initial Version
%---------------+---------+----------------------------------------------------
% 25-Dec-2022   | AMM     | CTAN Review Updates
%---------------+---------+----------------------------------------------------
% 09-Jan-2023   | AMM     | Removed xcolor
%---------------+---------+----------------------------------------------------
%---------------+---------+----------------------------------------------------
%---------------+---------+----------------------------------------------------
%===============================================================================
\documentclass{amm-pst-doc}
\usepackage{pst-flags}
\title{\vspace*{-10mm}
\texttt{pst-flags}: A PSTricks Package for Drawing Flags of Countries\\[2mm]
\Large{Version 2022/01/09}}
\author{Amit M. Manthanwar}
\date{}

\begin{document}
\maketitle
%\tableofcontents

\section{Introduction}
This document is a reference manual for the \texttt{pst-flags} package. The package and its user manual are available in the CTAN archive \href{https://ctan.org/tex-archive/graphics/pstricks/contrib/pst-flags} {https://ctan.org/tex-archive/graphics/pstricks/contrib/pst-flags}.

\subsection{About \texttt{pst-flags}}
This package provides a number of macros for rendering flags of countries and their associated artefacts drawn using \LaTeX\ PSTricks package. This package further contributes towards a complete implementation of the vector drawing capabilities provided by PSTricks. Formatting of the resulting drawings is entirely controlled by the \TeX\ macros. A good working knowledge of LaTeX should be sufficient to design flags of sovereign countries and adapt them to create new designs. Features such as color or shape customisation and dynamic modifications are possible by cleverly adjusting the options supplied to the \TeX\ macros.

\subsection{License}
Copyright Â© 2022 Amit M. Manthanwar. Permission is granted to
copy, distribute and/or modify this software under the terms of the LaTeX Project Public License, \href{https://www.latex-project.org/lppl.txt}{LPPL Version 1.3c}.

\subsection{Feedback}
Please use the \texttt{pst-flags} project page on GitHub \href{https://github.com/manthanwar/pst-flags}{https://github.com/manthanwar/pst-flags} to report bugs and submit feature requests. Before making a feature request, please ensure that you have thoroughly studied this manual. If you do not want to report a bug or request a feature but are simply in need of assistance, you might want to consider posting your question on the comp.text.tex newsgroup or  \href{https://tex.stackexchange.com/questions/tagged/pst-flags} {TeX-LaTeX Stack Exchange}.

\subsection{Acknowledgements}
This package would not have been possible without the base \texttt{PSTricks} and its associated packages. The authors would like to acknowledge the valuable contributions made by the main \texttt{PSTricks} authors and by the broader \texttt{PST} community. The colors and construction sheets used to program macros are taken from the websites:   \href{https://www.flagcolorcodes.com/}{flagcolorcodes}, \href{https://en.wikipedia.org/wiki/Wiki}{wikipedia}, and \href{https://www.vexilla-mundi.com}{vexilla-mundi}.

\section{Installation and usage of \texttt{pst-flags}}

\paragraph{Installation:}
As prerequisites for \texttt{pst-flags}, you need working
versions of \LaTeX{} and \texttt{pstricks}. The style file \texttt{pst-flags.sty} and all corresponding \texttt{.tex} and \texttt{.eps} assets must be somewhere
in your \TeX-input path, where \texttt{dvips} can
find it.

\paragraph{Dependencies:} This packages requires expl3, fp, xfp, pstricks and pst-all.

\paragraph{Usage:}
Load the packages \texttt{pstricks} and \texttt{pst-flags}
in that order via the \texttt{usepackage} macro. Now you are ready to use the \texttt{pst-flags} macros within your document body. This macro is described in the next section with all its options. With the help of the following simple \LaTeX-source code, you can test whether you have correctly installed the package:

\begin{verbatim}
\documentclass{article}
\usepackage{pst-flags}
\begin{document}
Flag of US: \rput(0,0){\flagUS[2]}
\end{document}
\end{verbatim}

\section{Sovereign State Flags}
Flags come in many different height-to-width aspect ratios (AR). The flags of India \verb|\flagIN| and UK \verb|\flagUK| use the aspect ratios of 2:3 and 1:2 respectively. These are the most common aspect ratios used by over 80 and 50 countries respectively. The accuracy of colors, shapes, internal objects, and aspect ratio make the flag of a sovereign state unique. Width is the only option needed to draw the flag with macro appended with a two-letter country code which internally determines the corresponding height. To draw a flag with a specific height, use the aspect ratio from the table below to calculate the appropriate width and supply it in centimeters as the first argument of the macro in rectangular brackets. \texttt{PSTricks} macro \verb|\rput| and environment \verb|pspicture| can also be used and encouraged for accurate placement of the flags.

\paragraph{Example:} To draw \SI{1}{\centi\meter} wide flags use macros: \verb|\flagIN[1]|\; \flagIN[1]\ \hspace{10mm} \verb|\rput(0.1,0){\flagUK[1]}| \rput(0.1,0){\flagUK[1]}

\paragraph{Colors:} are defined using country code appended with standard flag color name \texttt{ukRed}, \texttt{inGreen}, \texttt{usBlue}, \texttt{deYellow}, etc. Usage: \verb|\usepackage{pst-flags-colors-html}| \verb|\pscircle[linecolor=usRed](0,0){2}|

\vspace{5mm}
\begin{table}[!ht]
    %\ttfamily
    \centering%
    \setlength{\tabcolsep}{1.5mm}%
    \scriptsize%
    \noindent\resizebox{\textwidth}{!}{%
        \begin{tabular}{@{}ccc@{}}
            \begin{tabular}{@{}lcr}
                \textbf{Country}               &amp; \textbf{Code} &amp; \textbf{AR} \\
                Albania                        &amp; AL            &amp; 5:7         \\
                Algeria                        &amp; DZ            &amp; 2:3         \\
                American Samoa (US)            &amp; AS            &amp; 1:19        \\
                Andorra                        &amp; AD            &amp; 7:1         \\
                Angola                         &amp; AO            &amp; 2:3         \\
                Anguilla (UK)                  &amp; AI            &amp; 1:2         \\
                Antigua and Barbuda            &amp; AG            &amp; 2:3         \\
                Argentina                      &amp; AR            &amp; 5:8         \\
                Armenia                        &amp; AM            &amp; 1:2         \\
                Aruba (Netherlands)            &amp; AW            &amp; 2:3         \\
                Australia                      &amp; AU            &amp; 1:2         \\
                Austria                        &amp; AT            &amp; 2:3         \\
                Azerbaijan                     &amp; AZ            &amp; 1:2         \\
                Bahamas                        &amp; BS            &amp; 1:2         \\
                Bahrain                        &amp; BH            &amp; 3:5         \\
                Bangladesh                     &amp; BD            &amp; 3:5         \\
                Barbados                       &amp; BB            &amp; 2:3         \\
                Belarus                        &amp; BY            &amp; 1:2         \\
                Belgium                        &amp; BE            &amp; 13:15       \\
                Belize                         &amp; BZ            &amp; 3:5         \\
                Benin                          &amp; BJ            &amp; 2:3         \\
                Bermuda (UK)                   &amp; BM            &amp; 1:2         \\
                Bhutan                         &amp; BT            &amp; 2:3         \\
                Bolivia                        &amp; BO            &amp; 15:22       \\
                Bosnia and Herzegovina         &amp; BA            &amp; 1:2         \\
                Botswana                       &amp; BW            &amp; 2:3         \\
                Brazil                         &amp; BR            &amp; 7:1         \\
                British Indian Ocean Territory &amp; IO            &amp; 1:2         \\
                British Virgin Islands         &amp; VG            &amp; 1:2         \\
                Brunei Darussalam              &amp; BN            &amp; 1:2         \\
                Bulgaria                       &amp; BG            &amp; 3:5         \\
                Burkina Faso                   &amp; BF            &amp; 2:3         \\
                Burundi                        &amp; BI            &amp; 3:5         \\
                Cambodia                       &amp; KH            &amp; 16:25       \\
                Cameroon                       &amp; CM            &amp; 2:3         \\
                Canada                         &amp; CA            &amp; 1:2         \\
                Cayman Islands (UK)            &amp; KY            &amp; 1:2         \\
                Central African Republic       &amp; CF            &amp; 2:3         \\
                Chad                           &amp; TD            &amp; 2:3         \\
                Chile                          &amp; CL            &amp; 2:3         \\
                China                          &amp; CN            &amp; 2:3         \\
                Christmas Island (AU)          &amp; CX            &amp; 1:2         \\
                Cocos (Keeling) Islands (AU)   &amp; CC            &amp; 1:2         \\
                Colombia                       &amp; CO            &amp; 2:3         \\
                Comoros                        &amp; KM            &amp; 3:5         \\
                Congo, (Brazzaville) Republic  &amp; CG            &amp; 3:4         \\
                Congo, (Kinshasa) Democratic   &amp; CD            &amp; 2:3         \\
                Cook Islands (New Zealand)     &amp; CK            &amp; 1:2         \\
                Costa Rica                     &amp; CR            &amp; 3:5         \\
                Croatia                        &amp; HR            &amp; 1:2         \\
                Cuba                           &amp; CU            &amp; 1:2         \\
                Cyprus                         &amp; CY            &amp; 2:3         \\
                Czech Republic                 &amp; CZ            &amp; 2:3         \\
                Denmark                        &amp; DK            &amp; 28:37       \\
                Djibouti                       &amp; DJ            &amp; 2:3         \\
                Dominica                       &amp; DM            &amp; 1:2         \\
                Dominican Republic             &amp; DO            &amp; 5:8         \\
                Ecuador                        &amp; EC            &amp; 2:3         \\
                Egypt                          &amp; EG            &amp; 2:3         \\
                El Salvador                    &amp; SV            &amp; 189:335     \\
                Equatorial Guinea              &amp; GQ            &amp; 2:3         \\
                Eritrea                        &amp; ER            &amp; 1:2
            \end{tabular}
             &amp; %
            \begin{tabular}{lcr}
                \textbf{Country} &amp; \textbf{Code} &amp; \textbf{AR} \\
                Estonia          &amp; EE            &amp; 7:11        \\
                Ethiopia         &amp; ET            &amp; 1:2         \\
                Fiji             &amp; FJ            &amp; 1:2         \\
                Finland          &amp; FI            &amp; 11:18       \\
                France           &amp; FR            &amp; 2:3         \\
                Gabon            &amp; GA            &amp; 3:4         \\
                Gambia           &amp; GM            &amp; 2:3         \\
                Georgia          &amp; GE            &amp; 2:3         \\
                Germany          &amp; DE            &amp; 3:5         \\
                Ghana            &amp; GH            &amp; 2:3         \\
                Greece           &amp; GR            &amp; 2:3         \\
                Guinea           &amp; GN            &amp; 2:3         \\
                Guyana           &amp; GY            &amp; 3:5         \\
                Hong Kong (CN)   &amp; HK            &amp; 2:3         \\
                Hungary          &amp; HU            &amp; 1:2         \\
                Iceland          &amp; IS            &amp; 18:25       \\
                India            &amp; IN            &amp; 2:3         \\
                Indonesia        &amp; ID            &amp; 2:3         \\
                Iran             &amp; IR            &amp; 4:7         \\
                Iraq             &amp; IQ            &amp; 2:3         \\
                Ireland          &amp; IE            &amp; 1:2         \\
                Israel           &amp; IL            &amp; 8:11        \\
                Italy            &amp; IT            &amp; 2:3         \\
                Jamaica          &amp; JM            &amp; 1:2         \\
                Japan            &amp; JP            &amp; 2:3         \\
                Jordan           &amp; JO            &amp; 1:2         \\
                Kazakhstan       &amp; KZ            &amp; 1:2         \\
                Kenya            &amp; KE            &amp; 2:3         \\
                Korea, North     &amp; KP            &amp; 1:2         \\
                Korea, South     &amp; KR            &amp; 2:3         \\
                Kuwait           &amp; KW            &amp; 1:2         \\
                Kyrgyzstan       &amp; KG            &amp; 3:5         \\
                Latvia           &amp; LV            &amp; 1:2         \\
                Lebanon          &amp; LB            &amp; 2:3         \\
                Lesotho          &amp; LS            &amp; 2:3         \\
                Liberia          &amp; LR            &amp; 1:19        \\
                Libya            &amp; LY            &amp; 1:2         \\
                Liechtenstein    &amp; LI            &amp; 3:5         \\
                Lithuania        &amp; LT            &amp; 3:5         \\
                Luxembourg       &amp; LU            &amp; 3:5         \\
                Macedonia, North &amp; MK            &amp; 1:2         \\
                Madagascar       &amp; MG            &amp; 2:3         \\
                Malawi           &amp; MW            &amp; 2:3         \\
                Malaysia         &amp; MY            &amp; 1:2         \\
                Maldives         &amp; MV            &amp; 2:3         \\
                Mali             &amp; ML            &amp; 2:3         \\
                Malta            &amp; MT            &amp; 2:3         \\
                Mauritania       &amp; MR            &amp; 2:3         \\
                Mauritius        &amp; MU            &amp; 2:3         \\
                Mexico           &amp; MX            &amp; 4:7         \\
                Moldova          &amp; MD            &amp; 1:2         \\
                Monaco           &amp; MC            &amp; 4:5         \\
                Mongolia         &amp; MN            &amp; 1:2         \\
                Montenegro       &amp; ME            &amp; 1:2         \\
                Morocco          &amp; MA            &amp; 2:3         \\
                Mozambique       &amp; MZ            &amp; 2:3         \\
                Myanmar          &amp; MM            &amp; 2:3         \\
                Namibia          &amp; NA            &amp; 2:3         \\
                Nauru            &amp; NR            &amp; 1:2         \\
                Nepal            &amp; NP            &amp; 5:41        \\
                Netherlands      &amp; NL            &amp; 2:3         \\
                New Zealand      &amp; NZ            &amp; 1:2
            \end{tabular}
             &amp; %
            \begin{tabular}{lcr@{}}
                \textbf{Country}         &amp; \textbf{Code} &amp; \textbf{AR} \\
                Nicaragua                &amp; NI            &amp; 3:5         \\
                Niger                    &amp; NE            &amp; 6:7         \\
                Nigeria                  &amp; NG            &amp; 1:2         \\
                Norway                   &amp; NO            &amp; 8:11        \\
                Oman                     &amp; OM            &amp; 1:2         \\
                Pakistan                 &amp; PK            &amp; 2:3         \\
                Palau                    &amp; PW            &amp; 5:8         \\
                Palestinian Territory    &amp; PS            &amp; 1:2         \\
                Panama                   &amp; PA            &amp; 2:3         \\
                Papua New Guinea         &amp; PG            &amp; 3:4         \\
                Paraguay                 &amp; PY            &amp; 11:2        \\
                Peru                     &amp; PE            &amp; 2:3         \\
                Philippines              &amp; PH            &amp; 1:2         \\
                Poland                   &amp; PL            &amp; 5:8         \\
                Portugal                 &amp; PT            &amp; 2:3         \\
                Puerto Rico (US)         &amp; PR            &amp; 2:3         \\
                Qatar                    &amp; QA            &amp; 11:28       \\
                Romania                  &amp; RO            &amp; 2:3         \\
                Russian Federation       &amp; RU            &amp; 2:3         \\
                Rwanda                   &amp; RW            &amp; 2:3         \\
                Saint Kitts and Nevis    &amp; KN            &amp; 2:3         \\
                Saudi Arabia             &amp; SA            &amp; 2:3         \\
                Senegal                  &amp; SN            &amp; 2:3         \\
                Serbia                   &amp; RS            &amp; 2:3         \\
                Seychelles               &amp; SC            &amp; 1:2         \\
                Sierra Leone             &amp; SL            &amp; 2:3         \\
                Singapore                &amp; SG            &amp; 2:3         \\
                Slovakia                 &amp; SK            &amp; 2:3         \\
                Slovenia                 &amp; SI            &amp; 1:2         \\
                Solomon Islands          &amp; SB            &amp; 1:2         \\
                Somalia                  &amp; SO            &amp; 2:3         \\
                South Africa             &amp; ZA            &amp; 2:3         \\
                South Sudan              &amp; SS            &amp; 1:2         \\
                Spain                    &amp; ES            &amp; 2:3         \\
                Sri Lanka                &amp; LK            &amp; 1:2         \\
                Sudan                    &amp; SD            &amp; 1:2         \\
                Suriname                 &amp; SR            &amp; 2:3         \\
                Sweden                   &amp; SE            &amp; 5:8         \\
                Switzerland              &amp; CH            &amp; 1:1         \\
                Syria                    &amp; SY            &amp; 2:3         \\
                Taiwan                   &amp; TW            &amp; 2:3         \\
                Tajikistan               &amp; TJ            &amp; 1:2         \\
                Tanzania                 &amp; TZ            &amp; 2:3         \\
                Thailand                 &amp; TH            &amp; 2:3         \\
                Timor-Leste              &amp; TL            &amp; 1:2         \\
                Togo                     &amp; TG            &amp; 1:$\phi$    \\
                Tonga                    &amp; TO            &amp; 1:2         \\
                Trinidad and Tobago      &amp; TT            &amp; 3:5         \\
                Tunisia                  &amp; TN            &amp; 2:3         \\
                Turkey                   &amp; TR            &amp; 2:3         \\
                Uganda                   &amp; UG            &amp; 2:3         \\
                Ukraine                  &amp; UA            &amp; 2:3         \\
                United Arab Emirates     &amp; AE            &amp; 1:2         \\
                United Kingdom           &amp; GB            &amp; 1:2         \\
                United States of America &amp; US            &amp; 1:19        \\
                Uruguay                  &amp; UY            &amp; 2:3         \\
                Uzbekistan               &amp; UZ            &amp; 1:2         \\
                Venezuela                &amp; VE            &amp; 2:3         \\
                Viet Nam                 &amp; VN            &amp; 2:3         \\
                Yemen                    &amp; YE            &amp; 2:3         \\
                Zambia                   &amp; ZM            &amp; 2:3         \\
                Zimbabwe                 &amp; ZW            &amp; 1:2
            \end{tabular}
            %
        \end{tabular}
    }%
\end{table}

\clearpage
\input{pst-flags-examples.tex}

\end{document}
</pre></body></html>