{"id":27183188,"url":"https://github.com/datatimp/creative-writing-in-markdown","last_synced_at":"2025-04-09T15:55:35.371Z","repository":{"id":96099746,"uuid":"465381193","full_name":"datatimp/creative-writing-in-markdown","owner":"datatimp","description":"Overview for writing fiction and script formats in Markdown","archived":false,"fork":false,"pushed_at":"2025-03-24T14:10:32.000Z","size":730,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T14:37:43.769Z","etag":null,"topics":["better-fountain","composing","markdown","markdown-editor","markdown-to-pdf","markdown-viewer","miktex","pandoc","pdf","visual-studio-code","winget","writing","writing-software"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datatimp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-02T16:21:34.000Z","updated_at":"2025-03-24T14:10:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"43b51695-d867-4051-8f1b-b02a6ff3063c","html_url":"https://github.com/datatimp/creative-writing-in-markdown","commit_stats":null,"previous_names":["wrinklerelease/creative-writing-in-markdown","datatimp/creative-writing-in-markdown"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datatimp%2Fcreative-writing-in-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datatimp%2Fcreative-writing-in-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datatimp%2Fcreative-writing-in-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datatimp%2Fcreative-writing-in-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datatimp","download_url":"https://codeload.github.com/datatimp/creative-writing-in-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065115,"owners_count":21041867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["better-fountain","composing","markdown","markdown-editor","markdown-to-pdf","markdown-viewer","miktex","pandoc","pdf","visual-studio-code","winget","writing","writing-software"],"created_at":"2025-04-09T15:55:34.139Z","updated_at":"2025-04-09T15:55:35.365Z","avatar_url":"https://github.com/datatimp.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (title: Composing Long-Form Fiction \u0026 Scripts in Markdown)\n[//]: # (date: 01-12-23)\n[//]: # (link: https://github.com/WrinkleRelease/Composing-In-Markdown)\n[//]: # (tags: markdown, writing, markdown-editor)\n\n# Composing Long-Form Fiction \u0026 Scripts with Markdown\n\n## 1. Purpose\n\nThis guide is intended to help writers future-proof their work by keeping files always readable and  accessible without sacrificing usability and workflow. For those who can't afford *Final Draft* or *Scrivener*, or who don't want to get locked into a proprietary format, I hope you find this helpful.\n\nThis guide is targeted towards Windows users. All the programs listed here (Visual Studio Code, Pandoc, and MikTeX) are available for macOS and Linux, though settings and install commands will be different.\n\n### | 1.1 What is Markdown?\n\nMarkdown is a markup language like HTML. Markdown files are simply plain text files using the extension `.md`, or `.markdown`, instead of `.txt`. A Markdown viewer recognizes the Markdown syntax as format commands and outputs a finished document.\n\nBeing plain text, these files are future-proof and can always be opened by any reader capable of reading plain text, such as Notepad, Notepad++, VIM, etc. In fact, this document is written in Markdown and you see can see the raw text complete with Markdown syntax [here][readme]. \n\nYou can find more about Markdown, including a style guide, at [markdownguide.org].\n\n### | 1.2 Workflow\nAll the pieces laid out in this guide work together to produce the following workflow:\n- Write in VS Code using Markdown \u0026#10143; Publish to DOCX or PDF\n\n## 2. Getting Set Up\n\n### | 2.1.  Installing `winget`\n\n`winget` is a command line package manager for CMD or PowerShell, much like `apt-get` in Linux.\n\nThis step is optional, but it's a nice tool that makes some tasks, including application installations, much more convenient.\n\n`winget` comes with Windows 11. If you are on Windows 10, you'll need to install the [App Installer] from the Microsoft Store first.\n\n\u003cbr\u003e\n\n### | 2.2. Installing Fonts \u0026 Templates\n\nDownload the [latest release] of this guide to get the pandoc templates and fonts you need. The included fonts are `Courier Prime` and `iA Writer Duo`. Fully install them both. We'll get to the pandoc template files in [2.4.1](#2.4.1).\n\n\u003cbr\u003e\n\n### | 2.3. Visual Studio Code\n\nInstall Visual Studio Code \n- With `winget`:\n    - Hit the Windows key on the keyboard, type `cmd` and open a CMD window\n    -  In CMD, type `winget install --id Microsoft.VisualStudioCode -s winget`\n    - Hit `Enter`\n- Or [download and install][1]\n\nOnce inside of VS, go to `View \u003e Extensions`. Search for, and install, the extensions below. I've also included some color themes I find easier to write with:\n\n- Better Fountain\n- Markdown Fiction Writing\n- Markdown Preview Enhanced\n- Spell Right\n- Gruvbox Theme\n- Gruvbox Material Icon Theme\n\nLastly, we need to change some information in VS Code's `settings.json` file. \n1.  Open `Settings` by clicking the gear icon in the bottom left of VS Code.\n 2. Once inside `Settings` you will see a small icon in the upper right of that window. It looks like a document with a an arrow curving around it. Click that. \n 3. That should open the `settings.json` file. The code below needs to replace what is currently in your file. Highlight and delete what is in your `.json` file. Next, copy the entirety of the code below (including the `{` and `}` at the beginning and end) and paste in. Save by hitting `CTRL-S`. You might need to restart VS Code.\n\n```json\n{\n    \"[markdown]\": {\n    \"editor.fontFamily\": \"\\\"IA Writer Duo S\\\", monospace\",\n    \"editor.fontLigatures\": true,\n    \"editor.fontSize\": 14,\n    \"editor.lineHeight\": 26,          \n    \"editor.wordWrap\": \"wordWrapColumn\",\n    \"editor.wordWrapColumn\": 64,        \n    \"zenMode.centerLayout\": true,\n    \"editor.lineNumbers\": \"off\",\n    \"editor.quickSuggestions\": false,\n    \"markdown.PreviewFrontMatter\": \"show\"\n    },\n\n    \"editor.fontFamily\": \"Consolas, 'Courier Prime', monospace\",\n    \"workbench.iconTheme\": \"gruvbox-material-icon-theme\",\n    \"markdown-preview-enhanced.frontMatterRenderingOption\": \"code block\",\n    \"markdown-fiction-writer.metadata.categories.summaryEnabled\": true,\n    \"markdown-fiction-writer.edit.disableKeybindings\": false,\n    \"markdown-fiction-writer.edit.easyParagraphCreation\": \"Shift+Enter\",\n    \"markdown-preview-enhanced.enableTypographer\": true,\n    \"workbench.colorTheme\": \"Gruvbox Dark Hard\",\n    \"editor.minimap.enabled\": false,\n    \"breadcrumbs.enabled\": false,\n    \"editor.cursorStyle\": \"block\",\n    \n}\n```\n\u003cbr\u003e\u003c/a\u003e\n\n### | 2.4. Final Installations\n\n\u003ca id=\"2.4.1\"/\u003e\u003c/a\u003e\n\n#### | | 2.4.1.  Install pandoc\n\nPandoc is what converts our MD documents into DOCX or PDF. It uses templates to format the MD into manuscript format.\n- Install using `winget`:\n    - In CMD, type `winget install --name Pandoc -e -s winget`\n- Or [download and install][2]\n\n Once installed, open Windows Explorer and traverse to `C:\\users\\[username]\\AppData\\Roaming\\` and create the folders `\\pandoc\\templates` if they do not exist.\n- Place `reference.docx` and `references.odt` inside of `\\Roaming\\pandoc`. \n- Place `story.latex` inside `\\Roaming\\pandoc\\templates\\`\n\n\u003cbr\u003e\u003c/a\u003e\n\n#### | | 2.4.2. Install MikTeX\n\nMiKTeX is a LaTeX text setting system for Windows. It runs the modules pandoc needs.\n\n- Install using `winget`:\n    - In CMD, type `winget install --name MiKTeX -e -s winget`\n- Or [download and install][3]\n\n Once installed, run MiKTeX Console (you can find it in the Start Menu), check for updates and install them.\n\n\u003cbr\u003e\u003c/a\u003e\n\n## 3. Using Visual Studio Code\n\n1. You can open a *file* or a *folder*. The folder option is nice since all the documents you have in it will be available. This is helpful if you're writing many short stories or a book with chapters. When a folder is open it is called a *workspace*. You can even save a workspace out as a file for the future.\n\n\u003cbr\u003e\u003c/a\u003e\n\n2. You an always preview the document you are currently working on by hitting `CTRL-K V`. Keep in mind, this notation means you hit `CTRL-K`, let go, then hit `V` (if the notation reads `CTRL+K+V` or `CTRL-K-V` then you hit them all together).\n\n\u003cbr\u003e\u003c/a\u003e\n\n3. Go to Zen Mode by hitting `CTRL-K Z`.\n\n\u003cbr\u003e\u003c/a\u003e\n\n4. `Markdown Fiction Writing` features a Writing Mode. It dims all your text except the paragraph you are currently working on. You toggle it on and off using the lightning bolt icon on the bottom bar of VSC.\n\n\u003cbr\u003e\u003c/a\u003e\n\n### | 3.1. Writing \u0026 Publishing a Script\n\n`Better Fountain` is very easy to use for script writing. When starting a file, simply choose the language as `Fountain`. This extension even prints to PDF from inside VS Code in the proper format. Following the syntax examples on their website will give you a good start. \n\nMake sure to give your script the proper `Front Matter`. This is information that exists at the very top of the document and provides metadata. The printing engine will use this for title pages, headers, etc. Here is some example `Front Matter` for `Fountain`:\n```yaml\nTitle: \n    _BIG PROJECT_\n    Episode 1\n    _\"Say Stuff\"_\nCredit: Written by\nAuthor: Jack Lance \u0026 Ken Hark\nRevision: \n    DRAFT #5\n    2/28/2022\nBL: \n    (555) 222-2222\n    444 Gunsmoke Rd..\n    City, ST 00000\n====\n```\nIn `Fountain` syntax, the`Front Matter` begins on the first line of the document and ends with `===`. Skip a line after `===` and begin writing your script. \n\n\u003cbr\u003e\u003c/a\u003e\n\n### | 3.2. Writing \u0026 Publishing Manuscripts\n\nWriting prose in Markdown is easy. There is very little we need to format as all of that is done upon export. The `Front Matter` for a prose document is slightly different than for a script. Below is an example. Notice that it begins and ends with `---`.\n\n```yaml\n---\ntitle: AWESOME TITLE\nauthor: Jack Lance\nrunningtitle: AWESOME\nforename: Jack\nsurname: Lance\ndate: 2/28/2022\nwordcount: about 4,000\nstreet: 444 Gunsmoke Rd.\nlocation: City, ST 00000\nphone: (555) 222-2222\nemail: example@email.com\nrevision: Fourth Draft\noutput: \n    pdf_document: \n        path: /Stories/Shorts/Awesome Title/at-test.pdf\n        pdf_engine: xelatex\n        template: story.latex\n---\n```\nSome of the information here is for `pandoc` to use upon PDF render and some is for me (such as revision number). \n\n\u003cbr\u003e\u003c/a\u003e\n\n#### | | 2.2.1.  Publishing to PDF\nThe `Markdown Preview Enhanced` extension allows us to call `pandoc` without having to use a command line. Right clicking in the preview window shows output options. We'll be using the `Pandoc` option. We tell `Pandoc` what type of document to make in the `Front Matter` of our MD file.\n\nSince you put `story.latex` in the `\\templates` folder, we can tell `Pandoc` to use that as our PDF reference file. It is set up to use all the information in our `Front Matter` and inject it into the document where it needs to be. So, to print to a PDF we put this in our `Front Matter`\n```yaml\noutput: \n  pdf_document:\n    pdf_engine: xeletex\n    template: story.latex\n```\n`Pandoc` will output a PDF using that template to the same directory as your Workspace. In my case, I wanted the PDF to end up in the same directory as the story file itself, so I added a `path` argument to the `Front Matter`. When you first run a PDF print job, MiKTeX will download and install all the packages it needs, so be prepared for it to pop up a lot of windows needing your input.\n\nThis solution works nicely, but it has one small hiccup: I sometimes get widows and orphans upon export. \n\nThe only way I have found to solve this, if it happens, is to export to a DOCX file and *then* make the PDF from that inside of Word.\n\n\u003cbr\u003e\u003c/a\u003e\n\n#### | | 2.2.2. Publishing to DOCX\nRemember the `reference.docx` file you put inside of the `Roaming\\pandoc` folder? Open it and change the header information on the title page to your information.\n\nNext, change the `output` flag in the `Front Matter` of your `.md` file to the following:\n```yaml\noutput: word_document\n```\nNow, when you call `Pandoc` from the `Markdown Preview Enhanced` extension, it will generate a DOCX file. Go into the file, correct your word count, make sure everything is in `Courier Prime`, check the formatting situation, and change what needs changing. Output to PDF and you're done.\n\n\u003cbr\u003e\u003c/a\u003e\n\n## 3. Links\n- Better Fountain [features]\n- Fountain [syntax guide]\n- [Markdown Fiction Writing] guide\n\n[readme]: https://raw.githubusercontent.com/WrinkleRelease/Composing-In-Markdown/main/README.md\n[markdownguide.org]: https://www.markdownguide.org/\n[App Installer]: https://www.microsoft.com/en-us/p/app-installer/9nblggh4nns1?activetab=pivot:overviewtab\n[latest release]: https://github.com/WrinkleRelease/Composing-In-Markdown/releases/tag/v1.0.2\n[features]: https://marketplace.visualstudio.com/items?itemName=piersdeseilligny.betterfountain\n[syntax guide]: https://www.fountain.io/syntax\n[Markdown Fiction Writing]: https://zoctarine.github.io/vscode-fiction-writer/\n[1]: https://code.visualstudio.com\n[2]: https://pandoc.org/installing.html\n[3]: https://miktex.org/download\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatatimp%2Fcreative-writing-in-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatatimp%2Fcreative-writing-in-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatatimp%2Fcreative-writing-in-markdown/lists"}