Announcement

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

  • Stata Markdown: the -stmd- package from SSC

    The -stmd- package is now available from SSC. Thank you, Kit.

    The -stmd- command takes a text document, converts the dynamic Stata code to Markdown, and then converts the Markdown to it's final HTML format.

    The package includes dialogs and menu entries for -stmd-, as well as -markdown-, -dyndoc-, and -dyntext-.

    Documents are written in the same style as -markstat-, with Stata code written in fenced code blocks embedded within Markdown (in contrast to -markdoc- and
    -webdoc-, which embed Markdown text within do file comments).

    What sets -stmd- apart from -markstat- is that it does not require installing other software and other packages - it is built upon Stata's -dyndoc- command ... so it requires Stata 15 or higher.

    With the installation of Pandoc and a LaTeX compiler, the same range of output formats available with -markstat- is possible with -stmd-.

    In Stata, try
    Code:
    ssc describe stmd
    Last edited by Doug Hemken; 11 Feb 2019, 10:14.
    Doug Hemken
    SSCC, Univ. of Wisc.-Madison

  • #2
    Regarding using pandoc to produce latex and word documents, could you elaborate on how this is done? I have attempted it by changing the filename extension to docx or pdf (e.g., saving(somefile.docx)) and it fails as I describe in more detail on your github site for this package: https://github.com/Hemken/stmd/issues/1

    Comment


    • #3
      I have a problem saving a file as .stmd.

      I have already installed 'markstat' 'whereis' and 'stmd' via ssc and executed the necessary 'whereis pandoc "...\pandox.exe"' command.

      I have already tried to save a do-file with the name 'test.stmd' , but then the ending '.do' remains ('test.stmd.do').
      I have also tried to save a do-file as '.md' ('test.md') / ('test.stmd.md').
      While saving, in the file type selection, I only have '.ado', '.dct', '.md', '.mata', '.py', '.stbcal', and 'sthlp' but not '.stmd' to choose from.
      Also the input of 'stmd test.stmd' or 'stmd test' or 'stmd test.stmd, saving(test.docx) replace' does not work, because Stata does not find the stmd file (obviously).

      I tried to look this problem up everywhere and I also watched all the youtube tutorials, but noone seems to share this problem.

      If someone knows how to solve the problem, I'd be very grateful.



      Comment


      • #4
        To save the file, try using the file name "test.stmd" and include the quotes.

        To process the file with the non-stmd file extension try

        Code:
        stmd test.stmd.do
        Doug Hemken
        SSCC, Univ. of Wisc.-Madison

        Comment

        Working...
        X