In the first part of the story, Watson recounts being hit by flashbacks of his former life as he passes the door of the building he used to live in with Holmes. Knowing that Holmes still lives there, he feels inclined to pass through that door again and thereby reenter his life as Holmes's friend and sidekick. To capture this nostalgia, he alludes to an earlier Sherlock Holmes novel, A Study in Scarlet:
As I passed the well-remembered door, which must always be associated in my mind with my wooing, and with the dark incidents of the Study in Scarlet, I was seized with a keen desire to see Holmes again, and to know how he was employing his extraordinary powers.
This allusion is unique: a character created by Doyle seemingly refers back to an earlier text written by Doyle, which is also the story in which this character initially came to be. A Study in Scarlet (1887) was the first Sherlock Holmes story to be published. Through this allusion, Doyle reminds his reader that the Sherlock Holmes stories exist not solely as published works in the real world but also as published works in the story's fictional world.
At the end of A Study in Scarlet, in which Holmes solves an intricate crime through impressive means, Watson states that he intends to publish the story to restore Holmes's reputation. Although he solved the crime, the newspapers claim it was all the work of two inspectors from Scotland Yard. When Watson thinks back to "the dark incidents of the Study in Scarlet," he is reminiscing about the actual events that he later fixed in writing. In this sentence, the title of the novel stands in for his memories of the events that preceded its composition. Although Holmes carries out the brunt of the thinking and detecting in stories like A Study in Scarlet, Watson occupies the important role of storyteller.
There is no question that Doyle is the writer of the Sherlock Holmes stories, but it is important to understand that Watson functions as narrator and writer within the bounds of the stories themselves. This allusion shows that A Study in Scarlet, as other Sherlock Holmes stories, doubles as Watson's own story within the fictional world and the story that an actual reader would pick up in our world.
In the first part, Watson attempts to slip out just as the King of Bohemia is about to arrive. Holmes instructs him to stick around, however. Making an allusion to a historical figure, Holmes states that he requires Watson's presence:
Stay where you are. I am lost without my Boswell. And this promises to be interesting. It would be a pity to miss it.
James Boswell, a Scottish lawyer, was the biographer of the celebrated English writer Samuel Johnson. The two men were good friends, and Boswell wrote his biography of Johnson on the basis of notes he made of their interactions and conversations over several years. Since its publication, Life of Johnson has been considered an important work of literature. When Holmes compares Watson to "his" Boswell, he is making several points at once. A notable parallel between the two duos is that Watson, like Boswell with Johnson, records his conversations with and observations of Holmes. He even publishes his accounts of the cases Holmes solves, which brings public attention to his friend. Holmes and Johnson may be the superstars of the pairs, but they both thoroughly respect and rely on their associates.
A touching part of the allusion is that Holmes uses it to indirectly show appreciation for Watson as his good friend. The comparison of Watson to Boswell attests to their friendship. Earlier in the first part, when Watson is first reunited with Holmes, he notes that despite a lack of effusiveness, he thinks his friend is glad to see him. This allusion suggests that Watson's prior assumption is correct. After all, Holmes, Watson, and the reader all know that Holmes is not all that lost without Watson—his extraordinary faculties function perfectly well in Watson's absence. When Holmes says he is lost without his Boswell, he is communicating that he wants Watson around. He expects that the scene with the visitor will be interesting and wants to share it, as well as the larger case to come, with his friend.
Through this allusion, Holmes expresses that he enjoys solving mysteries more when he has Watson by his side. Although Holmes's demeanor and speech tend to be cold and calculated, there are a few small moments over the course of the story in which his more emotional, even sentimental, side shines through.
When the King of Bohemia enters Holmes's apartment in the story's first part, Watson describes his appearance in detail. Combining rich visual imagery with allusion, Doyle develops the character as an imposing, yet also ostentatious and naive, member of the uppermost elite:
A man entered who could hardly have been less than six feet six inches in height, with the chest and limbs of a Hercules.
Hercules is a Roman mythological figure known for his immense strength and exceptional feats. Although many facets of his character are positive and inspire admiration, he is also emotional and violent. As a result of this, he is occasionally portrayed as naive and reckless. These ambiguous associations are present when Watson compares the newly arrived visitor to Hercules. His figure may appear tall and strong, but other elements of his appearance keep Holmes and Watson from taking him entirely seriously.
In particular, Watson focuses on the visitor's clothing, writing that in England, it would "be looked upon as akin to bad taste." Watson goes on to describe the elements of his outfit in detail, using rich imagery to develop the character as ridiculous.
Heavy bands of astrakhan were slashed across the sleeves and fronts of his double-breasted coat, while the deep blue cloak which was thrown over his shoulders was lined with flame-coloured silk and secured at the neck with a brooch which consisted of a single flaming beryl.
Whatever esteem the character's stature may have aroused in Holmes, Watson, or the reader is promptly dispelled by his garish clothing. With a description of the visitor's fur-trimmed boots, Watson concludes that this completes "the impression of barbaric opulence which was suggested by his whole appearance." To top it all off, he is wearing a broad-brimmed hat and a black vizard mask. His other clothing makes the presence of the mask ironic. Covering the top half of his face does very little when he is otherwise adorned in such over-the-top royal attire. The ludicrous attempt at disguise makes it easy for Holmes to conclude that, far from merely representing a royal house, his visitor is the prominent member of European royalty.
When Holmes reveals his visitor's identity, the allusion to Hercules becomes all the more apt. Hercules was the son of Jupiter, the Roman king of the gods. Although his great courage and exceptional strength come from the same place, Hercules's pitfalls are a result of his divine origins. He lives like a mortal but has the strength of a god, which makes it hard for him to regulate his powers. Similarly, it is safe to assume that the King of Bohemia has acquired his royal title through a patrilineal chain of succession. The identity of his parents has given him a life of opulence and influence, but it has also placed some limits on him. At multiple points in the story, for example, he regrets that his high station prevents him from maintaining a relationship with Irene Adler. It is because he is a king that he cannot afford to have the scandalous photo publicized.
In the second part of the story, Watson witnesses Holmes in disguise on two separate occasions. The first time, he has to look three times before feeling "certain that it was indeed he." The second time, he uses allusion to describe how much he admires Holmes's extraordinary talent for disguising himself:
His broad black hat, his baggy trousers, his white tie, his sympathetic smile, and general look of peering and benevolent curiosity were such as Mr. John Hare alone could have equalled.
John Hare was an English actor and theater manager whose lifetime nearly aligns with that of Sir Arthur Conan Doyle. He was very well-known, and contemporary readers would have recognized the name. Hare was especially known for his talent for impersonating body language and facial expressions. When Watson compares Holmes dressed as a clergyman to John Hare, he suggests that his friend is a talented actor. He usually expresses admiration for Holmes's powers of deduction, but in this moment he admires him for his ability to perform. Watson proceeds to explain what makes Holmes's disguises so effective:
It was not merely that Holmes changed his costume. His expression, his manner, his very soul seemed to vary with every fresh part that he assumed. The stage lost a fine actor, even as science lost an acute reasoner, when he became a specialist in crime.
Watson is left in awe over his friend's way of embodying the characters he dresses up as. Ultimately, Holmes's talent for disguise and performance goes hand in hand with his deductive skills. As a keen observer, he is intimately familiar with how people behave and look and is thus able to mimic people when he needs to conceal his identity and assume that of another.