错误:latex.ltx:10708:LaTex 错误:缺少 /begin{document} Tectonic

错误:latex.ltx:10708:LaTex 错误:缺少 /begin{document} Tectonic

我正在尝试使用 Windows 上的 Tectonic 编译 TeX 文档。当我编译文档时,它给出了某种我无法理解的 \begin{document} 错误。我已检查以确保文档路径正确,我已设置文档类,编码为 UTF-8,并且我实际上有 begin{document}...\end{document}。

以下是我尝试编译的代码:

\documentclass[12pt]{article}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage[margin=1.2in]{geometry} 
\usepackage{amsmath}
\usepackage{tcolorbox}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{accents}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{apacite}
\pagestyle{fancy}
\setlength{\headheight}{38pt}
\usepackage{natbib} % For references
\bibpunct{(}{)}{;}{a}{}{,} % Reference punctuation
\def\citeapos#1{\citeauthor{#1}'s (\citeyear{#1})}
\usepackage{xcolor}
\hypersetup{
    colorlinks,
    linkcolor={blue!50!blue},
    citecolor={black!50!black},
    urlcolor={blue!80!blue}
}


\renewcommand\qedsymbol{$\blacksquare$}

\newcommand{\ubar}[1]{\underaccent{\bar}{#1}}

\begin{document}

\lhead{Damon Roberts} 
%\rhead{Information Processing \\ Annotated Bibliography: Emotion \\ \today}

\cfoot{\thepage}

\doublespacing

\section{General Notes}

\section{Overview}
\begin{itemize}
    \item Marcus \citeyearpar{marcus_2000_arps} details a rich intellectual history of the ways that political psychologists have (and have not) built off the literature in psychology and neuroscience on emotion. In doing so, they highlight the pervasive view that emotions are seen quite normatively rather than functionally in the political science literature. Functional definitions of emotion are much more pervasive in non-political science applications by arguing for the ways in which emotions work in both cognitive and non-cognitive ways. It highlights the tendency for political scientists to view it as largely a cognitive process rather than aligning with the view that Marcus says is a consensus which is that emotions are not appraisals but are these pre-conscious sources of information, mediators of judgement, and are shaped by information. Read this over and over for the dissertation.
\end{itemize}
\section{Genetic predictors of emotional predispositions}
    \begin{itemize}
        \item Hatemi and colleagues \citeyearpar{hatemi_et-al_2013_ajps} build off of work conducted by psychologists which found that there is a genetic component to fear as a predisposition. They propose a theory which suggests that fear mediates the relationship between genetics and out-group political preferences. Using the Virginia Vital Registry dataset of related folks, they ask a 28-item battery of political attitudes and find that those who are predisposed to expressing more social fear tend to hold more negative attitudes about immigration and segregation. Out of 28 items, they find two.
    \end{itemize}
\section{Heterogeneity in induction and magnitude}
    \begin{itemize}
        \item Bakker and colleagues \citeyearpar{bakker_et-al_2020} present a circumplex model which suggests that emotional responses to political stimuli are dependent on a number of factors. Using EMG (to measure valence of emotion) and skin conductance (to measure intensity of emotional response) in response to video clips with left or right-wing rhetoric on prominent issues they measure heart rate variability, activation of the Zygomaticus (positive emotions) and  Corrugator (negative emotions) muscle, they find that knowledge does not explain variation in arousal, incongruent rhetoric produces negative affect, congruent rhetoric does not produce positive affect (there is not much positive emotion in politics), no evidence that incongruence increases attentitiveness, and arousal and negative affect predict issue position change, independent of self-reported discrete emotions.
    \end{itemize}
\newpage
%\bibliographystyle{apsr}
%\bibliography{~/Dropbox/bibliographies/information_processing/emotions.bib}
\end{document}

这是包括我的命令行输入的错误:

(base)
damon@DCR-DESKTOP MINGW64 ~/Dropbox/annotated_bibliographies
$ conda activate tectonic
(tectonic) 
damon@DCR-DESKTOP MINGW64 ~/Dropbox/annotated_bibliographies
$ tectonic -X compile ~/information_processing/emotions.tex --print
note: "version 2" Tectonic command-line interface activated
note: generating format "latex"
(texput (tectonic-format-latex.tex (xelatex.ini (latex.ltx (texsys.cfg)
./texsys.aux found


\@currdir set to: ./.


Assuming \openin and \input 
have the same search path.


Defining UNIX/DOS style filename parser.

catcodes, registers, parameters,
LaTeX2e <2020-02-02> patch level 5
hacks, control, par, spacing, files, font encodings, lengths,
====================================

Local config file fonttext.cfg used

====================================
(fonttext.cfg (fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===

(omlenc.def) (omsenc.def) (ot1enc.def) (t1enc.def) (ts1enc.def) (tuenc.def)
(tulmr.fd) (tulmss.fd) (tulmtt.fd) (ts1lmr.fd) (t1cmr.fd) (ot1cmr.fd)
(ot1cmss.fd) (ot1cmtt.fd)))
====================================

Local config file fontmath.cfg used

====================================
(fontmath.cfg (fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===

(omlcmm.fd) (omscmsy.fd) (omxcmex.fd) (ucmr.fd)))
====================================

Local config file preload.cfg used

=====================================
(preload.cfg (preload.ltx)) page nos., x-ref, environments, center, verbatim,
math definitions, boxes, title, sectioning, contents, floats, footnotes,
index, bibliography, output,  Unicode character data, (load-unicode-data
load-unicode-data.tex v1.12 (2020-03-12)
Reading Unicode data
# UnicodeData-13.0.0.txt
# Modified 2020-03-12 11:00:00 GMT [JAW]
)
===========================================
Local configuration file hyphen.cfg used
===========================================
(hyphen.cfg (xebabel.def) (switch.def) (hyphen.tex) (dumyhyph.tex)
(zerohyph.tex) (dehypht-x-2019-04-04.tex
dehyph-exptl: using a TeX engine with native UTF-8 support.
(dehypht-x-2019-04-04.pat
German Hyphenation Patterns (Traditional Orthography) `dehypht-x' 2019-04-04 (W
L))) (dehyphn-x-2019-04-04.tex
dehyph-exptl: using a TeX engine with native UTF-8 support.
(dehyphn-x-2019-04-04.pat
German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x' 2019-04-04
 (WL))) (loadhyph-af.tex UTF-8 Afrikaans hyphenation patterns (hyph-af.tex)
(hyph-quote-af.tex)) (loadhyph-grc.tex
UTF-8 Hyphenation patterns for Ancient Greek (hyph-grc.tex)) (ibyhyph.tex
Greek hyphenation patterns for Ibycus encoding, v3.0) (zerohyph.tex)
(loadhyph-hy.tex UTF-8 Armenian hyphenation patterns (hyph-hy.tex))
(loadhyph-eu.tex UTF-8 Basque hyphenation patterns (hyph-eu.tex))
(loadhyph-be.tex UTF-8 Belarusian hyphenation patterns (hyph-be.tex)
(hyph-quote-be.tex)) (loadhyph-bg.tex UTF-8 Bulgarian hyphenation patterns
(hyph-bg.tex
Bulgarian hyphenation patterns (options: --safe-morphology --standalone-tex, ve
rsion 21 October 2017))) (loadhyph-ca.tex UTF-8 Catalan hyphenation patterns
(hyph-ca.tex)) (loadhyph-zh-latn-pinyin.tex
UTF-8 Pinyin Hyphenation Patterns (with tone markers) 2018-11-25 (WL)
(hyph-zh-latn-pinyin.tex)) (loadhyph-cu.tex
UTF-8 Church Slavonic hyphenation patterns (hyph-cu.tex)) (loadhyph-cop.tex
UTF-8 Coptic hyphenation patterns (hyph-cop.tex)) (loadhyph-hr.tex
UTF-8 Croatian hyphenation patterns (hyph-hr.tex)) (loadhyph-cs.tex
UTF-8 Czech hyphenation patterns (hyph-cs.tex)) (loadhyph-da.tex
UTF-8 Danish hyphenation patterns (hyph-da.tex)) (loadhyph-nl.tex
UTF-8 Dutch hyphenation patterns (hyph-nl.tex)) (loadhyph-en-gb.tex
ASCII Hyphenation patterns for British English (hyph-en-gb.tex))
(loadhyph-en-us.tex ASCII Hyphenation patterns for American English
(hyph-en-us.tex)) (loadhyph-eo.tex UTF-8 Esperanto hyphenation patterns
(hyph-eo.tex)) (loadhyph-et.tex UTF-8 Estonian hyphenation patterns
(hyph-et.tex)) (loadhyph-mul-ethi.tex UTF-8 Pan-Ethiopic hyphenation patterns
(hyph-mul-ethi.tex)) (zerohyph.tex) (loadhyph-fi.tex
UTF-8 Finnish hyphenation patterns (hyph-fi.tex)) (loadhyph-fr.tex
UTF-8 French hyphenation patterns (hyph-fr.tex) (hyph-quote-fr.tex))
(loadhyph-fur.tex UTF-8 Friulan hyphenation patterns (hyph-fur.tex)
(hyph-quote-fur.tex)) (loadhyph-gl.tex UTF-8 Galician hyphenation patterns
(hyph-gl.tex)) (loadhyph-ka.tex UTF-8 Georgian hyphenation patterns
(hyph-ka.tex)) (loadhyph-de-1901.tex
UTF-8 German hyphenation patterns (traditional orthography) (hyph-de-1901.tex
German Hyphenation Patterns (Traditional Orthography) `dehypht-x' 2019-04-04 (W
L))) (loadhyph-de-1996.tex
UTF-8 German hyphenation patterns (reformed orthography) (hyph-de-1996.tex
German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x' 2019-04-04
 (WL))) (loadhyph-de-ch-1901.tex
UTF-8 Swiss-German hyphenation patterns (traditional orthography)
(hyph-de-ch-1901.tex
Swiss-German Hyphenation Patterns (Traditional Orthography) `dehyphts-x' 2019-0
4-04 (WL))) (loadhyph-el-monoton.tex
UTF-8 Hyphenation patterns for uni-accent (monotonic) Modern Greek
(hyph-el-monoton.tex)) (loadhyph-el-polyton.tex
UTF-8 Hyphenation patterns for multi-accent (polytonic) Modern Greek
(hyph-el-polyton.tex)) (loadhyph-hu.tex UTF-8 Hungarian hyphenation patterns
(hyph-hu.tex)) (loadhyph-is.tex UTF-8 Icelandic hyphenation patterns
(hyph-is.tex)) (loadhyph-as.tex UTF-8 Assamese hyphenation patterns
(hyph-as.tex)) (loadhyph-bn.tex UTF-8 Bengali hyphenation patterns (hyph-bn.tex
)) (loadhyph-gu.tex UTF-8 Gujarati hyphenation patterns (hyph-gu.tex))
(loadhyph-hi.tex UTF-8 Hindi hyphenation patterns (hyph-hi.tex))
(loadhyph-kn.tex UTF-8 Kannada hyphenation patterns (hyph-kn.tex))
(loadhyph-ml.tex UTF-8 Malayalam hyphenation patterns (hyph-ml.tex))
(loadhyph-mr.tex UTF-8 Marathi hyphenation patterns (hyph-mr.tex))
(loadhyph-or.tex UTF-8 Oriya hyphenation patterns (hyph-or.tex))
(loadhyph-pa.tex UTF-8 Panjabi hyphenation patterns (hyph-pa.tex))
(loadhyph-pi.tex UTF-8 Pali hyphenation patterns (hyph-pi.tex))
(loadhyph-ta.tex UTF-8 Tamil hyphenation patterns (hyph-ta.tex))
(loadhyph-te.tex UTF-8 Telugu hyphenation patterns (hyph-te.tex))
(loadhyph-id.tex ASCII Indonesian hyphenation patterns (hyph-id.tex))
(loadhyph-ia.tex ASCII Hyphenation patterns for Interlingua (hyph-ia.tex))
(loadhyph-ga.tex UTF-8 Irish hyphenation patterns (hyph-ga.tex))
(loadhyph-it.tex UTF-8 Italian hyphenation patterns (hyph-it.tex)
(hyph-quote-it.tex)) (loadhyph-kmr.tex UTF-8 Kurmanji hyphenation patterns
(hyph-kmr.tex)) (loadhyph-la.tex UTF-8 Latin hyphenation patterns (hyph-la.tex)
) (loadhyph-la-x-classic.tex
UTF-8 Classical Latin hyphenation patterns, v.2.0 2019-07-03
(hyph-la-x-classic.tex)) (loadhyph-la-x-liturgic.tex
UTF-8 Liturgical Latin hyphenation patterns (hyph-la-x-liturgic.tex))
(loadhyph-lv.tex UTF-8 Latvian hyphenation patterns (hyph-lv.tex))
(loadhyph-lt.tex UTF-8 Lithuanian hyphenation patterns (hyph-lt.tex))
(loadhyph-mk.tex UTF-8 Macedonian hyphenation patterns (hyph-mk.tex))
(loadhyph-mn-cyrl.tex UTF-8 (New) Mongolian hyphenation patterns
(hyph-mn-cyrl.tex)) (loadhyph-mn-cyrl-x-lmc.tex
UTF-8 Mongolian hyphenation patterns (hyph-mn-cyrl-x-lmc.tex)) (loadhyph-nb.tex
 UTF-8 Norwegian Bokmal hyphenation patterns (hyph-nb.tex (hyph-no.tex)))
(loadhyph-nn.tex UTF-8 Norwegian Nynorsk hyphenation patterns (hyph-nn.tex
(hyph-no.tex))) (loadhyph-oc.tex UTF-8 Occitan hyphenation patterns
(hyph-oc.tex) (hyph-quote-oc.tex)) (loadhyph-pms.tex
UTF-8 Piedmontese hyphenation patterns (hyph-pms.tex) (hyph-quote-pms.tex))
(loadhyph-pl.tex UTF-8 Polish hyphenation patterns (hyph-pl.tex))
(loadhyph-pt.tex UTF-8 Portuguese hyphenation patterns (hyph-pt.tex))
(loadhyph-ro.tex UTF-8 Romanian hyphenation patterns (hyph-ro.tex))
(loadhyph-rm.tex UTF-8 Romansh hyphenation patterns (hyph-rm.tex)
(hyph-quote-rm.tex)) (loadhyph-ru.tex UTF-8 Russian hyphenation patterns
(hyph-ru.tex)) (loadhyph-sa.tex UTF-8 Sanskrit hyphenation patterns
(hyph-sa.tex)) (loadhyph-sr-latn.tex UTF-8 Serbian hyphenation patterns
(hyph-sh-latn.tex) (hyph-sh-cyrl.tex)) (loadhyph-sr-cyrl.tex
UTF-8 Serbian hyphenation patterns (hyph-sh-latn.tex) (hyph-sh-cyrl.tex))
(loadhyph-sk.tex UTF-8 Slovak hyphenation patterns (hyph-sk.tex))
(loadhyph-sl.tex UTF-8 Slovenian hyphenation patterns (hyph-sl.tex))
(loadhyph-es.tex UTF-8 Spanish hyphenation patterns (hyph-es.tex))
(loadhyph-sv.tex UTF-8 Swedish hyphenation patterns (hyph-sv.tex))
(loadhyph-th.tex UTF-8 Thai hyphenation patterns (hyph-th.tex))
(loadhyph-tr.tex UTF-8 Turkish hyphenation patterns (hyph-tr.tex))
(loadhyph-tk.tex UTF-8 Turkmen hyphenation patterns (hyph-tk.tex))
(loadhyph-uk.tex UTF-8 Ukrainian hyphenation patterns (hyph-uk.tex)
(hyph-quote-uk.tex)) (loadhyph-hsb.tex
UTF-8 Upper Sorbian hyphenation patterns (hyph-hsb.tex)) (loadhyph-cy.tex
UTF-8 Welsh hyphenation patterns (hyph-cy.tex)))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
error: latex.ltx:10708: LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help
Type  H <return>  for immediate help.
 ...

l.10708 \let\repeat=
                    \fi
No pages of output.
Transcript written on texput.log.
error: halted on potentially-recoverable error as specified

我不知道错误“l.10708 \let\repeat= \fi”或“latex.ltx:10708”是什么意思......

答案1

所以......我认为我的 Tectonic 安装或 conda 环境存在一些问题。

我删除了我的 conda 环境,然后创建了一个新的,用 conda-forge 重新安装了 tectonic,然后重新编译了文档,现在可以正常工作了。

感谢@DavidCarlisle 的帮助!

相关内容