[Tex/LaTex] Create Blank Space after special character at end of a word

extended-charactersfont-encodings

I am writing part of a text where i need danish encoding/characters. The main language however is english. So i choose to add the special chars in textmode.
I am facing now the problem that if a word ends on a special character it gets automatically concatenated with the next word.
So

p\aa folks 

should be

på folks 

but it is

påfolks 

I am using now some horizontal spacing makros like \, but is there a more elegant way? Also i haven't found a macro which provides the default space between two words

Best Answer

To add a space manually, use

p\aa\ folks

or

p\aa{} folks

To do it automatically, have a look at the package xspace and its command \xspace. You could even patch \aa with it:

\usepackage{xspace}
\usepackage{etoolbox}
\apptocmd{\aa}{\xspace}{}{}
Related Question