"We had no choice but leave."
"They've done nothing but read all afternoon."
OR
"They've done nothing but to read all afternoon."
Do I have to use "to" or I can leave it out?
***** NOT A TEACHER *****
(1) The Senior Member and the Key Member have both given us
excellent answers.
(2) May I most respectfully add what I found in my books and on the
Web?
(a) Nowadays, it is, indeed, preferable to use the to-infinitive after
nouns such as "choice" or "alternative."
(i) Professor George O. Curme explains that "I have no choice but to
accept the fact" is just a short way to say "I have no choice but
the choice to accept the fact." Of course, we would never say
"I have no choice but the choice accept the fact." So that's why
I guess we had better use "to."
NEVERTHELESS, my Web research
showed me that some earlier English writers had no problem in simply
using the bare (no "to") infinitive after
choice. In fact, probably some
native speakers nowadays would not go crazy if you said "I have no
choice but go" -- especially in rapid conversation.
(b) Professor Curme says (back in 1931 when he wrote his masterpiece)
that we "often" use the bare infinitive in:
There is nothing to do/ We have nothing to do
but enjoy ourselves.
IF (a big "IF") I understand him, the original sentence going way back
into English grammar is something like:
We have nothing to do
but that (conjunction) we [do] enjoy ourselves.
The great scholar then adds that we "often" use the to-infinitive
because people feel that we are dealing with an infinitive clause:
"I am sure we in England had nothing to do but
to fight."
The bottom line: If you use "to" in both constructions, you will be
speaking/writing "good" English.