Citation List: Putting edition, volume, pages together in parentheses












1














I'm trying to customize a .bst file, and I'm in desperate need of some assistance.



I have a citation that looks like this:
citation



After the title of the book, I'm trying to put parentheses around the edition, volume, number, and pages. I am able to do each individually [e.g., (Vol. 14), (pp. 207-262)] but not around everything in one set of parentheses [i.e., (Vol. 14, pp. 207-262)].



This reference is an "incollection".



Also, is there anyway to suppress the comma the occurs before?



So that it looks like this:
... Advances in research and theory (Vol. 14, pp. 207-262). New York: Academic Press.



FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check

format.edition output
format.bvolume output
format.number.series output
format.chapter.pages output

new.sentence
format.publisher.address output
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
format.note output
fin.entry
}


And here's my .bst file in its entirety: https://pastebin.com/ZQNx0P9U (Was too long to post here.)



And here's the .bib entry:



@incollection{RaaiShif80,
Address = {New York},
Author = {Raaijmakers, J. G. W. and Shiffrin, R. M.},
Booktitle = {The psychology of learning and motivation: Advances in research and theory},
Date-Added = {2014-09-10 12:47:36 +0000},
Date-Modified = {2014-09-10 12:47:54 +0000},
Editor = {G. H. Bower},
Pages = {207-262},
Publisher = {Academic Press},
Title = {{SAM: A} theory of probabilistic search of associative memory},
Volume = {14},
Year = {1980}}


And a sample .tex file:
documentclass{article}
usepackage[english]{babel}



begin{document}

section*{Sample Citation}

This is a sample citation: cite{RaaiShif80}.

bibliographystyle{mybst.bst}
bibliography{sample}

end{document}


Thanks for your help!










share|improve this question
























  • Welcome to TeX SX! You've tagged this post as biblatex, but you don't seem to use it. Could you post a full, yet minimal, compilable code?
    – Bernard
    Jul 25 at 18:09












  • I've edited my post. Thanks!
    – Mitchell U.
    Jul 25 at 18:26










  • It would be easier to do with biblatex – at least for me.
    – Bernard
    Jul 25 at 18:32










  • You need to modify the functions format.bvolume and format.chapter.pages, to place parentheses around their respective contents. Since you haven't revealed how these functions are defined, it's not possible to give specific advice for now on how you might go about achieving your formatting objective.
    – Mico
    Jul 25 at 21:07












  • Hi Mico, thanks for looking into this. I did post my .bst file in its entirety at: pastebin.com/ZQNx0P9U It was too long for the character limit of the post. Wouldn't altering these functions put parentheses around the items individually and not collectively?
    – Mitchell U.
    Jul 26 at 12:43
















1














I'm trying to customize a .bst file, and I'm in desperate need of some assistance.



I have a citation that looks like this:
citation



After the title of the book, I'm trying to put parentheses around the edition, volume, number, and pages. I am able to do each individually [e.g., (Vol. 14), (pp. 207-262)] but not around everything in one set of parentheses [i.e., (Vol. 14, pp. 207-262)].



This reference is an "incollection".



Also, is there anyway to suppress the comma the occurs before?



So that it looks like this:
... Advances in research and theory (Vol. 14, pp. 207-262). New York: Academic Press.



FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check

format.edition output
format.bvolume output
format.number.series output
format.chapter.pages output

new.sentence
format.publisher.address output
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
format.note output
fin.entry
}


And here's my .bst file in its entirety: https://pastebin.com/ZQNx0P9U (Was too long to post here.)



And here's the .bib entry:



@incollection{RaaiShif80,
Address = {New York},
Author = {Raaijmakers, J. G. W. and Shiffrin, R. M.},
Booktitle = {The psychology of learning and motivation: Advances in research and theory},
Date-Added = {2014-09-10 12:47:36 +0000},
Date-Modified = {2014-09-10 12:47:54 +0000},
Editor = {G. H. Bower},
Pages = {207-262},
Publisher = {Academic Press},
Title = {{SAM: A} theory of probabilistic search of associative memory},
Volume = {14},
Year = {1980}}


And a sample .tex file:
documentclass{article}
usepackage[english]{babel}



begin{document}

section*{Sample Citation}

This is a sample citation: cite{RaaiShif80}.

bibliographystyle{mybst.bst}
bibliography{sample}

end{document}


Thanks for your help!










share|improve this question
























  • Welcome to TeX SX! You've tagged this post as biblatex, but you don't seem to use it. Could you post a full, yet minimal, compilable code?
    – Bernard
    Jul 25 at 18:09












  • I've edited my post. Thanks!
    – Mitchell U.
    Jul 25 at 18:26










  • It would be easier to do with biblatex – at least for me.
    – Bernard
    Jul 25 at 18:32










  • You need to modify the functions format.bvolume and format.chapter.pages, to place parentheses around their respective contents. Since you haven't revealed how these functions are defined, it's not possible to give specific advice for now on how you might go about achieving your formatting objective.
    – Mico
    Jul 25 at 21:07












  • Hi Mico, thanks for looking into this. I did post my .bst file in its entirety at: pastebin.com/ZQNx0P9U It was too long for the character limit of the post. Wouldn't altering these functions put parentheses around the items individually and not collectively?
    – Mitchell U.
    Jul 26 at 12:43














1












1








1







I'm trying to customize a .bst file, and I'm in desperate need of some assistance.



I have a citation that looks like this:
citation



After the title of the book, I'm trying to put parentheses around the edition, volume, number, and pages. I am able to do each individually [e.g., (Vol. 14), (pp. 207-262)] but not around everything in one set of parentheses [i.e., (Vol. 14, pp. 207-262)].



This reference is an "incollection".



Also, is there anyway to suppress the comma the occurs before?



So that it looks like this:
... Advances in research and theory (Vol. 14, pp. 207-262). New York: Academic Press.



FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check

format.edition output
format.bvolume output
format.number.series output
format.chapter.pages output

new.sentence
format.publisher.address output
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
format.note output
fin.entry
}


And here's my .bst file in its entirety: https://pastebin.com/ZQNx0P9U (Was too long to post here.)



And here's the .bib entry:



@incollection{RaaiShif80,
Address = {New York},
Author = {Raaijmakers, J. G. W. and Shiffrin, R. M.},
Booktitle = {The psychology of learning and motivation: Advances in research and theory},
Date-Added = {2014-09-10 12:47:36 +0000},
Date-Modified = {2014-09-10 12:47:54 +0000},
Editor = {G. H. Bower},
Pages = {207-262},
Publisher = {Academic Press},
Title = {{SAM: A} theory of probabilistic search of associative memory},
Volume = {14},
Year = {1980}}


And a sample .tex file:
documentclass{article}
usepackage[english]{babel}



begin{document}

section*{Sample Citation}

This is a sample citation: cite{RaaiShif80}.

bibliographystyle{mybst.bst}
bibliography{sample}

end{document}


Thanks for your help!










share|improve this question















I'm trying to customize a .bst file, and I'm in desperate need of some assistance.



I have a citation that looks like this:
citation



After the title of the book, I'm trying to put parentheses around the edition, volume, number, and pages. I am able to do each individually [e.g., (Vol. 14), (pp. 207-262)] but not around everything in one set of parentheses [i.e., (Vol. 14, pp. 207-262)].



This reference is an "incollection".



Also, is there anyway to suppress the comma the occurs before?



So that it looks like this:
... Advances in research and theory (Vol. 14, pp. 207-262). New York: Academic Press.



FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check

format.edition output
format.bvolume output
format.number.series output
format.chapter.pages output

new.sentence
format.publisher.address output
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
format.note output
fin.entry
}


And here's my .bst file in its entirety: https://pastebin.com/ZQNx0P9U (Was too long to post here.)



And here's the .bib entry:



@incollection{RaaiShif80,
Address = {New York},
Author = {Raaijmakers, J. G. W. and Shiffrin, R. M.},
Booktitle = {The psychology of learning and motivation: Advances in research and theory},
Date-Added = {2014-09-10 12:47:36 +0000},
Date-Modified = {2014-09-10 12:47:54 +0000},
Editor = {G. H. Bower},
Pages = {207-262},
Publisher = {Academic Press},
Title = {{SAM: A} theory of probabilistic search of associative memory},
Volume = {14},
Year = {1980}}


And a sample .tex file:
documentclass{article}
usepackage[english]{babel}



begin{document}

section*{Sample Citation}

This is a sample citation: cite{RaaiShif80}.

bibliographystyle{mybst.bst}
bibliography{sample}

end{document}


Thanks for your help!







bibliographies bibtex citing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 25 at 19:49

























asked Jul 25 at 18:04









Mitchell U.

62




62












  • Welcome to TeX SX! You've tagged this post as biblatex, but you don't seem to use it. Could you post a full, yet minimal, compilable code?
    – Bernard
    Jul 25 at 18:09












  • I've edited my post. Thanks!
    – Mitchell U.
    Jul 25 at 18:26










  • It would be easier to do with biblatex – at least for me.
    – Bernard
    Jul 25 at 18:32










  • You need to modify the functions format.bvolume and format.chapter.pages, to place parentheses around their respective contents. Since you haven't revealed how these functions are defined, it's not possible to give specific advice for now on how you might go about achieving your formatting objective.
    – Mico
    Jul 25 at 21:07












  • Hi Mico, thanks for looking into this. I did post my .bst file in its entirety at: pastebin.com/ZQNx0P9U It was too long for the character limit of the post. Wouldn't altering these functions put parentheses around the items individually and not collectively?
    – Mitchell U.
    Jul 26 at 12:43


















  • Welcome to TeX SX! You've tagged this post as biblatex, but you don't seem to use it. Could you post a full, yet minimal, compilable code?
    – Bernard
    Jul 25 at 18:09












  • I've edited my post. Thanks!
    – Mitchell U.
    Jul 25 at 18:26










  • It would be easier to do with biblatex – at least for me.
    – Bernard
    Jul 25 at 18:32










  • You need to modify the functions format.bvolume and format.chapter.pages, to place parentheses around their respective contents. Since you haven't revealed how these functions are defined, it's not possible to give specific advice for now on how you might go about achieving your formatting objective.
    – Mico
    Jul 25 at 21:07












  • Hi Mico, thanks for looking into this. I did post my .bst file in its entirety at: pastebin.com/ZQNx0P9U It was too long for the character limit of the post. Wouldn't altering these functions put parentheses around the items individually and not collectively?
    – Mitchell U.
    Jul 26 at 12:43
















Welcome to TeX SX! You've tagged this post as biblatex, but you don't seem to use it. Could you post a full, yet minimal, compilable code?
– Bernard
Jul 25 at 18:09






Welcome to TeX SX! You've tagged this post as biblatex, but you don't seem to use it. Could you post a full, yet minimal, compilable code?
– Bernard
Jul 25 at 18:09














I've edited my post. Thanks!
– Mitchell U.
Jul 25 at 18:26




I've edited my post. Thanks!
– Mitchell U.
Jul 25 at 18:26












It would be easier to do with biblatex – at least for me.
– Bernard
Jul 25 at 18:32




It would be easier to do with biblatex – at least for me.
– Bernard
Jul 25 at 18:32












You need to modify the functions format.bvolume and format.chapter.pages, to place parentheses around their respective contents. Since you haven't revealed how these functions are defined, it's not possible to give specific advice for now on how you might go about achieving your formatting objective.
– Mico
Jul 25 at 21:07






You need to modify the functions format.bvolume and format.chapter.pages, to place parentheses around their respective contents. Since you haven't revealed how these functions are defined, it's not possible to give specific advice for now on how you might go about achieving your formatting objective.
– Mico
Jul 25 at 21:07














Hi Mico, thanks for looking into this. I did post my .bst file in its entirety at: pastebin.com/ZQNx0P9U It was too long for the character limit of the post. Wouldn't altering these functions put parentheses around the items individually and not collectively?
– Mitchell U.
Jul 26 at 12:43




Hi Mico, thanks for looking into this. I did post my .bst file in its entirety at: pastebin.com/ZQNx0P9U It was too long for the character limit of the post. Wouldn't altering these functions put parentheses around the items individually and not collectively?
– Mitchell U.
Jul 26 at 12:43










1 Answer
1






active

oldest

votes


















0














I have the same problem so first I create this function



FUNCTION {parens}


{ duplicate$ empty$
{ pop$ "" }
{ "(" swap$ * ")" * }
if$
}






share|improve this answer








New contributor




Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f443194%2fcitation-list-putting-edition-volume-pages-together-in-parentheses%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I have the same problem so first I create this function



    FUNCTION {parens}


    { duplicate$ empty$
    { pop$ "" }
    { "(" swap$ * ")" * }
    if$
    }






    share|improve this answer








    New contributor




    Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0














      I have the same problem so first I create this function



      FUNCTION {parens}


      { duplicate$ empty$
      { pop$ "" }
      { "(" swap$ * ")" * }
      if$
      }






      share|improve this answer








      New contributor




      Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















        0












        0








        0






        I have the same problem so first I create this function



        FUNCTION {parens}


        { duplicate$ empty$
        { pop$ "" }
        { "(" swap$ * ")" * }
        if$
        }






        share|improve this answer








        New contributor




        Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        I have the same problem so first I create this function



        FUNCTION {parens}


        { duplicate$ empty$
        { pop$ "" }
        { "(" swap$ * ")" * }
        if$
        }







        share|improve this answer








        New contributor




        Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 14 mins ago









        Lina Maria Castillo Martin

        1




        1




        New contributor




        Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Lina Maria Castillo Martin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f443194%2fcitation-list-putting-edition-volume-pages-together-in-parentheses%23new-answer', 'question_page');
            }
            );

            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







            Popular posts from this blog

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio