Skip to content

chaoxu/coflat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,370 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coflat

Coflat is a semantic document editor for mathematical writing. It targets papers, notes, books, and lecture-style documents that need equations, theorem-like blocks, citations, cross-references, figures, tables, and Pandoc export.

The app has one shared markdown boundary format and two editor surfaces: CM6 rich mode and CM6 source mode.

Quick Start

pnpm install
pnpm dev        # browser app at localhost:5173
pnpm tauri:dev  # desktop app

Useful verification commands:

pnpm typecheck
pnpm test
pnpm test:browser
pnpm build

Documentation

Start here:

Implementation details live under docs/architecture.

Document Model

Coflat documents are Pandoc-flavored markdown. The format uses Pandoc-native constructs wherever possible:

  • YAML frontmatter for document metadata and editor/export settings.
  • Fenced divs for theorem-like blocks, proofs, figures, tables, and custom semantic blocks.
  • $...$, $$...$$, \(...\), and \[...\] for math.
  • pandoc-crossref-style labels such as {#eq:einstein}.
  • [@id] syntax for citations and cross-references.

Pandoc owns export. The editor does not run Pandoc in the live editing loop.

Editor Surfaces

  • CM6 rich mode keeps markdown as the live source of truth and renders rich widgets over it.
  • CM6 source mode edits the raw markdown.

The app shell, file IO, semantic services, document format, and Tauri backend are shared across surfaces.

Stack

  • TypeScript, React, Vite
  • CodeMirror 6
  • Lezer markdown parsing with Coflat extensions
  • KaTeX
  • Tauri v2 desktop shell
  • Rust backend for filesystem/native commands

Development

The common local loop is:

pnpm dev
pnpm test:focused -- <test-file>
pnpm check:pre-push

For browser-driven checks:

pnpm dev
pnpm test:browser

For a stable manual review server:

pnpm dev:show

See docs/verification-workflows.md for the full verification map.

About

Note taking and collaboration tool for mathematicians.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors