diff options
author | Karl Berry <karl@freefriends.org> | 2023-11-13 20:31:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-11-13 20:31:36 +0000 |
commit | 92018901f876d7d24f473c7963d78e3f955c0727 (patch) | |
tree | 46a8e5e38d971a0c1847322660d6280e85e0422b /Master/texmf-dist/doc/latex | |
parent | 12d26dee61a2fca90edfafa9b450377ec2b68b86 (diff) |
worldflags (13nov23)
git-svn-id: svn://tug.org/texlive/trunk@68827 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/worldflags/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/worldflags/worldflag_AT_1.pdf | bin | 0 -> 281477 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/worldflags/worldflag_IT-TO_1.pdf | bin | 0 -> 199108 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/worldflags/worldflags.pdf | bin | 2560111 -> 4880186 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/worldflags/worldflags.tex | 402 |
5 files changed, 279 insertions, 131 deletions
diff --git a/Master/texmf-dist/doc/latex/worldflags/README b/Master/texmf-dist/doc/latex/worldflags/README index c5b91beaa0b..5b4881c21b4 100644 --- a/Master/texmf-dist/doc/latex/worldflags/README +++ b/Master/texmf-dist/doc/latex/worldflags/README @@ -15,6 +15,12 @@ The description of every flag resides in a particular "flag description file". License: LaTeX Project Public License version 1.3 or above +Version 2023-11-12: + +- Bux fixes +- Some extensions +- Flags of Italian regions added + Wilhelm Haager -2021-05-12 +2023-11-12 diff --git a/Master/texmf-dist/doc/latex/worldflags/worldflag_AT_1.pdf b/Master/texmf-dist/doc/latex/worldflags/worldflag_AT_1.pdf Binary files differnew file mode 100644 index 00000000000..99df2a99e0b --- /dev/null +++ b/Master/texmf-dist/doc/latex/worldflags/worldflag_AT_1.pdf diff --git a/Master/texmf-dist/doc/latex/worldflags/worldflag_IT-TO_1.pdf b/Master/texmf-dist/doc/latex/worldflags/worldflag_IT-TO_1.pdf Binary files differnew file mode 100644 index 00000000000..8df5250850a --- /dev/null +++ b/Master/texmf-dist/doc/latex/worldflags/worldflag_IT-TO_1.pdf diff --git a/Master/texmf-dist/doc/latex/worldflags/worldflags.pdf b/Master/texmf-dist/doc/latex/worldflags/worldflags.pdf Binary files differindex 72047f48b9c..668fddbf4b6 100644 --- a/Master/texmf-dist/doc/latex/worldflags/worldflags.pdf +++ b/Master/texmf-dist/doc/latex/worldflags/worldflags.pdf diff --git a/Master/texmf-dist/doc/latex/worldflags/worldflags.tex b/Master/texmf-dist/doc/latex/worldflags/worldflags.tex index 6209b6a41bf..30045ab24f7 100644 --- a/Master/texmf-dist/doc/latex/worldflags/worldflags.tex +++ b/Master/texmf-dist/doc/latex/worldflags/worldflags.tex @@ -1,5 +1,6 @@ % ============================================================================= % Flags of the world with TikZ Wilhelm Haager, 2021-05-12 +% Version 2023-11-12 % ============================================================================= \documentclass[11pt,a4paper,headsepline,fleqn]{scrreprt} \usepackage[T1]{fontenc} @@ -45,6 +46,12 @@ \colorlet{rfcolor}{rcolor!50} % resultbox frame \colorlet{rtcolor}{rcolor!80} % resultbox text +\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X} +\def\arraystretch{1.25} +\def\topfraction{1} +\def\bottomfraction{1} +\def\textfraction{0} + \def\tb{\textbackslash} \let\ti=\textit \let\tt=\texttt @@ -53,7 +60,7 @@ \def\colwidth{45mm} % with of the left hand column in tables \def\command#1{{\color{emphcolor}\texttt{#1}}} -\parskip\bigskipamount +\parskip\medskipamount \parindent0pt @@ -86,26 +93,26 @@ \fcolorbox{tablefcolor}{tablecolor}% {\begin{minipage}{\pbwidth}#1\end{minipage}}}} -\long\def\codebox#1#2{\begin{minipage}[t]{#1\textwidth} +\long\def\codebox#1#2#3{\begin{minipage}[t]{#1\textwidth} \fboxsep1mm\fboxrule0.5pt% \newdimen\pbwidth\pbwidth\textwidth \advance\pbwidth by -2\fboxsep \advance\pbwidth by -2\fboxrule \fcolorbox{cfcolor}{cbcolor}% - {\begin{minipage}[t]{\pbwidth}% + {\begin{minipage}[t][#2][t]{\pbwidth}% {\footnotesize\sffamily\bfseries\color{ctcolor}Code:\\[\smallskipamount]}% - \footnotesize\ttfamily\color{codecolor}#2\end{minipage}} + \footnotesize\ttfamily\color{codecolor}#3\end{minipage}} \end{minipage}} -\long\def\resultbox#1#2{\begin{minipage}[t]{#1\textwidth} +\long\def\resultbox#1#2#3{\begin{minipage}[t]{#1\textwidth} \fboxsep1mm\fboxrule0.5pt% \newdimen\pbwidth\pbwidth\textwidth \advance\pbwidth by -2\fboxsep \advance\pbwidth by -2\fboxrule \fcolorbox{rfcolor}{rbcolor}% - {\begin{minipage}[t]{\pbwidth}% + {\begin{minipage}[t][#2][t]{\pbwidth}% {\footnotesize\sffamily\bfseries\color{rtcolor}Result:\\[\smallskipamount]}% - \small#2\end{minipage}} + \small#3\end{minipage}} \end{minipage}} % Weird hack from stackexchange to enable ยง as shortverb-character with utf8: @@ -122,7 +129,7 @@ \author{\slshape Wilhelm Haager\\\slshape wilhelm.haager@htlstp.ac.at} \vfill \vfill -\date{2021-05-12} +\date{2023-11-12} \vfill \maketitle @@ -182,11 +189,12 @@ and have been translated into Tikz via Inkscape % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \wideframe{ +\raggedright \textsl{Commands:}\\[\medskipamount] -\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}X@{}} +\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}Y@{}} {\m\color{emphcolor}\texttt{\tb worldflag[}\textit{opts}\texttt{]\{}\textit{xx}\texttt{\}}} & -draws the flag \textit{xx} with the optional parameters \textit{opts} as a particular TikZ-picture.\\[\medskipamount] +draws the flag \textit{xx} with the optional parameters \textit{opts} as a particular TikZ-picture.\\ {\m\color{emphcolor}\texttt{\tb flagsdefault[}\textit{opts}\texttt{]}} & sets default values for the options \textit{opts} for subsequent flags. @@ -194,34 +202,37 @@ sets default values for the options \textit{opts} for subsequent flags. \bigskip \textsl{Options:}\\[\medskipamount] -\begin{tabularx}{\textwidth}{@{}p{\colwidth}X@{}} +\begin{tabularx}{\textwidth}{@{}p{\colwidth}Y@{}} {\m\color{emphcolor}\texttt{width=}\textit{dimension}} & -sets the flag width, default: $15\,\mathrm{mm}$.\\[\medskipamount] +sets the flag width, default: $15\,\mathrm{mm}$.\\ {\m\color{emphcolor}\texttt{length=}\textit{dimension}} & -sets the flag length; if set to 0\,pt (default), the length is calculated according to the proper aspect ratio of the flag.\\[\medskipamount] +sets the flag length; if set to 0\,pt (default), the length is calculated according to the proper aspect ratio of the flag.\\ {\m\color{emphcolor}\texttt{framewidth=}\textit{dimension}} & -sets the line width of the frame around the flag, default: 0.2\,mm.\\[\medskipamount] +sets the line width of the frame around the flag, default: 0.2\,mm.\\ {\m\color{emphcolor}\texttt{framecolor=}\textit{colorname}} & -sets the color of the flag frame, default: \texttt{black!60}.\\[\medskipamount] +sets the color of the flag frame, default: \texttt{black!60}.\\ {\m\color{emphcolor}\texttt{stretch=}\textit{number}} & -controls stretching and shrinking of geometric shapes when the aspect ratio differs from its proper value.\\[\medskipamount] +controls stretching and shrinking of geometric shapes when the aspect ratio differs from its proper value.\\ {\m\color{emphcolor}\texttt{grid}} & -causes a millimeter-grid drawn on the flag as an aid for constructing new flags.\\[\medskipamount] +causes a millimeter-grid drawn on the flag as an aid for constructing new flags.\\ {\m\color{emphcolor}\texttt{noemblem}} & -supresses the drawing of an emblem, which is part of many flags.\\[\medskipamount] +supresses the drawing of an emblem, which is part of many flags.\\ {\m\color{emphcolor}\texttt{emblem}} & -enforces the drawing of an emblem onto the flag which is otherwise supressed (currently only applies to the flags of Austria and Germany).\\[\medskipamount] +enforces the drawing of an emblem onto the flag which is otherwise supressed (currently only applies to the flags of Austria and Germany).\\ {\m\color{emphcolor}\texttt{emblemdefault}} & -restores the default behavior for drawing emblems.\\[\medskipamount] +restores the default behavior for drawing emblems.\\ +{\m\color{emphcolor}\texttt{variant=}\textit{x}} +& +selects a variant \textit{x} of a flag (default: 0).\\ \end{tabularx}} % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -247,11 +258,11 @@ If both dimensions are specified, flags loose their proper aspect ratio but get the same size: %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.45}{\tb worldflag\{CH\}\\\tb worldflag\{GB\}\\ +\codebox{0.45}{38mm}{\tb worldflag\{CH\}\\\tb worldflag\{GB\}\\ proper sizes\tb\tb[6pt]\\ \tb worldflag[length=22.5mm]\{CH\}\\\tb worldflag[length=22.5mm]\{GB\}\\ distorted}\hfill -\resultbox{0.54}{\worldflag{CH} \worldflag{GB} proper sizes\\[6pt] +\resultbox{0.54}{38mm}{\worldflag{CH} \worldflag{GB} proper sizes\\[6pt] \worldflag[length=22.5mm]{CH} \worldflag[length=22.5mm]{GB} distorted} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -278,12 +289,12 @@ Canada: & \command{stretch=0} & The \emph{size} of the maple leaf remains unchan \end{tabularx} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.45}{ +\codebox{0.45}{20mm}{ \tb flagsdefault[width=12mm] \tb worldflag\{CA\}\\ \tb worldflag[length=18mm]\{CA\}\\ \tb worldflag[length=18mm,stretch=1]\{CA\} }\hfill -\resultbox{0.54}{% +\resultbox{0.54}{20mm}{% \flagsdefault[width=12mm] \worldflag{CA} \worldflag[length=18mm]{CA} @@ -297,12 +308,12 @@ Denmark: & \command{stretch=0} & The \emph{distance} from the vertical bar to th \end{tabularx} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.45}{ +\codebox{0.45}{20mm}{ \tb flagsdefault[width=12mm] \tb worldflag\{DK\}\\ \tb worldflag[length=18mm]\{DK\}\\ \tb worldflag[length=18mm,stretch=1]\{DK\} }\hfill -\resultbox{0.54}{% +\resultbox{0.54}{20mm}{% \flagsdefault[width=12mm] \worldflag{DK} \worldflag[length=25mm]{DK} @@ -322,12 +333,12 @@ If \command{framewidth} is set to 0\,mm (or 0\,pt), no frame is drawn at all. \flagsdefault[length=0mm,width=15mm] %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.45}{ +\codebox{0.45}{20mm}{ \tb flagsdefault[framecolor=blue] \tb worldflag[grid]\{IT\}\\ \tb worldflag[framewidth=1mm]\{IT\}\\ \tb worldflag[framewidth=0mm]\{IT\} }\hfill -\resultbox{0.54}{% +\resultbox{0.54}{20mm}{% \flagsdefault[framecolor=blue] \worldflag[grid]{IT} \worldflag[framewidth=1mm]{IT} @@ -350,15 +361,15 @@ Some flags don't have an emblem by default, but an emblem is available for special purposes. In that case the depiction of the emblem can be enforced with the option \command{emblem}. -Currently that only applies to the country flags of Austria and Germany -(more will come). +Currently that only applies to the country flags of Austria, Germany +and Spain (more will come). The option \command{emblemdefault} restores the default behavior for drawing emblems. \flagsdefault[length=25mm,width=15mm] %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.45}{% +\codebox{0.45}{37mm}{% \tb worldflag\{AT\}\\ \tb worldflag[emblem]\{AT\}\\ \tb worldflag[noemblem]\{AT\}\tb\tb[6pt]\\ @@ -366,7 +377,7 @@ emblems. \tb worldflag[emblem]\{HR\}\\ \tb worldflag[noemblem]\{HR\}% }\hfill -\resultbox{0.54}{% +\resultbox{0.54}{37mm}{% \worldflag{AT} \worldflag[emblem]{AT} \worldflag[noemblem]{AT}\\[6pt] @@ -380,6 +391,28 @@ emblems. The emblem (i.\,e. the coat of arms) in the Austrian flag is supressed by default, the emblem in the Croatian flag is depicted default. +Some flags have several variants on disposal which can vary in geometry, colors etc. +A certain variant is selected by the option \command{variant} (default: 0). +For example, the flag of the Italian region Veneto has a variant with a +quadratic flag area and appended stripes, as well as a variant with a rectangular +flag area where the stripes are included: + +\flagsdefault[length=37mm,width=25mm] +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\codebox{0.45}{29mm}{% + \tb worldflag\{IT-VE\}\\ + \tb worldflag[variant=1]\{IT-VE\}\\ + }\hfill +\resultbox{0.54}{29mm}{% + \worldflag{IT-VE} + \worldflag[variant=1]{IT-VE}% + } +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some flags with complex elements (e.\,g. the Austrian flag with emblem) have +an additional variant with an included pdf-Image instead of \emph{TikZ}-code. +Putting up with some loss in flexibility, that saves memory and computing time. + \section{Flags as picture elements within a TikZ-picture}\label{SECTION_PIC} % ------------------------------------------------ @@ -400,69 +433,71 @@ Hence every flag has special coordinates for referencing: \end{tabular} } -\newpage - +\medskip +Some additional options for rotating and shearing a flag are available. % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \wideframe{ -\textsl{Commands:}\\[\medskipamount] +\textsl{Command:}\\ \begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}X@{}} {\m\color{emphcolor}\makebox[0pt][l]{\texttt{\tb pic (}\textit{xy}\texttt{) [country=}\textit{xx\,, \dots}\texttt{]~at }\textit{pos}\texttt{ \{worldflag\};}}} & \\ -& draws the flag \textit{xx} and gives it the name \textit{xy}; the flag is centerd at the coordinate \textit{pos}.\\[\medskipamount] -{\m\color{emphcolor}\texttt{\tb flagsdefault[}\textit{opts}\texttt{]}} -& -sets default values for the options \textit{opts}. +& draws the flag \textit{xx} and gives it the name \textit{xy}; the flag is centerd at the coordinate \textit{pos}.\\ +%{\m\color{emphcolor}\texttt{\tb flagsdefault[}\textit{opts}\texttt{]}} +%& +%sets default values for the options \textit{opts}. \end{tabularx} -\bigskip -\textsl{Options:}\\[\medskipamount] -\begin{tabularx}{\textwidth}{@{}p{\colwidth}X@{}} -{\m\color{emphcolor}\texttt{width=}\textit{dimension}} -& -sets the flag width, default: $15\,\mathrm{mm}$.\\[\medskipamount] -{\m\color{emphcolor}\texttt{length=}\textit{dimension}} -& -sets the flag length; if set to 0\,pt (default), the length is calculated according to the proper aspect ratio of the flag.\\[\medskipamount] -{\m\color{emphcolor}\texttt{framewidth=}\textit{dimension}} -& -sets the line width of the frame around the flag, default: 0.2\,mm.\\[\medskipamount] -{\m\color{emphcolor}\texttt{framecolor=}\textit{colorname}} -& -sets the color of the flag frame, default: \texttt{black!60}.\\[\medskipamount] -{\m\color{emphcolor}\texttt{stretch=}\textit{number}} -& -controls stretching and shrinking of geometric shapes when the aspect ratio differs from its proper value.\\[\medskipamount] -{\m\color{emphcolor}\texttt{grid}} -& -causes a millimeter-grid drawn on the flag.\\[\medskipamount] -{\m\color{emphcolor}\texttt{noemblem}} -& -supresses the drawing of an emblem onto the flag.\\[\medskipamount] -{\m\color{emphcolor}\texttt{emblem}} -& -enforces the drawing of an emblem onto the flag.\\[\medskipamount] -{\m\color{emphcolor}\texttt{emblemdefault}} -& -restores the default behavior for drawing emblems.\\[\medskipamount] +\medskip +%\textsl{Options:}\\ +\textsl{Additional Options:}\\ +\begin{tabularx}{\textwidth}{@{}p{\colwidth}Y@{}} +% {\m\color{emphcolor}\texttt{width=}\textit{dimension}} +% & +% sets the flag width, default: $15\,\mathrm{mm}$.\\ +% {\m\color{emphcolor}\texttt{length=}\textit{dimension}} +% & +% sets the flag length; if set to 0\,pt (default), the length is calculated according to the proper aspect ratio of the flag.\\ +% {\m\color{emphcolor}\texttt{framewidth=}\textit{dimension}} +% & +% sets the line width of the frame around the flag, default: 0.2\,mm.\\ +% {\m\color{emphcolor}\texttt{framecolor=}\textit{colorname}} +% & +% sets the color of the flag frame, default: \texttt{black!60}.\\ +% {\m\color{emphcolor}\texttt{stretch=}\textit{number}} +% & +% controls stretching and shrinking of geometric shapes when the aspect ratio differs from its proper value.\\ +% {\m\color{emphcolor}\texttt{grid}} +% & +% causes a millimeter-grid drawn on the flag.\\ +% {\m\color{emphcolor}\texttt{noemblem}} +% & +% supresses the drawing of an emblem onto the flag.\\ +% {\m\color{emphcolor}\texttt{emblem}} +% & +% enforces the drawing of an emblem onto the flag.\\ +% {\m\color{emphcolor}\texttt{emblemdefault}} +% & +% restores the default behavior for drawing emblems.\\ {\m\color{emphcolor}\texttt{rotate=}$\alpha$} & -rotates the flag $\alpha$ degrees around its center.\\[\medskipamount] +rotates the flag $\alpha$ degrees around its center.\\ {\m\color{emphcolor}\texttt{turn=}$\beta$} & -rotates the flag $\beta$ degrees around the (imaginary) flagpole.\\[\medskipamount] +rotates the flag $\beta$ degrees around the (imaginary) flagpole.\\ {\m\color{emphcolor}\texttt{hang=}$\gamma$} & -lets the flag ``hang down'' $\gamma$ degrees from the (imaginary) flag pole.\\[\medskipamount] +lets the flag ``hang down'' $\gamma$ degrees from the (imaginary) flag pole. \end{tabularx}} % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\medskip The following example illustrates the usage of the special coordinates: \flagsdefault[length=25mm,width=15mm] %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.63}{% - \tb begin{tikzpicture}[draw=cyan,>=stealth,x=1mm,y=1mm]\\ +\codebox{0.63}{58mm}{% + \tb begin\{tikzpicture\}[draw=cyan,>=stealth,x=1mm,y=1mm]\\ \tb pic (de) [country=DE,emblem] \{worldflag\};\\ \tb draw (de-e){-}-++(45:5)\\ \xx6 node [above right,cyan] \{fly\};\\ @@ -471,9 +506,9 @@ The following example illustrates the usage of the special coordinates: \tb draw (de-nw)--++(-5,0) (de-sw)--++(-5,0);\\ \tb draw [<->] (\$(de-nw)-(4,0)\$){-}-(\$(de-sw)-(4,0)\$)\\\mbox{}~~~~~~node [midway,above,rotate=90,cyan] \{width\};\\ \tb draw [<->] (\$(de-sw)-(0,6)\$){-}-(\$(de-se)-(0,6)\$)\\\mbox{}~~~~~~node [midway,above,cyan] \{length\};\\ - \tb end{tikzpicture}% + \tb end\{tikzpicture\}% }\hfill -\resultbox{0.36}{% +\resultbox{0.36}{58mm}{% \begin{tikzpicture}[draw=cyan,>=stealth,x=1mm,y=1mm] \pic (de) [country=DE,emblem] {worldflag}; \draw (de-e)--++(45:5) node [above right,cyan] {fly}; @@ -487,10 +522,6 @@ The following example illustrates the usage of the special coordinates: } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% ************************************************************************** -% \fi % Ende Kommentar -% ************************************************************************** - \newpage The option \command{rotate} causes the flag to be rotated around the flag center with a given angle in degree. @@ -502,7 +533,7 @@ Hence it is \emph{not} possible to give it a default value with the command \texttt{flagsdefault}. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.53}{% +\codebox{0.53}{70mm}{% \tb begin\{tikzpicture\}\\ \tb flagsdefault[width=12mm,length=18mm]\\ \tb foreach \tb c/\tb n in \{HU/0,SK/1,IT/6,SI/7\}\\ @@ -513,7 +544,7 @@ with the command \texttt{flagsdefault}. \xx7 at (\tb n*45:24mm) \{worldflag\};\\ \tb end\{tikzpicture\} }\hfill -\resultbox{0.46}{% +\resultbox{0.46}{70mm}{% \begin{tikzpicture} \flagsdefault[width=12mm,length=18mm] \foreach \c/\n in {HU/0,SK/1,IT/6,SI/7} @@ -524,6 +555,7 @@ with the command \texttt{flagsdefault}. } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\medskip The option \command{turn} lets the flag rotate around the imaginary flagpole with a given angle $\beta$ (in degrees). The length of the flag will \emph{seemingly} shrink with a factor of $\cos\beta$. @@ -536,7 +568,7 @@ The following example shows a combination of \command{rotate}, \command{turn} and \command{hang}. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.53}{% +\codebox{0.53}{75mm}{% \tb begin\{tikzpicture\}[x=1mm,y=1mm]\\ \tb def\tb w\{30\}\\ \tb def\tb d\{20\}\\ @@ -556,7 +588,7 @@ The following example shows a combination of \xx6(us-nw)-|++(2,-60)-|cycle;\\ \tb end\{tikzpicture\} }\hfill -\resultbox{0.46}{% +\resultbox{0.46}{75mm}{% \begin{tikzpicture}[x=1mm,y=1mm] \def\w{30} \def\d{20} @@ -575,7 +607,7 @@ The following example shows a combination of \chapter{Internals} % -------------------------------------------------------------------------- -This section is intended for those who want to \emph{extend} the worldflag +This section is intended for those who want to \emph{extend} the worldflags package and {create} new flags. Those who just want to \emph{use} the package and {draw} existing flags, need not read it. @@ -671,25 +703,30 @@ are used in the code for the flag description: % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \wideframe{ -\textsl{Dimension registers:}\\[\medskipamount] -\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}X@{}} +\textsl{Dimension registers:}\\ +\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}Y@{}} {\m\color{emphcolor}\texttt{\tb flagwidth}} & -width of the flag (vertical extent)\\[\medskipamount] +width of the flag (vertical extent)\\ {\m\color{emphcolor}\texttt{\tb flaglength}} & -length of the flag (horizontal extent)\\[\medskipamount] +length of the flag (horizontal extent)\\ \end{tabularx} \bigskip \begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}X@{}} -\textsl{Macro:}\\[\medskipamount] +\textsl{Macros:}\\ {\m\color{emphcolor}\texttt{\tb stretchfactor}} & -factor for stretching of certain geometries\\[\medskipamount] +factor for stretching of certain geometries\\ +{\m\color{emphcolor}\texttt{\tb flagvariant}} +& +contains a single digit (or letter) for branching the code to a particular +variant\\ \end{tabularx}} % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\medskip \command{\tb flagwidth} and \command{\tb flaglength} specify the width and length of a flag. They are set by the user with the options \command{width} and \command{length} @@ -704,6 +741,7 @@ i.\,e. when the aspect ratio differs from its proper value. It is calculated from the user option \command{stretch} (stored in the macro \command{\tb flagstretch}) as follows and can be used in the flag description: + \[ f_s = 1 + \frac{l-l_0}{l_0}\cdot s, \quad \parbox[t]{0.7\textwidth}{% @@ -724,7 +762,7 @@ the white diamonds keep their \emph{relative positions} on the flag in that case. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.70}{% +\codebox{0.70}{70mm}{% \tb def\tb diamond\#1\#2\{\tb begin\{scope\}[shift=\{\#2\}] \\ \xx4\tb fill [\#1] (3/20,0)--(0,4/20)--(-3/20,0)--(0,-4/20); \\ \xx4\tb end\{scope\}\}\% \\ @@ -743,7 +781,7 @@ in that case. \tb def\tb flagstretch\{1\}% \\ \tb drawflag } -\resultbox{0.29}{% +\resultbox{0.29}{70mm}{% \def\diamond#1#2{% \begin{scope}[shift={#2}] \fill [#1] (3/20,0)--(0,4/20)--(-3/20,0)--(0,-4/20); @@ -765,6 +803,51 @@ in that case. } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\medskip +By checking the macro \command{\tb flagvariant}, +which has to expand to a single digit or character, +\TeX-code can be executed conditionally by use of +\command{\tb if...\tb else...\tb fi}. +The following example demonstrates two variants of a flag: + +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\codebox{0.75}{66mm}{% + \tb def\tb drawflag\{\% \\ + \xx4\tb begin\{tikzpicture\} \\ + \xx4\tb begin\{flagdescription\}\{2/3\} \\ + \xx4\xx3\tb background\{cyan\} \\ + \xx4\xx3\tb if\tb flagvariant0 \\ + \xx4\xx3\xx3\tb fill [white] (0.5\tb flaglength,0.5) circle \{0.3\};\\ + \xx4\xx3\tb else \\ + \xx4\xx3\xx3\tb fill [white] (0.5\tb flaglength,0.5) ++(-0.3,-0.3) \\ + \xx4\xx3\xx3\xx5 rectangle ++(0.6,0.6); \\ + \xx4\xx3\tb fi \\ + \xx4\tb end\{flagdescription\} \\ + \xx4\tb end\{tikzpicture\}\}\% \\ + \tb def\tb flagvariant\{0\}\% \\ + \tb drawflag \\ + \tb def\tb flagvariant\{1\} \\ + \tb drawflag + } +\resultbox{0.24}{66mm}{% + \def\drawflag{% + \begin{tikzpicture} + \begin{flagdescription}{2/3} + \background{cyan} + \if\flagvariant0 + \fill [white] (0.5\flaglength,0.5) circle (0.3); + \else + \fill [white] (0.5\flaglength,0.5) ++(-0.3,-0.3) rectangle ++(0.6,0.6); + \fi + \end{flagdescription} + \end{tikzpicture}}% + \def\flagvariant{0}% + \drawflag\par\medskip + \def\flagvariant{1} + \drawflag +} +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + \section{Commands}\label{SEC_MACROS} % ---------------------------------- @@ -775,88 +858,88 @@ the visibility of those commands is confined to the environment \command{flagdescription}. - % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\begin{figure}[t] \wideframe{ -\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}>{\RaggedRight}X@{}} +\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}>{\RaggedRight}Y@{}} {\m\color{emphcolor}\tt{\tb begin\{flagdescription\}\{}$\xi$\tt{\}}} & \\ \qquad $\vdots$ & \\ {\m\color{emphcolor}\tt{\tb end\{flagdescription\}}} & -environment for the flag with aspect ratio $\xi$\\[\medskipamount] +environment for the flag with aspect ratio $\xi$\\ \end{tabularx} \bigskip \begin{tabularx}{\textwidth}{@{}>{\RaggedRight}p{\colwidth}X@{}} \textsl{Geometric flag elements:} -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb framecode\{}\ti{path}\tt{\}}} & drawing path for the frame around the flag; if \emph{path} is empty, a rectangular frame is drawn. -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb hstripesII\{}{$c_1$}\tt{\}\{}{$c_2$}\tt{\}}} & partitions the flag into two horizontal stripes with the colors $c_1$ and $c_2$. -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb hstripesIII\{}{$c_1$}\tt{\}\{}{$c_2$}\tt{\}\{}{$c_3$}\tt{\}}} & three horizontal stripes with the colors $c_1$, \dots\ $c_3$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb hstripesIV\{}{$c_1$}\tt{\}\{}{$c_2$}\tt{\}\{}{$c_3$}\tt{\}\{}{$c_4$}\tt{\}}} & \qquad four horizontal stripes with the colors $c_1$, \dots\ $c_4$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb vstripesII\{}{$c_1$}\tt{\}\{}{$C_2$}\tt{\}}} & partitions the flag into two vertical stripes with the colors $c_1$ and $c_2$. -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb vstripesIII\{}{$c_1$}\tt{\}\{}{$c_2$}\tt{\}\{}{$c_3$}\tt{\}}} & three vertical stripes with the colors $c_1$, \dots\ $c_3$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb hbar\{}{$c$}\tt{\}\{}{$y$}\tt{\}\{}{$w$}\tt{\}}} & horizontal bar with the color $c$ and the line width $w$ at the \ti{y}-coordinate $y$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb vbar\{}{$c$}\tt{\}\{}{$x$}\tt{\}\{}{$w$}\tt{\}}} & vertical bar with the color $c$ and the line width $w$ at the \ti{x}-coordinate $x$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb chevron\{}{$c$}\tt{\}\{}{$x$}\tt{\}}} & isosceles triangle at the hoist with the color $c$ and the vertex at the \ti{x}-coordinate $x$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb starV\{}{$c$}\tt{\}\{}{$p$}\tt{\}\{}{$r$}\tt{\}\{}{$\alpha$}\tt{\}}} & 5-pointed star as a compex polygon with the fill color $c$, an outer raduis $r$, an angle $\alpha$ at the coordinate $p$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb starVI\{}{$c$}\tt{\}\{}{$p$}\tt{\}\{}{$r$}\tt{\}\{}{$\alpha$}\tt{\}}} & 6-pointed star as a compex polygon with the fill color $c$, an outer raduis $r$, an angle $\alpha$ at the coordinate $p$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb starn\{}{$c$}\tt{\}\{}{$n$}\tt{\}\{}{$p$}\tt{\}\{}{$r_1$}\tt{\}\{}{$r_2$}\tt{\}\{}{$\alpha$}\tt{\}}} -& \qquad n-pointed star with the fill color $c$, an outer raduis $r_1$, an inner raduis $r_2$ and an angle $\alpha$ at the coordinate $p$ -\\[\medskipamount] % -------------------------- +& \qquad n-pointed star with color $c$, an outer raduis $r_1$, an inner raduis $r_2$ and an angle $\alpha$ at the coordinate $p$ +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb moon\{}{$c$}\tt{\}\{}{$p_1$}\tt{\}\{}{$r_1$}\tt{\}\{}{$p_2$}\tt{\}\{}{$r_2$}\tt{\}}} & crescent moon with the fill color $c$, as a difference set of two generating circles with the radii $r_1$, $r_2$, and center coordinates $p_1$ and $p_2$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- {\m\color{emphcolor}\tt{\tb unionjack\{}{$x_1$}\tt{\}\{}{$y_1$}\tt{\}\{}{$x_2$}\tt{\}\{}{$y_2$}\tt{\}}} & \qquad Union Jack between the coordinates $(x_1,y_1)$ and $(x_2,y_2)$ -\\[\medskipamount] % -------------------------- +\\ % -------------------------- \end{tabularx}} % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -\medskip +\end{figure} +\newpage The macros \command{\tb hstripesII}, \command{\tb hstripesIII}, \command{\tb hstripesIV}, \command{\tb vstripesII}, \command{\tb vstripesIII} partition the flag into an according number of horizontal or vertical colored stripes. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - \codebox{0.65}{% + \codebox{0.65}{27mm}{% \tb begin\{tikzpicture\} \tb begin\{flagdescription\}\{3/4\} \\ \xx3\tb hstripesIII\{cyan\}\{white\}\{red\}\\ \tb end\{flagdescription\} - \tb end\{tikzpicture\} \\ - \tb quad \\ + \tb end\{tikzpicture\} \tb quad \\ \tb begin\{tikzpicture\} \tb begin\{flagdescription\}\{3/4\} \\ \xx3\tb vstripesIII\{cyan\}\{white\}\{red\}\\ \tb end\{flagdescription\} \tb end\{tikzpicture\} \\ }\hfill -\resultbox{0.34}{% +\resultbox{0.34}{27mm}{% \begin{tikzpicture} \begin{flagdescription}{3/4} \hstripesIII{cyan}{white}{red} @@ -871,6 +954,7 @@ according number of horizontal or vertical colored stripes. } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\medskip \command{\tb background} fills the entire rectangular area of the flag with color; note: a flag needs neither a frame around it nor a background on principle. \command{\tb hbar} draws a horizontal bar of given width and color @@ -880,7 +964,7 @@ at a specified \ti{y}-coordinate across the flag; the hoist. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - \codebox{0.65}{% + \codebox{0.65}{46mm}{% \tb begin\{tikzpicture\} \tb begin\{flagdescription\}\{3/4\} \\ \xx3\tb background\{cyan\} \\ @@ -896,7 +980,7 @@ the hoist. \tb end\{flagdescription\} \tb end\{tikzpicture\} }\hfill -\resultbox{0.34}{% +\resultbox{0.34}{46mm}{% \begin{tikzpicture} \begin{flagdescription}{3/4} \background{cyan} @@ -914,7 +998,8 @@ the hoist. } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\command{\tb Union Jack} draws the Union Jack +\medskip +\command{\tb unionjack} draws the Union Jack (which is part of a couple of flags) between a lower left and an upper right point. Their coordinates -- $x_1$, $y_1$, $x_2$,$y_2$ -- are separate @@ -924,7 +1009,7 @@ The colors \command{blue}, \command{red} and \command{white} can be redefined arbitrarily. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.65}{% +\codebox{0.65}{46mm}{% \tb begin\{tikzpicture\} \tb begin\{flagdescription\}\{3/4\} \\ \tb unionjack\{0mm\}\{0mm\}\{\tb flaglength\}\{\tb flagwidth\} \\ @@ -940,7 +1025,7 @@ can be redefined arbitrarily. \tb end\{flagdescription\} \tb end\{tikzpicture\} \\ } -\resultbox{0.34}{% +\resultbox{0.34}{46mm}{% \begin{tikzpicture} \begin{flagdescription}{3/4} \unionjack{0mm}{0mm}{\flaglength}{\flagwidth} @@ -958,13 +1043,14 @@ can be redefined arbitrarily. } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\medskip The various types of stars \command{\tb starV} \command{\tb starVI} \command{\tb starn} and \command{\tb moon} are self-explanatory. In the following example \tt{\tb starn} and \tt{\tb moon} are overlayed with the generating circles. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\codebox{0.65}{% +\codebox{0.65}{55mm}{% \tb begin\{tikzpicture\} \tb begin\{flagdescription\}\{1/3\}\\ \xx3\tb background\{cyan\}\\ @@ -985,7 +1071,7 @@ are overlayed with the generating circles. \tb end\{flagdescription\} \tb end\{tikzpicture\} } -\resultbox{0.34}{% +\resultbox{0.34}{55mm}{% \begin{tikzpicture} \begin{flagdescription}{1/3} \background{cyan} @@ -1008,10 +1094,12 @@ are overlayed with the generating circles. } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\iftrue % -------------------------------------------------------------------------- \chapter{Flags}\label{FLAGS} % -------------------------------------------------------------------------- +%\iffalse \flagsdefault[width=18mm,length=30mm,stretch=0.5] \section{National Flags of sovereign states} @@ -1134,6 +1222,7 @@ are overlayed with the generating circles. \show{Mexico}{MX} \show{Micronesia}{FM} \show{Moldova}{MD} +\show{Monaco}{MC} \show{Mongolia}{MN} \show{Montenegro}{ME} \show{Morocco}{MA} @@ -1215,6 +1304,20 @@ are overlayed with the generating circles. \show{Zambia}{ZM} \show{Zimbabwe}{ZW} +\subsection*{Variants} +% -------------------- + +\flaggenprozeile{4} +\flagsdefault[emblem,variant=0]\show{Austria: Variant 0}{AT} +\flagsdefault[emblem,variant=1]\show{Austria: Variant 1}{AT} +\flagsdefault[emblemdefault,variant=0] + +\section{Historical and outdated flags} +% ------------------------------------- + +\flaggenprozeile{4} +\show{Soviet Union}{SU} + \section{Flags of other countries and territories} % ------------------------------------------------ @@ -1254,7 +1357,48 @@ are overlayed with the generating circles. \show{Styria}{AT-St} \show{Burgenland}{AT-B} +\newpage +\section{Italian Regions} +% ----------------------- + +\flaggenprozeile{4} +\flagsdefault[variant=1]\show{Abruzzo}{IT-AB}\flagsdefault[variant=0] +\show{Alto Adige}{IT-AA} +\show{Aosta}{IT-AO} +\show{Basilicata}{IT-BA} +\show{Calabria}{IT-CL} +\show{Campania}{IT-CM} +\show{Emilia Romagna}{IT-EM} +\show{Friuli Venezia Giulia}{IT-FR} +\show{Lazio}{IT-LA} +\show{Liguria}{IT-LI} +\show{Lombardia}{IT-LO} +\show{Marche}{IT-MA} +\show{Molise}{IT-MO} +\show{Piemonte}{IT-PI} +\show{Puglia}{IT-PU} +\show{Sardegna}{IT-SA} +\show{Sicilia}{IT-SI} +\show{Toscana}{IT-TO} +\show{Trentino}{IT-TN} +\show{Trentino-Alto Adige}{IT-TA} +\show{Umbria}{IT-UM} +\flagsdefault[variant=1]\show{Veneto}{IT-VE}\flagsdefault[variant=0] + +\subsection*{Variants} +% -------------------- +\flaggenprozeile{4} +\flagsdefault[variant=0]\show{Veneto: Variant 0}{IT-VE} +\flagsdefault[variant=1]\show{Veneto: Variant 1}{IT-VE} +\flagsdefault[variant=2]\show{Veneto: Variant 2}{IT-VE} +\flagsdefault[variant=3]\show{Veneto: Variant 3}{IT-VE} +\flagsdefault[variant=0]\show{Abruzzo: Variant 0}{IT-AB} +\flagsdefault[variant=1]\show{Abruzzo: Variant 1}{IT-AB} +\flagsdefault[variant=0]\show{Toscana: Variant 0}{IT-TO} +\flagsdefault[variant=1]\show{Toscana: Variant 1}{IT-TO} +\flagsdefault[variant=0]\show{Trentino: Variant 0}{IT-TN} +\flagsdefault[variant=1]\show{Trentino: Variant 1}{IT-TN} \section{Other Flags} % ---------------------- @@ -1275,7 +1419,7 @@ are overlayed with the generating circles. \show{Rainbow flag}{Rainbow} \show{Esperanto Movement}{Esperanto} - +\newpage \section{Nautical Signal Flags} % ----------------------------- @@ -1321,10 +1465,6 @@ are overlayed with the generating circles. \show{}{8} \show{}{9} - - - - % -------------------------------------------------------------------------- % Links % -------------------------------------------------------------------------- @@ -1364,5 +1504,7 @@ contains flag quizzes.} \end{thebibliography} % --------------------------------------------------------------------------- } +\fi + \end{document} |