Debian Codegraph @

texmf-dist/doc/latex/pst-flags/pst-flags-doc.tex

raw
1 %===============================================================================
2 % Source: pst-flags-doc.tex
3 % Remark: Manual for flags drawn using LaTeX package <pst-flags.sty>
4 % Author: Amit Manohar Manthanwar
5 % Mailer: [email protected]
6 % WebURL: https://manthanwar.github.io
7 % GitHub: https://github.com/manthanwar/PST-Flags
8 % Rights: Copyright (c)2022-2023 Amit Manohar Manthanwar
9 %-------------------------------------------------------------------------------
10 % This program can be redistributed and/or modified under the terms
11 % of the LaTeX Project Public License Distributed from CTAN archives
12 % in directory macros/latex/base/lppl.txt or web url
13 % https://www.latex-project.org/lppl.txt
14 %===============================================================================
15 %---------------+---------+----------------------------------------------------
16 % Revision Log | Author | Description
17 %---------------+---------+----------------------------------------------------
18 % 14-Dec-2022 | AMM | Initial Version
19 %---------------+---------+----------------------------------------------------
20 % 25-Dec-2022 | AMM | CTAN Review Updates
21 %---------------+---------+----------------------------------------------------
22 % 09-Jan-2023 | AMM | Removed xcolor
23 %---------------+---------+----------------------------------------------------
24 %---------------+---------+----------------------------------------------------
25 %---------------+---------+----------------------------------------------------
26 %===============================================================================
27 \documentclass{amm-pst-doc}
28 \usepackage{pst-flags}
29 \title{\vspace*{-10mm}
30 \texttt{pst-flags}: A PSTricks Package for Drawing Flags of Countries\\[2mm]
31 \Large{Version 2022/01/09}}
32 \author{Amit M. Manthanwar}
33 \date{}
34
35 \begin{document}
36 \maketitle
37 %\tableofcontents
38
39 \section{Introduction}
40 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}.
41
42 \subsection{About \texttt{pst-flags}}
43 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.
44
45 \subsection{License}
46 Copyright © 2022 Amit M. Manthanwar. Permission is granted to
47 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}.
48
49 \subsection{Feedback}
50 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}.
51
52 \subsection{Acknowledgements}
53 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}.
54
55 \section{Installation and usage of \texttt{pst-flags}}
56
57 \paragraph{Installation:}
58 As prerequisites for \texttt{pst-flags}, you need working
59 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
60 in your \TeX-input path, where \texttt{dvips} can
61 find it.
62
63 \paragraph{Dependencies:} This packages requires expl3, fp, xfp, pstricks and pst-all.
64
65 \paragraph{Usage:}
66 Load the packages \texttt{pstricks} and \texttt{pst-flags}
67 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:
68
69 \begin{verbatim}
70 \documentclass{article}
71 \usepackage{pst-flags}
72 \begin{document}
73 Flag of US: \rput(0,0){\flagUS[2]}
74 \end{document}
75 \end{verbatim}
76
77 \section{Sovereign State Flags}
78 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.
79
80 \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]}
81
82 \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}|
83
84 \vspace{5mm}
85 \begin{table}[!ht]
86 %\ttfamily
87 \centering%
88 \setlength{\tabcolsep}{1.5mm}%
89 \scriptsize%
90 \noindent\resizebox{\textwidth}{!}{%
91 \begin{tabular}{@{}ccc@{}}
92 \begin{tabular}{@{}lcr}
93 \textbf{Country} & \textbf{Code} & \textbf{AR} \\
94 Albania & AL & 5:7 \\
95 Algeria & DZ & 2:3 \\
96 American Samoa (US) & AS & 1:19 \\
97 Andorra & AD & 7:1 \\
98 Angola & AO & 2:3 \\
99 Anguilla (UK) & AI & 1:2 \\
100 Antigua and Barbuda & AG & 2:3 \\
101 Argentina & AR & 5:8 \\
102 Armenia & AM & 1:2 \\
103 Aruba (Netherlands) & AW & 2:3 \\
104 Australia & AU & 1:2 \\
105 Austria & AT & 2:3 \\
106 Azerbaijan & AZ & 1:2 \\
107 Bahamas & BS & 1:2 \\
108 Bahrain & BH & 3:5 \\
109 Bangladesh & BD & 3:5 \\
110 Barbados & BB & 2:3 \\
111 Belarus & BY & 1:2 \\
112 Belgium & BE & 13:15 \\
113 Belize & BZ & 3:5 \\
114 Benin & BJ & 2:3 \\
115 Bermuda (UK) & BM & 1:2 \\
116 Bhutan & BT & 2:3 \\
117 Bolivia & BO & 15:22 \\
118 Bosnia and Herzegovina & BA & 1:2 \\
119 Botswana & BW & 2:3 \\
120 Brazil & BR & 7:1 \\
121 British Indian Ocean Territory & IO & 1:2 \\
122 British Virgin Islands & VG & 1:2 \\
123 Brunei Darussalam & BN & 1:2 \\
124 Bulgaria & BG & 3:5 \\
125 Burkina Faso & BF & 2:3 \\
126 Burundi & BI & 3:5 \\
127 Cambodia & KH & 16:25 \\
128 Cameroon & CM & 2:3 \\
129 Canada & CA & 1:2 \\
130 Cayman Islands (UK) & KY & 1:2 \\
131 Central African Republic & CF & 2:3 \\
132 Chad & TD & 2:3 \\
133 Chile & CL & 2:3 \\
134 China & CN & 2:3 \\
135 Christmas Island (AU) & CX & 1:2 \\
136 Cocos (Keeling) Islands (AU) & CC & 1:2 \\
137 Colombia & CO & 2:3 \\
138 Comoros & KM & 3:5 \\
139 Congo, (Brazzaville) Republic & CG & 3:4 \\
140 Congo, (Kinshasa) Democratic & CD & 2:3 \\
141 Cook Islands (New Zealand) & CK & 1:2 \\
142 Costa Rica & CR & 3:5 \\
143 Croatia & HR & 1:2 \\
144 Cuba & CU & 1:2 \\
145 Cyprus & CY & 2:3 \\
146 Czech Republic & CZ & 2:3 \\
147 Denmark & DK & 28:37 \\
148 Djibouti & DJ & 2:3 \\
149 Dominica & DM & 1:2 \\
150 Dominican Republic & DO & 5:8 \\
151 Ecuador & EC & 2:3 \\
152 Egypt & EG & 2:3 \\
153 El Salvador & SV & 189:335 \\
154 Equatorial Guinea & GQ & 2:3 \\
155 Eritrea & ER & 1:2
156 \end{tabular}
157 & %
158 \begin{tabular}{lcr}
159 \textbf{Country} & \textbf{Code} & \textbf{AR} \\
160 Estonia & EE & 7:11 \\
161 Ethiopia & ET & 1:2 \\
162 Fiji & FJ & 1:2 \\
163 Finland & FI & 11:18 \\
164 France & FR & 2:3 \\
165 Gabon & GA & 3:4 \\
166 Gambia & GM & 2:3 \\
167 Georgia & GE & 2:3 \\
168 Germany & DE & 3:5 \\
169 Ghana & GH & 2:3 \\
170 Greece & GR & 2:3 \\
171 Guinea & GN & 2:3 \\
172 Guyana & GY & 3:5 \\
173 Hong Kong (CN) & HK & 2:3 \\
174 Hungary & HU & 1:2 \\
175 Iceland & IS & 18:25 \\
176 India & IN & 2:3 \\
177 Indonesia & ID & 2:3 \\
178 Iran & IR & 4:7 \\
179 Iraq & IQ & 2:3 \\
180 Ireland & IE & 1:2 \\
181 Israel & IL & 8:11 \\
182 Italy & IT & 2:3 \\
183 Jamaica & JM & 1:2 \\
184 Japan & JP & 2:3 \\
185 Jordan & JO & 1:2 \\
186 Kazakhstan & KZ & 1:2 \\
187 Kenya & KE & 2:3 \\
188 Korea, North & KP & 1:2 \\
189 Korea, South & KR & 2:3 \\
190 Kuwait & KW & 1:2 \\
191 Kyrgyzstan & KG & 3:5 \\
192 Latvia & LV & 1:2 \\
193 Lebanon & LB & 2:3 \\
194 Lesotho & LS & 2:3 \\
195 Liberia & LR & 1:19 \\
196 Libya & LY & 1:2 \\
197 Liechtenstein & LI & 3:5 \\
198 Lithuania & LT & 3:5 \\
199 Luxembourg & LU & 3:5 \\
200 Macedonia, North & MK & 1:2 \\
201 Madagascar & MG & 2:3 \\
202 Malawi & MW & 2:3 \\
203 Malaysia & MY & 1:2 \\
204 Maldives & MV & 2:3 \\
205 Mali & ML & 2:3 \\
206 Malta & MT & 2:3 \\
207 Mauritania & MR & 2:3 \\
208 Mauritius & MU & 2:3 \\
209 Mexico & MX & 4:7 \\
210 Moldova & MD & 1:2 \\
211 Monaco & MC & 4:5 \\
212 Mongolia & MN & 1:2 \\
213 Montenegro & ME & 1:2 \\
214 Morocco & MA & 2:3 \\
215 Mozambique & MZ & 2:3 \\
216 Myanmar & MM & 2:3 \\
217 Namibia & NA & 2:3 \\
218 Nauru & NR & 1:2 \\
219 Nepal & NP & 5:41 \\
220 Netherlands & NL & 2:3 \\
221 New Zealand & NZ & 1:2
222 \end{tabular}
223 & %
224 \begin{tabular}{lcr@{}}
225 \textbf{Country} & \textbf{Code} & \textbf{AR} \\
226 Nicaragua & NI & 3:5 \\
227 Niger & NE & 6:7 \\
228 Nigeria & NG & 1:2 \\
229 Norway & NO & 8:11 \\
230 Oman & OM & 1:2 \\
231 Pakistan & PK & 2:3 \\
232 Palau & PW & 5:8 \\
233 Palestinian Territory & PS & 1:2 \\
234 Panama & PA & 2:3 \\
235 Papua New Guinea & PG & 3:4 \\
236 Paraguay & PY & 11:2 \\
237 Peru & PE & 2:3 \\
238 Philippines & PH & 1:2 \\
239 Poland & PL & 5:8 \\
240 Portugal & PT & 2:3 \\
241 Puerto Rico (US) & PR & 2:3 \\
242 Qatar & QA & 11:28 \\
243 Romania & RO & 2:3 \\
244 Russian Federation & RU & 2:3 \\
245 Rwanda & RW & 2:3 \\
246 Saint Kitts and Nevis & KN & 2:3 \\
247 Saudi Arabia & SA & 2:3 \\
248 Senegal & SN & 2:3 \\
249 Serbia & RS & 2:3 \\
250 Seychelles & SC & 1:2 \\
251 Sierra Leone & SL & 2:3 \\
252 Singapore & SG & 2:3 \\
253 Slovakia & SK & 2:3 \\
254 Slovenia & SI & 1:2 \\
255 Solomon Islands & SB & 1:2 \\
256 Somalia & SO & 2:3 \\
257 South Africa & ZA & 2:3 \\
258 South Sudan & SS & 1:2 \\
259 Spain & ES & 2:3 \\
260 Sri Lanka & LK & 1:2 \\
261 Sudan & SD & 1:2 \\
262 Suriname & SR & 2:3 \\
263 Sweden & SE & 5:8 \\
264 Switzerland & CH & 1:1 \\
265 Syria & SY & 2:3 \\
266 Taiwan & TW & 2:3 \\
267 Tajikistan & TJ & 1:2 \\
268 Tanzania & TZ & 2:3 \\
269 Thailand & TH & 2:3 \\
270 Timor-Leste & TL & 1:2 \\
271 Togo & TG & 1:$\phi$ \\
272 Tonga & TO & 1:2 \\
273 Trinidad and Tobago & TT & 3:5 \\
274 Tunisia & TN & 2:3 \\
275 Turkey & TR & 2:3 \\
276 Uganda & UG & 2:3 \\
277 Ukraine & UA & 2:3 \\
278 United Arab Emirates & AE & 1:2 \\
279 United Kingdom & GB & 1:2 \\
280 United States of America & US & 1:19 \\
281 Uruguay & UY & 2:3 \\
282 Uzbekistan & UZ & 1:2 \\
283 Venezuela & VE & 2:3 \\
284 Viet Nam & VN & 2:3 \\
285 Yemen & YE & 2:3 \\
286 Zambia & ZM & 2:3 \\
287 Zimbabwe & ZW & 1:2
288 \end{tabular}
289 %
290 \end{tabular}
291 }%
292 \end{table}
293
294 \clearpage
295 \input{pst-flags-examples.tex}
296
297 \end{document}