If you have to in an emergency, then at least cook in the vestibule area (i.e. outside and away from the tent material) with lots of ventilation.
PS: I think it is essential to embark on any camping/backpacking trip with a mindset of adaptation/sacrifice. You have to be willing to make conservative or uncomfortable decisions in the name of risk management (e.g. trudging through a stream and getting your shoes wet vs. attempting a dry crossing on a precarious log, or resisting the warm noodle cravings during a rainstorm). Besides, it makes the experience of returning to civilization that much more exhilarating.
If you need to boost the warmth of your tent, boil some water outside, put it in a container, and keep that in your tent (being careful of scalding, of course).