In this work, we study the percolation transition and large deviation
properties of generalized canonical network ensembles. This new type of random
networks might have a very rich complex structure, including high heterogeneous
degree sequences, non-trivial community structure or specific spatial
dependence of the link probability for networks embedded in a metric space. We
find the cluster distribution of the networks in these ensembles by mapping the
problem to a fully connected Potts model with heterogeneous couplings. We show
that the nature of the Potts model phase transition, linked to the birth of a
giant component, has a crossover from second to first order when the number of
critical colors qc=2 in all the networks under study. These results shed
light on the properties of dynamical processes defined on these network
ensembles.Comment: 27 pages, 15 figure