Use as follows: [%- ## Some type of file header ### -%] See "Chomping Whitespace" in documentation: http://www.template-toolkit.org/docs/manual/Syntax.html#section_Chomping_Whitespace By the way, this applies not only to comments. -- Sincerely yours, Oleg Kostyuk (CUB-UANIC)