/* Stata Weaver Package Developed by E. F. Haghish (2014) Center for Medical Biometry and Medical Informatics University of Freiburg, Germany haghish@imbi.uni-freiburg.de The Weaver Package comes with no warranty DESCRIPTION ============================== This program is only executed by "weave.ado" program to add the CSS styles to the Weaver document. This code is separated in a CSS file to encourage other users add new document styles. If you are not familiar with CSS, read the following cheat sheets: http://www.w3schools.com/cssref/css_selectors.asp http://www.w3schools.com/cssref/trysel.asp?selector=pluss CSS Documentation (recommended) http://www.w3.org/TR/CSS2/selector.html */ program define weaverstyle version 11 syntax [anything] , [STYle(name)] [Font(str)] [LANDscape] [css(str)] /// [markup(str)] tempname canvas capture file open `canvas' using "$htmldoc" , write text append ******************************************************************** * Stata STYLE ******************************************************************** if "`style'" == "stata" & "`markup'" == "html" { file write `canvas' _n(2) "" _n(2) /// `"" _n(4) } ******************************************************************** *MODERN (DEFAULT) STYLE ******************************************************************** if "`style'" == "modern" & "`markup'" == "html" { file write `canvas' _n(2) "" _n(2) /// `"" _n(4) } ******************************************************************** * CLASSIC STYLE ******************************************************************** if "`style'" == "classic" & "`markup'" == "html" { file write `canvas' _n(2) "" _n(2) /// `"" _n(4) } ******************************************************************** * MINIMAL STYLE ******************************************************************** if "`style'" == "minimal" & "`markup'" == "html" { file write `canvas' _n(2) "" _n(2) /// `"" _n(4) } ******************************************************************** * ELEGANT STYLE ******************************************************************** if "`style'" == "elegant" & "`markup'" == "html" { file write `canvas' _n(2) "" _n(2) /// `"" _n(4) } ******************************************************************** * CSS STYLING ******************************************************************** if "`style'" != "empty" & "`markup'" == "html" { file write `canvas' _n(2) /// "" _n(2) /// `"" _n(4) ******************************************************************** * LANDSCAPE MODE STYLING ******************************************************************** if `"`landscape'"' == "landscape" { file write `canvas' `"" _n(4) } else { file write `canvas' `"" _n(4) } file write `canvas' `"" _n(4) ******************************************************************** * Dynamic Table style ******************************************************************** file write `canvas' "" _n(3) } **************************************************************************** * Importing External style **************************************************************************** // is run from the Statax program file close `canvas' end