Skip to content

Formatting Text

Beyond basic Markdown, Opus provides additional formatting options for academic documents.

Text Styles

Basic Formatting

Style Markdown Result
Bold **text** text
Italic *text* text
Bold + Italic ***text*** text
Strikethrough ~~text~~ ~~text~~
Code `text` text

Subscript and Superscript

H~2~O (subscript)
E = mc^2^ (superscript)

Renders as: H~2~O and E = mc^2^

Highlighting

==highlighted text==

Small Caps

[Small Caps]{.smallcaps}

Block Elements

Block Quotes

Use > for quotations:

> The only way to do great work is to love what you do.
>
> — Steve Jobs

For academic quotations with citations:

> The results clearly demonstrate a significant effect on learning outcomes
> [@johnson2023, p. 47].

Admonitions

Opus supports admonition blocks for notes, warnings, and tips:

!!! note "Optional Title"
    This is a note admonition.

!!! warning
    This is a warning without a custom title.

!!! tip
    This is a helpful tip.

Available types: note, tip, warning, danger, info, success

Code Blocks

Specify the language for syntax highlighting:

```python
import numpy as np

def calculate_mean(data):
    return np.mean(data)
```

Supported languages include: Python, R, JavaScript, Julia, MATLAB, LaTeX, and many more.

Academic Formatting

Abstracts

Use a fenced div for the abstract:

::: {.abstract}
This paper examines the relationship between...
:::

Keywords

**Keywords:** machine learning, neural networks, classification

Author Affiliations

In your document metadata:

---
title: "Your Paper Title"
author:
  - name: Jane Smith
    affiliation: University of Example
    email: jane@example.edu
  - name: John Doe
    affiliation: Research Institute
---

Line Numbers

Enable line numbers for code review:

```{.python .numberLines}
def example():
    return True
```

Typography

Smart Quotes

Opus automatically converts straight quotes to curly quotes:

  • "text" → "text"
  • 'text' → 'text'

Dashes

  • -- → en-dash (–) for ranges: pages 10–20
  • --- → em-dash (—) for breaks in thought

Ellipsis

  • ... → ellipsis (…)

Non-Breaking Spaces

Use ~ for non-breaking spaces where you don't want a line break:

Figure~1 shows the results.
Dr.~Smith conducted the study.

Special Characters

Escaping

Use backslash to escape special characters:

\*not italic\*
\[not a link\]

Unicode

You can use Unicode characters directly:

  • Greek letters: α β γ δ
  • Arrows: → ← ↔
  • Math symbols: ≠ ≤ ≥ ± ×

Or use HTML entities:

α β γ
→ ←

Spans and Divs

For custom styling, use spans and divs:

[This text is special]{.highlight}

::: {.centered}
This paragraph is centered.
:::

Next Steps