TeX Live and MacTeXstrange thing happening in my tex..

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
Post Reply
man2011
Posts: 43
Joined: Tue Jan 11, 2011 4:19 am

strange thing happening in my tex..

Post by man2011 »

Hi guys,
There is a strange problem I suffer from my texworks. it is working fine but now I got a problem that says the following:

Code: Select all

! File ended while scanning use of \pgfsyspdfmark.
<inserted text> 
                \par 
l.27 \begin{document}
the problem solved since I open a new tex file and copy the old one without any change and save it, so I do not face any problem.
take this simple example:

Code: Select all

\documentclass[oneside,12pt]{scrbook}
\begin{document}
\title{Notes on information Structure}
\author{XX}
\date{\today}
\maketitle
\frontmatter
\mainmatter
\chapter {Optimazing structure in Context }
\section{introduction} 


\end{document}
it gives the same problem:

Code: Select all

)) (./presentation.aux
! Undefined control sequence.
l.65 \pgfsyspdfmark
                    {pgfid10}{15389540}{35284832}
? 
I think there some hanging in omy texwork how could I solve this problem I do not everytime I open a new file and copy the stuff from an error latex to a new one???

Recommended reading 2024:

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

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

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: strange thing happening in my tex..

Post by frabjous »

You probably need to delete the .aux or other auxiliary files associated with the project. (TeXworks has an option for that, under "File" -- "Remove Aux Files"... .)
man2011
Posts: 43
Joined: Tue Jan 11, 2011 4:19 am

Re: strange thing happening in my tex..

Post by man2011 »

I have deleted them.. now it is working.. what are the functions of these auxiliaries (e.g. aux....) Can I delete them whenever I see them?


Thank you
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: strange thing happening in my tex..

Post by frabjous »

LaTeX creates the .aux file when it runs to record information that it -- or a helper program like BibTeX -- might need the next time you process the file. This includes stuff about citations, hyperlinks, cross-references, PDF bookmarks, etc. This is why you sometimes need to run LaTeX more than once to get these things right, since it needs to create the .aux file on the first run, and then make use of it in the next.

In one sense, it is always safe to delete the .aux file since you can always regenerate by running LaTeX, but in cases your document has anything like I mentioned above, the .aux file does need to be there in between one run and the next, if you ever want to get cross-references, citations, the bibliography, right.

In your case, what appears to have happened is that the aux file was corrupted or incompletely written. This can happen if you Cancel or Stop a LaTeX run before it gets to the end of the file. Unfortunately, TeXworks tends to encourage this, since it runs in interactive mode rather than nonstopmode and often people will just kill a compilation when it encounters an error rather than have to deal with the interaction. If this is frequently a problem for you, I'd either learn how to work with the interactive compiler, or reconfigure TeXworks to run in non-stopmode. (By adding -interaction=nonstopmode to the flags it uses when it calls pdflatex or xelatex or whatever you're using.)
Post Reply