Let's consider the foo.tex file. Running
rubber --ps --pdf foo
will correctly produce both ps and pdf outputs. The flags are:
--ps: process the DVI produced by the process through dvips to produce a PostScript document. According to the manual, order matters, so it cannot come after the --pdf flag.
--pdf: produce PDF output. When this option comes after --ps, it will use ps2pdf instead of pdftex.
rubber will automatically run makeindex for you, but in this case, you want to provide a specific style. In order to properly set the index style for makeindex, you need to add information for rubber in the comments of your foo.tex file, in the form of directives.
A rubber directive goes like this:
% rubber: cmd args
According to the manual, we have a special directive to deal with index styles:
index.style <style>: specifies the index style to be used. It's important to note that each of these directives may be used with an optional first argument of the form (foo,bar,quux) in order to specify that the directive only applies to the indexes named foo, bar and quux. By default, directives are applied to all indices.
In your case, considering the myindex.ist style, add the following line to the foo.tex file:
% rubber: index.style myindex.ist
\documentclass{book}
...
An important note from the manual:
- When using the package
makeidx instead of index, the directives must of course be prefixed by makeidx. instead of index., and the optional first argument is not accepted.
So, if you use the makeidx package, add:
% rubber: makeidx.style myindex.ist
\documentclass{book}
...
instead.
There are several directives in which you can set rubber's behaviour. man pages and also info rubber are your friends. I strongly recommend the reading. :)
Disclaimer: We had a new blog post about rubber ready to go, but unfortunately we had to postpone it due to some css issues. This question is a lucky coincidence. :)
rubber --ps --pdf foo.texis not enough? (man rubber) – eudoxos Nov 19 '11 at 7:36rubberin the comments of yourfoo.texfile, in the form of directives. Arubberdirective goes like this:% rubber: cmd args. In your case, add the following line to yourtexfile:% rubber: index.style myindex.ist. If you use themakeidxpackage, add% rubber: makeidx.style myindex.istinstead. There are several directives in which you can setrubber's behaviour.manpages and alsoinfo rubberare your friends. Hope it helps.:)– Paulo Cereda Nov 19 '11 at 9:26