It’s no secret that LGBTQ+ history can be grim. Discrimination has been a fact for centuries; in some countries, it is still a reality. But when you look at the development of LGBTQ+ rights in more detail, you also come across some stories that stand out: little nuggets that shine a light in the darkness.

This is what I discovered when I was setting up a Masters course on LGBTQ+ rights at Edinburgh University. The new course, ‘LGBT Rights: A Legal Perspective’ appears to be the first of its kind in Scotland. When I taught it – together with my colleague Sean Becker – we realised how fascinated students were by our topics: discrimination, criminalisation and decriminalisation of homosexuality, same-sex marriage, transgender rights, the rights of intersex people, laws against conversion ‘therapy’ and the attitudes of courts to LGBTQ+ issues.

It was particularly rewarding when we came across little-known historical acts of resistance to homophobia and transphobia – events that often challenged students’ views. And ours too. Here are some of my favourites.

He was not a politician, or a philosopher, or a journalist. He was a Yorkshire farmer, and his name was Matthew Tomlinson. He lived in 1810, a time which – for male homosexuals – was very different from the present.

The death penalty was still imposed on homosexual conduct – a naval surgeon had just been executed for this. But Tomlinson was puzzled about the law. In a diary entry from 14 January 1810, he.