在 Fedora 20 上使用 Lyx:此錯誤代表什麼?

在 Fedora 20 上使用 Lyx:此錯誤代表什麼?

嘗試使用 Lyx 2.1 編譯 pdf 時發生此錯誤:

This is pdfTeX, Version 3.1415926-2.6-1.40.14 (TeX Live 2014/dev) (format=latex 2015.4.2)  28 JUL 2015 12:45 entering extended mode  restricted \write18 enabled.  %&-line parsing enabled.
**rationale.tex (./rationale.tex LaTeX2e <2011/06/27> Babel <3.9h> and hyphenation patterns for 2 languages loaded.

(/usr/share/texlive/texmf-local/texmf-compat/tex/latex/evergent/article.cls

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  

...                                    

                                                   l.1 <
     script>window.googleJavaScriptRedirect=1</script><script>var m={navigat...

You're in trouble here.  Try typing  <return>  to proceed. If that doesn't work, type  X <return>  to quit."

這是輸出 .tex 檔案的最小範例:

%% LyX 2.1.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\begin{document}
Test
\end{document}

它會產生相同的編譯錯誤。

答案1

情況似乎很清楚:article.cls文件是從

/usr/share/texlive/texmf-local/texmf-compat/tex/latex/evergent/

雖然它應該在

/usr/share/texlive/texmf-dist/tex/latex/base/

有人或某事安裝了一些texmf-compat在下面安裝了一些子樹texmf-local,這就是您的問題的原因。可能是安裝的原因LaTeX2HTML,這是一個過時且不受支援的程式。

相關內容