首页 > 解决方案 > Latex:TeXMaker 无法编译 - 几个未解决的错误

问题描述

我正在使用TeXMaker制定协议。我从 Eclipse+Texlipse 切换到 Texmaker,之前编译成功的,不再编译

我有一个main.tex文件,其中包含我的协议的结构。我有几个 tex 文件作为输入和一个design.sty,它提供了我的设计。我想编译和创建 PDF 协议。

当我尝试在 TeXMaker ( main.tex ) 中执行以下代码时:

\documentclass[11pt,a4paper,oneside,listof=totoc, bibliography=totoc
version=first]{scrreprt}
\usepackage{design}

\begin{document}
\pagenumbering{arabic}

% cover
    \input{./cover.tex} 

% introduction  
\newpage
    \chapter{Introduction}
        \section{Synmikro}
            \input{./synmicro.tex}  
        \section{Genetic Switches}
            \input{./switches.tex}
        \section{ECFs}
            \input{./ECF.tex}
        \section{Sinorhizobium Meliloti}
            \input{./meliloti.tex}

\newpage
    \section{Laboratory Internship}
        \input{./internship.tex}
    \section{Bioinformatics}
        \input{./bioinfo.tex}

% materials and methods
\newpage
    \chapter{Material and Methods} 
        \section{Used strains}
            \input{./MMexoECFs.tex}
        \section{Cultivation conditions}
            \input{./MMcultivation.tex}
        \section{RNA preparation}
            \input{./MMrNAprep.tex}
        \section{Quality control of total RNA}
            \input{./MMtotalRNAQC.tex}
        %\section{Quality control}
        %   \subsection{PCR and Agarose gel}
        %       \input{./MMnormPCR.tex}
            %\subsection{RNA purity and integrity control}
            %   \input{./MMbioanalyzer.tex}
        \section{qRT-PCR}
            \input{./MMqRTPCR.tex}
        %\section{QBit}
        %   \input{./MMqbit.tex}    
        \section{Bioinformatics}
            \input{./MMbioinfo.tex}     
            \subsection{Non-restrictive approach}
                \input{./MMnonRestrictive.tex}
            \subsection{Levenshtein distance}
                \input{./MMlev2.tex}    
            \subsection{Feature Search}
                \input{./MMfeatureSearch.tex}
            %\subsection{Position Specific Scoring Matrices}
            %   \input{./MMpssm.tex}

% results               
\newpage
    \chapter{Results}
        %\section{Agarose Gel}
    %   \input{./Ragarose.tex}
        \section{Nanodrop and Bioanalyzer}
            \input{./Rbioanalyzer.tex}
        %\section{Qbit}
        %   \input{./Rqubit.tex}
\newpage
        \section{Real-Time PCR}
            \input{./RRTpCR.tex}
\newpage
        \section{Bioinformatics}
            \input{./Rbioinfo.tex}

% discussion

\end{document}

TeXMaker 给了我几个 main.tex 错误。他们是:

  1. 第 47 行:扫描使用 \caption@xdblarg 时文件结束
  2. 第 79 行:!Latex 错误:输入第 7 行上的 \begin{figure} 以 \end{document} 结尾
  3. Line 79: !You can't use '\end' in internal vertical mode
  4. 第 79 行:!Latex 错误:输入第 7 行上的 \begin{figure} 以 \end{document} 结尾
  5. !缺少 } 插入
  6. 第 1 行:!紧急停止。<*> main.tex ***(作业中止,找不到合法的 \end)

第 47 行是“\input{./MMqRTPCR.tex}

第 79 行是“\end{document}”

老实说,我很困惑。TeXMaker 的错误描述是关于缺少大括号。我是屏幕盲吗?我检查了 3 次牙套,但无法弄清楚我错过了什么。所以,我猜,我错过了关于 Latex 的一些重要内容。

谢谢你的帮助!

更新:在输入文件“MMqRTPCR.tex”中,我注释掉了一个数字,所有错误都消失了。这是文件的内容。

TEXTEXTEXT

%\begin{figure}[H]
    %\centering
%   \includegraphics[scale=0.6,natwidth=764,natheight=218]%{deltaDeltaCorrectedFormula.png}
%   \caption{mycaption}
    %\label{deltaDelta}
%\end{figure}

TEXTEXTEXT

\begin{table}[!h]
        \centering
        \caption{Primer sequences and targets}
        \label{table1}

    \begin{tabular}{|l|l|l|ll}
        \cline{1-3}
          Primer Sequence & Target & Direction \\ \cline{1-3}
          AACATGTGCCGGTTGATAG & ECF20_992 & forward  \\ \cline{1-3}
          GCTGCTTCGGTATTGCTCA & ECF20_992 & reverse \\ \cline{1-3}
          TCGTACCATTGAAAGCCTG & ECF02_2817 & forward \\ \cline{1-3}
          ATCAATGGCTTCACGTGCA & ECF02_2817 & reverse \\ \cline{1-3}
          TTCAAGAAACCATGGCCAC & ECF11_987 & forward \\ \cline{1-3}
          GCTCGGCCAAATATCATCG & ECF11_987 & reverse \\ \cline{1-3}  
    \end{tabular}
\end{table}

TEXTEXTEXT

** 更新和解决方案**

错误不在 main.tex 本身,而是在输入文件中。因此,当 TeXMaker 告诉您缺少括号时,请跳转到 main.tex 中发生错误的行并检查输入文件中的括号,您会在此处看到。

标签: compilationlatextexmaker

解决方案


所以,错误毕竟是缺少花括号!然而,它并没有在 main.tex 中丢失,而是在图形标题的输入文件中!

谢谢任何人,谁的大脑可能已经融化试图找到解决我的问题的方法。我希望这对其他人有帮助,如果他们遇到同样的错误。:)


推荐阅读