By
Clemens Lode
,
January 21, 2022
Woman typing on laptop (source: pexels)

Writing a Series

LaTeX documents are projects consisting of an entire folder of files, as opposed to everything being in a single file such as with Word documents. While this initially requires more time to set up, this manner of creating documents shines once your project gets larger—or when you work on multiple books.

This is an excerpt from Better Books with LaTeX, the Agile Way.

LaTeX documents are projects consisting of an entire folder of files, as opposed to everything being in a single file such as with Word documents. While this initially requires more time to set up, this manner of creating documents shines once your project gets larger—or when you work on multiple books. For example, in my philosophy book series, each book can stand on its own. This means I have to repeat some of the definitions, examples, or explanations from previous books. Sure, you can copy and paste and you are done with it. But managing books over a lifetime requires working in updates. Will you be able to keep the texts identical? Or even for novels, you might want to bring out a new edition of a particular book. Will you manage several different author pages, publisher information pages, advertisement pages, and so on?

As you produce more work, you will have to advance one level and manage your content. LaTeX projects offer the solution for this: you can simply link files of another project to yours and insert them seamlessly. To do this in Overleaf:

  • Select the folder to which you want the file to be linked.
  • Click on the arrow to the right of the folder name and select Upload File and From Another Project.
  • Select the project, and then the file you want to link.

Once linked, you can use the file like a regular file in your project. Linked files show a different icon (a small chain) and you can access them via \input{folder/file}. Of course, you can also link images or any other type of file and use them with the corresponding commands (e.g., \includegraphics{folder/file}).

What are possible candidates for linking? Let us take a look at the template:

  • Whole sections if you create a new version of your book with a different focus.
  • The bibliography—imagine having a single library for all your projects.
  • Individual glossary, idea, or question items.
  • Images.
  • Template style files (all files in the lib directory).
  • The htlatex tools (latexmkrc, htlatex.cfg, and main.css).

For the latter two items (the template style files, and the htlatex tools), you might have to be careful when linking them and making changes as it might change the pagination of all your projects that use the file. On the other hand, if you plan to create new editions with a new layout anyway, it is easier and less likely to cause errors if you have all your style files in one place and make each change only once.

For example, let us assume you have five LaTeX projects and want to change the book size from 5.25”x8” to 6”x9.” If the style files are linked, you would need to make only one change in the lib/bookformat.tex file, recompile the connected projects, re-polish the output files, and you are done.

So, ultimately, the benefit depends on your situation. I advise keeping this feature in mind as you write your first few books. Once you can see a possible benefit of reorganizing your books, start by creating a main project in Overleaf which houses your shared bibliography, glossary items, and so on, and link to them from the individual projects.

Whenever you make changes to your general template settings, you no longer have to make changes in each project individually. Instead, you can apply changes to the main project, and then just refresh all the linked files in each of your book projects for the changes to take effect. For example, let us say you have found a spelling error in your bibliography. You can fix this issue in the main project and refresh the file in other projects, instead of having to apply the fix to every single bibliography file of each project. All my projects share the “thank you” page, the “about the author” page, the main.css file, the htlatex.cfg, all the files in the lib folder, the bibliography folder, and the latexmkrc file.

Related Books and Services

Recommended Further Reading

Open laptop with smartphone (source: pexels)
January 21, 2022

Adding TeX4ht to Your LaTeX Book Project

Here, we will examine the technical details of converting LaTeX to HTML, and how to add that capability to an existing project that does not use the template.

About the Author

Clemens Lode

Hello! My name is Clemens and I am based in Düsseldorf, Germany. I’m an author of books on philosophy, science, and project management, and coach people to publish their books and improve their approach to leadership.

I like visiting the gym, learning to sing, observing animals, and creating videos on science and philosophy. I enjoy learning from nature and love the idea of optimizing systems.

In my youth, I was an active chess player reaching the national championship in Germany, and an active pen&paper player leading groups of adventurers on mental journeys. These activities align with my calm approach to moderating meetings, leading meetups, and focusing on details. My personality type in socionics is IEE/ENFp.

Read more...
Clemens Lode

Related Blog Posts

Related Topics

LaTeX

LaTeX

LaTeX, a document processing system, creates a typeset finished product. The system works more like a compiler than a word processor. While initially complicated to learn, LaTeX allows better management of larger projects like theses or books by splitting the document into text, style, and references. Leslie Lamport created laTeX in the 1980s; his goal was to separate content from styling.

Read more...
Editing

Editing

Editing is the art of adding consistency and linearity to the written word.

Read more...
Book Publishing

Book Publishing

Book publishing has evolved with POD (print-on-demand) services. While it's never too late to write the next great novel or an award-winning nonfiction book, many people see book publishing as a marketing tool. No matter what your approach to your book, the challenge is finding and writing for the right audience.

Read more...

Do you have a question about our services?

Reach out, we'd love to hear from you! Schedule a video chat or message us by e-mail or WhatsApp!

Send us an e-mail (mail@lode.de).

Reach out to us via WhatsApp.

Set up a free call with Calendly.

Or send us your question or comment here and we'll get back to you ASAP:
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Rate us at Trustpilot