/*
Statx Package : JavaScript Syntax Highlighter for Stata
Developed by E. F. Haghish (2014)
Center for Medical Biometry and Medical Informatics
University of Freiburg, Germany
haghish@imbi.uni-freiburg.de
The Statax Package comes with no warranty
Syntax highlighter CSS
Statax Versions
==============================
Statax 1.0 September, 2015
*/
program define stataxstyle
version 11
syntax [anything] , [STYle(name)] [css(str)]
tempname canvas
capture file open `canvas' using $statax , write text append
********************************************************************
* Stata Style (default)
********************************************************************
if missing("`style'") | "`style'" == "stata" {
local key #00008A
local str #800000
local mac #008080
local com #008000
local pfn #0052FF
local fun #0052FF
local num #0333FF
local sym black
local bra #FF0182
local bac // background
local col // font color
}
if "`style'" == "daring" {
local key #5E97F4
local str #73C935
local mac #95A99F
local com #CC8C3C
local pfn #96A6C8
local fun #96A6C8
local num #FFDC33
local sym #FFDC33
local bra #906
local bac #282828 //background
local col #F4F4FF // font color
}
if "`style'" == "sunset" {
local key #294277
local str #DF0707
local mac #646485
local com #C3741C
local pfn #466A97
local fun #466A97
local num #294277
local sym #294277
local bra #CD5C5C
local bac #FFFCE5 //background
local col // font color
}
if "`style'" == "wrangler" {
local key #00F
local str #F39
local mac #1281B7
local com #555
local pfn #00F
local fun #00F
local num #369
local sym #A00
local bra #906
local bac //background
local col // font color
}
file write `canvas' _n(2) ///
"" _n(3) ///
`"" _n(4)
****************************************************************************
* Importing External style
****************************************************************************
if !missing("`css'") file write `canvas' _n(2) ///
"" _n ///
`""' _n(2)
file close `canvas'
end