The Scottish capital has hosted a series of events over the past two decades highlighting its literary credentials.