# Wiki Incorporating LaTeX and PHP

I'm a little overwhelmed by the myriad of wiki solutions available. Let me briefly describe what I will be doing and what I think I need. If there are more questions you can ask to help narrow the choices, please include those in the comments and I will update my question.

I have database of ice cream flavors (not really, but let's just go with it). My fields include the name of the flavor followed by several statements that could be true or false for that flavor, such as "Contains nuts" or "Contains cherries". So, an entry in the database might be "Vanilla, No, No" or maybe "Banana Split, Yes, Yes".

What I would like to do with the database is write a PHP script to automatically create a wiki article for each flavor and include the information I have on it. After the wiki is initialized, it needs to be editable by registered users only.

In addition to whatever I need to accomplish the above, I also need LaTeX support (because it isn't actually about ice cream).

I have my own domain, so it need not be externally hosted (in fact, I would prefer to host it myself, but this isn't crucial).

Edit history is a must.

My first instinct was to use MediaWiki, since most users should be familiar with it already, but I don't know if I can use PHP to interface with it in the way I described. I also feel that the LaTeX rendering is not particularly beautiful, but I don't know if any other systems do a better job.