Announcement

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

  • Collect style putpdf - combined width option

    Hello all,

    I'm trying to create a table and embed it as part of a broader PDF document. After I create the table, I want to edit it so each column is properly sized (width) and the table itself is also not at 100% page width. Stata help file suggests that can be doable using collect style putpdf, the option width ("Any two of the types of width specifications can be combined."). Below is an example - any help is appreciated.

    Code:
    clear all
    set more off
    
    sysuse auto.dta
    
    putpdf begin
    putpdf paragraph, font("Arial")
    
    table foreign rep78, statistic(freq) statistic(sumw) statistic(percent, across(foreign)) sformat("%s%%" percent) nformat(%9.0f) totals(foreign)
    mat w  = (40, 10, 10, 10, 10, 10, 10)
    collect style putpdf, halign(left) width(80%) width(w)
    putpdf collect
    
    putpdf save test, replace
    Edit:
    I'm using Stata/SE 17.0 for Windows (64-bit x86-64)
    Revision 06 Apr 2022
    Last edited by Ozcan Tunalilar; 04 May 2022, 13:22. Reason: Stata version

  • #2
    In case anybody else faces this problem in the meantime: I reached out to Stata about this, and they confirmed that this is indeed a bug that will be fixed in a future update.

    Comment


    • #3
      Thank you Ozcan Tunalilar for the example code and the follow-up to the problem.
      Encountered your post just now and this was useful!
      Best, Sergiy

      Comment

      Working...
      X