This Halacha is an excerpt from our Sefer
One forgot and ate or drank on the fast day:
Is he to continue fasting that day? If one ate or drank on a public fast day, he is nevertheless required to continue fasting for the rest of that day, and is forbidden to eat or drink any further. [It does not help to make up the fast on another day, and one must stop eating/drinking even if he plans to do so.]
Making up the fast another day: If one ate or drank on a public fast day it does not help to make up the fast on another day, and he is not required to do so. Nevertheless, one may fast on another day as atonement for the fact he ate on the fast day. This atonement fast is not a requirement. Some Poskim however rule one is to fast three fasts [Bahab], as atonement for breaking the fast. [Practically, the main ruling follows that one is not required to fast even as atonement, and if he desires an atonement he should either fast or give charity to paupers in place of an atonement fast. If, however, one deliberately ate or drank on a fast day, then he is to fast Bahab, or make up the fasts with charity. ]
If one ate or drank on a public fast day, he is nevertheless required to continue fasting for the rest of that day, and is forbidden to eat or drink any further. It does not help to make up the fast on another day, and he is not required to do so. Nevertheless, if he desires an atonement, he should fast another day or give charity to paupers in place of an atonement fast.
If one accidently ate on a fast day but continued fasting, is he to recite Aneinu?
Some Poskim rule he may recite Aneinu, and recite the dialect “Beyom Tzom Hataanis Hazeh”. Other Poskim rule he may no longer recite Aneinu. If he only ate a small amount, such as less than a Kezayis of food and the minority of a Revius of a drink, then he may recite Aneinu according to all.
If one accidently ate on a fast day but continued fasting, may he be called up for an Aliya?
Some Poskim rule he may be called up for an Aliya. Other Poskim rule he may not receive an Aliya. If he only ate a small amount, such as less than a Kezayis of food and the minority of a Revius of a drink, then he may receive an Aliya according to all.
If on a fast day one said a blessing on a food and then remembered, what is he to do?
Some Poskim rule the person is to taste and swallow a small amount of the food. Other Poskim rule one is to simply recite Baruch Sheim Kevod Malchuso Leolam Vaed, and is not to partake in the food., and so is the suggested practice.
 See Kaf Hachaim 549:6-7; 568:7; Piskeiy Teshuvos 568:3
 Michaber 568:1; Rif Taanis in name of Yerushalmi; Kaf Hachaim 549:6
 However, by a private fast day, the fast is lost once he eats a Kezayis of food [Michaber ibid] or a Revius of drink. [Birkeiy Yosef 568; Shaareiy Teshuvah 568:2]
 P”M 568 A”A 4; M”B 568:2; Kaf Hachaim 568:6
 M”A 568:4; Kaf Hachaim 549:7 and 568:7
 However, by a private fast day, the fast is lost once he eats a Kezayis of food [Michaber ibid] or a Revius of drink [Birkeiy Yosef 568; Shaareiy Teshuvah 568:2] and he is thus required to make up the fast another day. [Michaber ibid]
 M”A ibid; Terumos Hadeshen 156; P”M 568 A”A 4; Mamar Mordechai 568:4; Shulchan Gavoa 549:3; M”B 568:8; Kaf Hachaim ibid that so is main ruling and implication of Rama
 Drashos Mahril Taanis; M”A ibid and Darkei Moshe 568 “One time, an individual accidently ate on the 10th of Teves and the Maharil directed him to fast Bahab.” Shiyurei Kneses Hagedola 549:2; Levushei Serud 549; See however Kaf Hachaim ibid in name of Poskim that perhaps this refers to a case that one did not fast at all that day; See however Kitzur SHU”A 127:16 who implies even if he did fast the rest of the day he is to fast Bahab; See Kaf Hachaim ibid and Poskim there that implies according to Maharil one is required to make up the fast with these three fasts. See however M”B ibid who clearly learns even the Maharil said so only as atonement.
 See Kaf Hachaim ibid; Piskeiy Teshuvos ibid
 See Piskeiy Teshuvos 565:1
 M”B 568:3 in name of Nehar Shalom; Shevet Halevi 8:131; See M”B 568:3 in name of Nehar Shalom; Shevet Halevi 8:131
 Zera Emes 3:62; Yalkut Yosef Moadim p. 535
 Piskeiy Teshuvos ibid
 See Piskeiy Teshuvos 565:1
 Chasam Sofer 157; Aruch Hashulchan 566:11; Minchas Elazar 2:74
 See Michaber 566:6; Tzemach Tzedek Shaar Hamiluim 1:20; Zera Emes 3:62; Yalkut Yosef Moadim p. 535
 Piskeiy Teshuvos 568:1 footnote 3
 See Sdei Chemed Mareches Basar Bechalav 12; Michtav Lechizkiyahu 5; Piskeiy Teshuvos 568:2
 Birkeiy Yosef 568:1 in name of Nechpa Bakesef O.C. 6, brought in Shaareiy Teshuvah 568:1, regarding a Taanis Yachid; Halachos Ketanos 252; Yabia Omer Y.D. 2:5 that the same applies by a Taanis Tizbur
 Birkeiy Yosef 568:1in name of Admas Kodesh 1:13; Erech Hashulchan 568:2; Shaareiy Teshuvah 568:1 regarding Taanis Tzibur; Likkutei Mateh Yehuda; Zechor Leavraham Taf; Kaf Hachaim 568:16; Daas Torah 568; Shevet Hasofer 25