Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
! 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:
)) (./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???
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"... .)
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.)