Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am about to write a couple of books using LaTeX. I am fairly used to producing small LaTeX articles using Sweave and R, but I have never written a book using LaTeX and I am not conversant with the LaTeX practices standard for writing books.

Also, though I have a few ideas about how to structure such a big document, not having written a book in LaTeX myself, I don't know what works and what doesn't in the long run.

The books I am writing are:

  • A book with a lot of charts and code (in R), and a few tables. I'll be using Sweave with this.
  • A book with a lot of text and a few images. I'll be quoting passages and quite a few poems. An entire section/chapter could consist of poetry.

Here are my questions (answers with examples/references will be appreciated):

  1. What techniques/best-practices should I follow in writing the books using LaTeX? What are the packages that are typically helpful?
  2. What are the packages in LaTeX that I could/should use for typesetting poetry?
  3. Sweave is nice enough for including R code, but I would like something that looks more professional. I have seen and used listings, and though I still don't have a set of options which looks fancy enough, I am guessing listings will do with enough tweaking. Am I missing out on anything? Should I be using listings with any other package? Do you have nice listings templates to share?
  4. Any nice templates for writing books? Or helpful online resources specific to writing books with LaTeX?
share|improve this question

closed as too broad by Jubobs, Peter Jansson, Martin Schröder, Svend Tveskæg, cmhughes Mar 1 at 20:19

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Welcome to TeX.sx! This site works best if you ask one question at the time. –  N.N. Apr 4 '12 at 20:26
2  
IMHO two great resources to begin with: A Few Notes on Book Design and The Memoir Class for Configurable Typesetting, both from memoir's author Peter Wilson (manual maintained by Lars Madsen). :) –  Paulo Cereda Apr 5 '12 at 1:07
    
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Jubobs Mar 1 at 18:58
add comment

3 Answers 3

up vote 6 down vote accepted

For a general introduction to book design using LaTeX, do check out A Few Notes on Book Design by Peter Wilson. Obviously, there's no single "correct" answer as to how a book ought to be designed. If you have considerable freedom in selecting a design (as seems to be implied by your question), you could start by simply taking a close look at the layouts of some books -- whether they're in the same field as the book you intend to publish or not -- and decide what parts of the overall design of these books you like (or dislike). Among the criteria should be

  • size of page and of textblock within each page?
  • are there (wide) margins containing supplemental notes, callouts, etc.?
  • use of running headers?
  • layout of sectioning headers (chapters, sections, subsections, etc)
  • font and font sizes?
  • use of color (including "bold" (i.e., more black than normal text font))?
  • use of boxes and other visually appealing techniques?
  • quality of paper (shiny, matte, feel to touch)
  • if the book will be available in electronic format: use of hyper-linking of materials

And so on... Have fun!

share|improve this answer
add comment

Since you mentioned R, I would recommend you to use the knitr package instead of Sweave. You can go to the package website to know more about it: http://yihui.name/knitr It is much more flexible and customizable than Sweave. For example, you only need to call render_listings() in order to switch to the listings package (e.g. http://yihui.name/knitr/demo/listings/). Recently I also started thinking on writing a book: https://github.com/yihui/knitr-book The basic sketch is there, and I'm writing with markdown instead of LaTeX since the former is much easier to write; I can convert markdown files to LaTeX later with pandoc if I want. I have finished the knitr book using knitr and LyX.

share|improve this answer
    
Hey, I have started using knitr. Thanks for a job well done. –  Soumendra Apr 8 '13 at 19:37
    
@Soumendra good -- now I have finished a book based on knitr :) –  Yihui Apr 8 '13 at 23:18
    
Almost an year down the line, I have made a complete switch to knitr, and I don't know how I could ever live without it. –  Soumendra Mar 5 at 12:56
add comment

I apologize in advance for this being not much of an answer--but as N.N. mentioned in his comment, you'll get much better responses if you ask each of your questions separately.

  1. and 4. I'm also a beginner at LaTeX, but I've been using the memoir class to write a book, and it's been incredibly helpful. It has built-in support for chapter headings, page headers and footers, indices, etc.

  2. You might find this article helpful.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/50774/latex-techniques-and-templates-for-writing-a-book/50793
tex.stackexchange.com
crawl=CC-MAIN-2014-23
75456
application/http; msgtype=response
sha1:YKD23IP4XD64D2PLJVIJYIAONDP4XMXX
<urn:uuid:958d5ac8-caec-4f15-81a0-b677a3f3eb3e>
2014-07-25T05:19:07Z
198.252.206.16
sha1:D7DSSXFZITMP5D45KALW3S4FQ4R36YXQ
<urn:uuid:f99f7a6d-525c-4f92-837e-adc7533051cc>
http://tex.stackexchange.com/questions/50774/latex-techniques-and-templates-for-writing-a-book/50793
response
<urn:uuid:a5256e7d-8fc9-415f-8ddd-d990ee97b27c>
robots: classic
hostname: ip-10-33-131-23.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-23
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for July 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf