I want to create something like a leaflet/magazine using Latex. Is it possible to place text on top of an image and style the text freely?
Any links to examples of something like this?
Including images in your LaTeX document requires adding: \usepackage{graphicx} to the beginning/preamble of your document. \includegraphics{ } command tells LaTeX to insert the image. To upload an image, click the upload button, and upload your image file.
You can insert a pagebreak via \clearpage or \newpage , then use the t option on the figure environment: ... \clearpage \begin{figure}[t!]
In general text you can force a LaTeX image to stay where it is placed in the code using the [! h] command in the figure environment. A slight modification of this which allows the image to move to the top of the next page if there is an overhang is the [! ht] command.
For inclusion of JPG images, you cannot use the latex compiler. You need to use pdflatex.
I usually do something like
\usepackage{tikz}
...
\begin{tikzpicture}
\draw (0, 0) node[inner sep=0] {\includegraphics[width=4cm]{imagefile.png}};
\draw (1, 1) node {Hello world};
\end{tikzpicture}
A very good toolset for manipulating images is pgf/TikZ
pdf doc.
See \pgfimage
for examples. It allows to mix text and image freely. There are many ways to do it. One of them is to use layers
(p. 220 of pgfmanual). The pgf
manual contains many simple examples, and is very precise.
Another solution is to use the lpic
package: the homepage contains some examples.
You can find other examples for pfg and TikZ here and here for many impressive examples.
Another solution is the textpos package which allows you to specify boxes at absolute positions on the page. The boxes can overlap, so you can put the figure in one box, and text in another box on top of it.
I realise that the question is old and answer is accepted, but for completeness would like to propose an alternative approach for making leaflets in LaTeX.
Specifically, the leaflet document style served me really well for this purpose.
A good blog post wrt background image can be found here. There are a couple of packages that are required to use in order to make the proposed approach work, but were not mentioned in the blog post:
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{transparent}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With