add a new latex method that used DiGraph