> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/overleaf-learn-latex-pt/perguntas-e-respostas/69-in-the-ieee-for-journals-template-i-m-trying-to-use-bibtex-for-my-references.md).

# No modelo IEEE for journals, estou a tentar usar bibtex para as minhas referências

Muitos autores que usam um dos modelos de revista IEEE pedem ajuda para adicionar as suas referências usando bibtex. Em particular, depois de carregarem os ficheiros IEEEexample.bib e IEEEabrv.bib para a pasta bibtex/bib, pode ser complicado fazer com que o documento compile. Aqui está uma compilação das nossas respostas, que esperamos que ajude se estiver numa situação semelhante, e que culmina num exemplo que pode usar como modelo para começar.

Em primeiro lugar, se tiver carregado os ficheiros IEEEtran.cls e IEEEtran.bst, recomenda-se que os elimine, porque na verdade já estão incorporados no writeLaTeX—não precisa de os incluir no seu projeto, e normalmente é melhor usar a versão incorporada.

Se precisar de criar a pasta bibtex/bib, pode fazê-lo através do menu Projeto no editor—depois de abrir o menu, os ícones para criar pastas e ficheiros ficam no canto superior direito.

A bibliografia gerada pelo bibtex vem dos comandos \bibliography e \bibliographystyle e, assumindo que está a usar os ficheiros IEEEexample.bib e IEEEabrv.bib na pasta bibtex/bib, estes comandos devem ser alterados para:

```latex
\bibliography{bibtex/bib/IEEEabrv.bib,bibtex/bib/IEEEexample.bib}{}
\bibliographystyle{IEEEtran}
```

Isto diz ao bibtex para carregar os dois ficheiros .bib e usar o estilo bibliográfico IEEEtran para formatar as referências.

Nota: Os comandos originais no modelo eram:

```latex
\bibliography{mybib.bib}{}
\bibliographystyle{plain}
```

o que dizia ao bibtex que queria usar um ficheiro chamado mybib.bib para referências, com o estilo plain (incorporado).

Por fim, um erro comum que ocorre depois de configurar tudo isto é quando não existe nenhum comando \cite no documento que faça referência a algum dos registos no ficheiro bib. No exemplo abaixo, adicionámos um da IEEEexample.bib:

```latex
\cite{IEEEhowto:IEEEtranpage}
```

para o fazer compilar. Vai querer eliminá-lo assim que começar a adicionar as suas próprias citações.

[Aqui está o exemplo no Overleaf, pronto e configurado para utilização.](https://www.overleaf.com/latex/templates/ieee-for-journals-template-with-bibtex-example-files-included/hjbyjvncdmpx)

Para mais informações sobre bibtex, recomendamos o wikibook do LaTeX \[[capítulo sobre gestão de bibliografia](http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management)].


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/overleaf-learn-latex-pt/perguntas-e-respostas/69-in-the-ieee-for-journals-template-i-m-trying-to-use-bibtex-for-my-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
