Warning: This is not some simple to use program, but the best in my opinion. It will take much longer than HandBrake to master and encodes if done proper will take much longer.
For encoding
http://sourceforge.net/projects/megui/n update all components after install. One of the programs in it is DGIndex found in C:\Program Files\megui\tools\dgindex
Use that to rip all audio tracks and making a video profile or .d2v
I would very much recommend using MEGui as well for the video encoding. In which case you will need AvsP to make the avisynth script
Download
I prefer SubRip for getting the subs, but that' down to preference.
Download SubRip 1.50 beta 4 - SubRip is a program that allows you to rip DVD subtitles with their timing as a text file - Softpedia
Use MKVMerge to make the complete .mkv including all tracks and subs. It will be under Program Files/megui/tools/mkvmerge