This is a Mathematica file that combines self-consistent solution for graphite subject to a gate with computation of the spectrum in case of an additional moire potential on the surface due to aligned hBN. Also, the .xls files with experimental data on capacitance of 4 graphite films are included and compared with surface states calculation.