Graphics, Figures & Tables ⇒ Graphical Creation of national Flags
Graphical Creation of national Flags
I'm quite new to LaTeX but want to learn more. I realise this will be pushover to some of you but not for me as a beginner.
I want to create some graphical backgrounds for some documents based on national flags for a project. My first one is based on England. Can anyone here tell me (in terms suitable for a beginner) how to create this graphic in LaTeX please? I want to use absolute positioning from the top-left corner of the page rather than relative positioning in the middle of a page somewhere. I'd ideally like to have the lines stretch to the very edges of the page but to fade away just before they get there. I would of course want to have the text display on the page as normal and so not be affected by the document here. I'm sure I'll be able to create others once I've seen how the first one is done.
Thanks in advance,
A.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Graphical Creation of national Flags
- pgf/tikZ (Example Gallery)
- PSTricks (Example Gallery)
- MetaPost (Example Gallery)
- Asymptote (Example Gallery)
And for placing graphics in the page background there are also some helpful packages.
Make the first steps on your own and ask further targeted questions in case of upcoming problems.
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Graphical Creation of national Flags
I would use

current page
node for positioning.Here is a quick example for demonstration - possibly compile several times to let TikZ make the calculation.
Code: Select all
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\draw[fill,red] ([yshift=-3cm]current page.north west)
rectangle ([yshift=-6cm]current page.north east);
\draw[fill,red] ([xshift=6cm]current page.north west)
rectangle ([xshift=9cm]current page.south west);
\end{tikzpicture}
Now some text.
\end{document}