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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Graphical Creation of national Flags
I would use
TikZ for this, and the 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}