A judge has turned down an application by a female teacher jailed for having sex with a student to continue to have her identity kept private.

Former Sydney Grammar School teacher Bronwen Williams applied to the District Court earlier this month after the prosecution sought the lifting of a non-publication order.

The court papers reveal that Williams, pregnant when she was sentenced, gave birth to a baby daughter by her husband on May 9. She was told two days earlier that she would not be able to keep her baby at the mother and children's program at the correctional facility.

The 34-year-old pleaded guilty to five counts of sexual intercourse with a person under her care over three months in 2016 when she worked at the school.

Judge Paul Lakatos jailed the woman in February for at least seven months, saying he considered there was no other alternative but a full-time prison term. “I recognise the sad result that such a course will mean the offender will give birth to a child in custody,” he said.