E. F. Haghish
Center for Medical Biometry and Medical Informatics
University of Freiburg, Germany
Support further development of Statax (CodeMap Project)
Alternatively, you can download Statax below, upload it to your own server and source Statax.js to your webpage as shown below.
Statax comes with four built-in CSS style sheets which are located in Additional CSS Styles directory. To change the default syntax highlighter:
These styles are shown below respectively:
In order to use Statax for highlighting Stata code, the code should be wrapped with a <pre> tag and sh_stata class as shown below. The <pre> tag preserves the white-space and the sh_stata class refers to the class of CSS style sheet that defines the color of each Stata syntax element.
If you wish to change the colors of the syntax highlighter, you should download and install Statax manually. The Statax.css which includes the style sheet code, has a guide about each element and if you are familiar with CSS, you can create your own style sheet.
There is a Stata package that can convert do and ado files to HTML and highlight their syntax using Statax.js. The package is explained in details here.