Generaloverpic | Put Stuff over Highlight in Foreground

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jon_createDa
Posts: 2
Joined: Wed Sep 07, 2011 4:46 pm

overpic | Put Stuff over Highlight in Foreground

Post by jon_createDa »

Im currently using \put to fill in the blank spaces of psfs with the package overpic and using \put(){} on each line.

mt lines match up well with the text of the pdf in the picture im typing over and id like to highlight it. My problem is when I usepackage{soul} and \hl{qquadqquad} it overwrites the background picture.

is there a simple way to get it in the background?

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage{overpic}
\usepackage{soul}
\begin{document}
\begin{figure}
\begin{overpic}{file.pdf/jpg %whatever%}
\put(10,50){$\hl{\qquad\qquad\qquad}$}
\end{figure}
\end{overpic}
\end{document}

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

overpic | Put Stuff over Highlight in Foreground

Post by justdeath »

The purpose of putting text on the picture is for the text to be on top, or am I mistaken?

I can't fully understand what you are asking.

Also, the documentation on soul package says that highlighting works only for ps files.
http://www.tex.ac.uk/ctan/macros/plain/ ... l/soul.pdf
(Page 3, footnote 5)

This example works for me:

Code: Select all

\documentclass{article}
\usepackage{overpic}
\usepackage{soul}

\begin{document}
Some text.
\begin{overpic}{file.pdf}
\put(10,50){\hl{text}}
\end{overpic}
More text.
\end{document}
And the text is underlined, because highlighting does not work for pdf format.

The command \hl{text} does not work in math mode, gives error:
Incompatible list can't be unboxed.

If you can, please clarify your question.

Nikolay
Post Reply