OfficeIMO.Markup is a Markdown-inspired authoring layer for OfficeIMO. It parses .omd or Markdown-like text into a semantic AST that can be validated, emitted as starter code, or exported to real Office files by target-specific renderers.
This project is built from the OfficeIMO source tree and is not published as a standalone NuGet package.
The pipeline is intentionally staged:
- Parse Markdown, front matter, and OfficeIMO directives.
- Produce a semantic AST independent from C# and PowerShell APIs.
- Validate the AST against a document, workbook, or presentation profile.
- Emit starter C# or PowerShell code when a user wants to take over in code.
- Export real Office files through profile-specific exporter packages.
---
profile: presentation
title: Quarterly Review
theme: evotec-modern
---
# Quarterly Review
@slide {
layout: title-and-content
transition: fade
}
- Revenue grew
- Churn improved
::notes
Open with the top-line result.using OfficeIMO.Markup;
OfficeMarkupParseResult result = OfficeMarkupParser.Parse(File.ReadAllText("quarterly-review.omd"));
foreach (OfficeMarkupDiagnostic diagnostic in result.Diagnostics) {
Console.WriteLine($"{diagnostic.Severity}: {diagnostic.Message}");
}
if (result.HasErrors) {
throw new InvalidOperationException("Markup contains validation errors.");
}
Console.WriteLine(result.Document.Profile);
Console.WriteLine(result.Document.Metadata["title"]);using OfficeIMO.Markup;
OfficeMarkupParseResult result = OfficeMarkupParser.Parse(File.ReadAllText("document.omd"));
string csharp = new OfficeMarkupCSharpEmitter().Emit(result.Document,
new OfficeMarkupEmitterOptions {
FilePathVariable = "outputPath",
IncludeHeader = true
});
File.WriteAllText("document.generated.cs", csharp);using OfficeIMO.Markup;
using OfficeIMO.Markup.Word;
OfficeMarkupParseResult result = OfficeMarkupParser.Parse(File.ReadAllText("status-brief.omd"));
result.Document.SaveAsWord("status-brief.docx", new MarkupToWordOptions {
});- Common Markdown structure through
OfficeIMO.Markdown: headings, paragraphs, lists, fenced code, images, and pipe tables. - Front matter for document-level metadata and target profile selection.
- Container directives such as
@slide,@section, and@sheet. - Office-aware blocks such as
::notes,::chart,::mermaid,::range,::formula,::table,::textbox,::columns,::column, and::card. - Semantic chart, workbook, slide, document, layout, and style attributes that exporters can map to editable Office features.
OfficeIMO.Markupowns parsing, semantic AST, validation, and code emission.- Word export belongs in
OfficeIMO.Markup.Word. - Excel export belongs in
OfficeIMO.Markup.Excel. - PowerPoint export belongs in
OfficeIMO.Markup.PowerPoint. - CLI workflows belong in the
officeimo markupcommand area inOfficeIMO.Tool. - VS Code authoring support belongs in
OfficeIMO.Markup.VSCode.
| Package | Use it for |
|---|---|
| OfficeIMO.Markup.Word | Export markup documents to Word. |
| OfficeIMO.Markup.Excel | Export markup workbooks to Excel. |
| OfficeIMO.Markup.PowerPoint | Export markup presentations to PowerPoint. |
| OfficeIMO.Tool | Parse, validate, emit, and export from the officeimo markup command area. |
| OfficeIMO.Markdown | Markdown model used by the markup parser. |
- Targets:
netstandard2.0,net8.0,net10.0. - License: MIT.
- Repository: EvotecIT/OfficeIMO
- External: None.
- OfficeIMO:
OfficeIMO.MarkdownandOfficeIMO.Core; the semantic authoring model and validation are first-party.
See the complete OfficeIMO package map for related formats and conversion paths.