Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Writing a book

    Hi members. I wish to write a book with stata code chunks and results. what is the best processor to use to produce the dynamic book

  • #2
    I suppose there's more than way to do this, and one could argue we can't give you a definitive "best" answer. By dynamic book, I am assuming you don't mean typesetting for a physical book, for which the answer to that question would likely be LaTeX. You mention creating a dynamic book, but what does that mean precisely? Are you envisioning something like an IPython notebook where you can dynamically execute Stata code and see the results? Or do you mean a book that is really just a collection of static webpages showing code fragments and outputs, so not really "dynamic" per se?

    Comment


    • #3
      I do not have experience with books perse, but if you are using quarto, you could make "books" based on their formats.
      And if you combine them with nbstata (unofficial Stata Kernel), you can make it dynamic in the sense of updating results and figures when rendering the whole document.
      Im using that for my website, but have not tried much on papers, because it is not straight forward how to use scalars or values from Stata into Quarto environment. Tables and figures, however, would be easier to implement.
      As an additional point, you can render it all into Latex, if that is also part of the requirements.

      Comment


      • #4
        So as others have remarked, I use Quarto. this is my "book" of lecture notes for undergraduates, where I do include Stata code blocks.

        https://jgreathouse9.github.io/GSUmetricspolicy/

        Comment


        • #5
          Thanks Jared, could you kindly share a template that includes the stata code block especially on generating graphs. I tried Statamarkdown which worked but could not generate graphs

          Comment


          • #6
            FernandoRios has examples using nbstata to output graphs, such as: https://friosavila.github.io/stataviz/stataviz4.html For more, see: https://github.com/hugetim/nbstata/issues/37

            Comment

            Working...
            X