{0}Mako examples extracted from https://docs.makotemplates.org/en/latest/syntax.html Expression {15}${{117}x{15}}{0} {15}${}{0} {15}${{117}pow{116}({117}x{116},{108}2{116}){106} {116}+{106} {117}pow{116}({117}y{116},{108}2{116}){15}}{0} Expression Escaping {15}${{109}"this is some text"{106} {116}|{106} {117}u{15}}{0} Control Structures {15}%{106} {117}if{106} {117}x{116}=={108}5{116}:{0} this is some output {15}%{106} {117}endif{0} {15}%{106} {117}for{106} {117}a{106} {117}in{106} {116}[{110}'one'{116},{106} {110}'two'{116},{106} {110}'three'{116},{106} {110}'four'{116},{106} {110}'five'{116}]:{0} {15}%{106} {117}if{106} {117}a{116}[{108}0{116}]{106} {116}=={106} {110}'t'{116}:{0} its two or three {15}%{106} {117}elif{106} {117}a{116}[{108}0{116}]{106} {116}=={106} {110}'f'{116}:{0} four/five {15}%{106} {117}else{116}:{0} one {15}%{106} {117}endif{0} {15}%{106} {117}endfor{0} The % sign can also be “escaped”, if you actually want to emit a percent sign as the first non whitespace character on a line, by escaping it as in %%: {15}%{116}%{106} {117}some{106} {117}text{0} {15}%{116}%{106} {117}some{106} {117}more{106} {117}text{0} The Loop Context The loop context provides additional information about a loop while inside of a % for structure: {1}