Home
Navigation

Typographic Formatter Usage Guide

Typographic Formatter Usage Guide

Overview

The Typographic Formatter is a Python tool that automatically prepares Markdown documents with appropriate typographic markup for Animal Rationis Capax. It applies classical typography principles and integrates with the site's sophisticated ornament and class system.

Usage

python typographic-formatter.py input.md [output.md]

If no output file is specified, the tool creates a new file with _formatted suffix.

What the Tool Does

1. Content Analysis

2. YAML Front Matter

3. Automatic Markup Application

Small Caps

Oldstyle Figures

Contextual Ornaments

Replaces --- with appropriate ornaments:

Typography Classes

Examples

Input:

# A Musical Reflection on Monteverdi

In 1607, Claudio Monteverdi premiered his opera L'Orfeo.

> "Music must touch the heart"

The composer's innovative use of harmony...

---

When I first encountered Monteverdi's music...

Output:

---
title: "A Musical Reflection on Monteverdi"
layout: post
date: 2025-06-09
tags: [musical]
class: essay
---

# A Musical Reflection on Monteverdi

<!-- Drop cap will be automatically applied to the first paragraph -->
In <span class="oldstyle">1607</span>, Claudio Monteverdi premiered his opera L'Orfeo.

<blockquote class="poetic">
  "Music must touch the heart"
</blockquote>

The composer's innovative use of harmony...

<div class="ornament musical"></div>
When I first encountered Monteverdi's music...

Content Type Detection

The tool uses keyword analysis to determine content type:

Essay Classification

Content is classified as an "essay" if it has:

Essays automatically receive:

Integration with Typography System

The tool creates markup that works seamlessly with:

Manual Overrides

You can still manually add classes and markup:

The tool preserves existing markup and works alongside manual formatting.