Graphics, Figures & TablesUsing TextPos to place figures and tables on a pag

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ijourneaux
Posts: 7
Joined: Fri Jun 11, 2010 4:07 am

Using TextPos to place figures and tables on a pag

Post by ijourneaux »

I am trying to use the TextPos package to position graphics and table o a page. Generally things seem to work but I have encountered an issue I can't seem to get around.

In the second text block, adding the first graphic works but if I take that line out and uncomment the second graphic, I get an error 61 Missing number treating as zero error. Can't seem to fiure out what I am doing wrong. Apprecaite any tips.

I have attached a copy of the Latex file and the two graphics

Code: Select all

\begin{textblock}{8}(40,10)
\begin{figure}
\includegraphics[width=120mm]{img001missdots.jpg}
%\includegraphics[width=20mm]{img001_fingl.jpg}
\end{figure}
\end{textblock}

Code: Select all

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{longtable}
\usepackage{multicol}
\usepackage[margin=2.5cm]{geometry}
\usepackage{lastpage}
\usepackage{underscore}
\usepackage[pdftex]{graphicx}
\usepackage{wrapfig}
\usepackage[margin=10pt,font=small,labelfont=bf]{caption}
\usepackage[showboxes,absolute]{textpos}
%\usepackage[absolute]{textpos}

\begin{document}
%\pdfpagewidth 8.5in
%\pdfpageheight 11in
\setlength{\TPHorizModule}{10pt}
\setlength{\TPVertModule}{10pt}

\pagestyle{fancy}

\headheight 35pt

\lhead{NewPage Research}
%\input{sampleid.tex}
\chead{Helio Dot Skip Report}
\rhead{\today}
%\lfoot{Left bottom}
\cfoot{\thepage\ of \pageref{LastPage}}
%\rfoot{\thepage}

\begin{textblock}{3}(5,10)

\vspace{0pt}
\begin{tabular}{ccc}\hline

%\input{Helio20MissingDots.tex}
Helio Distance to 20 Missing Dots:&  & 40.9\\ \hline

Distance (cm) & Missing Dots & Integrated Missing Dots \\ \hline\hline
%\input{HelioProfile.tex}
0 & 0 & 0 \\
1 & 0 & 0 \\
2 & 5 & 5 \\
3 & 2 & 7 \\
4 & 12 & 19 \\
5 & 5 & 24 \\
6 & 15 & 39 \\
7 & 15 & 54 \\
8 & 28 & 82 \\
9 & 53 & 135 \\
10 & 70 & 205 \\
11 & 87 & 292 \\
\end{tabular}

\end{textblock}

\begin{textblock}{8}(40,10)
\begin{figure}
\includegraphics[width=120mm]{img001missdots.jpg}
%\includegraphics[width=20mm]{img001_fingl.jpg}
\end{figure}
\end{textblock}


\begin{textblock}{8}(5,40)
\begin{figure}
\includegraphics[width=120mm]{img001missdots.jpg}
%\caption{This is a Figure by a Table}
\end{figure}
\end{textblock}

\end{document}
Attachments
img001missdots.jpg
img001missdots.jpg (63.69 KiB) Viewed 8131 times

Recommended reading 2024:

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

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

ijourneaux
Posts: 7
Joined: Fri Jun 11, 2010 4:07 am

Re: Using TextPos to place figures and tables on a pag

Post by ijourneaux »

Turns out the problem was the _ character in the file name. The \includegraphics command (atleast with TeXworks) chokes on a filename with a _ in it.

Take Care
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Using TextPos to place figures and tables on a pag

Post by localghost »

Now that the problem seems to be solved, please be so kind and mark the topic accordingly as clearly written in the Board Rules. Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome tot the board
Thorsten
Post Reply