5 ms·
I myself write books in Markdown. Each chapter has a markdown file, the book is version controlled with Git, there is a "build script" that does a "build" (in t
by umvi 7y ago
I myself write books in Markdown. Each chapter has a markdown file, the book is version controlled with Git, there is a "build script" that does a "build" (in this case it's a shell script that concatenates the markdown files and runs them through pandoc and calibre CLIs to generate eBooks and PDFs).
When I send to my editor I just tell her to modify the files as she sees fit. When I get them back I put the new files on a branch and create a PR so I can start discussions on changes, etc.
I think the process is pretty darn efficient but it's hard to sell it to non-techie writers/editors.
- mikepurvis 7y agoI wanted to use a workflow like this years ago working with Apress. Possibly (hopefully) things are better now, but at least at the time, all their tooling expected Word docs as the input, and you had to use a very specific stylesheet (including goofy stuff like magic text strings to insert images). There were also some manual transformation steps occurring on their end, because there was a cutover point where the Word doc was no longer accepted and you had to just quote page and line numbers to get further changes made.
- ghaff 7y agoWord docs, Sharepoint. (Though I didn't have that experience with images.)
- munificent 7y ago> There were also some manual transformation steps occurring on their end, because there was a cutover point where the Word doc was no longer accepted This was probably the point at which the text had been moved into InDesign for typesetting by the designer.
- wyldfire 7y agoAre there publishers who are more accommodating of inputs like LaTeX/pandoc/markdown/etc? It'd be great to know that kind of thing when considering publishers.
- geerlingguy 7y agoYou should check out LeanPub. They support a variety of formats, and do some really nice things if you want to self-publish.
- bokumo 7y agoI think No Starch Press accepts LaTeX markup. There is a nostarch package on CTAN. https://ctan.org/pkg/nostarch?lang=en https://ctan.org/pkg/nostarch?lang=en
- cosmodisk 7y agoThe content of their books is often OK, however low-res images,pixelated tables and some random font and its size makes those books look funny..
- hypocrazybr 7y agoWould you mind sharing this script? I am moving all my notes to markdown and I would like to setup something like that
- namarie 7y agoSeconding this, for the same reasons really.
- umvi 7y agoIt's more of a haphazard set of custom scripts I'm afraid, they are pretty messy. I really should clean them up and host on GitHub or something. But, just to get you started, here's one of my scripts (a batch script I use to generate a kindle book on Windows): :: Convert Markdown to DOCX format, adding a pagebreak at every \newpage pandoc -f markdown -t docx --filter=pandoc-docx-pagebreakpy -o build.docx ^ foreword.md ^ preface.md ^ acknowledgments.md ^ part_a.md ^ 1.md ^ 2.md ^ 3.md :: File needs to be opened in Word, saved, and then closed to generate physical Table of Contents :/ @echo off echo Please open build.docx in Word, save, and then close. pause :: Set e-book metadata ebook-meta build.docx --authors "First M. Last" --author-sort "Last, First M." --title "Book Title" --title-sort "Book Title" :: Convert DOCX to MOBI (Kindle) :: --share-not-sync Makes it so cover shows up in Kindle for PC but also breaks Kindle WhisperSync. Remove if you want WhisperSync. :: See https://manual.calibre-ebook.com/faq.html#the-covers-for-my-mobi-files-have-stopped-showing-up-in-kindle-for-pc-kindle-for-android-ipad-etc :: --cover "media/cover.jpg" --share-not-sync ebook-convert build.docx build.mobi
- boazbarak 7y agoI am using the same setup though with a lot of customization of pandoc https://github.com/boazbk/tcs https://github.com/boazbk/tcs
- carapace 7y agoOh cool! I'm getting reasonable results using Pandoc->LaTeX->PDF with mostly markdown and bits of raw LaTeX as the source. I pass `-V documentclass:scrbook` to pandoc and then I can use e.g. '\frontmatter' and '\mainmatter' in the MD source. As I say, I'm getting reasonable results, but it's one of those "I can't be the first person to do this" situations. Got any tips or links to share?