这是我的 Latex 代码
\documentclass[12pt, oneside]{amsart}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL RPI_R1_041.tex Tue Sep 4 11:13:10 2018
%DIF ADD RPI_R1_041_RA.tex Fri Sep 21 17:13:32 2018
\bibliographystyle{amsplain}
\title{Concentração no ensino superior brasileiro: Maior qualidade vs. maior preço}
\author{Alessandro Rivello}
\thanks{Projeto de pesquisa para a matéria OI I}
\date{Initial draft: 19/03/2019. This version: \today}
\begin{document}
\maketitle
\setcounter{footnote}{1}
\section{Introdução}
A presença de empresas privadas na oferta de vagas para o ensino superior brasileiro tem crescido ao longo do tempo. \cite{birds1998}
\bibliography{ref}
\end{document}
以下是我的 ref.bib 文件
%% LaTeX2e file `ref.bib'
%% generated by the `filecontents' environment
%% from source `Proj_OI1' on 2019/03/20.
%%
@misc{birds1998,
title ={Sinopse EstatÃstica do Ensino Superior 2017},
url ={http://portal.inep.gov.br/basica-censo-escolar-sinopse-sinopse},
organization={Instituto Nacional de Estudos e Pesquisas Educacionais AnÃsio Texeira},
urlaccessdate={19 mar. 2019}
}
这是.blg
编译 Latex 代码后生成的文件
This is BibTeX, Version 0.99d (TeX Live 2017)
Capacity: max_strings=100000, hash_size=100000, hash_prime=85009
The top-level auxiliary file: Proj_OI1.aux
I found no \bibdata command---while reading file Proj_OI1.aux
I found no \bibstyle command---while reading file Proj_OI1.aux
You've used 1 entry,
0 wiz_defined-function locations,
84 strings with 499 characters,
and the built_in function-call counts, 0 in all, are:
= -- 0
> -- 0
< -- 0
+ -- 0
- -- 0
* -- 0
:= -- 0
add.period$ -- 0
call.type$ -- 0
change.case$ -- 0
chr.to.int$ -- 0
cite$ -- 0
duplicate$ -- 0
empty$ -- 0
format.name$ -- 0
if$ -- 0
int.to.chr$ -- 0
int.to.str$ -- 0
missing$ -- 0
newline$ -- 0
num.names$ -- 0
pop$ -- 0
preamble$ -- 0
purify$ -- 0
quote$ -- 0
skip$ -- 0
stack$ -- 0
substring$ -- 0
swap$ -- 0
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 0
warning$ -- 0
while$ -- 0
width$ -- 0
write$ -- 0
(There were 2 error messages)
我在 Latex stackexchange 社区中搜索了很长时间,发现了很多相关问题,但任何解决方案似乎都对我有用。我做错了什么?
编辑:
谢谢@daleif。现在我在文中得到了正确的引用,参考文献列表如下图所示
但是,正如您所看到的,参考文献列表的格式很奇怪,而且我在编译时仍然收到一些错误消息,正如您从文件中看到的.blg
那样
This is BibTeX, Version 0.99d (TeX Live 2017)
Capacity: max_strings=100000, hash_size=100000, hash_prime=85009
The top-level auxiliary file: Proj_OI1.aux
The style file: amsplain.bst
Database file #1: ref.bib
Warning--to sort, need author or key in birds1998
You've used 1 entry,
2213 wiz_defined-function locations,
502 strings with 4033 characters,
and the built_in function-call counts, 196 in all, are:
= -- 11
> -- 1
< -- 0
+ -- 1
- -- 0
* -- 9
:= -- 25
add.period$ -- 1
call.type$ -- 1
change.case$ -- 3
chr.to.int$ -- 0
cite$ -- 2
duplicate$ -- 11
empty$ -- 27
format.name$ -- 0
if$ -- 41
int.to.chr$ -- 0
int.to.str$ -- 1
missing$ -- 1
newline$ -- 13
num.names$ -- 0
pop$ -- 10
preamble$ -- 1
purify$ -- 2
quote$ -- 0
skip$ -- 8
stack$ -- 0
substring$ -- 5
swap$ -- 1
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 4
warning$ -- 1
while$ -- 0
width$ -- 2
write$ -- 14
(There was 1 warning)
对于为什么会发生这种情况有什么想法吗?
答案1
显然和amsart
你一样有放置\bibliographystyle
在文档主体内,而不是序言中。如果放置在序言中,则\bibstyle
永远不会写入aux
文件。
因此,要么将其放在正文中(我通常将其放在正文上方\bibliography
),要么使用
\AtBeginDocument{
\bibliographystyle{...}
}