This paper presents a novel spectrum allocation strategy for multiuser terahertz (THz) band communication systems when the to-be-allocated spectrum is composed of multiple transmission windows (TWs). This strategy explores the benefits of (i) allowing users to occupy sub-bands with unequal bandwidths and (ii) optimally avoiding using some spectra that exist at the edges of TWs where molecular absorption loss is high. To maximize the aggregated multiuser data rate, we formulate an optimization problem, with the primary focus on spectrum allocation. We then apply transformations and modifications to make the problem computationally tractable, and develop an iterative algorithm based on successive convex approximation to determine the optimal sub-band bandwidth and the unused spectra at the edges of TWs. Using numerical results, we show that a significantly higher data rate can be achieved by changing the sub-band bandwidth, as compared to equal sub-band bandwidth. We also show that a further data rate gain can be obtained by optimally determining the unused spectra at the edges of TWs, as compared to avoiding using pre-defined spectra at the edges of TWs.