Text FormattingText on top of external graphics

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Text on top of external graphics

Post by svend_tveskaeg »

Hi all.

I have to make a presentation so consider the following example (where the attached EPS picture have to be used):

Code: Select all

\documentclass{beamer}
\usepackage[danish]{babel}
\usepackage{graphicx}
\usepackage{lpic}

\begin{document}

\begin{frame}
 \begin{center}
  \begin{lpic}[draft]{havets_farver(0.45,0.45)}
    \lbl{100,75;a}
  \end{lpic}
 \end{center}
\end{frame}

\end{document}
This is working just fine but when I try to put in a list instead of just the `a', I get an error:

Code: Select all

\documentclass{beamer}
\usepackage[danish]{babel}
\usepackage{graphicx}
\usepackage{lpic}

\begin{document}

\begin{frame}
 \begin{center}
  \begin{lpic}[draft]{havets_farver(0.45,0.45)}
    \lbl{100,75;
    \begin{itemize}
      \item<1-> Test a.
      \item<2-> test b.
    \end{itemize}
    }
  \end{lpic}
 \end{center}
\end{frame}

\end{document}
What am I doing wrong and how do I fix it?

Thank you in advance!
Attachments
havets_farver.eps
EPS picture.
(166.43 KiB) Downloaded 272 times
Last edited by svend_tveskaeg on Tue Mar 29, 2011 4:39 pm, edited 1 time in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

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

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Text on top of external graphics

Post by Frits »

Inside the \lbl{} macro, you probably can't call an environment (like \begin{itemize}...). A not very elegant solution is to make your own list by hand, like:

Code: Select all

\begin{frame}
\begin{center}
  \begin{lpic}[draft]{havets_farver(0.45,0.45)}
    \lbl{100,75;$\bullet$ a}
    \lbl{100,65;$\bullet$ b}
  \end{lpic}
\end{center}
\end{frame}
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Text on top of external graphics

Post by svend_tveskaeg »

Not the most elegant solution but it works.

Thank you very much!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Text on top of external graphics

Post by localghost »

List environments usually need boxes where paragraphs are allowed. So you can try the following with the varwidth package (not tested).

Code: Select all

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{graphicx}
\usepackage{lpic}
\usepackage{varwidth}

\begin{document}
  \begin{frame}
    \centering
    \begin{lpic}[draft]{havets_farver(0.45,0.45)}
      \lbl{100,75;
        \begin {varwidth}{\linewidth}
          \begin{itemize}
            \item<1-> Test a.
            \item<2-> test b.
          \end{itemize}
        \end{varwidth}
      }
    \end{lpic}
  \end{frame}
\end{document}
With the overpic package there might be an alternative but it needs the same approach. The forum search should help with possible solutions.


Thorsten
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Text on top of external graphics

Post by svend_tveskaeg »

Thank you very much, Thorsten!

I will go to sleep now but I will look at it tomorrow.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply