Announcement

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

  • Can we set estab output the tables for rtf with landscape view?

    Can we set estab output the tables for rtf with landscape view?
    Do we have such option?

  • #2
    If I understand your question, there is no such option.

    As a hack, you can manually modify the prehead() option.

    Start by running:

    Code:
    esttab . using lscape.rtf, noisily
    Identify the prehead() option and add `"\lndscpsxn\pgwsxn16840\pghsxn11901"' before the closing `"{"'. The prehead() contents depend a little bit on your configuration, so I can't tell you what they would be on your computer.

    Code:
    esttab . using lscape.rtf, prehead(`"{\rtf1\mac\deff0 {\fonttbl\f0\fnil Times New Roman;}"' `"{\info {\author .}{\company .}{\title .}{\creatim\yr2022\mo4\dy7\hr11\min21}}"' `"\deflang1033\plain\fs24"' `"{\footer\pard\qc\plain\f0\fs24\chpgn\par}"' `"\lndscpsxn\pgwsxn16840\pghsxn11901"' `"{"')
    Note that not all software that reads RTFs will understand RTF's landscape mode. It seems that Word on macOS basically understood it, but TextEdit did not.

    Comment


    • #3
      Thanks so much! It works.

      Comment


      • #4
        Here is an alternative approach that might be slightly more convenient. In the RTF header written by esttab there is a line that reads \deflang1033\plain\fs24; you can attach extra formatting commands this line using the substitute() option. Example:

        Code:
        sysuse auto
        reg price weight foreign
        est sto m1
        local hook "\deflang1033\plain\fs24"
        local pfmt "\paperw15840\paperh12240\landscape" // US letter
        esttab m1 m1 m1 using ~/exampleUS.rtf, replace wide ///
           substitute("`hook'" "`hook'`pfmt'")
        local pfmt "\paperw16834\paperh11909\landscape" // AA
        esttab m1 m1 m1 using ~/exampleA4.rtf, replace wide ///
           substitute("`hook'" "`hook'`pfmt'")
        ben

        Comment

        Working...
        X