Graphics, Figures & TablesGraphical Creation of national Flags

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Myrddin
Posts: 3
Joined: Mon Jun 25, 2012 11:42 pm

Graphical Creation of national Flags

Post by Myrddin »

Good hello,

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.
flag-england.png
flag-england.png (747 Bytes) Viewed 3959 times
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.
Last edited by localghost on Tue Jun 26, 2012 9:21 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

Post by localghost »

For the creation process itself there are several packages.

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
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Graphical Creation of national Flags

Post by Stefan Kottwitz »

Hi Adrian,

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}
Stefan
LaTeX.org admin
Post Reply