sine wave to square wave using LT1017
Your simulator is lying to you. The LT1017 cannot operate on a power supply of just 200 mV. It needs a minimum of 1.1 V.

Therefore, you need to take the full-swing output that it produces and attenuate it back down to the level you require.