We study nuclear-structure effects on the transparency in high-transverse-momentum (p,2p) and (e,e′p) reactions. We show that in the eikonal-distorted-wave impulse approximation (EDWIA), even when correlations are included, one can get a factorized expression for the transparency which depends only on the average nucleon density ϱ( r) and a correlation function. A technique is developed to include correlations in a Glauber calculation, where we use a Monte Carlo method for integration over the nuclear coordinates. We compare calculations of T using the EDWIA formalism, and a continuous density, with a Monte Carlo method based on discrete nucleons.