Skip to main content

User Guide

Complete guide to using OmniScript Format

Overview

OmniScript Format (OSF) is a universal document description language that combines the best features of multiple document types into a single, easy-to-learn format.

With OSF, you write content once in plain text and export it to multiple formats including PDF, Microsoft Word (DOCX), PowerPoint (PPTX), and Excel (XLSX).

Block Types

OSF documents are composed of blocks. Each block starts with @blocktype followed by its content in curly braces.

@meta - Document Metadata

Every OSF document should start with a @meta block containing document information.

@meta {
  title: "My Document";
  author: "Your Name";
  date: "2025-10-16";
  version: "1.1";
  theme: "Corporate";
}

Properties: title, author, date, version, theme, tags, description

@doc - Document Content

Write document content using Markdown syntax for rich text formatting.

@doc {
  content: "# Welcome to OmniScript

  This is a **bold** statement and this is *italic* text.
  
  New in v1.1: ~~Strikethrough~~ support and unicode ✓

  ## Features
  - Easy to learn
  - Powerful exports
  - Git-friendly

  Here's a [link](https://example.com) and some `code`.
  ";
}

Supports: Headings, bold, italic, lists, links, code, blockquotes, tables

@slide - Presentation Slides

Create presentation slides with various layouts and bullet points.

@slide {
  title: "Product Features";
  layout: "TitleAndBullets";
  bullets {
    "🚀 Fast and efficient";
    "💡 Easy to use";
    "🔒 Secure by default";
  }
}

Layouts: TitleSlide, TitleAndContent, TitleAndBullets, TwoColumn, Blank

@sheet - Spreadsheet Data

Define spreadsheet data with columns, rows, and formulas.

@sheet {
  name: "Sales Data";
  cols: [Product, Q1, Q2, Total];
  data {
    (2,1)="Widget A"; (2,2)=100; (2,3)=150;
    (3,1)="Widget B"; (3,2)=200; (3,3)=250;
  }
  formula (2,4): "=B2+C2";
  formula (3,4): "=B3+C3";
}

Features: Cell references, Excel formulas, automatic calculations

@chart - Data Visualization (v1.0)

Create interactive charts with multiple types and customization options.

@chart {
  type: "bar";
  title: "Quarterly Revenue";
  data: [
    { label: "Q1"; values: [100]; },
    { label: "Q2"; values: [150]; },
    { label: "Q3"; values: [200]; }
  ];
  options: {
    xAxis: "Quarter";
    yAxis: "Revenue ($K)";
    legend: true;
  };
}

Types: bar, line, pie, scatter, area • Full docs →

@diagram - Visual Diagrams (v1.0)

Create flowcharts, sequence diagrams, Gantt charts, and mind maps.

@diagram {
  type: "flowchart";
  engine: "mermaid";
  title: "User Login Flow";
  code: "
    graph TD
      A[Start] --> B{Valid User?}
      B -->|Yes| C[Dashboard]
      B -->|No| D[Error]
      D --> A
  ";
}

Types: flowchart, sequence, gantt, mindmap • Engines: mermaid, graphviz • Full docs →

@code - Syntax Highlighted Code (v1.0)

Display code with syntax highlighting, line numbers, and annotations.

@code {
  language: "typescript";
  caption: "Hello World Example";
  lineNumbers: true;
  highlight: [1, 3];
  code: "
    function hello(name: string) {
      console.log(`Hello, ${name}!`);
    }
    hello('World');
  ";
}

Languages: 50+ supported including TypeScript, Python, Java, Go, Rust • Full docs →

Best Practices

✅ DO: Start with @meta

Always begin your OSF file with a @meta block containing at least a title.

✅ DO: Use consistent property names

Follow the documented property names exactly (case-sensitive).

✅ DO: Escape special characters

Use backslashes to escape quotes and special characters in strings.

❌ DON'T: Mix block types incorrectly

Each block should contain only its appropriate properties.

❌ DON'T: Forget semicolons

All property assignments must end with a semicolon.

Next Steps