发布工具链

发布于 2024-08-30 15:31:46 字数 692 浏览 6 评论 0原文

我有一个图书项目,我想尽早开始。这将遵循类似敏捷的发布工作流程,即:尽早且经常发布。它本来是由我自己出版的,我并不是真的想以纸质出版它,尽管我们永远不知道。

如果我不是极客,我可能已经开始使用 Word 或任何其他所见即所得工具进行写作,然后导出为 PDF。然而,我们知道这不是最好的解决方案,而且 emacs 统治着我的文本编辑生活,因此,输出格式应该尽可能简单并且基于文本。

我考虑过以下选项:

  • 仅使用 orgmode 并导出为 PDF(orgmode 本身具有此功能)

  • 使用 markdown 模式并导出为 PDF(markdown->LaTeX->PDF 应该不难设置);

  • 使用类似于@Pragmatic Progammers 所做的事情:XML + XSLT + LaTeX。 更复杂,但对风格的控制更多。

  • 编辑:有人刚刚告诉我他使用 Textile+Adobe In Design 和 XTags 插件的组合。不知道它们是如何粘合在一起的,需要做一些研究。

还有其他想法/参考吗?

我想尽快开始写作。事实上,我已经有了 org 格式文件的草稿。然而,我确实希望稍后能够拥有并使用 LaTex 的全部功能,以我想要的方式对其进行格式化,并使其看起来很棒:)

提前致谢,

Marcelo。

I have a book project which I'd like to start sooner than later. This would follow an agile-like publishing workflow, i.e: publish early and often. It is meant to be self-publsihed by me and I'm not really looking to paper-publish it, even though we never know.

If I weren't a geek, I'd probably have already started writting in Word or any other WYSIWYG tool and just export to PDF. However, we know it is not the best solution, and emacs rules my text-editing life, so, the output format should be as simple as possible and be text-based.

I've thought about the following options:

  • Just use orgmode and export to PDF (orgmode has this feature natively)

  • Use markdown mode and export to PDF (markdown->LaTeX->PDF should not be hard to setup);

  • Use something similar to what the guys @ Pragmatic Progammers do: A XML + XSLT + LaTeX.
    More complex, but much more control over the style.

  • EDIT: Someone just told me that he uses a combo of Textile+Adobe In Design and the XTags plugin. Not sure how they are glued together though, gotta do some research.

Any other ideas / references ?

I want to start writting as soon as possible. In fact, I already have a draft in an org-formatted file. However, I do want to have and use the full power of LaTex later on to format it the way I want and make it look fabulous :)

Thanks in advance,

Marcelo.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

沫离伤花 2024-09-06 15:31:47

我最近对此进行了大量研究,因为我计划很快创办自己的小型出版社。

这实际上取决于您希望最终输出的内容(PDF、HTML、其他?)以及本书的内容。

我相信您知道,组织模式很棒,因为它会随着您的扩展而扩展。我经常在组织模式下写大纲,然后在我真正准备好开始写作时填写正文。

如果它是散文,并且您只需要一些简单的划分(章节和章节,没有太多其他内容),则组织模式 ->乳胶应该适合你。那么你也有组织模式的可能性-> 如果你需要数学

,你可以直接在 org 模式文件中编写数学。

如果确实是技术信息,docbook 可能会很好(emacs + nxml),然后是 Dockbook 4.5 ->玉石->杰德克斯 -> pdf。

我会远离 docbook 5,因为它使用 FOP 生成 PDF,而且排版确实不如 Latex。

底线:如果您想要 PDF,请使用 org -> Latex,阻力最小的路径;)——无论你做什么,首先专注于书本的内容,然后再担心它看起来是什么样子。

为什么不发表论文呢?你看过lulu.com吗?我最近用 Latex 格式化了一本书,将 pdf 上传到 lulu,然后让他们打印。质量非常好,绝对值得一看。如果你有兴趣的话,我家里有很多关于出版的书签。

I have done a TON of research on this lately, since I'm planning on starting my own small press soon.

It really depends on what you want your final output to be (PDF, HTML, other?), and what the book is about.

Org mode is great, as I'm sure you know, because it expands as you do. I often write my outlines in org mode, then just fill in the body text when I'm really ready to start writing.

IF it's prose, and you just need some simple divisions (chapters and sections and not much else), org mode -> latex should do you just fine. Then you also have the possibility of org mode -> html

IF you need math in it, you can just write the math right in the org mode file.

If it's really really technical information, docbook might be nice (emacs + nxml), then dockbook 4.5 -> jade -> jadetex -> pdf.

I'd stay away from docbook 5, because it uses FOP to generate PDFs, and the typesetting is really inferior to latex.

BOTTOM LINE: If you want a PDF, use org -> latex, the path of least resistance ;) -- whatever you do, concentrate on the content of the book first, and worry about what it looks like til after.

And why not paper publish? Have you looked at lulu.com? I recently formatted a book with latex, uploaded the pdf to lulu, and had them print it. The quality is pretty good, and definitely worth a look. I have a ton of bookmarks at home about publishing in general, if you're interested.

总以为 2024-09-06 15:31:47

排版很难。

TeX/LaTeX 是可以为您提供最佳结果的工具,但是它们需要有关排版的知识才能正确使用 - 特别是对于像书这样的大文档。我还没有看到任何其他便宜的(=不适合专业用途)软件可以自动正确地完成任务。 (我没有见过任何专业软件,所以他们也可能不这样做)

但是,假设您将以某种机器可读的格式编写您的书,将其放入 TeX/LaTeX 中应该不会很困难:曾经我有一组自定义 XML 格式的文档。正确使用 XSLT、TeXML 和 LaTeX 给了我一些可以手动调整的东西(并且这种调整是必要的!)并获得最好的结果。

我的建议:以易于解析和易于编写的方式准备内容。我会放弃 XML。 Markdown 似乎是不错的选择。这也将使您能够快速展示您的作品。然后,如果您决定让结果更好,请编写一些简单的脚本将其转换为 TeX(获得基本功能并不难)并手动修复问题。这实际上可能是学习 TeX 的一个很好的练习。

不要试图从一开始就把一切都做好。首先获取内容,然后进行格式化。

Typography is hard.

TeX/LaTeX are tools that can get you the best possible results, however they require knowledge about typography to be used correctly--especially with a big document like a book. And I haven't seen any other cheap (=not for professional use) software that would do things correctly automatically. (I haven't seen any professional software, so it is possible they don't do that either)

However, assuming that you'll write your book in some machine-readable format, putting it into TeX/LaTeX should not be very hard: once I had a set of documents in a custom XML format. Proper usage of XSLT, TeXML and LaTeX gave me something I could tweak manually (and this tweaking was necessary!) and get the best possible result.

My advice: prepare content in something that is easy to parse and easy to write in. I'd dismiss XML. Markdown seems to be good choice. This will also allow you to quickly show your work. Then if you decide to make the result better, write some simple script to translate that to TeX (it is not that hard to get basic functionality) and fix things by hand. This might actually be a good exercise to learn TeX.

Don't try to get everything right from the beginning. Firstly get the content, then play with formatting.

七颜 2024-09-06 15:31:47

如果您真的只想在线进行,我建议您使用组织模式并停留在 HTML 中。然后你可以使用 CSS 来设置你想要的样式。

话虽这么说,如果您确实想将技术内容输出为 PDF,我强烈建议使用 Docbook (www.docbook.org)。它就是为此而设计的,它与 Emacs 配合得很好。

If you are really wanting to do online only, I would suggest you use org mode and just stay in HTML. Then you can use CSS to style it however you would like.

That being said, if you really want to output to PDF for technical stuff, I would strongly suggest using Docbook (www.docbook.org). It's made for that, it works great with Emacs.

蹲墙角沉默 2024-09-06 15:31:47

你自己已经回答了。更不用说你已经开始在组织模式下写作了。 Org-mode 确实非常强大,使您最终能够毫不费力地发布为 PDF 和 HTML。

对于 PDF,您可以利用 LaTeX 以及组织模式如何处理导出。您可以将任何 LaTeX 代码包含到您的组织文件中。另外,恕我直言,以 org 模式编写书籍/文章会更好,因为某些事情变得比普通 .tex 文件(例如表格)更容易。

关于发布,这是一个相同的故事,只有一个功能,您可以触发导出为 HTML/PDF 并上传到您的服务器。请注意,您仍然使用纯文本文件,该文件是人类可读且非常干净的。

Org-mode 确实遵循 Emacs 哲学,只要开始使用它,它就会与您一起成长。

You have already answered yourself. Not mentioning that you already started writing in org-mode. Org-mode is really extremely powerful and will enable you to publish to PDF and HTML eventually with no effort.

In case of PDF you can take advantage of LaTeX and how org-mode is working with exports. You can include any LaTeX code to your org file. Also IMHO it's way better to write the book/article in org-mode since something becomes even easier than in plain .tex files take for example tables.

Regarding Publishing it's a same story with one single function you can trigger exporting to HTML/PDF and uploading to your server. And notice that you are still using just plain text file which is human readable and very clean.

Org-mode really follows the Emacs philosphy just start using it and it will grow with you.

清音悠歌 2024-09-06 15:31:47

如果你正在写一本书,那么学习 tex 的开销肯定是值得的。

甚至像这样,

\documentclass[a4paper,10pt]{book} 
\title{SERPA'S BOOK}
\author{SERPA}
\date{\today}
\begin{document}

\maketitle

\tableofcontents
\include{chapterA}
\include{chapterB}
\include{chapterC}
\end{document}

然后,在同一目录中的文件 ChapterA.tex、chapterB.tex、chapterC.tex 看起来像

\chapter{My chapter title}

Lorem ipsum dolor sit amet, consectetur adipiscing elit....

这样,仅此一项就会生成一个非常漂亮的文档。你可以单独编辑每一章,然后编译主 tex 文件。我认为如果你尝试学习试图从 tex 中抽象出来的中间工具,你只会让以后做你真正想做的事情变得更加困难,因为你将同时对抗 tex 和 tex 的抽象。

祝你在这样的事业上好运。

另外,无论您做什么,请确保使用某种版本控制系统(例如 SVN)来管理您的文件。这是值得的。

If you are writing a book, it would certainly be worth the overhead of learning tex.

Even something like,

\documentclass[a4paper,10pt]{book} 
\title{SERPA'S BOOK}
\author{SERPA}
\date{\today}
\begin{document}

\maketitle

\tableofcontents
\include{chapterA}
\include{chapterB}
\include{chapterC}
\end{document}

Then, in the same directory have files chapterA.tex, chapterB.tex, chapterC.tex that look like

\chapter{My chapter title}

Lorem ipsum dolor sit amet, consectetur adipiscing elit....

That alone will produce an extremely nice looking document. You can edit each chapter separately and then just compile the main tex file. I think if you try to learn intermediate tools that try to abstract away from tex, you'll only make it more difficult later to do what you actually want, because you will be both fighting tex and an abstraction of tex at the same time.

Best of luck on such an undertaking.

Also, no matter what you do, make sure to use some kind of version control system, such as SVN, to manage your files. It will be worth it.

思念满溢 2024-09-06 15:31:47

我会用 Latex 编写它,并拥有一个在线存储库,该存储库每晚都会编译为“可发布”分支的 PDF,以供读者使用。

I would write it in Latex and have an online repository that does nightly compiles to PDF of the 'publish-ready' branch, available to readers.

爱格式化 2024-09-06 15:31:47

这些天我不会开始使用 LaTeX。 TeX 输入是非结构化的,您可以从 TeX 输入中获得的唯一内容是 PDF。如果您需要 HTML 或其他任何东西,那么您就完蛋了。

使用结构化的内容,例如 XML(DocBook 是一个很好的建议)或根据需要定义您自己的 XML 子集。使用 XSLT 将其转换为可用的内容(HTML 等),这样您就可以为未来做好准备。

根据您的印刷需求,您可以使用 TeX 作为后端处理器,或者 XSLT 或其他。

另外,看看ConTeXt,它可以直接读取XML,并且排版很棒!

I would not start with using LaTeX these days. TeX input is unstructured and the only thing you can get out of TeX input is PDF. If you need HTML or anything else, you are screwed.

Use something structured, such as XML (DocBook is a good suggestion) or define your own XML subset as you need it. Use XSLT to transform it into something usable (HTML etc.) That way you are set for the future.

Depending on your typographical needs, you can then use TeX as a backend processor, or XSLT or whatever.

Also, have a look at ConTeXt, it can read XML directly and has great typography!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文