1

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?

2

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

(from https://help.apple.com/pages/mac/5.6/index.html?localePath=en.lproj#/tan7aaef6765)

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:

  1. 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.

  2. 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.

  • Where do you set these "character styles"? I can't find any such thing – Alexander Nov 24 '15 at 21:02
  • It was less obvious than I remembered! I edited my answer to include instructions. – samh Nov 25 '15 at 21:54
  • Wow, it's only 3 lines down from the Paragraph Style selection menu... Don't know how I missed that! – Alexander Nov 26 '15 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .