{"id":28149790,"url":"https://github.com/obskyr/latex-novel-template","last_synced_at":"2025-05-15T02:14:31.436Z","repository":{"id":291645479,"uuid":"978302848","full_name":"obskyr/latex-novel-template","owner":"obskyr","description":"Write your fiction in LaTeX and Markdown! PDF and EPUB both supported.","archived":false,"fork":false,"pushed_at":"2025-05-05T19:28:48.000Z","size":271,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T20:39:34.723Z","etag":null,"topics":["e-book","e-books","ebook","ebooks","epub","fiction","latex","luatex","pdf","template","tex4ebook","writing","writing-software","writing-tool"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obskyr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-05-05T19:22:58.000Z","updated_at":"2025-05-05T19:28:52.000Z","dependencies_parsed_at":"2025-05-05T20:49:59.454Z","dependency_job_id":null,"html_url":"https://github.com/obskyr/latex-novel-template","commit_stats":null,"previous_names":["obskyr/latex-novel-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obskyr%2Flatex-novel-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obskyr%2Flatex-novel-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obskyr%2Flatex-novel-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obskyr%2Flatex-novel-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obskyr","download_url":"https://codeload.github.com/obskyr/latex-novel-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259423,"owners_count":22040822,"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":["e-book","e-books","ebook","ebooks","epub","fiction","latex","luatex","pdf","template","tex4ebook","writing","writing-software","writing-tool"],"created_at":"2025-05-15T02:14:29.445Z","updated_at":"2025-05-15T02:14:31.424Z","avatar_url":"https://github.com/obskyr.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Want to Write Your Novel in LaTeX?\n\nAn utterly deranged\\* decision.\n\nSo did I.\n\nThis repository contains a **template\nfor writing fiction in LaTeX** (and Markdown!)**, compiling to both PDF and\ne-reader-ready EPUB formats,** something for which a whole heap of boilerplate\nis required. It sets a reasonable default style, and aims to be customizable.\n\nAs an added bonus, it lets you track your writing via Git, the benefits of\nwhich I hardly need to extol if you’ve found your way here!\n\n\\*\u0026thinsp;\u0026NoBreak;Though in reality, it turns out to be surprisingly practical!\n\n\n## How to Use\n\nIn preparation, you will need:\n\n* **[Visual Studio Code](https://code.visualstudio.com/)** as your editor.\n* The **[LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)**\n  extension for VS Code.\n* Though optional, the **[LTeX+](https://marketplace.visualstudio.com/items?itemName=ltex-plus.vscode-ltex-plus)**\n  extension for VS Code is useful for checking spelling and grammar.\n* An installation of LaTeX, specifically **LuaTeX.** There are several LaTeX\n  distributions, but the main players are **[MiKTeX](https://miktex.org/)**\n  and **[TeX Live](https://www.tug.org/texlive/).** The former is smaller but\n  more fussy, while the latter is enormous but has… *everything* included.\n* An installation of **Perl.** You may already have it installed – run `perl\n  -v` to check. If you’re on Windows, I recommend\n  **[Strawberry Perl](https://strawberryperl.com/).**\n* A rogues’ gallery of LaTeX packages, but you should either already have those\n  included with your distribution, or you should be prompted to install them\n  in medias res. The one package you may need to install manually is\n  **[tex4ebook](https://ctan.org/pkg/tex4ebook)** – see your distribution’s\n  instructions for installing packages.\n\nTo begin writing, simply make a copy of `Book/template.tex`, add your new file\nto the list of source files in `book.tex`, and start typing away.\n…Oh, and you should probably remove the example chapters.\n\nThe build flow works as such: Whenever you save a chapter, that chapter will\nbe automatically built as a PDF, so that you may preview it (semi-)live. To\nbuild the whole book, open `book.tex` (it matters which file is open!), press\n\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eP\u003c/kbd\u003e to open the command palette,\nand run \u003ckbd\u003eLatex Workshop: Build with recipe\u003c/kbd\u003e. In the next menu, select\nwhether you want to build a PDF or an EPUB. The resulting file will be output\nas `book.pdf` or `book.epub`, respectively.\n\n\n### Customization\n\nYou’ll likely want to configure various metadata and typographical options.\nThey can be added and edited primarily in these places:\n\n* **`configuration/preamble.tex`** contains all the LaTeX code that will appear\n  before the document in every LaTeX file. Here’s where you add packages,\n  change options, style the PDF, and generally write LaTeX code.\n* **`configuration/xhtml-config.cfg`** contains the [TeX4Ht configuration](https://www.kodymirus.cz/tex4ht-doc/Configurations.html#configurations2) –\n  i.e. the configuration for EPUB output. Among other things, it lets you\n  set metadata (title, contributors, ISBN…) and add fonts.\n* **`configuration/xhtml-code.cfg`** contains more TeX4Ht configuration, but is\n  intended to contain the more technical side of things – custom HTML code\n  certain LaTeX elements are translated into, for example.\n* **`configuration/xhtml-style.css`** lets you style the EPUB using CSS.\n* Replace **`Images/cover.jpeg`** to set the cover image for the book.\n* Out of the box, this template is set to use American English. To change this,\n  change the line `\\usepackage[USenglish]{babel}` in\n  **`configuration/preamble.tex`**, the line `\"ltex.language\": \"en-US\",`\n  in **`.vscode/settings.json`**, and the line\n  `\\Configure{DocumentLanguage}{en-US}` in\n  **`configuration/xhtml-config.cfg`**. For example, to switch to British\n  English, change them to `\\usepackage[UKenglish]{babel}`,\n  `\"ltex.language\": \"en-GB\",`, and `\\Configure{DocumentLanguage}{en-GB}`\n  respectively.\n\nNote that the styles of the PDF version and the EPUB version are almost\nentirely separate – think of it as “LaTeX style goes for the PDF; CSS style\ngoes for the EPUB.”\n\nThe `code/` directory belongs to code inherent to the template – you likely\nwon’t have to look in there unless you want to contribute to this repository.\n\n\n## Minutiæ\n\nThis template makes some minor typographical decisions – it assumes that you\nwon’t want linebreaks before en and em dashes, for one, and it sets em dashes\nsurrounded by two hair spaces (“a\u0026hairsp;\u0026NoBreak;—\u0026hairsp;b” instead of\n“a—b”).\n\nWhat it does *not* do is automate “smart” typography. For [deeply nerdy\nreasons,](https://tex.stackexchange.com/a/126315/392788) this template\ndelegates that to you, the typist: You’ll have to decide if you want to use\nspaced en dashes, em dashes, smart quotes, dumb quotes, or what have you.\nMy suggestion for typing these is a *compose key* (on Windows, that’s\n[WinCompose](https://github.com/samhocevar/wincompose)), but of course, you\ncan also use LaTeX or Babel graphemes such as ` `` `, `''`, `--`, and `---`.\n\n\n## Contributions\n\nThis template can certainly be made better, more user-friendly, and more\nversatile. Do you have LaTeX experience and wish to help out your fellow\napex-nerd writers? Feel free to submit issues and pull requests to this repo!\nTypographical improvements, accessibility improvements, features, and\nease-of-use improvements are all welcome.\n\nAt the moment, it’s made for a build flow centered around VS Code, but that’s\nonly because it happens to be what I use – if you want to add support for\nalternative tooling, be my guest!\n\n\n---\n\nGo forth\u0026hairsp;\u0026NoBreak;—\u0026hairsp;write righteously and egregiously.  \n—\u0026hairsp;\u0026NoBreak;Molly\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobskyr%2Flatex-novel-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobskyr%2Flatex-novel-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobskyr%2Flatex-novel-template/lists"}