段落在 \math@egroup 完成(和其他有趣的内容)之前结束

段落在 \math@egroup 完成(和其他有趣的内容)之前结束

当时我正在写论文,论文还有一周就要交了,突然我的标题页出现了错误,具体来说

Paragraph ended before \math@egroup was complete
Missing $ inserted
Missing } inserted

我唯一更改的是原始文本,因此我尝试清除辅助文件,认为这可能是缓存问题。现在我的参考书目中不再有任何参考文献的编号,“字体形状‘U/stmry/b/n’”(无论它是什么)未定义,我已经走投无路了。我知道这一定是我做了什么,而且我对 LaTeX 不是很熟悉,但有时我觉得这种语言正在试图杀死我。

最初显示的三个错误位于第 107 行,即

\dept{ Department of Departmenting }

完整代码如下所示:

\documentclass[12pt,american]{report}
\usepackage{rit-thesis}


%===========================================================================
%   Add Packages
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
%
%       The following packages are all optional and depend on the specifics of what
%   is contained in the thesis.  There is no harm in leaving them in.
%

\usepackage{array}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{morefloats}
\usepackage[refpages]{gloss}
\usepackage{babel}
\usepackage{times}
\usepackage{todonotes}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{grffile}
\usepackage{amssymb}
\usepackage{centernot}
\usepackage{stmaryrd}
\usepackage{lscape}
\usepackage{verbatim}
    \makeatletter
    \newcommand{\verbatimfont}[1]{\def\verbatim@font{#1}}
    \makeatother
\usepackage{enumerate}
\usepackage{url}
\usepackage[section,subsection,subsubsection]{extraplaceins}
\usepackage{afterpage}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\usepackage{bm}

\renewcommand{\floatpagefraction}{.8}
%============================================================================



%============================================================================
%   Draft Watermark
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% 
%       Mark the document as 'draft' with a date. Be sure to comment this out for
%   the final version.
%   

\usepackage{watermark}
\watermark{\hspace{-0.3in} \textbf{DRAFT} \hspace{2.0in} \textbf{\today}}
\graphicspath{{Pictures/}} % Specifies the directory where pictures are stored

\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the natbib reference package - read up on this to edit the reference style; if you want text (e.g. Smith et al., 2012) for the in-text references (instead of numbers), remove 'numbers' 

% Comment out for printing
\definecolor{myLinkColor}{rgb}{0.6,0.10,0.10}
\definecolor{myCiteColor}{rgb}{0.10,0.10,0.6}
\definecolor{myUrlColor}{rgb}{0,0,0.5}

\hypersetup{
    colorlinks, linkcolor={myLinkColor},
    citecolor={myCiteColor}, urlcolor={myUrlColor}
}
\makeglossary
%============================================================================
%   Custom commands
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

%\newcolumntype{dispmat}[1]{\left| #1 \right}

%============================================================================

\linespread{1.3}
\begin{document}

%============================================================================
% Title page
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

% The \title{} can contain line breaks as appropriate...
\title{\vspace{-0.20in} Real Time Video-Enhanced Augmented Reality for Enhanced Visualization of Augmented Environments}

% The \titleline{} must have no line breaks in it.  
\titleline{Real Time Video-Enhanced Augmented Reality for Enhanced Visualization of Augmented Environments}         

% There should be no reason to change the \thesistype{} or the \MSThesistrue...
\thesistype{Thesis}
\MSthesistrue
% This date is really not used (unless \grantdate{}{} is blank)
\date{October 2015}

%============================================================================



%============================================================================
%   Author
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
\author{Dude, Nameguy}  % The \author{} should be exactly the same as your diploma
\dept{ Department of Departmenting }

%============================================================================



%============================================================================
%   Committee Members
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% 
%   The following information is for the signature page.
%   Note that the definition for principal adviser uses two fields.
%   This was needed so that the adviser's name could be placed on the
%   abstract page without his/her title.
% 


% \foursigstrue | \fivesigstrue but don't define BOTH to be true!!

\principaladviser{Dr. Doctor}{Assistant Professor}
\advdept{Biomedical Engineering}
\firstreader{Dr. Doct}{Assistant Professor}
\firstdept{Computer Engineering}
\secondreader{ Dr. Dunk }{Professor}
\seconddept{Doctor Engineering Department}


%============================================================================



%============================================================================
%   Signature Date
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% 
%    This is the expected date that the committee will sign your thesis.
% 

\grantdate{November}{2015}

%============================================================================



%============================================================================
%   Thesis Copyright
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

% If you want to copyright your thesis / dissertation remove the line below.
% \copyrightfalse       % True by default
% The year of the copyright; usually same as the date the committee will
% sign the thesis. This won't be printed if \copyrightfalse

\copyrightyear{2015}

%============================================================================



%============================================================================
%   Set Frontmatter
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% 
%    This causes all front matter to be set.
% 

\beforepreface

%============================================================================



%============================================================================
%   Dedication
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% 
%   The dedication - if you choose to include one.
%   It should be vertically centered in the page. Since the style format doesn't
%   do it for you automatically, you can use the following technique.
% 

\prefacesection{Dedication}
\vfill
\begin{center}
blah blah

\end{center}
\vfill

%============================================================================

%============================================================================
%   Acknowledgements
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% 
%   The acknowledgements page - if you choose to include one.
%   As in the dedication, it should be centered vertically in the page.
%

\prefacesection{Acknowledgments}
\vfill
\begin{center}
bla bla

\end{center}
\vfill

%============================================================================

%============================================================================
%   Glossary
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% 
%   Display the glossary and list of acronyms
%   

\newacronym{ar}{AR}{Augmented Reality}
\newacronym{vr}{VR}{Virtual Reality}
\newacronym{gps}{GPS}{Global Positioning Satellite}
\newacronym{cad}{CAD}{Computer Aided Design}
\newacronym{rms}{RMS}{Root Mean Square}
\newacronym{fle}{FLE}{Fiducial Localization Error}
\newacronym{fre}{FRE}{Fiducial Registration Error}
\newacronym{tre}{TRE}{Target Registration Error}
\newacronym{mri}{MRI}{Magnetic Resonance Imaging}
\newacronym{mr}{MR}{Magnetic Resonance}
\newacronym{ct}{CT}{Computed Tomography}
\newacronym{hmd}{HMD}{Head-mounted Display}
\newacronym{vtk}{VTK}{Visualization Toolkit}
\newacronym{igt}{IGT}{Image-Guided Therapy}
\newacronym{rmse}{RMSE}{Root Mean-Squared Error}
\newacronym{wcs}{WCS}{World Coordinate System}
\newacronym{ccs}{CCS}{Camera Coordinate System}
\newacronym{2d}{2D}{Two Dimensional}
\newacronym{3d}{3D}{Three Dimensional}
\newacronym{pnp}{PnP}{Perspective-n-Point}

\newglossaryentry{xform}{name={ $\mathbf{^{S}T_{D}}$},description={A 4x4 homogeneous matrix transforming three-dimensional space S to three-dimensional space D}}
\newglossaryentry{implane}{name={Image Plane},description={A two-dimensional coordinate system containing all image points $\mathbf{x}$}}
\newglossaryentry{focalplane}{name={Focal Plane},description={Test}}
\newglossaryentry{intrinsic}{name={Intrinsic Matrix},description={Test}}
\newglossaryentry{extrinsic}{name={Extrinsic Matrix},description={Test}}
\newglossaryentry{aruco}{name={ArUco},description={A marker tracking library designed to allow implementation of augmented reality systems using only a webcam.}}

\glsadd{xform}%\glsadd{implane}\glsadd{focalplane}\glsadd{intrinsic}

\printglossaries
%============================================================================

%============================================================================
%   Abstract
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% 
% 
%\todo{800 841 3000}
%585 205 7844 steve


\begin{abstractpage}

In this work we demonstrate two separate forms of augmented reality environments for use with minimally-invasive surgical techniques. In \textbf{Chapter} \ref{Chapter2} it is demonstrated how a video feed from a webcam, which could mimic a laparoscopic or endoscopic camera used during an interventional procedure, can be used to identify the pose of the camera with respect to the viewed scene and augment the video feed with computer-generated information, such as rendering of internal anatomy not visible beyond the image surface, resulting in a simple augmented reality environment. \textbf{Chapter} \ref{Chapter3} details our implementation of a similar system to the one previously mentioned, albeit with an external tracking system.

Additionally, we discuss the challenges and considerations for expanding this system to support a stereoscopic virtual reality headset to account for spatial disconnect. The Oculus Rift has been shown to provide a high-level of immersion to virtual experiences. Incorporating this headset to display the augmented view of the world would theoretically create a near-seamless augmentation of the wearer’s perceived world. Addition of this device would require modifying the rendering pipeline of the system to output a distortion mesh. Analysis of the effectiveness of this headset on immersion would be analyzed through subjective analysis using a series of coordination-tests that will compare a monitor-based display to the Oculus Rift.

\end{abstractpage}
%============================================================================


\afterpreface


%============================================================================







%============================================================================
%   M A I N   B O D Y   O F   T H E S I S 
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% 
%   This is where the main body of the thesis starts
% 

\body

%\overfullrule=2cm

\input{Chapters/Chapter1-Introduction}

\input{Chapters/Chapter2-WebcamTracking}

\input{Chapters/Chapter3-ExternalTracking}

\input{Chapters/Chapter4-Summary}


\nocite{*}

%============================================================================


%----------------------------------------------------------------------------------------
%   BIBLIOGRAPHY
%----------------------------------------------------------------------------------------

\label{Bibliography}

%\lhead{\emph{Bibliography}} % Change the page header to say "Bibliography"

\bibliographystyle{unsrtnat} % Use the "unsrtnat" BibTeX style for formatting the Bibliography

\bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"

\todo{Last entry in bib un-numbered?}

%============================================================================
%   Bibliography 
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% 

%\bibliographystyle{plain}

% Single space the bibliography to save space.
%\begin{singlespace}
%\bibliography{Bibliography}
%\end{singlespace}

%============================================================================


%============================================================================
%   Appendix
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% 
%    The appendices are (of course) optional.
%    

%\appendix

%\chapter{ROC Curves For All Patients}\label{sec:Appendix-ROC}

%\vspace{\fill}
%\centering
%\LARGE\textbf{This space is intentionally left blank}
%\vspace*{\fill}

%\input{allROC-appendix}



%\chapter{Feature Space Plots For All Patients}\label{sec:Appendix-fsPlots}

%\vspace{\fill}
%\centering
%\LARGE\textbf{This space is intentionally left blank}
%\vspace*{\fill}

%\input{allFeatureSpace-appendix}



%\chapter{\gls{pScore} Histograms For All Patients}\label{sec:Appendix-histograms}

%\vspace{\fill}
%\centering
%\LARGE\textbf{This space is intentionally left blank}
%\vspace*{\fill}

%\input{AllHistograms-appendix}

%============================================================================
\end{document}

答案1

抱歉给大家造成了困惑。我应该更仔细地阅读发布规则,这样我就可以提供一些真正有用的信息,而不是一堆无意义的代码!问题是第 3 章中缺少一个括号。我没有意识到 TeXstudio 抛出的错误消息不会给出错误的确切行,所以我假设主文档第 107 行之前的某些内容是问题所在。Mico 的评论让我意识到问题也可能出在之后,所以我使用了 barbara 给出的关于使用 \end{document} 进行抽查的建议,结果发现,问题出在第 3 章。

谢谢你的帮助以及对我胡言乱语的耐心:)

相关内容