Transformer Output waveform
Any wave like square/triangular wave is a summation of infinite no. of sine waves (fourier series). 

For a linear device, the output response to a square wave input is equivalent to the summation of the respective responses for each of its sine component. Transformer induces sinusoidal voltage at the secondary for each of this sinusoidal input, and its summation defines the resulting output waveform. It will be square wave itself. The same shape and frequency as that of the input waveform is obtained at the output.

An ideal transformer can be considered as a linear device as --> \$V_o = V_i\frac{N2}{N1}\$

Hence the output would be square/triangular for square/triangular input.