We present a simple method, combining the density-matrix
renormalization-group (DMRG) algorithm with finite-size scaling, which permits
the study of critical behavior in quantum spin chains. Spin moments and
dimerization are induced by boundary conditions at the chain ends and these
exhibit power-law decay at critical points. Results are presented for the
spin-1/2 Heisenberg antiferromagnet; an analytic calculation shows that
logarithmic corrections to scaling can sometimes be avoided. We also examine
the spin-1 chain at the critical point separating the Haldane gap and dimerized
phases. Exponents for the dimer-dimer and the spin-spin correlation functions
are consistent with results obtained from bosonization.Comment: 21 pages, 12 figures, new results and added references, to appear in
PR