Is this done by just writing the answer and deleting the comment? Can you delete a comment that has been there for a while? (I ask this because I think you can't edit a comment after a few minutes--can you delete it though?)
Yes, the author of a comment (or a moderator) can delete the comment at any time (s)he deems it appropriate [subject to the restriction that you can only "vote" on comments five seconds apart, and deleting a comment counts as voting on a comment. So if you just deleted, or voted on, another comment, you have to wait five seconds
Apparently deleting one's comments no longer counts as a vote, so that restriction seems to no longer apply - or I may just have been too slow].
Now if a moderator could insert a screenshot including the comment on the question I deleted just before writing the answer, we'd have a nice illustration.
Yes, the conversion is a manual process. If the comment that you want to turn into an answer contains TeX markup, copy-pasting becomes a bit tricky. My workflow is
- Select "View page source" in Chrome (there are equivalents in other browsers)
- Search the source for the name of commenter.
- Copy the text of comment, which now includes TeX markup.
- Paste into the answer box.
- Check for $<$ signs; for technical reasons, these are present as
<in the source. MathJax normally understands $a < b$ as $a<b$ (e.g., it does on the demo page) but, for a reason unknown to me, this does not work here. So I change those
- If the comment wasn't mine, I add a link to a comment (obtainable from its timestamp), the name of its author, and mark the answer as community wiki.