Install brat
download, unzip and run ./install
.
Change the webapp location in Apache2
- in
etc/apache2/sites-avialble
, indefault
addAlias /brat "/home/brat"
- restart apache2:
sudo service apache2 reload
Enable CGI
Add the following code in default
<Directory /home/ypeng/brat> AllowOverride Options Indexes FileInfo Limit AddType application/xhtml+xml .xhtml AddType font/ttf .ttf # For CGI support AddHandler cgi-script .cgi # Comment out the line above and uncomment the line below for FastCGI #AddHandler fastcgi-script fcgi </Directory>
Adjust fonts
To speed up the load of fonts, we can change the family to Google fonts. Go to brat/client/serc/visualizer.js
. Around line 3074, change the webFontConfig
to
var webFontConfig = { custom: { families: [ 'Open Sans', 'Open Sans', // 'Ubuntu', 'Open Sans' ], /* For some cases, in particular for embedding, we need to allow for fonts being hosted elsewhere */ urls: webFontURLs !== undefined ? webFontURLs : [ "http://fonts.googleapis.com/css?family=Open+Sans:700", "http://fonts.googleapis.com/css?family=Open+Sans", 'http://fonts.googleapis.com/css?family=Open+Sans:300' ], },
While using the Embedded visualization, change the webFontURLs
to
var webFontURLs = [ "http://fonts.googleapis.com/css?family=Open+Sans:700", "http://fonts.googleapis.com/css?family=Open+Sans", 'http://fonts.googleapis.com/css?family=Open+Sans:300' ];
Change the webapp location in Tomcat6
1.in /etc/tomcat6/Catalina/localhost
, add isimp.xml
<Context path="/examples" docBase="/home/ypeng/examples" />
- restart tomcat6:
sudo service tomcat6 restart