Announcement

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

  • putdocx: table of contents and automated numbering

    Hi
    I am using putdocx to write a report. I'm using different headers for section levels and tables/figures. Two questions:
    1) is there a way of getting Stata to generate a table of contents, based on those headers? (I want to avoid having to do this in the Word document after it has been generated)
    2) is there a way of getting Stata to automatically number those sections, tables/figures?

    Many thanks in advance

  • #2
    The last time I went down this rabbit hole, Stata relied on Word to do these things. That is, you’ll need to add the TOC within Word. Perhaps you can use a preformatted Word file that has the heading styles and TOC customized to start with, but Stata doesn’t (yet) offer a direct command to do this the last I checked.

    Comment


    • #3
      thank you for the feedback! Sadly this is the conclusion that I had reached too about the TOC. I tried doing as you said about preformatting a Word document with a TOC at the top but then I still had to open the document and update the TOC in order to get it to appear properly (I was trying to avoid making edits after having output my Word program). Let's hope this is something that Stata works on for the future!

      Comment


      • #4
        I’ve tried similar things with several statistics and programming languages. I honestly think this is problem with how Word files are rendered rather than something Stata or some other software can do.

        Comment


        • #5
          I have a colleague who succeeded in R ...

          Comment

          Working...
          X