How can I troubleshoot LaTeX errors without line numbers or specific locations?

In summary, the speaker is learning how to use LaTeX and is encountering some errors while trying to typeset a math paper using the TeXworks editor. They are unsure of the location of the errors and are asking for assistance with this issue.
  • #1
abikutn
10
0
Hello guys,

I know this topic has been issued many times before. However I have an issue I can't find a solution for.

  1. I have a master file that calls another sub tex file using \include{}.
  2. This sub tex file has insert figures, I use insert figure options in the editor and the figures are in a sub folder where the this tex file resides.
  3. However when I compile the master file. I see no figure and also states that it cannot find the figure. I double checked the path name and white spaces too. Its not because of that.

Can someone help me how to go abt it. I use INLAGE 4.7.13 as my Latex editor. Please find the attached file to run the files if you have time.

docs.google.com/open?id=0B6yei5eTKtEsajd6T201bEpUOTA

[ sorry this is just my second post and PF won't let me insert links/URL'S ]
Thank you.

PS: When I use insert figure it doesn't include the full path of the figure. why is that. If I include the full path then it works perfect. I don't understand why my editor doesn't include the full path and only the sub folder path.
 
Physics news on Phys.org
  • #2
I see figures in your generated pdf (thesis_master.pdf). Are you talking about the "fig ??" in your pdf file? That is a different problem. The solution is easy: Run latex again. And then run latex one more time because the pagination might be wrong (the figures and tables now have a title and this can change the pagination).
 
  • #3
No thatz not what I meant. were you actually able to see the pictures ?

when I generated thesis_master.pdf I wasnt able to see any pictures that were added from my subfolder. Here have a look at the Pdf. This is what I meant. Unless I put in the whole path it won't display the picture. But the INLAGE editor I am using , when I use the insert figure option it just starts off the graphic path from the subfolder name : eg: subfolder/picture.jpg

docs.google.com/open?id=0B6yei5eTKtEsajd6T201bEpUOTA

Thanks for taking effort to see what is my problem.
 
  • #4
Tex doesn't have any built in concept of "change the current directory" or "automatically search subdirectories" when looking for files, but there are some workrounds here: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docotherdir

On the other hand, I'm not really sure whether your problem is about TeX or INLAGE, and I don't know anything about INLAGE. (And I don't trust google docs enough to go exploring your data on there - sorry!)
 
  • #5
I usually have a subdirectory for figures. Then I use something like

\includegraphics[width=0.8\columnwidth]{./figures/fig_1}

Never had any problems with that, but I don't use INLAGE.

I am not sure if you have to specify the path relative to the master file or the included one. Just try both :-p
 
  • #6
I am having the same problem with my latex error when I insert a picture can someone please help me?\documentclass[12pt]{article}\usepackage{amsfonts,amsmath, amsthm, amssymb, latexsym, epsfig}
\usepackage[all]{xy}
\usepackage{xspace, graphicx}
\usepackage[mathscr]{eucal}
\usepackage{caption}
\usepackage{graphics}
\usepackage{float}%%%%%%%% Wide Page 1%%%%%%%%%%
\topmargin -15pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep

\textheight 9in

\oddsidemargin 0pt
\evensidemargin \oddsidemargin
\marginparwidth 0.5in

\textwidth 6.5in

\newcommand{\mat}[4]{\left( \begin{array}{cc} #1&#2\\#3&#4\\ \end{array} \right)}
\newcommand{\setof}[2]{\ensuremath{\left\{ #1 \: : \: #2 \right\}}}
\newcommand{\myeps}[1]{\epsfig{figure=#1.eps}}
\newcommand{\set}[1]{\mathbb #1}
\newcommand{\goth}[1]{\mathfrak #1}
\newcommand{\ftn}[3]{ #1 : #2 \rightarrow #3 }
\newcommand{\limit}[3]{ \lim_{ #1 \to #2 } #3 }
\newcommand{\summation}[4]{\sum_{ #1 = #2 }^{#3} #4 }
\newcommand{\innerprod}[2]{\left\langle #1,#2 \right\rangle}
\newcommand{\integral}[3]{ \int_{#1}^{#2} #3 \ dt}
\newcommand{\norm}[1]{\left\|#1\right\|}

\newcommand{\Z}{\ensuremath{\mathbb{Z}}\xspace}
\newcommand{\C}{\ensuremath{\mathbb{C}}\xspace}
\newcommand{\Q}{\ensuremath{\mathbb{Q}}\xspace}
\newcommand{\R}{\ensuremath{\mathbb{R}}\xspace}
\newcommand{\N}{\ensuremath{\mathbb{N}}\xspace}
\newcommand{\lcm}{\ensuremath{\mathrm{lcm}}\xspace}
\def\d{\displaystyle} % Acknowledgements is an environment
\newenvironment{acknowledgment}{\bigskip{\em Acknowledgement.}}

\newtheorem{thms}{Theorems}%[section]

\theoremstyle{plain}

\newtheorem{question}[thms]{Question}


\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lemma}[thm]{Lemma}
\newtheorem{theorem}[thm]{Theorem}
\newtheorem{proposition}[thm]{Proposition}
\newtheorem{corollary}[thm]{Corollary}
\newtheorem{conjecture}[thm]{Conjecture}
\newtheorem{convention}[thm]{Convention}
\newtheorem{claim}[thm]{Claim}
\newtheorem{problem}[thm]{Problem}


\theoremstyle{definition}
\newtheorem{definition}[thm]{Definition}
\newtheorem{fact}[thm]{Fact}
\newtheorem{remark}[thm]{Remark}
\newtheorem{notation}[thm]{Notation}
\newtheorem{example}[thm]{Example}
\newtheorem{warning}[thm]{Warning}
\newtheorem{comments}[thm]{}
\numberwithin{equation}{section}
\numberwithin{figure}{section}

\begin{document}
\title{Speed Lab}
\author{Caroline Susanne Tillman}
\date{\today}
\maketitle%%%%%%%%%
\section{ Due Monday, June 10, 8:00 AM}

\begin{itemize}

\item[a.] {\bf Lab Purpose:}

The purpose in the speed lab was to observe the difference in speed while jogging and walking around the octagon shaped common area.

\item[b.] {\bf Lab Procedure:}

1. Take 8 meter sticks and place each meter stick at the corner of each vertices of the octagon shaped common area.

\begin{figure}[!h]
\begin{center}
\includegraphics{Diaspeed.jpg}
\caption{Diagram of Commons}
\end{center}
2. Take the 4 measuring tapes and measure 2 edges on the octagon starting at one vertex to
\end{itemize}

%%%%%%%%%

\end{document}
 
  • #7
Well here we go, I'm learning LaTex!

Not too bad, gets more intuitive as you go along. If that makes sense.

Going through some tutorials and trying to type of some math for a paper. Some basic and very stupid questions. I am using the TeXworks editor.

When I get errors on attempting to typeset, I'm given a line number where the error occurred. That would be very helpful, if I knew where that line was. But it's not like they are numbered or anything, and I really don't want to count. Obviously I'm missing something here.

I'm getting a "there's no line here to end" error, but it doesn't say what line. Where is "here?"

That's all for now...

-Dave K
 

1. What is a figure in LaTeX?

A figure in LaTeX is a visual element, such as a graph, chart, or image, that is inserted into a document to help illustrate a concept or data. It can be referenced and captioned for better organization and understanding.

2. How do I insert a figure in LaTeX?

To insert a figure in LaTeX, you first need to use the \usepackage{graphicx} command in the preamble to enable the use of images. Then, use the \includegraphics command within a figure environment to insert the image into your document.

3. How do I resize a figure in LaTeX?

To resize a figure in LaTeX, you can use the optional arguments of the \includegraphics command, such as width or height, to specify the desired dimensions. You can also use the \scalebox command to scale the figure to a specific size.

4. How do I add a caption and label to a figure in LaTeX?

To add a caption to a figure in LaTeX, you can use the \caption command within the figure environment. To add a label, use the \label command after the caption. You can then reference the figure using the \ref command.

5. How do I place a figure at a specific location in the document in LaTeX?

To place a figure at a specific location in the document, you can use the optional argument [placement] in the figure environment. The most commonly used placement options are h for here, t for top, and b for bottom. You can also use p to place the figure on a separate page.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Replies
15
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
Back
Top