I am trying to build an APA citation generator, asking the user for name of author, date, etc. And returning the correct reference structure. When it comes to citing a book, the title has to come in italics. I found a way for the output to come in italics using
f'\033[3m{title}\033[0m'
The problem is that I want the user to be able to copy and paste the reference in their document, however if you try to copy the output on the console, and paste it anywhere, the italic formatting is lost.
This is the part of the code:
reference = lastname + ", " + name[0] + ". " + "(" + year + "). " + f'\033[3m{title}\033[0m' + ". " + place + ": " + editorial + "."