无法运行任何 LaTeX 编辑器

无法运行任何 LaTeX 编辑器

我刚刚构建了一个桌面,但似乎在运行 LaTeX 时遇到了问题。

重要信息:

  • Windows 7(64 位)
  • 华硕 Radeon R9 290
  • 所有与 LaTeX 相关的软件都保存在非操作系统驱动器上
  • 已经安装并测试了几种不同的编辑器(MikTex、LyX、TeXstudio 和 TeXworks),但似乎都无法编译/构建任何东西 - 重新安装了几个作为测试
  • 似乎没有创建日志文件

作为测试代码,我一直使用从互联网上复制的一个基本示例,以防它是软件包问题,以及我写的一封求职信,因为我可以保证它能正常工作(尽管它确实需要一些软件包)。对这里可能是什么问题有什么想法吗?谢谢帮助!

截屏: 在此处输入图片描述

基本测试代码:

    \documentclass[12pt]{article}
%   options include 12pt or 11pt or 10pt
%   classes include article, report, book, letter, thesis

\title{This is the title}
\author{Author One \\ Author Two}
\date{29 February 2004}

\begin{document}
\maketitle

This is the content of this document.

This is the 2nd paragraph.
Here is an inline formula:
$   V = \frac{4 \pi r^3}{3}  $.
And appearing immediately below
is a displayed formula:
$$  V = \frac{4 \pi r^3}{3}  $$
\end{document}

求职信测试(删除个人信息):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Short Stylish Cover Letter
% LaTeX Template
% Version 1.0 (28/5/13)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Stefano (http://stefano.italians.nl/archives/63)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% IMPORTANT: THIS TEMPLATE NEEDS TO BE COMPILED WITH XeLaTeX
%
% The two fonts used in this template: Adobe Garamond Pro and Gill Sans
% do not come with Windows by default. You will need to download them in
% order to get an output as in the preview PDF. Otherwise, change those 
% fonts to fonts that do come with Windows or comment out the lines to use 
% the default font.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass{scrlttr2}

%\usepackage[left=2.5cm, right=2.5cm, bottom=1cm]{geometry}
\usepackage[left=2cm, right=2.5cm, bottom=1cm]{geometry}
\usepackage{fontspec} % Allows font customization
\usepackage{marvosym} % Allows the use of symbols
\usepackage[english]{babel} % Required to compile in Windows
\usepackage{graphicx}


\setlength\parindent{0pt} % Removes all indentation from paragraphs

\defaultfontfeatures{Mapping=tex-text}
%\setmainfont {Adobe Garamond Pro} % Main document font
\setsansfont {Cambria} % Used in the from address line above the to address

\renewcommand{\normalsize}{\fontsize{12}{12}\selectfont} % Sets the font size and leading
\def\second{{\raise.5ex\hbox{\small nd}}}
\makeatletter
\@setplength{refvpos}{8cm}
\makeatother

%----------------------------------------------------------------------------------------
%  PERSONAL INFORMATION
%----------------------------------------------------------------------------------------

%\setkomavar{fromname}{Name} % Your name
%\setkomavar{fromaddress}{Address} % Your address
%\setkomavar{fromphone}{(555) 555-5555} % Your phone number
%\setkomavar{fromemail}{[email protected]} % Your email address
%\setkomavar{place}{} % City written before the date, put your city here if you want this
\setkomavar{signature}{My Name} % Your name as you want it to appear in the signature
%\setkomavar{date}{\flushleft\vspace{-\baselineskip}\today\par}
\setkomavar{date}{\vspace*{-\baselineskip}}
\newkomavar{phone}
\newkomavar{email}
\setkomavar{phone}{(555) 555-5555}
\setkomavar{email}{[email protected]}

% These are not used in this document, uncomment if you would like to use them and refer to them as \usekomavar{name}
%\setkomavar{fromfax}{+1 (1)23 456789} % Your fax number
%\setkomavar{fromurl}{http://www.johnsmith.com} % Your personal website
%\setkomavar{frombank}{Postbank 9307157}

%----------------------------------------------------------------------------------------
%  HEADER SECTION
%----------------------------------------------------------------------------------------

\firsthead{
\centering
{\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape Name}\\[5mm]
\fontsize{21}{21}\selectfont\scshape My Title \\ My Institution } % Your current job title

%----------------------------------------------------------------------------------------
%  FOOTER SECTION
%----------------------------------------------------------------------------------------

%\firstfoot{
%\centering
%\addfontfeature{LetterSpace=20.0}\scshape
%{
%\renewcommand{\\}{\ {\large\textperiodcentered}\ }
%\usekomavar{fromaddress}
%}\\
%{\Large\Letter} \usekomavar{fromemail} \ {Large\Telefon} \usekomavar{fromphone} % If you want your fax number or website URL showing, add it here; you may need to play around with spacing
%}


%----------------------------------------------------------------------------------------

\begin{document}

%----------------------------------------------------------------------------------------
% COVER LETTER CONTENTS
%----------------------------------------------------------------------------------------

\begin{letter}{ % Address of the company you are applying to
\today \par \vspace*{2\baselineskip}
Biotech Company \\
123 Street Street \\
Washington, CA 12345 
}

%\setkomavar{subject}{Cover Letter} % This is the bold text saying 'Cover Letter', remove it if you don't like it

\opening{Dear Mr. Thompson:\\}

\begin{sloppypar}
My name is...

Thank you for your time and consideration. I am looking forward to a further discussion of this job position. \\

\end{sloppypar}

Sincerely, \\
%\includegraphics[width=6cm]{Signature.png}

\usekomavar{signature}\\ 
\usekomavar{phone}\\
\usekomavar{email}

%----------------------------------------------------------------------------------------

\end{letter}
\end{document}

硬盘识别确认: 在此处输入图片描述

答案1

我找到了问题所在。我有一个旧硬盘,上面安装了某个版本的 LaTeX,所以当编译器运行时,它会从旧副本中调用包,从而导致某种无限循环。从硬盘中删除所有 LaTeX 文件,并在新硬盘上进行清除安装,所有问题都解决了。事后看来,我应该立即这样做,但我认为 LaTeX 不会对包进行全局搜索,而只会在关联的本地文件夹中查找。

相关内容