It's possible you were trying to be too smart ;) , just writing them in plain text works here at least for me.
Ok, thanks. In preview mode, the tildes were expanded...
Ah yes, you're right, preview is not aware of the smart tricks about later (non)expansion.