【TeXworks 安装sty文件】! LaTeX Error: File xxx.sty not found

由于缺失LaTeX宏包,排版报错 ! LaTeX Error: File ‘setspace.sty’ not found. 找不到sty文件
解决方法如下

  1. 在开始菜单中打开 MiKTex Console
    【TeXworks 安装sty文件】! LaTeX Error: File xxx.sty not found
  2. 选择 “Packages” 栏目,搜索缺失的包,如setspace,
    选中之后点击“+”安装【TeXworks 安装sty文件】! LaTeX Error: File xxx.sty not found
  3. 等待安装完成
    【TeXworks 安装sty文件】! LaTeX Error: File xxx.sty not found