Document stoped compileing with strange error: LaTeX Error: Missing begin{document}.

2014-07-11 Thread Bruno Morgado
Hi all,
I was writing the introduction to my PhD thesis and since the references to
some pictures were showing up as ?? I changed the label of one of those
pictures in the hopes that it solved the problem.

Well, it didn't, in fact I can't compile my thesis anymore.

Now it fails with the error LaTeX Error: Missing begin{document}

I tried to delete that picture to no avail, I also tried to create a new
document and copy past everything but it didn't work as well.

Any ideas?

Here is the complete log:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded
format=pdflatex 2014.7.11)  11 JUL 2014 18:13
entering extended mode
 restricted \write18 enabled.
 %-line parsing enabled.
**Thesis_Intro.tex
(./Thesis_Intro.tex
LaTeX2e 2014/05/01
Babel 3.9k and hyphenation patterns for 78 languages loaded.

(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info:Redeclaring font encoding T1 on input line 43.
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2014/04/30 v1.2b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/latin9.def
File: latin9.def 2014/04/30 v1.2b Input encoding file
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/tools/array.sty
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
\col@sep=\dimen103
\extrarowheight=\dimen104
\NC@list=\toks16
\extratabsurround=\skip43
\backup@length=\skip44
) (/usr/local/texlive/2014/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count87
\float@exts=\toks17
\float@box=\box26
\@float@everytoks=\toks18
\@floatcapt=\box27
) (/usr/local/texlive/2014/texmf-dist/tex/latex/units/units.sty
Package: units 1998/08/04 v0.9b Typesetting units
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
) (/usr/local/texlive/2014/texmf-dist/tex/latex/units/nicefrac.sty
Package: nicefrac 1998/08/04 v0.9b Nice fractions
\L@UnitsRaiseDisplaystyle=\skip45
\L@UnitsRaiseTextstyle=\skip46
\L@UnitsRaiseScriptstyle=\skip47
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp)   5 = only ISO-Adobe without \textcurrency
(textcomp)   4 = 5 + \texteuro
(textcomp)   3 = 4 + \textohm
(textcomp)   2 = 3 + \textestimated + \textcurrency
(textcomp)   1 = TS1 - \textcircled - \t
(textcomp)   0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
)
LaTeX Info: Redefining \oldstylenums on input line 266.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 281.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 282.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 283.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 284.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 285.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 286.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 287.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 288.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 289.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 290.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 291.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 292.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 293.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 294.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on 

Re: Document stoped compileing with strange error: LaTeX Error: Missing begin{document}.

2014-07-11 Thread Bruno Morgado
Hi,
but how do I do that from Lyx?
-- 
Bruno Morgado
Sent with Airmail

On 11 Jul 2014 at 18:43:55, Eisa Ayed (eisalen...@yahoo.com) wrote:

This is normal behavior. Just compile the file twice after compiling the .bib 
file. Roughly: 

Pdflatex file.tex
Bibtex file.tex
Pdflatex file.tex
Pdflatex file.tex


Sent from my iPhone

On Jul 11, 2014, at 8:16 PM, Bruno Morgado jb.morg...@gmail.com wrote:

Hi all,
I was writing the introduction to my PhD thesis and since the references to
some pictures were showing up as ??

Document stoped compileing with strange error: LaTeX Error: Missing begin{document}.

2014-07-11 Thread Bruno Morgado
Hi all,
I was writing the introduction to my PhD thesis and since the references to
some pictures were showing up as ?? I changed the label of one of those
pictures in the hopes that it solved the problem.

Well, it didn't, in fact I can't compile my thesis anymore.

Now it fails with the error LaTeX Error: Missing begin{document}

I tried to delete that picture to no avail, I also tried to create a new
document and copy past everything but it didn't work as well.

Any ideas?

Here is the complete log:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded
format=pdflatex 2014.7.11)  11 JUL 2014 18:13
entering extended mode
 restricted \write18 enabled.
 %-line parsing enabled.
**Thesis_Intro.tex
(./Thesis_Intro.tex
LaTeX2e 2014/05/01
Babel 3.9k and hyphenation patterns for 78 languages loaded.

(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info:Redeclaring font encoding T1 on input line 43.
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2014/04/30 v1.2b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/latin9.def
File: latin9.def 2014/04/30 v1.2b Input encoding file
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/tools/array.sty
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
\col@sep=\dimen103
\extrarowheight=\dimen104
\NC@list=\toks16
\extratabsurround=\skip43
\backup@length=\skip44
) (/usr/local/texlive/2014/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count87
\float@exts=\toks17
\float@box=\box26
\@float@everytoks=\toks18
\@floatcapt=\box27
) (/usr/local/texlive/2014/texmf-dist/tex/latex/units/units.sty
Package: units 1998/08/04 v0.9b Typesetting units
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
) (/usr/local/texlive/2014/texmf-dist/tex/latex/units/nicefrac.sty
Package: nicefrac 1998/08/04 v0.9b Nice fractions
\L@UnitsRaiseDisplaystyle=\skip45
\L@UnitsRaiseTextstyle=\skip46
\L@UnitsRaiseScriptstyle=\skip47
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp)   5 = only ISO-Adobe without \textcurrency
(textcomp)   4 = 5 + \texteuro
(textcomp)   3 = 4 + \textohm
(textcomp)   2 = 3 + \textestimated + \textcurrency
(textcomp)   1 = TS1 - \textcircled - \t
(textcomp)   0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
)
LaTeX Info: Redefining \oldstylenums on input line 266.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 281.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 282.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 283.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 284.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 285.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 286.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 287.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 288.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 289.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 290.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 291.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 292.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 293.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 294.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on 

Re: Document stoped compileing with strange error: LaTeX Error: Missing begin{document}.

2014-07-11 Thread Bruno Morgado
Hi,
but how do I do that from Lyx?
-- 
Bruno Morgado
Sent with Airmail

On 11 Jul 2014 at 18:43:55, Eisa Ayed (eisalen...@yahoo.com) wrote:

This is normal behavior. Just compile the file twice after compiling the .bib 
file. Roughly: 

Pdflatex file.tex
Bibtex file.tex
Pdflatex file.tex
Pdflatex file.tex


Sent from my iPhone

On Jul 11, 2014, at 8:16 PM, Bruno Morgado jb.morg...@gmail.com wrote:

Hi all,
I was writing the introduction to my PhD thesis and since the references to
some pictures were showing up as ??

Document stoped compileing with strange error: LaTeX Error: Missing begin{document}.

2014-07-11 Thread Bruno Morgado
Hi all,
I was writing the introduction to my PhD thesis and since the references to
some pictures were showing up as ?? I changed the label of one of those
pictures in the hopes that it solved the problem.

Well, it didn't, in fact I can't compile my thesis anymore.

Now it fails with the error LaTeX Error: Missing begin{document}

I tried to delete that picture to no avail, I also tried to create a new
document and copy past everything but it didn't work as well.

Any ideas?

Here is the complete log:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded
format=pdflatex 2014.7.11)  11 JUL 2014 18:13
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**Thesis_Intro.tex
(./Thesis_Intro.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.

(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info:Redeclaring font encoding T1 on input line 43.
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2014/04/30 v1.2b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/latin9.def
File: latin9.def 2014/04/30 v1.2b Input encoding file
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/tools/array.sty
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
\col@sep=\dimen103
\extrarowheight=\dimen104
\NC@list=\toks16
\extratabsurround=\skip43
\backup@length=\skip44
) (/usr/local/texlive/2014/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count87
\float@exts=\toks17
\float@box=\box26
\@float@everytoks=\toks18
\@floatcapt=\box27
) (/usr/local/texlive/2014/texmf-dist/tex/latex/units/units.sty
Package: units 1998/08/04 v0.9b Typesetting units
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
) (/usr/local/texlive/2014/texmf-dist/tex/latex/units/nicefrac.sty
Package: nicefrac 1998/08/04 v0.9b Nice fractions
\L@UnitsRaiseDisplaystyle=\skip45
\L@UnitsRaiseTextstyle=\skip46
\L@UnitsRaiseScriptstyle=\skip47
)) (/usr/local/texlive/2014/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp)   5 = only ISO-Adobe without \textcurrency
(textcomp)   4 = 5 + \texteuro
(textcomp)   3 = 4 + \textohm
(textcomp)   2 = 3 + \textestimated + \textcurrency
(textcomp)   1 = TS1 - \textcircled - \t
(textcomp)   0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
)
LaTeX Info: Redefining \oldstylenums on input line 266.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 281.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 282.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 283.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 284.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 285.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 286.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 287.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 288.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 289.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 290.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 291.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 292.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 293.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 294.
Package textcomp Info: Setting pzc sub-encoding to 

Re: Document stoped compileing with strange error: LaTeX Error: Missing begin{document}.

2014-07-11 Thread Bruno Morgado
Hi,
but how do I do that from Lyx?
-- 
Bruno Morgado
Sent with Airmail

On 11 Jul 2014 at 18:43:55, Eisa Ayed (eisalen...@yahoo.com) wrote:

This is normal behavior. Just compile the file twice after compiling the .bib 
file. Roughly: 

Pdflatex file.tex
Bibtex file.tex
Pdflatex file.tex
Pdflatex file.tex


Sent from my iPhone

On Jul 11, 2014, at 8:16 PM, Bruno Morgado <jb.morg...@gmail.com> wrote:

Hi all,
I was writing the introduction to my PhD thesis and since the references to
some pictures were showing up as ??