Help IDing a fantasy novel...

I remember reading a fantasy book back in the 80s, although it felt older than that. It was about a man from our world (an engineer, maybe?) who had figured out the formulas to do magic through his engineering knowledge. He used it to go back in time and to other worlds, IIRC. I’m very vague on actual plotlines, but I do remember an exchange he had with a man in a Roman town who was complaining that the Romans wouldn’t let his co-religionists oppress “those heathens” of some sort.

For some reason, my brain keeps throwing up the name “Harold O’Shea” as the antagonist, although nothing in the vein I’m looking for comes up when I google that.

Any help?

Sounds a little like Lest Darkness Fall by L. Sprague De Camp. No O’Shea in there though.

Probably this https://en.wikipedia.org/wiki/Harold_Shea

That’s it! Thank you!

And this is apparently where the conversation about the Romans (Goths, apparently) not allowing the Orthodox to oppress other religions comes from. Same author, so I apparently conflated them.

“It hasn’t been the same since the Goths came.” He lowered his voice conspiratorially: “Mark my words, it won’t be like this always, either!”
“You don’t like the Goths?”
“No! Not with the persecution we have to put up with!”
“Persecution?” Padway raised his eyebrows.
“Religious persecution. We won’t stand for it forever.”
“I thought the Goths let everybody worship as they pleased.”
“That’s just it! We Orthodox are forced to stand around and watch Arians and Monophysites and Nestorians and Jews going about their business unmolested, as if they owned the country, if that isn’t persecution, I’d like to know what is!”
“You mean that you’re persecuted because the heretics and such are not?”
“Certainly, isn’t that obvious? We won’t stand— What’s your religion, by the way?”
“Well,” said Padway, “I’m what in my country is called a Congregationalist. That’s the nearest thing to Orthodoxy that we have.”
“Hm-m-m. So long as you’re not one of these Maronites or Nestorians—”

One of my favorite quotes!

CMC fnord!

I love Lest Darkness Fall - it’s one of those books I reread every few years.

My favourite bit from the Harold Shea stories is in the tale based on The Faerie Queen. Shea’s partner decides to try summoning a dragon, so he has a big cage made to hold it. He casts the spell, and a little dragon about a foot long appears in the cage, flies out between the bars and attacks him. “I got the decimal point too far to the left - instead of one dragon, I got point zero one dragons.” So he tries again - but this time gets the decimal point too far to the right and summons 100 dragons. This lot, fortunately, are vegetarians…