发生严重错误,未生成输出 PDF 文件!文件来源于 R Studio

发生严重错误,未生成输出 PDF 文件!文件来源于 R Studio

我正在做一项作业,并从以前的作业中复制并粘贴了一些示例代码以开始使用。当我尝试编译 PDF 时发生致命错误。我粘贴了我的代码和日志文件:

\documentclass[11pt,letterpaper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{fullpage}
    \usepackage{setspace}
    \usepackage{natbib}
    \usepackage{multirow}

    % Meta data:
    \author{Gabby Rivera}
    \title{Lab 3}

\begin{document}
\maketitle

\doublespacing



\section*{Data Structure}

White's data is stored in an .Rdata file. The data itself is structured as a cross-sectional time series with a total of 1,974 observations. 



\input{raceIVpost2012placebo}

Table~\ref{tab:bibleXkids} shows the relationship between feelings about the Bible and whether the respondent has children. The $\chi^2$ statistic (63.18 with 2 degrees of freedom) is significant with $p = 0.0000 < 0.05$. 



\input{tab_penaltyXkids}

Table~\ref{tab:penaltyXkids} shows the relationship between attitudes toward the death penalty and whether the respondent has children. The $\chi^2$ statistic (0.08 with 1 degree of freedom) is not significant with $p = 0.78 > 0.05$.. 



% TASK: Comment out the \nocite{} command on the next line once you have completed the citation task above
\nocite{*}
\bibliographystyle{apsr2006}
\bibliography{ReplicationArticles}
I have downloaded the replication data but it will not allow me to cite.

\end{document}

日志档案 :

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.5.8) 16 SEP 2019 12:13
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**Milestone2_Rivera.tex
(./Milestone2_Rivera.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
)

(/usr/local/texlive/2019/texmf-dist/tex/latex/preprint/fullpage.sty
Package: fullpage 1999/02/23 1.1 (PWD)
\FP@margin=\skip43
)

(/usr/local/texlive/2019/texmf-dist/tex/latex/setspace/setspace.sty
Package: setspace 2011/12/19 v6.7a set line spacing
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/natbib/natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip44
\bibsep=\skip45
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count88
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/multirow/multirow.sty
Package: multirow 2019/01/01 v2.4 Span multiple rows of a table
\multirow@colwidth=\skip46
\multirow@cntb=\count89
\multirow@dima=\skip47
\bigstrutjot=\dimen103
)
(./Milestone2_Rivera.aux)
\openout1 = `Milestone2_Rivera.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 13.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 13.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 13.
! LaTeX Error: File `raceIVpost2012placebo.tex' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)
Enter file name:
! Emergency stop.
<read *>
l.25 \input{raceIVpost2012placebo}
^^M
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
687 strings out of 492616
8659 string characters out of 6129482
66909 words of memory out of 5000000
4666 multiletter control sequences out of 15000+600000
7580 words of font info for 27 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
21i,6n,19p,165b,187s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!

答案1

需要提供2个文件raceIVpost2012placebo.textab_penaltyXkids,以及参考书目数据库。ReplicationArticles.bib

您可以将其作为单独的文件(正如@DavidCarlisle 所说),或者您需要在文档的序言中写出内容。

\documentclass[11pt,letterpaper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{fullpage}
    \usepackage{setspace}
    \usepackage{natbib}
    \usepackage{multirow}

    % Meta data:
    \author{Gabby Rivera}
    \title{Lab 3}


\begin{filecontents}{raceIVpost2012placebo.tex}
    \begin{table}[h]
     \centering
     \caption{X}
        \begin{tabular}{c c}
        \hline
        Now & Then \\
        5   &  25  \\
        \hline
        \end{tabular}
     \label{tab:bibleXkids}
    \end{table}
\end{filecontents}



\begin{filecontents}{tab_penaltyXkids.tex}
    \begin{table}[h]
     \centering
     \caption{Y}
        \begin{tabular}{c c}
        \hline
        Then & Again \\
            25  &  625  \\
        \hline
        \end{tabular}
     \label{tab:penaltyXkids}
    \end{table}
\end{filecontents}



\begin{filecontents}{ReplicationArticles.bib}
  @article{bw,
    title={New Testament},
    author={Bible, Holy},
    journal={Gospel According to St Mark},
    year={1995}
    }
\end{filecontents}




\begin{document}
\maketitle

\doublespacing



\section*{Data Structure}

White's data is stored in an .Rdata file. The data itself is structured 
as a cross-sectional time series with a total of 1,974 observations. 




\input{raceIVpost2012placebo}

Table~\ref{tab:bibleXkids} shows the relationship between feelings 
about the Bible and whether the respondent has children. 
The $\chi^2$ statistic (63.18 with 2 degrees of freedom) is significant 
with $p = 0.0000 < 0.05$. 



\input{tab_penaltyXkids}

Table~\ref{tab:penaltyXkids} shows the relationship between attitudes 
toward the death penalty and whether the respondent has children. 
The $\chi^2$ statistic (0.08 with 1 degree of freedom) is not significant 
with $p = 0.78 > 0.05$.. 




% TASK: Comment out the \nocite{} command on the next line once you have 
completed the citation task above
\nocite{*} 
\bibliographystyle{unsrt}  % apsr2006
\bibliography{ReplicationArticles}

I have downloaded the replication data but it will not allow me to cite.

\end{document}

...

这应该提供类似这样的内容:

...

在此处输入图片描述

相关内容