我的操作系统是win10企业版。
VS Code 输出:!LaTeX 错误:未找到文件“algorithms.sty”。
我为我和所有用户设置了系统环境路径,并在 E:\texlive\2018\texmf-dist\tex\latex\algorithms 中找到了“algorithms.sty”
另外,我在 TexLive Manager-actions 中按下更新文件名数据库
我尝试了很多方法,但没有效果,谢谢你的时间
% !TEX program = pdflatex
\documentclass{article}
\usepackage{algorithms}
\usepackage{algorithmicx}
\usepackage{lipsum}
\begin{document}
asdlkjads
\end{document}
\begin{documeasdlkjadsnt}
\section{A section}
\begin{algorithm*}
\caption{Euclid’s algorithm}\label{euclid}
\begin{algorithmic}[1]
\Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}
\State $r\gets a\bmod b$
\While{$r\not=0$}\Comment{We have the answer if r is 0}
\State $a\gets b$
\State $b\gets r$
\State $r\gets a\bmod b$
\EndWhile\label{euclidendwhile}
\State \textbf{return} $b$\Comment{The gcd is b}
\EndProcedure
\end{algorithmic}
\end{algorithm*}
\lipsum[1-15]% dummy text
\end{document}
我可以编译该代码,如下所示
% !TEX program = pdflatex
\documentclass{article}
\usepackage{hyperref}
\usepackage[round]{natbib}
\usepackage{newtxtext,newtxmath}
\author{Dongsheng Deng}
\title{Configuration of Visual Studio Code for \LaTeX{} Users}
\date{\today}
\begin{document}
\maketitle
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, \cite{GraffZivin2018} sunt in culpa qui officia deserunt mollit anim id est laborum.
\begin{equation}
a^2+b^2=c^2
\end{equation}
\bibliography{info}
\bibliographystyle{plainnat}
\end{document}