Answer: It is possible there are several factors at work, one of which being that rosemary is not always an easy plant to grow indoors. Other factors would probably include transplant shock, especially when combined with the change in environments. You may have replanted them too deeply (they should be at the same level they grew before.) You might be over or underwatering, and/or there may be a distinct difference between the potting soil the plant came in and the one you used. This can mean that the original soil may be wetter (or drier) than the surrounding soil.
This plant needs good drainage but it also should not be allowed to dry out. The soil should be slightly moist but never soggy. It also prefers an alkaline soil. Rosemary seems to enjoy a certain amount of humidity, so your air conditioned apartment may be too dry. A pebble tray or a grouping of plants may help with that. Oddly enough it is also possible that the plant is suffering from mildew, or quite possibly from mites. Both of these problems occasionally become apparent when they are moved indoors and conditions are less than ideal; the mites thrive in dry air.
Although this plant does well in full sun it also does fine in partial shade; I think it might be sufficient if it receives sun all afternoon since this is the part of the day when the sun is strongest. Most plants will adjust to the light they receive within a certain range of acceptable levels. When light is on the low side, the plant will grow more slowly and perhaps require less water and less frequent fertilizing. To supplement the light you might try reflecting it with light colored walls rather than moving the plant.
To be honest I'm not sure if your plants are dying or simply going through a rather difficult adjustment. You may have to use this as a learning experience and start again. If so, you might try just one or two plants to see how they do and then add more when you have figured out the care routine that works best in your apartment microclimate.
Q&A Library Searching Tips