ogam

What is ogam?

Typographic rules can be trick to enforce in a consistent manner in a document. In French, typographic rules for dialogues are arguably worst. ogam is a domain-specific markup language, intended to free fiction writers from the pain to enforce typographic rules within their productions manually.

Additionally, ogam allows to annotate one’s text with metadata. For instance, it is possible to indicate what character is speaking a given line of dialogue. This paves the road towards being able to discoverability, e.g., finding the list of scenes wherein a given character speaks.

The Language

Formatting

ogam This is a regular sentence.

```html

This is a regular sentence.

```

This is a regular sentence.


ogam *This is a sentence with emphasize.*</p>

```html

This is a regular sentence.

```

This is a regular sentence.


ogam +This is a sentence with strong emphasize.+</p>

```html

This is a sentence with strong emphasize.

```

This is a sentence with strong emphasize.


ogam This +is+ a *sentence with +multiple emphasizes+*.

```html

This is a sentence with multiple emphasizes.

```

This is a sentence with multiple emphasizes.


ogam "This is a +quote+."

```html

“This is a quote.”

```

“This is a quote.”


ogam This +is an "incorrect+" sentence.

```html

This +is an "incorrect+" sentence.

```


ogam This +is an "incorrect+" sentence.

```html

This +is an "incorrect+" sentence.

```

Dialogues

ogam [Hi,| she says.|](Clara)

```html

Hi,” she says.

```

Hi, she says.


ogam [Hi,| she says.| How are you?](Clara)

```html

Hi, she says. How are you?

```

Hi, she says. How are you?


ogam [Hi,| she says.| How are you?](Clara) [I'm fine, thanks.]

```html

Hi, she says. How are you?

I’m fine, thanks.

```

Hi, she says. How are you?

I’m fine, thanks.


ogam [Hi,| she says.| How are you?](Clara) She was smiling. [I'm fine, thanks.]

```html

Hi, she says. How are you? She was smiling. I’m fine, thanks.

```

Hi, she says. How are you? She was smiling. I’m fine, thanks.


ogam It was a hot day. [Hi!| he said.](Aaron) His friends smiled.

```html

It was a hot day.[Hi!| he said.](Aaron) His friends smiled.

```

It was a hot day.[Hi!| he said.](Aaron) His friends smiled.

Paragraphs

```ogam This is a first paragraph.

This is a second paragraph. ```

```html

This is a first paragraph.

This is a second paragraph

``` >

This is a first paragraph.

This is a second paragraph

------------------------ ```ogam [Ceci est une première ligne de dialogue.] [Ceci est une autre ligne de dialogue.] ``` ```html

« Ceci est une première ligne de dialogue.

Ceci est une autre ligne de dialogue.

```

« Ceci est une première ligne de dialogue.

Ceci est une autre ligne de dialogue.

The Implementations

A first implementation of an ogamogmarkup at this time– parser and compiler has been written in Haskell, and has been published on hackage (MIT).

This first project has been deprecated in favor of this rewriting in Rust. Contrary to its predecessor, ogam is released under the terms of the MPL 2.0.