do you have any idea how to change code snippet's background color? I'm using vim-t (\definevimtyping..) and context. In vim documentation I found only how to change background color of highlighted lines, but I'd love to have whole code snippet with background.
I tried using /framed but it just broke code formatting. (I'm newbie)
Thanks!
Edit 1:
definition:
\definevimtyping [JAVA] [
syntax=java,
lines=split,
option=hyphenated,
align=hyphenated,
style={\switchtobodyfont[small,tt]}
]
used:
\startJAVA[numbering=yes]
public class LocationCoordinate2D {
private Double longitude; // zemepisná dĺžka
private Double latitude; // zemepisná šírka
public LocationCoordinate2D(double longitude, double latitude) {
this.longitude = longitude;
this.latitude = latitude;
}
public LocationCoordinate2D getNewLocation(double bearing, double distance) {
double brng = Math.toRadians(bearing); // smer v radiánoch
final int R = 6371; // polomer Zeme v kilometroch
double lat1 = Math.toRadians(latitude);
double lon1 = Math.toRadians(longitude);
double lat2 = Math.asin(Math.sin(lat1) * Math.cos(distance/R) + Math.cos(lat1) * Math.sin(distance/R) * Math.cos(brng));
double lon2 = lon1 + Math.atan2(Math.sin(brng) * Math.sin(distance/R)*Math.cos(lat1), Math.cos(distance/R)-Math.sin(lat1)*Math.sin(lat2));
return new LocationCoordinate2D(Math.toDegrees(lon2), Math.toDegrees(lat2));
}
}
\stopJAVA