/* *! dyndoc dialog version 1.0.0, 24 July 2018, Doug Hemken, dehemken@wisc.edu *! for dyndoc version 1.0.1, 26 March 2018, Hua Peng, StataCorp Stata Dyndoc ------------ dyndoc filename [ , saving(filename2) replace hardwrap noremove nomsg nostop ] Note: does not include optional "arguments", does not include noremove option, does not include pegdown option To install in User Statistics menu via Stata commands: . window menu append submenu "stUser" "Documents" . window menu append item "Documents" "DYN to HTML (dyndoc)" "db dyndoc" . window menu refresh To permanently install, place these commands in your -profile.do- file. */ VERSION 15 POSITION . . 410 250 DIALOG main, label("dyndoc - Translate dyndoc format to HTML") tabtitle("Main") BEGIN TEXT tx_source 10 10 . ., label("Source document:") FILE file_source 10 +20 390 ., error("Source document") /// label("Browse") TEXT tx_target 10 +25 . ., label("Target document:") FILE file_target 10 +20 390 ., error("Target document") /// label("Browse") CHECKBOX cb_replace 15 +25 . ., label("replace target document") CHECKBOX cb_hardwrap 15 +25 . ., label("hardwrap - line breaks preserved") CHECKBOX cb_nomsg 15 +25 . ., label("nomsg - no output file note") CHECKBOX cb_nostop 15 +25 . ., label("nostop - ignore errors") END OK ok1, label("OK") CANCEL can1, label("Cancel") SUBMIT sub1, label("Submit") HELP hlp1, view("help dyndoc") RESET res1 COPY copy1 PROGRAM command BEGIN put "dyndoc " require main.file_source put `"""' main.file_source `"""' " " put ", " if main.file_target.isneq("") { put "saving(" `"""' main.file_target `"""' ") " } if main.cb_replace { put "replace " } if main.cb_hardwrap { put "hardwrap " } if main.cb_nomsg { put "nomsg " } if main.cb_nostop { put "nostop " } END