2

I have the following C# Code

public class MeasurementData
{
    #region Public Properties

    public int ADC { get; set; }
    public double Latitude { get; set; }
    public double Longitude { get; set; }
    public int SensorID { get; set; }
    public DateTime Day { get;set; }
    public int CO2 { get; set; }

    #endregion
}

and the code looks with minted like this:

Minted Output

This is very very close to perfect. Except that DateTime is not colored. I know that minted can't be able to know what this is, because it does not know my code. Minted does only know a snipped. But i'd like to color it myself with telling minted how to color this Word(s). is there an option? It would be great when i could say that this are my classes:

define classes {DateTime, MyClass, ... }

and then this classes are color in bright blue or sth. The color is not that important. i think i am able to figure the coloring out myself.

Haven't found something on the net :(

Jens
  • 153
  • Have a look here: http://tex.stackexchange.com/questions/18083/how-to-add-custom-c-keywords-to-be-recognized-by-minted – DG' Jul 07 '15 at 11:57
  • @DG' Thank you that link is not bad. But i don't know how to change the Lexer. I found the dotnet.py and it contains the CSharpLexer, but when i add a DateTime to the line with the datatypes nothing changes.. what am i doing wrong? – Jens Jul 07 '15 at 12:32
  • @DG' Ok forget it. It worked.. it is now also red. Thats pretty cool! Thx! – Jens Jul 07 '15 at 12:35

0 Answers0