更新:

更新:

我正在创建实验报告,并尝试在报告末尾添加参考书目。我对 LaTeX 还不太熟悉,不确定收到缺失\item消息时发生了什么情况。我的主要.tex代码是:

\documentclass[journal, a4paper]{ieeetran}
\usepackage{graphicx}   
\usepackage{url}
\usepackage{amsmath}
\usepackage{lettrine}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{gensymb}
\usepackage[margin=0.4in]{geometry}
\begin{document}
    \title{Lab 12N Report \LaTeX}
    \author{Jeremy Wolfe}
    \maketitle

\bibliographystyle{ieeetran}
\bibliography{LabReportBib}
\end{document}

我的.bib文件名为 LabReportBib,其内容为:

@misc{libretexts_2018, title={Constant Pressure Calorimetry}, url={https://chem.libretexts.org/Textbook_Maps/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)/Thermodynamics/Calorimetry/Constant_Pressure_Calorimetry}, journal={Chemistry LibreTexts}, publisher={National Science Foundation}, author={Libretexts}, year={2018}, month={Nov}}

@misc{writing advice, title={Writing Advice Home}, 
url={http://advice.writing.utoronto.ca/types-of-writing/lab-report/}, 
journal={Writing Advice}}

任何帮助完成这项工作都将不胜感激

更新:

我使用的软件包是:

*File List*
filecontents.sty 2018/05/30 v1.4 Create an external file from within a LaTeX
document
IEEEtran.cls 2015/08/26 V1.8b by Michael Shell
ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.
graphicx.sty 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
graphics.sty 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
amsmath.sty 2017/09/02 v2.17a AMS math features
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
amsbsy.sty 1999/11/29 v1.2d Bold Symbols
amsopn.sty 2016/03/08 v2.02 operator names
lettrine.sty 2018-08-28 v2.21 (Daniel Flipo)
minifp.sty 2013/12/30 v0.96. Macros for real number operations and a stack
-based programing language.
lettrine.cfg
subcaption.sty 2018/05/01 v1.1-162 Sub-captions (AR)
caption.sty 2018/10/06 v3.3-154 Customizing captions (AR)
caption3.sty 2018/09/12 v1.8c caption3 kernel (AR)
gensymb.sty 2003/07/02 v1.0 (WaS)
geometry.sty 2018/04/16 v5.8 Page Geometry
ifpdf.sty 2017/03/15 v3.2 Provides the ifpdf switch
ifvtex.sty 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
supp-pdf.mkii
epstopdf-base.sty 2016/05/15 v2.6 Base part for package epstopdf
infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO)
grfext.sty 2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty 2016/05/16 v1.4 Define keys (HO)
ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
kvoptions.sty 2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty 2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO)
pdftexcmds.sty 2018/01/30 v0.27 Utility functions of pdfTeX for LuaTeX (HO)
LRtest.bbl

答案1

从给定的bib文件中,我可以看到条目的键名 ( ) 中有一个空格writing advice,这是不允许的。将其更改为

@misc{writing_advice, 
  title={Writing Advice Home}, 
  url={http://advice.writing.utoronto.ca/types-of-writing/lab-report/}, 
  journal={Writing Advice},
}

您的代码中没有引用任何条目,因此我添加了\nocite{*}以下代码:

\listfiles % <======= to get used packages and version number list
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{libretexts_2018, 
  title={Constant Pressure Calorimetry}, 
  url={https://chem.libretexts.org/Textbook_Maps/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)/Thermodynamics/Calorimetry/Constant_Pressure_Calorimetry}, 
  journal={Chemistry LibreTexts}, 
  publisher={National Science Foundation}, 
  author={Libretexts}, 
  year={2018}, 
  month={Nov},
}

@misc{writing_advice, 
  title={Writing Advice Home}, 
  url={http://advice.writing.utoronto.ca/types-of-writing/lab-report/}, 
  journal={Writing Advice},
}
\end{filecontents*}


\documentclass[journal, a4paper]{ieeetran}
\usepackage{graphicx}   
\usepackage{url}
\usepackage{amsmath}
\usepackage{lettrine}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{gensymb}
\usepackage[margin=0.4in]{geometry}


\begin{document}
    \title{Lab 12N Report \LaTeX}
    \author{Jeremy Wolfe}
    \maketitle

\nocite{*} % <==========================================================
\bibliographystyle{ieeetran}
\bibliography{\jobname}
\end{document}

请检查您的日志文件,其中有一些警告,您应该查看...检查日志文件,*.blg确保其中没有警告和错误。逐步纠正所有错误...

生成的pdf文件是:

在此处输入图片描述

更新:

我使用的系统是:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6880 64-bit) (preloaded format=pdflatex 2018.12.1)  5 DEC 2018 22:23

使用的软件包为:

 *File List*
filecontents.sty    2018/05/30 v1.4 Create an external file from within a LaTeX document
ieeetran.cls    2015/08/26 V1.8b by Michael Shell
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 amsmath.sty    2017/09/02 v2.17a AMS math features
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
  amsbsy.sty    1999/11/29 v1.2d Bold Symbols
  amsopn.sty    2016/03/08 v2.02 operator names
lettrine.sty    2018-08-28 v2.21 (Daniel Flipo)
  minifp.sty    2013/12/30 v0.96. Macros for real number operations and a stack-based programing language.
lettrine.cfg
subcaption.sty    2018/05/01 v1.1-162 Sub-captions (AR)
 caption.sty    2018/10/06 v3.3-154 Customizing captions (AR)
caption3.sty    2018/09/12 v1.8c caption3 kernel (AR)
 gensymb.sty    2003/07/02 v1.0 (WaS)
geometry.sty    2018/04/16 v5.8 Page Geometry
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)

相关内容