  We consider an ensemble of constant composition codes that are subsets of
linear codes: while the encoder uses only the constant-composition subcode, the
decoder operates as if the full linear code was used, with the motivation of
simultaneously benefiting both from the probabilistic shaping of the channel
input and from the linear structure of the code. We prove that the codebook
mismatch can be fully compensated by using a mismatched additive decoding
metric that achieves the random coding error exponent of (non-linear) constant
composition codes. As the coding rate tends to the mutual information, the
optimal mismatched metric approaches the maximum a posteriori probability (MAP)
metric, showing that codebook mismatch with mismatched MAP metric is
capacity-achieving for the optimal input assignment.
