Difference between revisions of "LaTeX-Old-Version/C2/Inside-story-of-Bibliography/English-timed"
From Script | Spoken-Tutorial
Sandhya.np14 (Talk | contribs) |
Nancyvarkey (Talk | contribs) m (Nancyvarkey moved page LaTeX/C2/Inside-story-of-Bibliography/English-timed to LaTeX-Old-Version/C2/Inside-story-of-Bibliography/English-timed without leaving a redirect) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
|'''Time''' | |'''Time''' | ||
|'''Narration''' | |'''Narration''' | ||
+ | |||
|- | |- | ||
|00:00 | |00:00 | ||
|Welcome to a tutorial on creating bibliography entries. | |Welcome to a tutorial on creating bibliography entries. | ||
+ | |||
|- | |- | ||
|00:06 | |00:06 | ||
|I will be using BibTeX for this purpose. Bibtex is a stand-alone utility separate from LaTeX. | |I will be using BibTeX for this purpose. Bibtex is a stand-alone utility separate from LaTeX. | ||
+ | |||
|- | |- | ||
|00:14 | |00:14 | ||
|In this tutorial we will see, how to produce a pdf file that you see now. | |In this tutorial we will see, how to produce a pdf file that you see now. | ||
+ | |||
|- | |- | ||
|00:20 | |00:20 | ||
|The first page shows the title. | |The first page shows the title. | ||
+ | |||
|- | |- | ||
|00:25 | |00:25 | ||
|Let us go to the second page where we have the text. | |Let us go to the second page where we have the text. | ||
+ | |||
|- | |- | ||
|00:31 | |00:31 | ||
|The '''references''' are numbered from one through six and in the next page, up to eleven. | |The '''references''' are numbered from one through six and in the next page, up to eleven. | ||
+ | |||
|- | |- | ||
|00:41 | |00:41 | ||
− | | Note that these references are also listed alphabetically. | + | |Note that these references are also listed alphabetically. |
+ | |||
|- | |- | ||
|00:47 | |00:47 | ||
|You can see it here. | |You can see it here. | ||
+ | |||
|- | |- | ||
|00:52 | |00:52 | ||
|Let us next see the '''source file''' that we used for this purpose. | |Let us next see the '''source file''' that we used for this purpose. | ||
+ | |||
|- | |- | ||
|00:59 | |00:59 | ||
|Let us go through this. | |Let us go through this. | ||
+ | |||
|- | |- | ||
|01:07 | |01:07 | ||
|It is clear that it does not have the references as we can see by browsing through. | |It is clear that it does not have the references as we can see by browsing through. | ||
+ | |||
|- | |- | ||
|01:13 | |01:13 | ||
− | | | + | |We don’t have this information present in the source file. |
+ | |||
|- | |- | ||
|01:17 | |01:17 | ||
|So, where are the references? They are in the file ‘ref’. Actually the filename is ‘ref.bib’. | |So, where are the references? They are in the file ‘ref’. Actually the filename is ‘ref.bib’. | ||
+ | |||
|- | |- | ||
|01:26 | |01:26 | ||
|That is the default for this command – '''bibliography'''. | |That is the default for this command – '''bibliography'''. | ||
+ | |||
|- | |- | ||
|01:34 | |01:34 | ||
|There you are, ‘ref.bib’. | |There you are, ‘ref.bib’. | ||
+ | |||
|- | |- | ||
|01:39 | |01:39 | ||
− | | Let us see what is contained in 'ref.bib'. | + | |Let us see what is contained in 'ref.bib'. |
+ | |||
|- | |- | ||
|01:52 | |01:52 | ||
− | | It has reference information under different categories, for example- it has book, tech-report, in proceedings, miscellaneous, as well as article. | + | |It has reference information under different categories, for example- it has book, tech-report, in proceedings, miscellaneous, as well as article. |
+ | |||
|- | |- | ||
|02:09 | |02:09 | ||
− | | We will come back to this file shortly and explain it. | + | |We will come back to this file shortly and explain it. |
+ | |||
|- | |- | ||
|02:13 | |02:13 | ||
|Let us now concentrate on the procedure to create the reference list in the output. | |Let us now concentrate on the procedure to create the reference list in the output. | ||
+ | |||
|- | |- | ||
|02:19 | |02:19 | ||
|Let us put the 'references.tex' back, the source file. | |Let us put the 'references.tex' back, the source file. | ||
+ | |||
|- | |- | ||
|02:31 | |02:31 | ||
|Let’s go to the top of this page. | |Let’s go to the top of this page. | ||
+ | |||
|- | |- | ||
|02:36 | |02:36 | ||
− | | Let us first get a listing of the files whose prefixes – references. | + | |Let us first get a listing of the files whose prefixes – references. |
+ | |||
|- | |- | ||
|02:44 | |02:44 | ||
|There you are. | |There you are. | ||
+ | |||
|- | |- | ||
|02:47 | |02:47 | ||
|Let us first delete all files except 'references.tex'. | |Let us first delete all files except 'references.tex'. | ||
+ | |||
|- | |- | ||
|03:04 | |03:04 | ||
|Let us confirm this, | |Let us confirm this, | ||
+ | |||
|- | |- | ||
|03:09 | |03:09 | ||
|so we have only 'references.tex'. | |so we have only 'references.tex'. | ||
+ | |||
|- | |- | ||
|03:12 | |03:12 | ||
− | | Now, let me compile this. | + | |Now, let me compile this. |
+ | |||
|- | |- | ||
|03:19 | |03:19 | ||
− | |On compilation, we get the warning message that | + | |On compilation, we get the warning message that,there are some undefined references, some citations are missing. |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|03:39 | |03:39 | ||
− | | We see that there are new files that the pdf.tex command has created as we can see now. | + | |We see that there are new files that the pdf.tex command has created as we can see now. |
+ | |||
|- | |- | ||
|03:52 | |03:52 | ||
|There are some new files in addition to the 'references.pdf', we have a file called 'references.log' as well as 'references.aux'. | |There are some new files in addition to the 'references.pdf', we have a file called 'references.log' as well as 'references.aux'. | ||
+ | |||
|- | |- | ||
|04:04 | |04:04 | ||
|Let us first see the file 'references.log'. | |Let us first see the file 'references.log'. | ||
+ | |||
|- | |- | ||
|04:15 | |04:15 | ||
|It has a lot of information, as a matter of fact, it has all the messages that appear here. | |It has a lot of information, as a matter of fact, it has all the messages that appear here. | ||
+ | |||
|- | |- | ||
|04:20 | |04:20 | ||
− | | Let’s just go down and see. There is a lot of information as well as these warnings which appear here as well. | + | |Let’s just go down and see. There is a lot of information as well as these warnings which appear here as well. |
+ | |||
|- | |- | ||
|04:36 | |04:36 | ||
− | | There is of course a warning that some fonts are missing often we can live with this short-comings. | + | |There is of course a warning that some fonts are missing often we can live with this short-comings. |
+ | |||
|- | |- | ||
|04:43 | |04:43 | ||
− | | | + | |The warning that some references are missing, some citations are missing, are however important to us. |
+ | |||
|- | |- | ||
|04:50 | |04:50 | ||
− | | We will now proceed to address these warnings. | + | |We will now proceed to address these warnings. |
+ | |||
|- | |- | ||
|04:55 | |04:55 | ||
|Let us now open the other file, namely, 'references.aux'. | |Let us now open the other file, namely, 'references.aux'. | ||
+ | |||
|- | |- | ||
|05:04 | |05:04 | ||
− | | It has several citation commands. Where do these come from? | + | |It has several citation commands. Where do these come from? |
+ | |||
|- | |- | ||
|05:13 | |05:13 | ||
|All the arguments of the citation appeared in the ‘cite command’ in the source file | |All the arguments of the citation appeared in the ‘cite command’ in the source file | ||
+ | |||
|- | |- | ||
|05:18 | |05:18 | ||
|as we can see now. Let me open it here. | |as we can see now. Let me open it here. | ||
+ | |||
|- | |- | ||
|05:26 | |05:26 | ||
|Let’s go down, there is a scroll for it. Source file. | |Let’s go down, there is a scroll for it. Source file. | ||
+ | |||
|- | |- | ||
|05:31 | |05:31 | ||
|See for example, I have this ‘cite vk 79’, that 'vk79' comes here. | |See for example, I have this ‘cite vk 79’, that 'vk79' comes here. | ||
+ | |||
|- | |- | ||
|05:37 | |05:37 | ||
− | | ‘cite tk 80’, it comes here 'tk 80’and so on. Also, this '''bibstyle-plain''' also comes in the source file here. | + | |‘cite tk 80’, it comes here 'tk 80’and so on. Also, this '''bibstyle-plain''' also comes in the source file here. |
+ | |||
|- | |- | ||
|05:51 | |05:51 | ||
|you go up, '''bibliography style – plain''', that '''plain''' appears here. | |you go up, '''bibliography style – plain''', that '''plain''' appears here. | ||
+ | |||
|- | |- | ||
|06:00 | |06:00 | ||
|The 'aux' file also stores variable names. Suppose for example, I include a label for this section. | |The 'aux' file also stores variable names. Suppose for example, I include a label for this section. | ||
+ | |||
|- | |- | ||
|06:11 | |06:11 | ||
− | | | + | |Let me go here. |
+ | |||
|- | |- | ||
|06:18 | |06:18 | ||
|Okay, let me do this without a label. | |Okay, let me do this without a label. | ||
+ | |||
|- | |- | ||
|06:26 | |06:26 | ||
|So for example, let’s delete this, let me compile this. | |So for example, let’s delete this, let me compile this. | ||
+ | |||
|- | |- | ||
|06:37 | |06:37 | ||
|Let me re-open this file | |Let me re-open this file | ||
+ | |||
|- | |- | ||
|06:47 | |06:47 | ||
|and note that we no longer have this. | |and note that we no longer have this. | ||
+ | |||
|- | |- | ||
|06:50 | |06:50 | ||
− | | So, the moment I put a label here, ‘label – sec arya’. | + | |So,the moment I put a label here, ‘label – sec arya’. |
+ | |||
|- | |- | ||
|07:06 | |07:06 | ||
|Save this, compile this, open this. | |Save this, compile this, open this. | ||
+ | |||
|- | |- | ||
|07:13 | |07:13 | ||
− | | | + | |Then you come to this file, I need to re-open this file. |
+ | |||
|- | |- | ||
|07:18 | |07:18 | ||
|And note that, we have this command- 'new label sec arya'. | |And note that, we have this command- 'new label sec arya'. | ||
+ | |||
|- | |- | ||
|07:23 | |07:23 | ||
|This label is the same label that we had here and this one says that it is section 1, | |This label is the same label that we had here and this one says that it is section 1, | ||
+ | |||
|- | |- | ||
|07:31 | |07:31 | ||
|as it appears here, and this 2 refers to the page number – this document page is 2. | |as it appears here, and this 2 refers to the page number – this document page is 2. | ||
+ | |||
|- | |- | ||
|07:41 | |07:41 | ||
− | |During the next compilation | + | |During the next compilation, Latex reads the 'aux' file and loads the '''label''' information. |
+ | |||
|- | |- | ||
|07:48 | |07:48 | ||
|This is why we need two compilations to get the labels correct. | |This is why we need two compilations to get the labels correct. | ||
+ | |||
|- | |- | ||
|07:52 | |07:52 | ||
− | | Let me explain how the references list is created | + | |Let me explain how the references list is created; now is the time to use BibTeX. |
+ | |||
|- | |- | ||
|08:01 | |08:01 | ||
− | | We give the command BibTeX references here. Let’s give the command – BibTeX references | + | |We give the command BibTeX references here. Let’s give the command – '''BibTeX references'''. |
+ | |||
|- | |- | ||
|08:17 | |08:17 | ||
− | |This takes the input from references.aux as mentioned here, says that, here for example it says references.aux is used. | + | |This takes the input from 'references.aux' as mentioned here, says that, here for example- it says 'references.aux' is used. |
+ | |||
|- | |- | ||
|08:30 | |08:30 | ||
− | |It says that it uses a style file called plain.bst | + | |It says that it uses a '''style''' file called 'plain.bst' |
+ | |||
|- | |- | ||
|08:39 | |08:39 | ||
− | |as given by this plain command and the date of ref.bib | + | |as given by this '''plain''' command and the date of 'ref.bib'. This we already explained, 'ref.bib', database file number 1 is 'ref.bib'. |
+ | |||
|- | |- | ||
|08:51 | |08:51 | ||
− | | Recall that we used plain style and ref bib in the source file. | + | |Recall that we used '''plain style''' and 'ref bib' in the '''source''' file. |
+ | |||
|- | |- | ||
|08:56 | |08:56 | ||
− | | Let us see what files are now created | + | |Let us see what files are now created. |
+ | |||
|- | |- | ||
|09:00 | |09:00 | ||
− | | | + | |Okay, that is what new files are created because of this command '''BibTeX.references'''. |
+ | |||
|- | |- | ||
|09:10 | |09:10 | ||
− | | Let’s list this. You find that | + | |Let’s list this. You find that in addition to the files we saw previously, |
+ | |||
|- | |- | ||
|09:15 | |09:15 | ||
− | | we have two new files, references.blg and references.bbl. | + | |we have two new files, 'references.blg' and 'references.bbl'. |
+ | |||
|- | |- | ||
|09:23 | |09:23 | ||
− | | | + | |The file 'references.blg' has formatting information; let’s see this. |
+ | |||
|- | |- | ||
|09:35 | |09:35 | ||
− | | | + | |You can see that it has some formatting information. |
+ | |||
|- | |- | ||
|09:39 | |09:39 | ||
− | | Let me quit this. | + | |Let me quit this. |
+ | |||
|- | |- | ||
|09:41 | |09:41 | ||
− | | And let me see what this file bbl has. References . bbl. So it has this information, the references that we saw earlier. | + | |And let me see what this file 'bbl' has. 'References.bbl'. So, it has this information, the references that we saw earlier. |
+ | |||
|- | |- | ||
|09:55 | |09:55 | ||
− | |References.bbl has the cited references in the same order as we finally want in the pdf file. | + | |'References.bbl' has the cited references in the same order as we finally want in the pdf file. |
+ | |||
|- | |- | ||
|10:07 | |10:07 | ||
− | | Normally, one would not have to change these files manually or even view them however. | + | |Normally, one would not have to change these files manually or even view them however. |
+ | |||
|- | |- | ||
|10:15 | |10:15 | ||
− | |In this last compilation, we also got a warning, references.bbl is not found. | + | |In this last compilation, we also got a warning, 'references.bbl' is not found. |
+ | |||
|- | |- | ||
|10:23 | |10:23 | ||
− | |As we can see in the references.log file. Let’s open this file here. | + | |As we can see in the 'references.log' file. Let’s open this file here. |
+ | |||
|- | |- | ||
|10:35 | |10:35 | ||
− | |Okay, let’s look for – so for example it says, no file references.bbl. | + | |Okay, let’s look for – so for example it says, no file 'references.bbl'. |
+ | |||
|- | |- | ||
|10:47 | |10:47 | ||
|So this is what happened in the previous compilation. | |So this is what happened in the previous compilation. | ||
+ | |||
|- | |- | ||
|10:55 | |10:55 | ||
− | | But using BibTeX we have now created the file references.bbl. | + | |But using BibTeX we have now created the file 'references.bbl'. |
+ | |||
|- | |- | ||
|11:01 | |11:01 | ||
− | | So let us compile once again. | + | |So let us compile once again. |
+ | |||
|- | |- | ||
|11:10 | |11:10 | ||
|Now the warnings are different, it says that ‘label’s may have changed’. | |Now the warnings are different, it says that ‘label’s may have changed’. | ||
+ | |||
|- | |- | ||
|11:15 | |11:15 | ||
− | |As a matter of fact, the moment we compile this file references.bbl is read | + | |As a matter of fact, the moment we compile this file, 'references.bbl' is read and those references are loaded here. |
+ | |||
|- | |- | ||
|11:27 | |11:27 | ||
− | | And this order is the same order, that we saw in references.bbl. | + | |And this order is the same order, that we saw in 'references.bbl'. |
+ | |||
|- | |- | ||
|11:33 | |11:33 | ||
|For example, you can see that now. | |For example, you can see that now. | ||
+ | |||
|- | |- | ||
|11:37 | |11:37 | ||
− | | See the example, the first reference is Chang and Pearson, here also Chang and Pearson. | + | |See the example, the first reference is "Chang and Pearson", here also "Chang and Pearson". |
+ | |||
|- | |- | ||
|11:43 | |11:43 | ||
− | | Alright. But of course this information is not correct yet, we are not citing them properly. | + | |Alright. But of course this information is not correct yet, we are not citing them properly. |
+ | |||
|- | |- | ||
|11:53 | |11:53 | ||
− | | So let us compile – so this is something we have stated before, if you compile it once more, it will become alright. | + | |So let us compile – so this is something we have stated before, if you compile it once more, it will become alright. |
+ | |||
|- | |- | ||
|12:03 | |12:03 | ||
|How do we explain this, let’s go and see the file references. aux | |How do we explain this, let’s go and see the file references. aux | ||
+ | |||
|- | |- | ||
|12:15 | |12:15 | ||
|and note that in addition to the citation messages we had before we have extra references – | |and note that in addition to the citation messages we had before we have extra references – | ||
+ | |||
|- | |- | ||
|12:25 | |12:25 | ||
|it says bibcite cp82 and so on. | |it says bibcite cp82 and so on. | ||
+ | |||
|- | |- | ||
|12:33 | |12:33 | ||
|This says that the bibliography item with the label cp82 is reference 1. | |This says that the bibliography item with the label cp82 is reference 1. | ||
+ | |||
|- | |- | ||
|12:42 | |12:42 | ||
− | | So we can see this for example, we can just open this, let’s open the source file again – | + | |So we can see this for example, we can just open this, let’s open the source file again – |
+ | |||
|- | |- | ||
|12:52 | |12:52 | ||
|let me search for cp82. | |let me search for cp82. | ||
+ | |||
|- | |- | ||
|12:56 | |12:56 | ||
− | | There you are, this is cp82. And the corresponding reference is here and this appears in this citation. | + | |There you are, this is cp82. And the corresponding reference is here and this appears in this citation. |
+ | |||
|- | |- | ||
|13:07 | |13:07 | ||
|Now that this information, namely that this reference cp82, appears as item number 1 in the reference list is available in the file references.aux. | |Now that this information, namely that this reference cp82, appears as item number 1 in the reference list is available in the file references.aux. | ||
+ | |||
|- | |- | ||
|13:24 | |13:24 | ||
− | | So if I re-compile it, now this information comes automatically here. | + | |So if I re-compile it, now this information comes automatically here. |
+ | |||
|- | |- | ||
|13:41 | |13:41 | ||
|and we can also see that the warnings are now gone. | |and we can also see that the warnings are now gone. | ||
+ | |||
|- | |- | ||
|13:47 | |13:47 | ||
|What LaTeX has done is to take the reference number information from references.aux and assign to the labels of the cite command in the source file namely these from here. | |What LaTeX has done is to take the reference number information from references.aux and assign to the labels of the cite command in the source file namely these from here. | ||
+ | |||
|- | |- | ||
|14:05 | |14:05 | ||
|We will now see the file that contains the references namely, ref.bib. let’s come here, | |We will now see the file that contains the references namely, ref.bib. let’s come here, | ||
+ | |||
|- | |- | ||
|14:17 | |14:17 | ||
|ref.bib, | |ref.bib, | ||
+ | |||
|- | |- | ||
|14:24 | |14:24 | ||
|let’s go to the top of this page. | |let’s go to the top of this page. | ||
+ | |||
|- | |- | ||
|14:29 | |14:29 | ||
− | | In Emacs editor, it is possible to use the entry types to choose a reference that we want to add. | + | |In Emacs editor, it is possible to use the entry types to choose a reference that we want to add. |
+ | |||
|- | |- | ||
|14:36 | |14:36 | ||
|For example, see for example there is something called entry types. | |For example, see for example there is something called entry types. | ||
+ | |||
|- | |- | ||
|14:50 | |14:50 | ||
− | | So in Emacs editor, it is possible to create this and the moment you invoke this ‘article in journal’ type I get an empty record which I can fill up. | + | |So in Emacs editor, it is possible to create this and the moment you invoke this ‘article in journal’ type I get an empty record which I can fill up. |
+ | |||
|- | |- | ||
|15:09 | |15:09 | ||
− | | If your editor does not have this capability, no sweat! You can manually create these entries. | + | |If your editor does not have this capability, no sweat! You can manually create these entries. |
+ | |||
|- | |- | ||
|15:16 | |15:16 | ||
− | | For the time being let me undo this, I don’t want this. | + | |For the time being let me undo this, I don’t want this. |
+ | |||
|- | |- | ||
|15:24 | |15:24 | ||
|It is possible to define strings and use them as variables in the file ref.bib. | |It is possible to define strings and use them as variables in the file ref.bib. | ||
+ | |||
|- | |- | ||
|15:33 | |15:33 | ||
|For example, the string JWC, denotes John Wiley and Songs Limited, Chichester - which has been used in some references. | |For example, the string JWC, denotes John Wiley and Songs Limited, Chichester - which has been used in some references. | ||
+ | |||
|- | |- | ||
|15:44 | |15:44 | ||
|For example in this reference. Each reference has a key word, that appears at the very beginning of the record. | |For example in this reference. Each reference has a key word, that appears at the very beginning of the record. | ||
+ | |||
|- | |- | ||
|15:52 | |15:52 | ||
− | | For example, I have this reference, this record has KMM07 and that appears here as well. As a matter of fact, I have referred to this record through this key word. | + | |For example, I have this reference, this record has KMM07 and that appears here as well. As a matter of fact, I have referred to this record through this key word. |
+ | |||
|- | |- | ||
|16:09 | |16:09 | ||
|Now I will explain, how using BibTeX it is possible to accommodate different types of referencing. | |Now I will explain, how using BibTeX it is possible to accommodate different types of referencing. | ||
+ | |||
|- | |- | ||
|16:21 | |16:21 | ||
− | | Before we make changes, let us recall that the references here are all in alphabetical order | + | |Before we make changes, let us recall that the references here are all in alphabetical order |
+ | |||
|- | |- | ||
|16:29 | |16:29 | ||
|For example, B. C. Chang and Pearson, number 1, it appears here. | |For example, B. C. Chang and Pearson, number 1, it appears here. | ||
+ | |||
|- | |- | ||
|16:37 | |16:37 | ||
|The first reference that is mentioned is 3, then 2, then 11, and so on, that is because, the referencing here is alphabetical. | |The first reference that is mentioned is 3, then 2, then 11, and so on, that is because, the referencing here is alphabetical. | ||
+ | |||
|- | |- | ||
|16:50 | |16:50 | ||
|Let us change the bibliography style to, let me make this, | |Let us change the bibliography style to, let me make this, | ||
+ | |||
|- | |- | ||
|16:59 | |16:59 | ||
|let me make the bibliography style to u-n-s-r-t. Which provides unsorted reference list as used in IEEE journals. | |let me make the bibliography style to u-n-s-r-t. Which provides unsorted reference list as used in IEEE journals. | ||
+ | |||
|- | |- | ||
|17:13 | |17:13 | ||
| On compiling once, references.aux gets updated with the style information.Now it will have u-n-s-r-t. | | On compiling once, references.aux gets updated with the style information.Now it will have u-n-s-r-t. | ||
+ | |||
|- | |- | ||
|17:25 | |17:25 | ||
|On executing BibTeX, with a command BibTeX.references, the reference list is created in the references.bbl. | |On executing BibTeX, with a command BibTeX.references, the reference list is created in the references.bbl. | ||
+ | |||
|- | |- | ||
|17:42 | |17:42 | ||
|note that it would have created references.bbl. | |note that it would have created references.bbl. | ||
+ | |||
|- | |- | ||
|17:47 | |17:47 | ||
|But this will be as per the new style which is u-n-s-r-t. | |But this will be as per the new style which is u-n-s-r-t. | ||
+ | |||
|- | |- | ||
|17:52 | |17:52 | ||
− | | Now we compile references.tex. | + | |Now we compile references.tex. |
+ | |||
|- | |- | ||
|18:02 | |18:02 | ||
|Note that the ordering has changed now. | |Note that the ordering has changed now. | ||
+ | |||
|- | |- | ||
|18:09 | |18:09 | ||
− | | The references are not in alphabetical order, | + | |The references are not in alphabetical order, |
+ | |||
|- | |- | ||
|18:16 | |18:16 | ||
|but here is a complaint, that labels may have changed, re-run to get cross references right, | |but here is a complaint, that labels may have changed, re-run to get cross references right, | ||
+ | |||
|- | |- | ||
|18:24 | |18:24 | ||
− | | let us re-run this, that warning message is gone and note that now the referencing here is as per the sequence in which they are referred to in the source. | + | |let us re-run this, that warning message is gone and note that now the referencing here is as per the sequence in which they are referred to in the source. |
+ | |||
|- | |- | ||
|18:40 | |18:40 | ||
− | | For example, reference 1, is the one that is referred first, reference 2 is referred the second time, 2nd, 3rd, 4th, 5th and so on. | + | |For example, reference 1, is the one that is referred first, reference 2 is referred the second time, 2nd, 3rd, 4th, 5th and so on. |
+ | |||
|- | |- | ||
|18:54 | |18:54 | ||
|We will now create references as required by computer science journals | |We will now create references as required by computer science journals | ||
+ | |||
|- | |- | ||
|19:01 | |19:01 | ||
|So let us come here, and call this ‘alpha’, | |So let us come here, and call this ‘alpha’, | ||
+ | |||
|- | |- | ||
|19:07 | |19:07 | ||
|let me compile this once, | |let me compile this once, | ||
+ | |||
|- | |- | ||
|19:10 | |19:10 | ||
|let me do a BibTeX; | |let me do a BibTeX; | ||
+ | |||
|- | |- | ||
|19:14 | |19:14 | ||
− | | let me compile it once more. | + | |let me compile it once more. |
+ | |||
|- | |- | ||
|19:17 | |19:17 | ||
|So this has changed but the referencing here has not changed. | |So this has changed but the referencing here has not changed. | ||
+ | |||
|- | |- | ||
|19:21 | |19:21 | ||
|There is a complaint saying that labels have changed. | |There is a complaint saying that labels have changed. | ||
+ | |||
|- | |- | ||
|19:25 | |19:25 | ||
|If I compile once more, this is exactly the same. | |If I compile once more, this is exactly the same. | ||
+ | |||
|- | |- | ||
|19:30 | |19:30 | ||
|For example, you have B C Chang and Pearson so that has CP82, which is here. | |For example, you have B C Chang and Pearson so that has CP82, which is here. | ||
+ | |||
|- | |- | ||
|19:41 | |19:41 | ||
|So now the referencing of these entries are also here. | |So now the referencing of these entries are also here. | ||
+ | |||
|- | |- | ||
|19:56 | |19:56 | ||
|There is a large number of other referencing styles on the web. | |There is a large number of other referencing styles on the web. | ||
+ | |||
|- | |- | ||
|20:01 | |20:01 | ||
|I will now show a style that is used by ifac and chemical engineering journals. | |I will now show a style that is used by ifac and chemical engineering journals. | ||
+ | |||
|- | |- | ||
|20:08 | |20:08 | ||
|First, add Harvard to use-packages command, as I show now. | |First, add Harvard to use-packages command, as I show now. | ||
+ | |||
|- | |- | ||
|20:19 | |20:19 | ||
− | | Also change the style to ifac. | + | |Also change the style to ifac. |
+ | |||
|- | |- | ||
|20:28 | |20:28 | ||
|These are implemented through two files, namely Harvard,sty and ifac.bst. | |These are implemented through two files, namely Harvard,sty and ifac.bst. | ||
+ | |||
|- | |- | ||
|20:48 | |20:48 | ||
|These files are on the web and one can download them. | |These files are on the web and one can download them. | ||
+ | |||
|- | |- | ||
|20:53 | |20:53 | ||
| On compiling this now, pdf-LaTeX-references, executing BibTeX, | | On compiling this now, pdf-LaTeX-references, executing BibTeX, | ||
+ | |||
|- | |- | ||
|21:09 | |21:09 | ||
|compiling it twice. | |compiling it twice. | ||
+ | |||
|- | |- | ||
|21:14 | |21:14 | ||
− | | We get the reference list as shown here, where the references are arranged alphabetically without serial numbers. | + | |We get the reference list as shown here, where the references are arranged alphabetically without serial numbers. |
+ | |||
|- | |- | ||
|21:23 | |21:23 | ||
− | | Serial numbers have disappeared. | + | |Serial numbers have disappeared. |
+ | |||
|- | |- | ||
|21:25 | |21:25 | ||
|Referencing is by explicit addressing of author names, for example, here it says, Vidyasagar 1985, and year. | |Referencing is by explicit addressing of author names, for example, here it says, Vidyasagar 1985, and year. | ||
+ | |||
|- | |- | ||
|21:39 | |21:39 | ||
|We can see the references on the next page also, there you are, it is alphabetical. | |We can see the references on the next page also, there you are, it is alphabetical. | ||
+ | |||
|- | |- | ||
|21:58 | |21:58 | ||
− | | When this referencing style is used, the cite command puts the entire reference within the brackets. | + | |When this referencing style is used, the cite command puts the entire reference within the brackets. |
+ | |||
|- | |- | ||
|22:06 | |22:06 | ||
− | | For example, look at the source file. | + | |For example, look at the source file. |
+ | |||
|- | |- | ||
|22:12 | |22:12 | ||
|Here you are, let’s come here, the text book by cite KMM07 produces ‘the textbook by (Moudgalya, 2007b)’. | |Here you are, let’s come here, the text book by cite KMM07 produces ‘the textbook by (Moudgalya, 2007b)’. | ||
+ | |||
|- | |- | ||
|22:27 | |22:27 | ||
− | | Here the name Moudgalya should not come in the brackets, only the year should come in the brackets. | + | |Here the name Moudgalya should not come in the brackets, only the year should come in the brackets. |
+ | |||
|- | |- | ||
|22:35 | |22:35 | ||
− | | This is taken care of by the command cite-as-noun. | + | |This is taken care of by the command cite-as-noun. |
+ | |||
|- | |- | ||
|22:43 | |22:43 | ||
− | | Let me save this. | + | |Let me save this. |
+ | |||
|- | |- | ||
|22:45 | |22:45 | ||
|Compile this. | |Compile this. | ||
+ | |||
|- | |- | ||
|22:48 | |22:48 | ||
|There you are. Now the name Moudgalya has come outside the brackets, only the year has come within the brackets. | |There you are. Now the name Moudgalya has come outside the brackets, only the year has come within the brackets. | ||
+ | |||
|- | |- | ||
|23:00 | |23:00 | ||
|This cite-as-noun fixes this problem. It is important to note that cite-as-noun is a command that is specific to the referencing style that we used now. | |This cite-as-noun fixes this problem. It is important to note that cite-as-noun is a command that is specific to the referencing style that we used now. | ||
+ | |||
|- | |- | ||
|23:12 | |23:12 | ||
− | | | + | |It may not work with other referencing styles. |
+ | |||
|- | |- | ||
|23:16 | |23:16 | ||
|As mentioned earlier, there is a large number of referencing styles. | |As mentioned earlier, there is a large number of referencing styles. | ||
+ | |||
|- | |- | ||
|23:20 | |23:20 | ||
− | | One only needs to download the appropriate sty and bst files. In this example I used, Harvard.sty and ifac.bst files. | + | |One only needs to download the appropriate sty and bst files. In this example I used, Harvard.sty and ifac.bst files. |
+ | |||
|- | |- | ||
|23:37 | |23:37 | ||
|If you think carefully, you will realize that in all of the above, we have not changed the database of the references, namely ref.bib, at all. | |If you think carefully, you will realize that in all of the above, we have not changed the database of the references, namely ref.bib, at all. | ||
+ | |||
|- | |- | ||
|23:47 | |23:47 | ||
|That is the beauty of BibTeX. | |That is the beauty of BibTeX. | ||
+ | |||
|- | |- | ||
|23:50 | |23:50 | ||
|Although we have spent a lot of time explaining the procedure to create the references list, the actual procedure to be followed by the end user is extremely simple. | |Although we have spent a lot of time explaining the procedure to create the references list, the actual procedure to be followed by the end user is extremely simple. | ||
+ | |||
|- | |- | ||
|24:02 | |24:02 | ||
|One, create the database, namely the .bib file. Get the .sty and .bst files. | |One, create the database, namely the .bib file. Get the .sty and .bst files. | ||
+ | |||
|- | |- | ||
|24:10 | |24:10 | ||
|Many of them may already be available on your installation. | |Many of them may already be available on your installation. | ||
+ | |||
|- | |- | ||
|24:15 | |24:15 | ||
− | | Compile source file once, execute pdf LaTeX, compile the source file twice more. | + | |Compile source file once, execute pdf LaTeX, compile the source file twice more. |
+ | |||
|- | |- | ||
|24:24 | |24:24 | ||
|Wouldn’t you agree that this is an extremely simple procedure. | |Wouldn’t you agree that this is an extremely simple procedure. | ||
+ | |||
|- | |- | ||
|24:30 | |24:30 | ||
|Wont this make you say, Long live Bibtex and Latex! | |Wont this make you say, Long live Bibtex and Latex! | ||
+ | |||
|- | |- | ||
|24:35 | |24:35 | ||
|This brings us to the end of this tutorial. | |This brings us to the end of this tutorial. | ||
+ | |||
|- | |- | ||
|24:38 | |24:38 | ||
− | | Thanks for listening. | + | |Thanks for listening. |
+ | |||
|- | |- | ||
|24:40 | |24:40 |
Latest revision as of 18:23, 16 October 2019
Time | Narration |
00:00 | Welcome to a tutorial on creating bibliography entries. |
00:06 | I will be using BibTeX for this purpose. Bibtex is a stand-alone utility separate from LaTeX. |
00:14 | In this tutorial we will see, how to produce a pdf file that you see now. |
00:20 | The first page shows the title. |
00:25 | Let us go to the second page where we have the text. |
00:31 | The references are numbered from one through six and in the next page, up to eleven. |
00:41 | Note that these references are also listed alphabetically. |
00:47 | You can see it here. |
00:52 | Let us next see the source file that we used for this purpose. |
00:59 | Let us go through this. |
01:07 | It is clear that it does not have the references as we can see by browsing through. |
01:13 | We don’t have this information present in the source file. |
01:17 | So, where are the references? They are in the file ‘ref’. Actually the filename is ‘ref.bib’. |
01:26 | That is the default for this command – bibliography. |
01:34 | There you are, ‘ref.bib’. |
01:39 | Let us see what is contained in 'ref.bib'. |
01:52 | It has reference information under different categories, for example- it has book, tech-report, in proceedings, miscellaneous, as well as article. |
02:09 | We will come back to this file shortly and explain it. |
02:13 | Let us now concentrate on the procedure to create the reference list in the output. |
02:19 | Let us put the 'references.tex' back, the source file. |
02:31 | Let’s go to the top of this page. |
02:36 | Let us first get a listing of the files whose prefixes – references. |
02:44 | There you are. |
02:47 | Let us first delete all files except 'references.tex'. |
03:04 | Let us confirm this, |
03:09 | so we have only 'references.tex'. |
03:12 | Now, let me compile this. |
03:19 | On compilation, we get the warning message that,there are some undefined references, some citations are missing. |
03:39 | We see that there are new files that the pdf.tex command has created as we can see now. |
03:52 | There are some new files in addition to the 'references.pdf', we have a file called 'references.log' as well as 'references.aux'. |
04:04 | Let us first see the file 'references.log'. |
04:15 | It has a lot of information, as a matter of fact, it has all the messages that appear here. |
04:20 | Let’s just go down and see. There is a lot of information as well as these warnings which appear here as well. |
04:36 | There is of course a warning that some fonts are missing often we can live with this short-comings. |
04:43 | The warning that some references are missing, some citations are missing, are however important to us. |
04:50 | We will now proceed to address these warnings. |
04:55 | Let us now open the other file, namely, 'references.aux'. |
05:04 | It has several citation commands. Where do these come from? |
05:13 | All the arguments of the citation appeared in the ‘cite command’ in the source file |
05:18 | as we can see now. Let me open it here. |
05:26 | Let’s go down, there is a scroll for it. Source file. |
05:31 | See for example, I have this ‘cite vk 79’, that 'vk79' comes here. |
05:37 | ‘cite tk 80’, it comes here 'tk 80’and so on. Also, this bibstyle-plain also comes in the source file here. |
05:51 | you go up, bibliography style – plain, that plain appears here. |
06:00 | The 'aux' file also stores variable names. Suppose for example, I include a label for this section. |
06:11 | Let me go here. |
06:18 | Okay, let me do this without a label. |
06:26 | So for example, let’s delete this, let me compile this. |
06:37 | Let me re-open this file |
06:47 | and note that we no longer have this. |
06:50 | So,the moment I put a label here, ‘label – sec arya’. |
07:06 | Save this, compile this, open this. |
07:13 | Then you come to this file, I need to re-open this file. |
07:18 | And note that, we have this command- 'new label sec arya'. |
07:23 | This label is the same label that we had here and this one says that it is section 1, |
07:31 | as it appears here, and this 2 refers to the page number – this document page is 2. |
07:41 | During the next compilation, Latex reads the 'aux' file and loads the label information. |
07:48 | This is why we need two compilations to get the labels correct. |
07:52 | Let me explain how the references list is created; now is the time to use BibTeX. |
08:01 | We give the command BibTeX references here. Let’s give the command – BibTeX references. |
08:17 | This takes the input from 'references.aux' as mentioned here, says that, here for example- it says 'references.aux' is used. |
08:30 | It says that it uses a style file called 'plain.bst' |
08:39 | as given by this plain command and the date of 'ref.bib'. This we already explained, 'ref.bib', database file number 1 is 'ref.bib'. |
08:51 | Recall that we used plain style and 'ref bib' in the source file. |
08:56 | Let us see what files are now created. |
09:00 | Okay, that is what new files are created because of this command BibTeX.references. |
09:10 | Let’s list this. You find that in addition to the files we saw previously, |
09:15 | we have two new files, 'references.blg' and 'references.bbl'. |
09:23 | The file 'references.blg' has formatting information; let’s see this. |
09:35 | You can see that it has some formatting information. |
09:39 | Let me quit this. |
09:41 | And let me see what this file 'bbl' has. 'References.bbl'. So, it has this information, the references that we saw earlier. |
09:55 | 'References.bbl' has the cited references in the same order as we finally want in the pdf file. |
10:07 | Normally, one would not have to change these files manually or even view them however. |
10:15 | In this last compilation, we also got a warning, 'references.bbl' is not found. |
10:23 | As we can see in the 'references.log' file. Let’s open this file here. |
10:35 | Okay, let’s look for – so for example it says, no file 'references.bbl'. |
10:47 | So this is what happened in the previous compilation. |
10:55 | But using BibTeX we have now created the file 'references.bbl'. |
11:01 | So let us compile once again. |
11:10 | Now the warnings are different, it says that ‘label’s may have changed’. |
11:15 | As a matter of fact, the moment we compile this file, 'references.bbl' is read and those references are loaded here. |
11:27 | And this order is the same order, that we saw in 'references.bbl'. |
11:33 | For example, you can see that now. |
11:37 | See the example, the first reference is "Chang and Pearson", here also "Chang and Pearson". |
11:43 | Alright. But of course this information is not correct yet, we are not citing them properly. |
11:53 | So let us compile – so this is something we have stated before, if you compile it once more, it will become alright. |
12:03 | How do we explain this, let’s go and see the file references. aux |
12:15 | and note that in addition to the citation messages we had before we have extra references – |
12:25 | it says bibcite cp82 and so on. |
12:33 | This says that the bibliography item with the label cp82 is reference 1. |
12:42 | So we can see this for example, we can just open this, let’s open the source file again – |
12:52 | let me search for cp82. |
12:56 | There you are, this is cp82. And the corresponding reference is here and this appears in this citation. |
13:07 | Now that this information, namely that this reference cp82, appears as item number 1 in the reference list is available in the file references.aux. |
13:24 | So if I re-compile it, now this information comes automatically here. |
13:41 | and we can also see that the warnings are now gone. |
13:47 | What LaTeX has done is to take the reference number information from references.aux and assign to the labels of the cite command in the source file namely these from here. |
14:05 | We will now see the file that contains the references namely, ref.bib. let’s come here, |
14:17 | ref.bib, |
14:24 | let’s go to the top of this page. |
14:29 | In Emacs editor, it is possible to use the entry types to choose a reference that we want to add. |
14:36 | For example, see for example there is something called entry types. |
14:50 | So in Emacs editor, it is possible to create this and the moment you invoke this ‘article in journal’ type I get an empty record which I can fill up. |
15:09 | If your editor does not have this capability, no sweat! You can manually create these entries. |
15:16 | For the time being let me undo this, I don’t want this. |
15:24 | It is possible to define strings and use them as variables in the file ref.bib. |
15:33 | For example, the string JWC, denotes John Wiley and Songs Limited, Chichester - which has been used in some references. |
15:44 | For example in this reference. Each reference has a key word, that appears at the very beginning of the record. |
15:52 | For example, I have this reference, this record has KMM07 and that appears here as well. As a matter of fact, I have referred to this record through this key word. |
16:09 | Now I will explain, how using BibTeX it is possible to accommodate different types of referencing. |
16:21 | Before we make changes, let us recall that the references here are all in alphabetical order |
16:29 | For example, B. C. Chang and Pearson, number 1, it appears here. |
16:37 | The first reference that is mentioned is 3, then 2, then 11, and so on, that is because, the referencing here is alphabetical. |
16:50 | Let us change the bibliography style to, let me make this, |
16:59 | let me make the bibliography style to u-n-s-r-t. Which provides unsorted reference list as used in IEEE journals. |
17:13 | On compiling once, references.aux gets updated with the style information.Now it will have u-n-s-r-t. |
17:25 | On executing BibTeX, with a command BibTeX.references, the reference list is created in the references.bbl. |
17:42 | note that it would have created references.bbl. |
17:47 | But this will be as per the new style which is u-n-s-r-t. |
17:52 | Now we compile references.tex. |
18:02 | Note that the ordering has changed now. |
18:09 | The references are not in alphabetical order, |
18:16 | but here is a complaint, that labels may have changed, re-run to get cross references right, |
18:24 | let us re-run this, that warning message is gone and note that now the referencing here is as per the sequence in which they are referred to in the source. |
18:40 | For example, reference 1, is the one that is referred first, reference 2 is referred the second time, 2nd, 3rd, 4th, 5th and so on. |
18:54 | We will now create references as required by computer science journals |
19:01 | So let us come here, and call this ‘alpha’, |
19:07 | let me compile this once, |
19:10 | let me do a BibTeX; |
19:14 | let me compile it once more. |
19:17 | So this has changed but the referencing here has not changed. |
19:21 | There is a complaint saying that labels have changed. |
19:25 | If I compile once more, this is exactly the same. |
19:30 | For example, you have B C Chang and Pearson so that has CP82, which is here. |
19:41 | So now the referencing of these entries are also here. |
19:56 | There is a large number of other referencing styles on the web. |
20:01 | I will now show a style that is used by ifac and chemical engineering journals. |
20:08 | First, add Harvard to use-packages command, as I show now. |
20:19 | Also change the style to ifac. |
20:28 | These are implemented through two files, namely Harvard,sty and ifac.bst. |
20:48 | These files are on the web and one can download them. |
20:53 | On compiling this now, pdf-LaTeX-references, executing BibTeX, |
21:09 | compiling it twice. |
21:14 | We get the reference list as shown here, where the references are arranged alphabetically without serial numbers. |
21:23 | Serial numbers have disappeared. |
21:25 | Referencing is by explicit addressing of author names, for example, here it says, Vidyasagar 1985, and year. |
21:39 | We can see the references on the next page also, there you are, it is alphabetical. |
21:58 | When this referencing style is used, the cite command puts the entire reference within the brackets. |
22:06 | For example, look at the source file. |
22:12 | Here you are, let’s come here, the text book by cite KMM07 produces ‘the textbook by (Moudgalya, 2007b)’. |
22:27 | Here the name Moudgalya should not come in the brackets, only the year should come in the brackets. |
22:35 | This is taken care of by the command cite-as-noun. |
22:43 | Let me save this. |
22:45 | Compile this. |
22:48 | There you are. Now the name Moudgalya has come outside the brackets, only the year has come within the brackets. |
23:00 | This cite-as-noun fixes this problem. It is important to note that cite-as-noun is a command that is specific to the referencing style that we used now. |
23:12 | It may not work with other referencing styles. |
23:16 | As mentioned earlier, there is a large number of referencing styles. |
23:20 | One only needs to download the appropriate sty and bst files. In this example I used, Harvard.sty and ifac.bst files. |
23:37 | If you think carefully, you will realize that in all of the above, we have not changed the database of the references, namely ref.bib, at all. |
23:47 | That is the beauty of BibTeX. |
23:50 | Although we have spent a lot of time explaining the procedure to create the references list, the actual procedure to be followed by the end user is extremely simple. |
24:02 | One, create the database, namely the .bib file. Get the .sty and .bst files. |
24:10 | Many of them may already be available on your installation. |
24:15 | Compile source file once, execute pdf LaTeX, compile the source file twice more. |
24:24 | Wouldn’t you agree that this is an extremely simple procedure. |
24:30 | Wont this make you say, Long live Bibtex and Latex! |
24:35 | This brings us to the end of this tutorial. |
24:38 | Thanks for listening. |
24:40 | This is Kannan Moudgalya signing off. Good-bye. |
Contributors and Content Editors
Minal, Nancyvarkey, PoojaMoolya, Pratik kamble, Sandhya.np14