未定义引用在 VSCode 中使用 LaTex Workshop

未定义引用在 VSCode 中使用 LaTex Workshop

我是 Visual Studio Code 中 LaTeX 的新手,在使用 LaTeX workshop 扩展时,我的文件出现了问题.bib。其他一切都正常,只是出于某种原因它无法读取我的.bib文件。

我正在使用磷灰石包。我同时使用两者\usepackage{apacite},并且正确使用了\bibliographystyle{apacite}命令。此外,我还将参考书目设置为与我的tex包位于同一文件夹中,并使用 调用它\bibliography{bib-file-name}

以下是来自编译器的信息:

```
Rc files read:
  NONE
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex  -synctex=1 -interaction=nonstopmode -file-line-error -recorder -output-directory="c:/Users/damon/Dropbox/white-identity-origins/drafts"  "c:\Users\damon\Dropbox\white-identity-origins\drafts\dcr_white_identity_origins_context_draft_2.tex"'
------------
Set environment variable BIBINPUTS='c:/Users/damon/Dropbox/white-identity-origins/drafts;'
Set environment variable TEXINPUTS='c:/Users/damon/Dropbox/white-identity-origins/drafts;'
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-06> (c:/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(c:/texlive/2020/texmf-dist/tex/latex/base/size12.clo)) (c:/texlive/2020/texmf-dist/tex/latex/geometry/geometry.sty (c:/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty) (c:/texlive/2020/texmf-dist/tex/generic/iftex/ifvtex.sty (c:/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty))) (c:/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(c:/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty (c:/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty)) (c:/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty) (c:/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty)) (c:/texlive/2020/texmf-dist/tex/latex/amscls/amsthm.sty) (c:/texlive/2020/texmf-dist/tex/latex/amsfonts/amssymb.sty (c:/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) (c:/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty (c:/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty (c:/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty) (c:/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (c:/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def))) (c:/texlive/2020/texmf-dist/tex/latex/graphics/epsfig.sty) (c:/texlive/2020/texmf-dist/tex/latex/booktabs/booktabs.sty) (c:/texlive/2020/texmf-dist/tex/latex/pslatex/pslatex.sty) (c:/texlive/2020/texmf-dist/tex/latex/caption/caption.sty (c:/texlive/2020/texmf-dist/tex/latex/caption/caption3.sty)) (c:/texlive/2020/texmf-dist/tex/latex/setspace/setspace.sty) (c:/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty (c:/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (c:/texlive/2020/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (c:/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty)) (c:/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty) (c:/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (c:/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty) (c:/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty) (c:/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) (c:/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty) (c:/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty) (c:/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def) (c:/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def) (c:/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty) (c:/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty) (c:/texlive/2020/texmf-dist/tex/latex/hyperref/puenc.def) (c:/texlive/2020/texmf-dist/tex/latex/url/url.sty) (c:/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty (c:/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) (c:/texlive/2020/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) (c:/texlive/2020/texmf-dist/tex/latex/hyperref/hpdftex.def (c:/texlive/2020/texmf-dist/tex/latex/base/atveryend-ltx.sty) (c:/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (c:/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (c:/texlive/2020/texmf-dist/tex/latex/tools/multicol.sty) (c:/texlive/2020/texmf-dist/tex/latex/multirow/multirow.sty) (c:/texlive/2020/texmf-dist/tex/latex/textgreek/textgreek.sty (c:/texlive/2020/texmf-dist/tex/latex/greek-fontenc/lgrenc.def (c:/texlive/2020/texmf-dist/tex/latex/greek-inputenc/lgrenc.dfu) (c:/texlive/2020/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def))) (c:/texlive/2020/texmf-dist/tex/latex/pdfpages/pdfpages.sty (c:/texlive/2020/texmf-dist/tex/latex/base/ifthen.sty) (c:/texlive/2020/texmf-dist/tex/latex/tools/calc.sty) (c:/texlive/2020/texmf-dist/tex/latex/eso-pic/eso-pic.sty (c:/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty (c:/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg))) (c:/texlive/2020/texmf-dist/tex/latex/pdfpages/pppdftex.def)) (c:/texlive/2020/texmf-dist/tex/latex/float/float.sty) (c:/texlive/2020/texmf-dist/tex/latex/apacite/apacite.sty) (c:/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.aux) (c:/texlive/2020/texmf-dist/tex/latex/psnfss/omspzccm.fd) (c:/texlive/2020/texmf-dist/tex/latex/cbfonts-fd/lgrcmr.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(c:/texlive/2020/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (c:/texlive/2020/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (c:/texlive/2020/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) (c:/texlive/2020/texmf-dist/tex/latex/hyperref/nameref.sty (c:/texlive/2020/texmf-dist/tex/latex/refcount/refcount.sty) (c:/texlive/2020/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) (c:/texlive/2020/texmf-dist/tex/latex/pdflscape/pdflscape.sty (c:/texlive/2020/texmf-dist/tex/latex/graphics/lscape.sty)) (c:/texlive/2020/texmf-dist/tex/latex/apacite/english.apc) (c:/texlive/2020/texmf-dist/tex/latex/psnfss/ot1ptmcm.fd) (c:/texlive/2020/texmf-dist/tex/latex/psnfss/omlptmcm.fd) (c:/texlive/2020/texmf-dist/tex/latex/psnfss/omxpsycm.fd) (c:/texlive/2020/texmf-dist/tex/latex/amsfonts/umsa.fd) (c:/texlive/2020/texmf-dist/tex/latex/amsfonts/umsb.fd) (c:/texlive/2020/texmf-dist/tex/latex/psnfss/ts1ptm.fd) [1{c:/texlive/2020/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]

LaTeX Warning: Citation `Painter2010' undefined on input line 47.


LaTeX Warning: Citation `White2014' undefined on input line 47.


LaTeX Warning: Citation `whiteandlaird2020' undefined on input line 47.


LaTeX Warning: Citation `Berry2019' undefined on input line 47.


LaTeX Warning: Citation `Willer2016' undefined on input line 47.


LaTeX Warning: Citation `Bunyasi2019' undefined on input line 47.


LaTeX Warning: Citation `Schildkraut2019' undefined on input line 47.

[2] [3]

LaTeX Warning: Citation `Lopez2006' undefined on input line 59.


LaTeX Warning: Citation `RileHayward2013' undefined on input line 61.

[4]

LaTeX Warning: Citation `Gilens1999' undefined on input line 63.


LaTeX Warning: Citation `Kinder1996' undefined on input line 67.


LaTeX Warning: Citation `Tesler2016' undefined on input line 67.

[5]

LaTeX Warning: Citation `VanDoorn2015' undefined on input line 71.


LaTeX Warning: Citation `winter2008' undefined on input line 71.


LaTeX Warning: Citation `Wetts2018' undefined on input line 73.

[6]

LaTeX Warning: Citation `jardina2019' undefined on input line 75.


LaTeX Warning: Citation `Petrow2018' undefined on input line 77.


LaTeX Warning: Citation `Jardina2020' undefined on input line 77.


LaTeX Warning: Citation `Takahashi2021' undefined on input line 77.


LaTeX Warning: Citation `Schildkraut2017' undefined on input line 77.

[7]

LaTeX Warning: Citation `McDermott2005a' undefined on input line 79.


LaTeX Warning: Citation `Sides2018' undefined on input line 79.


LaTeX Warning: Citation `Wong2005' undefined on input line 79.

[8]

LaTeX Warning: Citation `Roberts2021' undefined on input line 85.


LaTeX Warning: Citation `Huddy2001' undefined on input line 87.

[9]

LaTeX Warning: Citation `Enos2017' undefined on input line 89.


LaTeX Warning: Citation `Howard2000' undefined on input line 91.


LaTeX Warning: Citation `Leach2008b' undefined on input line 91.


LaTeX Warning: Citation `Huddy2012' undefined on input line 91.

[10]

LaTeX Warning: Citation `Burden2014' undefined on input line 93.


LaTeX Warning: Citation `Albertson2015' undefined on input line 93.

[11] [12]

LaTeX Warning: Reference `tab1' on page 13 undefined on input line 103.


LaTeX Warning: Citation `Mackuen1989b' undefined on input line 103.


LaTeX Warning: Citation `Green1998' undefined on input line 103.


LaTeX Warning: Citation `Hopkins2009' undefined on input line 103.


LaTeX Warning: Citation `Hopkins2010' undefined on input line 103.


LaTeX Warning: Citation `Hopkins2018' undefined on input line 103.

[13]

c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.tex:149: LaTeX Error: Illegal character in array arg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.149 ...mn{1}{1}{Standard errors in parentheses.}
                                                   \\
[14] [15]

LaTeX Warning: Citation `Jardina2020b' undefined on input line 156.

[16] [17]
No file dcr_white_identity_origins_context_draft_2.bbl.
(c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.aux)

LaTeX Warning: There were undefined references.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.


Package rerunfilecheck Warning: File `dcr_white_identity_origins_context_draft_2.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

 )
(\end occurred inside a group at level 1)

### semi simple group (level 1) entered at line 44 (\begingroup)
### bottom level
(see the transcript file for additional information)pdfTeX warning (dest): name{cite.Jardina2020b} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Hopkins2018} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Hopkins2010} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Hopkins2009} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Green1998} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Mackuen1989b} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Albertson2015} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Burden2014} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Huddy2012} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Leach2008b} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Howard2000} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Enos2017} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Huddy2001} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Roberts2021} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Wong2005} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Sides2018} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.McDermott2005a} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Schildkraut2017} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Takahashi2021} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Jardina2020} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Petrow2018} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.jardina2019} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Wetts2018} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.winter2008} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.VanDoorn2015} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Tesler2016} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Kinder1996} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Gilens1999} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.RileHayward2013} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Lopez2006} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Schildkraut2019} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Bunyasi2019} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Willer2016} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Berry2019} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.whiteandlaird2020} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.White2014} has been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{cite.Painter2010} has been referenced but does not exist, replaced by a fixed one

{c:/texlive/2020/texmf-dist/fonts/enc/dvips/base/8r.enc}<c:/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb><c:/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb><c:/texlive/2020/texmf-dist/fonts/type1/urw/symbol/usyr.pfb><c:/texlive/2020/texmf-dist/fonts/type1/urw/times/utmb8a.pfb><c:/texlive/2020/texmf-dist/fonts/type1/urw/times/utmr8a.pfb><c:/texlive/2020/texmf-dist/fonts/type1/urw/times/utmri8a.pfb>
Output written on c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.pdf (17 pages, 93432 bytes).
SyncTeX written on c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.synctex.gz.

Transcript written on c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.log.
Latexmk: Non-existent bbl file 'dcr_white_identity_origins_context_draft_2.bbl in line'
 No file dcr_white_identity_origins_context_draft_2.bbl.
Latexmk: References changed.
Latexmk: References changed.
Latexmk: Log file says output to 'dcr_white_identity_origins_context_draft_2.pdf'
Latexmk: List of undefined refs and citations:
  Citation `Albertson2015' undefined on input line 93
  Citation `Berry2019' undefined on input line 47
  Citation `Bunyasi2019' undefined on input line 47
  Citation `Burden2014' undefined on input line 93
  Citation `Enos2017' undefined on input line 89
  Citation `Gilens1999' undefined on input line 63
  Citation `Green1998' undefined on input line 103
  Citation `Hopkins2009' undefined on input line 103
  Citation `Hopkins2010' undefined on input line 103
  Citation `Hopkins2018' undefined on input line 103
  Citation `Howard2000' undefined on input line 91
  Citation `Huddy2001' undefined on input line 87
  Citation `Huddy2012' undefined on input line 91
  Citation `Jardina2020' undefined on input line 77
  Citation `Jardina2020b' undefined on input line 156
  Citation `Kinder1996' undefined on input line 67
  Citation `Leach2008b' undefined on input line 91
  Citation `Lopez2006' undefined on input line 59
  Citation `Mackuen1989b' undefined on input line 103
  Citation `McDermott2005a' undefined on input line 79
  Citation `Painter2010' undefined on input line 47
  Citation `Petrow2018' undefined on input line 77
  Citation `RileHayward2013' undefined on input line 61
  Citation `Roberts2021' undefined on input line 85
  Citation `Schildkraut2017' undefined on input line 77
  Citation `Schildkraut2019' undefined on input line 47
  Citation `Sides2018' undefined on input line 79
  Citation `Takahashi2021' undefined on input line 77
  Citation `Tesler2016' undefined on input line 67
  Citation `VanDoorn2015' undefined on input line 71
  Citation `Wetts2018' undefined on input line 73
  Citation `White2014' undefined on input line 47
  Citation `Willer2016' undefined on input line 47
  Citation `Wong2005' undefined on input line 79
  Citation `jardina2019' undefined on input line 75
  Citation `whiteandlaird2020' undefined on input line 47
  Citation `winter2008' undefined on input line 71
  Reference `tab1' on page 13 undefined on input line 103
Latexmk: Examining 'c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.log'
=== TeX engine is 'pdfTeX'
Latexmk: Found bibliography file(s) [white-identity-origins-project.bib]
Latexmk: Summary of warnings from last run of *latex:
  Latex failed to resolve 1 reference(s)
  Latex failed to resolve 37 citation(s)
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
Latexmk: Errors, so I did not complete making targets
C:\texlive\2020\bin\win32\runscript.tlu:915: command failed with exit code 12:
perl.exe c:\texlive\2020\texmf-dist\scripts\latexmk\latexmk.pl -synctex=1 -interaction=nonstopmode -file-line-error -pdf -outdir=c:/Users/damon/Dropbox/white-identity-origins/drafts c:/Users/damon/Dropbox/white-identity-origins/drafts/dcr_white_identity_origins_context_draft_2
```

答案1

我一直被同样的问题困扰,直到我意识到我需要在 TEX 选项卡中使用 pdflatex > bibtex > pdflatex x2 配方。

我希望这有帮助!

相关内容