Any person who shall be convicted of writing or publishing any libel, shall be fined in such sum or imprisoned in the county jail for such term as the court, in its discretion, may adjudge, having regard to the nature and enormity of the offense, or be punished by both such fine and imprisonment.