参考文献与natbib包
我试图写我的报告,并且我有natbib包的这个问题。 我使用的是overleaf,并且出现同样的错误:
LaTeX错误:只能在前导码中使用。
请参阅LaTeX手册或LaTeX Companion以获取解释。 键入H即时帮助。 ...
l.168 bibliography
{references}
我做错了什么? 这是我的代码:
documentclass[12pt,letterpaper]{article}
usepackage[utf8]{inputenc}
usepackage[spanish, es-tabla]{babel}
usepackage[version=3]{mhchem}
usepackage[journal=jacs]{chemstyle}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{makeidx}
usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
usepackage[stable]{footmisc}
usepackage[section]{placeins}
%Paquetes necesarios para tablas
usepackage{longtable}
usepackage{array}
usepackage{xtab}
usepackage{multirow}
usepackage{colortab}
%Paquete para el manejo de las unidades
usepackage{siunitx}
sisetup{mode=text, output-decimal-marker = {,}, per-mode = symbol, qualifier-mode = phrase, qualifier-phrase = { de }, list-units = brackets, range-units = brackets, range-phrase = --}
DeclareSIUnit[number-unit-product = ;] atmosphere{atm}
DeclareSIUnit[number-unit-product = ;] pound{lb}
DeclareSIUnit[number-unit-product = ;] inch{"}
DeclareSIUnit[number-unit-product = ;] foot{ft}
DeclareSIUnit[number-unit-product = ;] yard{yd}
DeclareSIUnit[number-unit-product = ;] mile{mi}
DeclareSIUnit[number-unit-product = ;] pint{pt}
DeclareSIUnit[number-unit-product = ;] quart{qt}
DeclareSIUnit[number-unit-product = ;] flounce{fl-oz}
DeclareSIUnit[number-unit-product = ;] ounce{oz}
DeclareSIUnit[number-unit-product = ;] degreeFahrenheit{SIUnitSymbolDegree F}
DeclareSIUnit[number-unit-product = ;] degreeRankine{SIUnitSymbolDegree R}
DeclareSIUnit[number-unit-product = ;] usgallon{galón}
DeclareSIUnit[number-unit-product = ;] uma{uma}
DeclareSIUnit[number-unit-product = ;] ppm{ppm}
DeclareSIUnit[number-unit-product = ;] eqg{eq-g}
DeclareSIUnit[number-unit-product = ;] normal{eqgperliterof{solución}}
DeclareSIUnit[number-unit-product = ;] molal{moleperkilogramof{solvente}}
usepackage{cancel}
%Paquetes necesarios para imágenes, pies de página, etc.
usepackage{graphicx}
usepackage{lmodern}
usepackage{fancyhdr}
usepackage[left=4cm,right=2cm,top=3cm,bottom=3cm]{geometry}
usepackage{xcolor,soul,framed} %,caption
colorlet{shadecolor}{yellow}
%Instrucción para evitar la indentación
%setlengthparindent{0pt}
%Paquete para incluir la bibliografía
usepackage[backend=bibtex,style=chem-acs,biblabel=dot]{biblatex}
addbibresource{references.bib}
%Formato del título de las secciones
usepackage{titlesec}
usepackage{enumitem}
titleformat*{section}{bfserieslarge}
titleformat*{subsection}{bfseriesnormalsize}
%Creación del ambiente anexos
usepackage{float}
floatstyle{plaintop}
newfloat{anexo}{thp}{anx}
floatname{anexo}{Anexo}
restylefloat{anexo}
restylefloat{figure}
%Modificación del formato de los captions
usepackage[margin=10pt,labelfont=bf]{caption}
%Paquete para incluir comentarios
usepackage{todonotes}
%Paquete para incluir hipervínculos
usepackage[colorlinks=true,
linkcolor = blue,
urlcolor = blue,
citecolor = black,
anchorcolor = blue]{hyperref}
definecolor{mygreen}{rgb}{0,0.6,0}
definecolor{mygray}{rgb}{0.5,0.5,0.5}
definecolor{mymauve}{rgb}{0.58,0,0.82}
definecolor{darkWhite}{rgb}{0.94,0.94,0.94}
usepackage{minted}
%%%%%%%%%%%%%%%%%%%%%%
%Inicio del documento%
%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%TXT
bibliography{references}
end{document}
感谢您的帮助!
我找到解决方案,语法应该是:
begin{document}
....
printbibliography
end{document}
链接地址: http://www.djcxy.com/p/33465.html