latex algorithm2e function