Two-dimensional carbon allotropes from graphene to graphyne