I'm trying to write code snippets inline with prose text, much like the
back ticks (``) in markdown in Pages (
version 5.6.1). I have a "code" paragraph style, and a "body" paragraph style. Is there a way to intermix the two on the same line/paragraph?
You need to use a character style for code, and then perhaps use a "code block" paragraph style for code blocks that are, well, paragraphs. Think about this: if the code paragraph style is double spaced and your prose paragraph style is 1.5 spaced, which one "wins" when the break is mid-line?
To add a new Character Style in pages
Select the character with the formatting you want to save as a style.
Click the Style button near the top of the sidebar on the right.
If you don’t see a sidebar, or the sidebar doesn’t have a Style button, click Format button in the toolbar. If the text is in a text box, table, or shape, first click the Text tab at the top of the sidebar, then click the Style button.
In the Font section, click the pop-up menu next to Character Styles, then do one of the following:
Create a new style with a new name: Click New style button in the top-right corner of the Character Styles menu, then type a name for the style.
Create a new style based on an existing style: Move the pointer over the style name in the list, click the arrow that appears, then choose Redefine from Selection (characters that used the original style aren’t changed).
Type a name for the style.