# Semantic linefeeds and problem with space before footnote mark [duplicate]

I have started to use semantic linefeeds for the purposes of version control, as suggested by e.g. Brandon Rhodes, which I found through the answer: How to format source to take advantage of VCS?

It seems quite reasonable to put footnotes on their own line, but this inserts an ugly space before the footnote mark. Can this be dealt with in any easy fashion?

MWE:

\documentclass{article}

\begin{document}

This is how footnotes should work.\footnote{My mark is stuck where it should be!}

Attempting semantic linefeeds,
the footnotes seem to float away.
\footnote{Can anyone make my mark stick to the previous character?}

\end{document}


This seems to ask something similar, but has not been answered: How to ignore spaces before footnotes

• \usepackage{xpatch} and \xpretocmd{\footnote}{\unskip}{}{} May 24 '16 at 9:03
• @egreg That works perfectly! May 24 '16 at 9:06
• Can you add that as an answer, @egreg? Or are you hoping someone ”golfs” it even further? ;) May 24 '16 at 9:32
• add % at the end of the sentence before the the footnote May 24 '16 at 11:01
• @trmdttr I asked for an answer to the previous question; now this can be closed as duplicate. May 24 '16 at 11:36