Right, so I figured I'd write out some (hopefully readable) thoughts with regards to quotation marks, speech tags, and punctuation, and how they work together. I'm mostly doing it because the idea won't leave my head and I have to put it down somewhere. This is apropos of nothing, and not targeting anyone in specific or anything. Just a general guide that my brain wouldn't leave me alone about until I wrote.
To start off with, quotation marks. They're great. While it's possible to make dialogue without them, and there are works that don't use them, they're pretty universal in English writing. They're often, but not always, combined with a speech tag, either before, in the middle, or after them. That's your 'he said', 'she whispered', etc. Now, keep in mind that I typically use American-style grammar, and I know the rules are a bit different should you use a British style. I believe that prefers single quotation marks (or 'inverted commas') and puts (unquoted) punctuation outside of them, along with some slightly different rules about inline quotes?
To start simply, let's look at speech tags that are before or after a sentence. A speech tag is part of the sentence, as it gives extra context as to who is speaking and (sometimes, but not always) the way they say what they're saying. As a side note, 'said' is fine nearly every time. It's an invisible word that a reader will take as read, without disturbing the flow. There are, of course, times when you want something weaker or stronger, but those should be sprinkled in, not used every time. Even if a character is known for speaking loudly or quietly, you'd still emphasize that only sometimes. Seeing 'he yelled' every time would stand out, and the reader can usually be trusted to remember things. If they haven't been in the story for a while, reinforcing it certainly helps, but 'said' should still be your default, and 'asked' can be just about as invisible. You typically want to trust your reader to pick tone up and show it through what's being said, not just tell it with something like 'yelled angrily'. Odds are good the reader already picked up on the volume and emotion just from the line of dialogue and/or the actions the character does. But I digress. Speech tags. As they're part of the sentence, even if the sentence in your quotation marks ends before the speech tag, the ending period goes after the tag, and a comma goes inside the quotation marks. If the quote is a question or exclamation, then the respective punctuation marks are used instead of the comma. Note that, even though in those cases, that is usually closing punctuation, the speech tag is still a part of the sentence.

"Much like this," I said.

Since it's part of the sentence, you'd keep the first letter of words that aren't 'I' or names/titles lowercase after the quotation mark.
When you want the speech tag to go before it, then the comma sits before the quotation marks.

"I looked around, saying, "You know, like this."

Though note that not everything around a quote works like that. I specifically mention speech tags because they modify speech, and are about what is in the quotation marks. For instance, in the last example. 'Saying' is showing me speaking, setting it into a normal tone. I could remove it, but there'd have to be a period before the quotation marks, since looking around is a separate action, and thus a separate sentence, from what's said in the dialogue.

With a nod, I looked back down at my notes. "Just like that."

If I wanted to modify that line, I could decide to put a speech tag before or after it. Before would look like the example before this; after would have the period inside the quotation marks replaced with a comma and then the speech tag would exist, being closed after with closing punctuation. If the verb in question is about the speech (how loud/quiet it is, the tone, etc.), then it's included in the same sentence as the speech. To that end, '"Oh, yeah," he smirked.' would be wrong, since that's a separate non-speech action. You could easily say 'said with a smile', and that'd be fine because you're describing the speech and modifying the tone of it.
As a slightly more intermediate lesson, when using a speech tag in the middle of a sentence, commas go on both sides of it.

"Hey, Anon," I say, "here are some tips for you."

As the sentence doesn't end after the name, a comma goes on the other side of the speech tag, and, if that were about someone else, and I just used a pronoun in the speech tag, it would be lowercase.
However, note that tone can come in to play on this, and is a good thing to consider in how the tone affects sentence structure. Consider the following:

"Anon," I chide. "You know better than to doompost the whole thread."

You can feel the difference between them, when the name is a whole sentence to itself. It has a more serious, final feeling. Some characters will be terse, and showing this in how they speak with their sentence structure is a good way to let the reader know.
As for sentences that do end before the speech tag, but the person continues talking, you put a period after the speech tag, as it's the end of the sentence. It's easy to think those should just use commas on both sides, but the earlier sentence has ended, and so ending punctuation is needed.

"It'd be something like this," I said. "I hope that helps out."

Usually, you don't need another speech tag later, even if there's multiple sentences all at once. After all, you've already set the tone and said who's speaking earlier. If that tone shifts, then you'd note it.
Now, if you want to be fancy, you can try new things. For instance, what if an action is in the middle or interrupting the speech in question? Depending on the flow, you could just put it in a speech tag that the character said it while doing something.

"Oh, that? It's back there," she said, gesturing vaguely at the pile on the table at the back of the room, "somewhere near the bottom. I think."

Note that that's along with a speech tag. (A more short-spoken character might have had a period after 'room' if they broke up their sentence like that, in which case the following S would be capitalized.) If your character is pointing at something in the middle of a sentence, you can't just use commas for the action without some form of 'said' being involved. However, you could interrupt the sentence. An interruption normally is shown with an emdash (—). (Word processors will typically turn two hyphens into one, or you can use Alt+0151 on a numpad on a Windows computer to insert one.) Consider the following example, between two established characters:

"That's ridiculous, you can't—"
"But I can!"

In that case, the emdash is inside the quotation marks because it cuts off the words that would be said. You'd do the same if you cut off in the middle of a word.
When you want to interrupt a line of dialogue for action and continue it afterward, things get a bit weird, however. The action interrupting gets surrounded by emdashes, and there's no punctuation in the quotation marks around it.

"You mean, in all this time, you" —she poked her subordinate in the chest— "never bothered to sort that out?"

With such an interruption, you don't have to wait for a pause in the sentence like if you were using commas and a speech tag to add on an action, but notice how it changes the tone of the sentence. Even if, to go back to the previous example, that was more interrupted rather than just being casual about it and using speech tags along with the action, the tone changes.

"Oh, that? It's back there" —she gestured vaguely at the pile on the table at the back of the room— "somewhere near the bottom. I think."

You might have noticed those lines didn't have speech tags. Not every line needs a speech tag. If it's obvious who's speaking and what their tone is from the dialogue itself, then that's perfect there. Different genres are going to use things differently according to their flow, and there'll be similar difference in different sorts of scenes. When action and tension kicks up, you'll want things to be punchy, and not having speech tags except when needed helps there. When things slow down and you're writing a tender date scene, you'll want to talk about smaller differences in tone and expression. Long conversations can go several lines without one. But in general, the rule of "show, don't tell" applies. You want the reader to be able to tell from what's being spoken or the actions they do (something to keep in mind: describe some of the actions of the rest of the body that match the mood and how they interact with the environment, not just what their head and face is doing), not just because you told them. You could say that they 'spoke worriedly', and that would be okay, though not amazing. You could show how their face scrunched up with worry and anxiety, and that would be effective in some situations. Or you could talk about how, while they're talking, they're pacing back and forth, or can't keep their legs still while they sit, or fidget. This shows there's some anxious energy in them without having to directly tell the reader that.
However, despite how 'rules' get thrown about, grammar can be flexible, and in creative writing, rules can be bent and even broken for effect and tone. However, you want to keep your reader in mind and also, in this case, how the AI might work with it.

Edit
Pub: 12 Mar 2023 23:28 UTC
Views: 303