Shorts and such

A pair of underpants made from synthetics or merino is a good solution. Cotton is not. Often you can use the same garment as underpants, shorts and swimsuit.
My current favourites; merino 'cycling' shorts from Backpackinglight.com that serves both as underpants and as hiking shorts in hot weather.

Another good solution; a pair of light running or swimming shorts that also serves as quick-drying underwear and as hiking shorts.

Comments and current insights: I have seen gear lists that include shorts, zip-off pants, underpants and swim-shorts. Not a way to minimize your pack, for sure. It makes eminent sense to find something that excludes as many of those separate garments as possible. And it is in fact not very difficult, which is explained in detail in this chapter of the book.