Tone in literature can have two manifestations. The first, and most often referred to, is the author's tone. This expresses the author's feeling for the subject at hand. It is usually made clear in the opening lines and is indicated through diction, vocabulary and, for Hemingway particularly, symbolism linked to setting:
On this side there was no shade and no trees and the station was between two lines of rails in the sun.
The other type of tone in literature is the tone of voice of the characters as they engage in conversation or self-thought or stream of consciousness thoughts. In "Hills Like White Elephants," in keeping with Hemingway's minimalism, there are subtle indicators of character's tone of voice. As with authorial tone, character tone may be indicated through vocabulary and diction in conjunction with silence, attention and reported facial or body expressions.
One example of character tone occurs in an early part of their conversation:
‘It tastes like liquorice,’ the girl said and put the glass down.
‘That’s the way with everything.’
‘Yes,’ said the girl. ‘Everything tastes of liquorice. Especially all the things you’ve waited so long for, like absinthe.’
‘Oh, cut it out.’
In this exchange, the girl rightly remarks that the absinthe tastes like liquorice. The man absent mindedly replies, without any logic to his reply, that everything is found to taste like liquorice. The girl,of course noticing his meaningless remark, replies sarcastically that, yes, everything tastes like liquorice. The man's attention is finally caught and his temper flare and he requires that she stop her sarcasm.
First, Hemingway indicates the tones in this example through logic and vocabulary. Saying everything is like liquorice is illogical, thus expressing a distracted tone. "Oh, cut it out" is a colloquial expression that is an idiom (cut it out) and casual diction, that facilitates the expression of his tone of irritation. Second, the girl's tone of sarcasm is indicated through pause and vocabulary. She has a pointed pause after saying "Yes" that is followed by exaggerated words that produce hyperbole: everything, especially, all, so long. These hyperbolic vocabulary choices indicate the girl's sarcasm; the man recognizes her sarcastic tone as well as we do ("On, cut it out.").
Incidentally, sarcasm is an extreme form of irony thus they are not synonymous terms. The big difference that sets sarcasm apart from irony is that sarcasm is intended to hurt and insult the other person while irony is meant only to point out that a result or event etc is different from what was expected.