> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nemu.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Inline content

> Strong, em, strike, links, inline code, and inline formulas, with markdown shortcuts

Anywhere a block takes `text`, it accepts inline content. That is a string, one inline node,
or an array mixing both.

```ts theme={null}
type InlineContent = string | Inline | Array<string | Inline>;
```

## The Inline union

```ts theme={null}
type Inline =
  | { type: "strong"; text: InlineContent }
  | { type: "em"; text: InlineContent }
  | { type: "strike"; text: InlineContent }
  | { type: "link"; text: InlineContent; href: string }
  | { type: "formula"; text: string }
  | { type: "code"; text: string };
```

<ParamField path="strong" type="{ text }">
  Bold text, rendered as a real bold weight from the variable font.
</ParamField>

<ParamField path="em" type="{ text }">
  Emphasis. The bundled fonts are upright only, so emphasis renders upright. See
  [Fonts and weights](/packages/pdf/doc/fonts).
</ParamField>

<ParamField path="strike" type="{ text }">
  Struck through text.
</ParamField>

<ParamField path="link" type="{ text, href }">
  A hyperlink to `href`.
</ParamField>

<ParamField path="formula" type="{ text }">
  Inline LaTeX. See [Formulas](/packages/pdf/doc/formulas).
</ParamField>

<ParamField path="code" type="{ text }">
  Inline monospace code.
</ParamField>

## Nodes nest

Inline nodes nest, so a link can contain a formula and a strong run can contain a link. The
`text` of any node is itself inline content.

```ts theme={null}
{ type: "link", href: "https://example.com", text: { type: "strong", text: "spec" } }
```

## Markdown shortcuts

When markdown is enabled, plain strings also honor `**bold**`, `*italic*`, `~~strike~~`, and
`$inline math$`. Markdown parsing is on by default in `Doc`.

```ts theme={null}
{ type: "paragraph", text: "Revenue grew **across every region** this quarter." }
```

<Note>
  Structured inline nodes always format regardless of the markdown flag, and they are the
  reliable path for generated content. Reach for markdown shortcuts in hand written prose and
  for structured nodes when text is assembled programmatically.
</Note>

## A mixed example

```ts theme={null}
{
  type: "paragraph",
  text: [
    "See the ",
    { type: "link", href: "https://example.com", text: { type: "strong", text: "spec" } },
    " and the identity ",
    { type: "formula", text: "e^{i\\pi} + 1 = 0" },
    ".",
  ],
}
```
