Skip to content

Style Presets

Style presets control the visual appearance of your document — fonts, margins, colors, spacing, and page layout.

Built-in Presets

Preset Font Size Page Spacing Best For
academic Times New Roman 12pt A4 1.5 Research papers, theses
modern Calibri 11pt A4 1.15 Reports, presentations
report Calibri 11pt Letter 1.15 Business reports
formal Georgia 12pt A4 1.5 Legal, formal letters
minimal Helvetica 10pt A4 1.15 Notes, quick drafts

Using a Preset

from papersmith import SmithDocument

doc = SmithDocument(preset="academic")

Listing Available Presets

from papersmith.core.styles import list_presets

print(list_presets())
# ['academic', 'formal', 'minimal', 'modern', 'report']

Or via CLI:

papersmith presets

Custom Presets

Pass a dictionary to define a custom style:

doc = SmithDocument(preset={
    "name": "my_style",
    "font": "Arial",
    "font_size": 11,
    "heading_font": "Arial Black",
    "page_size": "Letter",
    "margins": {
        "top": 2.0,
        "bottom": 2.0,
        "left": 2.5,
        "right": 2.5,
    },
    "color": "#1a1a1a",
    "heading_color": "#0066cc",
    "line_spacing": 1.15,
    "paragraph_spacing_after": 6,
    "first_line_indent": 0.0,
    "justify": False,
})

Preset Options

Option Type Default Description
name str "custom" Preset name
font str "Times New Roman" Body text font
font_size int 12 Body text size in points
heading_font str Same as font Heading font
page_size str "A4" Page size: "A4" or "Letter"
margins dict 2.54cm all sides Top, bottom, left, right in cm
color str "#000000" Body text color (hex)
heading_color str "#000000" Heading text color (hex)
line_spacing float 1.5 Line spacing multiplier
paragraph_spacing_after int 8 Space after paragraphs in points
first_line_indent float 0.0 First line indent in cm
justify bool False Justify paragraph text