Ceci est une ancienne révision du document !
If you have been following along, you now have an idea of how to put down text, how to add a picture, and how to insert a table. All you did was learn one little thing per issue. If you use LaTeX for writing a non-fiction book, for instance, or a school paper, you may need to add a bibliography. Like the “share on facebook” buttons you see on a website, some websites have a “cite this” button. Granted, lots of times it may be on academic websites, but there are websites that will help you out too. (https://www.citethisforme.com/, https://www.easybib.com/, https://www.cite.me/, and more). If you have the option, choose “Bibtex”, to make it easy for you.
If you would like to see where I got my information from, see: https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM
I need you to look under the tools menu in TeXstudio; you will see “bibliography” with the shortcut key ‘F8’. Click ‘bibliography’ or press F8. What happened? Look at your message pane. This is what I got:
Process started: bibtex “tuto”.aux
This is BibTeX, Version 0.99d (TeX Live 2017/Debian) The top-level auxiliary file: tuto.aux I found no \citation commands—while reading file tuto.aux I found no \bibdata command—while reading file tuto.aux I found no \bibstyle command—while reading file tuto.aux (There were 3 error messages)
Process exited with error(s)
Now what? These are the little things that trip up newbies. Do you have any idea what to do? Well, neither did I. (Off to stackexchange I had to rush). Looking up things and cross-referencing them, is a good way to learn, so don’t knock it.
Just as a side note: You can configure your shortcut keys in the options, but I am going default here. Vanilla TeXstudio.
To understand how many fields there are in a bibliography file, open a new tab, then click “bibliography” in the menu, then click on “book”. The output on your form should look something like this:
So don’t be put off by the bib output that you get on a web page.
Just to show you where to look, open this web page please: https://www.bibsonomy.org/bibtex/226d84980b959304913f957400bb993e5/droessler
To the right of the page, you will see a ‘copy’ icon, an ‘x’, an ‘open’ icon, and a drop-down arrow. Click the drop-down arrow to reveal the following menu.
Now click on ‘BibTeX’. A new window will be displayed with the necessary information. Click on “Copy citation to your local clipboard”.
The manual way
Create a new file and make sure the extension is ‘.bib’. Even if Linux does not care about extensions, TeX does! Explanation from Wikipedia:
“ In the words of the program's author Oren Patashnik:
Here's how BibTeX works. It takes as input: • an .aux file produced by LaTeX on an earlier run; • a .bst file (the style file), which specifies the general reference-list style and specifies how to format individual entries, and which is written by a style designer [..] in a special-purpose language [..], and • .bib file(s) constituting a database of all reference-list entries the user might ever hope to use.
BibTeX chooses from the .bib file(s) only those entries specified by the .aux file (that is, those given by LaTeX's \cite or \nocite commands), and creates as output a .bbl file containing these entries together with the formatting commands specified by the .bst file [..]. LaTeX will use the .bbl file, perhaps edited by the user, to produce the reference list. “
OK, time for some hands-on.
Create two new tabs and save them as ref.tex and ref.bib so we can get going.
Copy the output from the website above into ref.bib and save it.
Then add the “code” (top right) to ref.tex so I can get to explaining.
You should be familiar with everything up to \cite. I have cited the article in my reference (ref.bib) by the unique id, which is the first part after the “type of reference” (@article{Lehman2015, Masters2014). Not all references will look this way, so understand where it goes. If you need to cite multiple documents or articles, simply separate your references by commas.
Are you with me? Ok, this is where you need to pay attention; bibliographies have style. Yes, you heard me, \bibliographystyle{style}, I use plain, but there are many types: https://www.overleaf.com/learn/latex/Bibtex_bibliography_styles, https://www.bibtex.com/s/bibliography-style-base-plain/
To understand the \bibliography{ref}, I want you to remove it and recompile your document. Seeing is believing. ;)
I suggest first getting the ‘how’ down before you start messing with styles; as for newbies, they will not make much sense. As always, please feel free to change anything, make mistakes, have fun. This is how we learn.
You know where to send emails: misc@fullcirclemagazine.org