As you might be aware some of the drugs may produce acidity especially when taken on empty stomach. This is because of increased acid secretion in the stomach. You can follow the following method to prvent it.
Take an antacid
about one hour before your meal. Take an adequate meal after one hour of the antacid. You can then take your medicines after food. As the antacid will prevent excess acid secretion and the food taken will utilize most of acid present it will be unlikely that you will develop acidity.