[HN Gopher] Writing a book in the age of open source
       ___________________________________________________________________
        
       Writing a book in the age of open source
        
       Author : mooreds
       Score  : 44 points
       Date   : 2024-09-03 20:47 UTC (2 hours ago)
        
 (HTM) web link (blog.incrementalforgetting.tech)
 (TXT) w3m dump (blog.incrementalforgetting.tech)
        
       | ihaveajob wrote:
       | When I wrote my PhD thesis (the closest thing to a book I've ever
       | worked on), I used LyX and I loved it. All the power of LaTeX,
       | with a usable UI. When you're done, just apply the publisher
       | settings and you're out!
        
         | WillAdams wrote:
         | Back when I did composition for STEM publishers, the one
         | manuscript I got in LyX stands out as the cleanest, and easiest
         | to work with --- added two custom packages:
         | 
         | - first loads some packages and defines all the customization
         | commands to do nothing
         | 
         | - second defines the customization commands and applies the
         | formatting as specified by the publisher
         | 
         | Edit the LaTeX text, add customization commands for
         | shortening/lengthening paragraphs, &c. for balancing pages and
         | tweaking float placement --- make PDF, send to printer, then at
         | the end of the project, comment out the second package line and
         | return the updated source to the author for their next edition.
         | 
         | That said, my current books are being done using:
         | 
         | - GitBook: https://willadams.gitbook.io/design-
         | into-3d/2d-drawing
         | 
         | - using Literate Programming completely in lualatex for coding
         | up the OpenPythonSCAD module:
         | https://github.com/WillAdams/gcodepreview
         | 
         | - in normal LaTeX (re-setting of a translation of an Old
         | English poem)
         | 
         | and I look forward to a future project working in LyX, since
         | the new 2.4 looks _amazing_.
        
       | mysteria wrote:
       | I write fiction using Markdown + Git and love the workflow. Now
       | it's kind of strange treating the whole thing like a software
       | project and having each chapter as a seperate file (along with
       | other folders for notes, artwork, etc.) but it's easy to work
       | with, self hostable, and the entire repository with all its
       | history can easily travel with me on any device. It even has a
       | Makefile to spit everything out as a PDF!
        
         | jjice wrote:
         | I've been writing a book like this for a little while too. It's
         | a great, simple workflow and having git history is just a huge
         | benefit.
        
         | gnulinux wrote:
         | This is also what I do. I use markdown+git for all kinds of
         | writing. I use Obsidian with tons of extensions. It's
         | integrated with my personal knowledge base, notes etc. If I'm
         | writing fiction or poetry, one file is one chapter/unit, but
         | sometimes if I'm making huge changes, I'll rename that file to
         | "Chapter X Draft 4" or something like that, so that I can
         | instantly see very old versions without git. If I want to look
         | at the full history git history on "Chapter X" will give the
         | entire thing. It's also nice to write tiny scripts to assemble
         | finished chapters into volumes etc and auto-convert to PDF.
         | 
         | I also do literate programming (write code as if it's a book
         | written for your future self) with this exact same approach.
         | Just write a two line script that removes everything that's not
         | between ```python ``` and you can code inside Obsidian. (E.g.
         | you can use a markdown parser like `marko` for python) I
         | personally don't _need_ syntax highlighting, but if you do, you
         | can open it in your IDE /Emacs/etc and IDE should highlight
         | most languages in Markdown files. You obviously don't get all
         | the IDE bells and whistles, for those you can have separate
         | files and import them in, or enable Python mode in markdown
         | files (somehow). (Obsidian should support basic syntax
         | highlighting for most common languages anyway)
         | 
         | Since Obsidian is so awesome, this approach has endless
         | possibilities. E.g. you can do project management inside
         | Obsidian via Kanban board, you can use Excalidraw tool in
         | Obsidian to draw architecture diagrams, write music inside
         | Obsidian with its Lilypond plugin, write math with LaTeX plugin
         | etc. It just automatically works out of the box.
        
         | davidsgk wrote:
         | Out of curiosity, do you use any specific version control
         | features when writing like this outside of history which is
         | just kind of there by default? It would be hilarious but
         | amazing if you said your editors (if you have any) give you
         | feedback in the form of pull requests.
        
         | thangalin wrote:
         | You may be interested in my Typesetting Markdown series:
         | 
         | https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdow...
         | 
         | Or the editor I wrote for this very purpose:
         | 
         | https://keenwrite.com/screenshots.html
         | 
         | The last screenshot shows a single source file having multiple
         | themes applied, one being a manuscript theme.
         | 
         | The editor integrates variables in an external file so that if
         | I want to change a character's name, I can do so in one place.
         | Even diagrams (e.g., family tree) are updated.
        
       | __alexander wrote:
       | In regards to Markdown, it is nice but not many publishers are
       | going to work with you if the book is in that format. Odds are
       | you will have to convert it to Microsoft Word so the editors can
       | add recommendations, version control, ask questions, apply
       | templates, etc. I wrote a book in Markdown and converted it to
       | Word after the third revision because editing was so painful.
        
         | gnulinux wrote:
         | Will publishers not accept Latex?
        
           | themadturk wrote:
           | Word makes the world go round. Perhaps specialized publishers
           | will accept LaTeX, but most of the industry does not. Writers
           | need to plan to transmit their manuscripts in DOCX format and
           | to receive notes back in the same format. Of course,
           | something like LibreOffice may be compatible enough,
           | depending on how comments are handled.
        
         | azhenley wrote:
         | Manning allows asciidoc.
        
           | __alexander wrote:
           | That's cool to hear.
        
         | ezekg wrote:
         | Sounds like a cool side project that could make some money.
        
       | mooreds wrote:
       | We moved our techdoc from asciidoc to markdown to make it more
       | accessible to devs writing docs.
       | 
       | Felt like a step backward to me; asciidoc is so powerful, even if
       | some of the syntax was weird.
        
       | fallinditch wrote:
       | Is anyone using Msty to ingest your Obsidian vaults so you can
       | chat with your notes? This looks like it could be a powerful
       | method for AI-assisted long form writing, technical or otherwise.
       | 
       | https://msty.app/
        
       | MildlySerious wrote:
       | Typst[1] is, imo, worth adding to the conversation. I recently
       | used the CLI (and VSCode extensions) to put together a flyer, and
       | I am testing it for invoice generation. So far I am quite
       | enjoying it as a way to put together PDFs programmatically.
       | 
       | [1] https://typst.app/
        
       ___________________________________________________________________
       (page generated 2024-09-03 23:00 UTC)