Skip to content

Commit 1331f32

Browse files
authored
1.4.0
1.4.0
2 parents a4bf06b + 6699706 commit 1331f32

29 files changed

+880
-108
lines changed

.changeset/config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "master",
9+
"updateInternalDependencies": "patch",
10+
"ignore": [
11+
"docs"
12+
]
13+
}

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
3939
- uses: actions/cache@v3
4040
name: Setup pnpm cache
41+
env:
42+
STORE_PATH: ${{ env.STORE_PATH }}
4143
with:
4244
path: ${{ env.STORE_PATH }}
4345
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# obsidian-fountain-editor
2+
3+
## 1.4.0
4+
5+
### Consistent document layout widths
6+
7+
Enforce consistent layout widths by using CSS `ch` instead of ratio widths. (fixes #59)
8+
9+
This ensures consistency in the word wrapping and line breaks between (1) how you see it in Obsidian, and (2) your final rendered PDF.
10+
11+
Of course, that's assuming you don't meddle too much with CSS in Obsidian, as well as standard Fountain-to-PDF settings. This is accomplished by using the `ch` width unit, which ensures consistent width since screenplays use a monospace font. You can be confident in how the
12+
13+
Minor breaking change: if you were previously using the old CSS tokens for widths (e.g. `--fountain--character-left-factor`), they are removed, and instead simplified to just 4 tokens:
14+
15+
```css
16+
// Current default tokens:
17+
--fountain-line-width: 60ch;
18+
--fountain-character-line-width: 16ch;
19+
--fountain-dialogue-line-width: 38ch;
20+
--fountain-parenthetical-line-width: 29ch;
21+
```
22+
23+
This sleeker, cleaner method, unfortunately, becomes funky-looking when on the most popular Obsidian theme. Minimal provides some really cool line-width utilities, which is why I personally use it, but it breaks this.
24+
25+
There is now a toggle in Settings to fix the styling if you are using Minimal theme.
26+
27+
### Markdown Blockquote Annotations
28+
29+
You can now use Markdown blockquotes as screenplay annotations. This is a new more stable alternative to the `%% Obsidian comment %%` annotation -- see [#58](https://github.com/chuangcaleb/obsidian-fountain-editor/pull/58/files). There is also now a setting to opt-out of formatting Fountain forced-Transitions.
30+
31+
Note that if you use Markdown blockquotes, you will need to strip your document of blockquotes before rendering Fountain to PDF.
32+
33+
- 1a75126: Skip processing Obsidian multi-line blockquotes as Fountain forced Transitions
34+
- a298bc0: Add option to opt-out of formatting Fountain forced-Transitions
35+
36+
### Technical
37+
38+
- 0ce2783: dx: manage versioning with changesets

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "docs",
33
"type": "module",
44
"version": "0.0.1",
5+
"private": true,
56
"scripts": {
67
"dev": "astro dev",
78
"start": "astro dev",

docs/src/assets/blockquote.png

137 KB
Loading

docs/src/assets/synopsis.png

136 KB
Loading

docs/src/content/docs/contributing/known-issues.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ banner:
66

77
- Boneyard token `*/` is formatted as emphasis/italics by Obsidian. In Live Preview, the `*` the syntax token is hidden.
88
- I don't use Boneyards as much, especially now with the `%% Obsidian comment %%` syntax. Low priority.
9+
- Validated on Default theme. May not work on every theme
910

1011
## Roadmap
1112

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: 🎨 CSS Tokens
3+
sidebar:
4+
order: 5
5+
---
6+
7+
You can use [Obsidian's CSS snippets](https://help.obsidian.md/snippets) to tweak the styling.
8+
9+
Currently, you can find these defaults at [base.css](https://github.com/chuangcaleb/obsidian-live-fountain/blob/master/src/styles/base.css)
10+
11+
```css
12+
/* src/styles/base.css */
13+
14+
/* Screenplay font. */
15+
--fountain-font-family: "Courier Prime", "Courier New", "Courier", monospace;
16+
17+
/*
18+
* Line widths for each token.
19+
* Also determines left-right margins.
20+
*/
21+
--fountain-line-width: 60ch;
22+
--fountain-character-line-width: 16ch;
23+
--fountain-dialogue-line-width: 38ch;
24+
--fountain-parenthetical-line-width: 29ch;
25+
26+
/* Color of text in %% Obsidian comment %% blocks and <!-- HTML comments --> (not set). */
27+
/* --fountain-code-comment: */
28+
```
29+
30+
Technical note: it is recommended to use the CSS `ch` width unit, to ensure consistent layout with industry-standard rendered PDFs of screenplays. This can be achieved since monospace fonts have consistent character widths -- read more at [Sizing Units | web.dev](https://web.dev/learn/css/sizing/#absolute_lengths).
31+
32+
Roadmap plans so far:
33+
34+
- Toggle italics on parenthesis
35+
- Toggle italics on character extensions
36+
- Toggle bold on scene headings
37+
- Toggle bold on transitions
38+
- Toggle bold on centered text

docs/src/content/docs/references/marking-fountain.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: 🖋️ Marking Files for Fountain
3+
sidebar:
4+
order: 1
35
---
46

57
There are currently three ways to convert a regular Obsidian note into a hybrid Markdown+Fountain note.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: 🙋‍♂️ Opting Out to Markdown
3+
sidebar:
4+
order: 3
5+
---
6+
7+
When a file is marked for Fountain formatting, the whole file is treated as Fountain, by default. For those who like to annotate in their screenplay, there are a variety of escape-hatch methods to do so.
8+
9+
## Fountain Synopsis
10+
11+
Fountain's [Synopses](https://fountain.io/syntax/#sections-and-synopses) is treated by the processor as a valid line of Fountain, but it does not receiving any additional styling (notably, the custom screenplay font isn't applied).
12+
13+
```md title="Synopsis.fountain.md"
14+
= Any line that starts with a `=` symbol is treated as a **Fountain Synopsis**.
15+
```
16+
17+
Technically, it still applies the `cm-fountain-synopsis` class name, but Fountain Synopsis and Headings are excluded from additional Fountain styling.
18+
19+
![demo of using synopsis](/src/assets/synopsis.png)
20+
21+
- Pros:
22+
- Valid Fountain syntax, so you don't need any pre-processing to strip it out or whatever.
23+
- Cons:
24+
- Only applied per-line, it gets tiring to type out the `=` prefix on every line. Besides, I don't think multi-line synopsis is the intended use-case for Fountain.
25+
- Not supported by Obsidian
26+
27+
---
28+
29+
## Obsidian/Markdown Blockquote (recommended)
30+
31+
Obsidian's [Block/quotes](https://help.obsidian.md/syntax#Quotes) syntax conflicts with Fountain's Forced [Transition](https://fountain.io/syntax/#transition) syntax -- read details at [Syntax Conflicts](/resources/syntax-conflicts/).
32+
33+
However, [if you know how to strip out all the blockquotes before rendering your PDF](/resources/longform), and by [enabling an optional setting](️/references/settings/#-prefer-obsidians-blockquote-over-fountains-forced-transition), you can use liberally blockquotes everywhere!
34+
35+
```md title="Blockquote.fountain.md"
36+
> Usually, this is Fountain's forced Transition.
37+
38+
> But if there is a non-empty line before or after...
39+
> Then it is treated like a regular Obsidian-markdown blockquote!
40+
41+
> But you can opt-out entirely with the setting: "Prefer Obsidian's blockquote over Fountain's forced Transition"
42+
43+
> [!important]
44+
> You can even use callouts!
45+
```
46+
47+
This is the plugin author's recommended way to annotate screenplays with markdown.
48+
49+
![demo of using blockquote](/src/assets/blockquote.png)
50+
51+
- Pros
52+
- Natively supported by Obsidian
53+
- Can be converted into Obsidian Callouts!
54+
- No rendering issues, CLEAN!
55+
- Spans across multiple lines
56+
- Cons
57+
- Requires a step of processing to strip out blockquotes before PDF render
58+
- Requires an indented `>` prefix, not flush with document body. However...
59+
- Some people sees this clearly defined annotation area, as a win
60+
- Native Obsidian support provides that auto-formatting and commands
61+
62+
---
63+
64+
## Obsidian Comments
65+
66+
Text enclosed within `%% Obsidian comment symbols %%` don't receive Fountain formatting, so they look just like regular markdown!
67+
68+
This is no longer the recommended way to annotate screenplay, since we found [an issue](https://github.com/chuangcaleb/obsidian-fountain-editor/pull/58) where a large comment area would break the plugin's Fountain formatting. It is still however a usable way to opt-out into markdown.
69+
70+
```md title="Obsidian Comments.fountain.md"
71+
%%
72+
Text inside here will be regular markdown!
73+
%%
74+
75+
```
76+
77+
- Pros
78+
- Natively supported in Obsidian!
79+
- Annotations in main body, without additional indentation or markup. Makes it super simple to add new lines.
80+
- Spans across multiple liness
81+
- Cons
82+
- Aforementioned issue where large comment blocks causes the plugin's formatting to go whack

0 commit comments

Comments
 (0)