If I want to anonymise a paper I've written for review, I don't just want to delete my name from the author field. I want to replace my name with a rule as tall as a capital letter and as long as my name would be. This way, it looks like my name is being censored out of history. (I don't really do this...) Here's an MWE:
\documentclass[12pt]{article}
\usepackage{lipsum}
\newlength\namelength
\settowidth\namelength{Seamus Bradley}
\title{A paper with no author}
\author{\rule{\namelength}{12pt}}
\begin{document}
\maketitle
\lipsum
\end{document}
Now here's the question. How would I define a \lengthof macro that looks at its argument and then expands to that length? Since you can't put a \settowidth inside a \rule (or it didn't work when I tried it), this isn't as trivial as I thought...
Is there a way to do this? Or a good reason why there isn't a good way to do this?
\phantomwhich is filled. – Martin Scharrer Mar 14 '11 at 16:08