BibTeX style which shows annotation fields and employs numeric-style citation call-outsbibliography: Using a Numeric Citation StyleReferences and citation call-outs are not printedBibTeX Vancouver Style Fieldshow to create numeric-style instead of authoryear-style citation call-outs?Change the appearance of citation call-outsAutomatic sorting and compression of a range of numeric-style citation call-outsStrange Numbering of citation call-outstext-style authoryear-type citation call-outs with the “harvard” citation management packagecustomize in-text citation call-outs
Do I have a twin with permutated remainders?
strTok function (thread safe, supports empty tokens, doesn't change string)
NMaximize is not converging to a solution
Maximum likelihood parameters deviate from posterior distributions
Has there ever been an airliner design involving reducing generator load by installing solar panels?
What's the point of deactivating Num Lock on login screens?
Today is the Center
How much of data wrangling is a data scientist's job?
What is the word for reserving something for yourself before others do?
Why is 150k or 200k jobs considered good when there's 300k+ births a month?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
Meaning of に in 本当に
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
What's the output of a record needle playing an out-of-speed record
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
Why are electrically insulating heatsinks so rare? Is it just cost?
Paid for article while in US on F-1 visa?
Why does Kotter return in Welcome Back Kotter?
Theorems that impeded progress
How much RAM could one put in a typical 80386 setup?
Why is Minecraft giving an OpenGL error?
I'm flying to France today and my passport expires in less than 2 months
Can I ask the recruiters in my resume to put the reason why I am rejected?
Which country benefited the most from UN Security Council vetoes?
BibTeX style which shows annotation fields and employs numeric-style citation call-outs
bibliography: Using a Numeric Citation StyleReferences and citation call-outs are not printedBibTeX Vancouver Style Fieldshow to create numeric-style instead of authoryear-style citation call-outs?Change the appearance of citation call-outsAutomatic sorting and compression of a range of numeric-style citation call-outsStrange Numbering of citation call-outstext-style authoryear-type citation call-outs with the “harvard” citation management packagecustomize in-text citation call-outs
I am relatively new to LaTeX, i have used it for a couple of documents here and there but I am now using it for a formal school report which needs an annotated bibliography.
My current problem is that if I want to have my annotation displayed, the citations keys are now no longers numerical. If I changed my style, my keys are numerical but my annotations are not displayed.
Here is my bibfile.bib
:
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = url: http://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research.
The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so.
The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and
designing the algorithm itself.
and here is the styling i've tried:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces:
and just a simple plain style:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces this:
i want a combination of the two so the annotation shows and the key is [1]
not [Jun11]
I have tried looking on websites such as: http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html but I can't seem to locate a solution.
Does anybody have any suggestions?
bibtex bibliographies
add a comment |
I am relatively new to LaTeX, i have used it for a couple of documents here and there but I am now using it for a formal school report which needs an annotated bibliography.
My current problem is that if I want to have my annotation displayed, the citations keys are now no longers numerical. If I changed my style, my keys are numerical but my annotations are not displayed.
Here is my bibfile.bib
:
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = url: http://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research.
The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so.
The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and
designing the algorithm itself.
and here is the styling i've tried:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces:
and just a simple plain style:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces this:
i want a combination of the two so the annotation shows and the key is [1]
not [Jun11]
I have tried looking on websites such as: http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html but I can't seem to locate a solution.
Does anybody have any suggestions?
bibtex bibliographies
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Martin Schröder
Jan 28 '15 at 22:20
You could try withbiblatex
, which is relatively easy to customise and defines aurl
and anannotation
field.
– Bernard
Jan 28 '15 at 23:40
I'd be much more easier to help if you produce a MWE with the relevant code.
– Ludenticus
Jan 28 '15 at 23:46
On the other hand, if you need to print the annotate with another bibliography style, you'd better try biblatex
– Ludenticus
Jan 29 '15 at 0:02
add a comment |
I am relatively new to LaTeX, i have used it for a couple of documents here and there but I am now using it for a formal school report which needs an annotated bibliography.
My current problem is that if I want to have my annotation displayed, the citations keys are now no longers numerical. If I changed my style, my keys are numerical but my annotations are not displayed.
Here is my bibfile.bib
:
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = url: http://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research.
The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so.
The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and
designing the algorithm itself.
and here is the styling i've tried:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces:
and just a simple plain style:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces this:
i want a combination of the two so the annotation shows and the key is [1]
not [Jun11]
I have tried looking on websites such as: http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html but I can't seem to locate a solution.
Does anybody have any suggestions?
bibtex bibliographies
I am relatively new to LaTeX, i have used it for a couple of documents here and there but I am now using it for a formal school report which needs an annotated bibliography.
My current problem is that if I want to have my annotation displayed, the citations keys are now no longers numerical. If I changed my style, my keys are numerical but my annotations are not displayed.
Here is my bibfile.bib
:
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = url: http://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research.
The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so.
The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and
designing the algorithm itself.
and here is the styling i've tried:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces:
and just a simple plain style:
nocite*
bibliographystyleannotate
bibliographybibfile
which produces this:
i want a combination of the two so the annotation shows and the key is [1]
not [Jun11]
I have tried looking on websites such as: http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html but I can't seem to locate a solution.
Does anybody have any suggestions?
bibtex bibliographies
bibtex bibliographies
edited Jan 29 '15 at 5:34
Mico
285k31388778
285k31388778
asked Jan 28 '15 at 22:12
chris edwardschris edwards
526
526
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Martin Schröder
Jan 28 '15 at 22:20
You could try withbiblatex
, which is relatively easy to customise and defines aurl
and anannotation
field.
– Bernard
Jan 28 '15 at 23:40
I'd be much more easier to help if you produce a MWE with the relevant code.
– Ludenticus
Jan 28 '15 at 23:46
On the other hand, if you need to print the annotate with another bibliography style, you'd better try biblatex
– Ludenticus
Jan 29 '15 at 0:02
add a comment |
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Martin Schröder
Jan 28 '15 at 22:20
You could try withbiblatex
, which is relatively easy to customise and defines aurl
and anannotation
field.
– Bernard
Jan 28 '15 at 23:40
I'd be much more easier to help if you produce a MWE with the relevant code.
– Ludenticus
Jan 28 '15 at 23:46
On the other hand, if you need to print the annotate with another bibliography style, you'd better try biblatex
– Ludenticus
Jan 29 '15 at 0:02
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Martin Schröder
Jan 28 '15 at 22:20
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Martin Schröder
Jan 28 '15 at 22:20
You could try with
biblatex
, which is relatively easy to customise and defines a url
and an annotation
field.– Bernard
Jan 28 '15 at 23:40
You could try with
biblatex
, which is relatively easy to customise and defines a url
and an annotation
field.– Bernard
Jan 28 '15 at 23:40
I'd be much more easier to help if you produce a MWE with the relevant code.
– Ludenticus
Jan 28 '15 at 23:46
I'd be much more easier to help if you produce a MWE with the relevant code.
– Ludenticus
Jan 28 '15 at 23:46
On the other hand, if you need to print the annotate with another bibliography style, you'd better try biblatex
– Ludenticus
Jan 29 '15 at 0:02
On the other hand, if you need to print the annotate with another bibliography style, you'd better try biblatex
– Ludenticus
Jan 29 '15 at 0:02
add a comment |
2 Answers
2
active
oldest
votes
If it's the plain
bibliography style you wish to modify to enable it to print the contents of the annotate
field, you could proceed as follows:
Find the file
plain.bst
in your TeX distribution. Make a copy of this file, calling the copy (say)plainannotate.bst
. (Don't edit a file from the TeX distribution directly.)Open the file
plainannotate.bst
in a text editor. The editor you use to edit your tex files will do fine.First, you have to inform
plainannotate
that it's supposed to recognize fields namedannotate
. Near the very top of the file, find the structure namedENTRY
. Insert a blank line between "address" and "author", and insert the word "annotate" in the new line.Second, you have to inform the bibliography style (and BibTeX) what to do when it's told to process the contents of the
annotate
field. Find the definition of the functionformat.authors
(ca. line 215 in my copy of the file). After this function (and before the functionformat.editors
), insert the following lines of code:FUNCTION format.annotate
annotate empty$
""
" beginquotationnoindent "
annotate
* " endquotation " *
if$In case you're curious what this code does: It first checks if the
annotate
field is empty. If so, it prints nothing (""
). If it's non-empty, aquotation
environment is initiated, the contents of theannotate
field are written out, and thequotation
environment is closed.Third, we have to modify the functions
article
,book
, etc, which process the entries of type@article
,@book
, etc., and tell them that they're supposed to invoke the newly-created functionformat.annotate
at the end of each entry.Find the function
article
. (It should start on line 550 or so if you've been following the instructions so far.) After the line that saysfin.entry
, insert two new lines:format.annotate write$
newline$Next, find the function
book
. (It should be the function that immediately followsarticle
.) Guess what: After its final line, which is againfin.entry
, insert two more new lines, with the same contents as for the functionarticle
:format.annotate write$
newline$Ditto for the function
booklet
.For most of the remaining entry-formatting functions, viz.,
inbook
,incollection
,inproceedings
,manual
,mastersthesis
,phdthesis
,proceedings
,techreport
, andunpublished
, just add one extra line afterfin.entry
, viz.,format.annotate write$
The only entry type that's a bit special is the type
@misc
, since it's BibTeX's "catch-all" entry type. (Entry types that are not recognized, say because they've been mis-spelled by accident, are automatically treated as being of type@misc
.) Find the functionmisc
; it should be between the functionsmastersthesis
andphdthesis
. Note that this function's final two lines arefin.entry
empty.misc.check(Because
@misc
is the catch-all entry type, care must be taken if its contents are entirely empty.) In this case, insert the instructionformat.annotate write$
on a new blank line between these two lines, like so:fin.entry
format.annotate write$
empty.misc.check
Save the file
plainannotate.bst
, either in the directory where your main tex file is located, or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution.Start using the "new" bibliography style by providing the instruction
bibliographystyleplainannotate
. Be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.
Here's an MWE that puts it all together:
documentclassarticle
usepackagefilecontents
beginfilecontentsabcdef.bib
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = urlhttp://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research. The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so. The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and designing the algorithm itself.
endfilecontents
usepackage[numbers]natbib
bibliographystyleplainannotate
usepackage[hyphens]url
begindocument
citetJung11
bibliographyabcdef
enddocument
add a comment |
I know this problem and answer was completed 4 years ago, but I thought this extra bit of information may save someone else a few hours of hair pulling.
I just tried Mico's plain.bst modification and got a "You can't pop an empty literal stack for entry" error.
After battling with this problem for a while I found I had to add "annotate" to the list of ENTRY labels at the beginning of the modified .bst file to make it work properly... I hope this helps :)
New contributor
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f225427%2fbibtex-style-which-shows-annotation-fields-and-employs-numeric-style-citation-ca%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If it's the plain
bibliography style you wish to modify to enable it to print the contents of the annotate
field, you could proceed as follows:
Find the file
plain.bst
in your TeX distribution. Make a copy of this file, calling the copy (say)plainannotate.bst
. (Don't edit a file from the TeX distribution directly.)Open the file
plainannotate.bst
in a text editor. The editor you use to edit your tex files will do fine.First, you have to inform
plainannotate
that it's supposed to recognize fields namedannotate
. Near the very top of the file, find the structure namedENTRY
. Insert a blank line between "address" and "author", and insert the word "annotate" in the new line.Second, you have to inform the bibliography style (and BibTeX) what to do when it's told to process the contents of the
annotate
field. Find the definition of the functionformat.authors
(ca. line 215 in my copy of the file). After this function (and before the functionformat.editors
), insert the following lines of code:FUNCTION format.annotate
annotate empty$
""
" beginquotationnoindent "
annotate
* " endquotation " *
if$In case you're curious what this code does: It first checks if the
annotate
field is empty. If so, it prints nothing (""
). If it's non-empty, aquotation
environment is initiated, the contents of theannotate
field are written out, and thequotation
environment is closed.Third, we have to modify the functions
article
,book
, etc, which process the entries of type@article
,@book
, etc., and tell them that they're supposed to invoke the newly-created functionformat.annotate
at the end of each entry.Find the function
article
. (It should start on line 550 or so if you've been following the instructions so far.) After the line that saysfin.entry
, insert two new lines:format.annotate write$
newline$Next, find the function
book
. (It should be the function that immediately followsarticle
.) Guess what: After its final line, which is againfin.entry
, insert two more new lines, with the same contents as for the functionarticle
:format.annotate write$
newline$Ditto for the function
booklet
.For most of the remaining entry-formatting functions, viz.,
inbook
,incollection
,inproceedings
,manual
,mastersthesis
,phdthesis
,proceedings
,techreport
, andunpublished
, just add one extra line afterfin.entry
, viz.,format.annotate write$
The only entry type that's a bit special is the type
@misc
, since it's BibTeX's "catch-all" entry type. (Entry types that are not recognized, say because they've been mis-spelled by accident, are automatically treated as being of type@misc
.) Find the functionmisc
; it should be between the functionsmastersthesis
andphdthesis
. Note that this function's final two lines arefin.entry
empty.misc.check(Because
@misc
is the catch-all entry type, care must be taken if its contents are entirely empty.) In this case, insert the instructionformat.annotate write$
on a new blank line between these two lines, like so:fin.entry
format.annotate write$
empty.misc.check
Save the file
plainannotate.bst
, either in the directory where your main tex file is located, or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution.Start using the "new" bibliography style by providing the instruction
bibliographystyleplainannotate
. Be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.
Here's an MWE that puts it all together:
documentclassarticle
usepackagefilecontents
beginfilecontentsabcdef.bib
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = urlhttp://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research. The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so. The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and designing the algorithm itself.
endfilecontents
usepackage[numbers]natbib
bibliographystyleplainannotate
usepackage[hyphens]url
begindocument
citetJung11
bibliographyabcdef
enddocument
add a comment |
If it's the plain
bibliography style you wish to modify to enable it to print the contents of the annotate
field, you could proceed as follows:
Find the file
plain.bst
in your TeX distribution. Make a copy of this file, calling the copy (say)plainannotate.bst
. (Don't edit a file from the TeX distribution directly.)Open the file
plainannotate.bst
in a text editor. The editor you use to edit your tex files will do fine.First, you have to inform
plainannotate
that it's supposed to recognize fields namedannotate
. Near the very top of the file, find the structure namedENTRY
. Insert a blank line between "address" and "author", and insert the word "annotate" in the new line.Second, you have to inform the bibliography style (and BibTeX) what to do when it's told to process the contents of the
annotate
field. Find the definition of the functionformat.authors
(ca. line 215 in my copy of the file). After this function (and before the functionformat.editors
), insert the following lines of code:FUNCTION format.annotate
annotate empty$
""
" beginquotationnoindent "
annotate
* " endquotation " *
if$In case you're curious what this code does: It first checks if the
annotate
field is empty. If so, it prints nothing (""
). If it's non-empty, aquotation
environment is initiated, the contents of theannotate
field are written out, and thequotation
environment is closed.Third, we have to modify the functions
article
,book
, etc, which process the entries of type@article
,@book
, etc., and tell them that they're supposed to invoke the newly-created functionformat.annotate
at the end of each entry.Find the function
article
. (It should start on line 550 or so if you've been following the instructions so far.) After the line that saysfin.entry
, insert two new lines:format.annotate write$
newline$Next, find the function
book
. (It should be the function that immediately followsarticle
.) Guess what: After its final line, which is againfin.entry
, insert two more new lines, with the same contents as for the functionarticle
:format.annotate write$
newline$Ditto for the function
booklet
.For most of the remaining entry-formatting functions, viz.,
inbook
,incollection
,inproceedings
,manual
,mastersthesis
,phdthesis
,proceedings
,techreport
, andunpublished
, just add one extra line afterfin.entry
, viz.,format.annotate write$
The only entry type that's a bit special is the type
@misc
, since it's BibTeX's "catch-all" entry type. (Entry types that are not recognized, say because they've been mis-spelled by accident, are automatically treated as being of type@misc
.) Find the functionmisc
; it should be between the functionsmastersthesis
andphdthesis
. Note that this function's final two lines arefin.entry
empty.misc.check(Because
@misc
is the catch-all entry type, care must be taken if its contents are entirely empty.) In this case, insert the instructionformat.annotate write$
on a new blank line between these two lines, like so:fin.entry
format.annotate write$
empty.misc.check
Save the file
plainannotate.bst
, either in the directory where your main tex file is located, or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution.Start using the "new" bibliography style by providing the instruction
bibliographystyleplainannotate
. Be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.
Here's an MWE that puts it all together:
documentclassarticle
usepackagefilecontents
beginfilecontentsabcdef.bib
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = urlhttp://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research. The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so. The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and designing the algorithm itself.
endfilecontents
usepackage[numbers]natbib
bibliographystyleplainannotate
usepackage[hyphens]url
begindocument
citetJung11
bibliographyabcdef
enddocument
add a comment |
If it's the plain
bibliography style you wish to modify to enable it to print the contents of the annotate
field, you could proceed as follows:
Find the file
plain.bst
in your TeX distribution. Make a copy of this file, calling the copy (say)plainannotate.bst
. (Don't edit a file from the TeX distribution directly.)Open the file
plainannotate.bst
in a text editor. The editor you use to edit your tex files will do fine.First, you have to inform
plainannotate
that it's supposed to recognize fields namedannotate
. Near the very top of the file, find the structure namedENTRY
. Insert a blank line between "address" and "author", and insert the word "annotate" in the new line.Second, you have to inform the bibliography style (and BibTeX) what to do when it's told to process the contents of the
annotate
field. Find the definition of the functionformat.authors
(ca. line 215 in my copy of the file). After this function (and before the functionformat.editors
), insert the following lines of code:FUNCTION format.annotate
annotate empty$
""
" beginquotationnoindent "
annotate
* " endquotation " *
if$In case you're curious what this code does: It first checks if the
annotate
field is empty. If so, it prints nothing (""
). If it's non-empty, aquotation
environment is initiated, the contents of theannotate
field are written out, and thequotation
environment is closed.Third, we have to modify the functions
article
,book
, etc, which process the entries of type@article
,@book
, etc., and tell them that they're supposed to invoke the newly-created functionformat.annotate
at the end of each entry.Find the function
article
. (It should start on line 550 or so if you've been following the instructions so far.) After the line that saysfin.entry
, insert two new lines:format.annotate write$
newline$Next, find the function
book
. (It should be the function that immediately followsarticle
.) Guess what: After its final line, which is againfin.entry
, insert two more new lines, with the same contents as for the functionarticle
:format.annotate write$
newline$Ditto for the function
booklet
.For most of the remaining entry-formatting functions, viz.,
inbook
,incollection
,inproceedings
,manual
,mastersthesis
,phdthesis
,proceedings
,techreport
, andunpublished
, just add one extra line afterfin.entry
, viz.,format.annotate write$
The only entry type that's a bit special is the type
@misc
, since it's BibTeX's "catch-all" entry type. (Entry types that are not recognized, say because they've been mis-spelled by accident, are automatically treated as being of type@misc
.) Find the functionmisc
; it should be between the functionsmastersthesis
andphdthesis
. Note that this function's final two lines arefin.entry
empty.misc.check(Because
@misc
is the catch-all entry type, care must be taken if its contents are entirely empty.) In this case, insert the instructionformat.annotate write$
on a new blank line between these two lines, like so:fin.entry
format.annotate write$
empty.misc.check
Save the file
plainannotate.bst
, either in the directory where your main tex file is located, or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution.Start using the "new" bibliography style by providing the instruction
bibliographystyleplainannotate
. Be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.
Here's an MWE that puts it all together:
documentclassarticle
usepackagefilecontents
beginfilecontentsabcdef.bib
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = urlhttp://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research. The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so. The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and designing the algorithm itself.
endfilecontents
usepackage[numbers]natbib
bibliographystyleplainannotate
usepackage[hyphens]url
begindocument
citetJung11
bibliographyabcdef
enddocument
If it's the plain
bibliography style you wish to modify to enable it to print the contents of the annotate
field, you could proceed as follows:
Find the file
plain.bst
in your TeX distribution. Make a copy of this file, calling the copy (say)plainannotate.bst
. (Don't edit a file from the TeX distribution directly.)Open the file
plainannotate.bst
in a text editor. The editor you use to edit your tex files will do fine.First, you have to inform
plainannotate
that it's supposed to recognize fields namedannotate
. Near the very top of the file, find the structure namedENTRY
. Insert a blank line between "address" and "author", and insert the word "annotate" in the new line.Second, you have to inform the bibliography style (and BibTeX) what to do when it's told to process the contents of the
annotate
field. Find the definition of the functionformat.authors
(ca. line 215 in my copy of the file). After this function (and before the functionformat.editors
), insert the following lines of code:FUNCTION format.annotate
annotate empty$
""
" beginquotationnoindent "
annotate
* " endquotation " *
if$In case you're curious what this code does: It first checks if the
annotate
field is empty. If so, it prints nothing (""
). If it's non-empty, aquotation
environment is initiated, the contents of theannotate
field are written out, and thequotation
environment is closed.Third, we have to modify the functions
article
,book
, etc, which process the entries of type@article
,@book
, etc., and tell them that they're supposed to invoke the newly-created functionformat.annotate
at the end of each entry.Find the function
article
. (It should start on line 550 or so if you've been following the instructions so far.) After the line that saysfin.entry
, insert two new lines:format.annotate write$
newline$Next, find the function
book
. (It should be the function that immediately followsarticle
.) Guess what: After its final line, which is againfin.entry
, insert two more new lines, with the same contents as for the functionarticle
:format.annotate write$
newline$Ditto for the function
booklet
.For most of the remaining entry-formatting functions, viz.,
inbook
,incollection
,inproceedings
,manual
,mastersthesis
,phdthesis
,proceedings
,techreport
, andunpublished
, just add one extra line afterfin.entry
, viz.,format.annotate write$
The only entry type that's a bit special is the type
@misc
, since it's BibTeX's "catch-all" entry type. (Entry types that are not recognized, say because they've been mis-spelled by accident, are automatically treated as being of type@misc
.) Find the functionmisc
; it should be between the functionsmastersthesis
andphdthesis
. Note that this function's final two lines arefin.entry
empty.misc.check(Because
@misc
is the catch-all entry type, care must be taken if its contents are entirely empty.) In this case, insert the instructionformat.annotate write$
on a new blank line between these two lines, like so:fin.entry
format.annotate write$
empty.misc.check
Save the file
plainannotate.bst
, either in the directory where your main tex file is located, or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution.Start using the "new" bibliography style by providing the instruction
bibliographystyleplainannotate
. Be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.
Here's an MWE that puts it all together:
documentclassarticle
usepackagefilecontents
beginfilecontentsabcdef.bib
@MISCtJung11,
author = Jungblut, Thomas,
title = Ant Colony Optimization for TSP Problems,
month = Aug,
year = 2011,
howpublished = urlhttp://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html,
note = Accessed: 26-01-2015,
annotate = This Blog posted by Thomas Jungblut covers mutliple topics which are of high interest to the projects research. The information contained in the blog covers items like capitalising on multi-threading opportunities and how to efficiently do so. The underling calculations and evaluation procedures for each agent are also discussed. This is useful for modeling and designing the algorithm itself.
endfilecontents
usepackage[numbers]natbib
bibliographystyleplainannotate
usepackage[hyphens]url
begindocument
citetJung11
bibliographyabcdef
enddocument
answered Jan 29 '15 at 3:22
MicoMico
285k31388778
285k31388778
add a comment |
add a comment |
I know this problem and answer was completed 4 years ago, but I thought this extra bit of information may save someone else a few hours of hair pulling.
I just tried Mico's plain.bst modification and got a "You can't pop an empty literal stack for entry" error.
After battling with this problem for a while I found I had to add "annotate" to the list of ENTRY labels at the beginning of the modified .bst file to make it work properly... I hope this helps :)
New contributor
add a comment |
I know this problem and answer was completed 4 years ago, but I thought this extra bit of information may save someone else a few hours of hair pulling.
I just tried Mico's plain.bst modification and got a "You can't pop an empty literal stack for entry" error.
After battling with this problem for a while I found I had to add "annotate" to the list of ENTRY labels at the beginning of the modified .bst file to make it work properly... I hope this helps :)
New contributor
add a comment |
I know this problem and answer was completed 4 years ago, but I thought this extra bit of information may save someone else a few hours of hair pulling.
I just tried Mico's plain.bst modification and got a "You can't pop an empty literal stack for entry" error.
After battling with this problem for a while I found I had to add "annotate" to the list of ENTRY labels at the beginning of the modified .bst file to make it work properly... I hope this helps :)
New contributor
I know this problem and answer was completed 4 years ago, but I thought this extra bit of information may save someone else a few hours of hair pulling.
I just tried Mico's plain.bst modification and got a "You can't pop an empty literal stack for entry" error.
After battling with this problem for a while I found I had to add "annotate" to the list of ENTRY labels at the beginning of the modified .bst file to make it work properly... I hope this helps :)
New contributor
New contributor
answered 18 mins ago
ynotaynota
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f225427%2fbibtex-style-which-shows-annotation-fields-and-employs-numeric-style-citation-ca%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Martin Schröder
Jan 28 '15 at 22:20
You could try with
biblatex
, which is relatively easy to customise and defines aurl
and anannotation
field.– Bernard
Jan 28 '15 at 23:40
I'd be much more easier to help if you produce a MWE with the relevant code.
– Ludenticus
Jan 28 '15 at 23:46
On the other hand, if you need to print the annotate with another bibliography style, you'd better try biblatex
– Ludenticus
Jan 29 '15 at 0:02