RUBBER(1)
πΈ RUBBER(1) β General Commands Manual πΈ
okay bestie, pull up a chair, we're learning rubber today and honestly? it's iconic π
(also hi, this is part 1 of 3, so don't go anywhere)
β¨ NAME β¨
rubber β a building system for LaTeX documents π
π SYNOPSIS π
rubber [options] sources ...
rubber-pipe [options]
π DESCRIPTION π
So. Rubber is a wrapper for LaTeX and its little companion programs. The whole point of it, like, the entire vibe, is: you hand it a LaTeX source to process, and it compiles that thing enough times to resolve all the references β and along the way it might run satellite programs like BibTeX, makeindex, Metapost, etc. to produce the appropriate data files. yes bestie, it's doing all that so you don't have to ππ«Ά
The command rubber builds the documents you specify completely. Those source files can be either LaTeX sources (in which case, cute news, you can totally omit the .tex suffix) or documents in a format Rubber knows how to translate into LaTeX. Now listen: if one compilation fails, the whole process stops β including the compilation of the next documents on the command line β and rubber returns a non-zero exit code. no mercy, periodt π
The command rubber-pipe does the same thing but for one document: it reads the LaTeX source from standard input and dumps the compiled document on standard output. stream queen behavior β¨
Now, some information simply cannot be extracted from the LaTeX sources. That's the case, for instance, with the search paths (which can be specified in environment variables like TEXINPUTS), or the style to be used with Makeindex. To address this problem, you can add information for Rubber right in the comments of the LaTeX sources β see section DIRECTIVES. iykyk π§
π OPTIONS π
The options are used either to choose the action to be performed or to configure the building process. They're mostly the same in rubber and rubber-pipe. And options are parsed using GNU Getopt conventions, so you know it's the standard deal.
-b,--bzip2β Compress the final document (in bzip2 format). This is equivalent to saying-o bzip2after all other options. squeeze it, bestie π--cleanβ Remove all files produced by the compilation, instead of building the document. Heads up: this option is present inrubberonly. And it applies to the compilation as it would be done with the other options of the command line β i.e. sayingrubber --clean foowill not deletefoo.ps, while sayingrubber --ps --clean foowill. it's giving "read the fine print" π-c,--command <command>β Execute the specified command (or directive) before parsing the input files. See section DIRECTIVES for details.-e,--epilogue <command>β Execute the specified command (or directive) after parsing the input files. See section DIRECTIVES for details.-f,--forceβ Force at least one compilation of the source. This may be useful, for instance, if some unusual dependency was modified (e.g. a package in a system directory). Just so you know: this option is irrelevant inrubber-pipe. π-z,--gzipβ Compress the final document (in gzip format). This is equivalent to saying-o gzafter all other options. zip zip π¦-h,--helpβ Display the list of all available options and exit nicely. a polite queen π--inplaceβ Go to the directory of the source files before compiling, so that compilation results are in the same place as their sources. stay home, stay cozy π--into <directory>β Go to the specified directory before compiling, so that all files are produced there and not in the current directory. relocation era βοΈ--jobname <name>β Specify a job name different from the base file name. This changes the name of output files and only applies to the first target. glow-up via rebranding β¨-k,--keepβ This option is used inrubber-pipeonly. With this option, the temporary files will not be removed after compiling the document and dumping the results on standard output. The temporary document is namedrubtmpX.tex, whereXis a number such that no file of that name exists initially. keeping receipts, love that for you π§Ύ-n,--maxerr <num>β Set the maximum number of displayed errors. By default, up to 10 errors are reported, and saying-n -1displays all errors. we're not gatekeeping the errors π-m,--module <module>[:<args>]β Use the specified module in addition to the document's packages. Arguments can be passed to the package by adding them after a colon, and they correspond to the package options in LaTeX. The module is loaded before parsing the document's sources.--only <sources>β Compile the document partially, including only the specified sources. This works by inserting a call to\includeonlyon the command line. The argument is a comma-separated list of file names. selective and unbothered π-o,--post <module>[:<args>]β Use the specified module as a post-processor. This is similar to the-moptions except that the module is loaded after parsing the document.-d,--pdfβ Produce PDF output. When this option comes after--ps(for instance in the form-pd) it is a synonym for-o ps2pdf, otherwise it acts as-m pdftex, in order to use pdfLaTeX instead of LaTeX. two moods, one flag π-p,--psβ Process the DVI produced by the process throughdvips(1)to produce a PostScript document. This option is a synonym for-o dvips, and it cannot come after--pdf. no backsies π«-q,--quietβ Decrease the verbosity level. This is the reverse of-v. shhh π€«-r,--read <file>β Read additional directives from the specified file (see also the directive"read"). homework era π-S,--src-specialsβ Enable generation of source specials if the compiler supports it. This is equivalent to setting the variablesrc-specialstoyes.-s,--shortβ Display LaTeX's error messages in a compact form (one error per line). tl;dr but make it errors π―-I,--texpath <directory>β Add the specified directory to TeX's search path. adding to the group chat π₯--synctexβ Enable SyncTeX support in the LaTeX run. sync so hard π₯--unsafeβ Permit the document to invoke arbitrary external programs. > This is potentially dangerous, only use this option for documents coming from a trusted source. bestie I'm begging you, trust check first π-v,--verboseβ Increase the verbosity level. Levels between0and4exist, and the default level is1forrubberand0forrubber-pipe. Beware: saying-vvvmakes Rubber speak a lot. it will not stop talking and honestly, same π--versionβ Print the version number and exit nicely. slay, identity confirmed π-W,--warn <type>β Report information of the given type if there was no error during compilation. The available types are:boxes(overfull and underfull boxes),refs(undefined or multiply defined references),misc(other warnings) andallto report all warnings. pick your poison, gorgeous β
πΈ part 1 done, part 2 incoming, don't touch that dial πΈ
β¨ MODULES β¨
okay so bestie, here's the tea: Rubber's whole personality is shaped by its modules. Each module is in charge of one specific little niche β some package's extra needs, or some external program that has to get involved. π§©
π Packages π
So the way this works: for every single package your document pulls in, Rubber goes looking for a module with that exact same name, and that module handles whatever extra tasks the package needs beyond LaTeX just doing its normal compile thing. And yes, you can absolutely stack more modules on top of the default ones to get new features β that's literally the entire point of the module system. π
The standard modules are these ones, right here:
asymptoteβ processes the.asyfiles that the LaTeX package generates, and then it triggers a recompilation. obsessed.beamerβ this module handles Beamer's extra files exactly the same way it handles other tables of contents.bibtex,biblatexβ takes care of processing your document's bibliography with BibTeX whenever it's needed. This one loads itself automatically if your document has the\bibliographymacro in it (and hey, check DIRECTIVES for the options, iykyk).combineβ the combine package is all about gathering several LaTeX documents into one single document, and this module handles the dependencies in that whole situation.epsfigβ this module handles graphics inclusion for documents using the old style\psfigmacro. Ngl it's actually just an interface for thegraphicsmodule β go look at that one for the details.glossariesβ runsmakeglossariesand recompiles whenever the.glofile changes.graphics,graphicxβ these modules clock which graphics are included in your document and treat them as dependencies for compilation. They also use standard rules to build those files with external programs. See the info documentation for the full rundown.hyperrefβ handles the extra files this package produces in some cases.index,makeidx,nomenclβ processes your document's indexes and nomenclatures withmakeindex(1)when needed (again, DIRECTIVES has the options).ltxtableβ adds dependencies for files inserted via the ltxtable LaTeX package.minitoc,minitoc-hyperβ on cleaning, these remove the additional files that were produced to make partial tables of contents.moreverb,verbatimβ adds the files included with\verbatiminputand similar macros to the list of dependencies.multibibβ handles the extra bibliographies this package creates, and removes those extra files when cleaning.xrβ adds the additional.auxfiles used for external references to the list of dependencies, so recompiling happens automatically when the referenced document gets changed. iconic behaviour tbh.
πΈ Pre-processing πΈ
These next modules are for when you're using programs that generate a LaTeX source out of a totally different file format:
cwebβ this module's whole purpose is to runcweave(1)if needed before the compiling process, so it can produce the LaTeX source. It loads itself automatically if the file you named on the command line has.was its suffix.lhs2TeXβ this module uses the lhs2TeX preprocessor to generate the LaTeX source from a Literate Haskell program. It gets triggered automatically if your input file's name ends with.lhs.
π¦ Post-processing π¦
These modules are here to support different kinds of post-processing. And heads up bestie, the order matters when you use them: if you want a processing chain like
foo.tex -> foo.dvi -> foo.ps -> foo.pdf -> foo.pdf.gz
then you have to load the modules dvips, ps2pdf and gz in that order β for instance with the command line
rubber -p -o ps2pdf -z foo.tex
bzip2β produce a version of the final file compressed withbzip2(1).dvipdfmβ runsdvipdfm(1)at the end of compilation to produce a PDF document.dvipsβ runsdvips(1)at the end of compilation to produce a PostScript document. This module also gets loaded by the command line option--ps.expandβ produce an expanded LaTeX source by replacing\inputmacros with the included files, bibliography macros with the bibliography thatbibtex(1)produced, and local classes and packages with their source. If the main file isfoo.texthen the expanded file will be namedfoo-final.tex. See the info documentation for details.gzβ produce a version of the final file compressed withgzip(1).ps2pdfβ assuming the compilation produces a PostScript document (for instance by using thedvipsmodule), convert that document to PDF usingps2pdf(1).
π Compiler choice π
These modules exist purely to swap out your LaTeX compiler:
alephβ use the Aleph compiler instead of TeX, i.e. it compiles the document usinglamed(1)instead oflatex.omegaβ use the Omega compiler instead of TeX, i.e. it compiles the document usinglambda(1)instead oflatex. And if thedvipsmodule is being used too, it'll useodvips(1)to translate the DVI file. Little note: this module gets triggered automatically when your document uses theomegapackage.pdftexβ instructs Rubber to usepdflatex(1)instead oflatex(1)to compile the document. By default this produces a PDF file instead of a DVI, but when you load the module with the optiondvi(like if you say-m pdftex:dvi) the document gets compiled into DVI usingpdflatex. This module is also loaded by the command line option--pdf.vtexβ instructs Rubber to use the VTeX compiler. By default this usesvlatexas the compiler to produce PDF output. With the optionps(e.g. when you say"rubber -m vtex:ps foo.tex") the compiler used isvlatexpand the result is a PostScript file.xelatexβ instructs Rubber to usexelatex(1)instead oflatex.
π DIRECTIVES π
So like, Rubber is normally mad smart β it just sniffs around your LaTeX sources looking for macros and figures stuff out on its own. But bestie, sometimes that's just not enough?? And when it's not enough, you drop a directive in the comments of your source. A directive is a line that looks like this:
% rubber: cmd args
The rules, exactly: the line has to begin with a %, then any sequence of % signs and spaces, then the text rubber:, followed by spaces and a command name, and possibly more spaces and arguments after that. That's it, that's the whole vibe. β¨
πΈ General directives πΈ
alias <name1> <name2>β Pretend the LaTeX macroname1is equivalent toname2. Super handy when you're defining wrappers around macros that Rubber already supports. π«Άclean <file>β Says that this file should get yeeted when you clean with--clean. Bye bestie πdepend <file>β Treat the file as a dependency, so Rubber will check its modification time. Obsessed with staying up to date.make <file> [<options>]β Declares that the file has to be generated. The options can specify the way it should be produced:from <file>to specify the source, andwith <rule>to specify the conversion rule. For instance, sayingmake foo.pdf from foo.epsmeansfoo.pdfshould be produced fromfoo.eps, using any conversion rule that can pull it off. (The info documentation has the deets on file conversion. π)module <module> [<options>]β Loads the specified module, possibly with options. It's literally the same as the command-line option--module.onchange <file> <command>β Runs the specified shell command after compiling if the contents of the file have changed. Heads up: the file name ends at the first space. π₯path <directory>β Adds the directory to the search path for TeX (and for Rubber). The name of the directory is everything that follows the spaces afterpath, so go wild.produce <file>β Declares that the LaTeX run is gonna create or update the file(s). Iconic.read <file>β Reads a file of directives. It must contain one directive per line. Empty lines and lines that begin with%are ignored. πrules <file>β Reads extra conversion rules from the file. The format is the same asrules.iniβ see the info documentation for details.set <name> <value>β Sets the value of a variable as a string. For all the existing variables and what they mean, check the info documentation.setlist <name> <values>β Sets the value of a variable as a (space-separated) list of strings. Same deal, info documentation has the lore.shell_escapeβ Marks the document as requiring external programs (shell-escape or write18). > Ngl this one's important: Rubber does not actually enable this unless it's called with the option--unsafe. Safety first, bestie. π‘οΈsynctexβ Enables SyncTeX support in the LaTeX run.watch <file>β Watches the file for changes. If its contents changed after a compilation, another compilation gets triggered. Perfect for tables of contents and that kind of "wait, run it again" situation. π
π¦ Module-specific directives π¦
If a command has the form foo.bar, it's considered a command bar for the module foo. And if that module isn't registered when the directive is found, the command is silently ignored β no drama, no error, it just moves on. π
For the standard modules, the directives are these:
biblatex.path <directory>β Adds the directory to the search path for BibTeX databases (.bibfiles).bibtex.crossrefs <number>β Sets the minimum number of crossref required for automatic inclusion of the referenced entry in the citation list. This sets the option-min-crossrefswhen callingbibtex(1).bibtex.path <directory>β Adds the directory to the search path for BibTeX databases (.bibfiles).bibtex.stylepath <directory>β Adds the directory to the search path for BibTeX styles (.bstfiles).bibtex.tool <command>β Use a different bibliography tool instead of BibTeX.dvipdfm.options <options>β Passes the specified command-line switches todvipdfm.dvips.options <options>β Passes the specified command-line switches todvips.index.tool (index) <name>β Specifies which tool processes the index. Currently supported:makeindex(1)(the default choice) andxindy(1). The argumentindexis optional β you can use it to specify the list of indexes the command applies to. When it's present it must be enclosed in parentheses, and the list is comma-separated. When it's not present, the command applies to all indices.index.language (index) <language>β Selects the language used for sorting the index. This only applies when usingxindy(1)as the indexing tool. The optional argument has the same semantics as above.index.modules (index) <module>...β Specifies which modules to use when processing an index withxindy(1). The optional argument has the same semantics as above.index.order (index) <options>β Modifies the sorting options for the indexes. The arguments are words (separated by spaces) amongstandard,germanandletter. This only applies when usingmakeindex(1). The optional argument has the same semantics as above.index.path (index) <directory>β Adds the directory to the search path for index styles (.istfiles). The optional argument has the same semantics as above.index.style (index) <style>β Specifies the index style to be used. The optional argument has the same semantics as above.makeidx.language,.modules,.order,.path,.style,.toolβ These are the same as for theindexmodule, except they don't accept the optional argument. πmultibib.crossrefs,.path,.stylepath,.toolβ Same as for thebibtexmodule, but they apply to bibliographies managed by themultibibpackage. They take an optional first argument, with the same convention as the directives of theindexmodule, which can specify the list of bibliographies the command applies to.
π BUGS π
There are surely a some...
(Yeah, that's the whole thing. We love an honest queen.)
This page documents Rubber version 1.6.7. The program and this man-page are maintained by Florian Schmaus <flo@geekplace.eu>. The homepage for Rubber can be found at https://gitlab.com/latex-rubber/rubber. π
β¨ SEE ALSO β¨
The full documentation for rubber is maintained as a Texinfo manual. If the info and rubber programs are properly installed at your site, the command
info rubber
should give you access to the complete manual. Go read it, it's giving encyclopedia but make it cute. π
And that's the whole page, bestie π«Ά β that was the RUBBER(1) manual, version 1.6.7, brought to you by Florian Schmaus <flo@geekplace.eu> over at https://gitlab.com/latex-rubber/rubber. Now go compile something iconic. π
πΈ
π¦ where this page comes from
- arch rolling: rubber 1.6.7-1 Β· GPL-2.0-only
- debian trixie: rubber 1.6.7-1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rubber 1.6.7-bp160.1.8 Β· GPL-2.0-only
- ubuntu questing: rubber 1.6.7-1
- ubuntu resolute: rubber 1.6.7-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: rubber 1.6.7-1build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms