How to spell "De Wynter" (in LaTeX!)

My last name has some weird spelling conventions that you may or may not be familiar with. The very short, not very precise version of it is that if it's next to my first name, the "De" (the tussenvoegsel) should be lowercase, and otherwise in capitals. It is also alphabetised at the "W", not at the "D".

Now, LaTeX struggles with this. So here's what I do when I cite my papers:

  • In the preamble of the document (the tex file, before "\begin{document}") I define a new command: \DeclareRobustCommand{\DE}[3]{#2} and cite as usual. You can alter the argument (the #2) depending on what citation style you are using.
  • I redefine it before calling \bibliography as follows: \DeclareRobustCommand{\DE}[3]{#2}
  • In the citation (the bib file), I just make sure the entry has: author={\DE{Wynter}{De{de}}} Wynter, Adrian and ...
I have not modified the bib entriees because I'm not sure who's going to be checking this, but that's how I cite my papers (and any others that have tussenvoegsels in it).