6 个用于写书的开源工具
书籍

> 
> 这些多能、免费的工具可以满足你撰写、编辑和生成你自己的书籍的全部需求。
> 
> 
> 


![](/data/attachment/album/201811/02/214546jj828j99tt88d08d.png)


我在 1993 年首次使用并贡献了免费和开源软件，从那时起我一直是一名开源软件的开发人员和布道者。尽管我被记住的一个项目是 [FreeDOS 项目](http://www.freedos.org/)，这是一个 DOS 操作系统的开源实现，但我已经编写或者贡献了数十个开源软件项目。


我最近写了一本关于 FreeDOS 的书。《[使用 FreeDOS](http://www.freedos.org/ebook/)》是我庆祝 FreeDOS 出现 24 周年而撰写的。它是关于安装和使用 FreeDOS、关于我最喜欢的 DOS 程序，以及 DOS 命令行和 DOS 批处理编程的快速参考指南的集合。在一位出色的专业编辑的帮助下，我在过去的几个月里一直在编写这本书。


《使用 FreeDOS》 可在知识共享署名（cc-by）国际公共许可证下获得。你可以从 [FreeDOS 电子书](http://www.freedos.org/ebook/)网站免费下载 EPUB 和 PDF 版本。（我也计划为那些喜欢纸质的人提供印刷版本。）


这本书几乎完全是用开源软件制作的。我想分享一下对用来创建、编辑和生成《使用 FreeDOS》的工具的看法。


### Google 文档


[Google 文档](https://www.google.com/docs/about/)是我使用的唯一不是开源软件的工具。我将我的第一份草稿上传到 Google 文档，这样我就能与编辑器进行协作。我确信有开源协作工具，但 Google 文档能够让两个人同时编辑同一个文档、发表评论、编辑建议和更改跟踪 —— 更不用说它使用段落样式和能够下载完成的文档 —— 这使其成为编辑过程中有价值的一部分。


### LibreOffice


我开始使用的是 [LibreOffice](https://www.libreoffice.org/) 6.0，但我最终使用 LibreOffice 6.1 完成了这本书。我喜欢 LibreOffice 对样式的丰富支持。段落样式可以轻松地为标题、页眉、正文、示例代码和其他文本应用样式。字符样式允许我修改段落中文本的外观，例如内联示例代码或用不同的样式代表文件名。图形样式让我可以将某些样式应用于截图和其他图像。页面样式允许我轻松修改页面的布局和外观。


### GIMP


我的书包括很多 DOS 程序截图、网站截图和 FreeDOS 的 logo。我用 [GIMP](https://www.gimp.org/) 修改这本书的图像。通常，只是裁剪或调整图像大小，但在我准备本书的印刷版时，我使用 GIMP 创建了一些更适于打印布局的图像。


### Inkscape


大多数 FreeDOS 的 logo 和小鱼吉祥物都是 SVG 格式，我使用 [Inkscape](https://inkscape.org/) 来调整它们。在准备电子书的 PDF 版本时，我想在页面顶部放置一个简单的蓝色横幅，角落里有 FreeDOS 的 logo。实验后，我发现在 Inkscape 中创建一个我想要的横幅 SVG 图案更容易，然后我将其粘贴到页眉中。


### ImageMagick


虽然使用 GIMP 来完成这项工作也很好，但有时在一组图像上运行 [ImageMagick](https://www.imagemagick.org/) 命令会更快，例如转换为 PNG 格式或调整图像大小。


### Sigil


LibreOffice 可以直接导出到 EPUB 格式，但它不是个好的转换器。我没有尝试使用 LibreOffice 6.1 创建 EPUB，但在 LibreOffice 6.0 中没有包含我的图像。它还以奇怪的方式添加了样式。我使用 [Sigil](https://sigil-ebook.com/) 来调整 EPUB 并使一切看起来正常。Sigil 甚至还有预览功能，因此你可以看到 EPUB 的样子。


### QEMU


因为本书是关于安装和运行 FreeDOS 的，所以我需要实际运行 FreeDOS。你可以在任何 PC 模拟器中启动 FreeDOS，包括 VirtualBox、QEMU、GNOME Boxes、PCem 和 Bochs。但我喜欢 [QEMU](https://www.qemu.org/) 的简单性。QEMU 控制台允许你以 PPM 格式转储屏幕，这非常适合抓取截图来包含在书中。


当然，我不得不提到在 [Linux](https://www.kernel.org/) 上运行 [GNOME](https://www.gnome.org/)。我使用 Linux 的 [Fedora](https://getfedora.org/) 发行版。




---


via: <https://opensource.com/article/18/9/writing-book-open-source-tools>


作者：[Jim Hall](https://opensource.com/users/jim-hall) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
I first used and contributed to free and open source software in 1993, and since then I've been an open source software developer and evangelist. I've written or contributed to dozens of open source software projects, although the one that I'll be remembered for is the [FreeDOS Project](http://www.freedos.org/), an open source implementation of the DOS operating system.

I recently wrote a book about FreeDOS. [ Using FreeDOS](http://www.freedos.org/ebook/) is my celebration of the 24

thanniversary of FreeDOS. It is a collection of how-to's about installing and using FreeDOS, essays about my favorite DOS applications, and quick-reference guides to the DOS command line and DOS batch programming. I've been working on this book for the last few months, with the help of a great professional editor.

*Using FreeDOS* is available under the Creative Commons Attribution (cc-by) International Public License. You can download the EPUB and PDF versions at no charge from the [FreeDOS e-books](http://www.freedos.org/ebook/) website. (I'm also planning a print version, for those who prefer a bound copy.)

The book was produced almost entirely with open source software. I'd like to share a brief insight into the tools I used to create, edit, and produce *Using FreeDOS*.

## Google Docs

[Google Docs](https://www.google.com/docs/about/) is the only tool I used that isn't open source software. I uploaded my first drafts to Google Docs so my editor and I could collaborate. I'm sure there are open source collaboration tools, but Google Doc's ability to let two people edit the same document at the same time, make comments, edit suggestions, and change tracking—not to mention its use of paragraph styles and the ability to download the finished document—made it a valuable part of the editing process.

## LibreOffice

I started on [LibreOffice](https://www.libreoffice.org/) 6.0 but I finished the book using LibreOffice 6.1. I love LibreOffice's rich support of styles. Paragraph styles made it easy to apply a style for titles, headers, body text, sample code, and other text. Character styles let me modify the appearance of text within a paragraph, such as inline sample code or a different style to indicate a filename. Graphics styles let me apply certain styling to screenshots and other images. And page styles allowed me to easily modify the layout and appearance of the page.

## GIMP

My book includes a lot of DOS program screenshots, website screenshots, and FreeDOS logos. I used [GIMP](https://www.gimp.org/) to modify these images for the book. Usually, this was simply cropping or resizing an image, but as I prepare the print edition of the book, I'm using GIMP to create a few images that will be simpler for print layout.

## Inkscape

Most of the FreeDOS logos and fish mascots are in SVG format, and I used [Inkscape](https://inkscape.org/) for any image tweaking here. And in preparing the PDF version of the ebook, I wanted a simple blue banner at top of the page, with the FreeDOS logo in the corner. After some experimenting, I found it easier to create an SVG image in Inkscape that looked like the banner I wanted, and I pasted that into the header.

## ImageMagick

While it's great to use GIMP to do the fine work, sometimes it's faster to run an [ImageMagick](https://www.imagemagick.org/) command over a set of images, such as to convert into PNG format or to resize images.

## Sigil

LibreOffice can export directly to EPUB format, but it wasn't a great transfer. I haven't tried creating an EPUB with LibreOffice 6.1, but LibreOffice 6.0 didn't include my images. It also added styles in a weird way. I used [Sigil](https://sigil-ebook.com/) to tweak the EPUB file and make everything look right. Sigil even has a preview function so you can see what the EPUB will look like.

## QEMU

Because this book is about installing and running FreeDOS, I needed to actually run FreeDOS. You can boot FreeDOS inside any PC emulator, including VirtualBox, QEMU, GNOME Boxes, PCem, and Bochs. But I like the simplicity of [QEMU](https://www.qemu.org/). And the QEMU console lets you issue a screen dump in PPM format, which is ideal for grabbing screenshots to include in the book.

Of course, I have to mention running [GNOME](https://www.gnome.org/) on [Linux](https://www.kernel.org/). I use the [Fedora](https://getfedora.org/) distribution of Linux.

## 12 Comments