1

I've searched a lot and can't find any answers to this, so I suspect the answer is no.

I'm trying to achieve a text fill effect like you can do in PowerPoint, like so:

Image text fill

It's scaling the image exactly to the bounds of the text (whether it spans across multiple lines or not), and filling the text with that image.

Is this possible to do in LaTeX?

Thanks!

1
  • 1
    yes possibly easier in pstricks (and so latex) than with pdflatex, but probab;y doable in tikz as well for pdflatex Commented Oct 30, 2017 at 20:34

1 Answer 1

2

It is quite simple – just a couple of lines of code — with pstricks, more precisely with the pst-text and pst-fill packages.

Also, with auto-pst-pdf, it works with pdflatex if you add to the compiler the switch -shell-escape (for TeX Live, MacTeX) or --enable-write18 (MiKTeX):

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc} 
\usepackage{pst-text, pst-fill, auto-pst-pdf}%
\usepackage{graphicx}

\begin{document}

\centering
\includegraphics[scale=0.4]{Piero_di_Cosimo_1}\medskip

\Huge\sffamily\bfseries
\begin{center}
SOMETIMES TO UNDERSTAND \\
A \begin{pspicture}\psboxfill{\includegraphics{Piero_di_Cosimo.eps}}%
    \pscharpath[fillstyle=boxfill, linestyle=none]{ WORD’S MEANING}
    \end{pspicture} YOU \\
NEED MORE THAN A \\
DEFINITION
\end{center}

\end{document}

enter image description here

1
  • Thank you very much, Bernard. This gave me what I needed to do more effective searching. I ended up going with the solution given in the second part of this answer here: tex.stackexchange.com/a/192990/146997
    – Josh
    Commented Oct 30, 2017 at 23:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .