The title, "How the Sausage is Made," is from a famous quote. "Laws, like sausages, cease to inspire respect in proportion as we know how they are made." (John Godfrey Saxe, 1869. The quote is often misattributed to Mark Twain or Otto von Bismarck.)
In his letter at the beginning of the episode Sherlock references six napoleons. A short story called The Adventure of the Six Napoleons was written by Sir Arthur Conan Doyle.