Hacker News new | past | comments | ask | show | jobs | submit login
How I'm writing my book using Vim, Git and Ruby (chrismdp.github.com)
55 points by chrismdp on Nov 2, 2010 | hide | past | favorite | 17 comments



It seems the OP likes his Vim, Git and Ruby. I have found Org-Mode to be very useful when writing articles. With support for rich text, hyper-links as well the ability to export to HTML (with a TOC, and the ability to pull in your custom CSS/JS files) it makes for a very nice editor. If you are doing Ruby code snippets, Org-Babel works pretty well too.

Again, not picking on the OP's tool-kit. Figured I would throw out another alternative.


Org-Mode looks nice. One of the best things about posting your own ideas up is that you find out about all the other cool tools out there!


LaTeX is your friend...


Yeah, I thought about using LaTeX. I've certainly used it a lot in the past, but became quite frustrated with the weird syntax and difficulty extending. Plus its a 1.2GiB download on OSX.

I may well generate latex as an output format as a first formatting step.



Awesome: that's really useful! thanks!


...and also your enemy. "Frienemy", I think the word is. hat said, it's a nice back-end for the lightweight markup system I'm using on my own book this month. The memoir document class is really good stuff once you figure out how to use it.


Why not make dsl on top of latex instead of inventing everything yourself. I dout that the ruby DSL he is writing is going to compile to a perfektly nice pdf.


As a first step it's likely to compile down to LaTeX.


glyph (http://github.com/h3rald/glyph) looks very promising for books writing


Hi, I am the creator of Glyph, thanks for the mention :-)

Glyph can be used in many different ways, either on its own (it can be effectly used as an alternative HTML syntax) or in conjunction with existing lightweight markups like Textile and Markdown.

When I originally thought about creating a document authoring framework, all I wanted was to extend Textile so that it could handle section. Soon afterwards, I realized I wanted more than that. I wanted the ability to reuse content through snippets and even the possibility of creating my own macros easily, so I ended up creating a new language.

How heavily you use glyph is entirely up to you. If you like Textile and Markdown, you can just use some of the core macros and sections. For example:

  md_section[
    @title[Test Section #1]
  This is basically a titled div where you can use _markdown_.
  ] 
  txt_section[
    @title[Test Section #2]
  Here, instead, you can use *Textile*.
  ]

In this way yes, Markdown and Textile are second-class citizens, but this is a good thing, in a way. Glyph is markup-independent so you can use them both, if you like, and even create additional filters if you want.

Regarding the syntax, I wanted something very basic (and easy to parse :P) but usable. Sometimes it may get a bit heavy, but on the other hand you can create macros for complex formatting, i.e. custom tables.

At any rate, if you have any ideas on how to improve Glyph PLEASE do contact me! I'm always looking for constructive feedback!


Hmm, that's cool. The new syntax puts me off somewhere, but this could form a good basis.


I'm still in procrastination mode and haven't tried glyph but it seems that textile and markdown are supported.


Looks like Markdown is only supported inline rather than a first class citizen. I think I'm after something lighter-weight than this, but I won't know until I come to try and write the publishing stuff :)


To throw another option out there, try Pandoc: http://johnmacfarlane.net/pandoc/

Uses Markdown, converts to everything, written in Haskell.


This is absolutely fantastic, and quite possibly really useful...


Thanks. Been looking for a ruby like syntax to do text formatting for a while. Time to create one, I guess!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: