LaTeX 错误:未找到文件“suffix.sty”

LaTeX 错误:未找到文件“suffix.sty”

我希望我的 R Sweave 文件能够在 Rstudio 中顺利运行。我尝试编译以下内容:

\documentclass[a4paper,12pt]{article}

\usepackage{amsmath,natbib}
%\usepackage[utf8]{inputenc}
\usepackage{bm}
\usepackage{url}
\usepackage[printonlyused]{acronym}
\usepackage{color}
\usepackage{mathbbol}
\usepackage{numprint}
\usepackage[color=blue!30!white,textsize=small,textwidth=28mm]{todonotes}
\usepackage{enumerate}
\usepackage{setspace}
\usepackage[left=2.0cm,top=2cm,right=3.2cm,bottom=3cm,bindingoffset=0.5cm]{geometry}
\usepackage{titlesec}
\usepackage{lineno}
\usepackage{pbox}
\usepackage{multirow}
\usepackage{bm}
\usepackage{multicol}
\usepackage{bigfoot}
\usepackage{subfig}
\captionsetup[subfloat]{farskip=-10pt, position=top} %farskip=-10pt,
\usepackage{graphicx}
% \usepackage{booktabs,siunitx}
\begin{document}
%\SweaveOpts{concordance=TRUE}

\begin{table}[!htb]
 \begin{center}
 \begin{tabular}{l@{\hspace{0.5cm}} c    @{\hspace{0.5cm}}  c }
% \begin{tabular}{SSS}
 \hline
  & Pooled coefficients &  Pooled standard error  \\
  
  \cline{2-3} \\[-2mm]
Intercept   &   
$1$ &  $2$ \\ \\[1mm]

$Age$ & 
$1$ & $2$ \\ [1mm]
 
Birthweight & 
$1$ & $2$ \\ [1mm]

Cronic health condition & 
$1$ & $2$ \\ 
 
BMI & 
$1$ & $2$ \\

Gross motor skill & 
$1$ & $2$ \\

Sibling & 
$1$ & $2$ \\

Parental BMI & 
$1$ & $2$ \\

SES & 
$1$ & $2$ \\

Family structure & 
$1$ & $2$ \\

Self-regulation & 
$1$ & $2$ \\

Psychological difficulties & 
$1$ & $2$ \\

Emotionality temperament & 
$1$ & $2$ \\

Activity temperament & 
$1$ & $2$ \\

Eas\_soc & 
$1$ & $2$ \\

Shyness temperament & 
$1$ & $2$ \\

Parenting stress & 
$1$ & $2$ \\

Cognitive performance & 
$1$ & $2$ \\

Sleep duration & 
$1$ & $2$ \\

Play frequency & 
$1$ & $2$ \\

Parental sedentary behavior & 
$1$ & $2$ \\

Parental sports club membership & 
$1$ & $2$ \\

pa\_cat\_comb21 & 
$1$ & $2$ \\

Transport to childcare & 
$1$ & $2$ \\

Parental involvement in child physical activity & 
$1$ & $2$ \\

Parental tobacco use & 
$1$ & $2$ \\

Parental alcohol consumtion & 
$1$ & $2$ \\

Time outdoors & 
$1$ & $2$ \\

Fixed toys & 
$1$ & $2$ \\

Portable toys & 
$1$ & $2$ \\

Days at childcare & 
$1$ & $2$ \\

Living area per person & 
$1$ & $2$ \\

Neighborhood safety & 
$1$ & $2$ \\

Dog & 
$1$ & $2$ \\

Season & 
$1$ & $2$ \\

Region & 
$1$ & $2$ \\

\hline
\end{tabular}
\caption{\label{tab:coefficients_and_standard_errors} The caption for the table}
\end{center}
\end{table}



\end{document}  

我期望输出一个表格,其中第一列为文本,第二列和第三列为 1 和 2(当我让它工作时,我将使用 R 输出)。相反,我收到以下错误

LaTeX Error: File `suffix.sty` not found.

我已经下载了 Bigfoot 包,但我不确定所有内容是否都位于其应在的位置。日志文件如下:

This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021) (preloaded format=xelatex 2021.5.5)  13 MAY 2021 07:58
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**Make_table_example.tex
(./Make_table_example.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count175
\c@section=\count176
\c@subsection=\count177
\c@subsubsection=\count178
\c@paragraph=\count179
\c@subparagraph=\count180
\c@figure=\count181
\c@table=\count182
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR)

(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks15
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)

(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 105.

(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics-def/xetex.def
File: xetex.def 2021/03/18 v5.0k Graphics/color driver for xetex
))
\Gin@req@height=\dimen139
\Gin@req@width=\dimen140
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics/color.sty
Package: color 2020/02/24 v1.2b Standard LaTeX Color (DPC)

(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: xetex.def on input line 147.
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/framed/framed.sty
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip49
\fb@frw=\dimen141
\fb@frh=\dimen142
\FrameRule=\dimen143
\FrameSep=\dimen144
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/base/alltt.sty
Package: alltt 1997/06/16 v2.0g defines alltt environment
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2020/09/23 v2.17i AMS math features
\@mathmargin=\skip50

For additional information on amsmath, use the `?' option.
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text

(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks16
\ex@=\dimen145
))
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen146
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count183
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count184
\leftroot@=\count185
LaTeX Info: Redefining \overline on input line 399.
\classnum@=\count186
\DOTSCASE@=\count187
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box47
\strutbox@=\box48
\big@size=\dimen147
LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
\macc@depth=\count188
\c@MaxMatrixCols=\count189
\dotsspace@=\muskip16
\c@parentequation=\count190
\dspbrk@lvl=\count191
\tag@help=\toks17
\row@=\count192
\column@=\count193
\maxfields@=\count194
\andhelp@=\toks18
\eqnshift@=\dimen148
\alignsep@=\dimen149
\tagshift@=\dimen150
\tagwidth@=\dimen151
\totwidth@=\dimen152
\lineht@=\dimen153
\@envbody=\toks19
\multlinegap=\skip51
\multlinetaggap=\skip52
\mathdisplay@stack=\toks20
LaTeX Info: Redefining \[ on input line 2923.
LaTeX Info: Redefining \] on input line 2924.
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/natbib/natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip53
\bibsep=\skip54
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count195
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/tools/bm.sty
Package: bm 2019/07/24 v1.2d Bold Symbol Support (DPC/FMi)
\symboldoperators=\mathgroup4
\symboldletters=\mathgroup5
\symboldsymbols=\mathgroup6
LaTeX Font Info:    Redeclaring math alphabet \mathbf on input line 141.
LaTeX Info: Redefining \bm on input line 209.
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip17
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
)
(/Users/Tinius/Library/TinyTeX/texmf-dist/tex/latex/acronym/acronym.sty
Package: acronym 2020/04/17 v1.47 Support for acronyms (Tobias Oetiker)


! LaTeX Error: File `suffix.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.47 \newif
           \ifAC@footnote^^M
*** (cannot \read from terminal in nonstop modes)

 
Here is how much of TeX's memory you used:
 1880 strings out of 478893
 23562 string characters out of 5864781
 316003 words of memory out of 5000000
 21788 multiletter control sequences out of 15000+600000
 403438 words of font info for 28 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 68i,0n,74p,275b,40s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.

我在 Big Sur 的 Macbook Pro 上运行最新的 R 和 Rstudio,2014 年中期。我不太清楚 latex 的设置,因为我在电脑设置方面是个菜鸟。

提前谢谢您!学士论文需要这个:D

编辑

不幸的是,仍然不起作用。

我按照下面建议的方式做了,并将这些更改应用到了上面的示例中。

  • 根据第一个答案设置偏好
  • 已删除\usepackage[utf8]{inputenc}
  • 已删除\SweaveOpts{concordance=TRUE}

日志文件也更改为使用新设置时生成的文件。

答案1

我不确定你说的“我已经下载了 Bigfoot 包”是什么意思,但如果你在 RStudio 的全局选项中选中“编译 .tex 文件时使用 tinytex”选项,则无需手动执行此操作。然后 RStudio 将调用泰特克斯包进行编译.tex,缺少的 LaTeX 包将被自动安装。

在 RStudio 中使用 tinytex 编译 .tex

相关内容