Above is a circuit with L C R components to model ringing.
As you see a 1V 50Hz pulse is applied to the circuit. The ringing can be seen at the output pulse in blue color which has the resonance frequency of the parallel LC.
Even though the input signal is 50Hz, since it is a pulse(composed of harmonic sines) it generates ringing at the 5kHz component of the pulse(resonance freq. component).
My question is: Is there a remedy for this ringing at the output without affecting the pulse widths?
I added a series LC with the same resonance freq. in series with R as seen below:
But if I take the output from the terminal of C2 the output (Out2 on circuit) is clean and with no ringing; with large rising and falling edges but this could be fixed with a comparator I guess. Here is Out2 on circuit:
Here is the output from Andy aka's suggestion which completely removed ringing by keeping the pulses sharp: