4 ms·
I am currently writing my first print book, and honestly feel that LaTeX is the best solution. I want precise control over a 250+ page book. I have never seen a
by grecy 9y ago
I am currently writing my first print book, and honestly feel that LaTeX is the best solution. I want precise control over a 250+ page book. I have never seen a WYSIWYG editor that doesn't make that a royal PITA.
Different gutters on left and right pages, chapters always starting on a right hand page, consistent and great justification, fine control over how chapter headings appear (and quick to update) etc. etc.
On a side note, is anyone aware of a good way to convert LaTeX (or the produced pdf) into an ePub?
- mastax 9y agoI haven't used it, but pandoc seems like "the way".
- fny 9y agoYou can compile from LaTeX to HTML with pandoc and then repackage the HTML into an epub using a tool like epubmaker[0]. YMMV though with pandoc, not sure how well it handles more fancy latex macros and packages. The simplest thing to do might be start with a more HTML-based solution (e.g. Markdown with extensions, RST) and then compile that into whatever layout you intend for the physical/pdf form. [0]: https://github.com/setanta/ebookmaker https://github.com/setanta/ebookmaker
- eslaught 9y agoPandoc is excellent, but I'd recommend coverting Markdown to LaTeX instead of the other way around. I've tried several LaTeX to X converters (for any value of X other than PS/PDF) and frankly none of them are very good. The advantage of starting with Markdown is that you know that the format is a good match for the tool's internal AST, which makes the results much more predictable. Pandoc has the advantage that you can still write LaTeX directly inline when you need to. You can also write in terms of divs and spans (which Pandoc understands natively) and convert these to whatever you want via filters. The latter approach has the advantage that different filters can generate the appropriate code for the format you're generating, so that you don't just lose the elements when you convert to an incompatible format. Shameless plug: I've built a tool that helps manage the conversion: https://bitbucket.org/elliottslaughter/bookmd https://bitbucket.org/elliottslaughter/bookmd
- emmab 9y agoHTML doesn't have a notion of multiple pages within the same document though?
- dragonwriter 9y ago> HTML doesn't have a notion of multiple pages within the same document though? HTML is at a higher level of abstraction, but the HTML/CSS stack supports paged rendering, and browsers tend to support this for print (pre-Blink Opera did for on-screen use, though I don't know if current browsers do.)
- dredmorbius 9y agoThat depends on what you're talking about. HTML itself is a text markup language, not a styling language. (Well ... mostly.) But through CSS with a paper media-type, you can specify page-based conditions and actions.
- throwaway2016a 9y agoI've worked with O'Reilly and Wrox and both have you do one document per chapter. Anything over 30 pages and MS Word starts to choke, especially with a lot of diagrams. Neither gave me the choice to use LaTeX although I'm sure they might have been open to it had I asked.
- grecy 9y ago> I've worked with O'Reilly and Wrox and both have you do one document per chapter Ouch. The number of times I have changed stuff like gutters, margins, chapter headings, caption fonts and layouts would make that an absolute nightmare. I am really happy how easy all that stuff is in LaTeX. (Of course, other things are a nightmare.)
- throwaway2016a 9y ago> The number of times I have changed stuff like gutters, margins, chapter headings, caption fonts and layouts would make that an absolute nightmare. The big publishers don't give you control over that. They give you a template and you have to stick to it. As an author your first and only job is to provide the content (typically). Not everyone knows this but MS Word lets you create formatting blocks that essential behave like CSS classes. Most people have used MS Word Heading, Sub Heading, etc not realizing that as long as you never touch the font formatting options the classes can be changed globally just by applying a different template. The final typesetting of the document is completely up to the publisher. I always assume they simply have a script that pulls out the raw text with formatting indicators and compiles it all together.
- grecy 9y agoI am self-publishing. > Not everyone knows this but MS Word lets you create formatting blocks that essential behave like CSS classes. Most people have used MS Word Heading, Sub Heading, etc not realizing that as long as you never touch the font formatting options the classes can be changed globally just by applying a different template. Absolutely, but it's going to be a nightmare when all of my 40 chapters are in a different word doc...
- kevin_thibedeau 9y agoXSL-FO provides a similar level of format control without the headaches of a hard to debug language and fossilized macros. You can use Docbook as the launching point for the final translation to XSL-FO and use any number of human friendly markup languages (ReST, Markdown, etc.) that can be converted to Docbook. Other output formats like ePub also become easy to generate with a Docbook intermediate.
- Turing_Machine 9y agoUnfortunately, XSL-FO is more or less abandonware at this point, with future development focused on CSS Paged Media.