LaTeX unable to parse the names of journals in my bib file due to backslash












0














I have downloaded various bibtex references from NASA ADS (the astrophysics article finding tool). They all refer to journal names with a backslash as if its a code. For example for an article from the Monthly Notices of the Royal Astronomical Society it says this:



journal = {mnras},


Unfortunately, LaTeX appears to be unable to handle this form of journal name. But since all the downloaded citations are the same, I'm assuming there must be a way for LaTeX to read this. If so, how can i do this?



PS. I am currently using the .bst file found in the following link to read in the references which I assume is where the issue lies: ftp://ftp.edpsciences.org/pub/aa/bibtex/aa.bst










share|improve this question




















  • 2




    Please see tex.stackexchange.com/q/366618/35864 you might also be interested in the rest of tex.stackexchange.com/q/386053/35864
    – moewe
    Dec 31 '18 at 17:42








  • 2




    What happens if you add the instruction providecommandmnras{Monthly Notices of the Royal Astronomical Society} to the preamble and recompile the document? More generally, do the undefined-macro-name error messages vanish if you (a) download and save the file aas_macros.sty from adsabs.harvard.edu/abs_doc/aas_macros.sty and (b) provide the instruction usepackage{aas_macros} in the preamble?
    – Mico
    Jan 1 at 1:42


















0














I have downloaded various bibtex references from NASA ADS (the astrophysics article finding tool). They all refer to journal names with a backslash as if its a code. For example for an article from the Monthly Notices of the Royal Astronomical Society it says this:



journal = {mnras},


Unfortunately, LaTeX appears to be unable to handle this form of journal name. But since all the downloaded citations are the same, I'm assuming there must be a way for LaTeX to read this. If so, how can i do this?



PS. I am currently using the .bst file found in the following link to read in the references which I assume is where the issue lies: ftp://ftp.edpsciences.org/pub/aa/bibtex/aa.bst










share|improve this question




















  • 2




    Please see tex.stackexchange.com/q/366618/35864 you might also be interested in the rest of tex.stackexchange.com/q/386053/35864
    – moewe
    Dec 31 '18 at 17:42








  • 2




    What happens if you add the instruction providecommandmnras{Monthly Notices of the Royal Astronomical Society} to the preamble and recompile the document? More generally, do the undefined-macro-name error messages vanish if you (a) download and save the file aas_macros.sty from adsabs.harvard.edu/abs_doc/aas_macros.sty and (b) provide the instruction usepackage{aas_macros} in the preamble?
    – Mico
    Jan 1 at 1:42
















0












0








0







I have downloaded various bibtex references from NASA ADS (the astrophysics article finding tool). They all refer to journal names with a backslash as if its a code. For example for an article from the Monthly Notices of the Royal Astronomical Society it says this:



journal = {mnras},


Unfortunately, LaTeX appears to be unable to handle this form of journal name. But since all the downloaded citations are the same, I'm assuming there must be a way for LaTeX to read this. If so, how can i do this?



PS. I am currently using the .bst file found in the following link to read in the references which I assume is where the issue lies: ftp://ftp.edpsciences.org/pub/aa/bibtex/aa.bst










share|improve this question















I have downloaded various bibtex references from NASA ADS (the astrophysics article finding tool). They all refer to journal names with a backslash as if its a code. For example for an article from the Monthly Notices of the Royal Astronomical Society it says this:



journal = {mnras},


Unfortunately, LaTeX appears to be unable to handle this form of journal name. But since all the downloaded citations are the same, I'm assuming there must be a way for LaTeX to read this. If so, how can i do this?



PS. I am currently using the .bst file found in the following link to read in the references which I assume is where the issue lies: ftp://ftp.edpsciences.org/pub/aa/bibtex/aa.bst







macros bibliographies bibtex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 1:48









Mico

274k30371758




274k30371758










asked Dec 31 '18 at 17:32









Owen JaquesOwen Jaques

1




1








  • 2




    Please see tex.stackexchange.com/q/366618/35864 you might also be interested in the rest of tex.stackexchange.com/q/386053/35864
    – moewe
    Dec 31 '18 at 17:42








  • 2




    What happens if you add the instruction providecommandmnras{Monthly Notices of the Royal Astronomical Society} to the preamble and recompile the document? More generally, do the undefined-macro-name error messages vanish if you (a) download and save the file aas_macros.sty from adsabs.harvard.edu/abs_doc/aas_macros.sty and (b) provide the instruction usepackage{aas_macros} in the preamble?
    – Mico
    Jan 1 at 1:42
















  • 2




    Please see tex.stackexchange.com/q/366618/35864 you might also be interested in the rest of tex.stackexchange.com/q/386053/35864
    – moewe
    Dec 31 '18 at 17:42








  • 2




    What happens if you add the instruction providecommandmnras{Monthly Notices of the Royal Astronomical Society} to the preamble and recompile the document? More generally, do the undefined-macro-name error messages vanish if you (a) download and save the file aas_macros.sty from adsabs.harvard.edu/abs_doc/aas_macros.sty and (b) provide the instruction usepackage{aas_macros} in the preamble?
    – Mico
    Jan 1 at 1:42










2




2




Please see tex.stackexchange.com/q/366618/35864 you might also be interested in the rest of tex.stackexchange.com/q/386053/35864
– moewe
Dec 31 '18 at 17:42






Please see tex.stackexchange.com/q/366618/35864 you might also be interested in the rest of tex.stackexchange.com/q/386053/35864
– moewe
Dec 31 '18 at 17:42






2




2




What happens if you add the instruction providecommandmnras{Monthly Notices of the Royal Astronomical Society} to the preamble and recompile the document? More generally, do the undefined-macro-name error messages vanish if you (a) download and save the file aas_macros.sty from adsabs.harvard.edu/abs_doc/aas_macros.sty and (b) provide the instruction usepackage{aas_macros} in the preamble?
– Mico
Jan 1 at 1:42






What happens if you add the instruction providecommandmnras{Monthly Notices of the Royal Astronomical Society} to the preamble and recompile the document? More generally, do the undefined-macro-name error messages vanish if you (a) download and save the file aas_macros.sty from adsabs.harvard.edu/abs_doc/aas_macros.sty and (b) provide the instruction usepackage{aas_macros} in the preamble?
– Mico
Jan 1 at 1:42












1 Answer
1






active

oldest

votes


















3














Welcome to TeX.SE!



BibTeX basically works by reading the .bib and handled using the .bst-file. Bib(La)TeX then creates a LaTeX file (with a .bbl extention) based on the .bst files instructions, commonly consisting of a thebibliography environment with a lot of bibitems. The .bst-file for example tells BibTeX that the journal entry should be included in the thebibliography environment.



If then there is this undefined control sequence mnras in the journal entry, then LaTeX is going to complain when the .bbl file is included.



As the NASA ADS FAQ says:




Please note that our BibTeX entries make use of the AASTeX macro definitions for the most popular astronomical journal. If you're not using the AASTeX package then you will need to include these macros in your LaTeX source.




In short all you have to do is download the contents this file, save it as aas_macros.sty and then write usepackage{aas_macros} in your preamble.





In the "general" case of fixing this for empirical errors I suspect the easiest course of action would be, as @mico suggests in the comments, to just define the undefined control sequence to what you want it to show e.g. providecommandmnras{Monthly Notices of the Royal Astronomical Society}. (providecommand is like a newcommand but just doesn't do anything if the command already exists).



if you want the actual backslash to show, as the question title suggests, then you'd escape said backslashes using e.g. textbackslash; for example replace mnras with textbackslash mnras. In this case it would show literally "mnras" in your references text.



If you want to redefine how backslash behaves in bibtex, you're in for quite an adventure, and you'd might want to dedicate a day or two to do so.






share|improve this answer























    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%2f468056%2flatex-unable-to-parse-the-names-of-journals-in-my-bib-file-due-to-backslash%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









    3














    Welcome to TeX.SE!



    BibTeX basically works by reading the .bib and handled using the .bst-file. Bib(La)TeX then creates a LaTeX file (with a .bbl extention) based on the .bst files instructions, commonly consisting of a thebibliography environment with a lot of bibitems. The .bst-file for example tells BibTeX that the journal entry should be included in the thebibliography environment.



    If then there is this undefined control sequence mnras in the journal entry, then LaTeX is going to complain when the .bbl file is included.



    As the NASA ADS FAQ says:




    Please note that our BibTeX entries make use of the AASTeX macro definitions for the most popular astronomical journal. If you're not using the AASTeX package then you will need to include these macros in your LaTeX source.




    In short all you have to do is download the contents this file, save it as aas_macros.sty and then write usepackage{aas_macros} in your preamble.





    In the "general" case of fixing this for empirical errors I suspect the easiest course of action would be, as @mico suggests in the comments, to just define the undefined control sequence to what you want it to show e.g. providecommandmnras{Monthly Notices of the Royal Astronomical Society}. (providecommand is like a newcommand but just doesn't do anything if the command already exists).



    if you want the actual backslash to show, as the question title suggests, then you'd escape said backslashes using e.g. textbackslash; for example replace mnras with textbackslash mnras. In this case it would show literally "mnras" in your references text.



    If you want to redefine how backslash behaves in bibtex, you're in for quite an adventure, and you'd might want to dedicate a day or two to do so.






    share|improve this answer




























      3














      Welcome to TeX.SE!



      BibTeX basically works by reading the .bib and handled using the .bst-file. Bib(La)TeX then creates a LaTeX file (with a .bbl extention) based on the .bst files instructions, commonly consisting of a thebibliography environment with a lot of bibitems. The .bst-file for example tells BibTeX that the journal entry should be included in the thebibliography environment.



      If then there is this undefined control sequence mnras in the journal entry, then LaTeX is going to complain when the .bbl file is included.



      As the NASA ADS FAQ says:




      Please note that our BibTeX entries make use of the AASTeX macro definitions for the most popular astronomical journal. If you're not using the AASTeX package then you will need to include these macros in your LaTeX source.




      In short all you have to do is download the contents this file, save it as aas_macros.sty and then write usepackage{aas_macros} in your preamble.





      In the "general" case of fixing this for empirical errors I suspect the easiest course of action would be, as @mico suggests in the comments, to just define the undefined control sequence to what you want it to show e.g. providecommandmnras{Monthly Notices of the Royal Astronomical Society}. (providecommand is like a newcommand but just doesn't do anything if the command already exists).



      if you want the actual backslash to show, as the question title suggests, then you'd escape said backslashes using e.g. textbackslash; for example replace mnras with textbackslash mnras. In this case it would show literally "mnras" in your references text.



      If you want to redefine how backslash behaves in bibtex, you're in for quite an adventure, and you'd might want to dedicate a day or two to do so.






      share|improve this answer


























        3












        3








        3






        Welcome to TeX.SE!



        BibTeX basically works by reading the .bib and handled using the .bst-file. Bib(La)TeX then creates a LaTeX file (with a .bbl extention) based on the .bst files instructions, commonly consisting of a thebibliography environment with a lot of bibitems. The .bst-file for example tells BibTeX that the journal entry should be included in the thebibliography environment.



        If then there is this undefined control sequence mnras in the journal entry, then LaTeX is going to complain when the .bbl file is included.



        As the NASA ADS FAQ says:




        Please note that our BibTeX entries make use of the AASTeX macro definitions for the most popular astronomical journal. If you're not using the AASTeX package then you will need to include these macros in your LaTeX source.




        In short all you have to do is download the contents this file, save it as aas_macros.sty and then write usepackage{aas_macros} in your preamble.





        In the "general" case of fixing this for empirical errors I suspect the easiest course of action would be, as @mico suggests in the comments, to just define the undefined control sequence to what you want it to show e.g. providecommandmnras{Monthly Notices of the Royal Astronomical Society}. (providecommand is like a newcommand but just doesn't do anything if the command already exists).



        if you want the actual backslash to show, as the question title suggests, then you'd escape said backslashes using e.g. textbackslash; for example replace mnras with textbackslash mnras. In this case it would show literally "mnras" in your references text.



        If you want to redefine how backslash behaves in bibtex, you're in for quite an adventure, and you'd might want to dedicate a day or two to do so.






        share|improve this answer














        Welcome to TeX.SE!



        BibTeX basically works by reading the .bib and handled using the .bst-file. Bib(La)TeX then creates a LaTeX file (with a .bbl extention) based on the .bst files instructions, commonly consisting of a thebibliography environment with a lot of bibitems. The .bst-file for example tells BibTeX that the journal entry should be included in the thebibliography environment.



        If then there is this undefined control sequence mnras in the journal entry, then LaTeX is going to complain when the .bbl file is included.



        As the NASA ADS FAQ says:




        Please note that our BibTeX entries make use of the AASTeX macro definitions for the most popular astronomical journal. If you're not using the AASTeX package then you will need to include these macros in your LaTeX source.




        In short all you have to do is download the contents this file, save it as aas_macros.sty and then write usepackage{aas_macros} in your preamble.





        In the "general" case of fixing this for empirical errors I suspect the easiest course of action would be, as @mico suggests in the comments, to just define the undefined control sequence to what you want it to show e.g. providecommandmnras{Monthly Notices of the Royal Astronomical Society}. (providecommand is like a newcommand but just doesn't do anything if the command already exists).



        if you want the actual backslash to show, as the question title suggests, then you'd escape said backslashes using e.g. textbackslash; for example replace mnras with textbackslash mnras. In this case it would show literally "mnras" in your references text.



        If you want to redefine how backslash behaves in bibtex, you're in for quite an adventure, and you'd might want to dedicate a day or two to do so.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 1 at 14:16

























        answered Jan 1 at 10:41









        Andreas Storvik StraumanAndreas Storvik Strauman

        2,528418




        2,528418






























            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%2f468056%2flatex-unable-to-parse-the-names-of-journals-in-my-bib-file-due-to-backslash%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

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?