Master document-style collaborative tools?
November 1, 2019 1:57 PM   Subscribe

Word won't allow me to point at a subfolder of documents and automagically build a master document from them, instead requiring me to click through an awkward user interface for each subdocument. Is there a more-automated way of building a master document? I am not tied to Word. Google Docs, weirdly, does not support master-document style source embedding.

I am helping a friend with a book project. He has 6 'stories', long personal narratives, which have chapters. He has each chapter set up as an individual document. I have normalized the documents such that there is a coherent numbered naming convention (00.txt, 01.txt, etc). Each story has a subfolder of the main folder and each subfolder's chapters are named as seen above.

In my ideal world, Google Docs would directly support this.
posted by mwhybark to Computers & Internet (14 answers total) 3 users marked this as a favorite
 
This is a fairly straightforward task for LaTeX.

It is designed to call in structured sub-document text files to compile a main document as a publisher-ready file, fairly automagically.

In fact there are several ways to do so, and you can tune and style the output it any way you like, limited only by your time invested.

If this interests you let us know and I/we can provide more detail. It can generate table of contents, index, and handle lots of other typesetting niceties as well.
It is freely available and widely used across many fields.

The general idea is to \include or \input the files for the sections. This can in principle be done programmatically but for this scale and basic output it would maybe involve an hour or so of manually creating the master document, plus an hour or two learning the system.
posted by SaltySalticid at 2:12 PM on November 1, 2019 [2 favorites]


It's probably a bit late in the game to change gears, but I've done something like this with pandoc and gpp, which are both command-line tools. I write everything in Markdown, and for large documents, I break them into component files. I then create a "bill of materials" file that is a series of gpp commands to assemble to components into one monolithic output file. Then I run that through pandoc and bob's your uncle.

I have not done this with two tiers of BOM files, but it wouldn't be hard. gpp will process recursively, so you would only need to call the top-tier file.
posted by adamrice at 2:39 PM on November 1, 2019


I'm sorry if this is a dumb reply. I know Word, but I don't use it the way you have described, and I am a little unsure of what you mean by "master document".

I'm making three assumptions:
1) You're looking for an easy way to solve this problem once.
2) A master document is comprised of the text of all the documents you list.
3) You're using Office for Windows. (Although I would imagine it works basically the same way in Office for Macs.)

If those are correct, then put all the subdocuments in a folder, open a new Word doc, go to the Insert tab, click the arrow next to the Object icon, and select "Text from File...". Once the next window displays, navigate to the folder where your subdocuments are located, and select the ones you want, in the order you want them to appear in the master. Then click Insert.

If you want to perform this task repeatedly, you can record these steps as a macro.
posted by SuperSquirrel at 4:30 PM on November 1, 2019


It's not quite a master document setup, but Scrivener is designed for novel writing, allowing chapters (and other files) to be separate pieces that can be edited and moved around, and then compiled into one for export.

30 day free trial. It's 20% off for NaNoWriMo participants, and 50% off for winners.
posted by ErisLordFreedom at 4:33 PM on November 1, 2019 [1 favorite]


Here’s how it worked in Word 2010.

If this is the weird interface you meant, yeah, that’s how Word does it and the alternative is macros or scripts.
posted by snuffleupagus at 4:56 PM on November 1, 2019


Response by poster: (“master document” is a document description convention dating to WordPerfect in which a word processing platform can display and in some cases permit direct editing of a large document comprised of independent subdocuments, such that styling and content changes in the independent subdocuments are reflected in the master document. The procedural advantage of this approach is roughly that editorial contributors do not need to load the entire final document to review, suggest, fiddle, and otherwise adjust subdocument content. In Word, the feature is only accessible in outline mode and as noted does not support same-instance multiple-file inclusion, forcing the addition of each subdocument one at a time)

I am on a Mac. My friend is non-technical and on Windows. I found Scrivener and Open Office both permit multiple-file inclusion into master documents. Open Office has its’ own obtuse UI issues. Will look at Scrivener and LaTex next.
posted by mwhybark at 5:37 PM on November 1, 2019


Framemaker and MadCap can both do this, if it's the sort of thing you expect to be doing long enough to make significant expenditures worth it. IMHO they're both hideous overkill for your project, but I mention them because it might make it easier to search for alternatives/competition (I mean, in your search terms).
posted by aramaic at 6:09 PM on November 1, 2019


I just helped my dad with technical publishing support and markdown + pandoc was perfect for this type of thing. You can output to docx or epub or latex for making a print document. I did all the nasty latex business and my dad used a simple markdown viewer to see the work in progress.
posted by demiurge at 7:49 PM on November 1, 2019


Many years ago I wrote a Word template with macros to do this, prompt for a folder, add all the documents in the folder as subdocuments and then save the master.

I no longer have the template, but it is possible to do. I remember the tricky part was page numbering - that took a few days of tinkering to get right.
posted by Lanark at 6:49 AM on November 2, 2019 [1 favorite]


A markdown-based workflow is probably best.

Latex is a more powerful tool, but probably overkill for you.

If you try this in Word, you'll probably manage to get it done, but you will be sad and bitter by the time you finish.
posted by meaty shoe puppet at 11:04 AM on November 2, 2019 [1 favorite]


Markdown is overall lighter weight and LaTeX more powerful, but for the task at hand I don’t think either is especially easier starting from zero. I might say LaTeX is just a bit easier because of the availability of 1-click installs like TeXshop where everything you need to compile the final pretty printable pdf is all bundled together, and no need to use any other editor or command line. I don’t think anything all-in-one is available with Markdown, though I’d be pleased to be wrong on that.
posted by SaltySalticid at 11:34 AM on November 2, 2019


Response by poster: Still screwing around with OO at this point. I have a secondary agenda item of hopefully improving his work flow so he can go on happily editing his source docs and when he needs to get an industry format (anticipating Word, frankly) he can just pull up the master doc in OO and export.

Open Office allowed multi-select import to master doc, no problem. But after about 28 imports it stopped allowing new data containers. Next step would be setting up masters for each of his sub-stories.

I should note that the entire project is something like 600,000 words, and (may he continue to work in whatever fashion pleases him) he has been composing and revising entrely in WordPad and cutting and pasting multimedia assets as he sees fit, generally sourced directly from the web and right-click copy-pasted directly into the resulting RTFs. Without generating a stripped-down set of text files the project was coming in at 6gb. It’s the encyclopedia of personal zines!
posted by mwhybark at 3:52 PM on November 3, 2019


Response by poster: interim resolution, which gets me to a text-only merged document that I was relatively easily able to enforce clean outlining and styling on in word:

1. Use BBEdit to dump all the text files into a single well-ordered text doc.
2. add a revision tracking slug section at the top, retain sourcefile names in document
3. Enforce good normalization practices using BBEdit search and replace (nuke double returns, double spaces, zap gremlins, etc)
4. Open in Word, go to outline mode, promote headers as needed (Title, Subheads 1-3)
5. Apply “Normal” style to body copy
6. Generate TOC using Word tools
7. Save as Word doc, PDF. Use Calibre to convert Word doc to EPUB, TOC comes through like a champ.

Unfortunately this is somewhat involved, beyond his technical capacity at the moment, and loses the benefit of cascading edits to content. But it did get the doc into a state where I was able to read the first 150k in my ereader of choice, Marvin, today.

Markdown sounds interesting. For my purposes I wanted to dump all the pics just to control filesize. Could I build a theoretical Markdown docset using his extant crufty RTFs and control cruft inclusion at output? I really don’t want to get in his way, he is happy with his workflow and if he could just go on editing the RTFs but use a Markdown toolset to pull his drafts, crufty and not, that would be optimal.

He’s supposed to send me a new set of stripped files tomorrow, I have asked for a subset in his preferred RTF + images format as well.
posted by mwhybark at 1:22 AM on November 5, 2019


Response by poster: For what it’s worth:

Got the docs, was able to strip out and reformat. Sent him a variety of more-consistently structured files. As expected, he worked through everything on his own and is live with volume 1 via Kindle now. I haven’t called and talked to him but my impresssion is that it has been a frustrating journey. He got it done, though, and did it his own way, which is what he wanted.
posted by mwhybark at 2:52 PM on January 2, 2020 [1 favorite]


« Older I want to make my home audio system wireless   |   Three couples; brunch; is this weird? Newer »
This thread is closed to new comments.