1. I laugh. Don't laugh, I tell myself. Think of tomorrow's math test. That works. I sit quietly.

--------------------------------------------------------
In the book, 'Don't laugh' is in italic type.
In the book 'Think of tomorrow's math test.'is in italic type.
In that case, what is the role the sentences in italic type?
To emphasize 'Don't laugh', was it inverted?

The italicized words are what the speaker is thinking or saying to himself. We would not italicize them. I would put them in quotation marks. Italics are for emphasis. To use the italics is acceptable, but the quotation marks should also be there.

The sentences in italic type serve as a way to distinguish them from the rest of the text and give them emphasis. In this particular excerpt, the purpose of italicizing the sentences "Don't laugh" and "Think of tomorrow's math test" may be to convey the internal thoughts or instructions that the protagonist is giving to themselves. Italicizing these sentences helps the reader differentiate them as thoughts or internal dialogue rather than regular narration.

Italicizing text is a common formatting technique used in literature to draw attention to certain words or phrases, add emphasis, or indicate direct thoughts or inner dialogue. In this case, it helps the reader understand the character's internal struggle and mindset. However, it is important to note that the decision to italicize certain sentences is ultimately up to the author's choice and style.