Using BibLaTeX for D&D

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I'm going to start writing my D&D campaigns in latex because I'm more comfortable with it than Microsoft Word. I also want to use biblatex to make references for monsters used throughout, like this:



@monster skeleton,
name = Skeleton,
size = medium,
alignment = lawful evil,
ac = 13,
hp = 13 (2d8+4),
speed = 30ft,
blah blah blah...



So that I could say Something something skeletonciteskeleton and click on citation to quickly see a stat block. Yes I am a genius.



Is there a way to put something in some files somewhere so that would enable latex to understand what I'm trying to do?










share|improve this question









New contributor




C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    3
    down vote

    favorite












    I'm going to start writing my D&D campaigns in latex because I'm more comfortable with it than Microsoft Word. I also want to use biblatex to make references for monsters used throughout, like this:



    @monster skeleton,
    name = Skeleton,
    size = medium,
    alignment = lawful evil,
    ac = 13,
    hp = 13 (2d8+4),
    speed = 30ft,
    blah blah blah...



    So that I could say Something something skeletonciteskeleton and click on citation to quickly see a stat block. Yes I am a genius.



    Is there a way to put something in some files somewhere so that would enable latex to understand what I'm trying to do?










    share|improve this question









    New contributor




    C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I'm going to start writing my D&D campaigns in latex because I'm more comfortable with it than Microsoft Word. I also want to use biblatex to make references for monsters used throughout, like this:



      @monster skeleton,
      name = Skeleton,
      size = medium,
      alignment = lawful evil,
      ac = 13,
      hp = 13 (2d8+4),
      speed = 30ft,
      blah blah blah...



      So that I could say Something something skeletonciteskeleton and click on citation to quickly see a stat block. Yes I am a genius.



      Is there a way to put something in some files somewhere so that would enable latex to understand what I'm trying to do?










      share|improve this question









      New contributor




      C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'm going to start writing my D&D campaigns in latex because I'm more comfortable with it than Microsoft Word. I also want to use biblatex to make references for monsters used throughout, like this:



      @monster skeleton,
      name = Skeleton,
      size = medium,
      alignment = lawful evil,
      ac = 13,
      hp = 13 (2d8+4),
      speed = 30ft,
      blah blah blah...



      So that I could say Something something skeletonciteskeleton and click on citation to quickly see a stat block. Yes I am a genius.



      Is there a way to put something in some files somewhere so that would enable latex to understand what I'm trying to do?







      biblatex






      share|improve this question









      New contributor




      C. Ryan-Smith 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 question









      New contributor




      C. Ryan-Smith 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 question




      share|improve this question








      edited 2 hours ago









      TeXnician

      21.2k52882




      21.2k52882






      New contributor




      C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      C. Ryan-Smith

      162




      162




      New contributor




      C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      C. Ryan-Smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote













          It is possible to do this with biblatex (people have done all sorts already: https://www.tug.org/TUGboat/tb35-3/tb111fischer.pdf), but this might not be the most comfortable way to deal with this. biblatex offers a lot of things you won't need and it might be complicated to redefine and opt out of certain things you don't want and get the things you'd like to have instead. In particular it could be painful to obtain a tabular stats block.



          There are other tools that can read in data and display it according to your wishes. datatool comes to mind, but Lua (of LuaLaTeX fame) could also offer you some possibilities.



          Have a look at How can I create entirely new data types with BibLaTeX/Biber? for the details of defining a new entry type and its driver.



          RequirePackagefilecontents
          beginfilecontents*jobname.bib
          @monstergazebo,
          name = Gazebo,
          size = large,
          alignment = lawful evil,
          ac = 13,
          hp = 13 (2d8+4),
          speed = 5ft,

          endfilecontents*
          beginfilecontentsdnd.dbx
          DeclareDatamodelEntrytypesmonster
          DeclareDatamodelFields[type=field,datatype=literal]
          name,
          size,
          alignment,
          ac,
          hp,
          speed,

          DeclareDatamodelEntryfields[monster]
          name,
          size,
          alignment,
          ac,
          hp,
          speed,

          endfilecontents
          documentclass[english]article
          usepackagebabel
          usepackagecsquotes
          usepackage[datamodel=dnd,style=authoryear,backend=biber]biblatex
          usepackagehyperref
          addbibresourcejobname.bib

          DeclareFieldFormatalignmentmkbibparens#1

          DeclareFieldFormatacACspace#1
          DeclareFieldFormathp#1addspace HP
          DeclareFieldFormatspeedSpeedaddcolonspace#1

          DeclareBibliographyDrivermonster%
          usebibmacrobibindex%
          usebibmacrobegentry%
          printfieldname%
          setunitaddspace%
          printfieldalignment%
          newunitnewblock
          printfieldsize%
          newunitnewblock
          printfieldac%
          newunitnewblock
          printfieldhp%
          newunitnewblock
          printfieldspeed%
          newunitnewblock
          usebibmacrofinentry

          renewbibmacro*citeprintfield[bibhyperref]name

          begindocument
          Then Eric was attacked by a citegazebo

          printbibliography[title=Monsters]
          enddocument


          Then Eric was attacked by a Gazebo//(Heading)Monsters//Gazebo (lawful evil). large. AC 13. 13 (2d8+4) HP. Speed: 5ft.



          Depending on how interactive you'd like your document to be maybe PDF is not the right medium and you want a more dynamic HTML page instead? Markdown might be a lighter alternative to LaTeX markup when you don't need most of LaTeX's advanced (especially mathematical and general typographic) features.






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            C. Ryan-Smith is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f451730%2fusing-biblatex-for-dd%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote













            It is possible to do this with biblatex (people have done all sorts already: https://www.tug.org/TUGboat/tb35-3/tb111fischer.pdf), but this might not be the most comfortable way to deal with this. biblatex offers a lot of things you won't need and it might be complicated to redefine and opt out of certain things you don't want and get the things you'd like to have instead. In particular it could be painful to obtain a tabular stats block.



            There are other tools that can read in data and display it according to your wishes. datatool comes to mind, but Lua (of LuaLaTeX fame) could also offer you some possibilities.



            Have a look at How can I create entirely new data types with BibLaTeX/Biber? for the details of defining a new entry type and its driver.



            RequirePackagefilecontents
            beginfilecontents*jobname.bib
            @monstergazebo,
            name = Gazebo,
            size = large,
            alignment = lawful evil,
            ac = 13,
            hp = 13 (2d8+4),
            speed = 5ft,

            endfilecontents*
            beginfilecontentsdnd.dbx
            DeclareDatamodelEntrytypesmonster
            DeclareDatamodelFields[type=field,datatype=literal]
            name,
            size,
            alignment,
            ac,
            hp,
            speed,

            DeclareDatamodelEntryfields[monster]
            name,
            size,
            alignment,
            ac,
            hp,
            speed,

            endfilecontents
            documentclass[english]article
            usepackagebabel
            usepackagecsquotes
            usepackage[datamodel=dnd,style=authoryear,backend=biber]biblatex
            usepackagehyperref
            addbibresourcejobname.bib

            DeclareFieldFormatalignmentmkbibparens#1

            DeclareFieldFormatacACspace#1
            DeclareFieldFormathp#1addspace HP
            DeclareFieldFormatspeedSpeedaddcolonspace#1

            DeclareBibliographyDrivermonster%
            usebibmacrobibindex%
            usebibmacrobegentry%
            printfieldname%
            setunitaddspace%
            printfieldalignment%
            newunitnewblock
            printfieldsize%
            newunitnewblock
            printfieldac%
            newunitnewblock
            printfieldhp%
            newunitnewblock
            printfieldspeed%
            newunitnewblock
            usebibmacrofinentry

            renewbibmacro*citeprintfield[bibhyperref]name

            begindocument
            Then Eric was attacked by a citegazebo

            printbibliography[title=Monsters]
            enddocument


            Then Eric was attacked by a Gazebo//(Heading)Monsters//Gazebo (lawful evil). large. AC 13. 13 (2d8+4) HP. Speed: 5ft.



            Depending on how interactive you'd like your document to be maybe PDF is not the right medium and you want a more dynamic HTML page instead? Markdown might be a lighter alternative to LaTeX markup when you don't need most of LaTeX's advanced (especially mathematical and general typographic) features.






            share|improve this answer
























              up vote
              5
              down vote













              It is possible to do this with biblatex (people have done all sorts already: https://www.tug.org/TUGboat/tb35-3/tb111fischer.pdf), but this might not be the most comfortable way to deal with this. biblatex offers a lot of things you won't need and it might be complicated to redefine and opt out of certain things you don't want and get the things you'd like to have instead. In particular it could be painful to obtain a tabular stats block.



              There are other tools that can read in data and display it according to your wishes. datatool comes to mind, but Lua (of LuaLaTeX fame) could also offer you some possibilities.



              Have a look at How can I create entirely new data types with BibLaTeX/Biber? for the details of defining a new entry type and its driver.



              RequirePackagefilecontents
              beginfilecontents*jobname.bib
              @monstergazebo,
              name = Gazebo,
              size = large,
              alignment = lawful evil,
              ac = 13,
              hp = 13 (2d8+4),
              speed = 5ft,

              endfilecontents*
              beginfilecontentsdnd.dbx
              DeclareDatamodelEntrytypesmonster
              DeclareDatamodelFields[type=field,datatype=literal]
              name,
              size,
              alignment,
              ac,
              hp,
              speed,

              DeclareDatamodelEntryfields[monster]
              name,
              size,
              alignment,
              ac,
              hp,
              speed,

              endfilecontents
              documentclass[english]article
              usepackagebabel
              usepackagecsquotes
              usepackage[datamodel=dnd,style=authoryear,backend=biber]biblatex
              usepackagehyperref
              addbibresourcejobname.bib

              DeclareFieldFormatalignmentmkbibparens#1

              DeclareFieldFormatacACspace#1
              DeclareFieldFormathp#1addspace HP
              DeclareFieldFormatspeedSpeedaddcolonspace#1

              DeclareBibliographyDrivermonster%
              usebibmacrobibindex%
              usebibmacrobegentry%
              printfieldname%
              setunitaddspace%
              printfieldalignment%
              newunitnewblock
              printfieldsize%
              newunitnewblock
              printfieldac%
              newunitnewblock
              printfieldhp%
              newunitnewblock
              printfieldspeed%
              newunitnewblock
              usebibmacrofinentry

              renewbibmacro*citeprintfield[bibhyperref]name

              begindocument
              Then Eric was attacked by a citegazebo

              printbibliography[title=Monsters]
              enddocument


              Then Eric was attacked by a Gazebo//(Heading)Monsters//Gazebo (lawful evil). large. AC 13. 13 (2d8+4) HP. Speed: 5ft.



              Depending on how interactive you'd like your document to be maybe PDF is not the right medium and you want a more dynamic HTML page instead? Markdown might be a lighter alternative to LaTeX markup when you don't need most of LaTeX's advanced (especially mathematical and general typographic) features.






              share|improve this answer






















                up vote
                5
                down vote










                up vote
                5
                down vote









                It is possible to do this with biblatex (people have done all sorts already: https://www.tug.org/TUGboat/tb35-3/tb111fischer.pdf), but this might not be the most comfortable way to deal with this. biblatex offers a lot of things you won't need and it might be complicated to redefine and opt out of certain things you don't want and get the things you'd like to have instead. In particular it could be painful to obtain a tabular stats block.



                There are other tools that can read in data and display it according to your wishes. datatool comes to mind, but Lua (of LuaLaTeX fame) could also offer you some possibilities.



                Have a look at How can I create entirely new data types with BibLaTeX/Biber? for the details of defining a new entry type and its driver.



                RequirePackagefilecontents
                beginfilecontents*jobname.bib
                @monstergazebo,
                name = Gazebo,
                size = large,
                alignment = lawful evil,
                ac = 13,
                hp = 13 (2d8+4),
                speed = 5ft,

                endfilecontents*
                beginfilecontentsdnd.dbx
                DeclareDatamodelEntrytypesmonster
                DeclareDatamodelFields[type=field,datatype=literal]
                name,
                size,
                alignment,
                ac,
                hp,
                speed,

                DeclareDatamodelEntryfields[monster]
                name,
                size,
                alignment,
                ac,
                hp,
                speed,

                endfilecontents
                documentclass[english]article
                usepackagebabel
                usepackagecsquotes
                usepackage[datamodel=dnd,style=authoryear,backend=biber]biblatex
                usepackagehyperref
                addbibresourcejobname.bib

                DeclareFieldFormatalignmentmkbibparens#1

                DeclareFieldFormatacACspace#1
                DeclareFieldFormathp#1addspace HP
                DeclareFieldFormatspeedSpeedaddcolonspace#1

                DeclareBibliographyDrivermonster%
                usebibmacrobibindex%
                usebibmacrobegentry%
                printfieldname%
                setunitaddspace%
                printfieldalignment%
                newunitnewblock
                printfieldsize%
                newunitnewblock
                printfieldac%
                newunitnewblock
                printfieldhp%
                newunitnewblock
                printfieldspeed%
                newunitnewblock
                usebibmacrofinentry

                renewbibmacro*citeprintfield[bibhyperref]name

                begindocument
                Then Eric was attacked by a citegazebo

                printbibliography[title=Monsters]
                enddocument


                Then Eric was attacked by a Gazebo//(Heading)Monsters//Gazebo (lawful evil). large. AC 13. 13 (2d8+4) HP. Speed: 5ft.



                Depending on how interactive you'd like your document to be maybe PDF is not the right medium and you want a more dynamic HTML page instead? Markdown might be a lighter alternative to LaTeX markup when you don't need most of LaTeX's advanced (especially mathematical and general typographic) features.






                share|improve this answer












                It is possible to do this with biblatex (people have done all sorts already: https://www.tug.org/TUGboat/tb35-3/tb111fischer.pdf), but this might not be the most comfortable way to deal with this. biblatex offers a lot of things you won't need and it might be complicated to redefine and opt out of certain things you don't want and get the things you'd like to have instead. In particular it could be painful to obtain a tabular stats block.



                There are other tools that can read in data and display it according to your wishes. datatool comes to mind, but Lua (of LuaLaTeX fame) could also offer you some possibilities.



                Have a look at How can I create entirely new data types with BibLaTeX/Biber? for the details of defining a new entry type and its driver.



                RequirePackagefilecontents
                beginfilecontents*jobname.bib
                @monstergazebo,
                name = Gazebo,
                size = large,
                alignment = lawful evil,
                ac = 13,
                hp = 13 (2d8+4),
                speed = 5ft,

                endfilecontents*
                beginfilecontentsdnd.dbx
                DeclareDatamodelEntrytypesmonster
                DeclareDatamodelFields[type=field,datatype=literal]
                name,
                size,
                alignment,
                ac,
                hp,
                speed,

                DeclareDatamodelEntryfields[monster]
                name,
                size,
                alignment,
                ac,
                hp,
                speed,

                endfilecontents
                documentclass[english]article
                usepackagebabel
                usepackagecsquotes
                usepackage[datamodel=dnd,style=authoryear,backend=biber]biblatex
                usepackagehyperref
                addbibresourcejobname.bib

                DeclareFieldFormatalignmentmkbibparens#1

                DeclareFieldFormatacACspace#1
                DeclareFieldFormathp#1addspace HP
                DeclareFieldFormatspeedSpeedaddcolonspace#1

                DeclareBibliographyDrivermonster%
                usebibmacrobibindex%
                usebibmacrobegentry%
                printfieldname%
                setunitaddspace%
                printfieldalignment%
                newunitnewblock
                printfieldsize%
                newunitnewblock
                printfieldac%
                newunitnewblock
                printfieldhp%
                newunitnewblock
                printfieldspeed%
                newunitnewblock
                usebibmacrofinentry

                renewbibmacro*citeprintfield[bibhyperref]name

                begindocument
                Then Eric was attacked by a citegazebo

                printbibliography[title=Monsters]
                enddocument


                Then Eric was attacked by a Gazebo//(Heading)Monsters//Gazebo (lawful evil). large. AC 13. 13 (2d8+4) HP. Speed: 5ft.



                Depending on how interactive you'd like your document to be maybe PDF is not the right medium and you want a more dynamic HTML page instead? Markdown might be a lighter alternative to LaTeX markup when you don't need most of LaTeX's advanced (especially mathematical and general typographic) features.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 hours ago









                moewe

                75.9k797287




                75.9k797287




















                    C. Ryan-Smith is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    C. Ryan-Smith is a new contributor. Be nice, and check out our Code of Conduct.












                    C. Ryan-Smith is a new contributor. Be nice, and check out our Code of Conduct.











                    C. Ryan-Smith is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f451730%2fusing-biblatex-for-dd%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery