- Create Template:TemplateName, write some text there.
- Press Enter two times to make a new paragraph
- Add <noinclude>...</noinclude>.
- Create a page and fill it with this content: Some text {{TemplateName}} some text #2.
As a result, the part "some text #2" will take a style format, as if it had a tag <pre>.
Tested on a clean wiki 1.35 in source editor.